update
This commit is contained in:
parent
bc3234510c
commit
9a572eb9f5
|
@ -100,6 +100,7 @@ export class FanoutTimelineEndpointService {
|
||||||
|
|
||||||
if (ps.me) {
|
if (ps.me) {
|
||||||
const me = ps.me;
|
const me = ps.me;
|
||||||
|
|
||||||
const [
|
const [
|
||||||
userIdsWhoMeMuting,
|
userIdsWhoMeMuting,
|
||||||
userIdsWhoMeMutingRenotes,
|
userIdsWhoMeMutingRenotes,
|
||||||
|
|
|
@ -9,6 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkSpacer :contentMax="900">
|
<MkSpacer :contentMax="900">
|
||||||
<MkSwitch v-model="select">SelectMode</MkSwitch>
|
<MkSwitch v-model="select">SelectMode</MkSwitch>
|
||||||
<MkButton @click="setCategoryBulk">Set Category</MkButton>
|
<MkButton @click="setCategoryBulk">Set Category</MkButton>
|
||||||
|
<MkButton @click="deletes">Delete</MkButton>
|
||||||
<div class="_gaps">
|
<div class="_gaps">
|
||||||
<div :class="$style.decorations">
|
<div :class="$style.decorations">
|
||||||
<XDecoration
|
<XDecoration
|
||||||
|
@ -49,6 +50,7 @@ function add() {
|
||||||
category: '',
|
category: '',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectItems(decorationId) {
|
function selectItems(decorationId) {
|
||||||
if (selectItemsId.value.includes(decorationId)) {
|
if (selectItemsId.value.includes(decorationId)) {
|
||||||
const index = selectItemsId.value.indexOf(decorationId);
|
const index = selectItemsId.value.indexOf(decorationId);
|
||||||
|
@ -57,6 +59,7 @@ function selectItems(decorationId) {
|
||||||
selectItemsId.value.push(decorationId);
|
selectItemsId.value.push(decorationId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function del(avatarDecoration) {
|
function del(avatarDecoration) {
|
||||||
os.confirm({
|
os.confirm({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
|
@ -123,6 +126,22 @@ async function setCategoryBulk() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function deletes() {
|
||||||
|
const { canceled, result } = await os.inputText({
|
||||||
|
title: 'Category',
|
||||||
|
});
|
||||||
|
if (canceled) return;
|
||||||
|
if (selectItemsId.value.length > 1) {
|
||||||
|
for (let i = 0; i < selectItemsId.value.length; i++) {
|
||||||
|
let decorationId = selectItemsId.value[i];
|
||||||
|
await misskeyApi('admin/avatar-decorations/delete', {
|
||||||
|
id: decorationId,
|
||||||
|
category: result,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const headerActions = computed(() => [{
|
const headerActions = computed(() => [{
|
||||||
asFullButton: true,
|
asFullButton: true,
|
||||||
icon: 'ti ti-plus',
|
icon: 'ti ti-plus',
|
||||||
|
|
Loading…
Reference in New Issue