chore: ⬆️ up prettier, pnpm

This commit is contained in:
ThatOneCalculator 2023-07-05 18:28:27 -07:00
parent 892610092a
commit e2ff531172
No known key found for this signature in database
GPG key ID: 8703CACD01000000
275 changed files with 888 additions and 781 deletions

View file

@ -6,7 +6,7 @@
"type": "git",
"url": "https://codeberg.org/calckey/calckey.git"
},
"packageManager": "pnpm@8.6.3",
"packageManager": "pnpm@8.6.6",
"private": true,
"scripts": {
"rebuild": "pnpm run clean && pnpm node ./scripts/build-greet.js && pnpm -r run build && pnpm run gulp",

View file

@ -37,7 +37,7 @@ export default async (job: Bull.Job<InboxJobData>): Promise<string> => {
if (!signature?.keyId) {
const err = `Invalid signature: ${signature}`;
job.moveToFailed({message: err});
job.moveToFailed({ message: err });
return err;
}
//#endregion

View file

@ -57,7 +57,7 @@
"matter-js": "0.18.0",
"mfm-js": "0.23.3",
"photoswipe": "5.3.7",
"prettier": "2.8.8",
"prettier": "3.0.0",
"prettier-plugin-vue": "1.1.6",
"prismjs": "1.29.0",
"punycode": "2.1.1",

View file

@ -67,7 +67,7 @@ function send() {
userId: props.user.id,
comment: comment.value,
},
undefined
undefined,
).then((res) => {
os.alert({
type: "success",

View file

@ -19,7 +19,7 @@
0,
1 -
angleDiff(hAngle, angle) / Math.PI -
numbersOpacityFactor
numbersOpacityFactor,
)
"
/>
@ -48,7 +48,7 @@
0,
1 -
angleDiff(hAngle, angle) / Math.PI -
numbersOpacityFactor
numbersOpacityFactor,
)
"
>
@ -151,7 +151,7 @@ const props = withDefaults(
graduations: "dots",
fadeGraduations: true,
sAnimation: "elastic",
}
},
);
const graduationsMajor = computed(() => {
@ -192,7 +192,7 @@ let sOneRound = false;
function tick() {
const now = new Date();
now.setMinutes(
now.getMinutes() + (new Date().getTimezoneOffset() + props.offset)
now.getMinutes() + (new Date().getTimezoneOffset() + props.offset),
);
s = now.getSeconds();
m = now.getMinutes();
@ -225,7 +225,7 @@ function calcColors() {
const computedStyle = getComputedStyle(document.documentElement);
const dark = tinycolor(computedStyle.getPropertyValue("--bg")).isDark();
const accent = tinycolor(
computedStyle.getPropertyValue("--accent")
computedStyle.getPropertyValue("--accent"),
).toHexString();
majorGraduationColor = dark
? "rgba(255, 255, 255, 0.3)"
@ -233,7 +233,7 @@ function calcColors() {
//minorGraduationColor = dark ? 'rgba(255, 255, 255, 0.2)' : 'rgba(0, 0, 0, 0.2)';
sHandColor = dark ? "rgba(255, 255, 255, 0.5)" : "rgba(0, 0, 0, 0.3)";
mHandColor = tinycolor(
computedStyle.getPropertyValue("--fg")
computedStyle.getPropertyValue("--fg"),
).toHexString();
hHandColor = accent;
nowColor = accent;

View file

@ -268,7 +268,7 @@ function exec() {
} else if (props.type === "hashtag") {
if (!props.q || props.q === "") {
hashtags.value = JSON.parse(
localStorage.getItem("hashtags") || "[]"
localStorage.getItem("hashtags") || "[]",
);
fetching.value = false;
} else {
@ -288,7 +288,7 @@ function exec() {
//
sessionStorage.setItem(
cacheKey,
JSON.stringify(searchedHashtags)
JSON.stringify(searchedHashtags),
);
});
}
@ -298,7 +298,7 @@ function exec() {
// 使
emojis.value = defaultStore.state.recentlyUsedEmojis
.map((emoji) =>
emojiDb.find((dbEmoji) => dbEmoji.emoji === emoji)
emojiDb.find((dbEmoji) => dbEmoji.emoji === emoji),
)
.filter((x) => x) as EmojiDef[];
return;
@ -450,7 +450,7 @@ onMounted(() => {
nextTick(() => {
exec();
});
}
},
);
});
});
@ -470,7 +470,9 @@ onBeforeUnmount(() => {
max-width: 100%;
margin-top: calc(1em + 8px);
overflow: hidden;
transition: top 0.1s ease, left 0.1s ease;
transition:
top 0.1s ease,
left 0.1s ease;
> ol {
display: block;

View file

@ -90,7 +90,7 @@ function onMousedown(evt: MouseEvent): void {
target.clientWidth,
target.clientHeight,
circleCenterX,
circleCenterY
circleCenterY,
);
window.setTimeout(() => {

View file

@ -25,7 +25,7 @@ type Captcha = {
| "expired-callback"
| "error-callback"
| "endpoint"]?: unknown;
}
},
): string;
remove(id: string): void;
execute(id: string): void;
@ -78,7 +78,7 @@ const src = computed(() => {
});
const captcha = computed<Captcha>(
() => window[variable.value] || ({} as unknown as Captcha)
() => window[variable.value] || ({} as unknown as Captcha),
);
if (loaded) {
@ -91,7 +91,7 @@ if (loaded) {
async: true,
id: props.provider,
src: src.value,
})
}),
)
).addEventListener("load", () => (available.value = true));
}

View file

@ -34,7 +34,7 @@ const props = withDefaults(
}>(),
{
full: false,
}
},
);
const isFollowing = ref<boolean>(props.channel.isFollowing);

View file

@ -35,7 +35,7 @@ const props = withDefaults(
}>(),
{
extractor: (item) => item,
}
},
);
</script>

View file

