perf: support refresh by shortcut `cmd/ctrl+r` on non-macOS platform
This commit is contained in:
parent
bdfa31e4b6
commit
6843314bad
|
@ -3,7 +3,6 @@ import { computed, nextTick, onMounted, onUnmounted, reactive, ref } from 'vue'
|
||||||
import { debounce, filter, get, includes, isEmpty, join } from 'lodash'
|
import { debounce, filter, get, includes, isEmpty, join } from 'lodash'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { useThemeVars } from 'naive-ui'
|
import { useThemeVars } from 'naive-ui'
|
||||||
import useBrowserStore from 'stores/browser.js'
|
|
||||||
import Play from '@/components/icons/Play.vue'
|
import Play from '@/components/icons/Play.vue'
|
||||||
import Pause from '@/components/icons/Pause.vue'
|
import Pause from '@/components/icons/Pause.vue'
|
||||||
import { ExportLog, StartMonitor, StopMonitor } from 'wailsjs/go/services/monitorService.js'
|
import { ExportLog, StartMonitor, StopMonitor } from 'wailsjs/go/services/monitorService.js'
|
||||||
|
@ -17,7 +16,6 @@ import copy from 'copy-text-to-clipboard'
|
||||||
|
|
||||||
const themeVars = useThemeVars()
|
const themeVars = useThemeVars()
|
||||||
|
|
||||||
const browserStore = useBrowserStore()
|
|
||||||
const i18n = useI18n()
|
const i18n = useI18n()
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
server: {
|
server: {
|
||||||
|
|
|
@ -14,7 +14,6 @@ import useDialogStore from 'stores/dialog.js'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import ContentToolbar from '@/components/content_value/ContentToolbar.vue'
|
import ContentToolbar from '@/components/content_value/ContentToolbar.vue'
|
||||||
import ContentValueJson from '@/components/content_value/ContentValueJson.vue'
|
import ContentValueJson from '@/components/content_value/ContentValueJson.vue'
|
||||||
import { isMacOS } from '@/utils/platform.js'
|
|
||||||
|
|
||||||
const themeVars = useThemeVars()
|
const themeVars = useThemeVars()
|
||||||
const browserStore = useBrowserStore()
|
const browserStore = useBrowserStore()
|
||||||
|
@ -137,7 +136,7 @@ const onKeyShortcut = (e) => {
|
||||||
onReload()
|
onReload()
|
||||||
return
|
return
|
||||||
case 'r':
|
case 'r':
|
||||||
if (e.metaKey && isMacOS()) {
|
if (e.metaKey) {
|
||||||
onReload()
|
onReload()
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|
|
@ -25,7 +25,6 @@ import RedisTypeTag from '@/components/common/RedisTypeTag.vue'
|
||||||
import usePreferencesStore from 'stores/preferences.js'
|
import usePreferencesStore from 'stores/preferences.js'
|
||||||
import { typesIconStyle } from '@/consts/support_redis_type.js'
|
import { typesIconStyle } from '@/consts/support_redis_type.js'
|
||||||
import { nativeRedisKey } from '@/utils/key_convert.js'
|
import { nativeRedisKey } from '@/utils/key_convert.js'
|
||||||
import { isMacOS } from '@/utils/platform.js'
|
|
||||||
import copy from 'copy-text-to-clipboard'
|
import copy from 'copy-text-to-clipboard'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -352,7 +351,7 @@ const onKeyShortcut = (e) => {
|
||||||
handleSelectContextMenu('value_reload')
|
handleSelectContextMenu('value_reload')
|
||||||
break
|
break
|
||||||
case 'r':
|
case 'r':
|
||||||
if (e.metaKey && isMacOS()) {
|
if (e.metaKey) {
|
||||||
handleSelectContextMenu('value_reload')
|
handleSelectContextMenu('value_reload')
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
import { NIcon, useThemeVars } from 'naive-ui'
|
import { NIcon, useThemeVars } from 'naive-ui'
|
||||||
import Database from '@/components/icons/Database.vue'
|
import Database from '@/components/icons/Database.vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
|
||||||
import Server from '@/components/icons/Server.vue'
|
import Server from '@/components/icons/Server.vue'
|
||||||
import IconButton from '@/components/common/IconButton.vue'
|
import IconButton from '@/components/common/IconButton.vue'
|
||||||
import Config from '@/components/icons/Config.vue'
|
import Config from '@/components/icons/Config.vue'
|
||||||
|
@ -39,7 +38,6 @@ const emit = defineEmits(['update:value'])
|
||||||
const iconSize = computed(() => Math.floor(props.width * 0.45))
|
const iconSize = computed(() => Math.floor(props.width * 0.45))
|
||||||
|
|
||||||
const browserStore = useBrowserStore()
|
const browserStore = useBrowserStore()
|
||||||
const i18n = useI18n()
|
|
||||||
const showWechat = ref(false)
|
const showWechat = ref(false)
|
||||||
const menuOptions = computed(() => {
|
const menuOptions = computed(() => {
|
||||||
return [
|
return [
|
||||||
|
|
Loading…
Reference in New Issue