mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 03:47:40 -07:00
chore: ⬆️ up prettier, pnpm
This commit is contained in:
parent
0930e0edef
commit
c4d4e850b2
275 changed files with 888 additions and 781 deletions
|
@ -6,7 +6,7 @@
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://codeberg.org/calckey/calckey.git"
|
"url": "https://codeberg.org/calckey/calckey.git"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@8.6.3",
|
"packageManager": "pnpm@8.6.6",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"rebuild": "pnpm run clean && pnpm node ./scripts/build-greet.js && pnpm -r run build && pnpm run gulp",
|
"rebuild": "pnpm run clean && pnpm node ./scripts/build-greet.js && pnpm -r run build && pnpm run gulp",
|
||||||
|
|
|
@ -37,7 +37,7 @@ export default async (job: Bull.Job<InboxJobData>): Promise<string> => {
|
||||||
|
|
||||||
if (!signature?.keyId) {
|
if (!signature?.keyId) {
|
||||||
const err = `Invalid signature: ${signature}`;
|
const err = `Invalid signature: ${signature}`;
|
||||||
job.moveToFailed({message: err});
|
job.moveToFailed({ message: err });
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
"matter-js": "0.18.0",
|
"matter-js": "0.18.0",
|
||||||
"mfm-js": "0.23.3",
|
"mfm-js": "0.23.3",
|
||||||
"photoswipe": "5.3.7",
|
"photoswipe": "5.3.7",
|
||||||
"prettier": "2.8.8",
|
"prettier": "3.0.0",
|
||||||
"prettier-plugin-vue": "1.1.6",
|
"prettier-plugin-vue": "1.1.6",
|
||||||
"prismjs": "1.29.0",
|
"prismjs": "1.29.0",
|
||||||
"punycode": "2.1.1",
|
"punycode": "2.1.1",
|
||||||
|
|
|
@ -67,7 +67,7 @@ function send() {
|
||||||
userId: props.user.id,
|
userId: props.user.id,
|
||||||
comment: comment.value,
|
comment: comment.value,
|
||||||
},
|
},
|
||||||
undefined
|
undefined,
|
||||||
).then((res) => {
|
).then((res) => {
|
||||||
os.alert({
|
os.alert({
|
||||||
type: "success",
|
type: "success",
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
0,
|
0,
|
||||||
1 -
|
1 -
|
||||||
angleDiff(hAngle, angle) / Math.PI -
|
angleDiff(hAngle, angle) / Math.PI -
|
||||||
numbersOpacityFactor
|
numbersOpacityFactor,
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
0,
|
0,
|
||||||
1 -
|
1 -
|
||||||
angleDiff(hAngle, angle) / Math.PI -
|
angleDiff(hAngle, angle) / Math.PI -
|
||||||
numbersOpacityFactor
|
numbersOpacityFactor,
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
@ -151,7 +151,7 @@ const props = withDefaults(
|
||||||
graduations: "dots",
|
graduations: "dots",
|
||||||
fadeGraduations: true,
|
fadeGraduations: true,
|
||||||
sAnimation: "elastic",
|
sAnimation: "elastic",
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const graduationsMajor = computed(() => {
|
const graduationsMajor = computed(() => {
|
||||||
|
@ -192,7 +192,7 @@ let sOneRound = false;
|
||||||
function tick() {
|
function tick() {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
now.setMinutes(
|
now.setMinutes(
|
||||||
now.getMinutes() + (new Date().getTimezoneOffset() + props.offset)
|
now.getMinutes() + (new Date().getTimezoneOffset() + props.offset),
|
||||||
);
|
);
|
||||||
s = now.getSeconds();
|
s = now.getSeconds();
|
||||||
m = now.getMinutes();
|
m = now.getMinutes();
|
||||||
|
@ -225,7 +225,7 @@ function calcColors() {
|
||||||
const computedStyle = getComputedStyle(document.documentElement);
|
const computedStyle = getComputedStyle(document.documentElement);
|
||||||
const dark = tinycolor(computedStyle.getPropertyValue("--bg")).isDark();
|
const dark = tinycolor(computedStyle.getPropertyValue("--bg")).isDark();
|
||||||
const accent = tinycolor(
|
const accent = tinycolor(
|
||||||
computedStyle.getPropertyValue("--accent")
|
computedStyle.getPropertyValue("--accent"),
|
||||||
).toHexString();
|
).toHexString();
|
||||||
majorGraduationColor = dark
|
majorGraduationColor = dark
|
||||||
? "rgba(255, 255, 255, 0.3)"
|
? "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)';
|
//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)";
|
sHandColor = dark ? "rgba(255, 255, 255, 0.5)" : "rgba(0, 0, 0, 0.3)";
|
||||||
mHandColor = tinycolor(
|
mHandColor = tinycolor(
|
||||||
computedStyle.getPropertyValue("--fg")
|
computedStyle.getPropertyValue("--fg"),
|
||||||
).toHexString();
|
).toHexString();
|
||||||
hHandColor = accent;
|
hHandColor = accent;
|
||||||
nowColor = accent;
|
nowColor = accent;
|
||||||
|
|
|
@ -268,7 +268,7 @@ function exec() {
|
||||||
} else if (props.type === "hashtag") {
|
} else if (props.type === "hashtag") {
|
||||||
if (!props.q || props.q === "") {
|
if (!props.q || props.q === "") {
|
||||||
hashtags.value = JSON.parse(
|
hashtags.value = JSON.parse(
|
||||||
localStorage.getItem("hashtags") || "[]"
|
localStorage.getItem("hashtags") || "[]",
|
||||||
);
|
);
|
||||||
fetching.value = false;
|
fetching.value = false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -288,7 +288,7 @@ function exec() {
|
||||||
// キャッシュ
|
// キャッシュ
|
||||||
sessionStorage.setItem(
|
sessionStorage.setItem(
|
||||||
cacheKey,
|
cacheKey,
|
||||||
JSON.stringify(searchedHashtags)
|
JSON.stringify(searchedHashtags),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -298,7 +298,7 @@ function exec() {
|
||||||
// 最近使った絵文字をサジェスト
|
// 最近使った絵文字をサジェスト
|
||||||
emojis.value = defaultStore.state.recentlyUsedEmojis
|
emojis.value = defaultStore.state.recentlyUsedEmojis
|
||||||
.map((emoji) =>
|
.map((emoji) =>
|
||||||
emojiDb.find((dbEmoji) => dbEmoji.emoji === emoji)
|
emojiDb.find((dbEmoji) => dbEmoji.emoji === emoji),
|
||||||
)
|
)
|
||||||
.filter((x) => x) as EmojiDef[];
|
.filter((x) => x) as EmojiDef[];
|
||||||
return;
|
return;
|
||||||
|
@ -450,7 +450,7 @@ onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
exec();
|
exec();
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -470,7 +470,9 @@ onBeforeUnmount(() => {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
margin-top: calc(1em + 8px);
|
margin-top: calc(1em + 8px);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
transition: top 0.1s ease, left 0.1s ease;
|
transition:
|
||||||
|
top 0.1s ease,
|
||||||
|
left 0.1s ease;
|
||||||
|
|
||||||
> ol {
|
> ol {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
|
@ -90,7 +90,7 @@ function onMousedown(evt: MouseEvent): void {
|
||||||
target.clientWidth,
|
target.clientWidth,
|
||||||
target.clientHeight,
|
target.clientHeight,
|
||||||
circleCenterX,
|
circleCenterX,
|
||||||
circleCenterY
|
circleCenterY,
|
||||||
);
|
);
|
||||||
|
|
||||||
window.setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
|
|
|
@ -25,7 +25,7 @@ type Captcha = {
|
||||||
| "expired-callback"
|
| "expired-callback"
|
||||||
| "error-callback"
|
| "error-callback"
|
||||||
| "endpoint"]?: unknown;
|
| "endpoint"]?: unknown;
|
||||||
}
|
},
|
||||||
): string;
|
): string;
|
||||||
remove(id: string): void;
|
remove(id: string): void;
|
||||||
execute(id: string): void;
|
execute(id: string): void;
|
||||||
|
@ -78,7 +78,7 @@ const src = computed(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const captcha = computed<Captcha>(
|
const captcha = computed<Captcha>(
|
||||||
() => window[variable.value] || ({} as unknown as Captcha)
|
() => window[variable.value] || ({} as unknown as Captcha),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (loaded) {
|
if (loaded) {
|
||||||
|
@ -91,7 +91,7 @@ if (loaded) {
|
||||||
async: true,
|
async: true,
|
||||||
id: props.provider,
|
id: props.provider,
|
||||||
src: src.value,
|
src: src.value,
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
).addEventListener("load", () => (available.value = true));
|
).addEventListener("load", () => (available.value = true));
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ const props = withDefaults(
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
full: false,
|
full: false,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const isFollowing = ref<boolean>(props.channel.isFollowing);
|
const isFollowing = ref<boolean>(props.channel.isFollowing);
|
||||||
|
|
|
@ -35,7 +35,7 @@ const props = withDefaults(
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
extractor: (item) => item,
|
extractor: (item) => item,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ Chart.register(
|
||||||
Tooltip,
|
Tooltip,
|
||||||
SubTitle,
|
SubTitle,
|
||||||
Filler,
|
Filler,
|
||||||
zoomPlugin
|
zoomPlugin,
|
||||||
//gradient,
|
//gradient,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -179,11 +179,11 @@ const render = () => {
|
||||||
|
|
||||||
// フォントカラー
|
// フォントカラー
|
||||||
Chart.defaults.color = getComputedStyle(
|
Chart.defaults.color = getComputedStyle(
|
||||||
document.documentElement
|
document.documentElement,
|
||||||
).getPropertyValue("--fg");
|
).getPropertyValue("--fg");
|
||||||
|
|
||||||
const maxes = chartData.series.map((x, i) =>
|
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, {
|
chartInstance = new Chart(chartEl.value, {
|
||||||
|
@ -471,9 +471,9 @@ const fetchNotesChart = async (type: string): Promise<typeof chartData> => {
|
||||||
raw.local.inc,
|
raw.local.inc,
|
||||||
negate(raw.local.dec),
|
negate(raw.local.dec),
|
||||||
raw.remote.inc,
|
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",
|
color: "#888888",
|
||||||
},
|
},
|
||||||
|
@ -483,7 +483,7 @@ const fetchNotesChart = async (type: string): Promise<typeof chartData> => {
|
||||||
data: format(
|
data: format(
|
||||||
type === "combined"
|
type === "combined"
|
||||||
? sum(raw.local.diffs.renote, raw.remote.diffs.renote)
|
? sum(raw.local.diffs.renote, raw.remote.diffs.renote)
|
||||||
: raw[type].diffs.renote
|
: raw[type].diffs.renote,
|
||||||
),
|
),
|
||||||
color: colors.green,
|
color: colors.green,
|
||||||
},
|
},
|
||||||
|
@ -493,7 +493,7 @@ const fetchNotesChart = async (type: string): Promise<typeof chartData> => {
|
||||||
data: format(
|
data: format(
|
||||||
type === "combined"
|
type === "combined"
|
||||||
? sum(raw.local.diffs.reply, raw.remote.diffs.reply)
|
? sum(raw.local.diffs.reply, raw.remote.diffs.reply)
|
||||||
: raw[type].diffs.reply
|
: raw[type].diffs.reply,
|
||||||
),
|
),
|
||||||
color: colors.yellow,
|
color: colors.yellow,
|
||||||
},
|
},
|
||||||
|
@ -503,7 +503,7 @@ const fetchNotesChart = async (type: string): Promise<typeof chartData> => {
|
||||||
data: format(
|
data: format(
|
||||||
type === "combined"
|
type === "combined"
|
||||||
? sum(raw.local.diffs.normal, raw.remote.diffs.normal)
|
? sum(raw.local.diffs.normal, raw.remote.diffs.normal)
|
||||||
: raw[type].diffs.normal
|
: raw[type].diffs.normal,
|
||||||
),
|
),
|
||||||
color: colors.blue,
|
color: colors.blue,
|
||||||
},
|
},
|
||||||
|
@ -514,9 +514,9 @@ const fetchNotesChart = async (type: string): Promise<typeof chartData> => {
|
||||||
type === "combined"
|
type === "combined"
|
||||||
? sum(
|
? sum(
|
||||||
raw.local.diffs.withFile,
|
raw.local.diffs.withFile,
|
||||||
raw.remote.diffs.withFile
|
raw.remote.diffs.withFile,
|
||||||
)
|
)
|
||||||
: raw[type].diffs.withFile
|
: raw[type].diffs.withFile,
|
||||||
),
|
),
|
||||||
color: colors.purple,
|
color: colors.purple,
|
||||||
},
|
},
|
||||||
|
@ -567,8 +567,8 @@ const fetchUsersChart = async (total: boolean): Promise<typeof chartData> => {
|
||||||
raw.local.inc,
|
raw.local.inc,
|
||||||
negate(raw.local.dec),
|
negate(raw.local.dec),
|
||||||
raw.remote.inc,
|
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(
|
data: format(
|
||||||
total
|
total
|
||||||
? raw.local.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(
|
data: format(
|
||||||
total
|
total
|
||||||
? raw.remote.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,
|
raw.local.incSize,
|
||||||
negate(raw.local.decSize),
|
negate(raw.local.decSize),
|
||||||
raw.remote.incSize,
|
raw.remote.incSize,
|
||||||
negate(raw.remote.decSize)
|
negate(raw.remote.decSize),
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -719,8 +719,8 @@ const fetchDriveFilesChart = async (): Promise<typeof chartData> => {
|
||||||
raw.local.incCount,
|
raw.local.incCount,
|
||||||
negate(raw.local.decCount),
|
negate(raw.local.decCount),
|
||||||
raw.remote.incCount,
|
raw.remote.incCount,
|
||||||
negate(raw.remote.decCount)
|
negate(raw.remote.decCount),
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -778,7 +778,7 @@ const fetchInstanceRequestsChart = async (): Promise<typeof chartData> => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchInstanceUsersChart = async (
|
const fetchInstanceUsersChart = async (
|
||||||
total: boolean
|
total: boolean,
|
||||||
): Promise<typeof chartData> => {
|
): Promise<typeof chartData> => {
|
||||||
const raw = await os.apiGet("charts/instance", {
|
const raw = await os.apiGet("charts/instance", {
|
||||||
host: props.args.host,
|
host: props.args.host,
|
||||||
|
@ -794,7 +794,7 @@ const fetchInstanceUsersChart = async (
|
||||||
data: format(
|
data: format(
|
||||||
total
|
total
|
||||||
? raw.users.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 (
|
const fetchInstanceNotesChart = async (
|
||||||
total: boolean
|
total: boolean,
|
||||||
): Promise<typeof chartData> => {
|
): Promise<typeof chartData> => {
|
||||||
const raw = await os.apiGet("charts/instance", {
|
const raw = await os.apiGet("charts/instance", {
|
||||||
host: props.args.host,
|
host: props.args.host,
|
||||||
|
@ -818,7 +818,7 @@ const fetchInstanceNotesChart = async (
|
||||||
data: format(
|
data: format(
|
||||||
total
|
total
|
||||||
? raw.notes.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 (
|
const fetchInstanceFfChart = async (
|
||||||
total: boolean
|
total: boolean,
|
||||||
): Promise<typeof chartData> => {
|
): Promise<typeof chartData> => {
|
||||||
const raw = await os.apiGet("charts/instance", {
|
const raw = await os.apiGet("charts/instance", {
|
||||||
host: props.args.host,
|
host: props.args.host,
|
||||||
|
@ -842,7 +842,7 @@ const fetchInstanceFfChart = async (
|
||||||
data: format(
|
data: format(
|
||||||
total
|
total
|
||||||
? raw.following.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(
|
data: format(
|
||||||
total
|
total
|
||||||
? raw.followers.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 (
|
const fetchInstanceDriveUsageChart = async (
|
||||||
total: boolean
|
total: boolean,
|
||||||
): Promise<typeof chartData> => {
|
): Promise<typeof chartData> => {
|
||||||
const raw = await os.apiGet("charts/instance", {
|
const raw = await os.apiGet("charts/instance", {
|
||||||
host: props.args.host,
|
host: props.args.host,
|
||||||
|
@ -877,7 +877,7 @@ const fetchInstanceDriveUsageChart = async (
|
||||||
data: format(
|
data: format(
|
||||||
total
|
total
|
||||||
? raw.drive.totalUsage
|
? 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 (
|
const fetchInstanceDriveFilesChart = async (
|
||||||
total: boolean
|
total: boolean,
|
||||||
): Promise<typeof chartData> => {
|
): Promise<typeof chartData> => {
|
||||||
const raw = await os.apiGet("charts/instance", {
|
const raw = await os.apiGet("charts/instance", {
|
||||||
host: props.args.host,
|
host: props.args.host,
|
||||||
|
@ -901,7 +901,7 @@ const fetchInstanceDriveFilesChart = async (
|
||||||
data: format(
|
data: format(
|
||||||
total
|
total
|
||||||
? raw.drive.totalFiles
|
? raw.drive.totalFiles
|
||||||
: sum(raw.drive.incFiles, negate(raw.drive.decFiles))
|
: sum(raw.drive.incFiles, negate(raw.drive.decFiles)),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
message.groupId
|
message.groupId
|
||||||
? `/my/messaging/group/${message.groupId}`
|
? `/my/messaging/group/${message.groupId}`
|
||||||
: `/my/messaging/${getAcct(
|
: `/my/messaging/${getAcct(
|
||||||
isMe(message) ? message.recipient : message.user
|
isMe(message) ? message.recipient : message.user,
|
||||||
)}`
|
)}`
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|
|
@ -18,13 +18,13 @@ const props = defineProps<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const prismLang = computed(() =>
|
const prismLang = computed(() =>
|
||||||
Prism.languages[props.lang] ? props.lang : "js"
|
Prism.languages[props.lang] ? props.lang : "js",
|
||||||
);
|
);
|
||||||
const html = computed(() =>
|
const html = computed(() =>
|
||||||
Prism.highlight(
|
Prism.highlight(
|
||||||
props.code,
|
props.code,
|
||||||
Prism.languages[prismLang.value],
|
Prism.languages[prismLang.value],
|
||||||
prismLang.value
|
prismLang.value,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -12,6 +12,6 @@ defineProps<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const XCode = defineAsyncComponent(
|
const XCode = defineAsyncComponent(
|
||||||
() => import("@/components/MkCode.core.vue")
|
() => import("@/components/MkCode.core.vue"),
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -125,7 +125,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
immediate: true,
|
immediate: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
this.$el.style.setProperty("--maxHeight", this.maxHeight + "px");
|
this.$el.style.setProperty("--maxHeight", this.maxHeight + "px");
|
||||||
|
@ -174,7 +174,9 @@ export default defineComponent({
|
||||||
.container-toggle-enter-active,
|
.container-toggle-enter-active,
|
||||||
.container-toggle-leave-active {
|
.container-toggle-leave-active {
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
transition: opacity 0.5s, height 0.5s !important;
|
transition:
|
||||||
|
opacity 0.5s,
|
||||||
|
height 0.5s !important;
|
||||||
}
|
}
|
||||||
.container-toggle-enter-from {
|
.container-toggle-enter-from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
|
@ -80,7 +80,8 @@ function onMousedown(evt: Event) {
|
||||||
|
|
||||||
.fade-enter-active,
|
.fade-enter-active,
|
||||||
.fade-leave-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 0.5s cubic-bezier(0.16, 1, 0.3, 1);
|
||||||
transform-origin: left top;
|
transform-origin: left top;
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,7 +118,7 @@ onMounted(() => {
|
||||||
|
|
||||||
const selection = cropper.getCropperSelection()!;
|
const selection = cropper.getCropperSelection()!;
|
||||||
selection.themeColor = tinycolor(
|
selection.themeColor = tinycolor(
|
||||||
computedStyle.getPropertyValue("--accent")
|
computedStyle.getPropertyValue("--accent"),
|
||||||
).toHexString();
|
).toHexString();
|
||||||
selection.aspectRatio = props.aspectRatio;
|
selection.aspectRatio = props.aspectRatio;
|
||||||
selection.initialAspectRatio = props.aspectRatio;
|
selection.initialAspectRatio = props.aspectRatio;
|
||||||
|
|
|
@ -63,7 +63,9 @@ defineExpose({
|
||||||
> span {
|
> span {
|
||||||
background: var(--cwBg) !important;
|
background: var(--cwBg) !important;
|
||||||
color: var(--cwFg);
|
color: var(--cwFg);
|
||||||
transition: background 0.2s, color 0.2s;
|
transition:
|
||||||
|
background 0.2s,
|
||||||
|
color 0.2s;
|
||||||
> span {
|
> span {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
&::before {
|
&::before {
|
||||||
|
|
|
@ -84,8 +84,8 @@ export default defineComponent({
|
||||||
class: "ph-caret-down ph-bold ph-lg icon",
|
class: "ph-caret-down ph-bold ph-lg icon",
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
]
|
],
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
return [el, separator];
|
return [el, separator];
|
||||||
|
@ -119,7 +119,7 @@ export default defineComponent({
|
||||||
: {
|
: {
|
||||||
class: "sqadhkmv" + (props.noGap ? " noGap" : ""),
|
class: "sqadhkmv" + (props.noGap ? " noGap" : ""),
|
||||||
},
|
},
|
||||||
{ default: renderChildren }
|
{ default: renderChildren },
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -140,7 +140,8 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
|
|
||||||
> .list-enter-active {
|
> .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);
|
opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,14 +78,24 @@
|
||||||
okButtonDisabled &&
|
okButtonDisabled &&
|
||||||
disabledReason === 'charactersExceeded'
|
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
|
<span
|
||||||
v-else-if="
|
v-else-if="
|
||||||
okButtonDisabled &&
|
okButtonDisabled &&
|
||||||
disabledReason === 'charactersBelow'
|
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>
|
||||||
<template v-if="input.type === 'search'" #suffix>
|
<template v-if="input.type === 'search'" #suffix>
|
||||||
|
@ -258,7 +268,7 @@ const props = withDefaults(
|
||||||
isYesNo: false,
|
isYesNo: false,
|
||||||
|
|
||||||
cancelableByBgClick: true,
|
cancelableByBgClick: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
@ -272,7 +282,7 @@ const inputValue = ref<string | number | null>(props.input?.default ?? null);
|
||||||
const selectedValue = ref(props.select?.default ?? null);
|
const selectedValue = ref(props.select?.default ?? null);
|
||||||
|
|
||||||
let disabledReason = $ref<null | "charactersExceeded" | "charactersBelow">(
|
let disabledReason = $ref<null | "charactersExceeded" | "charactersBelow">(
|
||||||
null
|
null,
|
||||||
);
|
);
|
||||||
const okButtonDisabled = $computed<boolean>(() => {
|
const okButtonDisabled = $computed<boolean>(() => {
|
||||||
if (props.input) {
|
if (props.input) {
|
||||||
|
@ -439,7 +449,7 @@ async function openSearchFilters(ev) {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ev.target,
|
ev.target,
|
||||||
{ noReturnFocus: true }
|
{ noReturnFocus: true },
|
||||||
);
|
);
|
||||||
inputEl.value.focus();
|
inputEl.value.focus();
|
||||||
inputEl.value.selectRange(inputValue.value.length, inputValue.value.length); // cursor at end
|
inputEl.value.selectRange(inputValue.value.length, inputValue.value.length); // cursor at end
|
||||||
|
|
|
@ -23,7 +23,7 @@ const props = withDefaults(
|
||||||
showS: true,
|
showS: true,
|
||||||
showMs: false,
|
showMs: false,
|
||||||
offset: 0 - new Date().getTimezoneOffset(),
|
offset: 0 - new Date().getTimezoneOffset(),
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
let intervalId;
|
let intervalId;
|
||||||
|
@ -45,7 +45,7 @@ watch(showColon, (v) => {
|
||||||
const tick = () => {
|
const tick = () => {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
now.setMinutes(
|
now.setMinutes(
|
||||||
now.getMinutes() + (new Date().getTimezoneOffset() + props.offset)
|
now.getMinutes() + (new Date().getTimezoneOffset() + props.offset),
|
||||||
);
|
);
|
||||||
hh.value = now.getHours().toString().padStart(2, "0");
|
hh.value = now.getHours().toString().padStart(2, "0");
|
||||||
mm.value = now.getMinutes().toString().padStart(2, "0");
|
mm.value = now.getMinutes().toString().padStart(2, "0");
|
||||||
|
@ -65,7 +65,7 @@ watch(
|
||||||
if (intervalId) window.clearInterval(intervalId);
|
if (intervalId) window.clearInterval(intervalId);
|
||||||
intervalId = window.setInterval(tick, props.showMs ? 10 : 1000);
|
intervalId = window.setInterval(tick, props.showMs ? 10 : 1000);
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
|
|
|
@ -56,7 +56,7 @@ const props = withDefaults(
|
||||||
{
|
{
|
||||||
isSelected: false,
|
isSelected: false,
|
||||||
selectMode: false,
|
selectMode: false,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
@ -68,7 +68,7 @@ const emit = defineEmits<{
|
||||||
const isDragging = ref(false);
|
const isDragging = ref(false);
|
||||||
|
|
||||||
const title = computed(
|
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() {
|
function getMenu() {
|
||||||
|
@ -124,7 +124,7 @@ function onClick(ev: MouseEvent) {
|
||||||
getMenu(),
|
getMenu(),
|
||||||
(ev.currentTarget ?? ev.target ?? undefined) as
|
(ev.currentTarget ?? ev.target ?? undefined) as
|
||||||
| HTMLElement
|
| HTMLElement
|
||||||
| undefined
|
| undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ function onDragstart(ev: DragEvent) {
|
||||||
ev.dataTransfer.effectAllowed = "move";
|
ev.dataTransfer.effectAllowed = "move";
|
||||||
ev.dataTransfer.setData(
|
ev.dataTransfer.setData(
|
||||||
_DATA_TRANSFER_DRIVE_FILE_,
|
_DATA_TRANSFER_DRIVE_FILE_,
|
||||||
JSON.stringify(props.file)
|
JSON.stringify(props.file),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
isDragging.value = true;
|
isDragging.value = true;
|
||||||
|
@ -186,7 +186,7 @@ function describe() {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"closed"
|
"closed",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ const props = withDefaults(
|
||||||
{
|
{
|
||||||
isSelected: false,
|
isSelected: false,
|
||||||
selectMode: false,
|
selectMode: false,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
@ -184,7 +184,7 @@ function onDragstart(ev: DragEvent) {
|
||||||
ev.dataTransfer.effectAllowed = "move";
|
ev.dataTransfer.effectAllowed = "move";
|
||||||
ev.dataTransfer.setData(
|
ev.dataTransfer.setData(
|
||||||
_DATA_TRANSFER_DRIVE_FOLDER_,
|
_DATA_TRANSFER_DRIVE_FOLDER_,
|
||||||
JSON.stringify(props.folder)
|
JSON.stringify(props.folder),
|
||||||
);
|
);
|
||||||
isDragging.value = true;
|
isDragging.value = true;
|
||||||
|
|
||||||
|
@ -256,13 +256,13 @@ function onContextmenu(ev: MouseEvent) {
|
||||||
action: () => {
|
action: () => {
|
||||||
os.popup(
|
os.popup(
|
||||||
defineAsyncComponent(
|
defineAsyncComponent(
|
||||||
() => import("@/components/MkDriveWindow.vue")
|
() => import("@/components/MkDriveWindow.vue"),
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
initialFolder: props.folder,
|
initialFolder: props.folder,
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
"closed"
|
"closed",
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -280,7 +280,7 @@ function onContextmenu(ev: MouseEvent) {
|
||||||
action: deleteFolder,
|
action: deleteFolder,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ev
|
ev,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -29,7 +29,7 @@ const emit = defineEmits<{
|
||||||
(
|
(
|
||||||
ev: "upload",
|
ev: "upload",
|
||||||
file: File,
|
file: File,
|
||||||
folder?: Misskey.entities.DriveFolder | null
|
folder?: Misskey.entities.DriveFolder | null,
|
||||||
): void;
|
): void;
|
||||||
(ev: "removeFile", v: Misskey.entities.DriveFile["id"]): void;
|
(ev: "removeFile", v: Misskey.entities.DriveFile["id"]): void;
|
||||||
(ev: "removeFolder", v: Misskey.entities.DriveFolder["id"]): void;
|
(ev: "removeFolder", v: Misskey.entities.DriveFolder["id"]): void;
|
||||||
|
|
|
@ -161,17 +161,17 @@ const props = withDefaults(
|
||||||
{
|
{
|
||||||
multiple: false,
|
multiple: false,
|
||||||
select: null,
|
select: null,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(
|
(
|
||||||
ev: "selected",
|
ev: "selected",
|
||||||
v: Misskey.entities.DriveFile | Misskey.entities.DriveFolder
|
v: Misskey.entities.DriveFile | Misskey.entities.DriveFolder,
|
||||||
): void;
|
): void;
|
||||||
(
|
(
|
||||||
ev: "change-selection",
|
ev: "change-selection",
|
||||||
v: Misskey.entities.DriveFile[] | Misskey.entities.DriveFolder[]
|
v: Misskey.entities.DriveFile[] | Misskey.entities.DriveFolder[],
|
||||||
): void;
|
): void;
|
||||||
(ev: "move-root"): void;
|
(ev: "move-root"): void;
|
||||||
(ev: "cd", v: Misskey.entities.DriveFolder | null): void;
|
(ev: "cd", v: Misskey.entities.DriveFolder | null): void;
|
||||||
|
@ -207,7 +207,7 @@ const ilFilesObserver = new IntersectionObserver(
|
||||||
entries.some((entry) => entry.isIntersecting) &&
|
entries.some((entry) => entry.isIntersecting) &&
|
||||||
!fetching.value &&
|
!fetching.value &&
|
||||||
moreFiles.value &&
|
moreFiles.value &&
|
||||||
fetchMoreFiles()
|
fetchMoreFiles(),
|
||||||
);
|
);
|
||||||
|
|
||||||
watch(folder, () => emit("cd", folder.value));
|
watch(folder, () => emit("cd", folder.value));
|
||||||
|
@ -230,13 +230,13 @@ function onStreamDriveFileDeleted(fileId: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onStreamDriveFolderCreated(
|
function onStreamDriveFolderCreated(
|
||||||
createdFolder: Misskey.entities.DriveFolder
|
createdFolder: Misskey.entities.DriveFolder,
|
||||||
) {
|
) {
|
||||||
addFolder(createdFolder, true);
|
addFolder(createdFolder, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onStreamDriveFolderUpdated(
|
function onStreamDriveFolderUpdated(
|
||||||
updatedFolder: Misskey.entities.DriveFolder
|
updatedFolder: Misskey.entities.DriveFolder,
|
||||||
) {
|
) {
|
||||||
const current = folder.value ? folder.value.id : null;
|
const current = folder.value ? folder.value.id : null;
|
||||||
if (current !== updatedFolder.parentId) {
|
if (current !== updatedFolder.parentId) {
|
||||||
|
@ -433,7 +433,7 @@ function onChangeFileInput() {
|
||||||
|
|
||||||
function upload(
|
function upload(
|
||||||
file: File,
|
file: File,
|
||||||
folderToUpload?: Misskey.entities.DriveFolder | null
|
folderToUpload?: Misskey.entities.DriveFolder | null,
|
||||||
) {
|
) {
|
||||||
uploadFile(
|
uploadFile(
|
||||||
file,
|
file,
|
||||||
|
@ -441,7 +441,7 @@ function upload(
|
||||||
? folderToUpload.id
|
? folderToUpload.id
|
||||||
: null,
|
: null,
|
||||||
undefined,
|
undefined,
|
||||||
keepOriginal.value
|
keepOriginal.value,
|
||||||
).then((res) => {
|
).then((res) => {
|
||||||
addFile(res, true);
|
addFile(res, true);
|
||||||
});
|
});
|
||||||
|
@ -452,7 +452,7 @@ function chooseFile(file: Misskey.entities.DriveFile) {
|
||||||
if (props.multiple) {
|
if (props.multiple) {
|
||||||
if (isAlreadySelected) {
|
if (isAlreadySelected) {
|
||||||
selectedFiles.value = selectedFiles.value.filter(
|
selectedFiles.value = selectedFiles.value.filter(
|
||||||
(f) => f.id !== file.id
|
(f) => f.id !== file.id,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
selectedFiles.value.push(file);
|
selectedFiles.value.push(file);
|
||||||
|
@ -470,12 +470,12 @@ function chooseFile(file: Misskey.entities.DriveFile) {
|
||||||
|
|
||||||
function chooseFolder(folderToChoose: Misskey.entities.DriveFolder) {
|
function chooseFolder(folderToChoose: Misskey.entities.DriveFolder) {
|
||||||
const isAlreadySelected = selectedFolders.value.some(
|
const isAlreadySelected = selectedFolders.value.some(
|
||||||
(f) => f.id === folderToChoose.id
|
(f) => f.id === folderToChoose.id,
|
||||||
);
|
);
|
||||||
if (props.multiple) {
|
if (props.multiple) {
|
||||||
if (isAlreadySelected) {
|
if (isAlreadySelected) {
|
||||||
selectedFolders.value = selectedFolders.value.filter(
|
selectedFolders.value = selectedFolders.value.filter(
|
||||||
(f) => f.id !== folderToChoose.id
|
(f) => f.id !== folderToChoose.id,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
selectedFolders.value.push(folderToChoose);
|
selectedFolders.value.push(folderToChoose);
|
||||||
|
@ -707,7 +707,7 @@ function getMenu() {
|
||||||
icon: "ph-trash ph-bold ph-lg",
|
icon: "ph-trash ph-bold ph-lg",
|
||||||
action: () => {
|
action: () => {
|
||||||
deleteFolder(
|
deleteFolder(
|
||||||
folder.value as Misskey.entities.DriveFolder
|
folder.value as Misskey.entities.DriveFolder,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -725,7 +725,7 @@ function getMenu() {
|
||||||
function showMenu(ev: MouseEvent) {
|
function showMenu(ev: MouseEvent) {
|
||||||
os.popupMenu(
|
os.popupMenu(
|
||||||
getMenu(),
|
getMenu(),
|
||||||
(ev.currentTarget ?? ev.target ?? undefined) as HTMLElement | undefined
|
(ev.currentTarget ?? ev.target ?? undefined) as HTMLElement | undefined,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ withDefaults(
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
type: "file",
|
type: "file",
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
class="_button"
|
class="_button"
|
||||||
@click.stop="
|
@click.stop="
|
||||||
applyUnicodeSkinTone(
|
applyUnicodeSkinTone(
|
||||||
props.skinTones.indexOf(skinTone) + 1
|
props.skinTones.indexOf(skinTone) + 1,
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
@ -83,7 +83,7 @@ watch(
|
||||||
() => props.emojis,
|
() => props.emojis,
|
||||||
(newVal) => {
|
(newVal) => {
|
||||||
localEmojis.value = [...newVal];
|
localEmojis.value = [...newVal];
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,7 @@ const props = withDefaults(
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
showPinned: true,
|
showPinned: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
@ -229,13 +229,13 @@ const unicodeEmojiSkinToneLabels = [
|
||||||
];
|
];
|
||||||
|
|
||||||
const size = computed(() =>
|
const size = computed(() =>
|
||||||
props.asReactionPicker ? reactionPickerSize.value : 1
|
props.asReactionPicker ? reactionPickerSize.value : 1,
|
||||||
);
|
);
|
||||||
const width = computed(() =>
|
const width = computed(() =>
|
||||||
props.asReactionPicker ? reactionPickerWidth.value : 3
|
props.asReactionPicker ? reactionPickerWidth.value : 3,
|
||||||
);
|
);
|
||||||
const height = computed(() =>
|
const height = computed(() =>
|
||||||
props.asReactionPicker ? reactionPickerHeight.value : 2
|
props.asReactionPicker ? reactionPickerHeight.value : 2,
|
||||||
);
|
);
|
||||||
const customEmojiCategories = emojiCategories;
|
const customEmojiCategories = emojiCategories;
|
||||||
const customEmojis = instance.emojis;
|
const customEmojis = instance.emojis;
|
||||||
|
@ -283,8 +283,8 @@ watch(q, () => {
|
||||||
(keyword) =>
|
(keyword) =>
|
||||||
emoji.name.includes(keyword) ||
|
emoji.name.includes(keyword) ||
|
||||||
emoji.aliases.some((alias) =>
|
emoji.aliases.some((alias) =>
|
||||||
alias.includes(keyword)
|
alias.includes(keyword),
|
||||||
)
|
),
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
matches.add(emoji);
|
matches.add(emoji);
|
||||||
|
@ -355,8 +355,8 @@ watch(q, () => {
|
||||||
(keyword) =>
|
(keyword) =>
|
||||||
emoji.slug.includes(keyword) ||
|
emoji.slug.includes(keyword) ||
|
||||||
emoji.keywords?.some((alias) =>
|
emoji.keywords?.some((alias) =>
|
||||||
alias.includes(keyword)
|
alias.includes(keyword),
|
||||||
)
|
),
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
matches.add(emoji);
|
matches.add(emoji);
|
||||||
|
@ -419,7 +419,7 @@ function reset() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getKey(
|
function getKey(
|
||||||
emoji: string | Misskey.entities.CustomEmoji | UnicodeEmojiDef
|
emoji: string | Misskey.entities.CustomEmoji | UnicodeEmojiDef,
|
||||||
): string {
|
): string {
|
||||||
return typeof emoji === "string" ? emoji : emoji.emoji || `:${emoji.name}:`;
|
return typeof emoji === "string" ? emoji : emoji.emoji || `:${emoji.name}:`;
|
||||||
}
|
}
|
||||||
|
@ -465,7 +465,7 @@ function done(query?: any): boolean | void {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
const exactMatchUnicode = emojilist.find(
|
const exactMatchUnicode = emojilist.find(
|
||||||
(emoji) => emoji.emoji === q2 || emoji.slug === q2
|
(emoji) => emoji.emoji === q2 || emoji.slug === q2,
|
||||||
);
|
);
|
||||||
if (exactMatchUnicode) {
|
if (exactMatchUnicode) {
|
||||||
chosen(exactMatchUnicode);
|
chosen(exactMatchUnicode);
|
||||||
|
|
|
@ -47,7 +47,7 @@ withDefaults(
|
||||||
manualShowing: null,
|
manualShowing: null,
|
||||||
showPinned: true,
|
showPinned: true,
|
||||||
asReactionPicker: false,
|
asReactionPicker: false,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
:key="file.id"
|
:key="file.id"
|
||||||
v-tooltip.mfm="
|
v-tooltip.mfm="
|
||||||
`${file.type}\n${bytes(file.size)}\n${new Date(
|
`${file.type}\n${bytes(file.size)}\n${new Date(
|
||||||
file.createdAt
|
file.createdAt,
|
||||||
).toLocaleString()}\nby ${
|
).toLocaleString()}\nby ${
|
||||||
file.user ? '@' + Acct.toString(file.user) : 'system'
|
file.user ? '@' + Acct.toString(file.user) : 'system'
|
||||||
}`
|
}`
|
||||||
|
|
|
@ -56,7 +56,7 @@ export default defineComponent({
|
||||||
this.persistKey &&
|
this.persistKey &&
|
||||||
localStorage.getItem(localStoragePrefix + this.persistKey)
|
localStorage.getItem(localStoragePrefix + this.persistKey)
|
||||||
? localStorage.getItem(
|
? localStorage.getItem(
|
||||||
localStoragePrefix + this.persistKey
|
localStoragePrefix + this.persistKey,
|
||||||
) === "t"
|
) === "t"
|
||||||
: this.expanded,
|
: this.expanded,
|
||||||
};
|
};
|
||||||
|
@ -66,7 +66,7 @@ export default defineComponent({
|
||||||
if (this.persistKey) {
|
if (this.persistKey) {
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
localStoragePrefix + this.persistKey,
|
localStoragePrefix + this.persistKey,
|
||||||
this.showBody ? "t" : "f"
|
this.showBody ? "t" : "f",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -85,9 +85,9 @@ export default defineComponent({
|
||||||
const bg = tinycolor(
|
const bg = tinycolor(
|
||||||
rawBg.startsWith("var(")
|
rawBg.startsWith("var(")
|
||||||
? getComputedStyle(document.documentElement).getPropertyValue(
|
? getComputedStyle(document.documentElement).getPropertyValue(
|
||||||
rawBg.slice(4, -1)
|
rawBg.slice(4, -1),
|
||||||
)
|
)
|
||||||
: rawBg
|
: rawBg,
|
||||||
);
|
);
|
||||||
bg.setAlpha(0.85);
|
bg.setAlpha(0.85);
|
||||||
this.bg = bg.toRgbString();
|
this.bg = bg.toRgbString();
|
||||||
|
@ -123,7 +123,9 @@ export default defineComponent({
|
||||||
.folder-toggle-enter-active,
|
.folder-toggle-enter-active,
|
||||||
.folder-toggle-leave-active {
|
.folder-toggle-leave-active {
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
transition: opacity 0.5s, height 0.5s !important;
|
transition:
|
||||||
|
opacity 0.5s,
|
||||||
|
height 0.5s !important;
|
||||||
}
|
}
|
||||||
.folder-toggle-enter-from {
|
.folder-toggle-enter-from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
|
@ -83,7 +83,7 @@ const props = withDefaults(
|
||||||
{
|
{
|
||||||
full: false,
|
full: false,
|
||||||
large: false,
|
large: false,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const isBlocking = computed(() => props.user.isBlocking);
|
const isBlocking = computed(() => props.user.isBlocking);
|
||||||
|
@ -92,7 +92,7 @@ let state = $ref(i18n.ts.processing);
|
||||||
|
|
||||||
let isFollowing = $ref(props.user.isFollowing);
|
let isFollowing = $ref(props.user.isFollowing);
|
||||||
let hasPendingFollowRequestFromYou = $ref(
|
let hasPendingFollowRequestFromYou = $ref(
|
||||||
props.user.hasPendingFollowRequestFromYou
|
props.user.hasPendingFollowRequestFromYou,
|
||||||
);
|
);
|
||||||
let wait = $ref(false);
|
let wait = $ref(false);
|
||||||
const connection = stream.useChannel("main");
|
const connection = stream.useChannel("main");
|
||||||
|
@ -166,7 +166,7 @@ async function onClick() {
|
||||||
function menu(ev) {
|
function menu(ev) {
|
||||||
os.popupMenu(
|
os.popupMenu(
|
||||||
getUserMenu(props.user, router),
|
getUserMenu(props.user, router),
|
||||||
ev.currentTarget ?? ev.target
|
ev.currentTarget ?? ev.target,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<div class="xkpnjxcv _formRoot">
|
<div class="xkpnjxcv _formRoot">
|
||||||
<template
|
<template
|
||||||
v-for="item in Object.keys(form).filter(
|
v-for="item in Object.keys(form).filter(
|
||||||
(item) => !form[item].hidden
|
(item) => !form[item].hidden,
|
||||||
)"
|
)"
|
||||||
>
|
>
|
||||||
<FormInput
|
<FormInput
|
||||||
|
|
|
@ -9,7 +9,7 @@ import * as os from "@/os";
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
XFormula: defineAsyncComponent(
|
XFormula: defineAsyncComponent(
|
||||||
() => import("@/components/MkFormulaCore.vue")
|
() => import("@/components/MkFormulaCore.vue"),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -21,7 +21,7 @@ const query = ref(props.q);
|
||||||
const search = () => {
|
const search = () => {
|
||||||
window.open(
|
window.open(
|
||||||
`https://search.annoyingorange.xyz/search?q=${query.value}`,
|
`https://search.annoyingorange.xyz/search?q=${query.value}`,
|
||||||
"_blank"
|
"_blank",
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -259,7 +259,7 @@ watch(
|
||||||
() => {
|
() => {
|
||||||
fetching = true;
|
fetching = true;
|
||||||
renderChart();
|
renderChart();
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|
|
@ -36,7 +36,7 @@ const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
image: misskey.entities.DriveFile;
|
image: misskey.entities.DriveFile;
|
||||||
}>(),
|
}>(),
|
||||||
{}
|
{},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -40,7 +40,7 @@ const props = withDefaults(
|
||||||
title: null,
|
title: null,
|
||||||
size: 64,
|
size: 64,
|
||||||
cover: true,
|
cover: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const canvas = $ref<HTMLCanvasElement>();
|
const canvas = $ref<HTMLCanvasElement>();
|
||||||
|
|
|
@ -95,7 +95,7 @@ const search = () => {
|
||||||
id: x.id,
|
id: x.id,
|
||||||
host: x.host,
|
host: x.host,
|
||||||
iconUrl: x.iconUrl,
|
iconUrl: x.iconUrl,
|
||||||
} as Instance)
|
}) as Instance,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -138,7 +138,7 @@ function createDoughnut(chartEl, tooltip, data) {
|
||||||
{
|
{
|
||||||
backgroundColor: data.map((x) => x.color),
|
backgroundColor: data.map((x) => x.color),
|
||||||
borderColor: getComputedStyle(
|
borderColor: getComputedStyle(
|
||||||
document.documentElement
|
document.documentElement,
|
||||||
).getPropertyValue("--panel"),
|
).getPropertyValue("--panel"),
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
hoverOffset: 0,
|
hoverOffset: 0,
|
||||||
|
@ -161,7 +161,7 @@ function createDoughnut(chartEl, tooltip, data) {
|
||||||
ev,
|
ev,
|
||||||
"nearest",
|
"nearest",
|
||||||
{ intersect: true },
|
{ intersect: true },
|
||||||
false
|
false,
|
||||||
)[0];
|
)[0];
|
||||||
if (hit && data[hit.index].onClick) {
|
if (hit && data[hit.index].onClick) {
|
||||||
data[hit.index].onClick();
|
data[hit.index].onClick();
|
||||||
|
@ -206,7 +206,7 @@ onMounted(() => {
|
||||||
color: "#80808080",
|
color: "#80808080",
|
||||||
value: fedStats.otherFollowersCount,
|
value: fedStats.otherFollowersCount,
|
||||||
},
|
},
|
||||||
])
|
]),
|
||||||
);
|
);
|
||||||
|
|
||||||
createDoughnut(
|
createDoughnut(
|
||||||
|
@ -227,7 +227,7 @@ onMounted(() => {
|
||||||
color: "#80808080",
|
color: "#80808080",
|
||||||
value: fedStats.otherFollowingCount,
|
value: fedStats.otherFollowingCount,
|
||||||
},
|
},
|
||||||
])
|
]),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -32,7 +32,7 @@ const instance = props.instance ?? {
|
||||||
name: instanceName,
|
name: instanceName,
|
||||||
themeColor: (
|
themeColor: (
|
||||||
document.querySelector(
|
document.querySelector(
|
||||||
'meta[name="theme-color-orig"]'
|
'meta[name="theme-color-orig"]',
|
||||||
) as HTMLMetaElement
|
) as HTMLMetaElement
|
||||||
)?.content,
|
)?.content,
|
||||||
softwareName: Instance.softwareName || "Calckey",
|
softwareName: Instance.softwareName || "Calckey",
|
||||||
|
@ -86,8 +86,11 @@ function getInstanceIcon(instance): string {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-shadow: -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),
|
||||||
|
-1px 1px 0 var(--bg),
|
||||||
|
1px 1px 0 var(--bg);
|
||||||
.article > .main &,
|
.article > .main &,
|
||||||
.header > .body & {
|
.header > .body & {
|
||||||
display: unset;
|
display: unset;
|
||||||
|
|
|
@ -32,7 +32,7 @@ const props = withDefaults(
|
||||||
{
|
{
|
||||||
copy: null,
|
copy: null,
|
||||||
oneline: false,
|
oneline: false,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const copy_ = () => {
|
const copy_ = () => {
|
||||||
|
|
|
@ -78,7 +78,7 @@ const props = withDefaults(
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
anchor: () => ({ x: "right", y: "center" }),
|
anchor: () => ({ x: "right", y: "center" }),
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -28,7 +28,7 @@ const props = withDefaults(
|
||||||
url: string;
|
url: string;
|
||||||
rel?: null | string;
|
rel?: null | string;
|
||||||
}>(),
|
}>(),
|
||||||
{}
|
{},
|
||||||
);
|
);
|
||||||
|
|
||||||
const self = props.url.startsWith(local);
|
const self = props.url.startsWith(local);
|
||||||
|
@ -40,7 +40,7 @@ const el = $ref();
|
||||||
useTooltip($$(el), (showing) => {
|
useTooltip($$(el), (showing) => {
|
||||||
os.popup(
|
os.popup(
|
||||||
defineAsyncComponent(
|
defineAsyncComponent(
|
||||||
() => import("@/components/MkUrlPreviewPopup.vue")
|
() => import("@/components/MkUrlPreviewPopup.vue"),
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
showing,
|
showing,
|
||||||
|
@ -48,7 +48,7 @@ useTooltip($$(el), (showing) => {
|
||||||
source: el,
|
source: el,
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
"closed"
|
"closed",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -63,9 +63,9 @@ export default {
|
||||||
: undefined,
|
: undefined,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
$slots.default()
|
$slots.default(),
|
||||||
)
|
),
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
|
|
|
@ -103,7 +103,8 @@ const plyrMini = ref(false);
|
||||||
const url =
|
const url =
|
||||||
props.raw || defaultStore.state.loadRawImages
|
props.raw || defaultStore.state.loadRawImages
|
||||||
? props.media.url
|
? props.media.url
|
||||||
: defaultStore.state.disableShowingAnimatedImages && props.media.type.startsWith('image')
|
: defaultStore.state.disableShowingAnimatedImages &&
|
||||||
|
props.media.type.startsWith("image")
|
||||||
? getStaticImageUrl(props.media.thumbnailUrl)
|
? getStaticImageUrl(props.media.thumbnailUrl)
|
||||||
: props.media.thumbnailUrl;
|
: props.media.thumbnailUrl;
|
||||||
|
|
||||||
|
@ -127,7 +128,7 @@ watch(
|
||||||
{
|
{
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true,
|
immediate: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
|
@ -67,7 +67,7 @@ const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
media: misskey.entities.DriveFile;
|
media: misskey.entities.DriveFile;
|
||||||
}>(),
|
}>(),
|
||||||
{}
|
{},
|
||||||
);
|
);
|
||||||
|
|
||||||
const audioEl = $ref<HTMLAudioElement | null>();
|
const audioEl = $ref<HTMLAudioElement | null>();
|
||||||
|
|
|
@ -184,10 +184,10 @@ export default defineComponent({
|
||||||
|
|
||||||
caption() {
|
caption() {
|
||||||
const img = document.getElementById(
|
const img = document.getElementById(
|
||||||
"imgtocaption"
|
"imgtocaption",
|
||||||
) as HTMLImageElement;
|
) as HTMLImageElement;
|
||||||
const ta = document.getElementById(
|
const ta = document.getElementById(
|
||||||
"captioninput"
|
"captioninput",
|
||||||
) as HTMLTextAreaElement;
|
) as HTMLTextAreaElement;
|
||||||
os.api("drive/files/caption-image", {
|
os.api("drive/files/caption-image", {
|
||||||
url: img.src,
|
url: img.src,
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<div ref="gallery" @click.stop>
|
<div ref="gallery" @click.stop>
|
||||||
<XMedia
|
<XMedia
|
||||||
v-for="media in mediaList.filter((media) =>
|
v-for="media in mediaList.filter((media) =>
|
||||||
previewable(media)
|
previewable(media),
|
||||||
)"
|
)"
|
||||||
:key="media.id"
|
:key="media.id"
|
||||||
:class="{ image: media.type.startsWith('image') }"
|
:class="{ image: media.type.startsWith('image') }"
|
||||||
|
@ -177,7 +177,7 @@ const previewable = (file: misskey.entities.DriveFile): boolean => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
const previewableCount = props.mediaList.filter((media) =>
|
const previewableCount = props.mediaList.filter((media) =>
|
||||||
previewable(media)
|
previewable(media),
|
||||||
).length;
|
).length;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -251,7 +251,7 @@ watch(
|
||||||
() => props.items,
|
() => props.items,
|
||||||
() => {
|
() => {
|
||||||
const items: (MenuItem | MenuPending)[] = [...props.items].filter(
|
const items: (MenuItem | MenuPending)[] = [...props.items].filter(
|
||||||
(item) => item !== undefined
|
(item) => item !== undefined,
|
||||||
);
|
);
|
||||||
|
|
||||||
for (let i = 0; i < items.length; i++) {
|
for (let i = 0; i < items.length; i++) {
|
||||||
|
@ -270,7 +270,7 @@ watch(
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
immediate: true,
|
immediate: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
let childMenu = $ref<MenuItem[] | null>();
|
let childMenu = $ref<MenuItem[] | null>();
|
||||||
|
|
|
@ -43,7 +43,7 @@ let headX = $ref<number | null>(null);
|
||||||
let headY = $ref<number | null>(null);
|
let headY = $ref<number | null>(null);
|
||||||
let clock = $ref<number | null>(null);
|
let clock = $ref<number | null>(null);
|
||||||
const accent = tinycolor(
|
const accent = tinycolor(
|
||||||
getComputedStyle(document.documentElement).getPropertyValue("--accent")
|
getComputedStyle(document.documentElement).getPropertyValue("--accent"),
|
||||||
);
|
);
|
||||||
const color = accent.toRgbString();
|
const color = accent.toRgbString();
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ const props = withDefaults(
|
||||||
noOverlap: true,
|
noOverlap: true,
|
||||||
transparentBg: false,
|
transparentBg: false,
|
||||||
noReturnFocus: false,
|
noReturnFocus: false,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
@ -153,7 +153,7 @@ const type = $computed<ModalTypes>(() => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const isEnableBgTransparent = $computed(
|
const isEnableBgTransparent = $computed(
|
||||||
() => props.transparentBg && type === "popup"
|
() => props.transparentBg && type === "popup",
|
||||||
);
|
);
|
||||||
let transitionName = $computed(() =>
|
let transitionName = $computed(() =>
|
||||||
defaultStore.state.animation
|
defaultStore.state.animation
|
||||||
|
@ -164,7 +164,7 @@ let transitionName = $computed(() =>
|
||||||
: type === "popup"
|
: type === "popup"
|
||||||
? "modal-popup"
|
? "modal-popup"
|
||||||
: "modal"
|
: "modal"
|
||||||
: ""
|
: "",
|
||||||
);
|
);
|
||||||
let transitionDuration = $computed(() =>
|
let transitionDuration = $computed(() =>
|
||||||
transitionName === "send"
|
transitionName === "send"
|
||||||
|
@ -175,7 +175,7 @@ let transitionDuration = $computed(() =>
|
||||||
? 200
|
? 200
|
||||||
: transitionName === "modal-drawer"
|
: transitionName === "modal-drawer"
|
||||||
? 200
|
? 200
|
||||||
: 0
|
: 0,
|
||||||
);
|
);
|
||||||
|
|
||||||
let contentClicking = false;
|
let contentClicking = false;
|
||||||
|
@ -359,10 +359,10 @@ const onOpened = () => {
|
||||||
contentClicking = false;
|
contentClicking = false;
|
||||||
}, 100);
|
}, 100);
|
||||||
},
|
},
|
||||||
{ passive: true, once: true }
|
{ passive: true, once: true },
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
{ passive: true }
|
{ passive: true },
|
||||||
);
|
);
|
||||||
// if (props.preferType == "dialog") {
|
// if (props.preferType == "dialog") {
|
||||||
// history.pushState(null, "", location.href);
|
// history.pushState(null, "", location.href);
|
||||||
|
@ -384,7 +384,7 @@ onMounted(() => {
|
||||||
|
|
||||||
align();
|
align();
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
@ -414,7 +414,8 @@ defineExpose({
|
||||||
|
|
||||||
> .content {
|
> .content {
|
||||||
transform: translateY(0px);
|
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;
|
transform 0.3s cubic-bezier(0.5, -0.5, 1, 0.5) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -439,7 +440,9 @@ defineExpose({
|
||||||
|
|
||||||
> .content {
|
> .content {
|
||||||
transform-origin: var(--transformOrigin);
|
transform-origin: var(--transformOrigin);
|
||||||
transition: opacity 0.2s, transform 0.2s !important;
|
transition:
|
||||||
|
opacity 0.2s,
|
||||||
|
transform 0.2s !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.transition_modal_enterFrom,
|
.transition_modal_enterFrom,
|
||||||
|
@ -464,7 +467,8 @@ defineExpose({
|
||||||
|
|
||||||
> .content {
|
> .content {
|
||||||
transform-origin: var(--transformOrigin);
|
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;
|
transform 0.2s cubic-bezier(0, 0, 0.2, 1) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ const props = withDefaults(
|
||||||
width: 400,
|
width: 400,
|
||||||
height: null,
|
height: null,
|
||||||
scroll: true,
|
scroll: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -128,8 +128,15 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="detailedView || (appearNote.channel && !inChannel)" class="info">
|
<div
|
||||||
<MkA v-if="detailedView" class="created-at" :to="notePage(appearNote)">
|
v-if="detailedView || (appearNote.channel && !inChannel)"
|
||||||
|
class="info"
|
||||||
|
>
|
||||||
|
<MkA
|
||||||
|
v-if="detailedView"
|
||||||
|
class="created-at"
|
||||||
|
:to="notePage(appearNote)"
|
||||||
|
>
|
||||||
<MkTime :time="appearNote.createdAt" mode="absolute" />
|
<MkTime :time="appearNote.createdAt" mode="absolute" />
|
||||||
</MkA>
|
</MkA>
|
||||||
<MkA
|
<MkA
|
||||||
|
@ -173,7 +180,7 @@
|
||||||
:count="
|
:count="
|
||||||
Object.values(appearNote.reactions).reduce(
|
Object.values(appearNote.reactions).reduce(
|
||||||
(partialSum, val) => partialSum + val,
|
(partialSum, val) => partialSum + val,
|
||||||
0
|
0,
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
:reacted="appearNote.myReaction != null"
|
:reacted="appearNote.myReaction != null"
|
||||||
|
@ -332,7 +339,7 @@ const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
||||||
const renoteTime = ref<HTMLElement>();
|
const renoteTime = ref<HTMLElement>();
|
||||||
const reactButton = ref<HTMLElement>();
|
const reactButton = ref<HTMLElement>();
|
||||||
let appearNote = $computed(() =>
|
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 isMyRenote = $i && $i.id === note.userId;
|
||||||
const showContent = ref(false);
|
const showContent = ref(false);
|
||||||
|
@ -369,7 +376,7 @@ function reply(viaKeyboard = false): void {
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
focus();
|
focus();
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -386,7 +393,7 @@ function react(viaKeyboard = false): void {
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
focus();
|
focus();
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -400,7 +407,7 @@ function undoReact(note): void {
|
||||||
|
|
||||||
const currentClipPage = inject<Ref<misskey.entities.Clip> | null>(
|
const currentClipPage = inject<Ref<misskey.entities.Clip> | null>(
|
||||||
"currentClipPage",
|
"currentClipPage",
|
||||||
null
|
null,
|
||||||
);
|
);
|
||||||
|
|
||||||
function onContextmenu(ev: MouseEvent): void {
|
function onContextmenu(ev: MouseEvent): void {
|
||||||
|
@ -466,7 +473,7 @@ function onContextmenu(ev: MouseEvent): void {
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
],
|
],
|
||||||
ev
|
ev,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -484,7 +491,7 @@ function menu(viaKeyboard = false): void {
|
||||||
menuButton.value,
|
menuButton.value,
|
||||||
{
|
{
|
||||||
viaKeyboard,
|
viaKeyboard,
|
||||||
}
|
},
|
||||||
).then(focus);
|
).then(focus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -507,7 +514,7 @@ function showRenoteMenu(viaKeyboard = false): void {
|
||||||
renoteTime.value,
|
renoteTime.value,
|
||||||
{
|
{
|
||||||
viaKeyboard: viaKeyboard,
|
viaKeyboard: viaKeyboard,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,7 @@ let isScrolling;
|
||||||
|
|
||||||
const reactionsCount = Object.values(props.note.reactions).reduce(
|
const reactionsCount = Object.values(props.note.reactions).reduce(
|
||||||
(x, y) => x + y,
|
(x, y) => x + y,
|
||||||
0
|
0,
|
||||||
);
|
);
|
||||||
|
|
||||||
const keymap = {
|
const keymap = {
|
||||||
|
@ -274,7 +274,7 @@ function react(viaKeyboard = false): void {
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
focus();
|
focus();
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,7 +308,7 @@ function onContextmenu(ev: MouseEvent): void {
|
||||||
menuButton,
|
menuButton,
|
||||||
isDeleted,
|
isDeleted,
|
||||||
}),
|
}),
|
||||||
ev
|
ev,
|
||||||
).then(focus);
|
).then(focus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -325,7 +325,7 @@ function menu(viaKeyboard = false): void {
|
||||||
menuButton.value,
|
menuButton.value,
|
||||||
{
|
{
|
||||||
viaKeyboard,
|
viaKeyboard,
|
||||||
}
|
},
|
||||||
).then(focus);
|
).then(focus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -551,7 +551,9 @@ onUnmounted(() => {
|
||||||
background: var(--panelHighlight);
|
background: var(--panelHighlight);
|
||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity 0.2s, background 0.2s;
|
transition:
|
||||||
|
opacity 0.2s,
|
||||||
|
background 0.2s;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
}
|
}
|
||||||
&.reply-to {
|
&.reply-to {
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
v-tooltip.noDelay="
|
v-tooltip.noDelay="
|
||||||
i18n.t('edited', {
|
i18n.t('edited', {
|
||||||
date: new Date(
|
date: new Date(
|
||||||
note.updatedAt
|
note.updatedAt,
|
||||||
).toLocaleDateString(),
|
).toLocaleDateString(),
|
||||||
time: new Date(
|
time: new Date(
|
||||||
note.updatedAt
|
note.updatedAt,
|
||||||
).toLocaleTimeString(),
|
).toLocaleTimeString(),
|
||||||
})
|
})
|
||||||
"
|
"
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
:count="
|
:count="
|
||||||
Object.values(appearNote.reactions).reduce(
|
Object.values(appearNote.reactions).reduce(
|
||||||
(partialSum, val) => partialSum + val,
|
(partialSum, val) => partialSum + val,
|
||||||
0
|
0,
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
:reacted="appearNote.myReaction != null"
|
:reacted="appearNote.myReaction != null"
|
||||||
|
@ -220,7 +220,7 @@ const props = withDefaults(
|
||||||
{
|
{
|
||||||
depth: 1,
|
depth: 1,
|
||||||
replyLevel: 1,
|
replyLevel: 1,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
let note = $ref(deepClone(props.note));
|
let note = $ref(deepClone(props.note));
|
||||||
|
@ -248,7 +248,7 @@ const starButton = ref<InstanceType<typeof XStarButton>>();
|
||||||
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
||||||
const reactButton = ref<HTMLElement>();
|
const reactButton = ref<HTMLElement>();
|
||||||
let appearNote = $computed(() =>
|
let appearNote = $computed(() =>
|
||||||
isRenote ? (note.renote as misskey.entities.Note) : note
|
isRenote ? (note.renote as misskey.entities.Note) : note,
|
||||||
);
|
);
|
||||||
const isDeleted = ref(false);
|
const isDeleted = ref(false);
|
||||||
const muted = ref(getWordSoftMute(note, $i, defaultStore.state.mutedWords));
|
const muted = ref(getWordSoftMute(note, $i, defaultStore.state.mutedWords));
|
||||||
|
@ -259,7 +259,7 @@ const replies: misskey.entities.Note[] =
|
||||||
?.filter(
|
?.filter(
|
||||||
(item) =>
|
(item) =>
|
||||||
item.replyId === props.note.id ||
|
item.replyId === props.note.id ||
|
||||||
item.renoteId === props.note.id
|
item.renoteId === props.note.id,
|
||||||
)
|
)
|
||||||
.reverse() ?? [];
|
.reverse() ?? [];
|
||||||
const enableEmojiReactions = defaultStore.state.enableEmojiReactions;
|
const enableEmojiReactions = defaultStore.state.enableEmojiReactions;
|
||||||
|
@ -294,7 +294,7 @@ function react(viaKeyboard = false): void {
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
focus();
|
focus();
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,7 +308,7 @@ function undoReact(note): void {
|
||||||
|
|
||||||
const currentClipPage = inject<Ref<misskey.entities.Clip> | null>(
|
const currentClipPage = inject<Ref<misskey.entities.Clip> | null>(
|
||||||
"currentClipPage",
|
"currentClipPage",
|
||||||
null
|
null,
|
||||||
);
|
);
|
||||||
|
|
||||||
function menu(viaKeyboard = false): void {
|
function menu(viaKeyboard = false): void {
|
||||||
|
@ -324,7 +324,7 @@ function menu(viaKeyboard = false): void {
|
||||||
menuButton.value,
|
menuButton.value,
|
||||||
{
|
{
|
||||||
viaKeyboard,
|
viaKeyboard,
|
||||||
}
|
},
|
||||||
).then(focus);
|
).then(focus);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -389,7 +389,7 @@ function onContextmenu(ev: MouseEvent): void {
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
],
|
],
|
||||||
ev
|
ev,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@
|
||||||
notification.reaction
|
notification.reaction
|
||||||
? notification.reaction.replace(
|
? notification.reaction.replace(
|
||||||
/^:(\w+):$/,
|
/^:(\w+):$/,
|
||||||
':$1@.:'
|
':$1@.:',
|
||||||
)
|
)
|
||||||
: notification.reaction
|
: notification.reaction
|
||||||
"
|
"
|
||||||
|
@ -297,7 +297,7 @@ const props = withDefaults(
|
||||||
{
|
{
|
||||||
withTime: false,
|
withTime: false,
|
||||||
full: false,
|
full: false,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const elRef = ref<HTMLElement>(null);
|
const elRef = ref<HTMLElement>(null);
|
||||||
|
@ -378,7 +378,7 @@ useTooltip(reactionRef, (showing) => {
|
||||||
targetElement: reactionRef.value.$el,
|
targetElement: reactionRef.value.$el,
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
"closed"
|
"closed",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -60,7 +60,7 @@ const props = withDefaults(
|
||||||
{
|
{
|
||||||
includingTypes: () => [],
|
includingTypes: () => [],
|
||||||
showGlobalToggle: true,
|
showGlobalToggle: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
let includingTypes = $computed(() => props.includingTypes || []);
|
let includingTypes = $computed(() => props.includingTypes || []);
|
||||||
|
@ -70,7 +70,7 @@ const dialog = $ref<InstanceType<typeof XModalWindow>>();
|
||||||
let typesMap = $ref<Record<(typeof notificationTypes)[number], boolean>>({});
|
let typesMap = $ref<Record<(typeof notificationTypes)[number], boolean>>({});
|
||||||
let useGlobalSetting = $ref(
|
let useGlobalSetting = $ref(
|
||||||
(includingTypes === null || includingTypes.length === 0) &&
|
(includingTypes === null || includingTypes.length === 0) &&
|
||||||
props.showGlobalToggle
|
props.showGlobalToggle,
|
||||||
);
|
);
|
||||||
|
|
||||||
for (const ntype of notificationTypes) {
|
for (const ntype of notificationTypes) {
|
||||||
|
|
|
@ -40,7 +40,9 @@ onMounted(() => {
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.notification-toast-enter-active,
|
.notification-toast-enter-active,
|
||||||
.notification-toast-leave-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-enter-from,
|
||||||
.notification-toast-leave-to {
|
.notification-toast-leave-to {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<XNote
|
<XNote
|
||||||
v-if="
|
v-if="
|
||||||
['reply', 'quote', 'mention'].includes(
|
['reply', 'quote', 'mention'].includes(
|
||||||
notification.type
|
notification.type,
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
:key="notification.id"
|
:key="notification.id"
|
||||||
|
|
|
@ -22,6 +22,6 @@ watch(
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
immediate: true,
|
immediate: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -136,7 +136,7 @@ function back() {
|
||||||
history.pop();
|
history.pop();
|
||||||
router.replace(
|
router.replace(
|
||||||
history[history.length - 1].path,
|
history[history.length - 1].path,
|
||||||
history[history.length - 1].key
|
history[history.length - 1].key,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ import MkButton from "@/components/MkButton.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
export type Paging<
|
export type Paging<
|
||||||
E extends keyof misskey.Endpoints = keyof misskey.Endpoints
|
E extends keyof misskey.Endpoints = keyof misskey.Endpoints,
|
||||||
> = {
|
> = {
|
||||||
endpoint: E;
|
endpoint: E;
|
||||||
limit: number;
|
limit: number;
|
||||||
|
@ -118,7 +118,7 @@ const props = withDefaults(
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
displayLimit: 30,
|
displayLimit: 30,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
@ -186,7 +186,7 @@ const init = async (): Promise<void> => {
|
||||||
(err) => {
|
(err) => {
|
||||||
error.value = true;
|
error.value = true;
|
||||||
fetching.value = false;
|
fetching.value = false;
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -209,10 +209,13 @@ const refresh = async (): void => {
|
||||||
})
|
})
|
||||||
.then(
|
.then(
|
||||||
(res) => {
|
(res) => {
|
||||||
let ids = items.value.reduce((a, b) => {
|
let ids = items.value.reduce(
|
||||||
|
(a, b) => {
|
||||||
a[b.id] = true;
|
a[b.id] = true;
|
||||||
return a;
|
return a;
|
||||||
}, {} as { [id: string]: boolean });
|
},
|
||||||
|
{} as { [id: string]: boolean },
|
||||||
|
);
|
||||||
|
|
||||||
for (let i = 0; i < res.length; i++) {
|
for (let i = 0; i < res.length; i++) {
|
||||||
const item = res[i];
|
const item = res[i];
|
||||||
|
@ -229,7 +232,7 @@ const refresh = async (): void => {
|
||||||
(err) => {
|
(err) => {
|
||||||
error.value = true;
|
error.value = true;
|
||||||
fetching.value = false;
|
fetching.value = false;
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -291,7 +294,7 @@ const fetchMore = async (): Promise<void> => {
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
moreFetching.value = false;
|
moreFetching.value = false;
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -344,7 +347,7 @@ const fetchMoreAhead = async (): Promise<void> => {
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
moreFetching.value = false;
|
moreFetching.value = false;
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -445,7 +448,7 @@ watch(
|
||||||
if (a.length === 0 && b.length === 0) return;
|
if (a.length === 0 && b.length === 0) return;
|
||||||
emit("queue", queue.value.length);
|
emit("queue", queue.value.length);
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
|
@ -73,7 +73,7 @@ const isLocal = computed(() => !props.note.uri);
|
||||||
const isVoted = computed(
|
const isVoted = computed(
|
||||||
() =>
|
() =>
|
||||||
!props.note.poll.multiple &&
|
!props.note.poll.multiple &&
|
||||||
props.note.poll.choices.some((c) => c.isVoted)
|
props.note.poll.choices.some((c) => c.isVoted),
|
||||||
);
|
);
|
||||||
const timer = computed(() =>
|
const timer = computed(() =>
|
||||||
i18n.t(
|
i18n.t(
|
||||||
|
@ -89,8 +89,8 @@ const timer = computed(() =>
|
||||||
m: Math.floor(remaining.value / 60) % 60,
|
m: Math.floor(remaining.value / 60) % 60,
|
||||||
h: Math.floor(remaining.value / 3600) % 24,
|
h: Math.floor(remaining.value / 3600) % 24,
|
||||||
d: Math.floor(remaining.value / 86400),
|
d: Math.floor(remaining.value / 86400),
|
||||||
}
|
},
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const showResult = ref(props.readOnly || isVoted.value);
|
const showResult = ref(props.readOnly || isVoted.value);
|
||||||
|
@ -101,8 +101,8 @@ if (props.note.poll.expiresAt) {
|
||||||
remaining.value = Math.floor(
|
remaining.value = Math.floor(
|
||||||
Math.max(
|
Math.max(
|
||||||
new Date(props.note.poll.expiresAt).getTime() - Date.now(),
|
new Date(props.note.poll.expiresAt).getTime() - Date.now(),
|
||||||
0
|
0,
|
||||||
) / 1000
|
) / 1000,
|
||||||
);
|
);
|
||||||
if (remaining.value === 0) {
|
if (remaining.value === 0) {
|
||||||
showResult.value = true;
|
showResult.value = true;
|
||||||
|
|
|
@ -96,7 +96,7 @@ const emit = defineEmits<{
|
||||||
expiredAfter: number;
|
expiredAfter: number;
|
||||||
choices: string[];
|
choices: string[];
|
||||||
multiple: boolean;
|
multiple: boolean;
|
||||||
}
|
},
|
||||||
): void;
|
): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ const choices = ref(props.modelValue.choices);
|
||||||
const multiple = ref(props.modelValue.multiple);
|
const multiple = ref(props.modelValue.multiple);
|
||||||
const expiration = ref("infinite");
|
const expiration = ref("infinite");
|
||||||
const atDate = ref(
|
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 atTime = ref("00:00");
|
||||||
const after = ref(0);
|
const after = ref(0);
|
||||||
|
@ -176,7 +176,7 @@ watch(
|
||||||
() => emit("update:modelValue", get()),
|
() => emit("update:modelValue", get()),
|
||||||
{
|
{
|
||||||
deep: true,
|
deep: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -284,7 +284,7 @@ const props = withDefaults(
|
||||||
initialVisibleUsers: () => [],
|
initialVisibleUsers: () => [],
|
||||||
autofocus: true,
|
autofocus: true,
|
||||||
showMfmCheatSheet: true,
|
showMfmCheatSheet: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
@ -313,14 +313,14 @@ let cw = $ref<string | null>(null);
|
||||||
let localOnly = $ref<boolean>(
|
let localOnly = $ref<boolean>(
|
||||||
props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility
|
props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility
|
||||||
? defaultStore.state.localOnly
|
? defaultStore.state.localOnly
|
||||||
: defaultStore.state.defaultNoteLocalOnly
|
: defaultStore.state.defaultNoteLocalOnly,
|
||||||
);
|
);
|
||||||
let visibility = $ref(
|
let visibility = $ref(
|
||||||
props.initialVisibility ??
|
props.initialVisibility ??
|
||||||
((defaultStore.state.rememberNoteVisibility
|
((defaultStore.state.rememberNoteVisibility
|
||||||
? defaultStore.state.visibility
|
? defaultStore.state.visibility
|
||||||
: defaultStore.state
|
: defaultStore.state
|
||||||
.defaultNoteVisibility) as (typeof misskey.noteVisibilities)[number])
|
.defaultNoteVisibility) as (typeof misskey.noteVisibilities)[number]),
|
||||||
);
|
);
|
||||||
let visibleUsers = $ref([]);
|
let visibleUsers = $ref([]);
|
||||||
if (props.initialVisibleUsers) {
|
if (props.initialVisibleUsers) {
|
||||||
|
@ -405,7 +405,7 @@ const canPost = $computed((): boolean => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const withHashtags = $computed(
|
const withHashtags = $computed(
|
||||||
defaultStore.makeGetterSetter("postFormWithHashtags")
|
defaultStore.makeGetterSetter("postFormWithHashtags"),
|
||||||
);
|
);
|
||||||
const hashtags = $computed(defaultStore.makeGetterSetter("postFormHashtags"));
|
const hashtags = $computed(defaultStore.makeGetterSetter("postFormHashtags"));
|
||||||
|
|
||||||
|
@ -420,7 +420,7 @@ watch(
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true,
|
deep: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
if (props.mention) {
|
if (props.mention) {
|
||||||
|
@ -488,7 +488,7 @@ if (
|
||||||
if (props.reply.visibleUserIds) {
|
if (props.reply.visibleUserIds) {
|
||||||
os.api("users/show", {
|
os.api("users/show", {
|
||||||
userIds: props.reply.visibleUserIds.filter(
|
userIds: props.reply.visibleUserIds.filter(
|
||||||
(uid) => uid !== $i.id && uid !== props.reply.userId
|
(uid) => uid !== $i.id && uid !== props.reply.userId,
|
||||||
),
|
),
|
||||||
}).then((users) => {
|
}).then((users) => {
|
||||||
users.forEach(pushVisibleUser);
|
users.forEach(pushVisibleUser);
|
||||||
|
@ -499,7 +499,7 @@ if (
|
||||||
os.api("users/show", { userId: props.reply.userId }).then(
|
os.api("users/show", { userId: props.reply.userId }).then(
|
||||||
(user) => {
|
(user) => {
|
||||||
pushVisibleUser(user);
|
pushVisibleUser(user);
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -533,7 +533,7 @@ function checkMissingMention() {
|
||||||
for (const x of extractMentions(ast)) {
|
for (const x of extractMentions(ast)) {
|
||||||
if (
|
if (
|
||||||
!visibleUsers.some(
|
!visibleUsers.some(
|
||||||
(u) => u.username === x.username && u.host === x.host
|
(u) => u.username === x.username && u.host === x.host,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
hasNotSpecifiedMentions = true;
|
hasNotSpecifiedMentions = true;
|
||||||
|
@ -550,13 +550,13 @@ function addMissingMention() {
|
||||||
for (const x of extractMentions(ast)) {
|
for (const x of extractMentions(ast)) {
|
||||||
if (
|
if (
|
||||||
!visibleUsers.some(
|
!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(
|
os.api("users/show", { username: x.username, host: x.host }).then(
|
||||||
(user) => {
|
(user) => {
|
||||||
visibleUsers.push(user);
|
visibleUsers.push(user);
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -584,7 +584,7 @@ function focus() {
|
||||||
textareaEl.focus();
|
textareaEl.focus();
|
||||||
textareaEl.setSelectionRange(
|
textareaEl.setSelectionRange(
|
||||||
textareaEl.value.length,
|
textareaEl.value.length,
|
||||||
textareaEl.value.length
|
textareaEl.value.length,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -595,7 +595,7 @@ function chooseFileFrom(ev) {
|
||||||
for (const file of files_) {
|
for (const file of files_) {
|
||||||
files.push(file);
|
files.push(file);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -629,7 +629,7 @@ function setVisibility() {
|
||||||
|
|
||||||
os.popup(
|
os.popup(
|
||||||
defineAsyncComponent(
|
defineAsyncComponent(
|
||||||
() => import("@/components/MkVisibilityPicker.vue")
|
() => import("@/components/MkVisibilityPicker.vue"),
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
currentVisibility: visibility,
|
currentVisibility: visibility,
|
||||||
|
@ -650,14 +650,14 @@ function setVisibility() {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"closed"
|
"closed",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushVisibleUser(user) {
|
function pushVisibleUser(user) {
|
||||||
if (
|
if (
|
||||||
!visibleUsers.some(
|
!visibleUsers.some(
|
||||||
(u) => u.username === user.username && u.host === user.host
|
(u) => u.username === user.username && u.host === user.host,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
visibleUsers.push(user);
|
visibleUsers.push(user);
|
||||||
|
@ -703,7 +703,7 @@ function onCompositionEnd(ev: CompositionEvent) {
|
||||||
|
|
||||||
async function onPaste(ev: ClipboardEvent) {
|
async function onPaste(ev: ClipboardEvent) {
|
||||||
for (const { item, i } of Array.from(ev.clipboardData.items).map(
|
for (const { item, i } of Array.from(ev.clipboardData.items).map(
|
||||||
(item, i) => ({ item, i })
|
(item, i) => ({ item, i }),
|
||||||
)) {
|
)) {
|
||||||
if (item.kind === "file") {
|
if (item.kind === "file") {
|
||||||
const file = item.getAsFile();
|
const file = item.getAsFile();
|
||||||
|
@ -711,7 +711,7 @@ async function onPaste(ev: ClipboardEvent) {
|
||||||
const ext = lio >= 0 ? file.name.slice(lio) : "";
|
const ext = lio >= 0 ? file.name.slice(lio) : "";
|
||||||
const formatted = `${formatTimeString(
|
const formatted = `${formatTimeString(
|
||||||
new Date(file.lastModified),
|
new Date(file.lastModified),
|
||||||
defaultStore.state.pastedFileName
|
defaultStore.state.pastedFileName,
|
||||||
).replace(/{{number}}/g, `${i + 1}`)}${ext}`;
|
).replace(/{{number}}/g, `${i + 1}`)}${ext}`;
|
||||||
upload(file, formatted);
|
upload(file, formatted);
|
||||||
}
|
}
|
||||||
|
@ -879,11 +879,11 @@ async function post() {
|
||||||
.filter((x) => x.type === "hashtag")
|
.filter((x) => x.type === "hashtag")
|
||||||
.map((x) => x.props.hashtag);
|
.map((x) => x.props.hashtag);
|
||||||
const history = JSON.parse(
|
const history = JSON.parse(
|
||||||
localStorage.getItem("hashtags") || "[]"
|
localStorage.getItem("hashtags") || "[]",
|
||||||
) as string[];
|
) as string[];
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
"hashtags",
|
"hashtags",
|
||||||
JSON.stringify(unique(hashtags_.concat(history)))
|
JSON.stringify(unique(hashtags_.concat(history))),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
posting = false;
|
posting = false;
|
||||||
|
@ -930,11 +930,11 @@ function showActions(ev) {
|
||||||
if (key === "text") {
|
if (key === "text") {
|
||||||
text = value;
|
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;
|
visibility = draft.data.visibility;
|
||||||
localOnly = draft.data.localOnly;
|
localOnly = draft.data.localOnly;
|
||||||
files = (draft.data.files || []).filter(
|
files = (draft.data.files || []).filter(
|
||||||
(draftFile) => draftFile
|
(draftFile) => draftFile,
|
||||||
);
|
);
|
||||||
if (draft.data.poll) {
|
if (draft.data.poll) {
|
||||||
poll = draft.data.poll;
|
poll = draft.data.poll;
|
||||||
|
|
|
@ -39,7 +39,7 @@ import { i18n } from "@/i18n";
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
XDraggable: defineAsyncComponent(() =>
|
XDraggable: defineAsyncComponent(() =>
|
||||||
import("vuedraggable").then((x) => x.default)
|
import("vuedraggable").then((x) => x.default),
|
||||||
),
|
),
|
||||||
MkDriveFileThumbnail,
|
MkDriveFileThumbnail,
|
||||||
},
|
},
|
||||||
|
@ -110,7 +110,7 @@ export default defineComponent({
|
||||||
async describe(file) {
|
async describe(file) {
|
||||||
os.popup(
|
os.popup(
|
||||||
defineAsyncComponent(
|
defineAsyncComponent(
|
||||||
() => import("@/components/MkMediaCaption.vue")
|
() => import("@/components/MkMediaCaption.vue"),
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
title: i18n.ts.describeFile,
|
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));
|
.then(() => (this.menu = null));
|
||||||
},
|
},
|
||||||
|
|
|
@ -99,7 +99,7 @@ function subscribe() {
|
||||||
.subscribe({
|
.subscribe({
|
||||||
userVisibleOnly: true,
|
userVisibleOnly: true,
|
||||||
applicationServerKey: urlBase64ToUint8Array(
|
applicationServerKey: urlBase64ToUint8Array(
|
||||||
instance.swPublickey
|
instance.swPublickey,
|
||||||
),
|
),
|
||||||
})
|
})
|
||||||
.then(
|
.then(
|
||||||
|
@ -118,7 +118,7 @@ function subscribe() {
|
||||||
// 通知が許可されていなかったとき
|
// 通知が許可されていなかったとき
|
||||||
if (err?.name === "NotAllowedError") {
|
if (err?.name === "NotAllowedError") {
|
||||||
console.info(
|
console.info(
|
||||||
"User denied the notification permission request."
|
"User denied the notification permission request.",
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -128,10 +128,10 @@ function subscribe() {
|
||||||
// そのサブスクリプションを解除しておく
|
// そのサブスクリプションを解除しておく
|
||||||
// (これは実行されなさそうだけど、おまじない的に古い実装から残してある)
|
// (これは実行されなさそうだけど、おまじない的に古い実装から残してある)
|
||||||
await unsubscribe();
|
await unsubscribe();
|
||||||
}
|
},
|
||||||
),
|
),
|
||||||
null,
|
null,
|
||||||
null
|
null,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ const props = defineProps<{
|
||||||
const canRenote = computed(
|
const canRenote = computed(
|
||||||
() =>
|
() =>
|
||||||
["public", "home"].includes(props.note.visibility) ||
|
["public", "home"].includes(props.note.visibility) ||
|
||||||
props.note.userId === $i?.id
|
props.note.userId === $i?.id,
|
||||||
);
|
);
|
||||||
|
|
||||||
function quote(): void {
|
function quote(): void {
|
||||||
|
|
|
@ -91,10 +91,10 @@ useTooltip(
|
||||||
targetElement: buttonRef.value,
|
targetElement: buttonRef.value,
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
"closed"
|
"closed",
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
100
|
100,
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ const buttonRef = ref<HTMLElement>();
|
||||||
const canRenote = computed(
|
const canRenote = computed(
|
||||||
() =>
|
() =>
|
||||||
["public", "home"].includes(props.note.visibility) ||
|
["public", "home"].includes(props.note.visibility) ||
|
||||||
props.note.userId === $i.id
|
props.note.userId === $i.id,
|
||||||
);
|
);
|
||||||
|
|
||||||
useTooltip(buttonRef, async (showing) => {
|
useTooltip(buttonRef, async (showing) => {
|
||||||
|
@ -61,7 +61,7 @@ useTooltip(buttonRef, async (showing) => {
|
||||||
targetElement: buttonRef.value,
|
targetElement: buttonRef.value,
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
"closed"
|
"closed",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ const renote = (viaKeyboard = false, ev?: MouseEvent) => {
|
||||||
renoteId: props.note.id,
|
renoteId: props.note.id,
|
||||||
visibility: props.note.visibility,
|
visibility: props.note.visibility,
|
||||||
localOnly: true,
|
localOnly: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
hasRenotedBefore = true;
|
hasRenotedBefore = true;
|
||||||
const el =
|
const el =
|
||||||
|
|
|
@ -85,7 +85,7 @@ const props = withDefaults(
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
particle: true,
|
particle: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -122,7 +122,7 @@ export default defineComponent({
|
||||||
action: () => {},
|
action: () => {},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ev.currentTarget ?? ev.target
|
ev.currentTarget ?? ev.target,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -223,7 +223,7 @@ function onUsernameChange() {
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
user = null;
|
user = null;
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ function queryKey() {
|
||||||
password,
|
password,
|
||||||
signature: hexify(credential.response.signature),
|
signature: hexify(credential.response.signature),
|
||||||
authenticatorData: hexify(
|
authenticatorData: hexify(
|
||||||
credential.response.authenticatorData
|
credential.response.authenticatorData,
|
||||||
),
|
),
|
||||||
clientDataJSON: hexify(credential.response.clientDataJSON),
|
clientDataJSON: hexify(credential.response.clientDataJSON),
|
||||||
credentialId: credential.id,
|
credentialId: credential.id,
|
||||||
|
@ -370,7 +370,7 @@ function resetPassword() {
|
||||||
defineAsyncComponent(() => import("@/components/MkForgotPassword.vue")),
|
defineAsyncComponent(() => import("@/components/MkForgotPassword.vue")),
|
||||||
{},
|
{},
|
||||||
{},
|
{},
|
||||||
"closed"
|
"closed",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ const props = withDefaults(
|
||||||
{
|
{
|
||||||
autoSet: false,
|
autoSet: false,
|
||||||
message: "",
|
message: "",
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -303,7 +303,7 @@ const props = withDefaults(
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
autoSet: false,
|
autoSet: false,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -31,7 +31,7 @@ const props = withDefaults(
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
autoSet: false,
|
autoSet: false,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -105,13 +105,16 @@ onMounted(() => {
|
||||||
particles.value.push(particle);
|
particles.value.push(particle);
|
||||||
window.setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
particles.value = particles.value.filter(
|
particles.value = particles.value.filter(
|
||||||
(x) => x.id !== particle.id
|
(x) => x.id !== particle.id,
|
||||||
);
|
);
|
||||||
}, particle.dur - 100);
|
}, particle.dur - 100);
|
||||||
|
|
||||||
window.setTimeout(() => {
|
window.setTimeout(
|
||||||
|
() => {
|
||||||
add();
|
add();
|
||||||
}, 500 + Math.random() * 500);
|
},
|
||||||
|
500 + Math.random() * 500,
|
||||||
|
);
|
||||||
};
|
};
|
||||||
add();
|
add();
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ useTooltip(buttonRef, async (showing) => {
|
||||||
targetElement: buttonRef.value,
|
targetElement: buttonRef.value,
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
"closed"
|
"closed",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -38,15 +38,15 @@ export default defineComponent({
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
this.$emit(
|
this.$emit(
|
||||||
"update:modelValue",
|
"update:modelValue",
|
||||||
option.props?.value
|
option.props?.value,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
option.children
|
option.children,
|
||||||
|
),
|
||||||
|
[[resolveDirective("click-anime")]],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
[[resolveDirective("click-anime")]]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -28,7 +28,7 @@ const idForCanvas = Array.from(Array(16))
|
||||||
() =>
|
() =>
|
||||||
SAFE_FOR_HTML_ID[
|
SAFE_FOR_HTML_ID[
|
||||||
Math.floor(Math.random() * SAFE_FOR_HTML_ID.length)
|
Math.floor(Math.random() * SAFE_FOR_HTML_ID.length)
|
||||||
]
|
],
|
||||||
)
|
)
|
||||||
.join("");
|
.join("");
|
||||||
const idForTags = Array.from(Array(16))
|
const idForTags = Array.from(Array(16))
|
||||||
|
@ -36,7 +36,7 @@ const idForTags = Array.from(Array(16))
|
||||||
() =>
|
() =>
|
||||||
SAFE_FOR_HTML_ID[
|
SAFE_FOR_HTML_ID[
|
||||||
Math.floor(Math.random() * SAFE_FOR_HTML_ID.length)
|
Math.floor(Math.random() * SAFE_FOR_HTML_ID.length)
|
||||||
]
|
],
|
||||||
)
|
)
|
||||||
.join("");
|
.join("");
|
||||||
let available = $ref(false);
|
let available = $ref(false);
|
||||||
|
@ -50,7 +50,7 @@ watch($$(available), () => {
|
||||||
window.TagCanvas.Start(idForCanvas, idForTags, {
|
window.TagCanvas.Start(idForCanvas, idForTags, {
|
||||||
textColour: "#ffffff",
|
textColour: "#ffffff",
|
||||||
outlineColour: tinycolor(
|
outlineColour: tinycolor(
|
||||||
computedStyle.getPropertyValue("--accent")
|
computedStyle.getPropertyValue("--accent"),
|
||||||
).toHexString(),
|
).toHexString(),
|
||||||
outlineRadius: 10,
|
outlineRadius: 10,
|
||||||
initial: [-0.03, -0.01],
|
initial: [-0.03, -0.01],
|
||||||
|
@ -80,7 +80,7 @@ onMounted(() => {
|
||||||
Object.assign(document.createElement("script"), {
|
Object.assign(document.createElement("script"), {
|
||||||
async: true,
|
async: true,
|
||||||
src: "/client-assets/tagcanvas.min.js",
|
src: "/client-assets/tagcanvas.min.js",
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
.addEventListener("load", () => (available = true));
|
.addEventListener("load", () => (available = true));
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ const emit = defineEmits<{
|
||||||
|
|
||||||
provide(
|
provide(
|
||||||
"inChannel",
|
"inChannel",
|
||||||
computed(() => props.src === "channel")
|
computed(() => props.src === "channel"),
|
||||||
);
|
);
|
||||||
|
|
||||||
const tlComponent: InstanceType<typeof XNotes> = $ref();
|
const tlComponent: InstanceType<typeof XNotes> = $ref();
|
||||||
|
@ -293,7 +293,8 @@ const timetravel = (date?: Date) => {
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
transform: translateY(-100%);
|
transform: translateY(-100%);
|
||||||
opacity: 0;
|
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);
|
slideUp 1s 5s forwards cubic-bezier(1, 0, 1, 1);
|
||||||
&::before {
|
&::before {
|
||||||
content: "";
|
content: "";
|
||||||
|
|
|
@ -42,7 +42,9 @@ onMounted(() => {
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.toast-enter-active,
|
.toast-enter-active,
|
||||||
.toast-leave-active {
|
.toast-leave-active {
|
||||||
transition: opacity 0.3s, transform 0.3s !important;
|
transition:
|
||||||
|
opacity 0.3s,
|
||||||
|
transform 0.3s !important;
|
||||||
}
|
}
|
||||||
.toast-enter-from,
|
.toast-enter-from,
|
||||||
.toast-leave-to {
|
.toast-leave-to {
|
||||||
|
|
|
@ -64,7 +64,7 @@ const props = withDefaults(
|
||||||
information: null,
|
information: null,
|
||||||
initialName: null,
|
initialName: null,
|
||||||
initialPermissions: null,
|
initialPermissions: null,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -39,7 +39,7 @@ const props = withDefaults(
|
||||||
maxWidth: 250,
|
maxWidth: 250,
|
||||||
direction: "top",
|
direction: "top",
|
||||||
innerMargin: 0,
|
innerMargin: 0,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
@ -91,7 +91,8 @@ onUnmounted(() => {
|
||||||
.tooltip-leave-active {
|
.tooltip-leave-active {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: scale(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);
|
opacity 200ms cubic-bezier(0.23, 1, 0.32, 1);
|
||||||
}
|
}
|
||||||
.tooltip-enter-from,
|
.tooltip-enter-from,
|
||||||
|
|
|
@ -265,15 +265,15 @@ const autoplayMfm = computed(
|
||||||
defaultStore.makeGetterSetter(
|
defaultStore.makeGetterSetter(
|
||||||
"animatedMfm",
|
"animatedMfm",
|
||||||
(v) => !v,
|
(v) => !v,
|
||||||
(v) => !v
|
(v) => !v,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
const reduceAnimation = computed(
|
const reduceAnimation = computed(
|
||||||
defaultStore.makeGetterSetter(
|
defaultStore.makeGetterSetter(
|
||||||
"animation",
|
"animation",
|
||||||
(v) => !v,
|
(v) => !v,
|
||||||
(v) => !v
|
(v) => !v,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
function close(res) {
|
function close(res) {
|
||||||
|
|
|
@ -111,7 +111,7 @@ const props = withDefaults(
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
detail: false,
|
detail: false,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const self = props.url.startsWith(local);
|
const self = props.url.startsWith(local);
|
||||||
|
@ -158,7 +158,7 @@ const requestLang = (lang || "ja-JP").replace("ja-KS", "ja-JP");
|
||||||
requestUrl.hash = "";
|
requestUrl.hash = "";
|
||||||
|
|
||||||
fetch(
|
fetch(
|
||||||
`/url?url=${encodeURIComponent(requestUrl.href)}&lang=${requestLang}`
|
`/url?url=${encodeURIComponent(requestUrl.href)}&lang=${requestLang}`,
|
||||||
).then((res) => {
|
).then((res) => {
|
||||||
res.json().then((info) => {
|
res.json().then((info) => {
|
||||||
if (info.url == null) return;
|
if (info.url == null) return;
|
||||||
|
@ -221,7 +221,10 @@ onUnmounted(() => {
|
||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
transform: scale(0.95);
|
transform: scale(0.95);
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
transition: transform 0.2s, opacity 0.2s, background 0.2s;
|
transition:
|
||||||
|
transform 0.2s,
|
||||||
|
opacity 0.2s,
|
||||||
|
background 0.2s;
|
||||||
}
|
}
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
|
|
|
@ -36,7 +36,7 @@ const props = withDefaults(
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
withChart: true,
|
withChart: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
let chartValues = $ref<number[] | null>(null);
|
let chartValues = $ref<number[] | null>(null);
|
||||||
|
|
|
@ -180,7 +180,9 @@ onMounted(() => {
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.popup-enter-active,
|
.popup-enter-active,
|
||||||
.popup-leave-active {
|
.popup-leave-active {
|
||||||
transition: opacity 0.3s, transform 0.3s !important;
|
transition:
|
||||||
|
opacity 0.3s,
|
||||||
|
transform 0.3s !important;
|
||||||
}
|
}
|
||||||
.popup-enter-from,
|
.popup-enter-from,
|
||||||
.popup-leave-to {
|
.popup-leave-to {
|
||||||
|
|
|
@ -57,7 +57,7 @@ if (props.note.visibility === "specified") {
|
||||||
targetElement: specified,
|
targetElement: specified,
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
"closed"
|
"closed",
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,13 +135,13 @@ const props = withDefaults(
|
||||||
currentLocalOnly: boolean;
|
currentLocalOnly: boolean;
|
||||||
src?: HTMLElement;
|
src?: HTMLElement;
|
||||||
}>(),
|
}>(),
|
||||||
{}
|
{},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(
|
(
|
||||||
ev: "changeVisibility",
|
ev: "changeVisibility",
|
||||||
v: (typeof misskey.noteVisibilities)[number]
|
v: (typeof misskey.noteVisibilities)[number],
|
||||||
): void;
|
): void;
|
||||||
(ev: "changeLocalOnly", v: boolean): void;
|
(ev: "changeLocalOnly", v: boolean): void;
|
||||||
(ev: "closed"): void;
|
(ev: "closed"): void;
|
||||||
|
|
|
@ -55,7 +55,7 @@ watch(
|
||||||
() => props.showing,
|
() => props.showing,
|
||||||
() => {
|
() => {
|
||||||
if (!props.showing) done();
|
if (!props.showing) done();
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ function onContextmenu(widget: Widget, ev: MouseEvent) {
|
||||||
if (isLink(ev.target)) return;
|
if (isLink(ev.target)) return;
|
||||||
if (
|
if (
|
||||||
["INPUT", "TEXTAREA", "IMG", "VIDEO", "CANVAS"].includes(
|
["INPUT", "TEXTAREA", "IMG", "VIDEO", "CANVAS"].includes(
|
||||||
ev.target.tagName
|
ev.target.tagName,
|
||||||
) ||
|
) ||
|
||||||
ev.target.attributes["contenteditable"]
|
ev.target.attributes["contenteditable"]
|
||||||
)
|
)
|
||||||
|
@ -165,7 +165,7 @@ function onContextmenu(widget: Widget, ev: MouseEvent) {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ev
|
ev,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -161,7 +161,7 @@ const props = withDefaults(
|
||||||
contextmenu: null,
|
contextmenu: null,
|
||||||
buttonsLeft: () => [],
|
buttonsLeft: () => [],
|
||||||
buttonsRight: () => [],
|
buttonsRight: () => [],
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
@ -512,7 +512,9 @@ defineExpose({
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.window-enter-active,
|
.window-enter-active,
|
||||||
.window-leave-active {
|
.window-leave-active {
|
||||||
transition: opacity 0.2s, transform 0.2s !important;
|
transition:
|
||||||
|
opacity 0.2s,
|
||||||
|
transform 0.2s !important;
|
||||||
}
|
}
|
||||||
.window-enter-from,
|
.window-enter-from,
|
||||||
.window-leave-to {
|
.window-leave-to {
|
||||||
|
|
|
@ -169,7 +169,7 @@ useInterval(
|
||||||
{
|
{
|
||||||
immediate: true,
|
immediate: true,
|
||||||
afterMounted: true,
|
afterMounted: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
|
@ -43,7 +43,7 @@ export default defineComponent({
|
||||||
{
|
{
|
||||||
class: "label",
|
class: "label",
|
||||||
},
|
},
|
||||||
[label]
|
[label],
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
: []),
|
: []),
|
||||||
|
@ -63,9 +63,9 @@ export default defineComponent({
|
||||||
"onUpdate:modelValue": (value) =>
|
"onUpdate:modelValue": (value) =>
|
||||||
(this.value = value),
|
(this.value = value),
|
||||||
},
|
},
|
||||||
option.children
|
option.children,
|
||||||
)
|
),
|
||||||
)
|
),
|
||||||
),
|
),
|
||||||
...(caption
|
...(caption
|
||||||
? [
|
? [
|
||||||
|
@ -74,11 +74,11 @@ export default defineComponent({
|
||||||
{
|
{
|
||||||
class: "caption",
|
class: "caption",
|
||||||
},
|
},
|
||||||
[caption]
|
[caption],
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
: []),
|
: []),
|
||||||
]
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -55,7 +55,7 @@ const props = withDefaults(
|
||||||
step: 1,
|
step: 1,
|
||||||
textConverter: (v) => v.toString(),
|
textConverter: (v) => v.toString(),
|
||||||
easing: false,
|
easing: false,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const inputEl = ref<HTMLElement>();
|
const inputEl = ref<HTMLElement>();
|
||||||
|
@ -90,7 +90,7 @@ function tooltipShow() {
|
||||||
targetElement: inputEl,
|
targetElement: inputEl,
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
"closed"
|
"closed",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
function tooltipHide() {
|
function tooltipHide() {
|
||||||
|
|
|
@ -135,7 +135,7 @@ useInterval(
|
||||||
{
|
{
|
||||||
immediate: true,
|
immediate: true,
|
||||||
afterMounted: true,
|
afterMounted: true,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
|
@ -11,7 +11,7 @@ const props = withDefaults(
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
minWidth: 210,
|
minWidth: 210,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const minWidth = props.minWidth + "px";
|
const minWidth = props.minWidth + "px";
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue