mirror of
https://github.com/MisskeyIO/misskey
synced 2024-11-27 06:18:40 +09:00
Merge remote-tracking branch 'misskey-dev/develop' into io
This commit is contained in:
commit
f2743a09e2
@ -38,7 +38,8 @@
|
||||
- Enhance: フォローするかどうかの確認ダイアログを出せるように
|
||||
- Enhance: Playを手動でリロードできるように
|
||||
- Enhance: 通報のコメント内のリンクをクリックした際、ウィンドウで開くように
|
||||
- Chore: AiScriptを0.18.0にバージョンアップ
|
||||
- Enhance: `Ui:C:postForm` および `Ui:C:postFormButton` に `localOnly` と `visibility` を設定できるように
|
||||
- Enhance: AiScriptを0.18.0にバージョンアップ
|
||||
- Fix: 一部のページ内リンクが正しく動作しない問題を修正
|
||||
- Fix: 周年の実績が閏年を考慮しない問題を修正
|
||||
- Fix: ローカルURLのプレビューポップアップが左上に表示される
|
||||
@ -62,6 +63,8 @@
|
||||
### Server
|
||||
- Enhance: エンドポイント`antennas/update`の必須項目を`antennaId`のみに
|
||||
- Enhance: misskey-dev/summaly@5.1.0の取り込み(プレビュー生成処理の効率化)
|
||||
- Enhance: ドライブのファイルがNSFWかどうか個別に連合されるように (#13756)
|
||||
- 可能な場合、ノートの添付ファイルのセンシティブ判定がファイル単位になります
|
||||
- Fix: リモートから配送されたアクティビティにJSON-LD compactionをかける
|
||||
- Fix: フォローリクエストを作成する際に既存のものは削除するように
|
||||
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/440)
|
||||
@ -77,8 +80,6 @@
|
||||
- Fix: グローバルタイムラインで返信が表示されないことがある問題を修正
|
||||
- Fix: リノートをミュートしたユーザの投稿のリノートがミュートされる問題を修正
|
||||
- Fix: AP Link等は添付ファイル扱いしないようになど (#13754)
|
||||
- Enhance: ドライブのファイルがNSFWかどうか個別に連合されるように (#13756)
|
||||
- 可能な場合、ノートの添付ファイルのセンシティブ判定がファイル単位になります
|
||||
|
||||
## 2024.3.1
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/MisskeyIO/misskey.git"
|
||||
},
|
||||
"packageManager": "pnpm@9.0.6",
|
||||
"packageManager": "pnpm@9.1.0",
|
||||
"workspaces": [
|
||||
"packages/frontend",
|
||||
"packages/backend",
|
||||
@ -48,6 +48,7 @@
|
||||
"resolutions": {
|
||||
"@tensorflow/tfjs-core": "4.19.0",
|
||||
"chokidar": "3.6.0",
|
||||
"esbuild": "0.21.1",
|
||||
"lodash": "4.17.21",
|
||||
"sharp": "0.33.3"
|
||||
},
|
||||
@ -60,11 +61,11 @@
|
||||
"typescript": "5.4.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "20.12.8",
|
||||
"@types/node": "20.12.11",
|
||||
"@typescript-eslint/eslint-plugin": "7.8.0",
|
||||
"@typescript-eslint/parser": "7.8.0",
|
||||
"cross-env": "7.0.3",
|
||||
"cypress": "13.8.1",
|
||||
"cypress": "13.9.0",
|
||||
"eslint": "8.57.0",
|
||||
"ncp": "2.0.0",
|
||||
"start-server-and-test": "2.0.3"
|
||||
|
@ -35,17 +35,17 @@
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@swc/core-android-arm64": "1.3.11",
|
||||
"@swc/core-darwin-arm64": "1.5.2",
|
||||
"@swc/core-darwin-x64": "1.5.0",
|
||||
"@swc/core-darwin-arm64": "1.5.5",
|
||||
"@swc/core-darwin-x64": "1.5.5",
|
||||
"@swc/core-freebsd-x64": "1.3.11",
|
||||
"@swc/core-linux-arm-gnueabihf": "1.5.2",
|
||||
"@swc/core-linux-arm64-gnu": "1.5.2",
|
||||
"@swc/core-linux-arm64-musl": "1.5.2",
|
||||
"@swc/core-linux-x64-gnu": "1.5.2",
|
||||
"@swc/core-linux-x64-musl": "1.5.2",
|
||||
"@swc/core-win32-arm64-msvc": "1.5.2",
|
||||
"@swc/core-win32-ia32-msvc": "1.5.2",
|
||||
"@swc/core-win32-x64-msvc": "1.5.2",
|
||||
"@swc/core-linux-arm-gnueabihf": "1.5.5",
|
||||
"@swc/core-linux-arm64-gnu": "1.5.5",
|
||||
"@swc/core-linux-arm64-musl": "1.5.5",
|
||||
"@swc/core-linux-x64-gnu": "1.5.5",
|
||||
"@swc/core-linux-x64-musl": "1.5.5",
|
||||
"@swc/core-win32-arm64-msvc": "1.5.5",
|
||||
"@swc/core-win32-ia32-msvc": "1.5.5",
|
||||
"@swc/core-win32-x64-msvc": "1.5.5",
|
||||
"@tensorflow/tfjs": "4.19.0",
|
||||
"@tensorflow/tfjs-node": "4.19.0",
|
||||
"bufferutil": "4.0.8",
|
||||
@ -68,9 +68,9 @@
|
||||
"@authenio/samlify-node-xmllint": "2.0.0",
|
||||
"@aws-sdk/client-s3": "3.569.0",
|
||||
"@aws-sdk/lib-storage": "3.569.0",
|
||||
"@bull-board/api": "5.17.0",
|
||||
"@bull-board/fastify": "5.17.0",
|
||||
"@bull-board/ui": "5.17.0",
|
||||
"@bull-board/api": "5.17.1",
|
||||
"@bull-board/fastify": "5.17.1",
|
||||
"@bull-board/ui": "5.17.1",
|
||||
"@discordapp/twemoji": "15.0.3",
|
||||
"@fastify/accepts": "4.3.0",
|
||||
"@fastify/cookie": "9.3.1",
|
||||
@ -79,7 +79,7 @@
|
||||
"@fastify/formbody": "7.4.0",
|
||||
"@fastify/http-proxy": "9.5.0",
|
||||
"@fastify/multipart": "8.2.0",
|
||||
"@fastify/static": "7.0.3",
|
||||
"@fastify/static": "7.0.4",
|
||||
"@fastify/view": "9.1.0",
|
||||
"@misskey-dev/sharp-read-bmp": "1.2.0",
|
||||
"@misskey-dev/summaly": "5.1.0",
|
||||
@ -92,7 +92,7 @@
|
||||
"@sinonjs/fake-timers": "11.2.2",
|
||||
"@smithy/node-http-handler": "2.5.0",
|
||||
"@swc/cli": "0.3.12",
|
||||
"@swc/core": "1.4.17",
|
||||
"@swc/core": "1.5.5",
|
||||
"@twemoji/parser": "15.1.1",
|
||||
"accepts": "1.3.8",
|
||||
"ajv": "8.13.0",
|
||||
@ -112,7 +112,7 @@
|
||||
"content-disposition": "0.5.4",
|
||||
"date-fns": "3.6.0",
|
||||
"deep-email-validator": "0.1.21",
|
||||
"fastify": "4.26.2",
|
||||
"fastify": "4.27.0",
|
||||
"fastify-http-errors-enhanced": "5.0.4",
|
||||
"fastify-raw-body": "4.3.0",
|
||||
"feed": "4.2.2",
|
||||
@ -120,7 +120,7 @@
|
||||
"fluent-ffmpeg": "2.1.2",
|
||||
"form-data": "4.0.0",
|
||||
"got": "14.2.1",
|
||||
"happy-dom": "14.7.1",
|
||||
"happy-dom": "14.10.1",
|
||||
"hpagent": "1.2.0",
|
||||
"htmlescape": "1.1.1",
|
||||
"http-link-header": "1.1.3",
|
||||
@ -134,7 +134,7 @@
|
||||
"json5": "2.2.3",
|
||||
"jsonld": "8.3.2",
|
||||
"jsrsasign": "11.1.0",
|
||||
"meilisearch": "0.38.0",
|
||||
"meilisearch": "0.39.0",
|
||||
"mfm-js": "0.24.0",
|
||||
"microformats-parser": "2.0.2",
|
||||
"mime-types": "2.1.35",
|
||||
@ -151,7 +151,7 @@
|
||||
"oauth2orize": "1.12.0",
|
||||
"oauth2orize-pkce": "0.1.2",
|
||||
"os-utils": "0.0.14",
|
||||
"otpauth": "9.2.3",
|
||||
"otpauth": "9.2.4",
|
||||
"parse5": "7.1.2",
|
||||
"pg": "8.11.5",
|
||||
"pino": "9.0.0",
|
||||
@ -164,7 +164,7 @@
|
||||
"qrcode": "1.5.3",
|
||||
"random-seed": "0.3.0",
|
||||
"ratelimiter": "3.4.1",
|
||||
"re2": "1.20.10",
|
||||
"re2": "1.20.11",
|
||||
"redis-lock": "0.1.4",
|
||||
"reflect-metadata": "0.2.2",
|
||||
"rename": "1.0.4",
|
||||
@ -177,7 +177,7 @@
|
||||
"slacc": "0.0.10",
|
||||
"strict-event-emitter-types": "2.0.0",
|
||||
"stringz": "2.1.0",
|
||||
"systeminformation": "5.22.7",
|
||||
"systeminformation": "5.22.8",
|
||||
"tinycolor2": "1.6.0",
|
||||
"tmp": "0.2.3",
|
||||
"tsc-alias": "1.8.8",
|
||||
@ -213,13 +213,13 @@
|
||||
"@types/jsrsasign": "10.5.14",
|
||||
"@types/mime-types": "2.1.4",
|
||||
"@types/ms": "0.7.34",
|
||||
"@types/node": "20.12.8",
|
||||
"@types/node": "20.12.11",
|
||||
"@types/node-forge": "1.3.11",
|
||||
"@types/nodemailer": "6.4.15",
|
||||
"@types/oauth": "0.9.4",
|
||||
"@types/oauth2orize": "1.11.5",
|
||||
"@types/oauth2orize-pkce": "0.1.2",
|
||||
"@types/pg": "8.11.5",
|
||||
"@types/pg": "8.11.6",
|
||||
"@types/pug": "2.0.10",
|
||||
"@types/punycode": "2.1.4",
|
||||
"@types/qrcode": "1.5.5",
|
||||
|
@ -96,9 +96,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
||||
}
|
||||
|
||||
const keyInfo = await this.webAuthnService.verifyRegistration(me.id, ps.credential);
|
||||
const keyId = keyInfo.credentialID;
|
||||
|
||||
await this.userSecurityKeysRepository.insert({
|
||||
id: keyInfo.credentialID,
|
||||
id: keyId,
|
||||
userId: me.id,
|
||||
name: ps.name,
|
||||
publicKey: Buffer.from(keyInfo.credentialPublicKey).toString('base64url'),
|
||||
@ -115,7 +116,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
||||
}));
|
||||
|
||||
return {
|
||||
id: keyInfo.credentialID,
|
||||
id: keyId,
|
||||
name: ps.name,
|
||||
};
|
||||
});
|
||||
|
@ -199,6 +199,11 @@ export class ClientServerService {
|
||||
|
||||
// Authenticate
|
||||
fastify.addHook('onRequest', async (request, reply) => {
|
||||
if (request.routeOptions.url == null) {
|
||||
reply.code(404).send('Not found');
|
||||
return;
|
||||
}
|
||||
|
||||
// %71ueueとかでリクエストされたら困るため
|
||||
const url = decodeURI(request.routeOptions.url ?? '');
|
||||
if (url === bullBoardPath || url.startsWith(bullBoardPath + '/')) {
|
||||
|
@ -41,7 +41,7 @@
|
||||
"chartjs-chart-matrix": "2.0.1",
|
||||
"chartjs-plugin-gradient": "0.6.1",
|
||||
"chartjs-plugin-zoom": "2.0.1",
|
||||
"chromatic": "11.3.0",
|
||||
"chromatic": "11.3.1",
|
||||
"compare-versions": "6.1.0",
|
||||
"cropperjs": "2.0.0-beta.4",
|
||||
"date-fns": "3.6.0",
|
||||
@ -61,7 +61,7 @@
|
||||
"punycode": "2.3.1",
|
||||
"rollup": "4.17.2",
|
||||
"sanitize-html": "2.13.0",
|
||||
"sass": "1.76.0",
|
||||
"sass": "1.77.0",
|
||||
"shiki": "1.4.0",
|
||||
"strict-event-emitter-types": "2.0.0",
|
||||
"textarea-caret": "3.1.0",
|
||||
@ -72,7 +72,7 @@
|
||||
"tsconfig-paths": "4.2.0",
|
||||
"typescript": "5.4.5",
|
||||
"uuid": "9.0.1",
|
||||
"v-code-diff": "1.11.0",
|
||||
"v-code-diff": "1.12.0",
|
||||
"vite": "5.2.11",
|
||||
"vue": "3.4.15",
|
||||
"vuedraggable": "next"
|
||||
@ -80,30 +80,30 @@
|
||||
"devDependencies": {
|
||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||
"@misskey-dev/summaly": "5.1.0",
|
||||
"@storybook/addon-actions": "8.0.9",
|
||||
"@storybook/addon-essentials": "8.0.9",
|
||||
"@storybook/addon-interactions": "8.0.9",
|
||||
"@storybook/addon-links": "8.0.9",
|
||||
"@storybook/addon-mdx-gfm": "8.0.9",
|
||||
"@storybook/addon-storysource": "8.0.9",
|
||||
"@storybook/blocks": "8.0.9",
|
||||
"@storybook/components": "8.0.9",
|
||||
"@storybook/core-events": "8.0.9",
|
||||
"@storybook/manager-api": "8.0.9",
|
||||
"@storybook/preview-api": "8.0.9",
|
||||
"@storybook/react": "8.0.9",
|
||||
"@storybook/react-vite": "8.0.9",
|
||||
"@storybook/test": "8.0.9",
|
||||
"@storybook/theming": "8.0.9",
|
||||
"@storybook/types": "8.0.9",
|
||||
"@storybook/vue3": "8.0.9",
|
||||
"@storybook/vue3-vite": "8.0.9",
|
||||
"@storybook/addon-actions": "8.0.10",
|
||||
"@storybook/addon-essentials": "8.0.10",
|
||||
"@storybook/addon-interactions": "8.0.10",
|
||||
"@storybook/addon-links": "8.0.10",
|
||||
"@storybook/addon-mdx-gfm": "8.0.10",
|
||||
"@storybook/addon-storysource": "8.0.10",
|
||||
"@storybook/blocks": "8.0.10",
|
||||
"@storybook/components": "8.0.10",
|
||||
"@storybook/core-events": "8.0.10",
|
||||
"@storybook/manager-api": "8.0.10",
|
||||
"@storybook/preview-api": "8.0.10",
|
||||
"@storybook/react": "8.0.10",
|
||||
"@storybook/react-vite": "8.0.10",
|
||||
"@storybook/test": "8.0.10",
|
||||
"@storybook/theming": "8.0.10",
|
||||
"@storybook/types": "8.0.10",
|
||||
"@storybook/vue3": "8.0.10",
|
||||
"@storybook/vue3-vite": "8.0.10",
|
||||
"@testing-library/vue": "8.0.3",
|
||||
"@types/escape-regexp": "0.0.3",
|
||||
"@types/estree": "1.0.5",
|
||||
"@types/matter-js": "0.19.6",
|
||||
"@types/micromatch": "4.0.7",
|
||||
"@types/node": "20.12.8",
|
||||
"@types/node": "20.12.11",
|
||||
"@types/punycode": "2.1.4",
|
||||
"@types/sanitize-html": "2.11.0",
|
||||
"@types/throttle-debounce": "5.0.2",
|
||||
@ -116,22 +116,22 @@
|
||||
"@vue/runtime-core": "3.4.15",
|
||||
"acorn": "8.11.3",
|
||||
"cross-env": "7.0.3",
|
||||
"cypress": "13.8.1",
|
||||
"cypress": "13.9.0",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-plugin-import": "2.29.1",
|
||||
"eslint-plugin-vue": "9.25.0",
|
||||
"fast-glob": "3.3.2",
|
||||
"happy-dom": "14.7.1",
|
||||
"happy-dom": "14.10.1",
|
||||
"intersection-observer": "0.12.2",
|
||||
"micromatch": "4.0.5",
|
||||
"msw": "2.2.14",
|
||||
"msw-storybook-addon": "2.0.1",
|
||||
"msw": "2.3.0",
|
||||
"msw-storybook-addon": "2.0.2",
|
||||
"nodemon": "3.1.0",
|
||||
"prettier": "3.2.5",
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1",
|
||||
"start-server-and-test": "2.0.3",
|
||||
"storybook": "8.0.9",
|
||||
"storybook": "8.0.10",
|
||||
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
|
||||
"vite-plugin-turbosnap": "1.0.3",
|
||||
"vitest": "0.34.6",
|
||||
|
@ -20,7 +20,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</div>
|
||||
<div class="detail">
|
||||
<div>
|
||||
<Mfm :text="report.comment" :linkBehavior="'window'"/>
|
||||
<Mfm :text="report.comment" :linkNavigationBehavior="'window'"/>
|
||||
</div>
|
||||
<hr/>
|
||||
<div>{{ i18n.ts.reporter }}: <MkA :to="`/admin/user/${report.reporter.id}`" class="_link" :behavior="'window'">@{{ report.reporter.username }}</MkA></div>
|
||||
|
@ -44,6 +44,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
:instant="true"
|
||||
:initialText="c.form?.text"
|
||||
:initialCw="c.form?.cw"
|
||||
:initialVisibility="c.form?.visibility"
|
||||
:initialLocalOnly="c.form?.localOnly"
|
||||
/>
|
||||
</div>
|
||||
<MkFolder v-else-if="c.type === 'folder'" :defaultOpen="c.opened">
|
||||
@ -111,6 +113,8 @@ function openPostForm() {
|
||||
os.post({
|
||||
initialText: form.text,
|
||||
initialCw: form.cw,
|
||||
initialVisibility: form.visibility,
|
||||
initialLocalOnly: form.localOnly,
|
||||
instant: true,
|
||||
});
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
:[attr]="self ? url.substring(local.length) : url"
|
||||
:rel="rel ?? 'nofollow noopener'"
|
||||
:target="target"
|
||||
:behavior="props.behavior"
|
||||
:behavior="props.navigationBehavior"
|
||||
:title="url"
|
||||
@click="(ev: MouseEvent) => warningExternalWebsite(ev, url)"
|
||||
>
|
||||
@ -33,7 +33,7 @@ import { MkABehavior } from '@/components/global/MkA.vue';
|
||||
const props = withDefaults(defineProps<{
|
||||
url: string;
|
||||
rel?: null | string;
|
||||
behavior?: MkABehavior;
|
||||
navigationBehavior?: MkABehavior;
|
||||
}>(), {
|
||||
});
|
||||
|
||||
|
@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<MkA v-user-preview="canonical" :class="[$style.root, { [$style.isMe]: isMe }]" :to="url" :style="{ background: bgCss }" :behavior="behavior">
|
||||
<MkA v-user-preview="canonical" :class="[$style.root, { [$style.isMe]: isMe }]" :to="url" :style="{ background: bgCss }" :behavior="navigationBehavior">
|
||||
<img :class="$style.icon" :src="avatarUrl" alt="">
|
||||
<span>
|
||||
<span>@{{ username }}</span>
|
||||
@ -26,7 +26,7 @@ import { MkABehavior } from '@/components/global/MkA.vue';
|
||||
const props = defineProps<{
|
||||
username: string;
|
||||
host: string;
|
||||
behavior?: MkABehavior;
|
||||
navigationBehavior?: MkABehavior;
|
||||
}>();
|
||||
|
||||
const canonical = props.host === localHost ? `@${props.username}` : `@${props.username}@${toUnicode(props.host)}`;
|
||||
|
@ -14,7 +14,7 @@ export type MkABehavior = 'window' | 'browser' | null;
|
||||
</script>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, shallowRef } from 'vue';
|
||||
import { computed, inject, shallowRef } from 'vue';
|
||||
import * as os from '@/os.js';
|
||||
import copyToClipboard from '@/scripts/copy-to-clipboard.js';
|
||||
import { url } from '@/config.js';
|
||||
@ -30,7 +30,7 @@ const props = withDefaults(defineProps<{
|
||||
behavior: null,
|
||||
});
|
||||
|
||||
const linkBehaviour = props.behavior;
|
||||
const behavior = props.behavior ?? inject<MkABehavior>('linkNavigationBehavior', null);
|
||||
|
||||
const el = shallowRef<HTMLElement>();
|
||||
|
||||
@ -86,15 +86,13 @@ function openWindow() {
|
||||
}
|
||||
|
||||
function nav(ev: MouseEvent) {
|
||||
if (props.behavior === 'browser') {
|
||||
if (behavior === 'browser') {
|
||||
location.href = props.to;
|
||||
return;
|
||||
}
|
||||
|
||||
if (props.behavior) {
|
||||
if (props.behavior === 'window') {
|
||||
return openWindow();
|
||||
}
|
||||
if (behavior === 'window') {
|
||||
return openWindow();
|
||||
}
|
||||
|
||||
if (ev.shiftKey) {
|
||||
|
@ -3,7 +3,7 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { VNode, h, SetupContext } from 'vue';
|
||||
import { VNode, h, SetupContext, provide } from 'vue';
|
||||
import * as mfm from 'mfm-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkUrl from '@/components/global/MkUrl.vue';
|
||||
@ -43,7 +43,7 @@ type MfmProps = {
|
||||
parsedNodes?: mfm.MfmNode[] | null;
|
||||
enableEmojiMenu?: boolean;
|
||||
enableEmojiMenuReaction?: boolean;
|
||||
linkBehavior?: MkABehavior;
|
||||
linkNavigationBehavior?: MkABehavior;
|
||||
};
|
||||
|
||||
type MfmEvents = {
|
||||
@ -52,6 +52,8 @@ type MfmEvents = {
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEvents>['emit'] }) {
|
||||
provide('linkNavigationBehavior', props.linkNavigationBehavior);
|
||||
|
||||
const isNote = props.isNote ?? true;
|
||||
const shouldNyaize = props.nyaize ? props.nyaize === 'respect' ? props.author?.isCat : false : false;
|
||||
|
||||
@ -343,7 +345,6 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
||||
key: Math.random(),
|
||||
url: token.props.url,
|
||||
rel: 'nofollow noopener',
|
||||
behavior: props.linkBehavior,
|
||||
})];
|
||||
}
|
||||
|
||||
@ -352,7 +353,6 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
||||
key: Math.random(),
|
||||
url: token.props.url,
|
||||
rel: 'nofollow noopener',
|
||||
behavior: props.linkBehavior,
|
||||
}, genEl(token.children, scale, true))];
|
||||
}
|
||||
|
||||
@ -361,7 +361,6 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
||||
key: Math.random(),
|
||||
host: (token.props.host == null && props.author?.host ? props.author.host : token.props.host) ?? host,
|
||||
username: token.props.username,
|
||||
behavior: props.linkBehavior,
|
||||
})];
|
||||
}
|
||||
|
||||
@ -370,7 +369,6 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
||||
key: Math.random(),
|
||||
to: isNote ? `/tags/${encodeURIComponent(token.props.hashtag)}` : `/user-tags/${encodeURIComponent(token.props.hashtag)}`,
|
||||
style: 'color:var(--hashtag);',
|
||||
behavior: props.linkBehavior,
|
||||
}, `#${token.props.hashtag}`)];
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
:[attr]="self ? props.url.substring(local.length) : props.url"
|
||||
:rel="rel ?? 'nofollow noopener'"
|
||||
:target="target"
|
||||
:behavior = "props.behavior"
|
||||
:behavior="props.navigationBehavior"
|
||||
@click="(ev: MouseEvent) => warningExternalWebsite(ev, props.url)"
|
||||
@contextmenu.stop="() => {}"
|
||||
>
|
||||
@ -46,7 +46,7 @@ const props = withDefaults(defineProps<{
|
||||
url: string;
|
||||
rel?: string;
|
||||
showUrlPreview?: boolean;
|
||||
behavior?: MkABehavior;
|
||||
navigationBehavior?: MkABehavior;
|
||||
}>(), {
|
||||
showUrlPreview: true,
|
||||
});
|
||||
|
@ -423,7 +423,7 @@ async function assignRole() {
|
||||
if (canceled) return;
|
||||
|
||||
const { canceled: canceled2, result: period } = await os.select({
|
||||
title: i18n.ts.period,
|
||||
title: i18n.ts.period + ': ' + roles.find(r => r.id === roleId)!.name,
|
||||
items: [{
|
||||
value: 'indefinitely', text: i18n.ts.indefinitely,
|
||||
}, {
|
||||
|
@ -119,7 +119,7 @@ async function assign() {
|
||||
const user = await os.selectUser({ includeSelf: true });
|
||||
|
||||
const { canceled: canceled2, result: period } = await os.select({
|
||||
title: i18n.ts.period,
|
||||
title: i18n.ts.period + ': ' + role.name,
|
||||
items: [{
|
||||
value: 'indefinitely', text: i18n.ts.indefinitely,
|
||||
}, {
|
||||
|
@ -6,6 +6,7 @@
|
||||
import { utils, values } from '@syuilo/aiscript';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { ref, Ref } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
|
||||
export type AsUiComponentBase = {
|
||||
id: string;
|
||||
@ -115,23 +116,24 @@ export type AsUiFolder = AsUiComponentBase & {
|
||||
opened?: boolean;
|
||||
};
|
||||
|
||||
type PostFormPropsForAsUi = {
|
||||
text: string;
|
||||
cw?: string;
|
||||
visibility?: (typeof Misskey.noteVisibilities)[number];
|
||||
localOnly?: boolean;
|
||||
};
|
||||
|
||||
export type AsUiPostFormButton = AsUiComponentBase & {
|
||||
type: 'postFormButton';
|
||||
text?: string;
|
||||
primary?: boolean;
|
||||
rounded?: boolean;
|
||||
form?: {
|
||||
text: string;
|
||||
cw?: string;
|
||||
};
|
||||
form?: PostFormPropsForAsUi;
|
||||
};
|
||||
|
||||
export type AsUiPostForm = AsUiComponentBase & {
|
||||
type: 'postForm';
|
||||
form?: {
|
||||
text: string;
|
||||
cw?: string;
|
||||
};
|
||||
form?: PostFormPropsForAsUi;
|
||||
};
|
||||
|
||||
export type AsUiComponent = AsUiRoot | AsUiContainer | AsUiText | AsUiMfm | AsUiButton | AsUiButtons | AsUiSwitch | AsUiTextarea | AsUiTextInput | AsUiNumberInput | AsUiSelect | AsUiFolder | AsUiPostFormButton | AsUiPostForm;
|
||||
@ -447,6 +449,24 @@ function getFolderOptions(def: values.Value | undefined): Omit<AsUiFolder, 'id'
|
||||
};
|
||||
}
|
||||
|
||||
function getPostFormProps(form: values.VObj): PostFormPropsForAsUi {
|
||||
const text = form.value.get('text');
|
||||
utils.assertString(text);
|
||||
const cw = form.value.get('cw');
|
||||
if (cw) utils.assertString(cw);
|
||||
const visibility = form.value.get('visibility');
|
||||
if (visibility) utils.assertString(visibility);
|
||||
const localOnly = form.value.get('localOnly');
|
||||
if (localOnly) utils.assertBoolean(localOnly);
|
||||
|
||||
return {
|
||||
text: text.value,
|
||||
cw: cw?.value,
|
||||
visibility: (visibility?.value && (Misskey.noteVisibilities as readonly string[]).includes(visibility.value)) ? visibility.value as typeof Misskey.noteVisibilities[number] : undefined,
|
||||
localOnly: localOnly?.value,
|
||||
};
|
||||
}
|
||||
|
||||
function getPostFormButtonOptions(def: values.Value | undefined, call: (fn: values.VFn, args: values.Value[]) => Promise<values.Value>): Omit<AsUiPostFormButton, 'id' | 'type'> {
|
||||
utils.assertObject(def);
|
||||
|
||||
@ -459,22 +479,11 @@ function getPostFormButtonOptions(def: values.Value | undefined, call: (fn: valu
|
||||
const form = def.value.get('form');
|
||||
if (form) utils.assertObject(form);
|
||||
|
||||
const getForm = () => {
|
||||
const text = form!.value.get('text');
|
||||
utils.assertString(text);
|
||||
const cw = form!.value.get('cw');
|
||||
if (cw) utils.assertString(cw);
|
||||
return {
|
||||
text: text.value,
|
||||
cw: cw?.value,
|
||||
};
|
||||
};
|
||||
|
||||
return {
|
||||
text: text?.value,
|
||||
primary: primary?.value,
|
||||
rounded: rounded?.value,
|
||||
form: form ? getForm() : {
|
||||
form: form ? getPostFormProps(form) : {
|
||||
text: '',
|
||||
},
|
||||
};
|
||||
@ -486,19 +495,8 @@ function getPostFormOptions(def: values.Value | undefined, call: (fn: values.VFn
|
||||
const form = def.value.get('form');
|
||||
if (form) utils.assertObject(form);
|
||||
|
||||
const getForm = () => {
|
||||
const text = form!.value.get('text');
|
||||
utils.assertString(text);
|
||||
const cw = form!.value.get('cw');
|
||||
if (cw) utils.assertString(cw);
|
||||
return {
|
||||
text: text.value,
|
||||
cw: cw?.value,
|
||||
};
|
||||
};
|
||||
|
||||
return {
|
||||
form: form ? getForm() : {
|
||||
form: form ? getPostFormProps(form) : {
|
||||
text: '',
|
||||
},
|
||||
};
|
||||
|
@ -272,7 +272,7 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: IRouter
|
||||
text: r.name,
|
||||
action: async () => {
|
||||
const { canceled, result: period } = await os.select({
|
||||
title: i18n.ts.period,
|
||||
title: i18n.ts.period + ': ' + r.name,
|
||||
items: [{
|
||||
value: 'indefinitely', text: i18n.ts.indefinitely,
|
||||
}, {
|
||||
|
@ -26,7 +26,7 @@
|
||||
"devDependencies": {
|
||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||
"@types/matter-js": "0.19.6",
|
||||
"@types/node": "20.12.8",
|
||||
"@types/node": "20.12.11",
|
||||
"@types/seedrandom": "3.0.8",
|
||||
"@typescript-eslint/eslint-plugin": "7.8.0",
|
||||
"@typescript-eslint/parser": "7.8.0",
|
||||
@ -38,7 +38,7 @@
|
||||
"built"
|
||||
],
|
||||
"dependencies": {
|
||||
"esbuild": "0.20.2",
|
||||
"esbuild": "0.21.1",
|
||||
"eventemitter3": "5.0.1",
|
||||
"glob": "^10.3.12",
|
||||
"matter-js": "0.19.0",
|
||||
|
@ -9,14 +9,14 @@
|
||||
"devDependencies": {
|
||||
"@misskey-dev/eslint-plugin": "^1.0.0",
|
||||
"@readme/openapi-parser": "2.5.1",
|
||||
"@types/node": "20.12.8",
|
||||
"@types/node": "20.12.11",
|
||||
"@typescript-eslint/eslint-plugin": "7.8.0",
|
||||
"@typescript-eslint/parser": "7.8.0",
|
||||
"eslint": "8.57.0",
|
||||
"openapi-types": "12.1.3",
|
||||
"openapi-typescript": "6.7.5",
|
||||
"ts-case-convert": "2.0.7",
|
||||
"tsx": "4.9.0",
|
||||
"tsx": "4.9.3",
|
||||
"typescript": "5.4.5"
|
||||
},
|
||||
"files": [
|
||||
|
@ -35,11 +35,11 @@
|
||||
"url": "git+https://github.com/misskey-dev/misskey.js.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@microsoft/api-extractor": "7.43.1",
|
||||
"@microsoft/api-extractor": "7.43.2",
|
||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||
"@swc/jest": "0.2.36",
|
||||
"@types/jest": "29.5.12",
|
||||
"@types/node": "20.12.8",
|
||||
"@types/node": "20.12.11",
|
||||
"@typescript-eslint/eslint-plugin": "7.8.0",
|
||||
"@typescript-eslint/parser": "7.8.0",
|
||||
"eslint": "8.57.0",
|
||||
@ -59,7 +59,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@swc/cli": "0.3.12",
|
||||
"@swc/core": "1.4.17",
|
||||
"@swc/core": "1.5.5",
|
||||
"eventemitter3": "5.0.1",
|
||||
"reconnecting-websocket": "4.4.0"
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||
"@types/node": "20.12.8",
|
||||
"@types/node": "20.12.11",
|
||||
"@typescript-eslint/eslint-plugin": "7.8.0",
|
||||
"@typescript-eslint/parser": "7.8.0",
|
||||
"eslint": "8.57.0",
|
||||
@ -34,7 +34,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"crc-32": "1.2.2",
|
||||
"esbuild": "0.20.2",
|
||||
"esbuild": "0.21.1",
|
||||
"glob": "10.3.12"
|
||||
},
|
||||
"files": [
|
||||
|
@ -9,7 +9,7 @@
|
||||
"lint": "pnpm typecheck && pnpm eslint"
|
||||
},
|
||||
"dependencies": {
|
||||
"esbuild": "0.20.2",
|
||||
"esbuild": "0.21.1",
|
||||
"idb-keyval": "6.2.1",
|
||||
"misskey-js": "workspace:*"
|
||||
},
|
||||
|
1855
pnpm-lock.yaml
1855
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user