@ -91,7 +91,7 @@ Chart.register(
Tooltip,
SubTitle,
Filler,
zoomPlugin
zoomPlugin,
//gradient,
);
@ -179,11 +179,11 @@ const render = () => {
//
Chart.defaults.color = getComputedStyle(
document.documentElement
document.documentElement,
).getPropertyValue("--fg");
const maxes = chartData.series.map((x, i) =>
Math.max(...x.data.map((d) => d.y))
Math.max(...x.data.map((d) => d.y)),
);
chartInstance = new Chart(chartEl.value, {
@ -471,9 +471,9 @@ const fetchNotesChart = async (type: string): Promise<typeof chartData> => {
raw.local.inc,
negate(raw.local.dec),
raw.remote.inc,
negate(raw.remote.dec)
negate(raw.remote.dec),
)
: sum(raw[type].inc, negate(raw[type].dec))
: sum(raw[type].inc, negate(raw[type].dec)),
),
color: "#888888",
},
@ -483,7 +483,7 @@ const fetchNotesChart = async (type: string): Promise<typeof chartData> => {
data: format(
type === "combined"
? sum(raw.local.diffs.renote, raw.remote.diffs.renote)
: raw[type].diffs.renote
: raw[type].diffs.renote,
),
color: colors.green,
},
@ -493,7 +493,7 @@ const fetchNotesChart = async (type: string): Promise<typeof chartData> => {
data: format(
type === "combined"
? sum(raw.local.diffs.reply, raw.remote.diffs.reply)
: raw[type].diffs.reply
: raw[type].diffs.reply,
),
color: colors.yellow,
},
@ -503,7 +503,7 @@ const fetchNotesChart = async (type: string): Promise<typeof chartData> => {
data: format(
type === "combined"
? sum(raw.local.diffs.normal, raw.remote.diffs.normal)
: raw[type].diffs.normal
: raw[type].diffs.normal,
),
color: colors.blue,
},
@ -514,9 +514,9 @@ const fetchNotesChart = async (type: string): Promise<typeof chartData> => {
type === "combined"
? sum(
raw.local.diffs.withFile,
raw.remote.diffs.withFile
raw.remote.diffs.withFile,
)
: raw[type].diffs.withFile
: raw[type].diffs.withFile,
),
color: colors.purple,
},
@ -567,8 +567,8 @@ const fetchUsersChart = async (total: boolean): Promise<typeof chartData> => {
raw.local.inc,
negate(raw.local.dec),
raw.remote.inc,
negate(raw.remote.dec)
)
negate(raw.remote.dec),
),
),
},
{
@ -577,7 +577,7 @@ const fetchUsersChart = async (total: boolean): Promise<typeof chartData> => {
data: format(
total
? raw.local.total
: sum(raw.local.inc, negate(raw.local.dec))
: sum(raw.local.inc, negate(raw.local.dec)),
),
},
{
@ -586,7 +586,7 @@ const fetchUsersChart = async (total: boolean): Promise<typeof chartData> => {
data: format(
total
? raw.remote.total
: sum(raw.remote.inc, negate(raw.remote.dec))
: sum(raw.remote.inc, negate(raw.remote.dec)),
),
},
],
@ -675,8 +675,8 @@ const fetchDriveChart = async (): Promise<typeof chartData> => {
raw.local.incSize,
negate(raw.local.decSize),
raw.remote.incSize,
negate(raw.remote.decSize)
)
negate(raw.remote.decSize),
),
),
},
{
@ -719,8 +719,8 @@ const fetchDriveFilesChart = async (): Promise<typeof chartData> => {
raw.local.incCount,
negate(raw.local.decCount),
raw.remote.incCount,
negate(raw.remote.decCount)
)
negate(raw.remote.decCount),
),
),
},
{
@ -778,7 +778,7 @@ const fetchInstanceRequestsChart = async (): Promise<typeof chartData> => {
};
const fetchInstanceUsersChart = async (
total: boolean
total: boolean,
): Promise<typeof chartData> => {
const raw = await os.apiGet("charts/instance", {
host: props.args.host,
@ -794,7 +794,7 @@ const fetchInstanceUsersChart = async (
data: format(
total
? raw.users.total
: sum(raw.users.inc, negate(raw.users.dec))
: sum(raw.users.inc, negate(raw.users.dec)),
),
},
],
@ -802,7 +802,7 @@ const fetchInstanceUsersChart = async (
};
const fetchInstanceNotesChart = async (
total: boolean
total: boolean,
): Promise<typeof chartData> => {
const raw = await os.apiGet("charts/instance", {
host: props.args.host,
@ -818,7 +818,7 @@ const fetchInstanceNotesChart = async (
data: format(
total
? raw.notes.total
: sum(raw.notes.inc, negate(raw.notes.dec))
: sum(raw.notes.inc, negate(raw.notes.dec)),
),
},
],
@ -826,7 +826,7 @@ const fetchInstanceNotesChart = async (
};
const fetchInstanceFfChart = async (
total: boolean
total: boolean,
): Promise<typeof chartData> => {
const raw = await os.apiGet("charts/instance", {
host: props.args.host,
@ -842,7 +842,7 @@ const fetchInstanceFfChart = async (
data: format(
total
? raw.following.total
: sum(raw.following.inc, negate(raw.following.dec))
: sum(raw.following.inc, negate(raw.following.dec)),
),
},
{
@ -852,7 +852,7 @@ const fetchInstanceFfChart = async (
data: format(
total
? raw.followers.total
: sum(raw.followers.inc, negate(raw.followers.dec))
: sum(raw.followers.inc, negate(raw.followers.dec)),
),
},
],
@ -860,7 +860,7 @@ const fetchInstanceFfChart = async (
};
const fetchInstanceDriveUsageChart = async (
total: boolean
total: boolean,
): Promise<typeof chartData> => {
const raw = await os.apiGet("charts/instance", {
host: props.args.host,
@ -877,7 +877,7 @@ const fetchInstanceDriveUsageChart = async (
data: format(
total
? raw.drive.totalUsage
: sum(raw.drive.incUsage, negate(raw.drive.decUsage))
: sum(raw.drive.incUsage, negate(raw.drive.decUsage)),
),
},
],
@ -885,7 +885,7 @@ const fetchInstanceDriveUsageChart = async (
};
const fetchInstanceDriveFilesChart = async (
total: boolean
total: boolean,
): Promise<typeof chartData> => {
const raw = await os.apiGet("charts/instance", {
host: props.args.host,
@ -901,7 +901,7 @@ const fetchInstanceDriveFilesChart = async (
data: format(
total
? raw.drive.totalFiles
: sum(raw.drive.incFiles, negate(raw.drive.decFiles))
: sum(raw.drive.incFiles, negate(raw.drive.decFiles)),
),
},
],

View file

@ -11,7 +11,7 @@
message.groupId
? `/my/messaging/group/${message.groupId}`
: `/my/messaging/${getAcct(
isMe(message) ? message.recipient : message.user
isMe(message) ? message.recipient : message.user,
)}`
"
>

View file

@ -18,13 +18,13 @@ const props = defineProps<{
}>();
const prismLang = computed(() =>
Prism.languages[props.lang] ? props.lang : "js"
Prism.languages[props.lang] ? props.lang : "js",
);
const html = computed(() =>
Prism.highlight(
props.code,
Prism.languages[prismLang.value],
prismLang.value
)
prismLang.value,
),
);
</script>

View file

@ -12,6 +12,6 @@ defineProps<{
}>();
const XCode = defineAsyncComponent(
() => import("@/components/MkCode.core.vue")
() => import("@/components/MkCode.core.vue"),
);
</script>

View file

@ -125,7 +125,7 @@ export default defineComponent({
},
{
immediate: true,
}
},
);
this.$el.style.setProperty("--maxHeight", this.maxHeight + "px");
@ -174,7 +174,9 @@ export default defineComponent({
.container-toggle-enter-active,
.container-toggle-leave-active {
overflow-y: hidden;
transition: opacity 0.5s, height 0.5s !important;
transition:
opacity 0.5s,
height 0.5s !important;
}
.container-toggle-enter-from {
opacity: 0;

View file

@ -80,7 +80,8 @@ function onMousedown(evt: Event) {
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
transition:
opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
transform-origin: left top;
}

View file

@ -118,7 +118,7 @@ onMounted(() => {
const selection = cropper.getCropperSelection()!;
selection.themeColor = tinycolor(
computedStyle.getPropertyValue("--accent")
computedStyle.getPropertyValue("--accent"),
).toHexString();
selection.aspectRatio = props.aspectRatio;
selection.initialAspectRatio = props.aspectRatio;

View file

@ -63,7 +63,9 @@ defineExpose({
> span {
background: var(--cwBg) !important;
color: var(--cwFg);
transition: background 0.2s, color 0.2s;
transition:
background 0.2s,
color 0.2s;
> span {
font-weight: 500;
&::before {

View file

@ -84,8 +84,8 @@ export default defineComponent({
class: "ph-caret-down ph-bold ph-lg icon",
}),
]),
]
)
],
),
);
return [el, separator];
@ -119,7 +119,7 @@ export default defineComponent({
: {
class: "sqadhkmv" + (props.noGap ? " noGap" : ""),
},
{ default: renderChildren }
{ default: renderChildren },
);
},
});
@ -140,7 +140,8 @@ export default defineComponent({
}
> .list-enter-active {
transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1),
transition:
transform 0.7s cubic-bezier(0.23, 1, 0.32, 1),
opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

View file

@ -78,14 +78,24 @@
okButtonDisabled &&
disabledReason === 'charactersExceeded'
"
v-text="i18n.t('_dialog.charactersExceeded', { current: (inputValue as string).length, max: input.maxLength ?? 'NaN' })"
v-text="
i18n.t('_dialog.charactersExceeded', {
current: (inputValue as string).length,
max: input.maxLength ?? 'NaN',
})
"
/>
<span
v-else-if="
okButtonDisabled &&
disabledReason === 'charactersBelow'
"
v-text="i18n.t('_dialog.charactersBelow', { current: (inputValue as string).length, min: input.minLength ?? 'NaN' })"
v-text="
i18n.t('_dialog.charactersBelow', {
current: (inputValue as string).length,
min: input.minLength ?? 'NaN',
})
"
/>
</template>
<template v-if="input.type === 'search'" #suffix>
@ -258,7 +268,7 @@ const props = withDefaults(
isYesNo: false,
cancelableByBgClick: true,
}
},
);
const emit = defineEmits<{
@ -272,7 +282,7 @@ const inputValue = ref<string | number | null>(props.input?.default ?? null);
const selectedValue = ref(props.select?.default ?? null);
let disabledReason = $ref<null | "charactersExceeded" | "charactersBelow">(
null
null,
);
const okButtonDisabled = $computed<boolean>(() => {
if (props.input) {
@ -439,7 +449,7 @@ async function openSearchFilters(ev) {
},
],
ev.target,
{ noReturnFocus: true }
{ noReturnFocus: true },
);
inputEl.value.focus();
inputEl.value.selectRange(inputValue.value.length, inputValue.value.length); // cursor at end

View file

@ -23,7 +23,7 @@ const props = withDefaults(
showS: true,
showMs: false,
offset: 0 - new Date().getTimezoneOffset(),
}
},
);
let intervalId;
@ -45,7 +45,7 @@ watch(showColon, (v) => {
const tick = () => {
const now = new Date();
now.setMinutes(
now.getMinutes() + (new Date().getTimezoneOffset() + props.offset)
now.getMinutes() + (new Date().getTimezoneOffset() + props.offset),
);
hh.value = now.getHours().toString().padStart(2, "0");
mm.value = now.getMinutes().toString().padStart(2, "0");
@ -65,7 +65,7 @@ watch(
if (intervalId) window.clearInterval(intervalId);
intervalId = window.setInterval(tick, props.showMs ? 10 : 1000);
},
{ immediate: true }
{ immediate: true },
);
onUnmounted(() => {

View file

@ -56,7 +56,7 @@ const props = withDefaults(
{
isSelected: false,
selectMode: false,
}
},
);
const emit = defineEmits<{
@ -68,7 +68,7 @@ const emit = defineEmits<{
const isDragging = ref(false);
const title = computed(
() => `${props.file.name}\n${props.file.type} ${bytes(props.file.size)}`
() => `${props.file.name}\n${props.file.type} ${bytes(props.file.size)}`,
);
function getMenu() {
@ -124,7 +124,7 @@ function onClick(ev: MouseEvent) {
getMenu(),
(ev.currentTarget ?? ev.target ?? undefined) as
| HTMLElement
| undefined
| undefined,
);
}
}
@ -138,7 +138,7 @@ function onDragstart(ev: DragEvent) {
ev.dataTransfer.effectAllowed = "move";
ev.dataTransfer.setData(
_DATA_TRANSFER_DRIVE_FILE_,
JSON.stringify(props.file)
JSON.stringify(props.file),
);
}
isDragging.value = true;
@ -186,7 +186,7 @@ function describe() {
});
},
},
"closed"
"closed",
);
}

View file

@ -52,7 +52,7 @@ const props = withDefaults(
{
isSelected: false,
selectMode: false,
}
},
);
const emit = defineEmits<{
@ -184,7 +184,7 @@ function onDragstart(ev: DragEvent) {
ev.dataTransfer.effectAllowed = "move";
ev.dataTransfer.setData(
_DATA_TRANSFER_DRIVE_FOLDER_,
JSON.stringify(props.folder)
JSON.stringify(props.folder),
);
isDragging.value = true;
@ -256,13 +256,13 @@ function onContextmenu(ev: MouseEvent) {
action: () => {
os.popup(
defineAsyncComponent(
() => import("@/components/MkDriveWindow.vue")
() => import("@/components/MkDriveWindow.vue"),
),
{
initialFolder: props.folder,
},
{},
"closed"
"closed",
);
},
},
@ -280,7 +280,7 @@ function onContextmenu(ev: MouseEvent) {
action: deleteFolder,
},
],
ev
ev,
);
}
</script>

View file

@ -29,7 +29,7 @@ const emit = defineEmits<{
(
ev: "upload",
file: File,
folder?: Misskey.entities.DriveFolder | null
folder?: Misskey.entities.DriveFolder | null,
): void;
(ev: "removeFile", v: Misskey.entities.DriveFile["id"]): void;
(ev: "removeFolder", v: Misskey.entities.DriveFolder["id"]): void;

View file

@ -161,17 +161,17 @@ const props = withDefaults(
{
multiple: false,
select: null,
}
},
);
const emit = defineEmits<{
(
ev: "selected",
v: Misskey.entities.DriveFile | Misskey.entities.DriveFolder
v: Misskey.entities.DriveFile | Misskey.entities.DriveFolder,
): void;
(
ev: "change-selection",
v: Misskey.entities.DriveFile[] | Misskey.entities.DriveFolder[]
v: Misskey.entities.DriveFile[] | Misskey.entities.DriveFolder[],
): void;
(ev: "move-root"): void;
(ev: "cd", v: Misskey.entities.DriveFolder | null): void;
@ -207,7 +207,7 @@ const ilFilesObserver = new IntersectionObserver(
entries.some((entry) => entry.isIntersecting) &&
!fetching.value &&
moreFiles.value &&
fetchMoreFiles()
fetchMoreFiles(),
);
watch(folder, () => emit("cd", folder.value));
@ -230,13 +230,13 @@ function onStreamDriveFileDeleted(fileId: string) {
}
function onStreamDriveFolderCreated(
createdFolder: Misskey.entities.DriveFolder
createdFolder: Misskey.entities.DriveFolder,
) {
addFolder(createdFolder, true);
}
function onStreamDriveFolderUpdated(
updatedFolder: Misskey.entities.DriveFolder
updatedFolder: Misskey.entities.DriveFolder,
) {
const current = folder.value ? folder.value.id : null;
if (current !== updatedFolder.parentId) {
@ -433,7 +433,7 @@ function onChangeFileInput() {
function upload(
file: File,
folderToUpload?: Misskey.entities.DriveFolder | null
folderToUpload?: Misskey.entities.DriveFolder | null,
) {
uploadFile(
file,
@ -441,7 +441,7 @@ function upload(
? folderToUpload.id
: null,
undefined,
keepOriginal.value
keepOriginal.value,
).then((res) => {
addFile(res, true);
});
@ -452,7 +452,7 @@ function chooseFile(file: Misskey.entities.DriveFile) {
if (props.multiple) {
if (isAlreadySelected) {
selectedFiles.value = selectedFiles.value.filter(
(f) => f.id !== file.id
(f) => f.id !== file.id,
);
} else {
selectedFiles.value.push(file);
@ -470,12 +470,12 @@ function chooseFile(file: Misskey.entities.DriveFile) {
function chooseFolder(folderToChoose: Misskey.entities.DriveFolder) {
const isAlreadySelected = selectedFolders.value.some(
(f) => f.id === folderToChoose.id
(f) => f.id === folderToChoose.id,
);
if (props.multiple) {
if (isAlreadySelected) {
selectedFolders.value = selectedFolders.value.filter(
(f) => f.id !== folderToChoose.id
(f) => f.id !== folderToChoose.id,
);
} else {
selectedFolders.value.push(folderToChoose);
@ -707,7 +707,7 @@ function getMenu() {
icon: "ph-trash ph-bold ph-lg",
action: () => {
deleteFolder(
folder.value as Misskey.entities.DriveFolder
folder.value as Misskey.entities.DriveFolder,
);
},
}
@ -725,7 +725,7 @@ function getMenu() {
function showMenu(ev: MouseEvent) {
os.popupMenu(
getMenu(),
(ev.currentTarget ?? ev.target ?? undefined) as HTMLElement | undefined
(ev.currentTarget ?? ev.target ?? undefined) as HTMLElement | undefined,
);
}

View file

@ -50,7 +50,7 @@ withDefaults(
}>(),
{
type: "file",
}
},
);
const emit = defineEmits<{

View file

@ -16,7 +16,7 @@
class="_button"
@click.stop="
applyUnicodeSkinTone(
props.skinTones.indexOf(skinTone) + 1
props.skinTones.indexOf(skinTone) + 1,
)
"
>
@ -83,7 +83,7 @@ watch(
() => props.emojis,
(newVal) => {
localEmojis.value = [...newVal];
}
},
);
</script>

View file

@ -191,7 +191,7 @@ const props = withDefaults(
}>(),
{
showPinned: true,
}
},
);
const emit = defineEmits<{
@ -229,13 +229,13 @@ const unicodeEmojiSkinToneLabels = [
];
const size = computed(() =>
props.asReactionPicker ? reactionPickerSize.value : 1
props.asReactionPicker ? reactionPickerSize.value : 1,
);
const width = computed(() =>
props.asReactionPicker ? reactionPickerWidth.value : 3
props.asReactionPicker ? reactionPickerWidth.value : 3,
);
const height = computed(() =>
props.asReactionPicker ? reactionPickerHeight.value : 2
props.asReactionPicker ? reactionPickerHeight.value : 2,
);
const customEmojiCategories = emojiCategories;
const customEmojis = instance.emojis;
@ -283,8 +283,8 @@ watch(q, () => {
(keyword) =>
emoji.name.includes(keyword) ||
emoji.aliases.some((alias) =>
alias.includes(keyword)
)
alias.includes(keyword),
),
)
) {
matches.add(emoji);
@ -355,8 +355,8 @@ watch(q, () => {
(keyword) =>
emoji.slug.includes(keyword) ||
emoji.keywords?.some((alias) =>
alias.includes(keyword)
)
alias.includes(keyword),
),
)
) {
matches.add(emoji);
@ -419,7 +419,7 @@ function reset() {
}
function getKey(
emoji: string | Misskey.entities.CustomEmoji | UnicodeEmojiDef
emoji: string | Misskey.entities.CustomEmoji | UnicodeEmojiDef,
): string {
return typeof emoji === "string" ? emoji : emoji.emoji || `:${emoji.name}:`;
}
@ -465,7 +465,7 @@ function done(query?: any): boolean | void {
return true;
}
const exactMatchUnicode = emojilist.find(
(emoji) => emoji.emoji === q2 || emoji.slug === q2
(emoji) => emoji.emoji === q2 || emoji.slug === q2,
);
if (exactMatchUnicode) {
chosen(exactMatchUnicode);

View file

@ -47,7 +47,7 @@ withDefaults(
manualShowing: null,
showPinned: true,
asReactionPicker: false,
}
},
);
const emit = defineEmits<{

View file

@ -11,7 +11,7 @@
:key="file.id"
v-tooltip.mfm="
`${file.type}\n${bytes(file.size)}\n${new Date(
file.createdAt
file.createdAt,
).toLocaleString()}\nby ${
file.user ? '@' + Acct.toString(file.user) : 'system'
}`

View file

@ -56,7 +56,7 @@ export default defineComponent({
this.persistKey &&
localStorage.getItem(localStoragePrefix + this.persistKey)
? localStorage.getItem(
localStoragePrefix + this.persistKey
localStoragePrefix + this.persistKey,
) === "t"
: this.expanded,
};
@ -66,7 +66,7 @@ export default defineComponent({
if (this.persistKey) {
localStorage.setItem(
localStoragePrefix + this.persistKey,
this.showBody ? "t" : "f"
this.showBody ? "t" : "f",
);
}
},
@ -85,9 +85,9 @@ export default defineComponent({
const bg = tinycolor(
rawBg.startsWith("var(")
? getComputedStyle(document.documentElement).getPropertyValue(
rawBg.slice(4, -1)
rawBg.slice(4, -1),
)
: rawBg
: rawBg,
);
bg.setAlpha(0.85);
this.bg = bg.toRgbString();
@ -123,7 +123,9 @@ export default defineComponent({
.folder-toggle-enter-active,
.folder-toggle-leave-active {
overflow-y: hidden;
transition: opacity 0.5s, height 0.5s !important;
transition:
opacity 0.5s,
height 0.5s !important;
}
.folder-toggle-enter-from {
opacity: 0;

View file

@ -83,7 +83,7 @@ const props = withDefaults(
{
full: false,
large: false,
}
},
);
const isBlocking = computed(() => props.user.isBlocking);
@ -92,7 +92,7 @@ let state = $ref(i18n.ts.processing);
let isFollowing = $ref(props.user.isFollowing);
let hasPendingFollowRequestFromYou = $ref(
props.user.hasPendingFollowRequestFromYou
props.user.hasPendingFollowRequestFromYou,
);
let wait = $ref(false);
const connection = stream.useChannel("main");
@ -166,7 +166,7 @@ async function onClick() {
function menu(ev) {
os.popupMenu(
getUserMenu(props.user, router),
ev.currentTarget ?? ev.target
ev.currentTarget ?? ev.target,
);
}

View file

@ -18,7 +18,7 @@
<div class="xkpnjxcv _formRoot">
<template
v-for="item in Object.keys(form).filter(
(item) => !form[item].hidden
(item) => !form[item].hidden,
)"
>
<FormInput

View file

@ -9,7 +9,7 @@ import * as os from "@/os";
export default defineComponent({
components: {
XFormula: defineAsyncComponent(
() => import("@/components/MkFormulaCore.vue")
() => import("@/components/MkFormulaCore.vue"),
),
},
props: {

View file

@ -21,7 +21,7 @@ const query = ref(props.q);
const search = () => {
window.open(
`https://search.annoyingorange.xyz/search?q=${query.value}`,
"_blank"
"_blank",
);
};
</script>

View file

@ -259,7 +259,7 @@ watch(
() => {
fetching = true;
renderChart();
}
},
);
onMounted(async () => {

View file

@ -36,7 +36,7 @@ const props = withDefaults(
defineProps<{
image: misskey.entities.DriveFile;
}>(),
{}
{},
);
const emit = defineEmits<{

View file

@ -40,7 +40,7 @@ const props = withDefaults(
title: null,
size: 64,
cover: true,
}
},
);
const canvas = $ref<HTMLCanvasElement>();

View file

@ -95,7 +95,7 @@ const search = () => {
id: x.id,
host: x.host,
iconUrl: x.iconUrl,
} as Instance)
}) as Instance,
);
});
};

View file

@ -138,7 +138,7 @@ function createDoughnut(chartEl, tooltip, data) {
{
backgroundColor: data.map((x) => x.color),
borderColor: getComputedStyle(
document.documentElement
document.documentElement,
).getPropertyValue("--panel"),
borderWidth: 2,
hoverOffset: 0,
@ -161,7 +161,7 @@ function createDoughnut(chartEl, tooltip, data) {
ev,
"nearest",
{ intersect: true },
false
false,
)[0];
if (hit && data[hit.index].onClick) {
data[hit.index].onClick();
@ -206,7 +206,7 @@ onMounted(() => {
color: "#80808080",
value: fedStats.otherFollowersCount,
},
])
]),
);
createDoughnut(
@ -227,7 +227,7 @@ onMounted(() => {
color: "#80808080",
value: fedStats.otherFollowingCount,
},
])
]),
);
});
});

View file

@ -32,7 +32,7 @@ const instance = props.instance ?? {
name: instanceName,
themeColor: (
document.querySelector(
'meta[name="theme-color-orig"]'
'meta[name="theme-color-orig"]',
) as HTMLMetaElement
)?.content,
softwareName: Instance.softwareName || "Calckey",
@ -86,8 +86,11 @@ function getInstanceIcon(instance): string {
font-weight: bold;
text-overflow: ellipsis;
white-space: nowrap;
text-shadow: -1px -1px 0 var(--bg), 1px -1px 0 var(--bg),
-1px 1px 0 var(--bg), 1px 1px 0 var(--bg);
text-shadow:
-1px -1px 0 var(--bg),
1px -1px 0 var(--bg),
-1px 1px 0 var(--bg),
1px 1px 0 var(--bg);
.article > .main &,
.header > .body & {
display: unset;

View file

@ -32,7 +32,7 @@ const props = withDefaults(
{
copy: null,
oneline: false,
}
},
);
const copy_ = () => {

View file

@ -78,7 +78,7 @@ const props = withDefaults(
}>(),
{
anchor: () => ({ x: "right", y: "center" }),
}
},
);
const emit = defineEmits<{

View file

@ -28,7 +28,7 @@ const props = withDefaults(
url: string;
rel?: null | string;
}>(),
{}
{},
);
const self = props.url.startsWith(local);
@ -40,7 +40,7 @@ const el = $ref();
useTooltip($$(el), (showing) => {
os.popup(
defineAsyncComponent(
() => import("@/components/MkUrlPreviewPopup.vue")
() => import("@/components/MkUrlPreviewPopup.vue"),
),
{
showing,
@ -48,7 +48,7 @@ useTooltip($$(el), (showing) => {
source: el,
},
{},
"closed"
"closed",
);
});
</script>

View file

@ -63,9 +63,9 @@ export default {
: undefined,
},
},
$slots.default()
)
)
$slots.default(),
),
),
),
]);
},

View file

@ -103,7 +103,8 @@ const plyrMini = ref(false);
const url =
props.raw || defaultStore.state.loadRawImages
? props.media.url
: defaultStore.state.disableShowingAnimatedImages && props.media.type.startsWith('image')
: defaultStore.state.disableShowingAnimatedImages &&
props.media.type.startsWith("image")
? getStaticImageUrl(props.media.thumbnailUrl)
: props.media.thumbnailUrl;
@ -127,7 +128,7 @@ watch(
{
deep: true,
immediate: true,
}
},
);
onMounted(() => {

View file

@ -67,7 +67,7 @@ const props = withDefaults(
defineProps<{
media: misskey.entities.DriveFile;
}>(),
{}
{},
);
const audioEl = $ref<HTMLAudioElement | null>();

View file

@ -184,10 +184,10 @@ export default defineComponent({
caption() {
const img = document.getElementById(
"imgtocaption"
"imgtocaption",
) as HTMLImageElement;
const ta = document.getElementById(
"captioninput"
"captioninput",
) as HTMLTextAreaElement;
os.api("drive/files/caption-image", {
url: img.src,

View file

@ -14,7 +14,7 @@
<div ref="gallery" @click.stop>
<XMedia
v-for="media in mediaList.filter((media) =>
previewable(media)
previewable(media),
)"
:key="media.id"
:class="{ image: media.type.startsWith('image') }"
@ -177,7 +177,7 @@ const previewable = (file: misskey.entities.DriveFile): boolean => {
);
};
const previewableCount = props.mediaList.filter((media) =>
previewable(media)
previewable(media),
).length;
</script>

View file

@ -251,7 +251,7 @@ watch(
() => props.items,
() => {
const items: (MenuItem | MenuPending)[] = [...props.items].filter(
(item) => item !== undefined
(item) => item !== undefined,
);
for (let i = 0; i < items.length; i++) {
@ -270,7 +270,7 @@ watch(
},
{
immediate: true,
}
},
);
let childMenu = $ref<MenuItem[] | null>();

View file

@ -43,7 +43,7 @@ let headX = $ref<number | null>(null);
let headY = $ref<number | null>(null);
let clock = $ref<number | null>(null);
const accent = tinycolor(
getComputedStyle(document.documentElement).getPropertyValue("--accent")
getComputedStyle(document.documentElement).getPropertyValue("--accent"),
);
const color = accent.toRgbString();

View file

@ -116,7 +116,7 @@ const props = withDefaults(
noOverlap: true,
transparentBg: false,
noReturnFocus: false,
}
},
);
const emit = defineEmits<{
@ -153,7 +153,7 @@ const type = $computed<ModalTypes>(() => {
}
});
const isEnableBgTransparent = $computed(
() => props.transparentBg && type === "popup"
() => props.transparentBg && type === "popup",
);
let transitionName = $computed(() =>
defaultStore.state.animation
@ -164,7 +164,7 @@ let transitionName = $computed(() =>
: type === "popup"
? "modal-popup"
: "modal"
: ""
: "",
);
let transitionDuration = $computed(() =>
transitionName === "send"
@ -175,7 +175,7 @@ let transitionDuration = $computed(() =>
? 200
: transitionName === "modal-drawer"
? 200
: 0
: 0,
);
let contentClicking = false;
@ -359,10 +359,10 @@ const onOpened = () => {
contentClicking = false;
}, 100);
},
{ passive: true, once: true }
{ passive: true, once: true },
);
},
{ passive: true }
{ passive: true },
);
// if (props.preferType == "dialog") {
// history.pushState(null, "", location.href);
@ -384,7 +384,7 @@ onMounted(() => {
align();
},
{ immediate: true }
{ immediate: true },
);
nextTick(() => {
@ -414,7 +414,8 @@ defineExpose({
> .content {
transform: translateY(0px);
transition: opacity 0.3s ease-in,
transition:
opacity 0.3s ease-in,
transform 0.3s cubic-bezier(0.5, -0.5, 1, 0.5) !important;
}
}
@ -439,7 +440,9 @@ defineExpose({
> .content {
transform-origin: var(--transformOrigin);
transition: opacity 0.2s, transform 0.2s !important;
transition:
opacity 0.2s,
transform 0.2s !important;
}
}
.transition_modal_enterFrom,
@ -464,7 +467,8 @@ defineExpose({
> .content {
transform-origin: var(--transformOrigin);
transition: opacity 0.2s cubic-bezier(0, 0, 0.2, 1),
transition:
opacity 0.2s cubic-bezier(0, 0, 0.2, 1),
transform 0.2s cubic-bezier(0, 0, 0.2, 1) !important;
}
}

View file

@ -80,7 +80,7 @@ const props = withDefaults(
width: 400,
height: null,
scroll: true,
}
},
);
const emit = defineEmits<{

View file

@ -128,8 +128,15 @@
</div>
</div>
</div>
<div v-if="detailedView || (appearNote.channel && !inChannel)" class="info">
<MkA v-if="detailedView" class="created-at" :to="notePage(appearNote)">
<div
v-if="detailedView || (appearNote.channel && !inChannel)"
class="info"
>
<MkA
v-if="detailedView"
class="created-at"
:to="notePage(appearNote)"
>
<MkTime :time="appearNote.createdAt" mode="absolute" />
</MkA>
<MkA
@ -173,7 +180,7 @@
:count="
Object.values(appearNote.reactions).reduce(
(partialSum, val) => partialSum + val,
0
0,
)
"
:reacted="appearNote.myReaction != null"
@ -332,7 +339,7 @@ const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
const renoteTime = ref<HTMLElement>();
const reactButton = ref<HTMLElement>();
let appearNote = $computed(() =>
isRenote ? (note.renote as misskey.entities.Note) : note
isRenote ? (note.renote as misskey.entities.Note) : note,
);
const isMyRenote = $i && $i.id === note.userId;
const showContent = ref(false);
@ -369,7 +376,7 @@ function reply(viaKeyboard = false): void {
},
() => {
focus();
}
},
);
}
@ -386,7 +393,7 @@ function react(viaKeyboard = false): void {
},
() => {
focus();
}
},
);
}
@ -400,7 +407,7 @@ function undoReact(note): void {
const currentClipPage = inject<Ref<misskey.entities.Clip> | null>(
"currentClipPage",
null
null,
);
function onContextmenu(ev: MouseEvent): void {
@ -466,7 +473,7 @@ function onContextmenu(ev: MouseEvent): void {
}
: undefined,
],
ev
ev,
);
}
}
@ -484,7 +491,7 @@ function menu(viaKeyboard = false): void {
menuButton.value,
{
viaKeyboard,
}
},
).then(focus);
}
@ -507,7 +514,7 @@ function showRenoteMenu(viaKeyboard = false): void {
renoteTime.value,
{
viaKeyboard: viaKeyboard,
}
},
);
}

