Skip to content

Commit

Permalink
perf: support refresh by shortcut cmd/ctrl+r on non-macOS platform
Browse files Browse the repository at this point in the history
  • Loading branch information
tiny-craft committed Jun 21, 2024
1 parent bdfa31e commit 6843314
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
2 changes: 0 additions & 2 deletions frontend/src/components/content_value/ContentMonitor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { computed, nextTick, onMounted, onUnmounted, reactive, ref } from 'vue'
import { debounce, filter, get, includes, isEmpty, join } from 'lodash'
import { useI18n } from 'vue-i18n'
import { useThemeVars } from 'naive-ui'
import useBrowserStore from 'stores/browser.js'
import Play from '@/components/icons/Play.vue'
import Pause from '@/components/icons/Pause.vue'
import { ExportLog, StartMonitor, StopMonitor } from 'wailsjs/go/services/monitorService.js'
Expand All @@ -17,7 +16,6 @@ import copy from 'copy-text-to-clipboard'
const themeVars = useThemeVars()
const browserStore = useBrowserStore()
const i18n = useI18n()
const props = defineProps({
server: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import useDialogStore from 'stores/dialog.js'
import { useI18n } from 'vue-i18n'
import ContentToolbar from '@/components/content_value/ContentToolbar.vue'
import ContentValueJson from '@/components/content_value/ContentValueJson.vue'
import { isMacOS } from '@/utils/platform.js'
const themeVars = useThemeVars()
const browserStore = useBrowserStore()
Expand Down Expand Up @@ -137,7 +136,7 @@ const onKeyShortcut = (e) => {
onReload()
return
case 'r':
if (e.metaKey && isMacOS()) {
if (e.metaKey) {
onReload()
}
return
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/sidebar/BrowserTree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import RedisTypeTag from '@/components/common/RedisTypeTag.vue'
import usePreferencesStore from 'stores/preferences.js'
import { typesIconStyle } from '@/consts/support_redis_type.js'
import { nativeRedisKey } from '@/utils/key_convert.js'
import { isMacOS } from '@/utils/platform.js'
import copy from 'copy-text-to-clipboard'
const props = defineProps({
Expand Down Expand Up @@ -352,7 +351,7 @@ const onKeyShortcut = (e) => {
handleSelectContextMenu('value_reload')
break
case 'r':
if (e.metaKey && isMacOS()) {
if (e.metaKey) {
handleSelectContextMenu('value_reload')
}
break
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/components/sidebar/Ribbon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import { computed, ref } from 'vue'
import { NIcon, useThemeVars } from 'naive-ui'
import Database from '@/components/icons/Database.vue'
import { useI18n } from 'vue-i18n'
import Server from '@/components/icons/Server.vue'
import IconButton from '@/components/common/IconButton.vue'
import Config from '@/components/icons/Config.vue'
Expand Down Expand Up @@ -39,7 +38,6 @@ const emit = defineEmits(['update:value'])
const iconSize = computed(() => Math.floor(props.width * 0.45))
const browserStore = useBrowserStore()
const i18n = useI18n()
const showWechat = ref(false)
const menuOptions = computed(() => {
return [
Expand Down

0 comments on commit 6843314

Please sign in to comment.