From be45be0be99415a1a78cc50d8481fc1f9b5cbbea Mon Sep 17 00:00:00 2001 From: melt_adzuki Date: Tue, 22 Feb 2022 02:52:13 +0900 Subject: [PATCH] =?UTF-8?q?=E9=A1=94=E6=96=87=E5=AD=97=E9=81=B8=E6=8A=9E?= =?UTF-8?q?=E7=94=BB=E9=9D=A2=E3=82=92=E6=94=B9=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/client/src/components/post-form.vue | 52 ++++++-------------- 1 file changed, 15 insertions(+), 37 deletions(-) diff --git a/packages/client/src/components/post-form.vue b/packages/client/src/components/post-form.vue index dd9cedbf8..575413bf5 100644 --- a/packages/client/src/components/post-form.vue +++ b/packages/client/src/components/post-form.vue @@ -7,7 +7,7 @@ @drop.stop="onDrop" >
- +
{{ maxTextLength - textLength }} @@ -85,6 +85,8 @@ import MkInfo from '@/components/ui/info.vue'; import { i18n } from '@/i18n'; import { instance } from '@/instance'; import { $i, getAccounts, openAccountMenu as openAccountMenu_ } from '@/account'; +import {api} from "@/os"; +import {deckStore} from "@/ui/deck/deck-store"; const modal = inject('modal'); @@ -354,43 +356,19 @@ function chooseFileFrom(ev) { } async function kao() { - const faces = [ - "(=^・・^=)", - "v('ω')v", - "( ᐢ˙꒳​˙ᐢ )", - "(。>﹏<。)", - "(Δ・x・Δ)", - "(´-ω-`)", - "(๑•﹏•)", - "(。ì _ í。)", - "(´×ω×`)", - "(´+ω+`)", - "(。-ω-)zzz", - "(><)", - "(。>ㅿ<。)", - "(´;ω;`)", - "ฅ^•ω•^ฅ", - "⊂(・﹏・⊂)", - "ᕦ(ò_óˇ)ᕤ", - "ᕙ(⇀‸↼‶)ᕗ", - "(・o・;)", - "(。ŏ﹏ŏ)", - "Σ(^._.^=ノ)ノ", - " (๑•̀ - •́)و✧", - "(,,> <,,)♡", - "‪o(>_<)o", - "(っ´・ω・)っ", - "(´。-ω(-ω-。`)ギュ", - ].map(kao => { - return { value: kao, text: kao } + const response = await fetch("https://nullc.at/kaomoji.txt").then(value => value.text()) + + const faces = response.trim().split('\n').map(kao => { + return { + type: 'button' as const, + text: kao, + action() { + text += kao + }, + } }) - const dialog = await os.select({ - title: "ฅ(=✧ω✧=)ฅ", - items: faces, - }) - - text += dialog.result || "" + await os.popupMenu(faces) } function detachFile(id) { @@ -783,7 +761,7 @@ onMounted(() => { margin-left: 0 !important; } } - + > .local-only { margin: 0 0 0 12px; opacity: 0.7;