View file

@ -233,7 +233,7 @@ let isScrolling;
const reactionsCount = Object.values(props.note.reactions).reduce(
(x, y) => x + y,
0
0,
);
const keymap = {
@ -274,7 +274,7 @@ function react(viaKeyboard = false): void {
},
() => {
focus();
}
},
);
}
@ -308,7 +308,7 @@ function onContextmenu(ev: MouseEvent): void {
menuButton,
isDeleted,
}),
ev
ev,
).then(focus);
}
}
@ -325,7 +325,7 @@ function menu(viaKeyboard = false): void {
menuButton.value,
{
viaKeyboard,
}
},
).then(focus);
}
@ -551,7 +551,9 @@ onUnmounted(() => {
background: var(--panelHighlight);
border-radius: var(--radius);
opacity: 0;
transition: opacity 0.2s, background 0.2s;
transition:
opacity 0.2s,
background 0.2s;
z-index: -1;
}
&.reply-to {

View file

@ -23,10 +23,10 @@
v-tooltip.noDelay="
i18n.t('edited', {
date: new Date(
note.updatedAt
note.updatedAt,
).toLocaleDateString(),
time: new Date(
note.updatedAt
note.updatedAt,
).toLocaleTimeString(),
})
"

View file

@ -85,7 +85,7 @@
:count="
Object.values(appearNote.reactions).reduce(
(partialSum, val) => partialSum + val,
0
0,
)
"
:reacted="appearNote.myReaction != null"
@ -220,7 +220,7 @@ const props = withDefaults(
{
depth: 1,
replyLevel: 1,
}
},
);
let note = $ref(deepClone(props.note));
@ -248,7 +248,7 @@ const starButton = ref<InstanceType<typeof XStarButton>>();
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
const reactButton = ref<HTMLElement>();
let appearNote = $computed(() =>
isRenote ? (note.renote as misskey.entities.Note) : note
isRenote ? (note.renote as misskey.entities.Note) : note,
);
const isDeleted = ref(false);
const muted = ref(getWordSoftMute(note, $i, defaultStore.state.mutedWords));
@ -259,7 +259,7 @@ const replies: misskey.entities.Note[] =
?.filter(
(item) =>
item.replyId === props.note.id ||
item.renoteId === props.note.id
item.renoteId === props.note.id,
)
.reverse() ?? [];
const enableEmojiReactions = defaultStore.state.enableEmojiReactions;
@ -294,7 +294,7 @@ function react(viaKeyboard = false): void {
},
() => {
focus();
}
},
);
}
@ -308,7 +308,7 @@ function undoReact(note): void {
const currentClipPage = inject<Ref<misskey.entities.Clip> | null>(
"currentClipPage",
null
null,
);
function menu(viaKeyboard = false): void {
@ -324,7 +324,7 @@ function menu(viaKeyboard = false): void {
menuButton.value,
{
viaKeyboard,
}
},
).then(focus);
}
@ -389,7 +389,7 @@ function onContextmenu(ev: MouseEvent): void {
}
: undefined,
],
ev
ev,
);
}
}

View file

@ -73,7 +73,7 @@
notification.reaction
? notification.reaction.replace(
/^:(\w+):$/,
':$1@.:'
':$1@.:',
)
: notification.reaction
"
@ -297,7 +297,7 @@ const props = withDefaults(
{
withTime: false,
full: false,
}
},
);
const elRef = ref<HTMLElement>(null);
@ -378,7 +378,7 @@ useTooltip(reactionRef, (showing) => {
targetElement: reactionRef.value.$el,
},
{},
"closed"
"closed",
);
});
</script>

View file

@ -60,7 +60,7 @@ const props = withDefaults(
{
includingTypes: () => [],
showGlobalToggle: true,
}
},
);
let includingTypes = $computed(() => props.includingTypes || []);
@ -70,7 +70,7 @@ const dialog = $ref<InstanceType<typeof XModalWindow>>();
let typesMap = $ref<Record<(typeof notificationTypes)[number], boolean>>({});
let useGlobalSetting = $ref(
(includingTypes === null || includingTypes.length === 0) &&
props.showGlobalToggle
props.showGlobalToggle,
);
for (const ntype of notificationTypes) {

View file

@ -40,7 +40,9 @@ onMounted(() => {
<style lang="scss" scoped>
.notification-toast-enter-active,
.notification-toast-leave-active {
transition: opacity 0.3s, transform 0.3s !important;
transition:
opacity 0.3s,
transform 0.3s !important;
}
.notification-toast-enter-from,
.notification-toast-leave-to {

View file

@ -21,7 +21,7 @@
<XNote
v-if="
['reply', 'quote', 'mention'].includes(
notification.type
notification.type,
)
"
:key="notification.id"

View file

@ -22,6 +22,6 @@ watch(
},
{
immediate: true,
}
},
);
</script>

View file

@ -136,7 +136,7 @@ function back() {
history.pop();
router.replace(
history[history.length - 1].path,
history[history.length - 1].key
history[history.length - 1].key,
);
}

View file

@ -86,7 +86,7 @@ import MkButton from "@/components/MkButton.vue";
import { i18n } from "@/i18n";
export type Paging<
E extends keyof misskey.Endpoints = keyof misskey.Endpoints
E extends keyof misskey.Endpoints = keyof misskey.Endpoints,
> = {
endpoint: E;
limit: number;
@ -118,7 +118,7 @@ const props = withDefaults(
}>(),
{
displayLimit: 30,
}
},
);
const emit = defineEmits<{
@ -186,7 +186,7 @@ const init = async (): Promise<void> => {
(err) => {
error.value = true;
fetching.value = false;
}
},
);
};
@ -209,10 +209,13 @@ const refresh = async (): void => {
})
.then(
(res) => {
let ids = items.value.reduce((a, b) => {
let ids = items.value.reduce(
(a, b) => {
a[b.id] = true;
return a;
}, {} as { [id: string]: boolean });
},
{} as { [id: string]: boolean },
);
for (let i = 0; i < res.length; i++) {
const item = res[i];
@ -229,7 +232,7 @@ const refresh = async (): void => {
(err) => {
error.value = true;
fetching.value = false;
}
},
);
};
@ -291,7 +294,7 @@ const fetchMore = async (): Promise<void> => {
},
(err) => {
moreFetching.value = false;
}
},
);
};
@ -344,7 +347,7 @@ const fetchMoreAhead = async (): Promise<void> => {
},
(err) => {
moreFetching.value = false;
}
},
);
};
@ -445,7 +448,7 @@ watch(
if (a.length === 0 && b.length === 0) return;
emit("queue", queue.value.length);
},
{ deep: true }
{ deep: true },
);
init();

