refs #3573 Temporary disable reload shortcut key

This commit is contained in:
AkiraFukushima 2022-09-04 22:48:47 +09:00
parent 1bcd1fd07d
commit 0a617a2e3e
No known key found for this signature in database
GPG Key ID: B6E51BAC4DE1A957
11 changed files with 29 additions and 21 deletions

View File

@ -14,7 +14,8 @@ import {
Notification,
NotificationConstructorOptions,
nativeTheme,
IpcMainInvokeEvent
IpcMainInvokeEvent,
globalShortcut
} from 'electron'
import Datastore from 'nedb'
import { isEmpty } from 'lodash'
@ -451,6 +452,13 @@ app.on('activate', () => {
}
})
app.on('browser-window-focus', () => {
// Disable reload
globalShortcut.register('CommandOrControl+R', () => {
console.log('CommandOrControl+R is pressed: Shortcut Disabled')
})
})
const auth = new Authentication(accountRepo)
type AuthRequest = {

View File

@ -53,7 +53,7 @@ export default defineComponent({
const focusedId = ref<string | null>(null)
const heading = ref<boolean>(true)
const scroller = ref<any>()
const { j, k, r } = useMagicKeys()
const { j, k, Ctrl_r } = useMagicKeys()
const bookmarks = computed(() => store.state.TimelineSpace.Contents.Bookmarks.bookmarks)
const lazyLoading = computed(() => store.state.TimelineSpace.Contents.Bookmarks.lazyLoading)
@ -97,7 +97,7 @@ export default defineComponent({
whenever(and(k, shortcutEnabled), () => {
focusPrev()
})
whenever(and(r, shortcutEnabled), () => {
whenever(and(Ctrl_r, shortcutEnabled), () => {
reload()
})

View File

@ -55,7 +55,7 @@ export default defineComponent({
const route = useRoute()
const i18n = useI18next()
const { reloadable } = useReloadable(store, route, i18n)
const { j, k, r } = useMagicKeys()
const { j, k, Ctrl_r } = useMagicKeys()
const focusedId = ref<string | null>(null)
const scrollPosition = ref<ScrollPosition | null>(null)
@ -143,7 +143,7 @@ export default defineComponent({
whenever(and(k, shortcutEnabled), () => {
focusPrev()
})
whenever(and(r, shortcutEnabled), () => {
whenever(and(Ctrl_r, shortcutEnabled), () => {
reload()
})

View File

@ -51,7 +51,7 @@ export default defineComponent({
const heading = ref<boolean>(false)
const focusedId = ref<string | null>(null)
const scroller = ref<any>()
const { j, k, r } = useMagicKeys()
const { j, k, Ctrl_r } = useMagicKeys()
const openSideBar = computed(() => store.state.TimelineSpace.Contents.SideBar.openSideBar)
const startReload = computed(() => store.state.TimelineSpace.HeaderMenu.reload)
@ -105,7 +105,7 @@ export default defineComponent({
whenever(and(k, shortcutEnabled), () => {
focusPrev()
})
whenever(and(r, shortcutEnabled), () => {
whenever(and(Ctrl_r, shortcutEnabled), () => {
reload()
})

View File

@ -55,7 +55,7 @@ export default defineComponent({
const route = useRoute()
const i18n = useI18next()
const { reloadable } = useReloadable(store, route, i18n)
const { j, k, r } = useMagicKeys()
const { j, k, Ctrl_r } = useMagicKeys()
const { tag } = toRefs(props)
const focusedId = ref<string | null>(null)
@ -134,7 +134,7 @@ export default defineComponent({
whenever(and(k, shortcutEnabled), () => {
focusPrev()
})
whenever(and(r, shortcutEnabled), () => {
whenever(and(Ctrl_r, shortcutEnabled), () => {
reload()
})

View File

@ -63,7 +63,7 @@ export default defineComponent({
const route = useRoute()
const i18n = useI18next()
const { reloadable } = useReloadable(store, route, i18n)
const { j, k, r } = useMagicKeys()
const { j, k, Ctrl_r } = useMagicKeys()
const focusedId = ref<string | null>(null)
const scrollPosition = ref<ScrollPosition | null>(null)
@ -175,7 +175,7 @@ export default defineComponent({
whenever(and(k, shortcutEnabled), () => {
focusPrev()
})
whenever(and(r, shortcutEnabled), () => {
whenever(and(Ctrl_r, shortcutEnabled), () => {
reload()
})

View File

@ -51,7 +51,7 @@ export default defineComponent({
const space = 'TimelineSpace/Contents/Lists/Show'
const store = useStore()
const i18n = useI18next()
const { j, k, r } = useMagicKeys()
const { j, k, Ctrl_r } = useMagicKeys()
const { list_id } = toRefs(props)
const focusedId = ref<string | null>(null)
@ -129,7 +129,7 @@ export default defineComponent({
whenever(and(k, shortcutEnabled), () => {
focusPrev()
})
whenever(and(r, shortcutEnabled), () => {
whenever(and(Ctrl_r, shortcutEnabled), () => {
reload()
})

View File

@ -55,7 +55,7 @@ export default defineComponent({
const route = useRoute()
const i18n = useI18next()
const { reloadable } = useReloadable(store, route, i18n)
const { j, k, r } = useMagicKeys()
const { j, k, Ctrl_r } = useMagicKeys()
const focusedId = ref<string | null>(null)
const scrollPosition = ref<ScrollPosition | null>(null)
@ -154,7 +154,7 @@ export default defineComponent({
whenever(and(k, shortcutEnabled), () => {
focusPrev()
})
whenever(and(r, shortcutEnabled), () => {
whenever(and(Ctrl_r, shortcutEnabled), () => {
reload()
})

View File

@ -62,7 +62,7 @@ export default defineComponent({
const route = useRoute()
const i18n = useI18next()
const { reloadable } = useReloadable(store, route, i18n)
const { j, k, r } = useMagicKeys()
const { j, k, Ctrl_r } = useMagicKeys()
const focusedId = ref<string | null>(null)
const scrollPosition = ref<ScrollPosition | null>(null)
@ -156,7 +156,7 @@ export default defineComponent({
whenever(and(k, shortcutEnabled), () => {
focusPrev()
})
whenever(and(r, shortcutEnabled), () => {
whenever(and(Ctrl_r, shortcutEnabled), () => {
reload()
})

View File

@ -61,7 +61,7 @@ export default defineComponent({
const route = useRoute()
const i18n = useI18next()
const { reloadable } = useReloadable(store, route, i18n)
const { j, k, r } = useMagicKeys()
const { j, k, Ctrl_r } = useMagicKeys()
const focusedId = ref<string | null>(null)
const scrollPosition = ref<ScrollPosition | null>(null)
@ -161,7 +161,7 @@ export default defineComponent({
whenever(and(k, shortcutEnabled), () => {
focusPrev()
})
whenever(and(r, shortcutEnabled), () => {
whenever(and(Ctrl_r, shortcutEnabled), () => {
reload()
})

View File

@ -55,7 +55,7 @@ export default defineComponent({
const route = useRoute()
const i18n = useI18next()
const { reloadable } = useReloadable(store, route, i18n)
const { j, k, r } = useMagicKeys()
const { j, k, Ctrl_r } = useMagicKeys()
const focusedId = ref<string | null>(null)
const scrollPosition = ref<ScrollPosition | null>(null)
@ -155,7 +155,7 @@ export default defineComponent({
whenever(and(k, shortcutEnabled), () => {
focusPrev()
})
whenever(and(r, shortcutEnabled), () => {
whenever(and(Ctrl_r, shortcutEnabled), () => {
reload()
})