Polish CSS for mobile editor. Add user logout from admin panel.

This commit is contained in:
2024-12-03 14:22:02 +01:00
parent ecdfa947ac
commit 51a5d501be
12 changed files with 238 additions and 161 deletions

View File

@@ -7,6 +7,7 @@ export interface ShortcutConfig {
handler: Function
usingInput?: string | boolean
whenever?: WatchSource<boolean>[]
prevent?: boolean
}
export interface ShortcutsConfig {
@@ -29,6 +30,7 @@ interface Shortcut {
altKey: boolean
// code?: string
// keyCode?: number
prevent?: boolean
}
const chainedShortcutRegex = /^[^-]+.*-.*[^-]+$/
@@ -61,7 +63,8 @@ export const useShortcuts = (config: ShortcutsConfig, options: ShortcutsOptions
if (shortcut.key !== chainedKey) { continue }
if (shortcut.condition.value) {
e.preventDefault()
e.stopPropagation
shortcut.prevent && e.preventDefault()
shortcut.handler()
}
clearChainedInput()
@@ -139,7 +142,7 @@ export const useShortcuts = (config: ShortcutsConfig, options: ShortcutsOptions
if (typeof shortcutConfig === 'function') {
shortcut.handler = shortcutConfig
} else if (typeof shortcutConfig === 'object') {
shortcut = { ...shortcut, handler: shortcutConfig.handler }
shortcut = { ...shortcut, handler: shortcutConfig.handler, prevent: shortcutConfig.prevent }
}
if (!shortcut.handler) {