View file

@ -73,7 +73,7 @@ const isLocal = computed(() => !props.note.uri);
const isVoted = computed(
() =>
!props.note.poll.multiple &&
props.note.poll.choices.some((c) => c.isVoted)
props.note.poll.choices.some((c) => c.isVoted),
);
const timer = computed(() =>
i18n.t(
@ -89,8 +89,8 @@ const timer = computed(() =>
m: Math.floor(remaining.value / 60) % 60,
h: Math.floor(remaining.value / 3600) % 24,
d: Math.floor(remaining.value / 86400),
}
)
},
),
);
const showResult = ref(props.readOnly || isVoted.value);
@ -101,8 +101,8 @@ if (props.note.poll.expiresAt) {
remaining.value = Math.floor(
Math.max(
new Date(props.note.poll.expiresAt).getTime() - Date.now(),
0
) / 1000
0,
) / 1000,
);
if (remaining.value === 0) {
showResult.value = true;

View file

@ -96,7 +96,7 @@ const emit = defineEmits<{
expiredAfter: number;
choices: string[];
multiple: boolean;
}
},
): void;
}>();
@ -104,7 +104,7 @@ const choices = ref(props.modelValue.choices);
const multiple = ref(props.modelValue.multiple);
const expiration = ref("infinite");
const atDate = ref(
formatDateTimeString(addTime(new Date(), 1, "day"), "yyyy-MM-dd")
formatDateTimeString(addTime(new Date(), 1, "day"), "yyyy-MM-dd"),
);
const atTime = ref("00:00");
const after = ref(0);
@ -176,7 +176,7 @@ watch(
() => emit("update:modelValue", get()),
{
deep: true,
}
},
);
</script>

