fix some lints automatically

This commit is contained in:
Johann150 2022-08-10 22:42:30 +02:00
parent e82d12f44b
commit 609fb91ca1
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1
186 changed files with 878 additions and 833 deletions

View file

@ -51,7 +51,7 @@ function send() {
}).then(res => {
os.alert({
type: 'success',
text: i18n.ts.abuseReported
text: i18n.ts.abuseReported,
});
uiWindow.value?.close();
emit('closed');

View file

@ -63,7 +63,7 @@ let forward = $ref(props.report.forwarded);
function resolve() {
os.apiWithDialog('admin/resolve-abuse-user-report', {
forward: forward,
forward,
reportId: props.report.id,
}).then(() => {
emit('resolved', props.report.id);

View file

@ -1,11 +1,12 @@
<template>
<svg class="mbcofsoe" viewBox="0 0 10 10" preserveAspectRatio="none">
<circle v-for="(angle, i) in graduations"
:key="i"
:cx="5 + (Math.sin(angle) * (5 - graduationsPadding))"
:cy="5 - (Math.cos(angle) * (5 - graduationsPadding))"
:r="i % 5 == 0 ? 0.125 : 0.05"
:fill="i % 5 == 0 ? majorGraduationColor : minorGraduationColor"
<circle
v-for="(angle, i) in graduations"
:key="i"
:cx="5 + (Math.sin(angle) * (5 - graduationsPadding))"
:cy="5 - (Math.cos(angle) * (5 - graduationsPadding))"
:r="i % 5 == 0 ? 0.125 : 0.05"
:fill="i % 5 == 0 ? majorGraduationColor : minorGraduationColor"
/>
<line

View file

@ -86,7 +86,7 @@ for (const x of customEmojis) {
name: x.name,
emoji: `:${x.name}:`,
url: x.url,
isCustomEmoji: true
isCustomEmoji: true,
});
if (x.aliases) {
@ -96,7 +96,7 @@ for (const x of customEmojis) {
aliasOf: x.name,
emoji: `:${x.name}:`,
url: x.url,
isCustomEmoji: true
isCustomEmoji: true,
});
}
}
@ -193,7 +193,7 @@ function exec() {
os.api('users/search-by-username-and-host', {
username: props.q,
limit: 10,
detail: false
detail: false,
}).then(searchedUsers => {
users.value = searchedUsers as any[];
fetching.value = false;
@ -215,7 +215,7 @@ function exec() {
} else {
os.api('hashtags/search', {
query: props.q,
limit: 30
limit: 30,
}).then(searchedHashtags => {
hashtags.value = searchedHashtags as any[];
fetching.value = false;

View file

@ -18,7 +18,7 @@ const users = ref([]);
onMounted(async () => {
users.value = await os.api('users/show', {
userIds: props.userIds
userIds: props.userIds,
});
});
</script>

View file

@ -82,7 +82,7 @@ function requestRender() {
captcha.value.render(captchaEl.value, {
sitekey: props.sitekey,
theme: defaultStore.state.darkMode ? 'dark' : 'light',
callback: callback,
callback,
'expired-callback': callback,
'error-callback': callback,
});

View file

@ -1,5 +1,6 @@
<template>
<button class="hdcaacmi _button"
<button
class="hdcaacmi _button"
:class="{ wait, active: isFollowing, full }"
:disabled="wait"
@click="onClick"
@ -39,12 +40,12 @@ async function onClick() {
try {
if (isFollowing.value) {
await os.api('channels/unfollow', {
channelId: props.channel.id
channelId: props.channel.id,
});
isFollowing.value = false;
} else {
await os.api('channels/follow', {
channelId: props.channel.id
channelId: props.channel.id,
});
isFollowing.value = true;
}

View file

@ -25,7 +25,7 @@ const label = computed(() => {
return concat([
props.note.text ? [i18n.t('_cw.chars', { count: length(props.note.text) })] : [],
props.note.files && props.note.files.length !== 0 ? [i18n.t('_cw.files', { count: props.note.files.length }) ] : [],
props.note.poll != null ? [i18n.ts.poll] : []
props.note.poll != null ? [i18n.ts.poll] : [],
] as string[][]).join(' / ');
});

View file

@ -12,17 +12,17 @@ export default defineComponent({
direction: {
type: String,
required: false,
default: 'down'
default: 'down',
},
reversed: {
type: Boolean,
required: false,
default: false
default: false,
},
noGap: {
type: Boolean,
required: false,
default: false
default: false,
},
},
@ -32,7 +32,7 @@ export default defineComponent({
const month = new Date(time).getMonth() + 1;
return i18n.t('monthAndDay', {
month: month.toString(),
day: date.toString()
day: date.toString(),
});
}
@ -42,7 +42,7 @@ export default defineComponent({
if (!slots || !slots.default) return;
const el = slots.default({
item: item
item,
})[0];
if (el.key == null && item.id) el.key = item.id;
@ -54,20 +54,20 @@ export default defineComponent({
class: 'separator',
key: item.id + ':separator',
}, h('p', {
class: 'date'
class: 'date',
}, [
h('span', [
h('i', {
class: 'fas fa-angle-up icon',
}),
getDateText(item.createdAt)
getDateText(item.createdAt),
]),
h('span', [
getDateText(props.items[i + 1].createdAt),
h('i', {
class: 'fas fa-angle-down icon',
})
])
}),
]),
]));
return [el, separator];
@ -79,16 +79,16 @@ export default defineComponent({
return () => h(
defaultStore.state.animation ? TransitionGroup : 'div',
defaultStore.state.animation ? {
class: 'sqadhkmv' + (props.noGap ? ' noGap' : ''),
name: 'list',
tag: 'div',
'data-direction': props.direction,
'data-reversed': props.reversed ? 'true' : 'false',
} : {
class: 'sqadhkmv' + (props.noGap ? ' noGap' : ''),
},
class: 'sqadhkmv' + (props.noGap ? ' noGap' : ''),
name: 'list',
tag: 'div',
'data-direction': props.direction,
'data-reversed': props.reversed ? 'true' : 'false',
} : {
class: 'sqadhkmv' + (props.noGap ? ' noGap' : ''),
},
{ default: renderChildren });
}
},
});
</script>

View file

@ -1,5 +1,6 @@
<template>
<XModalWindow ref="dialog"
<XModalWindow
ref="dialog"
:width="800"
:height="500"
:with-ok-button="true"

View file

@ -1,5 +1,6 @@
<template>
<XWindow ref="window"
<XWindow
ref="window"
:initial-width="800"
:initial-height="500"
:can-resize="true"

View file

@ -1,5 +1,6 @@
<template>
<div class="ncvczrfv"
<div
class="ncvczrfv"
:class="{ isSelected }"
draggable="true"
:title="title"
@ -33,8 +34,8 @@
<script lang="ts" setup>
import { computed, defineAsyncComponent, ref } from 'vue';
import * as Misskey from 'misskey-js';
import copyToClipboard from '@/scripts/copy-to-clipboard';
import MkDriveFileThumbnail from './drive-file-thumbnail.vue';
import copyToClipboard from '@/scripts/copy-to-clipboard';
import bytes from '@/filters/bytes';
import * as os from '@/os';
import { i18n } from '@/i18n';
@ -63,31 +64,31 @@ function getMenu() {
return [{
text: i18n.ts.rename,
icon: 'fas fa-i-cursor',
action: rename
action: rename,
}, {
text: props.file.isSensitive ? i18n.ts.unmarkAsSensitive : i18n.ts.markAsSensitive,
icon: props.file.isSensitive ? 'fas fa-eye' : 'fas fa-eye-slash',
action: toggleSensitive
action: toggleSensitive,
}, {
text: i18n.ts.describeFile,
icon: 'fas fa-i-cursor',
action: describe
action: describe,
}, null, {
text: i18n.ts.copyUrl,
icon: 'fas fa-link',
action: copyUrl
action: copyUrl,
}, {
type: 'a',
href: props.file.url,
target: '_blank',
text: i18n.ts.download,
icon: 'fas fa-download',
download: props.file.name
download: props.file.name,
}, null, {
text: i18n.ts.delete,
icon: 'fas fa-trash-alt',
danger: true,
action: deleteFile
action: deleteFile,
}];
}
@ -127,7 +128,7 @@ function rename() {
if (canceled) return;
os.api('drive/files/update', {
fileId: props.file.id,
name: name
name,
});
});
}
@ -139,23 +140,23 @@ function describe() {
placeholder: i18n.ts.inputNewDescription,
default: props.file.comment != null ? props.file.comment : '',
},
image: props.file
image: props.file,
}, {
done: result => {
if (!result || result.canceled) return;
let comment = result.result;
os.api('drive/files/update', {
fileId: props.file.id,
comment: comment.length === 0 ? null : comment
comment: comment.length === 0 ? null : comment,
});
}
},
}, 'closed');
}
function toggleSensitive() {
os.api('drive/files/update', {
fileId: props.file.id,
isSensitive: !props.file.isSensitive
isSensitive: !props.file.isSensitive,
});
}
@ -176,7 +177,7 @@ async function deleteFile() {
if (canceled) return;
os.api('drive/files/delete', {
fileId: props.file.id
fileId: props.file.id,
});
}
</script>

View file

@ -1,5 +1,6 @@
<template>
<div class="rghtznwe"
<div
class="rghtznwe"
:class="{ draghover }"
draggable="true"
:title="title"
@ -123,7 +124,7 @@ function onDrop(ev: DragEvent) {
emit('removeFile', file.id);
os.api('drive/files/update', {
fileId: file.id,
folderId: props.folder.id
folderId: props.folder.id,
});
}
//#endregion
@ -139,7 +140,7 @@ function onDrop(ev: DragEvent) {
emit('removeFolder', folder.id);
os.api('drive/folders/update', {
folderId: folder.id,
parentId: props.folder.id
parentId: props.folder.id,
}).then(() => {
// noop
}).catch(err => {
@ -147,13 +148,13 @@ function onDrop(ev: DragEvent) {
case 'detected-circular-definition':
os.alert({
title: i18n.ts.unableToProcess,
text: i18n.ts.circularReferenceFolder
text: i18n.ts.circularReferenceFolder,
});
break;
default:
os.alert({
type: 'error',
text: i18n.ts.somethingHappened
text: i18n.ts.somethingHappened,
});
}
});
@ -186,19 +187,19 @@ function rename() {
os.inputText({
title: i18n.ts.renameFolder,
placeholder: i18n.ts.inputNewFolderName,
default: props.folder.name
default: props.folder.name,
}).then(({ canceled, result: name }) => {
if (canceled) return;
os.api('drive/folders/update', {
folderId: props.folder.id,
name: name
name,
});
});
}
function deleteFolder() {
os.api('drive/folders/delete', {
folderId: props.folder.id
folderId: props.folder.id,
}).then(() => {
if (defaultStore.state.uploadFolder === props.folder.id) {
defaultStore.set('uploadFolder', null);
@ -209,13 +210,13 @@ function deleteFolder() {
os.alert({
type: 'error',
title: i18n.ts.unableToDelete,
text: i18n.ts.hasChildFilesOrFolders
text: i18n.ts.hasChildFilesOrFolders,
});
break;
default:
os.alert({
type: 'error',
text: i18n.ts.unableToDelete
text: i18n.ts.unableToDelete,
});
}
});
@ -231,10 +232,10 @@ function onContextmenu(ev: MouseEvent) {
icon: 'fas fa-window-restore',
action: () => {
os.popup(defineAsyncComponent(() => import('./drive-window.vue')), {
initialFolder: props.folder
initialFolder: props.folder,
}, {
}, 'closed');
}
},
}, null, {
text: i18n.ts.rename,
icon: 'fas fa-i-cursor',

View file

@ -1,5 +1,6 @@
<template>
<div class="drylbebk"
<div
class="drylbebk"
:class="{ draghover }"
@click="onClick"
@dragover.prevent.stop="onDragover"
@ -94,7 +95,7 @@ function onDrop(ev: DragEvent) {
emit('removeFile', file.id);
os.api('drive/files/update', {
fileId: file.id,
folderId: props.folder ? props.folder.id : null
folderId: props.folder ? props.folder.id : null,
});
}
//#endregion
@ -108,7 +109,7 @@ function onDrop(ev: DragEvent) {
emit('removeFolder', folder.id);
os.api('drive/folders/update', {
folderId: folder.id,
parentId: props.folder ? props.folder.id : null
parentId: props.folder ? props.folder.id : null,
});
}
//#endregion

View file

@ -26,7 +26,8 @@
</div>
<button class="menu _button" @click="showMenu"><i class="fas fa-ellipsis-h"></i></button>
</nav>
<div ref="main" class="main"
<div
ref="main" class="main"
:class="{ uploading: uploadings.length > 0, fetching }"
@dragover.prevent.stop="onDragover"
@dragenter="onDragenter"
@ -142,7 +143,7 @@ const isDragSource = ref(false);
const fetching = ref(true);
const ilFilesObserver = new IntersectionObserver(
(entries) => entries.some((entry) => entry.isIntersecting) && !fetching.value && moreFiles.value && fetchMoreFiles()
(entries) => entries.some((entry) => entry.isIntersecting) && !fetching.value && moreFiles.value && fetchMoreFiles(),
);
watch(folder, () => emit('cd', folder.value));
@ -232,7 +233,7 @@ function onDrop(ev: DragEvent): any {
removeFile(file.id);
os.api('drive/files/update', {
fileId: file.id,
folderId: folder.value ? folder.value.id : null
folderId: folder.value ? folder.value.id : null,
});
}
//#endregion
@ -248,7 +249,7 @@ function onDrop(ev: DragEvent): any {
removeFolder(droppedFolder.id);
os.api('drive/folders/update', {
folderId: droppedFolder.id,
parentId: folder.value ? folder.value.id : null
parentId: folder.value ? folder.value.id : null,
}).then(() => {
// noop
}).catch(err => {
@ -256,13 +257,13 @@ function onDrop(ev: DragEvent): any {
case 'detected-circular-definition':
os.alert({
title: i18n.ts.unableToProcess,
text: i18n.ts.circularReferenceFolder
text: i18n.ts.circularReferenceFolder,
});
break;
default:
os.alert({
type: 'error',
text: i18n.ts.somethingHappened
text: i18n.ts.somethingHappened,
});
}
});
@ -278,17 +279,17 @@ function urlUpload() {
os.inputText({
title: i18n.ts.uploadFromUrl,
type: 'url',
placeholder: i18n.ts.uploadFromUrlDescription
placeholder: i18n.ts.uploadFromUrlDescription,
}).then(({ canceled, result: url }) => {
if (canceled || !url) return;
os.api('drive/files/upload-from-url', {
url: url,
folderId: folder.value ? folder.value.id : undefined
url,
folderId: folder.value ? folder.value.id : undefined,
});
os.alert({
title: i18n.ts.uploadFromUrlRequested,
text: i18n.ts.uploadFromUrlMayTakeTime
text: i18n.ts.uploadFromUrlMayTakeTime,
});
});
}
@ -296,12 +297,12 @@ function urlUpload() {
function createFolder() {
os.inputText({
title: i18n.ts.createFolder,
placeholder: i18n.ts.folderName
placeholder: i18n.ts.folderName,
}).then(({ canceled, result: name }) => {
if (canceled) return;
os.api('drive/folders/create', {
name: name,
parentId: folder.value ? folder.value.id : undefined
name,
parentId: folder.value ? folder.value.id : undefined,
}).then(createdFolder => {
addFolder(createdFolder, true);
});
@ -312,12 +313,12 @@ function renameFolder(folderToRename: Misskey.entities.DriveFolder) {
os.inputText({
title: i18n.ts.renameFolder,
placeholder: i18n.ts.inputNewFolderName,
default: folderToRename.name
default: folderToRename.name,
}).then(({ canceled, result: name }) => {
if (canceled) return;
os.api('drive/folders/update', {
folderId: folderToRename.id,
name: name
name,
}).then(updatedFolder => {
// FIXME:
move(updatedFolder);
@ -327,7 +328,7 @@ function renameFolder(folderToRename: Misskey.entities.DriveFolder) {
function deleteFolder(folderToDelete: Misskey.entities.DriveFolder) {
os.api('drive/folders/delete', {
folderId: folderToDelete.id
folderId: folderToDelete.id,
}).then(() => {
//
move(folderToDelete.parentId);
@ -337,15 +338,15 @@ function deleteFolder(folderToDelete: Misskey.entities.DriveFolder) {
os.alert({
type: 'error',
title: i18n.ts.unableToDelete,
text: i18n.ts.hasChildFilesOrFolders
text: i18n.ts.hasChildFilesOrFolders,
});
break;
default:
os.alert({
type: 'error',
text: i18n.ts.unableToDelete
text: i18n.ts.unableToDelete,
});
}
}
});
}
@ -510,7 +511,7 @@ async function fetch() {
const foldersPromise = os.api('drive/folders', {
folderId: folder.value ? folder.value.id : null,
limit: foldersMax + 1
limit: foldersMax + 1,
}).then(fetchedFolders => {
if (fetchedFolders.length === foldersMax + 1) {
moreFolders.value = true;
@ -522,7 +523,7 @@ async function fetch() {
const filesPromise = os.api('drive/files', {
folderId: folder.value ? folder.value.id : null,
type: props.type,
limit: filesMax + 1
limit: filesMax + 1,
}).then(fetchedFiles => {
if (fetchedFiles.length === filesMax + 1) {
moreFiles.value = true;
@ -549,7 +550,7 @@ function fetchMoreFiles() {
folderId: folder.value ? folder.value.id : null,
type: props.type,
untilId: files.value[files.value.length - 1].id,
limit: max + 1
limit: max + 1,
}).then(files => {
if (files.length === max + 1) {
moreFiles.value = true;
@ -569,30 +570,30 @@ function getMenu() {
ref: keepOriginal,
}, null, {
text: i18n.ts.addFile,
type: 'label'
type: 'label',
}, {
text: i18n.ts.upload,
icon: 'fas fa-upload',
action: () => { selectLocalFile(); }
action: () => { selectLocalFile(); },
}, {
text: i18n.ts.fromUrl,
icon: 'fas fa-link',
action: () => { urlUpload(); }
action: () => { urlUpload(); },
}, null, {
text: folder.value ? folder.value.name : i18n.ts.drive,
type: 'label'
type: 'label',
}, folder.value ? {
text: i18n.ts.renameFolder,
icon: 'fas fa-i-cursor',
action: () => { renameFolder(folder.value); }
action: () => { renameFolder(folder.value); },
} : undefined, folder.value ? {
text: i18n.ts.deleteFolder,
icon: 'fas fa-trash-alt',
action: () => { deleteFolder(folder.value as Misskey.entities.DriveFolder); }
action: () => { deleteFolder(folder.value as Misskey.entities.DriveFolder); },
} : undefined, {
text: i18n.ts.createFolder,
icon: 'fas fa-folder-plus',
action: () => { createFolder(); }
action: () => { createFolder(); },
}];
}

View file

@ -1,5 +1,6 @@
<template>
<MkWindow ref="window"
<MkWindow
ref="window"
:initial-width="null"
:initial-height="null"
:can-resize="false"

View file

@ -4,7 +4,8 @@
<i class="toggle fa-fw" :class="shown ? 'fas fa-chevron-down' : 'fas fa-chevron-up'"></i> <slot></slot> ({{ emojis.length }})
</header>
<div v-if="shown">
<button v-for="emoji in emojis"
<button
v-for="emoji in emojis"
:key="emoji"
class="_button"
@click="emit('chosen', emoji, $event)"

View file

@ -4,7 +4,8 @@
<div ref="emojis" class="emojis">
<section class="result">
<div v-if="searchResultCustom.length > 0">
<button v-for="emoji in searchResultCustom"
<button
v-for="emoji in searchResultCustom"
:key="emoji.id"
class="_button"
:title="emoji.name"
@ -16,7 +17,8 @@
</button>
</div>
<div v-if="searchResultUnicode.length > 0">
<button v-for="emoji in searchResultUnicode"
<button
v-for="emoji in searchResultUnicode"
:key="emoji.name"
class="_button"
:title="emoji.name"
@ -31,7 +33,8 @@
<div v-if="tab === 'index'" class="index">
<section v-if="showPinned">
<div>
<button v-for="emoji in pinned"
<button
v-for="emoji in pinned"
:key="emoji"
class="_button"
tabindex="0"
@ -45,7 +48,8 @@
<section>
<header class="_acrylic"><i class="far fa-clock fa-fw"></i> {{ i18n.ts.recentUsed }}</header>
<div>
<button v-for="emoji in recentlyUsedEmojis"
<button
v-for="emoji in recentlyUsedEmojis"
:key="emoji"
class="_button"
@click="chosen(emoji, $event)"
@ -76,6 +80,7 @@
<script lang="ts" setup>
import { ref, computed, watch, onMounted } from 'vue';
import * as Misskey from 'misskey-js';
import XSection from './emoji-picker.section.vue';
import { emojilist, UnicodeEmojiDef, unicodeEmojiCategories as categories } from '@/scripts/emojilist';
import { getStaticImageUrl } from '@/scripts/get-static-image-url';
import Ripple from '@/components/ripple.vue';
@ -83,7 +88,6 @@ import * as os from '@/os';
import { isTouchUsing } from '@/scripts/touch';
import { deviceKind } from '@/scripts/device-kind';
import { emojiCategories, instance } from '@/instance';
import XSection from './emoji-picker.section.vue';
import { i18n } from '@/i18n';
import { defaultStore } from '@/store';
@ -266,7 +270,7 @@ watch(q, () => {
function focus() {
if (!['smartphone', 'tablet'].includes(deviceKind) && !isTouchUsing) {
search.value?.focus({
preventScroll: true
preventScroll: true,
});
}
}

View file

@ -1,5 +1,6 @@
<template>
<button class="kpoogebi _button"
<button
class="kpoogebi _button"
:class="{ wait, active: isFollowing || hasPendingFollowRequestFromYou, full, large }"
:disabled="wait"
@click="onClick"
@ -8,7 +9,8 @@
<template v-if="hasPendingFollowRequestFromYou && user.isLocked">
<span v-if="full">{{ i18n.ts.followRequestPending }}</span><i class="fas fa-hourglass-half"></i>
</template>
<template v-else-if="hasPendingFollowRequestFromYou && !user.isLocked"> <!-- つまりリモートフォローの場合 -->
<template v-else-if="hasPendingFollowRequestFromYou && !user.isLocked">
<!-- つまりリモートフォローの場合 -->
<span v-if="full">{{ i18n.ts.processing }}</span><i class="fas fa-spinner fa-pulse"></i>
</template>
<template v-else-if="isFollowing">
@ -50,7 +52,7 @@ const connection = stream.useChannel('main');
if (props.user.isFollowing == null) {
os.api('users/show', {
userId: props.user.id
userId: props.user.id,
})
.then(onFollowChange);
}
@ -75,17 +77,17 @@ async function onClick() {
if (canceled) return;
await os.api('following/delete', {
userId: props.user.id
userId: props.user.id,
});
} else {
if (hasPendingFollowRequestFromYou) {
await os.api('following/requests/cancel', {
userId: props.user.id
userId: props.user.id,
});
hasPendingFollowRequestFromYou = false;
} else {
await os.api('following/create', {
userId: props.user.id
userId: props.user.id,
});
hasPendingFollowRequestFromYou = true;
}

View file

@ -1,5 +1,6 @@
<template>
<XModalWindow ref="dialog"
<XModalWindow
ref="dialog"
:width="370"
:height="400"
@close="dialog.close()"

View file

@ -23,7 +23,7 @@
const props = withDefaults(defineProps<{
defaultOpen: boolean;
}>(), {
defaultOpen: false,
defaultOpen: false,
});
let opened = $ref(props.defaultOpen);

View file

@ -28,7 +28,7 @@ const process = () => {
// this might be a retry so reset the state
state = 'pending';
props.p?.().then((_result) => {
props.p().then((_result) => {
result = _result;
state = 'resolved';
}, () => {
@ -39,7 +39,7 @@ const process = () => {
watch(() => props.p, () => {
process();
}, {
immediate: true
immediate: true,
});
</script>

View file

@ -12,20 +12,20 @@ export default defineComponent({
props: {
formula: {
type: String,
required: true
required: true,
},
block: {
type: Boolean,
required: true
}
required: true,
},
},
computed: {
compiledFormula(): any {
return katex.renderToString(this.formula, {
throwOnError: false
throwOnError: false,
} as any);
}
}
},
},
});
</script>

View file

@ -1,5 +1,5 @@
<template>
<XFormula :formula="formula" :block="block" />
<XFormula :formula="formula" :block="block"/>
</template>
<script lang="ts">
@ -8,17 +8,17 @@ import * as os from '@/os';
export default defineComponent({
components: {
XFormula: defineAsyncComponent(() => import('./formula-core.vue'))
XFormula: defineAsyncComponent(() => import('./formula-core.vue')),
},
props: {
formula: {
type: String,
required: true
required: true,
},
block: {
type: Boolean,
required: true
}
}
required: true,
},
},
});
</script>

View file

@ -22,17 +22,17 @@ import * as os from '@/os';
export default defineComponent({
components: {
ImgWithBlurhash
ImgWithBlurhash,
},
props: {
post: {
type: Object,
required: true
required: true,
},
},
methods: {
userName
}
userName,
},
});
</script>

View file

@ -1,7 +1,7 @@
<template>
<span class="mk-ellipsis">
<span>.</span><span>.</span><span>.</span>
</span>
<span class="mk-ellipsis">
<span>.</span><span>.</span><span>.</span>
</span>
</template>
<style lang="scss" scoped>

View file

@ -16,24 +16,24 @@ export default defineComponent({
props: {
emoji: {
type: String,
required: true
required: true,
},
normal: {
type: Boolean,
required: false,
default: false
default: false,
},
noStyle: {
type: Boolean,
required: false,
default: false
default: false,
},
customEmojis: {
required: false
required: false,
},
isReaction: {
type: Boolean,
default: false
default: false,
},
},

View file

@ -30,7 +30,7 @@ export default defineComponent({
} else {
if (nextBracketOpen > 0) parsed.push(str.substr(0, nextBracketOpen));
parsed.push({
arg: str.substring(nextBracketOpen + 1, nextBracketClose)
arg: str.substring(nextBracketOpen + 1, nextBracketClose),
});
}
@ -38,5 +38,5 @@ export default defineComponent({
}
return h(this.tag, parsed.map(x => typeof x === 'string' ? (this.textTag ? h(this.textTag, x) : x) : this.$slots[x.arg]()));
}
},
});

View file

@ -1,5 +1,5 @@
<template>
<MfmCore :text="text" :plain="plain" :nowrap="nowrap" :author="author" :customEmojis="customEmojis" :isNote="isNote" class="havbbuyv" :class="{ nowrap }"/>
<MfmCore :text="text" :plain="plain" :nowrap="nowrap" :author="author" :custom-emojis="customEmojis" :is-note="isNote" class="havbbuyv" :class="{ nowrap }"/>
</template>
<script lang="ts" setup>

View file

@ -59,7 +59,7 @@ export default defineComponent({
pathname: safeURIDecode(url.pathname),
query: safeURIDecode(url.search),
hash: safeURIDecode(url.hash),
self: self,
self,
attr: self ? 'to' : 'href',
target: self ? null : '_blank',
el,

View file

@ -21,13 +21,13 @@ const props = defineProps<{
const instance = props.instance ?? {
faviconUrl: '/favicon.ico',
name: instanceName,
themeColor: (document.querySelector('meta[name="theme-color-orig"]') as HTMLMetaElement)?.content
themeColor: (document.querySelector('meta[name="theme-color-orig"]') as HTMLMetaElement).content,
};
const themeColor = instance.themeColor ?? '#777777';
const bg = {
background: `linear-gradient(90deg, ${themeColor}, ${themeColor}00)`
background: `linear-gradient(90deg, ${themeColor}, ${themeColor}00)`,
};
</script>

View file

@ -34,7 +34,7 @@
</template>
<script lang="ts" setup>
import { } from 'vue';
import { } from 'vue';
import MkModal from '@/components/ui/modal.vue';
import { menuDef } from '@/menu';
import { instanceName } from '@/config';

View file

@ -1,5 +1,6 @@
<template>
<component :is="self ? 'MkA' : 'a'" ref="el" class="xlcxczvw _link" :[attr]="self ? url.substr(local.length) : url" :rel="rel" :target="target"
<component
:is="self ? 'MkA' : 'a'" ref="el" class="xlcxczvw _link" :[attr]="self ? url.substr(local.length) : url" :rel="rel" :target="target"
:title="url"
>
<slot></slot>

View file

@ -6,15 +6,18 @@
<span>{{ i18n.ts.clickToShow }}</span>
</div>
<div v-else-if="media.type.startsWith('audio') && media.type !== 'audio/midi'" class="audio">
<audio ref="audioEl"
<audio
ref="audioEl"
class="audio"
:src="media.url"
:title="media.name"
controls
preload="metadata"
@volumechange="volumechange" />
@volumechange="volumechange"
/>
</div>
<a v-else class="download"
<a
v-else class="download"
:href="media.url"
:title="media.name"
:download="media.name"

View file

@ -37,8 +37,8 @@ let hide = $ref(true);
const url = (props.raw || defaultStore.state.loadRawImages)
? props.image.url
: defaultStore.state.disableShowingAnimatedImages
? getStaticImageUrl(props.image.thumbnailUrl)
: props.image.thumbnailUrl;
? getStaticImageUrl(props.image.thumbnailUrl)
: props.image.thumbnailUrl;
// Plugin:register_note_view_interruptor 使watch
watch(() => props.image, () => {

View file

@ -215,7 +215,7 @@ function react(viaKeyboard = false): void {
reactionPicker.show(reactButton.value, reaction => {
os.api('notes/reactions/create', {
noteId: appearNote.id,
reaction: reaction,
reaction,
});
}, () => {
focus();
@ -244,12 +244,12 @@ function onContextmenu(ev: MouseEvent): void {
ev.preventDefault();
react();
} else {
os.contextMenu(getNoteMenu({ note: note, translating, translation, menuButton, isDeleted }), ev).then(focus);
os.contextMenu(getNoteMenu({ note, translating, translation, menuButton, isDeleted }), ev).then(focus);
}
}
function menu(viaKeyboard = false): void {
os.popupMenu(getNoteMenu({ note: note, translating, translation, menuButton, isDeleted }), menuButton.value, {
os.popupMenu(getNoteMenu({ note, translating, translation, menuButton, isDeleted }), menuButton.value, {
viaKeyboard,
}).then(focus);
}
@ -267,7 +267,7 @@ function showRenoteMenu(viaKeyboard = false): void {
isDeleted.value = true;
},
}], renoteTime.value, {
viaKeyboard: viaKeyboard,
viaKeyboard,
});
}

View file

@ -209,7 +209,7 @@ function react(viaKeyboard = false): void {
reactionPicker.show(reactButton.value, reaction => {
os.api('notes/reactions/create', {
noteId: appearNote.id,
reaction: reaction,
reaction,
});
}, () => {
focus();
@ -240,12 +240,12 @@ function onContextmenu(ev: MouseEvent): void {
ev.preventDefault();
react();
} else {
os.contextMenu(getNoteMenu({ note: note, translating, translation, menuButton, isDeleted, currentClipPage }), ev).then(focus);
os.contextMenu(getNoteMenu({ note, translating, translation, menuButton, isDeleted, currentClipPage }), ev).then(focus);
}
}
function menu(viaKeyboard = false): void {
os.popupMenu(getNoteMenu({ note: note, translating, translation, menuButton, isDeleted, currentClipPage }), menuButton.value, {
os.popupMenu(getNoteMenu({ note, translating, translation, menuButton, isDeleted, currentClipPage }), menuButton.value, {
viaKeyboard,
}).then(focus);
}
@ -263,7 +263,7 @@ function showRenoteMenu(viaKeyboard = false): void {
isDeleted.value = true;
},
}], renoteTime.value, {
viaKeyboard: viaKeyboard,
viaKeyboard,
});
}

View file

@ -23,12 +23,12 @@ export default defineComponent({
props: {
page: {
type: Object,
required: true
required: true,
},
},
methods: {
userName
}
userName,
},
});
</script>

View file

@ -24,21 +24,21 @@ import { Block } from '@/scripts/hpml/block';
export default defineComponent({
components: {
XText, XSection, XImage, XButton, XNumberInput, XTextInput, XTextareaInput, XTextarea, XPost, XSwitch, XIf, XCounter, XRadioButton, XCanvas, XNote
XText, XSection, XImage, XButton, XNumberInput, XTextInput, XTextareaInput, XTextarea, XPost, XSwitch, XIf, XCounter, XRadioButton, XCanvas, XNote,
},
props: {
block: {
type: Object as PropType<Block>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
required: true,
},
h: {
type: Number,
required: true
}
required: true,
},
},
});
</script>

View file

@ -13,24 +13,24 @@ import { Hpml } from '@/scripts/hpml/evaluator';
export default defineComponent({
components: {
MkButton
MkButton,
},
props: {
block: {
type: Object as PropType<ButtonBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
methods: {
click() {
if (this.block.action === 'dialog') {
this.hpml.eval();
os.alert({
text: this.hpml.interpolate(this.block.content)
text: this.hpml.interpolate(this.block.content),
});
} else if (this.block.action === 'resetRandom') {
this.hpml.updateRandomSeed(Math.random());
@ -40,19 +40,19 @@ export default defineComponent({
pageId: this.hpml.page.id,
event: this.block.event,
...(this.block.var ? {
var: unref(this.hpml.vars)[this.block.var]
} : {})
var: unref(this.hpml.vars)[this.block.var],
} : {}),
});
os.alert({
type: 'success',
text: this.hpml.interpolate(this.block.message)
text: this.hpml.interpolate(this.block.message),
});
} else if (this.block.action === 'callAiScript') {
this.hpml.callAiScript(this.block.fn);
}
}
}
},
},
});
</script>

View file

@ -14,12 +14,12 @@ export default defineComponent({
props: {
block: {
type: Object as PropType<CanvasBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
setup(props, ctx) {
const canvas: Ref<any> = ref(null);
@ -29,9 +29,9 @@ export default defineComponent({
});
return {
canvas
canvas,
};
}
},
});
</script>

View file

@ -13,17 +13,17 @@ import { Hpml } from '@/scripts/hpml/evaluator';
export default defineComponent({
components: {
MkButton
MkButton,
},
props: {
block: {
type: Object as PropType<CounterVarBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
setup(props, ctx) {
const value = computed(() => {
@ -36,9 +36,9 @@ export default defineComponent({
}
return {
click
click,
};
}
},
});
</script>

View file

@ -5,27 +5,27 @@
</template>
<script lang="ts">
import { defineComponent, defineAsyncComponent, PropType } from 'vue';
import { IfBlock } from '@/scripts/hpml/block';
import { Hpml } from '@/scripts/hpml/evaluator';
import { defineComponent, defineAsyncComponent, PropType } from 'vue';
export default defineComponent({
components: {
XBlock: defineAsyncComponent(() => import('./page.block.vue'))
XBlock: defineAsyncComponent(() => import('./page.block.vue')),
},
props: {
block: {
type: Object as PropType<IfBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
required: true,
},
h: {
type: Number,
required: true
}
required: true,
},
},
});
</script>

View file

@ -20,8 +20,8 @@ export default defineComponent({
props: {
block: {
type: Object as PropType<NoteBlock>,
required: true
}
required: true,
},
},
setup(props, ctx) {
const note: Ref<Record<string, any> | null> = ref(null);
@ -34,9 +34,9 @@ export default defineComponent({
});
return {
note
note,
};
}
},
});
</script>

View file

@ -15,17 +15,17 @@ import { NumberInputVarBlock } from '@/scripts/hpml/block';
export default defineComponent({
components: {
MkInput
MkInput,
},
props: {
block: {
type: Object as PropType<NumberInputVarBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
setup(props, ctx) {
const value = computed(() => {
@ -39,9 +39,9 @@ export default defineComponent({
return {
value,
updateValue
updateValue,
};
}
},
});
</script>

View file

@ -25,12 +25,12 @@ export default defineComponent({
props: {
block: {
type: Object as PropType<PostBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
data() {
return {
@ -44,8 +44,8 @@ export default defineComponent({
handler() {
this.text = this.hpml.interpolate(this.block.text);
},
deep: true
}
deep: true,
},
},
methods: {
upload() {
@ -83,8 +83,8 @@ export default defineComponent({
}).then(() => {
this.posted = true;
});
}
}
},
},
});
</script>

View file

@ -1,7 +1,7 @@
<template>
<div>
<div>{{ hpml.interpolate(block.title) }}</div>
<MkRadio v-for="item in block.values" :key="item" :modelValue="value" :value="item" @update:modelValue="updateValue($event)">{{ item }}</MkRadio>
<MkRadio v-for="item in block.values" :key="item" :model-value="value" :value="item" @update:modelValue="updateValue($event)">{{ item }}</MkRadio>
</div>
</template>
@ -14,17 +14,17 @@ import { RadioButtonVarBlock } from '@/scripts/hpml/block';
export default defineComponent({
components: {
MkRadio
MkRadio,
},
props: {
block: {
type: Object as PropType<RadioButtonVarBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
setup(props, ctx) {
const value = computed(() => {
@ -38,8 +38,8 @@ export default defineComponent({
return {
value,
updateValue
updateValue,
};
}
},
});
</script>

View file

@ -16,20 +16,20 @@ import { Hpml } from '@/scripts/hpml/evaluator';
export default defineComponent({
components: {
XBlock: defineAsyncComponent(() => import('./page.block.vue'))
XBlock: defineAsyncComponent(() => import('./page.block.vue')),
},
props: {
block: {
type: Object as PropType<SectionBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
required: true,
},
h: {
required: true
}
required: true,
},
},
});
</script>

View file

@ -13,17 +13,17 @@ import { SwitchVarBlock } from '@/scripts/hpml/block';
export default defineComponent({
components: {
MkSwitch
MkSwitch,
},
props: {
block: {
type: Object as PropType<SwitchVarBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
setup(props, ctx) {
const value = computed(() => {
@ -37,9 +37,9 @@ export default defineComponent({
return {
value,
updateValue
updateValue,
};
}
},
});
</script>

View file

@ -15,17 +15,17 @@ import { TextInputVarBlock } from '@/scripts/hpml/block';
export default defineComponent({
components: {
MkInput
MkInput,
},
props: {
block: {
type: Object as PropType<TextInputVarBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
setup(props, ctx) {
const value = computed(() => {
@ -39,9 +39,9 @@ export default defineComponent({
return {
value,
updateValue
updateValue,
};
}
},
});
</script>

View file

@ -16,17 +16,17 @@ import { TextInputVarBlock } from '@/scripts/hpml/block';
export default defineComponent({
components: {
MkTextarea
MkTextarea,
},
props: {
block: {
type: Object as PropType<TextInputVarBlock>,
required: true
required: true,
},
hpml: {
type: Object as PropType<Hpml>,
required: true
}
required: true,
},
},
setup(props, ctx) {
const value = computed(() => {
@ -40,8 +40,8 @@ export default defineComponent({
return {
value,
updateValue
updateValue,
};
}
},
});
</script>

View file

@ -15,20 +15,20 @@ import { defaultStore } from '@/store';
export default defineComponent({
components: {
XBlock
XBlock,
},
props: {
page: {
type: Object as PropType<Record<string, any>>,
required: true
required: true,
},
},
setup(props, ctx) {
const hpml = new Hpml(props.page, {
randomSeed: Math.random(),
visitor: $i,
url: url,
enableAiScript: !defaultStore.state.disablePagesScript
url,
enableAiScript: !defaultStore.state.disablePagesScript,
});
onMounted(() => {

View file

@ -22,18 +22,18 @@ import * as os from '@/os';
export default defineComponent({
components: {
XDraggable: defineAsyncComponent(() => import('vuedraggable').then(x => x.default)),
MkDriveFileThumbnail
MkDriveFileThumbnail,
},
props: {
files: {
type: Array,
required: true
required: true,
},
detachMediaFn: {
type: Function,
required: false
}
required: false,
},
},
emits: ['updated', 'detach', 'changeSensitive', 'changeName'],
@ -51,8 +51,8 @@ export default defineComponent({
},
set(value) {
this.$emit('updated', value);
}
}
},
},
},
methods: {
@ -66,7 +66,7 @@ export default defineComponent({
toggleSensitive(file) {
os.api('drive/files/update', {
fileId: file.id,
isSensitive: !file.isSensitive
isSensitive: !file.isSensitive,
}).then(() => {
this.$emit('changeSensitive', file, !file.isSensitive);
});
@ -75,12 +75,12 @@ export default defineComponent({
const { canceled, result } = await os.inputText({
title: this.$ts.enterFileName,
default: file.name,
allowEmpty: false
allowEmpty: false,
});
if (canceled) return;
os.api('drive/files/update', {
fileId: file.id,
name: result
name: result,
}).then(() => {
this.$emit('changeName', file, result);
file.name = result;
@ -94,18 +94,18 @@ export default defineComponent({
placeholder: this.$ts.inputNewDescription,
default: file.comment !== null ? file.comment : '',
},
image: file
image: file,
}, {
done: result => {
if (!result || result.canceled) return;
let comment = result.result.length === 0 ? null : result.result;
os.api('drive/files/update', {
fileId: file.id,
comment: comment,
comment,
}).then(() => {
file.comment = comment;
});
}
},
}, 'closed');
},
@ -114,22 +114,22 @@ export default defineComponent({
this.menu = os.popupMenu([{
text: this.$ts.renameFile,
icon: 'fas fa-i-cursor',
action: () => { this.rename(file); }
action: () => { this.rename(file); },
}, {
text: file.isSensitive ? this.$ts.unmarkAsSensitive : this.$ts.markAsSensitive,
icon: file.isSensitive ? 'fas fa-eye-slash' : 'fas fa-eye',
action: () => { this.toggleSensitive(file); }
action: () => { this.toggleSensitive(file); },
}, {
text: this.$ts.describeFile,
icon: 'fas fa-i-cursor',
action: () => { this.describe(file); }
action: () => { this.describe(file); },
}, {
text: this.$ts.attachCancel,
icon: 'fas fa-times-circle',
action: () => { this.detachMedia(file.id); }
action: () => { this.detachMedia(file.id); },
}], ev.currentTarget ?? ev.target).then(() => this.menu = null);
}
}
},
},
});
</script>

View file

@ -1,5 +1,6 @@
<template>
<div v-size="{ max: [310, 500] }" class="gafaadew"
<div
v-size="{ max: [310, 500] }" class="gafaadew"
:class="{ modal, _popup: modal }"
@dragover.stop="onDragover"
@dragenter="onDragenter"
@ -68,6 +69,8 @@ import * as misskey from 'misskey-js';
import insertTextAtCursor from 'insert-text-at-cursor';
import { length } from 'stringz';
import { toASCII } from 'punycode/';
import * as Acct from 'misskey-js/built/acct';
import { throttle } from 'throttle-debounce';
import XNoteSimple from './note-simple.vue';
import XNotePreview from './note-preview.vue';
import XPostFormAttaches from './post-form-attaches.vue';
@ -75,14 +78,12 @@ import XPollEditor from './poll-editor.vue';
import { host, url } from '@/config';
import { erase, unique } from '@/scripts/array';
import { extractMentions } from '@/scripts/extract-mentions';
import * as Acct from 'misskey-js/built/acct';
import { formatTimeString } from '@/scripts/format-time-string';
import { Autocomplete } from '@/scripts/autocomplete';
import * as os from '@/os';
import { stream } from '@/stream';
import { selectFiles } from '@/scripts/select-file';
import { defaultStore, notePostInterruptors, postFormActions } from '@/store';
import { throttle } from 'throttle-debounce';
import MkInfo from '@/components/ui/info.vue';
import { i18n } from '@/i18n';
import { instance } from '@/instance';
@ -181,7 +182,7 @@ const placeholder = $computed((): string => {
i18n.ts._postForm._placeholders.c,
i18n.ts._postForm._placeholders.d,
i18n.ts._postForm._placeholders.e,
i18n.ts._postForm._placeholders.f
i18n.ts._postForm._placeholders.f,
];
return xs[Math.floor(Math.random() * xs.length)];
}
@ -238,10 +239,10 @@ if (props.reply && props.reply.text != null) {
for (const x of extractMentions(ast)) {
const mention = x.host ?
`@${x.username}@${toASCII(x.host)}` :
(otherHost == null || otherHost === host) ?
`@${x.username}` :
`@${x.username}@${toASCII(otherHost)}`;
`@${x.username}@${toASCII(x.host)}` :
(otherHost == null || otherHost === host) ?
`@${x.username}` :
`@${x.username}@${toASCII(otherHost)}`;
//
if ($i.username === x.username && (x.host == null || x.host === host)) continue;
@ -263,7 +264,7 @@ if (props.reply && ['home', 'followers', 'specified'].includes(props.reply.visib
visibility = props.reply.visibility;
if (props.reply.visibility === 'specified') {
os.api('users/show', {
userIds: props.reply.visibleUserIds.filter(uid => uid !== $i.id && uid !== props.reply.userId)
userIds: props.reply.visibleUserIds.filter(uid => uid !== $i.id && uid !== props.reply.userId),
}).then(users => {
users.forEach(pushVisibleUser);
});
@ -399,7 +400,7 @@ function setVisibility() {
if (defaultStore.state.rememberNoteVisibility) {
defaultStore.set('localOnly', localOnly);
}
}
},
}, 'closed');
}
@ -516,14 +517,14 @@ function saveDraft() {
draftData[draftKey] = {
updatedAt: new Date(),
data: {
text: text,
useCw: useCw,
cw: cw,
visibility: visibility,
localOnly: localOnly,
files: files,
poll: poll
}
text,
useCw,
cw,
visibility,
localOnly,
files,
poll,
},
};
localStorage.setItem('drafts', JSON.stringify(draftData));
@ -544,10 +545,10 @@ async function post() {
replyId: props.reply ? props.reply.id : undefined,
renoteId: props.renote ? props.renote.id : quoteId ? quoteId : undefined,
channelId: props.channel ? props.channel.id : undefined,
poll: poll,
poll,
cw: useCw ? cw || '' : undefined,
localOnly: localOnly,
visibility: visibility,
localOnly,
visibility,
visibleUserIds: visibility === 'specified' ? visibleUsers.map(u => u.id) : undefined,
};
@ -612,11 +613,11 @@ function showActions(ev) {
text: action.title,
action: () => {
action.handler({
text: text
text,
}, (key, value) => {
if (key === 'text') { text = value; }
});
}
},
})), ev.currentTarget ?? ev.target);
}

View file

@ -67,7 +67,7 @@ onMounted(() => {
borderJoinStyle: 'round',
borderColor: '#00E396',
backgroundColor: '#00E3961A',
data: []
data: [],
}, {
label: 'Active',
pointRadius: 0,
@ -76,7 +76,7 @@ onMounted(() => {
borderJoinStyle: 'round',
borderColor: '#00BCD4',
backgroundColor: '#00BCD41A',
data: []
data: [],
}, {
label: 'Waiting',
pointRadius: 0,
@ -86,7 +86,7 @@ onMounted(() => {
borderColor: '#FFB300',
backgroundColor: '#FFB3001A',
yAxisID: 'y2',
data: []
data: [],
}, {
label: 'Delayed',
pointRadius: 0,
@ -97,7 +97,7 @@ onMounted(() => {
borderDash: [5, 5],
fill: false,
yAxisID: 'y2',
data: []
data: [],
}],
},
options: {
@ -119,7 +119,7 @@ onMounted(() => {
},
ticks: {
display: false,
maxTicksLimit: 10
maxTicksLimit: 10,
},
},
y: {

View file

@ -7,8 +7,8 @@
<script lang="ts" setup>
import { computed } from 'vue';
import * as misskey from 'misskey-js';
import { $i } from '@/account';
import XReaction from './reactions-viewer.reaction.vue';
import { $i } from '@/account';
const props = defineProps<{
note: misskey.entities.Note;

View file

@ -1,5 +1,6 @@
<template>
<button v-if="canRenote"
<button
v-if="canRenote"
ref="buttonRef"
class="eddddedb _button canRenote"
@click="renote()"
@ -41,7 +42,7 @@ export default defineComponent({
useTooltip(buttonRef, async (showing) => {
const renotes = await os.api('notes/renotes', {
noteId: props.note.id,
limit: 11
limit: 11,
});
const users = renotes.map(x => x.user);
@ -52,7 +53,7 @@ export default defineComponent({
showing,
users,
count: props.count,
targetElement: buttonRef.value
targetElement: buttonRef.value,
}, {}, 'closed');
});
@ -66,7 +67,7 @@ export default defineComponent({
renoteId: props.note.id,
visibility: props.note.visibility,
});
}
},
}, {
text: i18n.ts.quote,
icon: 'fas fa-quote-right',
@ -74,9 +75,9 @@ export default defineComponent({
os.post({
renote: props.note,
});
}
},
}], buttonRef.value, {
viaKeyboard
viaKeyboard,
});
};

View file

@ -2,7 +2,8 @@
<div class="vswabwbm" :style="{ zIndex, top: `${y - 64}px`, left: `${x - 64}px` }" :class="{ active }">
<svg width="128" height="128" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
<circle fill="none" cx="64" cy="64">
<animate attributeName="r"
<animate
attributeName="r"
begin="0s" dur="0.5s"
values="4; 32"
calcMode="spline"
@ -10,7 +11,8 @@
keySplines="0.165, 0.84, 0.44, 1"
repeatCount="1"
/>
<animate attributeName="stroke-width"
<animate
attributeName="stroke-width"
begin="0s" dur="0.5s"
values="16; 0"
calcMode="spline"
@ -21,7 +23,8 @@
</circle>
<g fill="none" fill-rule="evenodd">
<circle v-for="(particle, i) in particles" :key="i" :fill="particle.color">
<animate attributeName="r"
<animate
attributeName="r"
begin="0s" dur="0.8s"
:values="`${particle.size}; 0`"
calcMode="spline"
@ -29,7 +32,8 @@
keySplines="0.165, 0.84, 0.44, 1"
repeatCount="1"
/>
<animate attributeName="cx"
<animate
attributeName="cx"
begin="0s" dur="0.8s"
:values="`${particle.xA}; ${particle.xB}`"
calcMode="spline"
@ -37,7 +41,8 @@
keySplines="0.3, 0.61, 0.355, 1"
repeatCount="1"
/>
<animate attributeName="cy"
<animate
attributeName="cy"
begin="0s" dur="0.8s"
:values="`${particle.yA}; ${particle.yB}`"
calcMode="spline"
@ -59,17 +64,17 @@ export default defineComponent({
props: {
x: {
type: Number,
required: true
required: true,
},
y: {
type: Number,
required: true
required: true,
},
particle: {
type: Boolean,
required: false,
default: true,
}
},
},
emits: ['end'],
setup(props, context) {
@ -88,7 +93,7 @@ export default defineComponent({
yA: origin + (Math.cos(angle) * pos),
xB: origin + (Math.sin(angle) * (pos + velocity)),
yB: origin + (Math.cos(angle) * (pos + velocity)),
color: colors[Math.floor(Math.random() * colors.length)]
color: colors[Math.floor(Math.random() * colors.length)],
});
}
}

View file

@ -77,7 +77,7 @@ function openDrive(): void {
function openMenu(ev): void {
os.popupMenu([{
type: 'label',
text: 'Fruits'
text: 'Fruits',
}, {
text: 'Create some apples',
action: (): void => {},

View file

@ -51,6 +51,7 @@
<script lang="ts" setup>
import { defineAsyncComponent } from 'vue';
import { toUnicode } from 'punycode/';
import { showSuspendedDialog } from '../scripts/show-suspended-dialog';
import MkButton from '@/components/ui/button.vue';
import MkInput from '@/components/form/input.vue';
import MkInfo from '@/components/ui/info.vue';
@ -58,7 +59,6 @@ import { apiUrl, host as configHost } from '@/config';
import { byteify, hexify } from '@/scripts/2fa';
import * as os from '@/os';
import { login } from '@/account';
import { showSuspendedDialog } from '../scripts/show-suspended-dialog';
import { instance } from '@/instance';
import { i18n } from '@/i18n';
@ -85,7 +85,7 @@ const props = defineProps({
withAvatar: {
type: Boolean,
required: false,
default: true
default: true,
},
autoSet: {
type: Boolean,
@ -95,13 +95,13 @@ const props = defineProps({
message: {
type: String,
required: false,
default: ''
}
default: '',
},
});
function onUsernameChange() {
os.api('users/show', {
username: username
username,
}).then(userResponse => {
user = userResponse;
}, () => {
@ -123,10 +123,10 @@ function queryKey() {
allowCredentials: challengeData.securityKeys.map(key => ({
id: byteify(key.id, 'hex'),
type: 'public-key',
transports: ['usb', 'nfc', 'ble', 'internal']
transports: ['usb', 'nfc', 'ble', 'internal'],
})),
timeout: 60 * 1000
}
timeout: 60 * 1000,
},
}).catch(() => {
queryingKey = false;
return Promise.reject(null);
@ -141,7 +141,7 @@ function queryKey() {
clientDataJSON: hexify(credential.response.clientDataJSON),
credentialId: credential.id,
challengeId: challengeData.challengeId,
'hcaptcha-response': hCaptchaResponse,
'hcaptcha-response': hCaptchaResponse,
'g-recaptcha-response': reCaptchaResponse,
});
}).then(res => {
@ -151,7 +151,7 @@ function queryKey() {
if (err === null) return;
os.alert({
type: 'error',
text: i18n.ts.signinFailed
text: i18n.ts.signinFailed,
});
signing = false;
});
@ -165,8 +165,8 @@ function onSubmit() {
os.api('signin', {
username,
password,
'hcaptcha-response': hCaptchaResponse,
'g-recaptcha-response': reCaptchaResponse,
'hcaptcha-response': hCaptchaResponse,
'g-recaptcha-response': reCaptchaResponse,
}).then(res => {
totpLogin = true;
signing = false;
@ -181,9 +181,9 @@ function onSubmit() {
os.api('signin', {
username,
password,
'hcaptcha-response': hCaptchaResponse,
'hcaptcha-response': hCaptchaResponse,
'g-recaptcha-response': reCaptchaResponse,
token: user && user.twoFactorEnabled ? token : undefined
token: user && user.twoFactorEnabled ? token : undefined,
}).then(res => {
emit('login', res);
onLogin(res);
@ -197,7 +197,7 @@ function loginFailed(err) {
os.alert({
type: 'error',
title: i18n.ts.loginFailed,
text: i18n.ts.noSuchUser
text: i18n.ts.noSuchUser,
});
break;
}
@ -226,7 +226,7 @@ function loginFailed(err) {
os.alert({
type: 'error',
title: i18n.ts.loginFailed,
text: JSON.stringify(err)
text: JSON.stringify(err),
});
}
}

View file

@ -18,13 +18,13 @@ export default defineComponent({
disabled: this.modelValue === option.props.value,
onClick: () => {
this.$emit('update:modelValue', option.props.value);
}
},
}, option.children), [
[resolveDirective('click-anime')]
[resolveDirective('click-anime')],
]))), [
[resolveDirective('size'), { max: [500] }]
[resolveDirective('size'), { max: [500] }],
]);
}
},
});
</script>

View file

@ -59,10 +59,10 @@ let connection2;
if (props.src === 'antenna') {
endpoint = 'antennas/notes';
query = {
antennaId: props.antenna
antennaId: props.antenna,
};
connection = stream.useChannel('antenna', {
antennaId: props.antenna
antennaId: props.antenna,
});
connection.on('note', prepend);
} else if (props.src === 'home') {
@ -92,7 +92,7 @@ if (props.src === 'antenna') {
} else if (props.src === 'directs') {
endpoint = 'notes/mentions';
query = {
visibility: 'specified'
visibility: 'specified',
};
const onNote = note => {
if (note.visibility === 'specified') {
@ -104,10 +104,10 @@ if (props.src === 'antenna') {
} else if (props.src === 'list') {
endpoint = 'notes/user-list-timeline';
query = {
listId: props.list
listId: props.list,
};
connection = stream.useChannel('userList', {
listId: props.list
listId: props.list,
});
connection.on('note', prepend);
connection.on('userAdded', onUserAdded);
@ -115,16 +115,16 @@ if (props.src === 'antenna') {
} else if (props.src === 'channel') {
endpoint = 'channels/timeline';
query = {
channelId: props.channel
channelId: props.channel,
};
connection = stream.useChannel('channel', {
channelId: props.channel
channelId: props.channel,
});
connection.on('note', prepend);
}
const pagination = {
endpoint: endpoint,
endpoint,
limit: 10,
params: query,
};

View file

@ -1,5 +1,6 @@
<template>
<XModalWindow ref="dialog"
<XModalWindow
ref="dialog"
:width="400"
:height="450"
:with-ok-button="true"
@ -30,12 +31,12 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { permissions } from 'misskey-js';
import XModalWindow from '@/components/ui/modal-window.vue';
import MkInput from './form/input.vue';
import MkTextarea from './form/textarea.vue';
import MkSwitch from './form/switch.vue';
import MkButton from './ui/button.vue';
import MkInfo from './ui/info.vue';
import XModalWindow from '@/components/ui/modal-window.vue';
export default defineComponent({
components: {
@ -51,23 +52,23 @@ export default defineComponent({
title: {
type: String,
required: false,
default: null
default: null,
},
information: {
type: String,
required: false,
default: null
default: null,
},
initialName: {
type: String,
required: false,
default: null
default: null,
},
initialPermissions: {
type: Array,
required: false,
default: null
}
default: null,
},
},
emits: ['done', 'closed'],
@ -76,7 +77,7 @@ export default defineComponent({
return {
name: this.initialName,
permissions: {},
kinds: permissions
kinds: permissions,
};
},
@ -96,7 +97,7 @@ export default defineComponent({
ok() {
this.$emit('done', {
name: this.name,
permissions: Object.keys(this.permissions).filter(p => this.permissions[p])
permissions: Object.keys(this.permissions).filter(p => this.permissions[p]),
});
this.$refs.dialog.close();
},
@ -111,7 +112,7 @@ export default defineComponent({
for (const p in this.permissions) {
this.permissions[p] = true;
}
}
}
},
},
});
</script>

View file

@ -1,5 +1,6 @@
<template>
<button v-if="!link" class="bghgjjyj _button"
<button
v-if="!link" class="bghgjjyj _button"
:class="{ inline, primary, gradate, danger, rounded, full }"
:type="type"
@click="$emit('click', $event)"
@ -10,7 +11,8 @@
<slot></slot>
</div>
</button>
<MkA v-else class="bghgjjyj _button"
<MkA
v-else class="bghgjjyj _button"
:class="{ inline, primary, gradate, danger, rounded, full }"
:to="to"
@mousedown="onMousedown"
@ -29,56 +31,56 @@ export default defineComponent({
props: {
type: {
type: String,
required: false
required: false,
},
primary: {
type: Boolean,
required: false,
default: false
default: false,
},
gradate: {
type: Boolean,
required: false,
default: false
default: false,
},
rounded: {
type: Boolean,
required: false,
default: false
default: false,
},
inline: {
type: Boolean,
required: false,
default: false
default: false,
},
link: {
type: Boolean,
required: false,
default: false
default: false,
},
to: {
type: String,
required: false
required: false,
},
autofocus: {
type: Boolean,
required: false,
default: false
default: false,
},
wait: {
type: Boolean,
required: false,
default: false
default: false,
},
danger: {
type: Boolean,
required: false,
default: false
default: false,
},
full: {
type: Boolean,
required: false,
default: false
default: false,
},
},
emits: ['click'],
@ -127,8 +129,8 @@ export default defineComponent({
window.setTimeout(() => {
if (this.$refs.ripples) this.$refs.ripples.removeChild(ripple);
}, 2000);
}
}
},
},
});
</script>

View file

@ -10,7 +10,8 @@
</button>
</div>
</header>
<transition :name="$store.state.animation ? 'container-toggle' : ''"
<transition
:name="$store.state.animation ? 'container-toggle' : ''"
@enter="enter"
@after-enter="afterEnter"
@leave="leave"
@ -34,37 +35,37 @@ export default defineComponent({
showHeader: {
type: Boolean,
required: false,
default: true
default: true,
},
thin: {
type: Boolean,
required: false,
default: false
default: false,
},
naked: {
type: Boolean,
required: false,
default: false
default: false,
},
foldable: {
type: Boolean,
required: false,
default: false
default: false,
},
expanded: {
type: Boolean,
required: false,
default: true
default: true,
},
scrollable: {
type: Boolean,
required: false,
default: false
default: false,
},
maxHeight: {
type: Number,
required: false,
default: null
default: null,
},
},
data() {
@ -84,7 +85,7 @@ export default defineComponent({
this.$el.style.flexBasis = `${headerHeight}px`;
}
}, {
immediate: true
immediate: true,
});
this.$el.style.setProperty('--maxHeight', this.maxHeight + 'px');
@ -124,7 +125,7 @@ export default defineComponent({
afterLeave(el) {
el.style.height = null;
},
}
},
});
</script>

View file

@ -8,9 +8,9 @@
<script lang="ts" setup>
import { onMounted, onBeforeUnmount } from 'vue';
import contains from '@/scripts/contains';
import MkMenu from './menu.vue';
import { MenuItem } from './types/menu.vue';
import contains from '@/scripts/contains';
import * as os from '@/os';
const props = defineProps<{

View file

@ -8,7 +8,8 @@
<template v-else><i class="fas fa-angle-down"></i></template>
</button>
</header>
<transition :name="$store.state.animation ? 'folder-toggle' : ''"
<transition
:name="$store.state.animation ? 'folder-toggle' : ''"
@enter="enter"
@after-enter="afterEnter"
@leave="leave"
@ -32,12 +33,12 @@ export default defineComponent({
expanded: {
type: Boolean,
required: false,
default: true
default: true,
},
persistKey: {
type: String,
required: false,
default: null
default: null,
},
},
data() {
@ -51,7 +52,7 @@ export default defineComponent({
if (this.persistKey) {
localStorage.setItem(localStoragePrefix + this.persistKey, this.showBody ? 't' : 'f');
}
}
},
},
mounted() {
function getParentBg(el: Element | null): string {
@ -91,7 +92,7 @@ export default defineComponent({
afterLeave(el) {
el.style.height = null;
},
}
},
});
</script>

View file

@ -15,13 +15,13 @@ export default defineComponent({
warn: {
type: Boolean,
required: false,
default: false
default: false,
},
},
data() {
return {
};
}
},
});
</script>

View file

@ -30,7 +30,7 @@ export default defineComponent({
props: {
def: {
type: Array,
required: true
required: true,
},
grid: {
type: Boolean,

View file

@ -13,20 +13,20 @@ import * as os from '@/os';
export default defineComponent({
components: {
MkUrlPreview
MkUrlPreview,
},
props: {
url: {
type: String,
required: true
required: true,
},
source: {
required: true
required: true,
},
showing: {
type: Boolean,
required: true
required: true,
},
},

View file

@ -58,7 +58,7 @@ let sitename = $ref<string | null>(null);
let player = $ref({
url: null,
width: null,
height: null
height: null,
});
let playerEnabled = $ref(false);
let tweetId = $ref<string | null>(null);

View file

@ -40,21 +40,21 @@ import * as os from '@/os';
export default defineComponent({
components: {
MkFollowButton
MkFollowButton,
},
props: {
showing: {
type: Boolean,
required: true
required: true,
},
q: {
type: String,
required: true
required: true,
},
source: {
required: true
}
required: true,
},
},
emits: ['closed', 'mouseover', 'mouseleave'],
@ -94,8 +94,8 @@ export default defineComponent({
},
methods: {
userPage
}
userPage,
},
});
</script>

View file

@ -80,8 +80,8 @@ const search = () => {
return;
}
os.api('users/search-by-username-and-host', {
username: username,
host: host,
username,
host,
limit: 10,
detail: false,
}).then(_users => {

View file

@ -1,5 +1,5 @@
const address = new URL(location.href);
const siteName = (document.querySelector('meta[property="og:site_name"]') as HTMLMetaElement)?.content;
const siteName = (document.querySelector('meta[property="og:site_name"]') as HTMLMetaElement).content;
export const host = address.host;
export const hostname = address.hostname;

View file

@ -18,5 +18,5 @@ export default {
unmounted(src, binding, vn) {
if (src._observer_) src._observer_.disconnect();
}
},
} as Directive;

View file

@ -27,5 +27,5 @@ export default {
el.classList.add('_anime_bounce_standBy');
});
*/
}
},
} as Directive;

View file

@ -39,7 +39,7 @@ export default {
});
resize.observe(src);
mountings.set(src, { resize, fn: binding.value, });
mountings.set(src, { resize, fn: binding.value });
calc(src);
},
@ -50,5 +50,5 @@ export default {
info.resize.disconnect();
if (info.intersection) info.intersection.disconnect();
mountings.delete(src);
}
},
} as Directive<Element, (w: number, h: number) => void>;

View file

@ -20,5 +20,5 @@ export default {
} else {
el.removeEventListener('keydown', el._keyHandler);
}
}
},
} as Directive;

View file

@ -14,5 +14,5 @@ export default {
popup(Ripple, { x, y }, {}, 'end');
});
}
},
};

View file

@ -29,7 +29,7 @@ function getClassOrder(width: number, queue: Value): ClassOrder {
remove: [
...(queue.max ? queue.max.filter(v => width > v).map(getMaxClass) : []),
...(queue.min ? queue.min.filter(v => width < v).map(getMinClass) : []),
]
],
};
}
@ -103,5 +103,5 @@ export default {
info.resize.disconnect();
if (info.intersection) info.intersection.disconnect();
mountings.delete(src);
}
},
} as Directive<Element, Value>;

View file

@ -27,7 +27,7 @@ export class UserPreview {
popup(defineAsyncComponent(() => import('@/components/user-preview.vue')), {
showing,
q: this.user,
source: this.el
source: this.el,
}, {
mouseover: () => {
window.clearTimeout(this.hideTimer);
@ -41,7 +41,7 @@ export class UserPreview {
this.promise = {
cancel: () => {
showing.value = false;
}
},
};
this.checkTimer = window.setInterval(() => {
@ -114,5 +114,5 @@ export default {
const self = el._userPreviewDirective_;
self.preview.detach();
}
},
} as Directive;

View file

@ -14,7 +14,7 @@ export const instance: Misskey.entities.InstanceMetadata = reactive(instanceData
export async function fetchInstance() {
const meta = await api('meta', {
detail: false
detail: false,
});
for (const [k, v] of Object.entries(meta)) {

View file

@ -137,9 +137,9 @@ export function promiseDialog<T extends Promise<any>>(
// NOTE: dynamic importすると挙動がおかしくなる(showingの変更が伝播しない)
popup(MkWaitingDialog, {
success: success,
showing: showing,
text: text,
success,
showing,
text,
}, {}, 'closed');
return promise;
@ -354,7 +354,7 @@ export function success() {
}, 1000);
popup(defineAsyncComponent(() => import('@/components/waiting-dialog.vue')), {
success: true,
showing: showing,
showing,
}, {
done: () => resolve(),
}, 'closed');
@ -366,7 +366,7 @@ export function waiting() {
const showing = ref(true);
popup(defineAsyncComponent(() => import('@/components/waiting-dialog.vue')), {
success: false,
showing: showing,
showing,
}, {
done: () => resolve(),
}, 'closed');

View file

@ -1,13 +1,15 @@
<template><MkStickyContainer>
<template>
<MkStickyContainer>
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :content-max="800" :margin-min="16" :margin-max="32">
<FormSuspense v-slot="{ result: database }" :p="databasePromiseFactory">
<MkKeyValue v-for="table in database" :key="table[0]" oneline style="margin: 1em 0;">
<template #key>{{ table[0] }}</template>
<template #value>{{ bytes(table[1].size) }} ({{ number(table[1].count) }} recs)</template>
</MkKeyValue>
</FormSuspense>
</MkSpacer></MkStickyContainer>
<MkSpacer :content-max="800" :margin-min="16" :margin-max="32">
<FormSuspense v-slot="{ result: database }" :p="databasePromiseFactory">
<MkKeyValue v-for="table in database" :key="table[0]" oneline style="margin: 1em 0;">
<template #key>{{ table[0] }}</template>
<template #value>{{ bytes(table[1].size) }} ({{ number(table[1].count) }} recs)</template>
</MkKeyValue>
</FormSuspense>
</MkSpacer>
</MkStickyContainer>
</template>
<script lang="ts" setup>

View file

@ -137,7 +137,7 @@ const add = async (ev: MouseEvent) => {
const edit = (emoji) => {
os.popup(defineAsyncComponent(() => import('./emoji-edit-dialog.vue')), {
emoji: emoji,
emoji,
}, {
done: result => {
if (result.updated) {

View file

@ -56,7 +56,7 @@ const pagination = {
params: computed(() => ({
type: (type && type !== '') ? type : null,
userId: (userId && userId !== '') ? userId : null,
origin: origin,
origin,
hostname: (searchHost && searchHost !== '') ? searchHost : null,
})),
};

View file

@ -1,27 +1,29 @@
<template><MkStickyContainer>
<template>
<MkStickyContainer>
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
<FormSuspense :p="init">
<FormFolder class="_formBlock">
<template #icon><i class="fab fa-twitter"></i></template>
<template #label>Twitter</template>
<template #suffix>{{ enableTwitterIntegration ? i18n.ts.enabled : i18n.ts.disabled }}</template>
<XTwitter/>
</FormFolder>
<FormFolder class="_formBlock">
<template #icon><i class="fab fa-github"></i></template>
<template #label>GitHub</template>
<template #suffix>{{ enableGithubIntegration ? i18n.ts.enabled : i18n.ts.disabled }}</template>
<XGithub/>
</FormFolder>
<FormFolder class="_formBlock">
<template #icon><i class="fab fa-discord"></i></template>
<template #label>Discord</template>
<template #suffix>{{ enableDiscordIntegration ? i18n.ts.enabled : i18n.ts.disabled }}</template>
<XDiscord/>
</FormFolder>
</FormSuspense>
</MkSpacer></MkStickyContainer>
<MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
<FormSuspense :p="init">
<FormFolder class="_formBlock">
<template #icon><i class="fab fa-twitter"></i></template>
<template #label>Twitter</template>
<template #suffix>{{ enableTwitterIntegration ? i18n.ts.enabled : i18n.ts.disabled }}</template>
<XTwitter/>
</FormFolder>
<FormFolder class="_formBlock">
<template #icon><i class="fab fa-github"></i></template>
<template #label>GitHub</template>
<template #suffix>{{ enableGithubIntegration ? i18n.ts.enabled : i18n.ts.disabled }}</template>
<XGithub/>
</FormFolder>
<FormFolder class="_formBlock">
<template #icon><i class="fab fa-discord"></i></template>
<template #label>Discord</template>
<template #suffix>{{ enableDiscordIntegration ? i18n.ts.enabled : i18n.ts.disabled }}</template>
<XDiscord/>
</FormFolder>
</FormSuspense>
</MkSpacer>
</MkStickyContainer>
</template>
<script lang="ts" setup>

View file

@ -1,16 +1,18 @@
<template><MkStickyContainer>
<template>
<MkStickyContainer>
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
<FormSuspense :p="init">
<MkInfo class="_formBlock">{{ i18n.ts.proxyAccountDescription }}</MkInfo>
<MkKeyValue class="_formBlock">
<template #key>{{ i18n.ts.proxyAccount }}</template>
<template #value>{{ proxyAccount ? `@${proxyAccount.username}` : i18n.ts.none }}</template>
</MkKeyValue>
<MkSpacer :content-max="700" :margin-min="16" :margin-max="32">
<FormSuspense :p="init">
<MkInfo class="_formBlock">{{ i18n.ts.proxyAccountDescription }}</MkInfo>
<MkKeyValue class="_formBlock">
<template #key>{{ i18n.ts.proxyAccount }}</template>
<template #value>{{ proxyAccount ? `@${proxyAccount.username}` : i18n.ts.none }}</template>
</MkKeyValue>
<FormButton primary class="_formBlock" @click="chooseProxyAccount">{{ i18n.ts.selectAccount }}</FormButton>
</FormSuspense>
</MkSpacer></MkStickyContainer>
<FormButton primary class="_formBlock" @click="chooseProxyAccount">{{ i18n.ts.selectAccount }}</FormButton>
</FormSuspense>
</MkSpacer>
</MkStickyContainer>
</template>
<script lang="ts" setup>
@ -45,7 +47,7 @@ function chooseProxyAccount() {
function save() {
os.apiWithDialog('admin/update-meta', {
proxyAccountId: proxyAccountId,
proxyAccountId,
}).then(() => {
fetchInstance();
});

View file

@ -75,9 +75,9 @@ const pagination = {
endpoint: 'admin/show-users' as const,
limit: 10,
params: computed(() => ({
sort: sort,
state: state,
origin: origin,
sort,
state,
origin,
username: searchUsername,
hostname: searchHost,
})),
@ -103,8 +103,8 @@ async function addUser() {
if (canceled2) return;
os.apiWithDialog('admin/accounts/create', {
username: username,
password: password,
username,
password,
}).then(res => {
paginationComponent.reload();
});

View file

@ -31,9 +31,9 @@ import { onMounted } from 'vue';
import XForm from './auth.form.vue';
import MkSignin from '@/components/signin.vue';
import * as os from '@/os';
import { login } from '@/account';
import { login , $i } from '@/account';
import { i18n } from '@/i18n';
import { $i } from '@/account';
import { query, appendQuery } from '@/scripts/url';
const props = defineProps<{

View file

@ -76,9 +76,9 @@ fetchChannel();
function save() {
const params = {
name: name,
description: description,
bannerId: bannerId,
name,
description,
bannerId,
};
if (props.channelId) {

View file

@ -1,7 +1,7 @@
<template>
<MkStickyContainer>
<template #header><MkPageHeader :actions="headerActions"/></template>
<MkSpacer :content-max="800">
<MkSpacer :content-max="800">
<div v-if="clip">
<div class="okzinsic _panel">
<div v-if="clip.description" class="description">

View file

@ -24,11 +24,11 @@
<script lang="ts" setup>
import { watch } from 'vue';
import XEmoji from './emojis.emoji.vue';
import MkInput from '@/components/form/input.vue';
import MkFolder from '@/components/ui/folder.vue';
import { i18n } from '@/i18n';
import { emojiCategories, instance } from '@/instance';
import XEmoji from './emojis.emoji.vue';
let q: string = $ref('');
let searchEmojis: null | Record<string, any>[] = $ref(null);

View file

@ -28,7 +28,7 @@ function menu(ev) {
action: () => {
copyToClipboard(`:${props.emoji.name}:`);
os.success();
}
},
}], ev.currentTarget ?? ev.target);
}
</script>

View file

@ -71,7 +71,7 @@ const pagination = {
limit: 10,
offsetMode: true,
params: computed(() => ({
sort: sort,
sort,
host: host !== '' ? host : null,
...(
state === 'federating' ? { federating: true } :

View file

@ -69,18 +69,18 @@ async function save() {
if (props.postId) {
await os.apiWithDialog('gallery/posts/update', {
postId: props.postId,
title: title,
description: description,
title,
description,
fileIds: files.map(file => file.id),
isSensitive: isSensitive,
isSensitive,
});
router.push(`/gallery/${props.postId}`);
} else {
const created = await os.apiWithDialog('gallery/posts/create', {
title: title,
description: description,
title,
description,
fileIds: files.map(file => file.id),
isSensitive: isSensitive,
isSensitive,
});
router.push(`/gallery/${created.id}`);
}

View file

@ -1,8 +1,10 @@
<template><MkStickyContainer>
<template>
<MkStickyContainer>
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :content-max="800">
<XNotes :pagination="pagination"/>
</MkSpacer></MkStickyContainer>
<MkSpacer :content-max="800">
<XNotes :pagination="pagination"/>
</MkSpacer>
</MkStickyContainer>
</template>
<script lang="ts" setup>

View file

@ -1,8 +1,10 @@
<template><MkStickyContainer>
<template>
<MkStickyContainer>
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :content-max="800">
<XNotes :pagination="pagination"/>
</MkSpacer></MkStickyContainer>
<MkSpacer :content-max="800">
<XNotes :pagination="pagination"/>
</MkSpacer>
</MkStickyContainer>
</template>
<script lang="ts" setup>

View file

@ -179,8 +179,8 @@ function saveDraft() {
updatedAt: new Date(),
// eslint-disable-next-line id-denylist
data: {
text: text,
file: file,
text,
file,
},
};

View file

@ -2,7 +2,7 @@
<div v-size="{ max: [400, 500] }" class="thvuemwp" :class="{ isMe }">
<MkAvatar class="avatar" :user="message.user" :show-indicator="true"/>
<div class="content">
<div class="balloon" :class="{ noText: message.text == null }" >
<div class="balloon" :class="{ noText: message.text == null }">
<button v-if="isMe" class="delete-button" :title="$ts.delete" @click="del">
<img src="/client-assets/remove.png" alt="Delete"/>
</button>

Some files were not shown because too many files have changed in this diff Show more