Skip to content

Commit

Permalink
🎨
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkokari-gtyih committed Jul 10, 2024
1 parent b4b09f7 commit afc4f14
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
16 changes: 15 additions & 1 deletion packages/frontend/src/components/MkEmojiPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,20 @@ SPDX-License-Identifier: AGPL-3.0-only

<template>
<div class="omfetrab" :class="['s' + size, 'w' + width, 'h' + height, { asDrawer, asWindow }]" :style="{ maxHeight: maxHeight ? maxHeight + 'px' : undefined }">
<input ref="searchEl" :value="q" class="search" data-prevent-emoji-insert :class="{ filled: q != null && q != '' }" :placeholder="i18n.ts.search" type="search" autocapitalize="off" @input="input()" @paste.stop="paste" @keydown.stop.prevent.enter="onEnter">
<input
ref="searchEl"
:value="q"
class="search"
data-prevent-emoji-insert
:class="{ filled: q != null && q != '' }"
:placeholder="i18n.ts.search"
type="search"
autocapitalize="off"
@input="input()"
@paste.stop="paste"
@keydown.stop.prevent.enter="onEnter"
@keydown.stop.prevent.esc="emit('esc')"
>
<!-- FirefoxのTabフォーカスが想定外の挙動となるためtabindex="-1"を追加 https://github.com/misskey-dev/misskey/issues/10744 -->
<div ref="emojisEl" class="emojis" tabindex="-1">
<section class="result">
Expand Down Expand Up @@ -139,6 +152,7 @@ const props = withDefaults(defineProps<{

const emit = defineEmits<{
(ev: 'chosen', v: string): void;
(ev: 'esc'): void;
}>();

const searchEl = shallowRef<HTMLInputElement>();
Expand Down
2 changes: 2 additions & 0 deletions packages/frontend/src/components/MkEmojiPickerDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:manualShowing="manualShowing"
:src="src"
@click="modal?.close()"
@esc="modal?.close()"
@opening="opening"
@close="emit('close')"
@closed="emit('closed')"
Expand All @@ -28,6 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:asDrawer="type === 'drawer'"
:max-height="maxHeight"
@chosen="chosen"
@esc="modal?.close()"
/>
</MkModal>
</template>
Expand Down
4 changes: 4 additions & 0 deletions packages/frontend/src/components/MkSuperMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ defineProps<{
background: var(--panelHighlight);
}

&:focus-visible {
outline-offset: -2px;
}

&.active {
color: var(--accent);
background: var(--accentedBg);
Expand Down

0 comments on commit afc4f14

Please sign in to comment.