絵文字申請
This commit is contained in:
parent
ad27562269
commit
f9efc37eb1
6 changed files with 37 additions and 58 deletions
|
|
@ -10,21 +10,21 @@
|
|||
<div class="imgDark"><img :src="emoji.url" :alt="emoji.name"/></div>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="name _monospace">{{ i18n.ts.name }}: {{ emoji.name }}</div>
|
||||
<div class="name">{{ i18n.ts.name }}: {{ emoji.name }}</div>
|
||||
<div class="category">{{ i18n.ts.category }}:{{ emoji.category }}</div>
|
||||
<div class="aliases">{{ i18n.ts.tags }}:{{ emoji.aliases.join(' ') }}</div>
|
||||
<div class="license">{{ i18n.ts.license }}:{{ emoji.license }}</div>
|
||||
</div>
|
||||
<div class="edit-button">
|
||||
<button class="edit _button" @click="editDraft(emoji)">
|
||||
<MkButton primary class="edit" @click="editDraft(emoji)">
|
||||
{{ i18n.ts.edit }}
|
||||
</button>
|
||||
<button class="draft _button" @click="undrafted(emoji)">
|
||||
</MkButton>
|
||||
<MkButton class="draft" @click="undrafted(emoji)">
|
||||
{{ i18n.ts.undrafted }}
|
||||
</button>
|
||||
<button class="delete _button" @click="deleteDraft(emoji)">
|
||||
</MkButton>
|
||||
<MkButton danger class="delete" @click="deleteDraft(emoji)">
|
||||
{{ i18n.ts.delete }}
|
||||
</button>
|
||||
</MkButton>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -38,6 +38,7 @@ import { computed, defineAsyncComponent, ref, shallowRef } from 'vue';
|
|||
import MkPagination from '@/components/MkPagination.vue';
|
||||
import * as os from '@/os';
|
||||
import { i18n } from '@/i18n';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
|
||||
const emojisDraftPaginationComponent = shallowRef<InstanceType<typeof MkPagination>>();
|
||||
|
||||
|
|
@ -87,7 +88,7 @@ async function undrafted(emoji) {
|
|||
license: emoji.license,
|
||||
draft: false,
|
||||
isSensitive: emoji.isSensitive,
|
||||
localOnly: emoji.localOnly,
|
||||
localOnly: emoji.localOnly,
|
||||
roleIdsThatCanBeUsedThisEmojiAsReaction: emoji.roleIdsThatCanBeUsedThisEmojiAsReaction,
|
||||
});
|
||||
|
||||
|
|
@ -118,14 +119,10 @@ async function deleteDraft(emoji) {
|
|||
|
||||
.ldhfsamy {
|
||||
> .emoji {
|
||||
display: grid;
|
||||
grid-template-rows: 40px 1fr;
|
||||
grid-template-columns: 1fr 150px;
|
||||
align-items: center;
|
||||
padding: 11px;
|
||||
text-align: left;
|
||||
border: solid 1px var(--panel);
|
||||
width: 100%;
|
||||
margin: 10px;
|
||||
|
||||
> .img {
|
||||
|
|
@ -140,9 +137,9 @@ async function deleteDraft(emoji) {
|
|||
display: grid;
|
||||
grid-column: 1;
|
||||
background-color: #fff;
|
||||
|
||||
margin-bottom: 12px;
|
||||
> img {
|
||||
max-height: 30px;
|
||||
max-height: 64px;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
|
@ -151,9 +148,9 @@ async function deleteDraft(emoji) {
|
|||
display: grid;
|
||||
grid-column: 2;
|
||||
background-color: #000;
|
||||
|
||||
margin-bottom: 12px;
|
||||
> img {
|
||||
max-height: 30px;
|
||||
max-height: 64px;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
|
@ -191,37 +188,25 @@ async function deleteDraft(emoji) {
|
|||
|
||||
> .edit-button {
|
||||
display: grid;
|
||||
grid-row: 2;
|
||||
grid-template-rows: 30px 30px 30px;
|
||||
grid-template-rows: 42px;
|
||||
margin-top: 6px;
|
||||
|
||||
> .edit {
|
||||
grid-row: 1;
|
||||
background-color: var(--buttonBg);
|
||||
margin: 2px;
|
||||
|
||||
&:hover {
|
||||
color: var(--accent);
|
||||
}
|
||||
width: 100%;
|
||||
margin: 6px 0;
|
||||
}
|
||||
|
||||
> .draft {
|
||||
grid-row: 2;
|
||||
background-color: var(--buttonBg);
|
||||
margin: 2px;
|
||||
|
||||
&:hover {
|
||||
color: var(--accent);
|
||||
}
|
||||
width: 100%;
|
||||
margin: 6px 0;
|
||||
}
|
||||
|
||||
> .delete {
|
||||
background-color: var(--buttonBg);
|
||||
grid-row: 3;
|
||||
margin: 2px;
|
||||
|
||||
&:hover {
|
||||
color: var(--accent);
|
||||
}
|
||||
width: 100%;
|
||||
margin: 6px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkModalWindow
|
||||
ref="dialog"
|
||||
:width="400"
|
||||
:with-ok-button="true"
|
||||
:with-ok-button="false "
|
||||
@close="dialog.close()"
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
|
|
@ -51,7 +51,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<template #label>{{ i18n.ts.rolesThatCanBeUsedThisEmojiAsReaction }}</template>
|
||||
<template #suffix>{{ rolesThatCanBeUsedThisEmojiAsReaction.length === 0 ? i18n.ts.all : rolesThatCanBeUsedThisEmojiAsReaction.length }}</template>
|
||||
|
||||
<div class="_gaps">
|
||||
<div class="_gaps" v-if="!isRequest">
|
||||
<MkButton rounded @click="addRole"><i class="ti ti-plus"></i> {{ i18n.ts.add }}</MkButton>
|
||||
|
||||
<div v-for="role in rolesThatCanBeUsedThisEmojiAsReaction" :key="role.id" :class="$style.roleItem">
|
||||
|
|
@ -69,7 +69,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkSwitch v-if="!isRequest" v-model="draft" :disabled="isRequest">
|
||||
{{ i18n.ts.draft }}
|
||||
</MkSwitch>
|
||||
<MkButton v-if="emoji" danger @click="del()"><i class="ti ti-trash"></i> {{ i18n.ts.delete }}</MkButton>
|
||||
</div>
|
||||
</MkSpacer>
|
||||
<div :class="$style.footer">
|
||||
|
|
@ -227,7 +226,7 @@ async function done() {
|
|||
if (file) {
|
||||
params.fileId = file.id;
|
||||
}
|
||||
|
||||
console.log(props.emoji)
|
||||
if (props.emoji) {
|
||||
await os.apiWithDialog('admin/emoji/update', {
|
||||
id: props.emoji.id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue