Skip to content

Commit

Permalink
feat: enable self made
Browse files Browse the repository at this point in the history
  • Loading branch information
slofp committed Sep 8, 2024
1 parent a01ec44 commit 9579d5a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5270,6 +5270,11 @@ export interface Locale extends ILocale {
* これ以上このクリップにノートを追加できません。
*/
"clipNoteLimitExceeded": string;
/**
* ライセンスのない絵文字には自動的に名前が挿入されます。
* 場合によってライセンス不明確となる場合がありますがよろしいですか?
*/
"noneLicenseBulk": string;
"_delivery": {
/**
* 配信状態
Expand Down
1 change: 1 addition & 0 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,7 @@ pleaseEnterTheLicenseNonSelf: "使用許諾を入力してください"
checkLicenseNonSelf: "使用許諾と根拠: {license}\n あなたが追加しようとしている画像を絵文字として登録する権利を有していますか?"
nonLicenseCannotAddNonSelf: "使用許諾と根拠のない絵文字は登録することができません。\n絵文字ガイドラインをご確認ください。"
clipNoteLimitExceeded: "これ以上このクリップにノートを追加できません。"
noneLicenseBulk: "ライセンスのない絵文字には自動的に名前が挿入されます。\n場合によってライセンス不明確となる場合がありますがよろしいですか?"

_delivery:
status: "配信状態"
Expand Down
15 changes: 15 additions & 0 deletions packages/frontend/src/pages/custom-emojis-manager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkButton inline @click="addTagBulk">Add tag</MkButton>
<MkButton inline @click="removeTagBulk">Remove tag</MkButton>
<MkButton inline @click="setLicenseBulk">Set License</MkButton>
<MkButton inline @click="setSelfmadeBulk">Enable Self made</MkButton>
<MkButton inline danger @click="delBulk">Delete</MkButton>
</div>
<MkPagination ref="emojisPaginationComponent" :pagination="pagination" :displayLimit="100">
Expand Down Expand Up @@ -241,6 +242,20 @@ const setLicenseBulk = async () => {
emojisPaginationComponent.value.reload();
};

const setSelfmadeBulk = async () => {
const { canceled } = await os.confirm({
type: 'warning',
text: i18n.ts.noneLicenseBulk,
okText: i18n.ts.yes,
cancelText: i18n.ts.no,
});
if (canceled) return;
await os.apiWithDialog('admin/emoji/enable-selfmade-bulk', {
ids: selectedEmojis.value,
});
emojisPaginationComponent.value.reload();
};

const addTagBulk = async () => {
const { canceled, result } = await os.inputText({
title: 'Tag',
Expand Down

0 comments on commit 9579d5a

Please sign in to comment.