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