View file

@ -284,7 +284,7 @@ const props = withDefaults(
initialVisibleUsers: () => [],
autofocus: true,
showMfmCheatSheet: true,
}
},
);
const emit = defineEmits<{
@ -313,14 +313,14 @@ let cw = $ref<string | null>(null);
let localOnly = $ref<boolean>(
props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility
? defaultStore.state.localOnly
: defaultStore.state.defaultNoteLocalOnly
: defaultStore.state.defaultNoteLocalOnly,
);
let visibility = $ref(
props.initialVisibility ??
((defaultStore.state.rememberNoteVisibility
? defaultStore.state.visibility
: defaultStore.state
.defaultNoteVisibility) as (typeof misskey.noteVisibilities)[number])
.defaultNoteVisibility) as (typeof misskey.noteVisibilities)[number]),
);
let visibleUsers = $ref([]);
if (props.initialVisibleUsers) {
@ -405,7 +405,7 @@ const canPost = $computed((): boolean => {
});
const withHashtags = $computed(
defaultStore.makeGetterSetter("postFormWithHashtags")
defaultStore.makeGetterSetter("postFormWithHashtags"),
);
const hashtags = $computed(defaultStore.makeGetterSetter("postFormHashtags"));
@ -420,7 +420,7 @@ watch(
},
{
deep: true,
}
},
);
if (props.mention) {
@ -488,7 +488,7 @@ if (
if (props.reply.visibleUserIds) {
os.api("users/show", {
userIds: props.reply.visibleUserIds.filter(
(uid) => uid !== $i.id && uid !== props.reply.userId
(uid) => uid !== $i.id && uid !== props.reply.userId,
),
}).then((users) => {
users.forEach(pushVisibleUser);
@ -499,7 +499,7 @@ if (
os.api("users/show", { userId: props.reply.userId }).then(
(user) => {
pushVisibleUser(user);
}
},
);
}
}
@ -533,7 +533,7 @@ function checkMissingMention() {
for (const x of extractMentions(ast)) {
if (
!visibleUsers.some(
(u) => u.username === x.username && u.host === x.host
(u) => u.username === x.username && u.host === x.host,
)
) {
hasNotSpecifiedMentions = true;
@ -550,13 +550,13 @@ function addMissingMention() {
for (const x of extractMentions(ast)) {
if (
!visibleUsers.some(
(u) => u.username === x.username && u.host === x.host
(u) => u.username === x.username && u.host === x.host,
)
) {
os.api("users/show", { username: x.username, host: x.host }).then(
(user) => {
visibleUsers.push(user);
}
},
);
}
}
@ -584,7 +584,7 @@ function focus() {
textareaEl.focus();
textareaEl.setSelectionRange(
textareaEl.value.length,
textareaEl.value.length
textareaEl.value.length,
);
}
}
@ -595,7 +595,7 @@ function chooseFileFrom(ev) {
for (const file of files_) {
files.push(file);
}
}
},
);
}
@ -629,7 +629,7 @@ function setVisibility() {
os.popup(
defineAsyncComponent(
() => import("@/components/MkVisibilityPicker.vue")
() => import("@/components/MkVisibilityPicker.vue"),
),
{
currentVisibility: visibility,
@ -650,14 +650,14 @@ function setVisibility() {
}
},
},
"closed"
"closed",
);
}
function pushVisibleUser(user) {
if (
!visibleUsers.some(
(u) => u.username === user.username && u.host === user.host
(u) => u.username === user.username && u.host === user.host,
)
) {
visibleUsers.push(user);
@ -703,7 +703,7 @@ function onCompositionEnd(ev: CompositionEvent) {
async function onPaste(ev: ClipboardEvent) {
for (const { item, i } of Array.from(ev.clipboardData.items).map(
(item, i) => ({ item, i })
(item, i) => ({ item, i }),
)) {
if (item.kind === "file") {
const file = item.getAsFile();
@ -711,7 +711,7 @@ async function onPaste(ev: ClipboardEvent) {
const ext = lio >= 0 ? file.name.slice(lio) : "";
const formatted = `${formatTimeString(
new Date(file.lastModified),
defaultStore.state.pastedFileName
defaultStore.state.pastedFileName,
).replace(/{{number}}/g, `${i + 1}`)}${ext}`;
upload(file, formatted);
}
@ -879,11 +879,11 @@ async function post() {
.filter((x) => x.type === "hashtag")
.map((x) => x.props.hashtag);
const history = JSON.parse(
localStorage.getItem("hashtags") || "[]"
localStorage.getItem("hashtags") || "[]",
) as string[];
localStorage.setItem(
"hashtags",
JSON.stringify(unique(hashtags_.concat(history)))
JSON.stringify(unique(hashtags_.concat(history))),
);
}
posting = false;
@ -930,11 +930,11 @@ function showActions(ev) {
if (key === "text") {
text = value;
}
}
},
);
},
})),
ev.currentTarget ?? ev.target
ev.currentTarget ?? ev.target,
);
}
@ -954,7 +954,7 @@ function openAccountMenu(ev: MouseEvent) {
}
},
},
ev
ev,
);
}
@ -985,7 +985,7 @@ onMounted(() => {
visibility = draft.data.visibility;
localOnly = draft.data.localOnly;
files = (draft.data.files || []).filter(
(draftFile) => draftFile
(draftFile) => draftFile,
);
if (draft.data.poll) {
poll = draft.data.poll;

View file

@ -39,7 +39,7 @@ import { i18n } from "@/i18n";
export default defineComponent({
components: {
XDraggable: defineAsyncComponent(() =>
import("vuedraggable").then((x) => x.default)
import("vuedraggable").then((x) => x.default),
),
MkDriveFileThumbnail,
},
@ -110,7 +110,7 @@ export default defineComponent({
async describe(file) {
os.popup(
defineAsyncComponent(
() => import("@/components/MkMediaCaption.vue")
() => import("@/components/MkMediaCaption.vue"),
),
{
title: i18n.ts.describeFile,
@ -133,7 +133,7 @@ export default defineComponent({
});
},
},
"closed"
"closed",
);
},
@ -175,7 +175,7 @@ export default defineComponent({
},
},
],
ev.currentTarget ?? ev.target
ev.currentTarget ?? ev.target,
)
.then(() => (this.menu = null));
},

View file

@ -99,7 +99,7 @@ function subscribe() {
.subscribe({
userVisibleOnly: true,
applicationServerKey: urlBase64ToUint8Array(
instance.swPublickey
instance.swPublickey,
),
})
.then(
@ -118,7 +118,7 @@ function subscribe() {
//
if (err?.name === "NotAllowedError") {
console.info(
"User denied the notification permission request."
"User denied the notification permission request.",
);
return;
}
@ -128,10 +128,10 @@ function subscribe() {
//
//
await unsubscribe();
}
},
),
null,
null
null,
);
}

View file

@ -24,7 +24,7 @@ const props = defineProps<{
const canRenote = computed(
() =>
["public", "home"].includes(props.note.visibility) ||
props.note.userId === $i?.id
props.note.userId === $i?.id,
);
function quote(): void {

View file

@ -91,10 +91,10 @@ useTooltip(
targetElement: buttonRef.value,
},
{},
"closed"
"closed",
);
},
100
100,
);
</script>

View file

@ -39,7 +39,7 @@ const buttonRef = ref<HTMLElement>();
const canRenote = computed(
() =>
["public", "home"].includes(props.note.visibility) ||
props.note.userId === $i.id
props.note.userId === $i.id,
);
useTooltip(buttonRef, async (showing) => {
@ -61,7 +61,7 @@ useTooltip(buttonRef, async (showing) => {
targetElement: buttonRef.value,
},
{},
"closed"
"closed",
);
});
@ -205,7 +205,7 @@ const renote = (viaKeyboard = false, ev?: MouseEvent) => {
renoteId: props.note.id,
visibility: props.note.visibility,
localOnly: true,
}
},
);
hasRenotedBefore = true;
const el =

