mirror of
https://github.com/haexhub/haex-hub.git
synced 2025-12-16 14:10:52 +01:00
removed logs
This commit is contained in:
@ -11,10 +11,6 @@ const { availableThemes, currentTheme } = storeToRefs(useUiStore())
|
||||
|
||||
const emit = defineEmits<{ select: [string] }>()
|
||||
|
||||
watchImmediate(availableThemes, () =>
|
||||
console.log('availableThemes', availableThemes),
|
||||
)
|
||||
|
||||
const items = computed<DropdownMenuItem[]>(() =>
|
||||
availableThemes?.value.map((theme) => ({
|
||||
...theme,
|
||||
|
||||
@ -14,12 +14,20 @@ export function useAndroidBackButton() {
|
||||
|
||||
// Track navigation history manually
|
||||
router.afterEach((to, from) => {
|
||||
console.log('[AndroidBack] Navigation:', { to: to.path, from: from.path, stackSize: historyStack.value.length })
|
||||
console.log('[AndroidBack] Navigation:', {
|
||||
to: to.path,
|
||||
from: from.path,
|
||||
stackSize: historyStack.value.length,
|
||||
})
|
||||
|
||||
// If navigating forward (new page)
|
||||
if (from.path && to.path !== from.path && !historyStack.value.includes(to.path)) {
|
||||
if (
|
||||
from.path &&
|
||||
to.path !== from.path &&
|
||||
!historyStack.value.includes(to.path)
|
||||
) {
|
||||
historyStack.value.push(from.path)
|
||||
console.log('[AndroidBack] Added to stack:', from.path, 'Stack:', historyStack.value)
|
||||
//console.log('[AndroidBack] Added to stack:', from.path, 'Stack:', historyStack.value)
|
||||
}
|
||||
})
|
||||
|
||||
@ -31,7 +39,10 @@ export function useAndroidBackButton() {
|
||||
|
||||
// Listen to close requested event (triggered by Android back button)
|
||||
unlisten = await appWindow.onCloseRequested(async (event) => {
|
||||
console.log('[AndroidBack] Back button pressed, stack size:', historyStack.value.length)
|
||||
console.log(
|
||||
'[AndroidBack] Back button pressed, stack size:',
|
||||
historyStack.value.length,
|
||||
)
|
||||
|
||||
// Check if we have history
|
||||
if (historyStack.value.length > 0) {
|
||||
@ -40,7 +51,10 @@ export function useAndroidBackButton() {
|
||||
|
||||
// Remove current page from stack
|
||||
historyStack.value.pop()
|
||||
console.log('[AndroidBack] Going back, new stack size:', historyStack.value.length)
|
||||
console.log(
|
||||
'[AndroidBack] Going back, new stack size:',
|
||||
historyStack.value.length,
|
||||
)
|
||||
|
||||
// Navigate back in router
|
||||
router.back()
|
||||
|
||||
@ -3,7 +3,6 @@ export default defineNuxtRouteMiddleware(async (to) => {
|
||||
|
||||
const toVaultId = getSingleRouteParam(to.params.vaultId)
|
||||
|
||||
console.log('middleware', openVaults.value?.[toVaultId])
|
||||
if (!openVaults.value?.[toVaultId]) {
|
||||
return await navigateTo(useLocalePath()({ name: 'vaultOpen' }))
|
||||
}
|
||||
|
||||
@ -67,7 +67,6 @@ onMounted(async () => {
|
||||
|
||||
const knownDevice = await isKnownDeviceAsync()
|
||||
|
||||
console.log('knownDevice', knownDevice)
|
||||
if (!knownDevice) {
|
||||
console.log('not known device')
|
||||
newDeviceName.value = hostname.value ?? 'unknown'
|
||||
|
||||
@ -37,7 +37,6 @@ export const useWorkspaceStore = defineStore('workspaceStore', () => {
|
||||
.from(haexWorkspaces)
|
||||
.orderBy(asc(haexWorkspaces.position))
|
||||
|
||||
console.log('loadWorkspacesAsync', items)
|
||||
workspaces.value = items
|
||||
|
||||
// Create default workspace if none exist
|
||||
|
||||
@ -53,7 +53,6 @@ export const useUiStore = defineStore('uiStore', () => {
|
||||
const colorMode = useColorMode()
|
||||
|
||||
watchImmediate(currentThemeName, () => {
|
||||
console.log('set colorMode', currentThemeName.value)
|
||||
colorMode.preference = currentThemeName.value
|
||||
})
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ export const useDeviceStore = defineStore('vaultInstanceStore', () => {
|
||||
const readDeviceNameAsync = async (id?: string) => {
|
||||
const { readDeviceNameAsync } = useVaultSettingsStore()
|
||||
const _id = id || deviceId.value
|
||||
console.log('readDeviceNameAsync id', _id)
|
||||
|
||||
if (!_id) return
|
||||
|
||||
deviceName.value = (await readDeviceNameAsync(_id))?.value ?? ''
|
||||
|
||||
@ -177,8 +177,8 @@ const drizzleCallback = (async (
|
||||
})
|
||||
}
|
||||
|
||||
console.log('drizzleCallback', method, sql, params)
|
||||
console.log('drizzleCallback rows', rows, rows.slice(0, 1))
|
||||
/* console.log('drizzleCallback', method, sql, params)
|
||||
console.log('drizzleCallback rows', rows, rows.slice(0, 1)) */
|
||||
|
||||
if (method === 'get') {
|
||||
return rows.length > 0 ? { rows: rows.at(0) } : { rows }
|
||||
|
||||
@ -40,7 +40,6 @@ export const useNotificationStore = defineStore('notificationStore', () => {
|
||||
const readNotificationsAsync = async (filter?: SQLWrapper[]) => {
|
||||
const { currentVault } = storeToRefs(useVaultStore())
|
||||
|
||||
console.log('readNotificationsAsync', filter)
|
||||
if (filter) {
|
||||
return await currentVault.value?.drizzle
|
||||
.select()
|
||||
|
||||
@ -32,7 +32,6 @@ export const useVaultSettingsStore = defineStore('vaultSettingsStore', () => {
|
||||
where: eq(schema.haexSettings.key, VaultSettingsKeyEnum.locale),
|
||||
})
|
||||
|
||||
console.log('found currentLocaleRow', currentLocaleRow)
|
||||
if (currentLocaleRow?.value) {
|
||||
const currentLocale = app.$i18n.availableLocales.find(
|
||||
(locale) => locale === currentLocaleRow.value,
|
||||
@ -129,7 +128,7 @@ export const useVaultSettingsStore = defineStore('vaultSettingsStore', () => {
|
||||
eq(schema.haexSettings.key, id),
|
||||
),
|
||||
})
|
||||
console.log('store: readDeviceNameAsync', deviceName)
|
||||
|
||||
return deviceName?.id ? deviceName : undefined
|
||||
}
|
||||
|
||||
@ -149,7 +148,6 @@ export const useVaultSettingsStore = defineStore('vaultSettingsStore', () => {
|
||||
}
|
||||
|
||||
return currentVault?.drizzle?.insert(schema.haexSettings).values({
|
||||
//id: crypto.randomUUID(),
|
||||
type: VaultSettingsTypeEnum.deviceName,
|
||||
key: deviceId,
|
||||
value: deviceName,
|
||||
|
||||
Reference in New Issue
Block a user