File tree 4 files changed +31
-8
lines changed
packages/frontend/src/components
4 files changed +31
-8
lines changed Original file line number Diff line number Diff line change @@ -4916,6 +4916,14 @@ export interface Locale extends ILocale {
4916
4916
* QRコード
4917
4917
*/
4918
4918
"qrcode" : string ;
4919
+ /**
4920
+ * このQRコードをスキャンすると、新規登録時の招待コードが自動で入力されます。
4921
+ */
4922
+ "qrcodeToInvite" : string ;
4923
+ /**
4924
+ * 指定された絵文字は既に存在します。
4925
+ */
4926
+ "emojiAlreadyExists" : string ;
4919
4927
"_bubbleGame" : {
4920
4928
/**
4921
4929
* 遊び方
Original file line number Diff line number Diff line change @@ -1225,6 +1225,8 @@ loading: "読み込み中"
1225
1225
surrender : " やめる"
1226
1226
gameRetry : " リトライ"
1227
1227
qrcode : " QRコード"
1228
+ qrcodeToInvite : " このQRコードをスキャンすると、新規登録時の招待コードが自動で入力されます。"
1229
+ emojiAlreadyExists : " 指定された絵文字は既に存在します。"
1228
1230
1229
1231
_bubbleGame :
1230
1232
howToPlay : " 遊び方"
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ SPDX-License-Identifier: AGPL-3.0-only
55
55
<MkButton v-if="!invite.used || moderator" danger rounded @click="deleteCode()"><i class="ti ti-trash"></i> {{ i18n.ts.delete }}</MkButton>
56
56
</div>
57
57
<div v-if="!invite.used && !isExpired">
58
- <div :class="$style.label">{{ i18n.ts.qrcode }}</div>
58
+ <div :class="$style.label">{{ i18n.ts.qrcode }} - {{ i18n.ts.qrcodeToInvite }} </div>
59
59
<vue-qrcode :value="inviteUrl" :options="option" tag="img"></vue-qrcode>
60
60
</div>
61
61
</div>
Original file line number Diff line number Diff line change @@ -87,14 +87,17 @@ const importEmoji = async (emojiName) => {
87
87
query: emojiName,
88
88
host: props.host,
89
89
})).find((_emoji) => _emoji.name === emojiName);
90
- await os.apiWithDialog('admin/emoji/copy', {
91
- emojiId: emoji.id,
90
+ if (emoji) {
91
+ await os.apiWithDialog('admin/emoji/copy', {
92
+ emojiId: emoji.id,
93
+ });
94
+ }
95
+ } else {
96
+ os.alert({
97
+ title: i18n.ts.error,
98
+ text: i18n.ts.emojiAlreadyExists,
92
99
});
93
100
}
94
-
95
- // リアクション
96
- react(`:${emojiName}:`);
97
- sound.playMisskeySfx('reaction');
98
101
};
99
102
100
103
function onClick(ev: MouseEvent) {
@@ -111,10 +114,20 @@ function onClick(ev: MouseEvent) {
111
114
os.success();
112
115
},
113
116
}, ...(props.menuImport && react ? [{
117
+ text: i18n.ts.import,
118
+ icon: 'ti ti-download',
119
+ action: () => {
120
+ importEmoji(props.name);
121
+ },
122
+ }, {
114
123
text: i18n.ts.doReaction,
115
124
icon: 'ti ti-plus',
116
125
action: () => {
117
- importEmoji(props.name);
126
+ importEmoji(props.name).then(() => {
127
+ // リアクション
128
+ react(`:${props.name}:`);
129
+ sound.playMisskeySfx('reaction');
130
+ });
118
131
},
119
132
}] : []),
120
133
], ev.currentTarget ?? ev.target);
You can’t perform that action at this time.
0 commit comments