View file

@ -85,7 +85,7 @@ const props = withDefaults(
}>(),
{
particle: true,
}
},
);
const emit = defineEmits<{

View file

@ -122,7 +122,7 @@ export default defineComponent({
action: () => {},
},
],
ev.currentTarget ?? ev.target
ev.currentTarget ?? ev.target,
);
},
},

View file

@ -223,7 +223,7 @@ function onUsernameChange() {
},
() => {
user = null;
}
},
);
}
@ -259,7 +259,7 @@ function queryKey() {
password,
signature: hexify(credential.response.signature),
authenticatorData: hexify(
credential.response.authenticatorData
credential.response.authenticatorData,
),
clientDataJSON: hexify(credential.response.clientDataJSON),
credentialId: credential.id,
@ -370,7 +370,7 @@ function resetPassword() {
defineAsyncComponent(() => import("@/components/MkForgotPassword.vue")),
{},
{},
"closed"
"closed",
);
}

View file

@ -25,7 +25,7 @@ const props = withDefaults(
{
autoSet: false,
message: "",
}
},
);
const emit = defineEmits<{

View file

@ -303,7 +303,7 @@ const props = withDefaults(
}>(),
{
autoSet: false,
}
},
);
const emit = defineEmits<{

View file

@ -31,7 +31,7 @@ const props = withDefaults(
}>(),
{
autoSet: false,
}
},
);
const emit = defineEmits<{

View file

@ -105,13 +105,16 @@ onMounted(() => {
particles.value.push(particle);
window.setTimeout(() => {
particles.value = particles.value.filter(
(x) => x.id !== particle.id
(x) => x.id !== particle.id,
);
}, particle.dur - 100);
window.setTimeout(() => {
window.setTimeout(
() => {
add();
}, 500 + Math.random() * 500);
},
500 + Math.random() * 500,
);
};
add();
}

View file

@ -104,7 +104,7 @@ useTooltip(buttonRef, async (showing) => {
targetElement: buttonRef.value,
},
{},
"closed"
"closed",
);
});
</script>

