This commit is contained in:
NoriDev 2023-12-13 13:42:08 +09:00
parent ac8d0f133e
commit 1fce71a7d7
8 changed files with 18 additions and 18 deletions

View file

@ -274,7 +274,7 @@ const maxTextLength = computed((): number => {
const canPost = computed((): boolean => {
return !props.mock && !posting.value && !posted.value &&
(1 <= textLength.value || 1 <= files.value.length || !!poll.value || !!props.renote || !!event) &&
(1 <= textLength.value || 1 <= files.value.length || !!poll.value || !!props.renote || !!event.value) &&
(textLength.value <= maxTextLength.value) &&
(!poll.value || poll.value.choices.length >= 2);
});
@ -425,10 +425,10 @@ function togglePoll() {
}
function toggleEvent() {
if (event) {
event = null;
if (event.value) {
event.value = null;
} else {
event = {
event.value = {
title: '',
start: (new Date()).toString(),
end: null,
@ -1031,7 +1031,7 @@ onMounted(() => {
};
}
if (init.event) {
event = {
event.value = {
title: init.event.title,
start: init.event.start,
end: init.event.end,

View file

@ -92,7 +92,7 @@ const prepend = note => {
const prependFilterdMedia = note => {
if (note.files !== null && note.files.length > 0) {
tlComponent.pagingComponent?.prepend(note);
tlComponent.value.pagingComponent?.prepend(note);
}
emit('note');

View file

@ -108,8 +108,8 @@ const search = () => {
};
const searchLocal = () => {
if (username === '') {
users = [];
if (username.value === '') {
users.value = [];
return;
}
os.api('users/search', {
@ -118,7 +118,7 @@ const searchLocal = () => {
limit: 10,
detail: false,
}).then(_users => {
users = _users;
users.value = _users;
});
};

View file

@ -175,7 +175,7 @@ function deleteResolver(id: string): void {
os.apiWithDialog('admin/abuse-report-resolver/delete', {
resolverId: id,
}).then(() => {
resolverPagingComponent?.value.reload();
resolverPagingComponent.value.reload();
});
}
@ -188,8 +188,8 @@ function create(): void {
expiresAt: newResolver.value.expiresAt,
forward: newResolver.value.forward,
}).then(() => {
folderComponent?.value.toggle();
resolverPagingComponent?.value.reload();
folderComponent.value.toggle();
resolverPagingComponent.value.reload();
newResolver.value.name = '';
newResolver.value.targetUserPattern = '';
newResolver.value.reporterPattern = '';

View file

@ -49,7 +49,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
import {computed} from 'vue';
import { computed } from 'vue';
import * as mfm from 'cherrypick-mfm-js';
import * as Misskey from 'cherrypick-js';
import * as os from '@/os.js';

View file

@ -259,7 +259,7 @@ provideMetadataReceiver((info) => {
childInfo.value = null;
} else {
childInfo.value = info;
INFO.value.needWideArea = info.value?.needWideArea ?? undefined;
INFO.value.needWideArea = info.value.needWideArea ?? undefined;
}
});

View file

@ -153,9 +153,9 @@ function save() {
volume: volume.value,
});
saved = true;
saved.value = true;
window.setTimeout(() => {
saved = false;
saved.value = false;
}, 500);
// os.success();

View file

@ -52,12 +52,12 @@ function showMenu(ev: MouseEvent) {
}, {
text: i18n.ts.following,
action: () => {
chartSrc = 'per-user-following';
chartSrc.value = 'per-user-following';
},
}, {
text: i18n.ts.followers,
action: () => {
chartSrc = 'per-user-followers';
chartSrc.value = 'per-user-followers';
},
}], ev.currentTarget ?? ev.target);
}