chore: Refactor shortcuts modal to use modal component (#6151)
* chore: Refactor SHortcuts modal to use modal component * Typography changes
This commit is contained in:
committed by
GitHub
parent
4fba9ef1fb
commit
9f842bcd59
@@ -1,12 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<transition name="slide-up">
|
<woot-modal :show="show" size="medium" :on-close="() => $emit('close')">
|
||||||
<div class="modal-mask">
|
<div class="column content-box">
|
||||||
<div v-on-clickaway="() => $emit('clickaway')" class="modal-container">
|
<woot-modal-header
|
||||||
<div class="header-wrap">
|
:header-title="$t('SIDEBAR_ITEMS.KEYBOARD_SHORTCUTS')"
|
||||||
<div class="title-shortcut-key__wrap">
|
/>
|
||||||
<h2 class="page-title">
|
<div class="shortcut__wrap margin-top-3">
|
||||||
{{ $t('SIDEBAR_ITEMS.KEYBOARD_SHORTCUTS') }}
|
<div class="title-key__wrap">
|
||||||
</h2>
|
<h5 class="text-block-title">
|
||||||
|
{{ $t('KEYBOARD_SHORTCUTS.TOGGLE_MODAL') }}
|
||||||
|
</h5>
|
||||||
<div class="shortcut-key__wrap">
|
<div class="shortcut-key__wrap">
|
||||||
<p class="shortcut-key">
|
<p class="shortcut-key">
|
||||||
{{ $t('KEYBOARD_SHORTCUTS.KEYS.WINDOWS_KEY_AND_COMMAND_KEY') }}
|
{{ $t('KEYBOARD_SHORTCUTS.KEYS.WINDOWS_KEY_AND_COMMAND_KEY') }}
|
||||||
@@ -16,16 +18,13 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="cursor-pointer" @click="$emit('close')">
|
|
||||||
<fluent-icon icon="dismiss" />
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="shortcut__wrap">
|
<div class="shortcut__wrap">
|
||||||
<div class="title-key__wrap">
|
<div class="title-key__wrap">
|
||||||
<span class="sub-block-title">
|
<h5 class="text-block-title">
|
||||||
{{ $t('KEYBOARD_SHORTCUTS.TITLE.OPEN_CONVERSATION') }}
|
{{ $t('KEYBOARD_SHORTCUTS.TITLE.OPEN_CONVERSATION') }}
|
||||||
</span>
|
</h5>
|
||||||
<div class="shortcut-key__wrap">
|
<div class="shortcut-key__wrap">
|
||||||
<div class="open-conversation__key">
|
<div class="open-conversation__key">
|
||||||
<span class="shortcut-key">
|
<span class="shortcut-key">
|
||||||
@@ -34,7 +33,7 @@
|
|||||||
<span class="shortcut-key">
|
<span class="shortcut-key">
|
||||||
J
|
J
|
||||||
</span>
|
</span>
|
||||||
<span class="forward-slash sub-block-title">
|
<span class="forward-slash text-block-title">
|
||||||
{{ $t('KEYBOARD_SHORTCUTS.KEYS.FORWARD_SLASH_KEY') }}
|
{{ $t('KEYBOARD_SHORTCUTS.KEYS.FORWARD_SLASH_KEY') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -48,9 +47,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="title-key__wrap">
|
<div class="title-key__wrap">
|
||||||
<span class="sub-block-title">
|
<h5 class="text-block-title">
|
||||||
{{ $t('KEYBOARD_SHORTCUTS.TITLE.RESOLVE_AND_NEXT') }}
|
{{ $t('KEYBOARD_SHORTCUTS.TITLE.RESOLVE_AND_NEXT') }}
|
||||||
</span>
|
</h5>
|
||||||
<div class="shortcut-key__wrap">
|
<div class="shortcut-key__wrap">
|
||||||
<span class="shortcut-key">
|
<span class="shortcut-key">
|
||||||
{{ $t('KEYBOARD_SHORTCUTS.KEYS.WINDOWS_KEY_AND_COMMAND_KEY') }}
|
{{ $t('KEYBOARD_SHORTCUTS.KEYS.WINDOWS_KEY_AND_COMMAND_KEY') }}
|
||||||
@@ -68,9 +67,9 @@
|
|||||||
:key="shortcutKey.id"
|
:key="shortcutKey.id"
|
||||||
class="title-key__wrap"
|
class="title-key__wrap"
|
||||||
>
|
>
|
||||||
<span class="sub-block-title">
|
<h5 class="text-block-title">
|
||||||
{{ title(shortcutKey) }}
|
{{ title(shortcutKey) }}
|
||||||
</span>
|
</h5>
|
||||||
<div class="shortcut-key__wrap">
|
<div class="shortcut-key__wrap">
|
||||||
<span class="shortcut-key">
|
<span class="shortcut-key">
|
||||||
{{ shortcutKey.firstkey }}
|
{{ shortcutKey.firstkey }}
|
||||||
@@ -82,8 +81,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</woot-modal>
|
||||||
</transition>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -92,6 +90,12 @@ import { SHORTCUT_KEYS } from './constants';
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [clickaway],
|
mixins: [clickaway],
|
||||||
|
props: {
|
||||||
|
show: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
shortcutKeys: SHORTCUT_KEYS,
|
shortcutKeys: SHORTCUT_KEYS,
|
||||||
@@ -106,19 +110,6 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.modal-container {
|
|
||||||
padding: var(--space-medium) var(--space-large) var(--space-large)
|
|
||||||
var(--space-large);
|
|
||||||
width: fit-content;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-wrap {
|
|
||||||
align-items: flex-start;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-bottom: var(--space-slab);
|
|
||||||
}
|
|
||||||
|
|
||||||
.title-shortcut-key__wrap {
|
.title-shortcut-key__wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
@@ -140,6 +131,7 @@ export default {
|
|||||||
grid-template-columns: repeat(2, 0.5fr);
|
grid-template-columns: repeat(2, 0.5fr);
|
||||||
gap: var(--space-smaller) var(--space-large);
|
gap: var(--space-smaller) var(--space-large);
|
||||||
margin-top: var(--space-small);
|
margin-top: var(--space-small);
|
||||||
|
padding: 0 var(--space-large) var(--space-large);
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-key__wrap {
|
.title-key__wrap {
|
||||||
@@ -149,11 +141,6 @@ export default {
|
|||||||
min-width: 40rem;
|
min-width: 40rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sub-block-title {
|
|
||||||
font-size: var(--font-size-small);
|
|
||||||
font-weight: var(--font-weight-medium);
|
|
||||||
}
|
|
||||||
|
|
||||||
.forward-slash {
|
.forward-slash {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -278,6 +278,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"KEYBOARD_SHORTCUTS": {
|
"KEYBOARD_SHORTCUTS": {
|
||||||
|
"TOGGLE_MODAL": "View all shortcuts",
|
||||||
"TITLE": {
|
"TITLE": {
|
||||||
"OPEN_CONVERSATION": "Open conversation",
|
"OPEN_CONVERSATION": "Open conversation",
|
||||||
"RESOLVE_AND_NEXT": "Resolve and move to next",
|
"RESOLVE_AND_NEXT": "Resolve and move to next",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
@close-account-create-modal="closeCreateAccountModal"
|
@close-account-create-modal="closeCreateAccountModal"
|
||||||
/>
|
/>
|
||||||
<woot-key-shortcut-modal
|
<woot-key-shortcut-modal
|
||||||
v-if="showShortcutModal"
|
:show.sync="showShortcutModal"
|
||||||
@close="closeKeyShortcutModal"
|
@close="closeKeyShortcutModal"
|
||||||
@clickaway="closeKeyShortcutModal"
|
@clickaway="closeKeyShortcutModal"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user