View file

@ -38,15 +38,15 @@ export default defineComponent({
onClick: () => {
this.$emit(
"update:modelValue",
option.props?.value
option.props?.value,
);
},
},
option.children
option.children,
),
[[resolveDirective("click-anime")]],
),
),
[[resolveDirective("click-anime")]]
)
)
);
},
});

View file

@ -28,7 +28,7 @@ const idForCanvas = Array.from(Array(16))
() =>
SAFE_FOR_HTML_ID[
Math.floor(Math.random() * SAFE_FOR_HTML_ID.length)
]
],
)
.join("");
const idForTags = Array.from(Array(16))
@ -36,7 +36,7 @@ const idForTags = Array.from(Array(16))
() =>
SAFE_FOR_HTML_ID[
Math.floor(Math.random() * SAFE_FOR_HTML_ID.length)
]
],
)
.join("");
let available = $ref(false);
@ -50,7 +50,7 @@ watch($$(available), () => {
window.TagCanvas.Start(idForCanvas, idForTags, {
textColour: "#ffffff",
outlineColour: tinycolor(
computedStyle.getPropertyValue("--accent")
computedStyle.getPropertyValue("--accent"),
).toHexString(),
outlineRadius: 10,
initial: [-0.03, -0.01],
@ -80,7 +80,7 @@ onMounted(() => {
Object.assign(document.createElement("script"), {
async: true,
src: "/client-assets/tagcanvas.min.js",
})
}),
)
.addEventListener("load", () => (available = true));
}

View file

@ -55,7 +55,7 @@ const emit = defineEmits<{
provide(
"inChannel",
computed(() => props.src === "channel")
computed(() => props.src === "channel"),
);
const tlComponent: InstanceType<typeof XNotes> = $ref();
@ -293,7 +293,8 @@ const timetravel = (date?: Date) => {
pointer-events: all;
transform: translateY(-100%);
opacity: 0;
animation: reset 0.4s forwards cubic-bezier(0, 0.4, 0, 1.1),
animation:
reset 0.4s forwards cubic-bezier(0, 0.4, 0, 1.1),
slideUp 1s 5s forwards cubic-bezier(1, 0, 1, 1);
&::before {
content: "";

View file

@ -42,7 +42,9 @@ onMounted(() => {
<style lang="scss" scoped>
.toast-enter-active,
.toast-leave-active {
transition: opacity 0.3s, transform 0.3s !important;
transition:
opacity 0.3s,
transform 0.3s !important;
}
.toast-enter-from,
.toast-leave-to {

View file

@ -64,7 +64,7 @@ const props = withDefaults(
information: null,
initialName: null,
initialPermissions: null,
}
},
);
const emit = defineEmits<{

View file

@ -39,7 +39,7 @@ const props = withDefaults(
maxWidth: 250,
direction: "top",
innerMargin: 0,
}
},
);
const emit = defineEmits<{
@ -91,7 +91,8 @@ onUnmounted(() => {
.tooltip-leave-active {
opacity: 1;
transform: scale(1);
transition: transform 200ms cubic-bezier(0.23, 1, 0.32, 1),
transition:
transform 200ms cubic-bezier(0.23, 1, 0.32, 1),
opacity 200ms cubic-bezier(0.23, 1, 0.32, 1);
}
.tooltip-enter-from,

View file

@ -265,15 +265,15 @@ const autoplayMfm = computed(
defaultStore.makeGetterSetter(
"animatedMfm",
(v) => !v,
(v) => !v
)
(v) => !v,
),
);
const reduceAnimation = computed(
defaultStore.makeGetterSetter(
"animation",
(v) => !v,
(v) => !v
)
(v) => !v,
),
);
function close(res) {

View file

@ -111,7 +111,7 @@ const props = withDefaults(
}>(),
{
detail: false,
}
},
);
const self = props.url.startsWith(local);
@ -158,7 +158,7 @@ const requestLang = (lang || "ja-JP").replace("ja-KS", "ja-JP");
requestUrl.hash = "";
fetch(
`/url?url=${encodeURIComponent(requestUrl.href)}&lang=${requestLang}`
`/url?url=${encodeURIComponent(requestUrl.href)}&lang=${requestLang}`,
).then((res) => {
res.json().then((info) => {
if (info.url == null) return;
@ -221,7 +221,10 @@ onUnmounted(() => {
border-radius: var(--radius);
transform: scale(0.95);
opacity: 0.8;
transition: transform 0.2s, opacity 0.2s, background 0.2s;
transition:
transform 0.2s,
opacity 0.2s,
background 0.2s;
}
&:hover,
&:focus {

View file

@ -36,7 +36,7 @@ const props = withDefaults(
}>(),
{
withChart: true,
}
},
);
let chartValues = $ref<number[] | null>(null);

View file

@ -180,7 +180,9 @@ onMounted(() => {
<style lang="scss" scoped>
.popup-enter-active,
.popup-leave-active {
transition: opacity 0.3s, transform 0.3s !important;
transition:
opacity 0.3s,
transform 0.3s !important;
}
.popup-enter-from,
.popup-leave-to {

View file

@ -57,7 +57,7 @@ if (props.note.visibility === "specified") {
targetElement: specified,
},
{},
"closed"
"closed",
);
});
}

View file

@ -135,13 +135,13 @@ const props = withDefaults(
currentLocalOnly: boolean;
src?: HTMLElement;
}>(),
{}
{},
);
const emit = defineEmits<{
(
ev: "changeVisibility",
v: (typeof misskey.noteVisibilities)[number]
v: (typeof misskey.noteVisibilities)[number],
): void;
(ev: "changeLocalOnly", v: boolean): void;
(ev: "closed"): void;

View file

@ -55,7 +55,7 @@ watch(
() => props.showing,
() => {
if (!props.showing) done();
}
},
);
</script>

View file

@ -144,7 +144,7 @@ function onContextmenu(widget: Widget, ev: MouseEvent) {
if (isLink(ev.target)) return;
if (
["INPUT", "TEXTAREA", "IMG", "VIDEO", "CANVAS"].includes(
ev.target.tagName
ev.target.tagName,
) ||
ev.target.attributes["contenteditable"]
)
@ -165,7 +165,7 @@ function onContextmenu(widget: Widget, ev: MouseEvent) {
},
},
],
ev
ev,
);
}
</script>

View file

@ -161,7 +161,7 @@ const props = withDefaults(
contextmenu: null,
buttonsLeft: () => [],
buttonsRight: () => [],
}
},
);
const emit = defineEmits<{
@ -512,7 +512,9 @@ defineExpose({
<style lang="scss" scoped>
.window-enter-active,
.window-leave-active {
transition: opacity 0.2s, transform 0.2s !important;
transition:
opacity 0.2s,
transform 0.2s !important;
}
.window-enter-from,
.window-leave-to {

View file

@ -169,7 +169,7 @@ useInterval(
{
immediate: true,
afterMounted: true,
}
},
);
onMounted(() => {

View file

@ -43,7 +43,7 @@ export default defineComponent({
{
class: "label",
},
[label]
[label],
),
]
: []),
@ -63,9 +63,9 @@ export default defineComponent({
"onUpdate:modelValue": (value) =>
(this.value = value),
},
option.children
)
)
option.children,
),
),
),
...(caption
? [
@ -74,11 +74,11 @@ export default defineComponent({
{
class: "caption",
},
[caption]
[caption],
),
]
: []),
]
],
);
},
});

View file

@ -55,7 +55,7 @@ const props = withDefaults(
step: 1,
textConverter: (v) => v.toString(),
easing: false,
}
},
);
const inputEl = ref<HTMLElement>();
@ -90,7 +90,7 @@ function tooltipShow() {
targetElement: inputEl,
},
{},
"closed"
"closed",
);
}
function tooltipHide() {

View file

@ -135,7 +135,7 @@ useInterval(
{
immediate: true,
afterMounted: true,
}
},
);
onMounted(() => {

View file

@ -11,7 +11,7 @@ const props = withDefaults(
}>(),
{
minWidth: 210,
}
},
);
const minWidth = props.minWidth + "px";

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