Merge branch 'develop' into use-arm-runner
This commit is contained in:
commit
5acb443060
|
@ -9,6 +9,10 @@ on:
|
|||
paths:
|
||||
- packages/misskey-js/**
|
||||
- .github/workflows/api-misskey-js.yml
|
||||
|
||||
env:
|
||||
COREPACK_DEFAULT_TO_LATEST: 0
|
||||
|
||||
jobs:
|
||||
report:
|
||||
|
||||
|
@ -21,7 +25,7 @@ jobs:
|
|||
- run: corepack enable
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4.0.4
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: 'pnpm'
|
||||
|
|
|
@ -14,7 +14,7 @@ jobs:
|
|||
- name: Checkout head
|
||||
uses: actions/checkout@v4.1.1
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4.0.4
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ jobs:
|
|||
|
||||
- name: setup node
|
||||
id: setup-node
|
||||
uses: actions/setup-node@v4.0.4
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: pnpm
|
||||
|
|
|
@ -9,6 +9,10 @@ on:
|
|||
paths:
|
||||
- packages/backend/**
|
||||
- .github/workflows/get-api-diff.yml
|
||||
|
||||
env:
|
||||
COREPACK_DEFAULT_TO_LATEST: 0
|
||||
|
||||
jobs:
|
||||
get-from-misskey:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -33,7 +37,7 @@ jobs:
|
|||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4.0.4
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'pnpm'
|
||||
|
|
|
@ -28,6 +28,10 @@ on:
|
|||
- packages/misskey-reversi/**
|
||||
- packages/shared/eslint.config.js
|
||||
- .github/workflows/lint.yml
|
||||
|
||||
env:
|
||||
COREPACK_DEFAULT_TO_LATEST: 0
|
||||
|
||||
jobs:
|
||||
pnpm_install:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -37,7 +41,7 @@ jobs:
|
|||
fetch-depth: 0
|
||||
submodules: true
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: actions/setup-node@v4.0.4
|
||||
- uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: 'pnpm'
|
||||
|
@ -68,14 +72,14 @@ jobs:
|
|||
fetch-depth: 0
|
||||
submodules: true
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: actions/setup-node@v4.0.4
|
||||
- uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: 'pnpm'
|
||||
- run: corepack enable
|
||||
- run: pnpm i --frozen-lockfile
|
||||
- name: Restore eslint cache
|
||||
uses: actions/cache@v4.1.0
|
||||
uses: actions/cache@v4.2.0
|
||||
with:
|
||||
path: ${{ env.eslint-cache-path }}
|
||||
key: eslint-${{ env.eslint-cache-version }}-${{ matrix.workspace }}-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.ref_name }}-${{ github.sha }}
|
||||
|
@ -98,7 +102,7 @@ jobs:
|
|||
fetch-depth: 0
|
||||
submodules: true
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: actions/setup-node@v4.0.4
|
||||
- uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: 'pnpm'
|
||||
|
|
|
@ -9,6 +9,10 @@ on:
|
|||
paths:
|
||||
- locales/**
|
||||
- .github/workflows/locale.yml
|
||||
|
||||
env:
|
||||
COREPACK_DEFAULT_TO_LATEST: 0
|
||||
|
||||
jobs:
|
||||
locale_verify:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -19,7 +23,7 @@ jobs:
|
|||
fetch-depth: 0
|
||||
submodules: true
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: actions/setup-node@v4.0.4
|
||||
- uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: 'pnpm'
|
||||
|
|
|
@ -6,6 +6,9 @@ on:
|
|||
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
COREPACK_DEFAULT_TO_LATEST: 0
|
||||
|
||||
jobs:
|
||||
publish-misskey-js:
|
||||
name: Publish misskey-js
|
||||
|
@ -26,7 +29,7 @@ jobs:
|
|||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4.0.4
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'pnpm'
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
name: "Release Manager: release RC when ready for review"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [ready_for_review]
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
head: ${{ steps.get_pr.outputs.head }}
|
||||
base: ${{ steps.get_pr.outputs.base }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
# PR情報を取得
|
||||
- name: Get PR
|
||||
run: |
|
||||
pr_json=$(gh pr view "$PR_NUMBER" --json isDraft,headRefName,baseRefName)
|
||||
echo "head=$(echo $pr_json | jq -r '.headRefName')" >> $GITHUB_OUTPUT
|
||||
echo "base=$(echo $pr_json | jq -r '.baseRefName')" >> $GITHUB_OUTPUT
|
||||
id: get_pr
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
release:
|
||||
uses: misskey-dev/release-manager-actions/.github/workflows/create-prerelease.yml@v2
|
||||
needs: check
|
||||
if: needs.check.outputs.head == github.event.repository.default_branch && needs.check.outputs.base == vars.STABLE_BRANCH
|
||||
with:
|
||||
pr_number: ${{ github.event.pull_request.number }}
|
||||
user: 'github-actions[bot]'
|
||||
package_jsons_to_rewrite: ${{ vars.PACKAGE_JSONS_TO_REWRITE }}
|
||||
use_external_app_to_release: ${{ vars.USE_RELEASE_APP == 'true' }}
|
||||
indent: ${{ vars.INDENT }}
|
||||
draft_prerelease_channel: alpha
|
||||
ready_start_prerelease_channel: beta
|
||||
reset_number_on_channel_change: true
|
||||
secrets:
|
||||
RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }}
|
||||
RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
|
|
@ -13,6 +13,9 @@ on:
|
|||
# This is a waste of chromatic build quota, so we don't run storybook CI on pull requests targets master.
|
||||
- master
|
||||
|
||||
env:
|
||||
COREPACK_DEFAULT_TO_LATEST: 0
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# chromatic is not likely to be available for fork repositories, so we disable for fork repositories.
|
||||
|
@ -43,7 +46,7 @@ jobs:
|
|||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
- name: Use Node.js 20.x
|
||||
uses: actions/setup-node@v4.0.4
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
cache: 'pnpm'
|
||||
|
|
|
@ -18,6 +18,10 @@ on:
|
|||
- packages/misskey-js/**
|
||||
- .github/workflows/test-backend.yml
|
||||
- .github/misskey/test.yml
|
||||
|
||||
env:
|
||||
COREPACK_DEFAULT_TO_LATEST: 0
|
||||
|
||||
jobs:
|
||||
unit:
|
||||
name: Unit tests (backend)
|
||||
|
@ -62,7 +66,7 @@ jobs:
|
|||
fi
|
||||
done
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4.0.4
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'pnpm'
|
||||
|
@ -110,7 +114,7 @@ jobs:
|
|||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4.0.4
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'pnpm'
|
||||
|
|
|
@ -15,6 +15,9 @@ on:
|
|||
- packages/misskey-js/**
|
||||
- .github/workflows/test-federation.yml
|
||||
|
||||
env:
|
||||
COREPACK_DEFAULT_TO_LATEST: 0
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Federation test
|
||||
|
@ -44,7 +47,7 @@ jobs:
|
|||
fi
|
||||
done
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4.0.3
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'pnpm'
|
||||
|
|
|
@ -22,6 +22,10 @@ on:
|
|||
- packages/backend/**
|
||||
- .github/workflows/test-frontend.yml
|
||||
- .github/misskey/test.yml
|
||||
|
||||
env:
|
||||
COREPACK_DEFAULT_TO_LATEST: 0
|
||||
|
||||
jobs:
|
||||
vitest:
|
||||
name: Unit tests (frontend)
|
||||
|
@ -38,7 +42,7 @@ jobs:
|
|||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4.0.4
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'pnpm'
|
||||
|
@ -94,7 +98,7 @@ jobs:
|
|||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4.0.4
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'pnpm'
|
||||
|
|
|
@ -14,6 +14,10 @@ on:
|
|||
paths:
|
||||
- packages/misskey-js/**
|
||||
- .github/workflows/test-misskey-js.yml
|
||||
|
||||
env:
|
||||
COREPACK_DEFAULT_TO_LATEST: 0
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Unit tests (misskey.js)
|
||||
|
@ -32,7 +36,7 @@ jobs:
|
|||
- run: corepack enable
|
||||
|
||||
- name: Setup Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4.0.4
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'pnpm'
|
||||
|
|
|
@ -9,6 +9,7 @@ on:
|
|||
|
||||
env:
|
||||
NODE_ENV: production
|
||||
COREPACK_DEFAULT_TO_LATEST: 0
|
||||
|
||||
jobs:
|
||||
production:
|
||||
|
@ -26,7 +27,7 @@ jobs:
|
|||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4.0.4
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'pnpm'
|
||||
|
|
|
@ -12,6 +12,10 @@ on:
|
|||
paths:
|
||||
- packages/backend/**
|
||||
- .github/workflows/validate-api-json.yml
|
||||
|
||||
env:
|
||||
COREPACK_DEFAULT_TO_LATEST: 0
|
||||
|
||||
jobs:
|
||||
validate-api-json:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -27,7 +31,7 @@ jobs:
|
|||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4.0.4
|
||||
uses: actions/setup-node@v4.1.0
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'pnpm'
|
||||
|
|
29
CHANGELOG.md
29
CHANGELOG.md
|
@ -1,3 +1,17 @@
|
|||
## 2025.2.0
|
||||
|
||||
### General
|
||||
- Fix: Docker のビルドに失敗する問題を修正
|
||||
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/883)
|
||||
|
||||
### Client
|
||||
- Fix: 一部環境でセンシティブなファイルを含むノートの非表示が効かない問題
|
||||
- Fix: データセーバー有効時にもユーザーページの「ファイル」タブで画像が読み込まれてしまう問題を修正
|
||||
|
||||
### Server
|
||||
- Fix: 個別お知らせページのmetaタグ出力の条件が間違っていたのを修正
|
||||
|
||||
|
||||
## 2025.1.0
|
||||
|
||||
### Note
|
||||
|
@ -5,9 +19,11 @@
|
|||
- 新しい設定項目"fulltextSearch.provider"が追加されました. sqlLike, sqlPgroonga, meilisearchのいずれかを設定出来ます.
|
||||
- すでにMeilisearchをお使いの場合、 **"fulltextSearch.provider"を"meilisearch"に設定する必要** があります.
|
||||
- 詳細は #14730 および `.config/example.yml` または `.config/docker_example.yml`の'Fulltext search configuration'をご参照願います.
|
||||
- 【開発者向け】従来の開発モードでHMRが機能しない問題が修正されたため、バックエンド・フロントエンド分離型の開発モードが削除されました。開発環境においてconfigの変更が必要となる可能性があります。
|
||||
|
||||
### General
|
||||
-
|
||||
- Feat: カスタム絵文字管理画面をリニューアル #10996
|
||||
* β版として公開のため、旧画面も引き続き利用可能です
|
||||
|
||||
### Client
|
||||
- Enhance: PC画面でチャンネルが複数列で表示されるように
|
||||
|
@ -20,6 +36,8 @@
|
|||
- Enhance: ノートの添付ファイルを一覧で遡れる「ファイル」タブを追加
|
||||
(Based on https://github.com/Otaku-Social/maniakey/pull/14)
|
||||
- Enhance: AiScriptの拡張API関数において引数の型チェックをより厳格に
|
||||
- Enhance: クエリパラメータでuiを一時的に変更できるように #15240
|
||||
- Enhance: リモート絵文字のインポート時に詳細を確認できるように #15336
|
||||
- Fix: 画面サイズが変わった際にナビゲーションバーが自動で折りたたまれない問題を修正
|
||||
- Fix: サーバー情報メニューに区切り線が不足していたのを修正
|
||||
- Fix: ノートがログインしているユーザーしか見れない場合にログインダイアログを閉じるとその後の動線がなくなる問題を修正
|
||||
|
@ -34,11 +52,19 @@
|
|||
(Cherry-picked from https://github.com/TeamNijimiss/misskey/commit/800359623e41a662551d774de15b0437b6849bb4)
|
||||
- Fix: ノート作成画面でファイルの添付可能個数を超えてもノートボタンが押せていた問題を修正
|
||||
- Fix: 「アカウントを管理」画面で、ユーザー情報の取得に失敗したアカウント(削除されたアカウントなど)が表示されない問題を修正
|
||||
- Fix: MacOSでChrome系ブラウザを使用している場合に、Misskeyを閉じた際に他のタブのオーディオ機能と干渉する問題を修正
|
||||
- Fix: 言語データのキャッシュ状況によっては、埋め込みウィジェットが正しく起動しない問題を修正
|
||||
- Fix: 「削除して編集」でノートの引用を解除出来なかった問題を修正( #14476 )
|
||||
- Fix: RSSウィジェットが正しく表示されない問題を修正
|
||||
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/857)
|
||||
- Fix: ワードミュートの保存失敗時にAPIエラーが握りつぶされる事があるのを修正
|
||||
- Fix: アンケートでリモートの絵文字が正しく描画できない問題の修正
|
||||
(Cherry-picked from https://github.com/yojo-art/cherrypick/pull/153)
|
||||
- Fix: 非ログイン時のサーバー概要画面のメニューボタンが押せないことがあるのを修正
|
||||
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/656)
|
||||
- Fix: URLにはじめから`#pswp`が含まれている場合に画像ビューワーがブラウザの戻るボタンで閉じられない問題を修正
|
||||
- Fix: ロール作成画面で設定できるアイコンデコレーションの最大取付個数を16に制限
|
||||
- Fix: Firefox Nightlyなどでアイコンが読み込めない問題を修正
|
||||
|
||||
### Server
|
||||
- Enhance: pg_bigmが利用できるよう、ノートの検索をILIKE演算子でなくLIKE演算子でLOWER()をかけたテキストに対して行うように
|
||||
|
@ -49,6 +75,7 @@
|
|||
- Fix: ユーザーのプロフィール画面をアドレス入力などで直接表示した際に概要タブの描画に失敗する問題の修正( #15032 )
|
||||
- Fix: 起動前の疎通チェックが機能しなくなっていた問題を修正
|
||||
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/737)
|
||||
- Fix: ノートの閲覧にログイン必須にしてもFeedでノートが表示されてしまう問題を修正
|
||||
- Fix: 絵文字の連合でライセンス欄を相互にやり取りするように ( #10859, #14109 )
|
||||
- Fix: ロックダウンされた期間指定のノートがStreaming経由でLTLに出現するのを修正 ( #15200 )
|
||||
- Fix: disableClustering設定時の初期化ロジックを調整( #15223 )
|
||||
|
|
|
@ -197,25 +197,10 @@ pnpm dev
|
|||
command.
|
||||
|
||||
- Server-side source files and automatically builds them if they are modified. Automatically start the server process(es).
|
||||
- Vite HMR (just the `vite` command) is available. The behavior may be different from production.
|
||||
- Service Worker is watched by esbuild.
|
||||
- The front end can be viewed by accessing `http://localhost:5173`.
|
||||
- The backend listens on the port configured with `port` in .config/default.yml.
|
||||
If you have not changed it from the default, it will be "http://localhost:3000".
|
||||
If "port" in .config/default.yml is set to something other than 3000, you need to change the proxy settings in packages/frontend/vite.config.local-dev.ts.
|
||||
|
||||
### `MK_DEV_PREFER=backend pnpm dev`
|
||||
pnpm dev has another mode with `MK_DEV_PREFER=backend`.
|
||||
|
||||
```
|
||||
MK_DEV_PREFER=backend pnpm dev
|
||||
```
|
||||
|
||||
- This mode is closer to the production environment than the default mode.
|
||||
- Vite runs behind the backend (the backend will proxy Vite at /vite).
|
||||
- Vite HMR (just the `vite` command) is available. The behavior may be different from production.
|
||||
- Vite runs behind the backend (the backend will proxy Vite at /vite and /embed_vite except for websocket used for HMR).
|
||||
- You can see Misskey by accessing `http://localhost:3000` (Replace `3000` with the port configured with `port` in .config/default.yml).
|
||||
- To change the port of Vite, specify with `VITE_PORT` environment variable.
|
||||
- HMR may not work in some environments such as Windows.
|
||||
|
||||
## Testing
|
||||
You can run non-backend tests by executing following commands:
|
||||
|
@ -491,6 +476,11 @@ describe('test', () => {
|
|||
コード上でMisskeyのドメイン固有の概念には`Mi`をprefixすることで、他のドメインの同様の概念と区別できるほか、名前の衝突を防ぐ。
|
||||
ただし、文脈上Misskeyのものを指すことが明らかであり、名前の衝突の恐れがない場合は、一時的なローカル変数に限って`Mi`を省略してもよい。
|
||||
|
||||
### Misskey.jsの型生成
|
||||
```bash
|
||||
pnpm build-misskey-js-with-types
|
||||
```
|
||||
|
||||
### How to resolve conflictions occurred at pnpm-lock.yaml?
|
||||
|
||||
Just execute `pnpm` to fix it.
|
||||
|
|
|
@ -6,6 +6,8 @@ ARG NODE_VERSION=22.11.0-bookworm
|
|||
|
||||
FROM --platform=$BUILDPLATFORM node:${NODE_VERSION} AS native-builder
|
||||
|
||||
ENV COREPACK_DEFAULT_TO_LATEST=0
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
rm -f /etc/apt/apt.conf.d/docker-clean \
|
||||
|
@ -44,6 +46,8 @@ RUN rm -rf .git/
|
|||
|
||||
FROM --platform=$TARGETPLATFORM node:${NODE_VERSION} AS target-builder
|
||||
|
||||
ENV COREPACK_DEFAULT_TO_LATEST=0
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -yqq --no-install-recommends \
|
||||
build-essential
|
||||
|
@ -68,6 +72,7 @@ FROM --platform=$TARGETPLATFORM node:${NODE_VERSION}-slim AS runner
|
|||
|
||||
ARG UID="991"
|
||||
ARG GID="991"
|
||||
ENV COREPACK_DEFAULT_TO_LATEST=0
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
|
|
|
@ -7,6 +7,11 @@ bug report to the GitHub repository.
|
|||
|
||||
Thanks for helping make Misskey safe for everyone.
|
||||
|
||||
> [!note]
|
||||
> CNA [requires](https://www.cve.org/ResourcesSupport/AllResources/CNARules#section_5-2_Description) that CVEs include a description in English for inclusion in the CVE Catalog.
|
||||
>
|
||||
> When creating a security advisory, all content must be written in English (it is acceptable to include a non-English description along with the English one).
|
||||
|
||||
## When create a patch
|
||||
|
||||
If you can also create a patch to fix the vulnerability, please create a PR on the private fork.
|
||||
|
|
|
@ -5,6 +5,7 @@ introMisskey: "Benvingut! Misskey és un servei de microblogging descentralitzat
|
|||
poweredByMisskeyDescription: "{name} És un dels serveis (anomenats instàncies de Misskey) que utilitzen la plataforma de codi obert <b>Misskey</b>."
|
||||
monthAndDay: "{day}/{month}"
|
||||
search: "Cercar"
|
||||
reset: "Reiniciar"
|
||||
notifications: "Notificacions"
|
||||
username: "Nom d'usuari"
|
||||
password: "Contrasenya"
|
||||
|
@ -48,6 +49,7 @@ pin: "Fixa al perfil"
|
|||
unpin: "Para de fixar del perfil"
|
||||
copyContent: "Copia el contingut"
|
||||
copyLink: "Copia l'enllaç"
|
||||
copyRemoteLink: "Copiar l'enllaç remot"
|
||||
copyLinkRenote: "Copiar l'enllaç de la renota"
|
||||
delete: "Elimina"
|
||||
deleteAndEdit: "Eliminar i editar"
|
||||
|
@ -686,11 +688,13 @@ testEmail: "Prova l'enviament de correu "
|
|||
wordMute: "Silenciar paraules "
|
||||
wordMuteDescription: "Minimitza les notes que contenen la paraula o frase especificada. Les notes minimitzades poden visualitzar-se fent clic sobre elles."
|
||||
hardWordMute: "Silenciar paraules fortes"
|
||||
showMutedWord: "Mostrar paraules silenciades"
|
||||
hardWordMuteDescription: "Oculta les notes que contenen la paraula o frase especificada. A diferència de Silenciar paraula, la nota quedarà completament oculta a la vista."
|
||||
regexpError: "Error de l'expressió regular "
|
||||
regexpErrorDescription: "S'ha produït un error a l'expressió regular a la línia {line} de les paraules silenciades {tab}:"
|
||||
instanceMute: "Silenciar servidor"
|
||||
userSaysSomething: "{name} n'ha dit alguna cosa"
|
||||
userSaysSomethingAbout: "{name} està parlant sobre \"{word}\""
|
||||
makeActive: "Activar"
|
||||
display: "Veure"
|
||||
copy: "Copiar"
|
||||
|
@ -1303,6 +1307,8 @@ lockdown: "Bloquejat"
|
|||
pleaseSelectAccount: "Seleccionar un compte"
|
||||
availableRoles: "Roles disponibles "
|
||||
acknowledgeNotesAndEnable: "Activa'l després de comprendre els possibles perills."
|
||||
federationSpecified: "Aquest servidor treballa amb una federació de llistes blanques. No pot interactuar amb altres servidors que no siguin els especificats per l'administrador."
|
||||
federationDisabled: "La unió es troba deshabilitada en aquest servidor. No es pot interactuar amb usuaris d'altres servidors."
|
||||
_accountSettings:
|
||||
requireSigninToViewContents: "És obligatori l'inici de sessió per poder veure el contingut"
|
||||
requireSigninToViewContentsDescription1: "Es requereix l'inici de sessió per poder veure totes les notes i el contingut que has creat. Amb això esperem evitar que els rastrejadors recopilin informació."
|
||||
|
@ -2723,6 +2729,66 @@ _contextMenu:
|
|||
app: "Aplicació "
|
||||
appWithShift: "Aplicació amb la tecla shift"
|
||||
native: "Interfície del navegador"
|
||||
_gridComponent:
|
||||
_error:
|
||||
requiredValue: "Aquest camp és obligatori"
|
||||
columnTypeNotSupport: "La validació d'expressions regulars només s'admet per columnes de tipus text."
|
||||
patternNotMatch: "Aquest valor no coincideix amb {pattern}"
|
||||
notUnique: "Aquest valor ha de ser únic "
|
||||
_roleSelectDialog:
|
||||
notSelected: "No seleccionat"
|
||||
_customEmojisManager:
|
||||
_gridCommon:
|
||||
copySelectionRows: "Copiar línies seleccionades "
|
||||
copySelectionRanges: "Copiar selecció "
|
||||
deleteSelectionRows: "Esborrar línies seleccionades"
|
||||
deleteSelectionRanges: "Esborrar files de la selecció "
|
||||
searchSettings: "Configuració del cercador"
|
||||
searchSettingCaption: "Defineix criteris de cerca detallats."
|
||||
searchLimit: "Nombre de pantalles"
|
||||
sortOrder: "Ordenar"
|
||||
registrationLogs: "Registres d'inscripcions "
|
||||
registrationLogsCaption: "Quan s'actualitzin o s'esborrin emojis es mostrarà un registre. Desapareixeran quan s'actualitzin, s'esborrin, visitis una nova pàgina o la recarreguis."
|
||||
alertEmojisRegisterFailedDescription: "No s'ha pogut actualitzar o esborrar l'emoji. Si us plau, dona una ullada al registre per més detalls."
|
||||
_logs:
|
||||
showSuccessLogSwitch: "Mostrar el registre d'èxit "
|
||||
failureLogNothing: "No hi ha registres de fallades."
|
||||
logNothing: "No hi ha registres."
|
||||
_remote:
|
||||
selectionRowDetail: "Detall de la línia seleccionada"
|
||||
importSelectionRows: "Importar les files seleccionades"
|
||||
importSelectionRangesRows: "Importar les files de la selecció "
|
||||
importEmojisButton: "Importar els Emojis marcats"
|
||||
confirmImportEmojisTitle: "Importar Emojis"
|
||||
confirmImportEmojisDescription: "Importar {count} Emojis d'una adreça remota. Tingues cura de les llicències dels Emojis. Vols importar-los?"
|
||||
_local:
|
||||
tabTitleList: "Llistar els Emojis registrats"
|
||||
tabTitleRegister: "Registre d'Emojis"
|
||||
_list:
|
||||
emojisNothing: "No hi ha Emojis registrats"
|
||||
markAsDeleteTargetRows: "Files seleccionades que s'han d'esborrar "
|
||||
markAsDeleteTargetRanges: "Selecció de files per la seva eliminació "
|
||||
alertUpdateEmojisNothingDescription: "No hi ha Emojis actualitzats."
|
||||
alertDeleteEmojisNothingDescription: "No hi ha Emoji per esborrar."
|
||||
confirmMovePage: "Vols canviar de pàgina?"
|
||||
confirmChangeView: "Vols canviar la pantalla?"
|
||||
confirmUpdateEmojisDescription: "Actualitzar {count} Emojis. Vols executar-ho?"
|
||||
confirmDeleteEmojisDescription: "Esborrar {count} Emojis marcats. Vols continuar?"
|
||||
confirmResetDescription: "Es restabliran tots els canvis fets fins ara."
|
||||
confirmMovePageDesciption: "S'han fet canvis als Emojis d'aquesta pàgina. Si continues navegant sense guardar els canvis, es perdran tots els canvis fets en aquesta pàgina."
|
||||
dialogSelectRoleTitle: "Buscar Emojis per rol"
|
||||
_register:
|
||||
uploadSettingTitle: "Actualitza la configuració "
|
||||
uploadSettingDescription: "En aquesta pantalla pots configurar el que s'ha de fer quan es puja un Emoji."
|
||||
directoryToCategoryLabel: "Escriu el nom del directori al camp de \"categoria\""
|
||||
directoryToCategoryCaption: "Quan arrossegues un directori, escriu el nom del directori al camp categoria."
|
||||
emojiInputAreaCaption: "Selecciona els Emojis que vols registrar gent servir un dels mètodes."
|
||||
emojiInputAreaList1: "Arrossega i deixar anar fitxers o directoris dintre del quadrat."
|
||||
emojiInputAreaList2: "Clica l'enllaç per seleccionar un fitxer des del teu ordinador."
|
||||
emojiInputAreaList3: "Clica aquest enllaç per seleccionar del Disc"
|
||||
confirmRegisterEmojisDescription: "Registrar els Emojis de la llista com a nous Emojis personalitzats. Vols continuar? (Per evitar una sobrecàrrega només {count} Emojis es poden registrar d'una sola vegada)"
|
||||
confirmClearEmojisDescription: "Descartar els canvis i esborrar els Emojis de la llista. Vols continuar?"
|
||||
confirmUploadEmojisDescription: "Pujar els {count} fitxers que has arrossegat al disc. Vols continuar?"
|
||||
_embedCodeGen:
|
||||
title: "Personalitza el codi per incrustar"
|
||||
header: "Mostrar la capçalera"
|
||||
|
@ -2764,3 +2830,16 @@ _remoteLookupErrors:
|
|||
_noSuchObject:
|
||||
title: "No s'ha trobat"
|
||||
description: "No es pot trobar el recurs sol·licitat, si us plau comprova l'adreça una altra vegada."
|
||||
_captcha:
|
||||
verify: "Passar pel CAPTCHA"
|
||||
testSiteKeyMessage: "Pots comprovar una vista prèvia introduïnt valors de prova per la clau del lloc i la clau secreta. Si vols més informació consulteu la següent pàgina."
|
||||
_error:
|
||||
_requestFailed:
|
||||
title: "Ha fallat la sol·licitud del CAPTCHA"
|
||||
text: "Si us plau, torna a intentar-ho d'aquí una estona o comprova els ajustos de nou."
|
||||
_verificationFailed:
|
||||
title: "Ha fallat la validació CAPTCHA"
|
||||
text: "Comprova que els ajustos són els correctes."
|
||||
_unknown:
|
||||
title: "Error CAPTCHA"
|
||||
text: "S'ha produït un error inesperat."
|
||||
|
|
|
@ -5,6 +5,7 @@ introMisskey: "Willkommen! Misskey ist eine dezentralisierte Open-Source Microbl
|
|||
poweredByMisskeyDescription: "{name} ist einer der durch die Open-Source-Plattform <b>Misskey</b> betriebenen Dienste."
|
||||
monthAndDay: "{day}.{month}."
|
||||
search: "Suchen"
|
||||
reset: "Zurücksetzen"
|
||||
notifications: "Benachrichtigungen"
|
||||
username: "Benutzername"
|
||||
password: "Passwort"
|
||||
|
@ -48,6 +49,7 @@ pin: "An dein Profil anheften"
|
|||
unpin: "Von deinem Profil lösen"
|
||||
copyContent: "Inhalt kopieren"
|
||||
copyLink: "Link kopieren"
|
||||
copyRemoteLink: "Renote-Link kopieren"
|
||||
copyLinkRenote: "Renote-Link kopieren"
|
||||
delete: "Löschen"
|
||||
deleteAndEdit: "Löschen und Bearbeiten"
|
||||
|
@ -493,7 +495,7 @@ noMessagesYet: "Noch keine Nachrichten vorhanden"
|
|||
newMessageExists: "Du hast eine neue Nachricht"
|
||||
onlyOneFileCanBeAttached: "Es kann pro Nachricht nur eine Datei angehängt werden"
|
||||
signinRequired: "Bitte registriere oder melde dich an, um fortzufahren"
|
||||
signinOrContinueOnRemote: "Zum Weitermachen, melde dich mit einem bestehenden Account an oder erstelle einen neuen Account."
|
||||
signinOrContinueOnRemote: "Um fortzufahren, gehe zu deiner Instanz oder registriere bzw. melde dich an dieser Instanz an. "
|
||||
invitations: "Einladungen"
|
||||
invitationCode: "Einladungscode"
|
||||
checking: "Wird überprüft …"
|
||||
|
@ -517,6 +519,7 @@ emojiStyle: "Emoji-Stil"
|
|||
native: "Nativ"
|
||||
menuStyle: "Menü Stil"
|
||||
style: "Stil"
|
||||
drawer: "App-Übersicht"
|
||||
popup: "Pop-up"
|
||||
showNoteActionsOnlyHover: "Notizmenü nur bei Mouseover anzeigen"
|
||||
showReactionsCount: "Zeige die Anzahl der Reaktionen auf Notizen an"
|
||||
|
@ -585,6 +588,7 @@ masterVolume: "Gesamtlautstärke"
|
|||
notUseSound: "Gebe kein Ton aus"
|
||||
useSoundOnlyWhenActive: "Gebe nur Ton aus, wenn Misskey aktiv ist"
|
||||
details: "Details"
|
||||
renoteDetails: "Renote Details"
|
||||
chooseEmoji: "Emoji auswählen"
|
||||
unableToProcess: "Der Vorgang konnte nicht abgeschlossen werden"
|
||||
recentUsed: "Vor kurzem verwendet"
|
||||
|
@ -682,12 +686,15 @@ smtpSecure: "Für SMTP-Verbindungen implizit SSL/TLS verwenden"
|
|||
smtpSecureInfo: "Schalte dies aus, falls du STARTTLS verwendest."
|
||||
testEmail: "Emailversand testen"
|
||||
wordMute: "Wortstummschaltung"
|
||||
wordMuteDescription: ""
|
||||
hardWordMute: "Harte Wort-Stummschaltung"
|
||||
wordMuteDescription: "Minimiert Notizen, die das angegebene Wort oder den angegebenen Ausdruck enthalten. Minimierte Notizen können angezeigt werden, indem du auf sie klickst."
|
||||
hardWordMute: "Harte Wortstummschaltung"
|
||||
showMutedWord: "Stummgeschaltete Wörter anzeigen"
|
||||
hardWordMuteDescription: "Blendet Notizen aus, die das angegebene Wort oder die angegebene Phrase enthalten. Im Gegensatz zur Wortstummschaltung wird die Notiz vollständig ausgeblendet."
|
||||
regexpError: "Fehler in einem regulären Ausdruck"
|
||||
regexpErrorDescription: "Im regulären Ausdruck deiner in Zeile {line} von {tab}en Wortstummschaltungen ist ein Fehler aufgetreten:"
|
||||
instanceMute: "Instanzstummschaltungen"
|
||||
userSaysSomething: "{name} hat etwas gesagt"
|
||||
userSaysSomethingAbout: "{name} sagt etwas über '{word}'"
|
||||
makeActive: "Aktivieren"
|
||||
display: "Anzeigeart"
|
||||
copy: "Kopieren"
|
||||
|
@ -856,6 +863,7 @@ administration: "Verwaltung"
|
|||
accounts: "Benutzerkonten"
|
||||
switch: "Wechseln"
|
||||
noMaintainerInformationWarning: "Betreiberinformationen sind nicht konfiguriert."
|
||||
noInquiryUrlWarning: "Keine gültige URL."
|
||||
noBotProtectionWarning: "Schutz vor Bots ist nicht konfiguriert."
|
||||
configure: "Konfigurieren"
|
||||
postToGallery: "Neuen Galeriebeitrag erstellen"
|
||||
|
@ -1088,6 +1096,7 @@ retryAllQueuesConfirmTitle: "Wirklich erneut versuchen?"
|
|||
retryAllQueuesConfirmText: "Dies wird zu einer temporären Erhöhung der Serverlast führen."
|
||||
enableChartsForRemoteUser: "Diagramme für Nutzer fremder Instanzen erstellen"
|
||||
enableChartsForFederatedInstances: "Diagramme für fremde Instanzen erstellen"
|
||||
enableStatsForFederatedInstances: "Abruf von Informationen über förderierte Server"
|
||||
showClipButtonInNoteFooter: "\"Clip\" zum Notizmenu hinzufügen"
|
||||
reactionsDisplaySize: "Reaktionsanzeigegröße"
|
||||
limitWidthOfReaction: "Begrenze die Breite der Reaktion und zeige sie verkleinert an"
|
||||
|
@ -1136,6 +1145,8 @@ preventAiLearningDescription: "Fordert Crawler auf, gepostetes Text- oder Bildma
|
|||
options: "Optionen"
|
||||
specifyUser: "Spezifischer Benutzer"
|
||||
lookupConfirm: "Zustimmen?"
|
||||
openTagPageConfirm: "Hashtag Seite wirklich öffnen?"
|
||||
specifyHost: "Host"
|
||||
failedToPreviewUrl: "Vorschau nicht anzeigbar"
|
||||
update: "Aktualisieren"
|
||||
rolesThatCanBeUsedThisEmojiAsReaction: "Rollen, die dieses Emoji als Reaktion verwenden können"
|
||||
|
@ -1194,6 +1205,7 @@ showRenotes: "Renotes anzeigen"
|
|||
edited: "Bearbeitet"
|
||||
notificationRecieveConfig: "Benachrichtigungseinstellungen"
|
||||
mutualFollow: "Gegenseitig gefolgt"
|
||||
followingOrFollower: "Follow oder Follower"
|
||||
fileAttachedOnly: "Nur Notizen mit Dateien"
|
||||
showRepliesToOthersInTimeline: "Antworten in Chronik anzeigen"
|
||||
hideRepliesToOthersInTimeline: "Antworten nicht in Chronik anzeigen"
|
||||
|
@ -1231,7 +1243,7 @@ signupPendingError: "Beim Überprüfen der Mailadresse ist etwas schiefgelaufen.
|
|||
cwNotationRequired: "Ist \"Inhaltswarnung verwenden\" aktiviert, muss eine Beschreibung gegeben werden."
|
||||
doReaction: "Reagieren"
|
||||
code: "Code"
|
||||
reloadRequiredToApplySettings: "Ein Neustart ist erforderlich um die Einstellung zu übernehmen."
|
||||
reloadRequiredToApplySettings: "Eine Aktualisierung ist erforderlich, um die Einstellungen zu übernehmen."
|
||||
remainingN: "Verbleibend: {n}"
|
||||
overwriteContentConfirm: "Bist du sicher, dass du den aktuellen Inhalt überschreiben willst?"
|
||||
seasonalScreenEffect: "Saisonaler Bildschirmeffekt"
|
||||
|
@ -1294,10 +1306,12 @@ thisContentsAreMarkedAsSigninRequiredByAuthor: "Logge dich ein, um weitere Inhal
|
|||
lockdown: "Sperren"
|
||||
pleaseSelectAccount: "Bitte Konto auswählen"
|
||||
availableRoles: "Verfügbare Rollen"
|
||||
federationSpecified: "Dieser Server arbeitet mit Whitelist-Föderation. Er kann nicht mit anderen als den vom Administrator angegebenen Servern interagieren."
|
||||
federationDisabled: "Föderation ist auf diesem Server deaktiviert. Es ist nicht möglich, mit Benutzern auf anderen Servern zu interagieren."
|
||||
_accountSettings:
|
||||
requireSigninToViewContents: "Anmeldung erfordern, um Inhalte anzuzeigen"
|
||||
requireSigninToViewContentsDescription1: "Erfordere eine Anmeldung, um alle Notizen und andere Inhalte anzuzeigen, die du erstellt hast. Dadurch wird verhindert, dass Crawler deine Informationen sammeln."
|
||||
requireSigninToViewContentsDescription2: ""
|
||||
requireSigninToViewContentsDescription2: "Der Inhalt wird nicht in URL-Vorschauen (OGP), eingebettet in Webseiten oder auf Servern, die keine Zitate unterstützen, angezeigt."
|
||||
requireSigninToViewContentsDescription3: "Diese Einschränkungen gelten möglicherweise nicht für föderierte Inhalte von anderen Servern."
|
||||
makeNotesFollowersOnlyBefore: "Macht frühere Notizen nur für Follower sichtbar"
|
||||
makeNotesHiddenBefore: "Frühere Notizen privat machen"
|
||||
|
@ -1417,6 +1431,7 @@ _serverSettings:
|
|||
fanoutTimelineDescription: "Ist diese Option aktiviert, kann eine erhebliche Verbesserung im Abrufen von Chroniken und eine Reduzierung der Datenbankbelastung erzielt werden, im Gegenzug zu einer Steigerung in der Speichernutzung von Redis. Bei geringem Serverspeicher oder Serverinstabilität kann diese Option deaktiviert werden."
|
||||
fanoutTimelineDbFallback: "Auf die Datenbank zurückfallen"
|
||||
fanoutTimelineDbFallbackDescription: "Ist diese Option aktiviert, wird die Chronik auf zusätzliche Abfragen in der Datenbank zurückgreifen, wenn sich die Chronik nicht im Cache befindet. Eine Deaktivierung führt zu geringerer Serverlast, aber schränkt den Zeitraum der abrufbaren Chronik ein. "
|
||||
openRegistrationWarning: "Das Aktivieren von Registrierungen ist riskant. Es wird empfohlen, sie nur dann zu aktivieren, wenn der Server ständig überwacht wird und im Falle eines Problems sofort reagiert werden kann."
|
||||
thisSettingWillAutomaticallyOffWhenModeratorsInactive: "Wenn über einen bestimmten Zeitraum keine Moderatorenaktivität festgestellt wird, wird diese Einstellung automatisch deaktiviert, um Spam zu verhindern."
|
||||
_accountMigration:
|
||||
moveFrom: "Von einem anderen Konto zu diesem migrieren"
|
||||
|
@ -1878,6 +1893,7 @@ _channel:
|
|||
notesCount: "{n} Notizen"
|
||||
nameAndDescription: "Name und Beschreibung"
|
||||
nameOnly: "Nur Name"
|
||||
allowRenoteToExternal: "Renotes und Zitierungen außerhalb des Kanals erlauben"
|
||||
_menuDisplay:
|
||||
sideFull: "Seitlich"
|
||||
sideIcon: "Seitlich (Icons)"
|
||||
|
@ -1966,6 +1982,7 @@ _sfx:
|
|||
note: "Notizen"
|
||||
noteMy: "Meine Notizen"
|
||||
notification: "Benachrichtigungen"
|
||||
reaction: "Auswählen einer Reaktion"
|
||||
_soundSettings:
|
||||
driveFile: "Audiodatei aus dem Drive verwenden"
|
||||
driveFileWarn: "Wähle eine Audiodatei aus dem Drive"
|
||||
|
@ -2064,12 +2081,22 @@ _permissions:
|
|||
"read:admin:server-info": "Serverinformationen anzeigen"
|
||||
"read:admin:show-moderation-log": "Moderationsprotokoll einsehen"
|
||||
"read:admin:show-user": "Private Benutzerinformationen einsehen"
|
||||
"write:admin:roles": "Rollen verwalten"
|
||||
"read:admin:roles": "Rollen anzeigen"
|
||||
"write:admin:relays": "Relays verwalten"
|
||||
"read:admin:relays": "Relays anzeigen"
|
||||
"write:admin:invite-codes": "Einladungscodes verwalten"
|
||||
"read:admin:invite-codes": "Einladungscodes anzeigen"
|
||||
"write:admin:announcements": "Ankündigungen verwalten"
|
||||
"read:admin:announcements": "Ankündigungen einsehen"
|
||||
"write:admin:avatar-decorations": "Kann Avatar-Dekorationen verwalten"
|
||||
"read:admin:avatar-decorations": "Avatar-Dekorationen ansehen"
|
||||
"write:admin:account": "Benutzerkonten verwalten"
|
||||
"read:admin:account": "Benutzerkonten anzeigen"
|
||||
"write:admin:emoji": "Emojis verwalten"
|
||||
"read:admin:emoji": "Emojis anzeigen"
|
||||
"write:admin:queue": "Job-Warteschlange verwalten"
|
||||
"read:admin:queue": "Job-Warteschlange anzeigen"
|
||||
_auth:
|
||||
shareAccessTitle: "Verteilung von App-Berechtigungen"
|
||||
shareAccess: "Möchtest du „{name}“ authorisieren, auf dieses Benutzerkonto zugreifen zu können?"
|
||||
|
@ -2187,6 +2214,8 @@ _profile:
|
|||
changeAvatar: "Profilbild ändern"
|
||||
changeBanner: "Banner ändern"
|
||||
verifiedLinkDescription: "Gibst du hier eine URL ein, die einen Link zu deinem Profile enthält, wird neben diesem Feld ein Icon zur Besitzbestätigung angezeigt."
|
||||
avatarDecorationMax: "Du kannst bis zu {max} Dekorationen hinzufügen."
|
||||
followedMessageDescription: "Du kannst eine kurze Nachricht festlegen, die dem Empfänger angezeigt wird, wenn er dir folgt."
|
||||
_exportOrImport:
|
||||
allNotes: "Alle Notizen"
|
||||
favoritedNotes: "Als Favorit markierte Notizen"
|
||||
|
@ -2319,6 +2348,7 @@ _notification:
|
|||
reactedBySomeUsers: "{n} Benutzer haben eine Reaktion geschickt"
|
||||
renotedBySomeUsers: "Renote von {n} Benutzern"
|
||||
followedBySomeUsers: "Von {n} Benutzern gefolgt"
|
||||
login: "Neue Anmeldung erfolgt"
|
||||
_types:
|
||||
all: "Alle"
|
||||
note: "Neue Notizen"
|
||||
|
@ -2331,6 +2361,7 @@ _notification:
|
|||
pollEnded: "Ende von Umfragen"
|
||||
receiveFollowRequest: "Erhaltene Follow-Anfragen"
|
||||
followRequestAccepted: "Akzeptierte Follow-Anfragen"
|
||||
roleAssigned: "Rolle zugewiesen"
|
||||
achievementEarned: "Errungenschaft freigeschaltet"
|
||||
login: "Anmelden"
|
||||
app: "Benachrichtigungen von Apps"
|
||||
|
@ -2382,6 +2413,7 @@ _webhookSettings:
|
|||
createWebhook: "Webhook erstellen"
|
||||
name: "Name"
|
||||
secret: "Secret"
|
||||
trigger: "Auslöser"
|
||||
active: "Aktiviert"
|
||||
_events:
|
||||
follow: "Wenn du jemandem folgst"
|
||||
|
@ -2393,8 +2425,10 @@ _webhookSettings:
|
|||
mention: "Wenn du erwähnt wirst"
|
||||
_abuseReport:
|
||||
_notificationRecipient:
|
||||
createRecipient: "Meldungsempfänger hinzufügen"
|
||||
_recipientType:
|
||||
mail: "Email"
|
||||
keywords: "Schlüsselwort"
|
||||
_moderationLogTypes:
|
||||
createRole: "Rolle erstellt"
|
||||
deleteRole: "Rolle gelöscht"
|
||||
|
@ -2429,6 +2463,13 @@ _moderationLogTypes:
|
|||
createAvatarDecoration: "Profilbilddekoration erstellt"
|
||||
updateAvatarDecoration: "Profilbilddekoration aktualisiert"
|
||||
deleteAvatarDecoration: "Profilbilddekoration gelöscht"
|
||||
unsetUserAvatar: "Profilbild zurückgesetzt"
|
||||
unsetUserBanner: "Profilbanner zurückgesetzt"
|
||||
createSystemWebhook: "System-Webhook erstellt"
|
||||
updateSystemWebhook: "System-Webhook aktualisiert"
|
||||
deleteSystemWebhook: "System-Webhook gelöscht"
|
||||
deletePage: "Seite gelöscht"
|
||||
deleteGalleryPost: "Galeriebeitrag gelöscht"
|
||||
_fileViewer:
|
||||
title: "Dateiinformationen"
|
||||
type: "Dateityp"
|
||||
|
@ -2478,6 +2519,10 @@ _externalResourceInstaller:
|
|||
_themeInstallFailed:
|
||||
title: "Das Farbschema konnte nicht installiert werden"
|
||||
description: "Während der Installation des Farbschemas ist ein Problem aufgetreten. Bitte versuche es erneut. Detaillierte Fehlerinformationen können über die Javascript-Konsole abgerufen werden."
|
||||
_hemisphere:
|
||||
N: "Nördliche Erdhalbkugel"
|
||||
S: "Südliche Erdhalbkugel"
|
||||
caption: "Wird in einigen Client-Einstellungen zur Bestimmung der Jahreszeit verwendet."
|
||||
_reversi:
|
||||
blackOrWhite: "Schwarz/Weiß"
|
||||
rules: "Regeln"
|
||||
|
@ -2485,17 +2530,26 @@ _reversi:
|
|||
white: "Weiß"
|
||||
total: "Gesamt"
|
||||
_offlineScreen:
|
||||
title: "Offline - keine Verbindung zum Server möglich"
|
||||
header: "Verbindung zum Server nicht möglich"
|
||||
_urlPreviewSetting:
|
||||
title: "Einstellungen der URL-Vorschau"
|
||||
enable: "URL-Vorschau aktivieren"
|
||||
timeout: "Zeitüberschreitung beim Abrufen der Vorschau (ms)"
|
||||
timeoutDescription: "Übersteigt die für die Vorschau benötigte Zeit diesen Wert, wird keine Vorschau generiert."
|
||||
maximumContentLength: "Maximale Content-Length (Bytes)"
|
||||
maximumContentLengthDescription: "Wenn die Content-Length diesen Wert überschreitet, wird keine Vorschau erzeugt."
|
||||
requireContentLength: "Vorschau nur generieren, wenn Content-Length verfügbar ist"
|
||||
requireContentLengthDescription: "Wenn der Server keine Content-Length zurückgibt, wird keine Vorschau erzeugt."
|
||||
userAgent: "User-Agent"
|
||||
_mediaControls:
|
||||
playbackRate: "Wiedergabegeschwindigkeit"
|
||||
_contextMenu:
|
||||
title: "Kontextmenü"
|
||||
app: "Anwendung"
|
||||
_gridComponent:
|
||||
_error:
|
||||
requiredValue: "Dieser Wert ist ein Pflichtfeld"
|
||||
_embedCodeGen:
|
||||
title: "Einbettungscode anpassen"
|
||||
header: "Kopfzeile anzeigen"
|
||||
|
@ -2513,5 +2567,12 @@ _selfXssPrevention:
|
|||
description1: "Wenn du hier etwas einfügst, könnte ein böswilliger Benutzer dein Konto übernehmen oder deine persönlichen Daten stehlen."
|
||||
description3: "Weitere Informationen findest du hier. {link}"
|
||||
_remoteLookupErrors:
|
||||
_federationNotAllowed:
|
||||
title: "Kommunikation mit diesem Server nicht möglich"
|
||||
description: "Möglicherweise wurde die Kommunikation mit diesem Server deaktiviert oder dieser Server ist blockiert.\nWende dich bitte an den Serveradministrator."
|
||||
_uriInvalid:
|
||||
title: "URI ist fehlerhaft"
|
||||
description: "Es gibt ein Problem mit der von dir eingegebenen URI. Bitte prüfe, ob du Zeichen eingegeben hast, die in der URI nicht verwendet werden können."
|
||||
_noSuchObject:
|
||||
title: "Nicht gefunden"
|
||||
description: "Die angeforderte Ressource konnte nicht gefunden werden, bitte überprüfe die URI erneut."
|
||||
|
|
|
@ -5,6 +5,7 @@ introMisskey: "Welcome! Misskey is an open source, decentralized microblogging s
|
|||
poweredByMisskeyDescription: "{name} is one of the services powered by the open source platform <b>Misskey</b> (referred to as a \"Misskey instance\")."
|
||||
monthAndDay: "{month}/{day}"
|
||||
search: "Search"
|
||||
reset: "Reset"
|
||||
notifications: "Notifications"
|
||||
username: "Username"
|
||||
password: "Password"
|
||||
|
@ -48,6 +49,7 @@ pin: "Pin to profile"
|
|||
unpin: "Unpin from profile"
|
||||
copyContent: "Copy contents"
|
||||
copyLink: "Copy link"
|
||||
copyRemoteLink: "Copy remote link"
|
||||
copyLinkRenote: "Copy renote link"
|
||||
delete: "Delete"
|
||||
deleteAndEdit: "Delete and edit"
|
||||
|
@ -686,11 +688,13 @@ testEmail: "Test email delivery"
|
|||
wordMute: "Word mute"
|
||||
wordMuteDescription: "Minimize notes that contain the specified word or phrase. Minimized notes can be displayed by clicking on them."
|
||||
hardWordMute: "Hard word mute"
|
||||
showMutedWord: "Show muted words"
|
||||
hardWordMuteDescription: "Hide notes that contain the specified word or phrase. Unlike word mute, the note will be completely hidden from view."
|
||||
regexpError: "Regular Expression error"
|
||||
regexpErrorDescription: "An error occurred in the regular expression on line {line} of your {tab} word mutes:"
|
||||
instanceMute: "Instance Mutes"
|
||||
userSaysSomething: "{name} said something"
|
||||
userSaysSomethingAbout: "{name} said something about \"{word}\""
|
||||
makeActive: "Activate"
|
||||
display: "Display"
|
||||
copy: "Copy"
|
||||
|
@ -1303,6 +1307,8 @@ lockdown: "Lockdown"
|
|||
pleaseSelectAccount: "Select an account"
|
||||
availableRoles: "Available roles"
|
||||
acknowledgeNotesAndEnable: "Turn on after understanding the precautions."
|
||||
federationSpecified: "This server is operated in a whitelist federation. Interacting with servers other than those designated by the administrator is not allowed."
|
||||
federationDisabled: "Federation is disabled on this server. You cannot interact with users on other servers."
|
||||
_accountSettings:
|
||||
requireSigninToViewContents: "Require sign-in to view contents"
|
||||
requireSigninToViewContentsDescription1: "Require login to view all notes and other content you have created. This will have the effect of preventing crawlers from collecting your information."
|
||||
|
@ -2723,6 +2729,65 @@ _contextMenu:
|
|||
app: "Application"
|
||||
appWithShift: "Application with shift key"
|
||||
native: "Native"
|
||||
_gridComponent:
|
||||
_error:
|
||||
requiredValue: "This value is required"
|
||||
columnTypeNotSupport: "Validation with regular expression is supported only for type:text columns."
|
||||
patternNotMatch: "This value doesn't match the pattern in {pattern}"
|
||||
notUnique: "This value must be unique"
|
||||
_roleSelectDialog:
|
||||
notSelected: "Not selected"
|
||||
_customEmojisManager:
|
||||
_gridCommon:
|
||||
copySelectionRows: "Copy selected rows"
|
||||
copySelectionRanges: "Copy selected ranges"
|
||||
deleteSelectionRows: "Delete selected rows"
|
||||
deleteSelectionRanges: "Delete rows in the selection"
|
||||
searchSettings: "Search settings"
|
||||
searchSettingCaption: "Set detailed search criteria."
|
||||
searchLimit: ""
|
||||
sortOrder: "Sort order"
|
||||
registrationLogs: "Registration log"
|
||||
registrationLogsCaption: "Logs will be displayed when updating or deleting Emojis. They will disappear after updating or deleting them, moving to a new page, or reloading."
|
||||
alertEmojisRegisterFailedDescription: "Failed to update or delete Emojis. Please check the registration log for details."
|
||||
_logs:
|
||||
showSuccessLogSwitch: "Show success log"
|
||||
failureLogNothing: "There is no failure log."
|
||||
logNothing: "There is no log."
|
||||
_remote:
|
||||
selectionRowDetail: "Selected row's detail"
|
||||
importSelectionRows: "Import selected rows"
|
||||
importSelectionRangesRows: "Import rows in the selection"
|
||||
importEmojisButton: "Import checked Emojis"
|
||||
confirmImportEmojisTitle: "Import Emojis"
|
||||
confirmImportEmojisDescription: "Import {count} Emoji(s) received from the remote server. Please pay close attention to the license of the Emoji. Are you sure to continue?"
|
||||
_local:
|
||||
tabTitleList: "List of registered Emojis"
|
||||
tabTitleRegister: "Emoji registration"
|
||||
_list:
|
||||
emojisNothing: "There are no registered Emojis."
|
||||
markAsDeleteTargetRows: "Mark selected rows as a target to delete"
|
||||
markAsDeleteTargetRanges: "Mark rows in the selection as a target to delete"
|
||||
alertUpdateEmojisNothingDescription: "There are no updated Emojis."
|
||||
alertDeleteEmojisNothingDescription: "There are no Emojis to be deleted."
|
||||
confirmMovePage: ""
|
||||
confirmChangeView: ""
|
||||
confirmUpdateEmojisDescription: "Update {count} Emoji(s). Are you sure to continue?"
|
||||
confirmDeleteEmojisDescription: "Delete checked {count} Emoji(s). Are you sure to continue?"
|
||||
confirmResetDescription: ""
|
||||
dialogSelectRoleTitle: "Search by roll set in Emojis"
|
||||
_register:
|
||||
uploadSettingTitle: "Upload settings"
|
||||
uploadSettingDescription: "On this screen, you can configure the behavior when uploading Emojis."
|
||||
directoryToCategoryLabel: "Enter the directory name in the \"category\" field"
|
||||
directoryToCategoryCaption: "When you drag and drop a directory, enter the directory name in the \"category\" field."
|
||||
emojiInputAreaCaption: "Select the Emojis you wish to register using one of the methods."
|
||||
emojiInputAreaList1: "Drag and drop image files or a directory into this frame"
|
||||
emojiInputAreaList2: "Click this link to select from your computer"
|
||||
emojiInputAreaList3: "Click this link to select from the drive"
|
||||
confirmRegisterEmojisDescription: "Register the Emojis from the list as new custom Emojis. Are you sure to continue? (To avoid overload, only {count} Emoji(s) can be registered in a single operation)"
|
||||
confirmClearEmojisDescription: "Discard the edits and clear the Emojis from the list. Are you sure to continue?"
|
||||
confirmUploadEmojisDescription: "Upload the dragged and dropped {count} file(s) to the drive. Are you sure to continue?"
|
||||
_embedCodeGen:
|
||||
title: "Customize embed code"
|
||||
header: "Show header"
|
||||
|
@ -2764,3 +2829,16 @@ _remoteLookupErrors:
|
|||
_noSuchObject:
|
||||
title: "Not found"
|
||||
description: "The requested resource was not found, please recheck the URI."
|
||||
_captcha:
|
||||
verify: "Please verify the CAPTCHA"
|
||||
testSiteKeyMessage: "You can check the preview by entering the test values for the site and secret keys.\nPlease see the following page for details."
|
||||
_error:
|
||||
_requestFailed:
|
||||
title: "Failed to request CAPTCHA"
|
||||
text: "Please run it after a while or check the settings again."
|
||||
_verificationFailed:
|
||||
title: "Failed to validate CAPTCHA"
|
||||
text: "Please check again if the settings are correct."
|
||||
_unknown:
|
||||
title: "CAPTCHA error"
|
||||
text: "An unexpected error occurred."
|
||||
|
|
|
@ -5,6 +5,7 @@ introMisskey: "¡Bienvenido/a! Misskey es un servicio de microblogging descentra
|
|||
poweredByMisskeyDescription: "{name} es uno de los servicios (también llamado instancia) que usa la plataforma de código abierto <b>Misskey</b>"
|
||||
monthAndDay: "{day}/{month}"
|
||||
search: "Buscar"
|
||||
reset: "Reiniciar"
|
||||
notifications: "Notificaciones"
|
||||
username: "Nombre de usuario"
|
||||
password: "Contraseña"
|
||||
|
@ -48,6 +49,7 @@ pin: "Fijar al perfil"
|
|||
unpin: "Desfijar"
|
||||
copyContent: "Copiar contenido"
|
||||
copyLink: "Copiar enlace"
|
||||
copyRemoteLink: "Copiar enlace remoto"
|
||||
copyLinkRenote: "Copiar enlace de renota"
|
||||
delete: "Borrar"
|
||||
deleteAndEdit: "Borrar y editar"
|
||||
|
@ -199,6 +201,7 @@ followConfirm: "¿Desea seguir a {name}?"
|
|||
proxyAccount: "Cuenta proxy"
|
||||
proxyAccountDescription: "Una cuenta proxy es una cuenta que actúa como un seguidor remoto de un usuario bajo ciertas condiciones. Por ejemplo, cuando un usuario añade un usuario remoto a una lista, si ningún usuario local sigue al usuario agregado a la lista, la instancia no puede obtener su actividad. Así que la cuenta proxy sigue al usuario añadido a la lista"
|
||||
host: "Host"
|
||||
selectSelf: "Elígete a ti mismo"
|
||||
selectUser: "Elegir usuario"
|
||||
recipient: "Recipiente"
|
||||
annotation: "Anotación"
|
||||
|
@ -452,6 +455,7 @@ totpDescription: "Ingresa una contaseña de un sólo uso usando la aplicación a
|
|||
moderator: "Moderador"
|
||||
moderation: "Moderación"
|
||||
moderationNote: "Nota de moderación"
|
||||
moderationNoteDescription: "Puedes rellenar notas que solo se comparten entre moderadores."
|
||||
addModerationNote: "Añadir nota de moderación"
|
||||
moderationLogs: "Log de moderación"
|
||||
nUsersMentioned: "{n} usuarios mencionados"
|
||||
|
@ -486,10 +490,12 @@ retype: "Ingrese de nuevo"
|
|||
noteOf: "Notas de {user}"
|
||||
quoteAttached: "Cita añadida"
|
||||
quoteQuestion: "¿Quiere añadir una cita?"
|
||||
attachAsFileQuestion: "El texto del portapapeles es demasiado grande ¿Desea adjuntarlo como archivo de texto?"
|
||||
noMessagesYet: "Aún no hay chat"
|
||||
newMessageExists: "Tienes un mensaje nuevo"
|
||||
onlyOneFileCanBeAttached: "Solo se puede añadir un archivo al mensaje"
|
||||
signinRequired: "Iniciar sesión"
|
||||
signinOrContinueOnRemote: "Para continuar, tendrá que ir a su servidor o registrarse e iniciar sesión en este servidor"
|
||||
invitations: "Invitar"
|
||||
invitationCode: "Código de invitación"
|
||||
checking: "Comprobando"
|
||||
|
@ -513,6 +519,8 @@ emojiStyle: "Estilo de emoji"
|
|||
native: "Nativo"
|
||||
menuStyle: "Diseño del menú"
|
||||
style: "Diseño"
|
||||
drawer: "Cajón de Aplicaciones"
|
||||
popup: "Ventana emergente"
|
||||
showNoteActionsOnlyHover: "Mostrar acciones de la nota sólo al pasar el cursor"
|
||||
showReactionsCount: "Mostrar el número de reacciones en las notas"
|
||||
noHistory: "No hay datos en el historial"
|
||||
|
@ -580,6 +588,7 @@ masterVolume: "Volumen principal"
|
|||
notUseSound: "Sin sonido"
|
||||
useSoundOnlyWhenActive: "Sonar solo cuando Misskey esté activo"
|
||||
details: "Detalles"
|
||||
renoteDetails: "Detalles(Renota)"
|
||||
chooseEmoji: "Elije un emoji"
|
||||
unableToProcess: "La operación no se puede llevar a cabo"
|
||||
recentUsed: "Usado recientemente"
|
||||
|
@ -595,6 +604,7 @@ ascendingOrder: "Ascendente"
|
|||
descendingOrder: "Descendente"
|
||||
scratchpad: "Scratch pad"
|
||||
scratchpadDescription: "Scratchpad proporciona un entorno experimental para AiScript. Puede escribir, ejecutar y verificar los resultados que interactúan con Misskey."
|
||||
uiInspector: "Inspector de UI"
|
||||
output: "Salida"
|
||||
script: "Script"
|
||||
disablePagesScript: "Deshabilitar AiScript en Páginas"
|
||||
|
@ -675,7 +685,10 @@ smtpSecure: "Usar SSL/TLS implícito en la conexión SMTP"
|
|||
smtpSecureInfo: "Apagar cuando se use STARTTLS"
|
||||
testEmail: "Prueba de envío"
|
||||
wordMute: "Silenciar palabras"
|
||||
wordMuteDescription: "Minimiza las notas que contienen la palabra o frase especificada. Las notas minimizadas pueden visualizarse haciendo clic sobre ellas."
|
||||
hardWordMute: "Filtro de palabra fuerte"
|
||||
showMutedWord: "Mostrar palabras silenciadas."
|
||||
hardWordMuteDescription: "Oculta las notas que contienen la palabra o frase especificada. A diferencia de Silenciar palabra, la nota quedará completamente oculta a la vista."
|
||||
regexpError: "Error de la expresión regular"
|
||||
regexpErrorDescription: "Ocurrió un error en la expresión regular en la linea {line} de las palabras muteadas {tab}"
|
||||
instanceMute: "Instancias silenciadas"
|
||||
|
@ -1126,6 +1139,7 @@ preventAiLearningDescription: "Pedirle a las arañas (crawlers) no usar los text
|
|||
options: "Opción"
|
||||
specifyUser: "Especificar usuario"
|
||||
lookupConfirm: "¿Quiere informarse?"
|
||||
specifyHost: "Especificar Host"
|
||||
failedToPreviewUrl: "No se pudo generar la vista previa"
|
||||
update: "Actualizar"
|
||||
rolesThatCanBeUsedThisEmojiAsReaction: "Roles que pueden usar este emoji como reacción"
|
||||
|
@ -1260,6 +1274,11 @@ tryAgain: "Por favor , inténtalo de nuevo"
|
|||
performance: "Rendimiento"
|
||||
unknownWebAuthnKey: "Esto no se ha registrado llave maestra."
|
||||
messageToFollower: "Mensaje a seguidores"
|
||||
federationSpecified: "Este servidor opera en una federación de listas blancas. No puede interactuar con otros servidores que no sean los especificados por el administrador."
|
||||
federationDisabled: "La federación está desactivada en este servidor. No puede interactuar con usuarios de otros servidores"
|
||||
_accountSettings:
|
||||
requireSigninToViewContents: "Se requiere iniciar sesión para ver el contenido"
|
||||
requireSigninToViewContentsDescription1: "Requiere iniciar sesión para ver todas las notas y otros contenidos que hayas creado. Se espera que esto evite que los rastreadores recopilen información."
|
||||
_abuseUserReport:
|
||||
accept: "Acepte"
|
||||
reject: "repudio"
|
||||
|
|
|
@ -36,6 +36,10 @@ export interface Locale extends ILocale {
|
|||
* 検索
|
||||
*/
|
||||
"search": string;
|
||||
/**
|
||||
* リセット
|
||||
*/
|
||||
"reset": string;
|
||||
/**
|
||||
* 通知
|
||||
*/
|
||||
|
@ -10543,6 +10547,227 @@ export interface Locale extends ILocale {
|
|||
*/
|
||||
"native": string;
|
||||
};
|
||||
"_gridComponent": {
|
||||
"_error": {
|
||||
/**
|
||||
* この値は必須項目です
|
||||
*/
|
||||
"requiredValue": string;
|
||||
/**
|
||||
* 正規表現によるバリデーションはtype:textのカラムのみサポートします。
|
||||
*/
|
||||
"columnTypeNotSupport": string;
|
||||
/**
|
||||
* この値は{pattern}のパターンに一致しません
|
||||
*/
|
||||
"patternNotMatch": ParameterizedString<"pattern">;
|
||||
/**
|
||||
* この値は一意である必要があります
|
||||
*/
|
||||
"notUnique": string;
|
||||
};
|
||||
};
|
||||
"_roleSelectDialog": {
|
||||
/**
|
||||
* 選択されていません
|
||||
*/
|
||||
"notSelected": string;
|
||||
};
|
||||
"_customEmojisManager": {
|
||||
"_gridCommon": {
|
||||
/**
|
||||
* 選択行をコピー
|
||||
*/
|
||||
"copySelectionRows": string;
|
||||
/**
|
||||
* 選択範囲をコピー
|
||||
*/
|
||||
"copySelectionRanges": string;
|
||||
/**
|
||||
* 選択行を削除
|
||||
*/
|
||||
"deleteSelectionRows": string;
|
||||
/**
|
||||
* 選択範囲の値をクリア
|
||||
*/
|
||||
"deleteSelectionRanges": string;
|
||||
/**
|
||||
* 検索設定
|
||||
*/
|
||||
"searchSettings": string;
|
||||
/**
|
||||
* 検索条件を詳細に設定します。
|
||||
*/
|
||||
"searchSettingCaption": string;
|
||||
/**
|
||||
* 表示件数
|
||||
*/
|
||||
"searchLimit": string;
|
||||
/**
|
||||
* 並び順
|
||||
*/
|
||||
"sortOrder": string;
|
||||
/**
|
||||
* 登録ログ
|
||||
*/
|
||||
"registrationLogs": string;
|
||||
/**
|
||||
* 絵文字更新・削除時のログが表示されます。更新・削除操作を行ったり、ページを遷移・リロードすると消えます。
|
||||
*/
|
||||
"registrationLogsCaption": string;
|
||||
/**
|
||||
* 絵文字の更新・削除に失敗しました。詳細は登録ログをご確認ください。
|
||||
*/
|
||||
"alertEmojisRegisterFailedDescription": string;
|
||||
};
|
||||
"_logs": {
|
||||
/**
|
||||
* 成功ログを表示
|
||||
*/
|
||||
"showSuccessLogSwitch": string;
|
||||
/**
|
||||
* 失敗ログはありません。
|
||||
*/
|
||||
"failureLogNothing": string;
|
||||
/**
|
||||
* ログはありません。
|
||||
*/
|
||||
"logNothing": string;
|
||||
};
|
||||
"_remote": {
|
||||
/**
|
||||
* 選択行の詳細
|
||||
*/
|
||||
"selectionRowDetail": string;
|
||||
/**
|
||||
* 選択行をインポート
|
||||
*/
|
||||
"importSelectionRows": string;
|
||||
/**
|
||||
* 選択範囲の行をインポート
|
||||
*/
|
||||
"importSelectionRangesRows": string;
|
||||
/**
|
||||
* チェックされた絵文字をインポート
|
||||
*/
|
||||
"importEmojisButton": string;
|
||||
/**
|
||||
* 絵文字のインポート
|
||||
*/
|
||||
"confirmImportEmojisTitle": string;
|
||||
/**
|
||||
* リモートから受信した{count}個の絵文字のインポートを行います。絵文字のライセンスに十分な注意を払ってください。実行しますか?
|
||||
*/
|
||||
"confirmImportEmojisDescription": ParameterizedString<"count">;
|
||||
};
|
||||
"_local": {
|
||||
/**
|
||||
* 登録済み絵文字一覧
|
||||
*/
|
||||
"tabTitleList": string;
|
||||
/**
|
||||
* 絵文字の登録
|
||||
*/
|
||||
"tabTitleRegister": string;
|
||||
"_list": {
|
||||
/**
|
||||
* 登録された絵文字はありません。
|
||||
*/
|
||||
"emojisNothing": string;
|
||||
/**
|
||||
* 選択行を削除対象にする
|
||||
*/
|
||||
"markAsDeleteTargetRows": string;
|
||||
/**
|
||||
* 選択範囲の行を削除対象にする
|
||||
*/
|
||||
"markAsDeleteTargetRanges": string;
|
||||
/**
|
||||
* 変更された絵文字はありません。
|
||||
*/
|
||||
"alertUpdateEmojisNothingDescription": string;
|
||||
/**
|
||||
* 削除対象の絵文字はありません。
|
||||
*/
|
||||
"alertDeleteEmojisNothingDescription": string;
|
||||
/**
|
||||
* ページを移動しますか?
|
||||
*/
|
||||
"confirmMovePage": string;
|
||||
/**
|
||||
* 表示を変更しますか?
|
||||
*/
|
||||
"confirmChangeView": string;
|
||||
/**
|
||||
* {count}個の絵文字を更新します。実行しますか?
|
||||
*/
|
||||
"confirmUpdateEmojisDescription": ParameterizedString<"count">;
|
||||
/**
|
||||
* チェックがつけられた{count}個の絵文字を削除します。実行しますか?
|
||||
*/
|
||||
"confirmDeleteEmojisDescription": ParameterizedString<"count">;
|
||||
/**
|
||||
* 今までに加えた変更がすべてリセットされます。
|
||||
*/
|
||||
"confirmResetDescription": string;
|
||||
/**
|
||||
* このページの絵文字に変更が加えられています。
|
||||
* 保存せずにこのままページを移動すると、このページで加えた変更はすべて破棄されます。
|
||||
*/
|
||||
"confirmMovePageDesciption": string;
|
||||
/**
|
||||
* 絵文字に設定されたロールで検索
|
||||
*/
|
||||
"dialogSelectRoleTitle": string;
|
||||
};
|
||||
"_register": {
|
||||
/**
|
||||
* アップロード設定
|
||||
*/
|
||||
"uploadSettingTitle": string;
|
||||
/**
|
||||
* この画面で絵文字アップロードを行う際の動作を設定できます。
|
||||
*/
|
||||
"uploadSettingDescription": string;
|
||||
/**
|
||||
* ディレクトリ名を"category"に入力する
|
||||
*/
|
||||
"directoryToCategoryLabel": string;
|
||||
/**
|
||||
* ディレクトリをドラッグ・ドロップした時に、ディレクトリ名を"category"に入力します。
|
||||
*/
|
||||
"directoryToCategoryCaption": string;
|
||||
/**
|
||||
* いずれかの方法で登録する絵文字を選択してください。
|
||||
*/
|
||||
"emojiInputAreaCaption": string;
|
||||
/**
|
||||
* この枠に画像ファイルまたはディレクトリをドラッグ&ドロップ
|
||||
*/
|
||||
"emojiInputAreaList1": string;
|
||||
/**
|
||||
* このリンクをクリックしてPCから選択する
|
||||
*/
|
||||
"emojiInputAreaList2": string;
|
||||
/**
|
||||
* このリンクをクリックしてドライブから選択する
|
||||
*/
|
||||
"emojiInputAreaList3": string;
|
||||
/**
|
||||
* リストに表示されている絵文字を新たなカスタム絵文字として登録します。よろしいですか?(負荷を避けるため、一度の操作で登録可能な絵文字は{count}件までです)
|
||||
*/
|
||||
"confirmRegisterEmojisDescription": ParameterizedString<"count">;
|
||||
/**
|
||||
* 編集内容を破棄し、リストに表示されている絵文字をクリアします。よろしいですか?
|
||||
*/
|
||||
"confirmClearEmojisDescription": string;
|
||||
/**
|
||||
* ドラッグ&ドロップされた{count}個のファイルをドライブにアップロードします。実行しますか?
|
||||
*/
|
||||
"confirmUploadEmojisDescription": ParameterizedString<"count">;
|
||||
};
|
||||
};
|
||||
};
|
||||
"_embedCodeGen": {
|
||||
/**
|
||||
* 埋め込みコードをカスタマイズ
|
||||
|
|
|
@ -5,6 +5,7 @@ introMisskey: "Eccoci! Misskey è un servizio di microblogging decentralizzato,
|
|||
poweredByMisskeyDescription: "{name} è uno dei servizi (chiamati istanze) che utilizzano la piattaforma open source <b>Misskey</b>."
|
||||
monthAndDay: "{day}/{month}"
|
||||
search: "Cerca"
|
||||
reset: "Ripristinare"
|
||||
notifications: "Notifiche"
|
||||
username: "Nome utente"
|
||||
password: "Password"
|
||||
|
@ -106,7 +107,7 @@ makeFollowManuallyApprove: "Approva i follower manualmente"
|
|||
defaultNoteVisibility: "Privacy predefinita delle note"
|
||||
follow: "Segui"
|
||||
followRequest: "Richiesta di follow"
|
||||
followRequests: "Richieste di follow"
|
||||
followRequests: "Relazioni"
|
||||
unfollow: "Togli Following"
|
||||
followRequestPending: "Richiesta in approvazione"
|
||||
enterEmoji: "Inserisci emoji"
|
||||
|
@ -536,7 +537,7 @@ regenerate: "Generare di nuovo"
|
|||
fontSize: "Dimensione carattere"
|
||||
mediaListWithOneImageAppearance: "Altezza dell'elenco media con una sola immagine "
|
||||
limitTo: "Limita a {x}"
|
||||
noFollowRequests: "Non hai alcuna richiesta di follow"
|
||||
noFollowRequests: "Non ci sono richieste di relazione"
|
||||
openImageInNewTab: "Apri le immagini in un nuovo tab"
|
||||
dashboard: "Pannello di controllo"
|
||||
local: "Locale"
|
||||
|
@ -1932,7 +1933,7 @@ _serverDisconnectedBehavior:
|
|||
quiet: "Visualizza avviso in modo discreto"
|
||||
_channel:
|
||||
create: "Nuovo canale"
|
||||
edit: "Gerisci canale"
|
||||
edit: "Modifica il canale"
|
||||
setBanner: "Scegli intestazione"
|
||||
removeBanner: "Rimuovi intestazione"
|
||||
featured: "Popolari nel canale"
|
||||
|
@ -1960,7 +1961,7 @@ _instanceMute:
|
|||
_theme:
|
||||
explore: "Esplora temi"
|
||||
install: "Installa un tema"
|
||||
manage: "Gestione temi"
|
||||
manage: "Gestione dei temi"
|
||||
code: "Codice tema"
|
||||
description: "Descrizione"
|
||||
installed: "{name} è installato"
|
||||
|
@ -2107,12 +2108,12 @@ _permissions:
|
|||
"read:messaging": "Visualizzare la chat"
|
||||
"write:messaging": "Gestire la chat"
|
||||
"read:mutes": "Vedi i profili silenziati"
|
||||
"write:mutes": "Gestisci i profili silenziati"
|
||||
"write:mutes": "Gestione dei profili silenziati"
|
||||
"write:notes": "Creare / Eliminare note"
|
||||
"read:notifications": "Visualizzare notifiche"
|
||||
"write:notifications": "Gestire notifiche"
|
||||
"write:notifications": "Gestione delle notifiche"
|
||||
"read:reactions": "Vedi reazioni"
|
||||
"write:reactions": "Gerisci reazioni"
|
||||
"write:reactions": "Gestione delle reazioni"
|
||||
"write:votes": "Votare"
|
||||
"read:pages": "Visualizzare pagine"
|
||||
"write:pages": "Gestire pagine"
|
||||
|
@ -2121,7 +2122,7 @@ _permissions:
|
|||
"read:user-groups": "Vedere i gruppi di utenti"
|
||||
"write:user-groups": "Gestire i gruppi di utenti"
|
||||
"read:channels": "Visualizza canali"
|
||||
"write:channels": "Gerisci canali"
|
||||
"write:channels": "Gestione dei canali"
|
||||
"read:gallery": "Visualizza la galleria."
|
||||
"write:gallery": "Gestione della galleria"
|
||||
"read:gallery-likes": "Visualizza i contenuti della galleria."
|
||||
|
@ -2728,6 +2729,66 @@ _contextMenu:
|
|||
app: "Applicazione"
|
||||
appWithShift: "Applicazione Shift+Tasto"
|
||||
native: "Interfaccia utente del browser"
|
||||
_gridComponent:
|
||||
_error:
|
||||
requiredValue: "Campo obbligatorio"
|
||||
columnTypeNotSupport: "Solo le colonne type:text permettono la convalida delle Espresioni Regolari"
|
||||
patternNotMatch: "Il valore non coincide con {pattern}"
|
||||
notUnique: "Il valore deve essere univoco"
|
||||
_roleSelectDialog:
|
||||
notSelected: "Niente selezioato"
|
||||
_customEmojisManager:
|
||||
_gridCommon:
|
||||
copySelectionRows: "Copia le righe selezionate"
|
||||
copySelectionRanges: "Copia l'intervallo selezionato"
|
||||
deleteSelectionRows: "Elimina le righe selezionate"
|
||||
deleteSelectionRanges: "Elimina le righe nell'intervallo selezionato"
|
||||
searchSettings: "Impostazioni di ricerca"
|
||||
searchSettingCaption: "Imposta condizioni di ricerca dettagliate."
|
||||
searchLimit: "Risultati visualizzati"
|
||||
sortOrder: "Ordine"
|
||||
registrationLogs: "Storico della registrazione"
|
||||
registrationLogsCaption: "Lo storico verrà visualizzato in base alla attività sulle emoji. Scompare quando si esegue un'operazione di aggiornamento/eliminazione o si modifica/ricarica la pagina."
|
||||
alertEmojisRegisterFailedDescription: "Attenzione, è impossibile modificare la emoji. Si prega di controllare lo storico per ulteriori dettagli."
|
||||
_logs:
|
||||
showSuccessLogSwitch: "Mostra le azioni a buon fine"
|
||||
failureLogNothing: "Non ci sono errori nello storico delle emoji"
|
||||
logNothing: "Lo storico è vuoto."
|
||||
_remote:
|
||||
selectionRowDetail: "Dettagli della riga selezionata"
|
||||
importSelectionRows: "Importa le righe selezionate"
|
||||
importSelectionRangesRows: "Importa le righe nell'intervallo selezionato"
|
||||
importEmojisButton: "Importa le emoji selezionate"
|
||||
confirmImportEmojisTitle: "Importazione emoji"
|
||||
confirmImportEmojisDescription: "Importazione di {count} emoji ricevute da remoto. Si prega di prestare molta attenzione al tipo di licenza delle emoji. Vuoi confermare?"
|
||||
_local:
|
||||
tabTitleList: "Elenco delle emoji registrate"
|
||||
tabTitleRegister: "Registrazione emoji"
|
||||
_list:
|
||||
emojisNothing: "Non ci sono emoji registrate."
|
||||
markAsDeleteTargetRows: "Selezionare le righe come eliminabili"
|
||||
markAsDeleteTargetRanges: "Selezionare le righe nell'intervallo come eliminabili"
|
||||
alertUpdateEmojisNothingDescription: "Non ci sono emoji aggiornate."
|
||||
alertDeleteEmojisNothingDescription: "Non ci sono emoji da eliminare."
|
||||
confirmMovePage: "Vuoi davvero spostare la pagina?"
|
||||
confirmChangeView: "Vuoi davvero cambiare la vista?"
|
||||
confirmUpdateEmojisDescription: "Aggiornamento di {count} emoji. Vuoi davvero continuare?"
|
||||
confirmDeleteEmojisDescription: "Eliminazione delle {count} emoji selezionate. Vuoi davvero continuare?"
|
||||
confirmResetDescription: "Verranno ripristinate tutte le modifiche apportate finora."
|
||||
confirmMovePageDesciption: "Sono state modificate le emoji in questa pagina.\nUscendo senza salvare, tutte le modifiche verranno ignorate."
|
||||
dialogSelectRoleTitle: "Cerca emoji per ruolo"
|
||||
_register:
|
||||
uploadSettingTitle: "Caricamento impostazioni"
|
||||
uploadSettingDescription: "Questa schermata ti permette di scegliere il comportamento durante il caricamento delle emoji."
|
||||
directoryToCategoryLabel: "Inseriscile in una cartella omonima alla categoria"
|
||||
directoryToCategoryCaption: "Crea il campo categoria in base alla cartella."
|
||||
emojiInputAreaCaption: "Seleziona l'emoji da registrare utilizzando uno dei metodi."
|
||||
emojiInputAreaList1: "Trascina una immagine o una cartella in quest'area"
|
||||
emojiInputAreaList2: "Clicca per scegliere file dal tuo dispositivo"
|
||||
emojiInputAreaList3: "Clicca per selezionare dal Drive"
|
||||
confirmRegisterEmojisDescription: "Registrazione delle emoji elencate come nuove emoji personalizzate. Vuoi davvero procedere? (Per evitare sovraccarichi, puoi registrare al massimo {count} emoji per volta)"
|
||||
confirmClearEmojisDescription: "Annullare le modifiche e cancella le emoji nell'elenco. Confermi?"
|
||||
confirmUploadEmojisDescription: "Caricamento sul Drive di {count} file locali. Vuoi davvero procedere?"
|
||||
_embedCodeGen:
|
||||
title: "Personalizza il codice di incorporamento"
|
||||
header: "Mostra la testata"
|
||||
|
|
|
@ -5,6 +5,7 @@ introMisskey: "ようこそ!Misskeyは、オープンソースの分散型マ
|
|||
poweredByMisskeyDescription: "{name}は、オープンソースのプラットフォーム<b>Misskey</b>のサーバーのひとつです。"
|
||||
monthAndDay: "{month}月 {day}日"
|
||||
search: "検索"
|
||||
reset: "リセット"
|
||||
notifications: "通知"
|
||||
username: "ユーザー名"
|
||||
password: "パスワード"
|
||||
|
@ -2808,6 +2809,69 @@ _contextMenu:
|
|||
appWithShift: "Shiftキーでアプリケーション"
|
||||
native: "ブラウザのUI"
|
||||
|
||||
_gridComponent:
|
||||
_error:
|
||||
requiredValue: "この値は必須項目です"
|
||||
columnTypeNotSupport: "正規表現によるバリデーションはtype:textのカラムのみサポートします。"
|
||||
patternNotMatch: "この値は{pattern}のパターンに一致しません"
|
||||
notUnique: "この値は一意である必要があります"
|
||||
|
||||
_roleSelectDialog:
|
||||
notSelected: "選択されていません"
|
||||
|
||||
_customEmojisManager:
|
||||
_gridCommon:
|
||||
copySelectionRows: "選択行をコピー"
|
||||
copySelectionRanges: "選択範囲をコピー"
|
||||
deleteSelectionRows: "選択行を削除"
|
||||
deleteSelectionRanges: "選択範囲の値をクリア"
|
||||
searchSettings: "検索設定"
|
||||
searchSettingCaption: "検索条件を詳細に設定します。"
|
||||
searchLimit: "表示件数"
|
||||
sortOrder: "並び順"
|
||||
registrationLogs: "登録ログ"
|
||||
registrationLogsCaption: "絵文字更新・削除時のログが表示されます。更新・削除操作を行ったり、ページを遷移・リロードすると消えます。"
|
||||
alertEmojisRegisterFailedDescription: "絵文字の更新・削除に失敗しました。詳細は登録ログをご確認ください。"
|
||||
_logs:
|
||||
showSuccessLogSwitch: "成功ログを表示"
|
||||
failureLogNothing: "失敗ログはありません。"
|
||||
logNothing: "ログはありません。"
|
||||
_remote:
|
||||
selectionRowDetail: "選択行の詳細"
|
||||
importSelectionRows: "選択行をインポート"
|
||||
importSelectionRangesRows: "選択範囲の行をインポート"
|
||||
importEmojisButton: "チェックされた絵文字をインポート"
|
||||
confirmImportEmojisTitle: "絵文字のインポート"
|
||||
confirmImportEmojisDescription: "リモートから受信した{count}個の絵文字のインポートを行います。絵文字のライセンスに十分な注意を払ってください。実行しますか?"
|
||||
_local:
|
||||
tabTitleList: "登録済み絵文字一覧"
|
||||
tabTitleRegister: "絵文字の登録"
|
||||
_list:
|
||||
emojisNothing: "登録された絵文字はありません。"
|
||||
markAsDeleteTargetRows: "選択行を削除対象にする"
|
||||
markAsDeleteTargetRanges: "選択範囲の行を削除対象にする"
|
||||
alertUpdateEmojisNothingDescription: "変更された絵文字はありません。"
|
||||
alertDeleteEmojisNothingDescription: "削除対象の絵文字はありません。"
|
||||
confirmMovePage: "ページを移動しますか?"
|
||||
confirmChangeView: "表示を変更しますか?"
|
||||
confirmUpdateEmojisDescription: "{count}個の絵文字を更新します。実行しますか?"
|
||||
confirmDeleteEmojisDescription: "チェックがつけられた{count}個の絵文字を削除します。実行しますか?"
|
||||
confirmResetDescription: "今までに加えた変更がすべてリセットされます。"
|
||||
confirmMovePageDesciption: "このページの絵文字に変更が加えられています。\n保存せずにこのままページを移動すると、このページで加えた変更はすべて破棄されます。"
|
||||
dialogSelectRoleTitle: "絵文字に設定されたロールで検索"
|
||||
_register:
|
||||
uploadSettingTitle: "アップロード設定"
|
||||
uploadSettingDescription: "この画面で絵文字アップロードを行う際の動作を設定できます。"
|
||||
directoryToCategoryLabel: "ディレクトリ名を\"category\"に入力する"
|
||||
directoryToCategoryCaption: "ディレクトリをドラッグ・ドロップした時に、ディレクトリ名を\"category\"に入力します。"
|
||||
emojiInputAreaCaption: "いずれかの方法で登録する絵文字を選択してください。"
|
||||
emojiInputAreaList1: "この枠に画像ファイルまたはディレクトリをドラッグ&ドロップ"
|
||||
emojiInputAreaList2: "このリンクをクリックしてPCから選択する"
|
||||
emojiInputAreaList3: "このリンクをクリックしてドライブから選択する"
|
||||
confirmRegisterEmojisDescription: "リストに表示されている絵文字を新たなカスタム絵文字として登録します。よろしいですか?(負荷を避けるため、一度の操作で登録可能な絵文字は{count}件までです)"
|
||||
confirmClearEmojisDescription: "編集内容を破棄し、リストに表示されている絵文字をクリアします。よろしいですか?"
|
||||
confirmUploadEmojisDescription: "ドラッグ&ドロップされた{count}個のファイルをドライブにアップロードします。実行しますか?"
|
||||
|
||||
_embedCodeGen:
|
||||
title: "埋め込みコードをカスタマイズ"
|
||||
header: "ヘッダーを表示"
|
||||
|
|
|
@ -5,6 +5,7 @@ introMisskey: "환영합니다! Misskey는 오픈 소스 분산형 마이크로
|
|||
poweredByMisskeyDescription: "{name} 서버는 오픈소스 플랫폼 <b>Misskey</b>의 서버 가운데 하나입니다."
|
||||
monthAndDay: "{month}월 {day}일"
|
||||
search: "검색"
|
||||
reset: "초기화"
|
||||
notifications: "알림"
|
||||
username: "유저명"
|
||||
password: "비밀번호"
|
||||
|
@ -48,6 +49,7 @@ pin: "프로필에 고정"
|
|||
unpin: "프로필에서 고정 해제"
|
||||
copyContent: "내용 복사"
|
||||
copyLink: "링크 복사"
|
||||
copyRemoteLink: "리모트 서버의 링크로 복사하기"
|
||||
copyLinkRenote: "리노트 링크 복사"
|
||||
delete: "삭제"
|
||||
deleteAndEdit: "삭제 후 편집"
|
||||
|
@ -686,11 +688,13 @@ testEmail: "이메일 전송 테스트"
|
|||
wordMute: "단어 뮤트"
|
||||
wordMuteDescription: "정해진 단어가 포함된 노트를 최소화 한 상태로 표시합니다. 최소화 된 노트는 클릭해서 표시할 수 있습니다."
|
||||
hardWordMute: "하드 단어 뮤트"
|
||||
showMutedWord: "뮤트한 단어를 표시하기"
|
||||
hardWordMuteDescription: "정한 단어가 들어간 노트를 숨깁니다. 단어 뮤트와 차이점은 노트가 아예 보이지 않습니다."
|
||||
regexpError: "정규 표현식 오류"
|
||||
regexpErrorDescription: "{tab}단어 뮤트 {line}행의 정규 표현식에 오류가 발생했습니다:"
|
||||
instanceMute: "서버 뮤트"
|
||||
userSaysSomething: "{name}님이 무언가를 말했습니다"
|
||||
userSaysSomethingAbout: "{name}님이 \"{word}\"를 언급했습니다."
|
||||
makeActive: "활성화"
|
||||
display: "보기"
|
||||
copy: "복사"
|
||||
|
@ -1279,7 +1283,7 @@ confirmWhenRevealingSensitiveMedia: "민감한 미디어를 열 때 두 번 확
|
|||
sensitiveMediaRevealConfirm: "민감한 미디어입니다. 표시할까요?"
|
||||
createdLists: "만든 리스트"
|
||||
createdAntennas: "만든 안테나"
|
||||
fromX: "{x}부터"
|
||||
fromX: "{x}에서"
|
||||
genEmbedCode: "임베디드 코드 만들기"
|
||||
noteOfThisUser: "이 유저의 노트 목록"
|
||||
clipNoteLimitExceeded: "더 이상 이 클립에 노트를 추가 할 수 없습니다."
|
||||
|
@ -1303,6 +1307,8 @@ lockdown: "잠금"
|
|||
pleaseSelectAccount: "계정을 선택해주세요."
|
||||
availableRoles: "사용 가능한 역할"
|
||||
acknowledgeNotesAndEnable: "활성화 하기 전에 주의 사항을 확인했습니다."
|
||||
federationSpecified: "이 서버는 화이트 리스트 제도로 운영 중 입니다. 정해진 리모트 서버가 아닌 경우 연합되지 않습니다."
|
||||
federationDisabled: "이 서버는 연합을 하지 않고 있습니다. 리모트 서버 유저와 통신을 할 수 없습니다."
|
||||
_accountSettings:
|
||||
requireSigninToViewContents: "콘텐츠 열람을 위해 로그인을 필수로 설정하기"
|
||||
requireSigninToViewContentsDescription1: "자신이 작성한 모든 노트 등의 콘텐츠를 보기 위해 로그인을 필수로 설정합니다. 크롤러가 정보 수집하는 것을 방지하는 효과를 기대할 수 있습니다."
|
||||
|
@ -2723,6 +2729,66 @@ _contextMenu:
|
|||
app: "애플리케이션"
|
||||
appWithShift: "Shift 키로 애플리케이션"
|
||||
native: "브라우저의 UI"
|
||||
_gridComponent:
|
||||
_error:
|
||||
requiredValue: "이 값은 필수 항목입니다."
|
||||
columnTypeNotSupport: "정규표현 규칙이 type:text인 칼럼만 지원합니다."
|
||||
patternNotMatch: "이 값은 {pattern} 패턴과 일치하지 않습니다."
|
||||
notUnique: "이 값은 다른 값과 중복되지 않아야 합니다."
|
||||
_roleSelectDialog:
|
||||
notSelected: "선택하지 않았습니다."
|
||||
_customEmojisManager:
|
||||
_gridCommon:
|
||||
copySelectionRows: "선택한 행을 복사하기"
|
||||
copySelectionRanges: "선택범위를 복사하기"
|
||||
deleteSelectionRows: "선택한 행을 삭제"
|
||||
deleteSelectionRanges: "선택한 행을 삭제"
|
||||
searchSettings: "검색 설정"
|
||||
searchSettingCaption: "고급 검색을 설정합니다."
|
||||
searchLimit: "표시 건수"
|
||||
sortOrder: "정렬 순서"
|
||||
registrationLogs: "등록 로그"
|
||||
registrationLogsCaption: "이모지를 갱신하거나 삭제할 때 로그가 표시됩니다. 갱신 또는 삭제하거나, 페이지 이동, 새로 고침하면 삭제됩니다."
|
||||
alertEmojisRegisterFailedDescription: "이모지를 갱신 또는 삭제하지 못했습니다. 자세한 내용은 등록 로그를 확인해주세요."
|
||||
_logs:
|
||||
showSuccessLogSwitch: "성공 로그를 표시"
|
||||
failureLogNothing: "실패 로그가 없습니다."
|
||||
logNothing: "로그가 없습니다."
|
||||
_remote:
|
||||
selectionRowDetail: "선택 행 (상세)"
|
||||
importSelectionRows: "선택 행을 가져오기"
|
||||
importSelectionRangesRows: "선택한 범위 안의 행을 가져오기"
|
||||
importEmojisButton: "선택한 이모지를 가져오기"
|
||||
confirmImportEmojisTitle: "이모지 가져오기"
|
||||
confirmImportEmojisDescription: "리모트 서버에서 받아온 이모지 {count}개를 이 서버로 가져옵니다. 이모지의 저작권, 라이선스를 확실히 확인하셨다면 실행해주세요."
|
||||
_local:
|
||||
tabTitleList: "등록한 이모지 리스트"
|
||||
tabTitleRegister: "이모지 등록"
|
||||
_list:
|
||||
emojisNothing: "등록한 이모지가 없습니다."
|
||||
markAsDeleteTargetRows: "선택한 행을 삭제할 대상으로 하기"
|
||||
markAsDeleteTargetRanges: "선택한 범위의 행을 삭제 대상으로 하기"
|
||||
alertUpdateEmojisNothingDescription: "변경할 이모지가 없습니다."
|
||||
alertDeleteEmojisNothingDescription: "삭제 대상의 이모지는 없습니다."
|
||||
confirmMovePage: "페이지를 이동할까요?"
|
||||
confirmChangeView: "표시를 바꿀까요?"
|
||||
confirmUpdateEmojisDescription: "{count}개의 이모지를 갱신합니다. 실행할까요?"
|
||||
confirmDeleteEmojisDescription: "선택한 이모지 {count}개를 삭제합니다. 실행할까요?"
|
||||
confirmResetDescription: "지금까지 했던 변경 내용이 모두 초기화됩니다."
|
||||
confirmMovePageDesciption: "이 페이지의 이모지에 변경이 있습니다.\n저장하지 않은 상태로 페이지를 이동하면, 이 페이지에서 바꾼 변경 내용이 모두 지워집니다."
|
||||
dialogSelectRoleTitle: "이모지에 설정된 역할을 검색"
|
||||
_register:
|
||||
uploadSettingTitle: "업로드 설정"
|
||||
uploadSettingDescription: "여기서 이모지를 업로드 할 때의 동작을 설정할 수 있습니다."
|
||||
directoryToCategoryLabel: "디렉토리 이름을 \"category\"로 입력하기"
|
||||
directoryToCategoryCaption: "디렉토리를 드래그 앤 드롭한 경우, 디렉토리 이름을 \"category\"로 입력합니다."
|
||||
emojiInputAreaCaption: "이모지를 등록할 방법을 선택해주세요."
|
||||
emojiInputAreaList1: "이 틀 안에 이미지 파일 또는 디렉토리를 끌어서 가져오기"
|
||||
emojiInputAreaList2: "이 링크를 클릭해서 PC에서 선택하기"
|
||||
emojiInputAreaList3: "이 링크를 클릭해서 드라이브에서 선택하기"
|
||||
confirmRegisterEmojisDescription: "리스트에 표시되어진 이모지를 새로운 커스텀 이모지로 등록합니다. 실행할까요? (부하를 피하기 위해, 한 번에 등록할 수 있는 이모지는 {count}건까지 입니다.)"
|
||||
confirmClearEmojisDescription: "편집 내용을 지우고, 목록에 표시되어진 이모지를 지웁니다. 실행할까요?"
|
||||
confirmUploadEmojisDescription: "드래그 앤 드롭한 {count}개의 파일을 드라이브에 업로드 합니다. 실행할까요?"
|
||||
_embedCodeGen:
|
||||
title: "임베디드 코드를 커스터마이즈"
|
||||
header: "해더를 표시"
|
||||
|
@ -2756,5 +2822,24 @@ _remoteLookupErrors:
|
|||
_requestFailed:
|
||||
title: "요청을 실패했습니다."
|
||||
description: "해당 서버와 통신을 실패했습니다. 상대방 서버에 접속 불가능한 상태일 수도 있습니다. 또는 잘못된 URI 또는 없는 URI를 입력했는지 확인해보세요."
|
||||
_responseInvalid:
|
||||
title: "유효하지 않은 반응입니다."
|
||||
description: "이 서버와 통신할 수 있지만, 데이터가 올바르지 않습니다."
|
||||
_responseInvalidIdHostNotMatch:
|
||||
description: "입력된 URI과 실제 URI가 다릅니다. 제 3자 서버를 통한 리모트 컨텐츠를 조회하는 경우, 원래 서버 측에서 받아올 수 있는 URI를 사용하여 조회하시길 바랍니다."
|
||||
_noSuchObject:
|
||||
title: "찾을 수 없습니다"
|
||||
description: "요구된 리소스를 찾을 수 없습니다. URI를 다시 한 번 확인해보세요."
|
||||
_captcha:
|
||||
verify: "CAPTCHA를 먼저 해결하세요."
|
||||
testSiteKeyMessage: "사이트 키와 비밀 키에 테스트용 값을 입력하여 미리보기를 확인할 수 있습니다.\n자세한 내용은 아래 페이지를 확인해보세요."
|
||||
_error:
|
||||
_requestFailed:
|
||||
title: "CAPTCHA 요구에 실패했습니다."
|
||||
text: "잠시 후에 다시 실행하거나, 설정을 다시 한 번 확인해보세요."
|
||||
_verificationFailed:
|
||||
title: "CAPTCHA 검증을 실패했습니다."
|
||||
text: "설정이 올바른지 다시 한 번 확인해보세요."
|
||||
_unknown:
|
||||
title: "CAPTCHA 에러"
|
||||
text: "알 수 없는 에러가 발생했습니다."
|
||||
|
|
|
@ -1063,7 +1063,7 @@ hiddenTags: "Скрытые хештеги"
|
|||
notesSearchNotAvailable: "Поиск заметок недоступен"
|
||||
license: "Лицензия"
|
||||
unfavoriteConfirm: "Удалить избранное?"
|
||||
myClips: "Мои клипы"
|
||||
myClips: "Мои подборки"
|
||||
drivecleaner: "Очиститель дисков"
|
||||
retryAllQueuesNow: "Повторить все очереди сейчас"
|
||||
retryAllQueuesConfirmTitle: "Хотите попробовать ещё раз?"
|
||||
|
|
|
@ -5,6 +5,7 @@ introMisskey: "欢迎!Misskey是一个开源的、去中心化的“微博客
|
|||
poweredByMisskeyDescription: "{name} 是开源平台 <b>Misskey</b> 的服务器之一。"
|
||||
monthAndDay: "{month}月 {day}日"
|
||||
search: "搜索"
|
||||
reset: "重置"
|
||||
notifications: "通知"
|
||||
username: "用户名"
|
||||
password: "密码"
|
||||
|
@ -48,7 +49,7 @@ pin: "置顶"
|
|||
unpin: "取消置顶"
|
||||
copyContent: "复制内容"
|
||||
copyLink: "复制链接"
|
||||
copyRemoteLink: "复制远程连接"
|
||||
copyRemoteLink: "复制远程链接"
|
||||
copyLinkRenote: "复制转帖链接"
|
||||
delete: "删除"
|
||||
deleteAndEdit: "删除并编辑"
|
||||
|
@ -196,7 +197,7 @@ setWallpaper: "设置壁纸"
|
|||
removeWallpaper: "移除壁纸"
|
||||
searchWith: "搜索:{q}"
|
||||
youHaveNoLists: "列表为空"
|
||||
followConfirm: "你确定要关注 {name} 吗?"
|
||||
followConfirm: "确定要关注 {name} 吗?"
|
||||
proxyAccount: "代理账户"
|
||||
proxyAccountDescription: "代理账户是在某些情况下替代用户进行远程关注用的账户。 例如说,当用户将一位远程用户放入一个列表中时,如果本地服务器上没有任何人关注这位远程用户,则这位远程用户的账户活动将不会被送到本地服务器上。作为替代,此时将使用代理账户进行关注。"
|
||||
host: "主机名"
|
||||
|
@ -230,10 +231,10 @@ disk: "存储"
|
|||
instanceInfo: "服务器信息"
|
||||
statistics: "统计"
|
||||
clearQueue: "清除队列"
|
||||
clearQueueConfirmTitle: "确定清除队列?"
|
||||
clearQueueConfirmTitle: "确定要清除队列吗?"
|
||||
clearQueueConfirmText: "未送达的帖子将不会被投递。 通常无需执行此操作。"
|
||||
clearCachedFiles: "清除缓存"
|
||||
clearCachedFilesConfirm: "确定要清除所有缓存的远程文件?"
|
||||
clearCachedFilesConfirm: "确定要清除所有缓存的远程文件吗?"
|
||||
blockedInstances: "被屏蔽的服务器"
|
||||
blockedInstancesDescription: "设定要屏蔽的服务器,以换行分隔。被屏蔽的服务器将无法与本服务器进行交换通讯。子域名也同样会被屏蔽。"
|
||||
silencedInstances: "被静音的服务器"
|
||||
|
@ -247,7 +248,7 @@ mutedUsers: "已隐藏用户"
|
|||
blockedUsers: "已屏蔽的用户"
|
||||
noUsers: "无用户"
|
||||
editProfile: "编辑资料"
|
||||
noteDeleteConfirm: "要删除该帖子吗?"
|
||||
noteDeleteConfirm: "确定要删除该帖子吗?"
|
||||
pinLimitExceeded: "无法置顶更多了"
|
||||
intro: "Misskey 的部署结束啦!创建管理员账号吧!"
|
||||
done: "完成"
|
||||
|
@ -567,7 +568,7 @@ objectStorageRegionDesc: "指定一个可用区,例如“xx-east-1”。 如
|
|||
objectStorageUseSSL: "使用 SSL"
|
||||
objectStorageUseSSLDesc: "如果不使用 https 进行 API 连接,请关闭。"
|
||||
objectStorageUseProxy: "使用代理"
|
||||
objectStorageUseProxyDesc: "如果您不使用代理进行 API 连接,请将其关闭。"
|
||||
objectStorageUseProxyDesc: "如果不使用代理进行 API 连接,请关闭。"
|
||||
objectStorageSetPublicRead: "上传时设置为 public-read"
|
||||
s3ForcePathStyleDesc: "启用 s3ForcePathStyle 会强制将存储桶名称指定为 URL 中路径的一部分,而不是主机名。使用自托管 Minio 等时可能需要启用。"
|
||||
serverLogs: "服务器日志"
|
||||
|
@ -764,7 +765,7 @@ driveFilesCount: "网盘的文件数"
|
|||
driveUsage: "网盘的空间用量"
|
||||
noCrawle: "要求搜索引擎不索引该用户"
|
||||
noCrawleDescription: "要求搜索引擎不要收录(索引)您的用户页面,帖子,页面等。"
|
||||
lockedAccountInfo: "即使启用该功能,只要您不将帖子可见范围设置为“仅关注者”,任何人都还是可以看到您的帖子。"
|
||||
lockedAccountInfo: "即使启用该功能,只要帖子可见范围不是「仅关注者」,任何人都可以看到您的帖子。"
|
||||
alwaysMarkSensitive: "默认将媒体文件标记为敏感内容"
|
||||
loadRawImages: "添加附件图像的缩略图时使用原始图像质量"
|
||||
disableShowingAnimatedImages: "不播放动画"
|
||||
|
@ -1326,7 +1327,7 @@ _abuseUserReport:
|
|||
resolve: "解决"
|
||||
accept: "确认"
|
||||
reject: "拒绝"
|
||||
resolveTutorial: "如果举报内容有理且已解决,选择「确认」将案件以肯定的态度标记为已解决。\n如果举报内容站不住脚,选择「拒绝」将案件以否定的态度标记为已解决。"
|
||||
resolveTutorial: "如果认可举报并已解决,选择「确认」将案件以肯定的态度标记为已解决。\n如果不认可举报,选择「拒绝」将案件以否定的态度标记为已解决。"
|
||||
_delivery:
|
||||
status: "投递状态"
|
||||
stop: "停止投递"
|
||||
|
@ -2081,7 +2082,7 @@ _2fa:
|
|||
securityKeyName: "输入密钥名称"
|
||||
tapSecurityKey: "请按照浏览器说明操作来注册安全密钥或 Passkey。"
|
||||
removeKey: "删除安全密钥"
|
||||
removeKeyConfirm: "您确定要删除 {name} 吗?"
|
||||
removeKeyConfirm: "确定要删除 {name} 吗?"
|
||||
whyTOTPOnlyRenew: "当注册了安全密钥时,无法取消使用验证器。"
|
||||
renewTOTP: "重置验证器"
|
||||
renewTOTPConfirm: "当前验证器的验证码及备用代码已失效"
|
||||
|
@ -2289,7 +2290,7 @@ _profile:
|
|||
name: "昵称"
|
||||
username: "用户名"
|
||||
description: "个人简介"
|
||||
youCanIncludeHashtags: "你可以在个人简介中包含一些#标签。"
|
||||
youCanIncludeHashtags: "可以在个人简介中包含 #标签。"
|
||||
metadata: "附加信息"
|
||||
metadataEdit: "附加信息编辑"
|
||||
metadataDescription: "最多可以在个人资料中以表格形式显示四条其他信息。"
|
||||
|
@ -2728,6 +2729,66 @@ _contextMenu:
|
|||
app: "应用"
|
||||
appWithShift: "Shift 键应用"
|
||||
native: "浏览器的用户界面"
|
||||
_gridComponent:
|
||||
_error:
|
||||
requiredValue: "此值为必填项"
|
||||
columnTypeNotSupport: "正则表达式验证仅支持 type:text 列。"
|
||||
patternNotMatch: "此值与 {pattern} 的模式不一致"
|
||||
notUnique: "此值必须唯一"
|
||||
_roleSelectDialog:
|
||||
notSelected: "未选中"
|
||||
_customEmojisManager:
|
||||
_gridCommon:
|
||||
copySelectionRows: "复制所选行"
|
||||
copySelectionRanges: "复制所选范围"
|
||||
deleteSelectionRows: "删除所选行"
|
||||
deleteSelectionRanges: "删除所选范围的行"
|
||||
searchSettings: "搜索设置"
|
||||
searchSettingCaption: "设置详细的搜索条件。"
|
||||
searchLimit: "显示项目数"
|
||||
sortOrder: "排序方式"
|
||||
registrationLogs: "注册日志"
|
||||
registrationLogsCaption: "将显示更新和删除表情符号的日志。执行更新或删除操作,又或者更改或重新加载页面时会消失。"
|
||||
alertEmojisRegisterFailedDescription: "更新或删除表情符号失败。详情请确认注册日志。"
|
||||
_logs:
|
||||
showSuccessLogSwitch: "显示成功日志"
|
||||
failureLogNothing: "没有失败日志。"
|
||||
logNothing: "没有日志"
|
||||
_remote:
|
||||
selectionRowDetail: "所选行的详细信息"
|
||||
importSelectionRows: "导入所选行"
|
||||
importSelectionRangesRows: "导入所选范围的行"
|
||||
importEmojisButton: "导入已选择的表情符号"
|
||||
confirmImportEmojisTitle: "导入表情符号"
|
||||
confirmImportEmojisDescription: "是否导入从远程服务器接收的 {count} 个表情符号?请密切关注表情符号的许可协议。"
|
||||
_local:
|
||||
tabTitleList: "已注册的表情符号列表"
|
||||
tabTitleRegister: "注册表情符号"
|
||||
_list:
|
||||
emojisNothing: "没有已注册的表情符号。"
|
||||
markAsDeleteTargetRows: "将所选行标记为删除对象"
|
||||
markAsDeleteTargetRanges: "将所选范围的行标记为删除对象"
|
||||
alertUpdateEmojisNothingDescription: "没有已更改的表情符号。"
|
||||
alertDeleteEmojisNothingDescription: "没有被标记为删除对象的表情符号。"
|
||||
confirmMovePage: "要离开此页吗?"
|
||||
confirmChangeView: "要更改显示吗?"
|
||||
confirmUpdateEmojisDescription: "要更新 {count} 个表情符号吗?"
|
||||
confirmDeleteEmojisDescription: "要删除已选择的 {count} 个表情符号吗?"
|
||||
confirmResetDescription: "至今为止所做的所有修改都将被重置。"
|
||||
confirmMovePageDesciption: "此页面上的表情符号已更改。\n若不保存就离开此页,此页面上所有的更改都将丢失。"
|
||||
dialogSelectRoleTitle: "按角色搜索表情符号"
|
||||
_register:
|
||||
uploadSettingTitle: "上传设置"
|
||||
uploadSettingDescription: "可以在此页面设置上传表情符号时的行为。"
|
||||
directoryToCategoryLabel: "目录名请输入「category」"
|
||||
directoryToCategoryCaption: "拖放目录时,目录名请输入「category」"
|
||||
emojiInputAreaCaption: "请使用其中一种方法选择要注册的表情符号。"
|
||||
emojiInputAreaList1: "在此区域内拖放图像文件或者目录"
|
||||
emojiInputAreaList2: "单击此链接以从电脑中选择"
|
||||
emojiInputAreaList3: "单击此链接以从网盘中选择"
|
||||
confirmRegisterEmojisDescription: "要将列表内显示的表情符号替换为新的自定义表情符号吗?(为降低服务器负载,一次操作最多只能注册 {count} 个表情符号)"
|
||||
confirmClearEmojisDescription: "要放弃编辑并将列表内表示的表情符号清空吗?"
|
||||
confirmUploadEmojisDescription: "要将拖放的 {count} 个文件上传到网盘上吗?"
|
||||
_embedCodeGen:
|
||||
title: "自定义嵌入代码"
|
||||
header: "显示标题"
|
||||
|
|
|
@ -5,6 +5,7 @@ introMisskey: "歡迎!Misskey 是一個開放原始碼且去中心化的社群
|
|||
poweredByMisskeyDescription: "{name}是開放原始碼平臺 <b>Misskey</b> 的伺服器之一。"
|
||||
monthAndDay: "{month} 月 {day} 日"
|
||||
search: "搜尋"
|
||||
reset: "重設"
|
||||
notifications: "通知"
|
||||
username: "使用者名稱"
|
||||
password: "密碼"
|
||||
|
@ -48,6 +49,7 @@ pin: "置頂"
|
|||
unpin: "取消置頂"
|
||||
copyContent: "複製內容"
|
||||
copyLink: "複製連結"
|
||||
copyRemoteLink: "複製遠端的連結"
|
||||
copyLinkRenote: "複製轉發的連結"
|
||||
delete: "刪除"
|
||||
deleteAndEdit: "刪除並編輯"
|
||||
|
@ -686,11 +688,13 @@ testEmail: "測試郵件發送"
|
|||
wordMute: "被靜音的文字"
|
||||
wordMuteDescription: "將包含指定語句的貼文最小化。 點擊最小化的貼文即可顯示。"
|
||||
hardWordMute: "硬文字靜音"
|
||||
showMutedWord: "顯示靜音字"
|
||||
hardWordMuteDescription: "隱藏含有指定語句的貼文。 與詞彙靜音不同的是,貼文將完全隱藏不見。"
|
||||
regexpError: "正規表達式錯誤"
|
||||
regexpErrorDescription: "{tab} 靜音文字的第 {line} 行的正規表達式有錯誤:"
|
||||
instanceMute: "被靜音的實例"
|
||||
userSaysSomething: "{name}說了什麼"
|
||||
userSaysSomethingAbout: "{name} 說了一些關於「{word}」的話"
|
||||
makeActive: "啟用"
|
||||
display: "檢視"
|
||||
copy: "複製"
|
||||
|
@ -1303,6 +1307,8 @@ lockdown: "鎖定"
|
|||
pleaseSelectAccount: "請選擇帳戶"
|
||||
availableRoles: "可用角色"
|
||||
acknowledgeNotesAndEnable: "了解注意事項後再開啟。"
|
||||
federationSpecified: "此伺服器以白名單聯邦的方式運作。除了管理員指定的伺服器外,它無法與其他伺服器互動。"
|
||||
federationDisabled: "此伺服器未開啟站台聯邦。無法與其他伺服器上的使用者互動。"
|
||||
_accountSettings:
|
||||
requireSigninToViewContents: "須登入以顯示內容"
|
||||
requireSigninToViewContentsDescription1: "必須登入才會顯示您建立的貼文等內容。可望有效防止資訊被爬蟲蒐集。"
|
||||
|
@ -2723,6 +2729,66 @@ _contextMenu:
|
|||
app: "應用程式"
|
||||
appWithShift: "Shift 鍵應用程式"
|
||||
native: "瀏覽器的使用者介面"
|
||||
_gridComponent:
|
||||
_error:
|
||||
requiredValue: "此值為必填欄位"
|
||||
columnTypeNotSupport: "正規表達式驗證僅支援 type:text 的欄位。"
|
||||
patternNotMatch: "此值不符合 {pattern} 中的樣式。"
|
||||
notUnique: "此值必須是唯一的"
|
||||
_roleSelectDialog:
|
||||
notSelected: "未選擇"
|
||||
_customEmojisManager:
|
||||
_gridCommon:
|
||||
copySelectionRows: "複製選取的行"
|
||||
copySelectionRanges: "複製選取的範圍"
|
||||
deleteSelectionRows: "刪除所選的行"
|
||||
deleteSelectionRanges: "刪除選取範圍的行"
|
||||
searchSettings: "搜尋設定"
|
||||
searchSettingCaption: "詳細設定搜尋條件。"
|
||||
searchLimit: "顯示的數量"
|
||||
sortOrder: "排序"
|
||||
registrationLogs: "登錄日誌"
|
||||
registrationLogsCaption: "會顯示更新或刪除表情符號時的日誌。進行更新或刪除操作,或切換頁面、重新載入後,日誌將會消失。"
|
||||
alertEmojisRegisterFailedDescription: "更新或刪除表情符號失敗。詳情請查看登錄日誌。"
|
||||
_logs:
|
||||
showSuccessLogSwitch: "顯示成功日誌"
|
||||
failureLogNothing: "沒有失敗的日誌。"
|
||||
logNothing: "沒有日誌。"
|
||||
_remote:
|
||||
selectionRowDetail: "選取行的詳細資訊"
|
||||
importSelectionRows: "匯入選取的行"
|
||||
importSelectionRangesRows: "匯入選取範圍的行"
|
||||
importEmojisButton: "匯入勾選的表情符號"
|
||||
confirmImportEmojisTitle: "匯入表情符號"
|
||||
confirmImportEmojisDescription: "將從遠端接收的{count}個表情符號進行匯入。請務必注意表情符號的授權。是否執行此操作?"
|
||||
_local:
|
||||
tabTitleList: "已登錄的表情符號列表"
|
||||
tabTitleRegister: "登錄表情符號"
|
||||
_list:
|
||||
emojisNothing: "沒有登錄的表情符號。"
|
||||
markAsDeleteTargetRows: "將選取的行設為刪除對象"
|
||||
markAsDeleteTargetRanges: "將選取範圍的行設為刪除對象\n"
|
||||
alertUpdateEmojisNothingDescription: "沒有選取需要變更的表情符號。"
|
||||
alertDeleteEmojisNothingDescription: "沒有選取需要刪除的表情符號。"
|
||||
confirmMovePage: "要移動到其他頁面嗎?"
|
||||
confirmChangeView: "要更改顯示方式嗎?"
|
||||
confirmUpdateEmojisDescription: "將更新{count}個表情符號。是否執行此操作?"
|
||||
confirmDeleteEmojisDescription: "將刪除勾選的{count}個表情符號。是否執行此操作?"
|
||||
confirmResetDescription: "目前所做的所有變更都會重設。"
|
||||
confirmMovePageDesciption: "此頁面的表情符號已被更改。 \n若未儲存就直接離開此頁面,則在此頁面進行的所有更改將會被捨棄。"
|
||||
dialogSelectRoleTitle: "根據表情符號設定的角色進行搜尋"
|
||||
_register:
|
||||
uploadSettingTitle: "上傳設定"
|
||||
uploadSettingDescription: "您可以在此畫面設定表情符號上傳時的操作。"
|
||||
directoryToCategoryLabel: "在「類別」欄位中輸入目錄名稱"
|
||||
directoryToCategoryCaption: "拖放目錄時,請在「類別」欄位中輸入目錄名稱。"
|
||||
emojiInputAreaCaption: "以下列其中一種方式選擇您想要註冊的表情符號"
|
||||
emojiInputAreaList1: "將圖片檔案或目錄拖放到此框中"
|
||||
emojiInputAreaList2: "點擊此連結從電腦中選擇"
|
||||
emojiInputAreaList3: "點擊此連結從雲端硬碟中選擇"
|
||||
confirmRegisterEmojisDescription: "將列表中顯示的表情符號登錄為新的自定表情符號。是否確定?(為避免過高負荷,每次操作最多可登錄{count}個表情符號)"
|
||||
confirmClearEmojisDescription: "放棄編輯內容並清除列表中顯示的表情符號。是否確定?"
|
||||
confirmUploadEmojisDescription: "將拖放的{count}個檔案上傳到雲端硬碟。是否執行此操作?"
|
||||
_embedCodeGen:
|
||||
title: "自訂嵌入程式碼"
|
||||
header: "檢視標頭 "
|
||||
|
@ -2764,3 +2830,16 @@ _remoteLookupErrors:
|
|||
_noSuchObject:
|
||||
title: "查無項目"
|
||||
description: "無法找到所要求的資源,請再次檢查 URI。"
|
||||
_captcha:
|
||||
verify: "請通過 CAPTCHA 驗證"
|
||||
testSiteKeyMessage: "可以輸入網站金鑰和秘密金鑰的測試值來檢查預覽。\n詳細資訊請參閱以下頁面。"
|
||||
_error:
|
||||
_requestFailed:
|
||||
title: "CAPTCHA 請求失敗"
|
||||
text: "請過一段時間後再執行,或再次檢查設定。"
|
||||
_verificationFailed:
|
||||
title: "CAPTCHA 驗證失敗"
|
||||
text: "請再次檢查設定是否正確。"
|
||||
_unknown:
|
||||
title: "CAPTCHA 錯誤"
|
||||
text: "發生了意外的錯誤。"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "misskey",
|
||||
"version": "2025.1.0-beta.1",
|
||||
"version": "2025.2.0-beta.0",
|
||||
"codename": "nasubi",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
export class OptimizeEmojiIndex1709126576000 {
|
||||
name = 'OptimizeEmojiIndex1709126576000'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(`CREATE INDEX "IDX_EMOJI_ROLE_IDS" ON "emoji" using gin ("roleIdsThatCanBeUsedThisEmojiAsReaction")`)
|
||||
await queryRunner.query(`CREATE INDEX "IDX_EMOJI_CATEGORY" ON "emoji" ("category")`)
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(`DROP INDEX "IDX_EMOJI_CATEGORY"`)
|
||||
await queryRunner.query(`DROP INDEX "IDX_EMOJI_ROLE_IDS"`)
|
||||
}
|
||||
}
|
|
@ -92,7 +92,7 @@ export async function masterMain() {
|
|||
}
|
||||
|
||||
bootLogger.info(
|
||||
`mode: [disableClustering: ${envOption.disableClustering}, onlyServer: ${envOption.onlyServer}, onlyQueue: ${envOption.onlyQueue}]`
|
||||
`mode: [disableClustering: ${envOption.disableClustering}, onlyServer: ${envOption.onlyServer}, onlyQueue: ${envOption.onlyQueue}]`,
|
||||
);
|
||||
|
||||
if (!envOption.disableClustering) {
|
||||
|
@ -107,7 +107,6 @@ export async function masterMain() {
|
|||
await jobQueue();
|
||||
} else {
|
||||
await server();
|
||||
await jobQueue();
|
||||
}
|
||||
|
||||
await spawnWorkers(config.clusterLimit);
|
||||
|
|
|
@ -26,6 +26,18 @@ export const DB_MAX_NOTE_TEXT_LENGTH = 8192;
|
|||
export const DB_MAX_IMAGE_COMMENT_LENGTH = 512;
|
||||
//#endregion
|
||||
|
||||
export const FILE_TYPE_IMAGE = [
|
||||
'image/png',
|
||||
'image/gif',
|
||||
'image/jpeg',
|
||||
'image/webp',
|
||||
'image/avif',
|
||||
'image/apng',
|
||||
'image/bmp',
|
||||
'image/tiff',
|
||||
'image/x-icon',
|
||||
];
|
||||
|
||||
// ブラウザで直接表示することを許可するファイルの種類のリスト
|
||||
// ここに含まれないものは application/octet-stream としてレスポンスされる
|
||||
// SVGはXSSを生むので許可しない
|
||||
|
|
|
@ -4,24 +4,59 @@
|
|||
*/
|
||||
|
||||
import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common';
|
||||
import { In, IsNull } from 'typeorm';
|
||||
import * as Redis from 'ioredis';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import { In, IsNull } from 'typeorm';
|
||||
import { EmojiEntityService } from '@/core/entities/EmojiEntityService.js';
|
||||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||
import type { MiDriveFile } from '@/models/DriveFile.js';
|
||||
import type { MiEmoji } from '@/models/Emoji.js';
|
||||
import type { EmojisRepository, MiRole, MiUser } from '@/models/_.js';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
import { MemoryKVCache, RedisSingleCache } from '@/misc/cache.js';
|
||||
import { UtilityService } from '@/core/UtilityService.js';
|
||||
import { query } from '@/misc/prelude/url.js';
|
||||
import type { Serialized } from '@/types.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
import { UtilityService } from '@/core/UtilityService.js';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { MemoryKVCache, RedisSingleCache } from '@/misc/cache.js';
|
||||
import { sqlLikeEscape } from '@/misc/sql-like-escape.js';
|
||||
import type { EmojisRepository, MiRole, MiUser } from '@/models/_.js';
|
||||
import type { MiEmoji } from '@/models/Emoji.js';
|
||||
import type { Serialized } from '@/types.js';
|
||||
|
||||
const parseEmojiStrRegexp = /^([-\w]+)(?:@([\w.-]+))?$/;
|
||||
|
||||
export const fetchEmojisHostTypes = [
|
||||
'local',
|
||||
'remote',
|
||||
'all',
|
||||
] as const;
|
||||
export type FetchEmojisHostTypes = typeof fetchEmojisHostTypes[number];
|
||||
export const fetchEmojisSortKeys = [
|
||||
'+id',
|
||||
'-id',
|
||||
'+updatedAt',
|
||||
'-updatedAt',
|
||||
'+name',
|
||||
'-name',
|
||||
'+host',
|
||||
'-host',
|
||||
'+uri',
|
||||
'-uri',
|
||||
'+publicUrl',
|
||||
'-publicUrl',
|
||||
'+type',
|
||||
'-type',
|
||||
'+aliases',
|
||||
'-aliases',
|
||||
'+category',
|
||||
'-category',
|
||||
'+license',
|
||||
'-license',
|
||||
'+isSensitive',
|
||||
'-isSensitive',
|
||||
'+localOnly',
|
||||
'-localOnly',
|
||||
'+roleIdsThatCanBeUsedThisEmojiAsReaction',
|
||||
'-roleIdsThatCanBeUsedThisEmojiAsReaction',
|
||||
] as const;
|
||||
export type FetchEmojisSortKeys = typeof fetchEmojisSortKeys[number];
|
||||
|
||||
@Injectable()
|
||||
export class CustomEmojiService implements OnApplicationShutdown {
|
||||
private emojisCache: MemoryKVCache<MiEmoji | null>;
|
||||
|
@ -30,10 +65,8 @@ export class CustomEmojiService implements OnApplicationShutdown {
|
|||
constructor(
|
||||
@Inject(DI.redis)
|
||||
private redisClient: Redis.Redis,
|
||||
|
||||
@Inject(DI.emojisRepository)
|
||||
private emojisRepository: EmojisRepository,
|
||||
|
||||
private utilityService: UtilityService,
|
||||
private idService: IdService,
|
||||
private emojiEntityService: EmojiEntityService,
|
||||
|
@ -58,7 +91,9 @@ export class CustomEmojiService implements OnApplicationShutdown {
|
|||
|
||||
@bindThis
|
||||
public async add(data: {
|
||||
driveFile: MiDriveFile;
|
||||
originalUrl: string;
|
||||
publicUrl: string;
|
||||
fileType: string;
|
||||
name: string;
|
||||
category: string | null;
|
||||
aliases: string[];
|
||||
|
@ -75,9 +110,9 @@ export class CustomEmojiService implements OnApplicationShutdown {
|
|||
category: data.category,
|
||||
host: data.host,
|
||||
aliases: data.aliases,
|
||||
originalUrl: data.driveFile.url,
|
||||
publicUrl: data.driveFile.webpublicUrl ?? data.driveFile.url,
|
||||
type: data.driveFile.webpublicType ?? data.driveFile.type,
|
||||
originalUrl: data.originalUrl,
|
||||
publicUrl: data.publicUrl,
|
||||
type: data.fileType,
|
||||
license: data.license,
|
||||
isSensitive: data.isSensitive,
|
||||
localOnly: data.localOnly,
|
||||
|
@ -105,8 +140,10 @@ export class CustomEmojiService implements OnApplicationShutdown {
|
|||
@bindThis
|
||||
public async update(data: (
|
||||
{ id: MiEmoji['id'], name?: string; } | { name: string; id?: MiEmoji['id'], }
|
||||
) & {
|
||||
driveFile?: MiDriveFile;
|
||||
) & {
|
||||
originalUrl?: string;
|
||||
publicUrl?: string;
|
||||
fileType?: string;
|
||||
category?: string | null;
|
||||
aliases?: string[];
|
||||
license?: string | null;
|
||||
|
@ -139,9 +176,9 @@ export class CustomEmojiService implements OnApplicationShutdown {
|
|||
license: data.license,
|
||||
isSensitive: data.isSensitive,
|
||||
localOnly: data.localOnly,
|
||||
originalUrl: data.driveFile != null ? data.driveFile.url : undefined,
|
||||
publicUrl: data.driveFile != null ? (data.driveFile.webpublicUrl ?? data.driveFile.url) : undefined,
|
||||
type: data.driveFile != null ? (data.driveFile.webpublicType ?? data.driveFile.type) : undefined,
|
||||
originalUrl: data.originalUrl,
|
||||
publicUrl: data.publicUrl,
|
||||
type: data.fileType,
|
||||
roleIdsThatCanBeUsedThisEmojiAsReaction: data.roleIdsThatCanBeUsedThisEmojiAsReaction ?? undefined,
|
||||
});
|
||||
|
||||
|
@ -308,7 +345,7 @@ export class CustomEmojiService implements OnApplicationShutdown {
|
|||
|
||||
@bindThis
|
||||
private normalizeHost(src: string | undefined, noteUserHost: string | null): string | null {
|
||||
// クエリに使うホスト
|
||||
// クエリに使うホスト
|
||||
let host = src === '.' ? null // .はローカルホスト (ここがマッチするのはリアクションのみ)
|
||||
: src === undefined ? noteUserHost // ノートなどでホスト省略表記の場合はローカルホスト (ここがリアクションにマッチすることはない)
|
||||
: this.utilityService.isSelfHost(src) ? null // 自ホスト指定
|
||||
|
@ -414,6 +451,151 @@ export class CustomEmojiService implements OnApplicationShutdown {
|
|||
return this.emojisRepository.findOneBy({ name, host: IsNull() });
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async fetchEmojis(
|
||||
params?: {
|
||||
query?: {
|
||||
updatedAtFrom?: string;
|
||||
updatedAtTo?: string;
|
||||
name?: string;
|
||||
host?: string;
|
||||
uri?: string;
|
||||
publicUrl?: string;
|
||||
type?: string;
|
||||
aliases?: string;
|
||||
category?: string;
|
||||
license?: string;
|
||||
isSensitive?: boolean;
|
||||
localOnly?: boolean;
|
||||
hostType?: FetchEmojisHostTypes;
|
||||
roleIds?: string[];
|
||||
},
|
||||
sinceId?: string;
|
||||
untilId?: string;
|
||||
},
|
||||
opts?: {
|
||||
limit?: number;
|
||||
page?: number;
|
||||
sortKeys?: FetchEmojisSortKeys[]
|
||||
},
|
||||
) {
|
||||
function multipleWordsToQuery(words: string) {
|
||||
return words.split(/\s/).filter(x => x.length > 0).map(x => `%${sqlLikeEscape(x)}%`);
|
||||
}
|
||||
|
||||
const builder = this.emojisRepository.createQueryBuilder('emoji');
|
||||
if (params?.query) {
|
||||
const q = params.query;
|
||||
if (q.updatedAtFrom) {
|
||||
// noIndexScan
|
||||
builder.andWhere('CAST(emoji.updatedAt AS DATE) >= :updateAtFrom', { updateAtFrom: q.updatedAtFrom });
|
||||
}
|
||||
if (q.updatedAtTo) {
|
||||
// noIndexScan
|
||||
builder.andWhere('CAST(emoji.updatedAt AS DATE) <= :updateAtTo', { updateAtTo: q.updatedAtTo });
|
||||
}
|
||||
if (q.name) {
|
||||
builder.andWhere('emoji.name ~~ ANY(ARRAY[:...name])', { name: multipleWordsToQuery(q.name) });
|
||||
}
|
||||
|
||||
switch (true) {
|
||||
case q.hostType === 'local': {
|
||||
builder.andWhere('emoji.host IS NULL');
|
||||
break;
|
||||
}
|
||||
case q.hostType === 'remote': {
|
||||
if (q.host) {
|
||||
// noIndexScan
|
||||
builder.andWhere('emoji.host ~~ ANY(ARRAY[:...host])', { host: multipleWordsToQuery(q.host) });
|
||||
} else {
|
||||
builder.andWhere('emoji.host IS NOT NULL');
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (q.uri) {
|
||||
// noIndexScan
|
||||
builder.andWhere('emoji.uri ~~ ANY(ARRAY[:...uri])', { uri: multipleWordsToQuery(q.uri) });
|
||||
}
|
||||
if (q.publicUrl) {
|
||||
// noIndexScan
|
||||
builder.andWhere('emoji.publicUrl ~~ ANY(ARRAY[:...publicUrl])', { publicUrl: multipleWordsToQuery(q.publicUrl) });
|
||||
}
|
||||
if (q.type) {
|
||||
// noIndexScan
|
||||
builder.andWhere('emoji.type ~~ ANY(ARRAY[:...type])', { type: multipleWordsToQuery(q.type) });
|
||||
}
|
||||
if (q.aliases) {
|
||||
// noIndexScan
|
||||
const subQueryBuilder = builder.subQuery()
|
||||
.select('COUNT(0)', 'count')
|
||||
.from(
|
||||
sq2 => sq2
|
||||
.select('unnest(subEmoji.aliases)', 'alias')
|
||||
.addSelect('subEmoji.id', 'id')
|
||||
.from('emoji', 'subEmoji'),
|
||||
'aliasTable',
|
||||
)
|
||||
.where('"emoji"."id" = "aliasTable"."id"')
|
||||
.andWhere('"aliasTable"."alias" ~~ ANY(ARRAY[:...aliases])', { aliases: multipleWordsToQuery(q.aliases) });
|
||||
|
||||
builder.andWhere(`(${subQueryBuilder.getQuery()}) > 0`);
|
||||
}
|
||||
if (q.category) {
|
||||
builder.andWhere('emoji.category ~~ ANY(ARRAY[:...category])', { category: multipleWordsToQuery(q.category) });
|
||||
}
|
||||
if (q.license) {
|
||||
// noIndexScan
|
||||
builder.andWhere('emoji.license ~~ ANY(ARRAY[:...license])', { license: multipleWordsToQuery(q.license) });
|
||||
}
|
||||
if (q.isSensitive != null) {
|
||||
// noIndexScan
|
||||
builder.andWhere('emoji.isSensitive = :isSensitive', { isSensitive: q.isSensitive });
|
||||
}
|
||||
if (q.localOnly != null) {
|
||||
// noIndexScan
|
||||
builder.andWhere('emoji.localOnly = :localOnly', { localOnly: q.localOnly });
|
||||
}
|
||||
if (q.roleIds && q.roleIds.length > 0) {
|
||||
builder.andWhere('emoji.roleIdsThatCanBeUsedThisEmojiAsReaction && ARRAY[:...roleIds]::VARCHAR[]', { roleIds: q.roleIds });
|
||||
}
|
||||
}
|
||||
|
||||
if (params?.sinceId) {
|
||||
builder.andWhere('emoji.id > :sinceId', { sinceId: params.sinceId });
|
||||
}
|
||||
if (params?.untilId) {
|
||||
builder.andWhere('emoji.id < :untilId', { untilId: params.untilId });
|
||||
}
|
||||
|
||||
if (opts?.sortKeys && opts.sortKeys.length > 0) {
|
||||
for (const sortKey of opts.sortKeys) {
|
||||
const direction = sortKey.startsWith('-') ? 'DESC' : 'ASC';
|
||||
const key = sortKey.replace(/^[+-]/, '');
|
||||
builder.addOrderBy(`emoji.${key}`, direction);
|
||||
}
|
||||
} else {
|
||||
builder.addOrderBy('emoji.id', 'DESC');
|
||||
}
|
||||
|
||||
const limit = opts?.limit ?? 10;
|
||||
if (opts?.page) {
|
||||
builder.skip((opts.page - 1) * limit);
|
||||
}
|
||||
|
||||
builder.take(limit);
|
||||
|
||||
const [emojis, count] = await builder.getManyAndCount();
|
||||
|
||||
return {
|
||||
emojis,
|
||||
count: (count > limit ? emojis.length : count),
|
||||
allCount: count,
|
||||
allPages: Math.ceil(count / limit),
|
||||
};
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public dispose(): void {
|
||||
this.emojisCache.dispose();
|
||||
|
|
|
@ -558,6 +558,11 @@ const extension_context_definition = {
|
|||
'_misskey_requireSigninToViewContents': 'misskey:_misskey_requireSigninToViewContents',
|
||||
'_misskey_makeNotesFollowersOnlyBefore': 'misskey:_misskey_makeNotesFollowersOnlyBefore',
|
||||
'_misskey_makeNotesHiddenBefore': 'misskey:_misskey_makeNotesHiddenBefore',
|
||||
'_misskey_license': 'misskey:_misskey_license',
|
||||
'freeText': {
|
||||
'@id': 'misskey:freeText',
|
||||
'@type': 'schema:text',
|
||||
},
|
||||
'isCat': 'misskey:isCat',
|
||||
// vcard
|
||||
vcard: 'http://www.w3.org/2006/vcard/ns#',
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
*/
|
||||
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { In } from 'typeorm';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import type { EmojisRepository } from '@/models/_.js';
|
||||
import type { EmojisRepository, MiRole, RolesRepository } from '@/models/_.js';
|
||||
import type { Packed } from '@/misc/json-schema.js';
|
||||
import type { } from '@/models/Blocking.js';
|
||||
import type { MiEmoji } from '@/models/Emoji.js';
|
||||
import { bindThis } from '@/decorators.js';
|
||||
|
||||
|
@ -16,6 +16,8 @@ export class EmojiEntityService {
|
|||
constructor(
|
||||
@Inject(DI.emojisRepository)
|
||||
private emojisRepository: EmojisRepository,
|
||||
@Inject(DI.rolesRepository)
|
||||
private rolesRepository: RolesRepository,
|
||||
) {
|
||||
}
|
||||
|
||||
|
@ -68,8 +70,90 @@ export class EmojiEntityService {
|
|||
@bindThis
|
||||
public packDetailedMany(
|
||||
emojis: any[],
|
||||
) {
|
||||
): Promise<Packed<'EmojiDetailed'>[]> {
|
||||
return Promise.all(emojis.map(x => this.packDetailed(x)));
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async packDetailedAdmin(
|
||||
src: MiEmoji['id'] | MiEmoji,
|
||||
hint?: {
|
||||
roles?: Map<MiRole['id'], MiRole>
|
||||
},
|
||||
): Promise<Packed<'EmojiDetailedAdmin'>> {
|
||||
const emoji = typeof src === 'object' ? src : await this.emojisRepository.findOneByOrFail({ id: src });
|
||||
|
||||
const roles = Array.of<MiRole>();
|
||||
if (emoji.roleIdsThatCanBeUsedThisEmojiAsReaction.length > 0) {
|
||||
if (hint?.roles) {
|
||||
const hintRoles = hint.roles;
|
||||
roles.push(
|
||||
...emoji.roleIdsThatCanBeUsedThisEmojiAsReaction
|
||||
.filter(x => hintRoles.has(x))
|
||||
.map(x => hintRoles.get(x)!),
|
||||
);
|
||||
} else {
|
||||
roles.push(
|
||||
...await this.rolesRepository.findBy({ id: In(emoji.roleIdsThatCanBeUsedThisEmojiAsReaction) }),
|
||||
);
|
||||
}
|
||||
|
||||
roles.sort((a, b) => {
|
||||
if (a.displayOrder !== b.displayOrder) {
|
||||
return b.displayOrder - a.displayOrder;
|
||||
}
|
||||
|
||||
return a.id.localeCompare(b.id);
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
id: emoji.id,
|
||||
updatedAt: emoji.updatedAt?.toISOString() ?? null,
|
||||
name: emoji.name,
|
||||
host: emoji.host,
|
||||
uri: emoji.uri,
|
||||
type: emoji.type,
|
||||
aliases: emoji.aliases,
|
||||
category: emoji.category,
|
||||
publicUrl: emoji.publicUrl,
|
||||
originalUrl: emoji.originalUrl,
|
||||
license: emoji.license,
|
||||
localOnly: emoji.localOnly,
|
||||
isSensitive: emoji.isSensitive,
|
||||
roleIdsThatCanBeUsedThisEmojiAsReaction: roles.map(it => ({ id: it.id, name: it.name })),
|
||||
};
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async packDetailedAdminMany(
|
||||
emojis: MiEmoji['id'][] | MiEmoji[],
|
||||
hint?: {
|
||||
roles?: Map<MiRole['id'], MiRole>
|
||||
},
|
||||
): Promise<Packed<'EmojiDetailedAdmin'>[]> {
|
||||
// IDのみの要素をピックアップし、DBからレコードを取り出して他の値を補完する
|
||||
const emojiEntities = emojis.filter(x => typeof x === 'object') as MiEmoji[];
|
||||
const emojiIdOnlyList = emojis.filter(x => typeof x === 'string') as string[];
|
||||
if (emojiIdOnlyList.length > 0) {
|
||||
emojiEntities.push(...await this.emojisRepository.findBy({ id: In(emojiIdOnlyList) }));
|
||||
}
|
||||
|
||||
// 特定ロール専用の絵文字である場合、そのロール情報をあらかじめまとめて取得しておく(pack側で都度取得も出来るが負荷が高いので)
|
||||
let hintRoles: Map<MiRole['id'], MiRole>;
|
||||
if (hint?.roles) {
|
||||
hintRoles = hint.roles;
|
||||
} else {
|
||||
const roles = Array.of<MiRole>();
|
||||
const roleIds = [...new Set(emojiEntities.flatMap(x => x.roleIdsThatCanBeUsedThisEmojiAsReaction))];
|
||||
if (roleIds.length > 0) {
|
||||
roles.push(...await this.rolesRepository.findBy({ id: In(roleIds) }));
|
||||
}
|
||||
|
||||
hintRoles = new Map(roles.map(x => [x.id, x]));
|
||||
}
|
||||
|
||||
return Promise.all(emojis.map(x => this.packDetailedAdmin(x, { roles: hintRoles })));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,11 @@ import { packedClipSchema } from '@/models/json-schema/clip.js';
|
|||
import { packedFederationInstanceSchema } from '@/models/json-schema/federation-instance.js';
|
||||
import { packedQueueCountSchema } from '@/models/json-schema/queue.js';
|
||||
import { packedGalleryPostSchema } from '@/models/json-schema/gallery-post.js';
|
||||
import { packedEmojiDetailedSchema, packedEmojiSimpleSchema } from '@/models/json-schema/emoji.js';
|
||||
import {
|
||||
packedEmojiDetailedAdminSchema,
|
||||
packedEmojiDetailedSchema,
|
||||
packedEmojiSimpleSchema,
|
||||
} from '@/models/json-schema/emoji.js';
|
||||
import { packedFlashSchema } from '@/models/json-schema/flash.js';
|
||||
import { packedAnnouncementSchema } from '@/models/json-schema/announcement.js';
|
||||
import { packedSigninSchema } from '@/models/json-schema/signin.js';
|
||||
|
@ -95,6 +99,7 @@ export const refs = {
|
|||
GalleryPost: packedGalleryPostSchema,
|
||||
EmojiSimple: packedEmojiSimpleSchema,
|
||||
EmojiDetailed: packedEmojiDetailedSchema,
|
||||
EmojiDetailedAdmin: packedEmojiDetailedAdminSchema,
|
||||
Flash: packedFlashSchema,
|
||||
Signin: packedSigninSchema,
|
||||
RoleCondFormulaLogics: packedRoleCondFormulaLogicsSchema,
|
||||
|
|
|
@ -104,3 +104,86 @@ export const packedEmojiDetailedSchema = {
|
|||
},
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const packedEmojiDetailedAdminSchema = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
format: 'id',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
updatedAt: {
|
||||
type: 'string',
|
||||
format: 'date-time',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
name: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
host: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
description: 'The local host is represented with `null`.',
|
||||
},
|
||||
publicUrl: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
originalUrl: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
uri: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
type: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
aliases: {
|
||||
type: 'array',
|
||||
optional: false, nullable: false,
|
||||
items: {
|
||||
type: 'string',
|
||||
format: 'id',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
},
|
||||
category: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
license: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
},
|
||||
localOnly: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
isSensitive: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
roleIdsThatCanBeUsedThisEmojiAsReaction: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
id: {
|
||||
type: 'string',
|
||||
format: 'misskey:id',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
name: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
|
|
@ -87,6 +87,7 @@ export class ImportCustomEmojisProcessorService {
|
|||
await this.emojisRepository.delete({
|
||||
name: emojiInfo.name,
|
||||
});
|
||||
|
||||
try {
|
||||
const driveFile = await this.driveService.addFile({
|
||||
user: null,
|
||||
|
@ -95,11 +96,13 @@ export class ImportCustomEmojisProcessorService {
|
|||
force: true,
|
||||
});
|
||||
await this.customEmojiService.add({
|
||||
originalUrl: driveFile.url,
|
||||
publicUrl: driveFile.webpublicUrl ?? driveFile.url,
|
||||
fileType: driveFile.webpublicType ?? driveFile.type,
|
||||
name: emojiInfo.name,
|
||||
category: emojiInfo.category,
|
||||
host: null,
|
||||
aliases: emojiInfo.aliases,
|
||||
driveFile,
|
||||
license: emojiInfo.license,
|
||||
isSensitive: emojiInfo.isSensitive,
|
||||
localOnly: emojiInfo.localOnly,
|
||||
|
|
|
@ -6,9 +6,12 @@
|
|||
import type { Antenna } from '@/server/api/endpoints/i/import-antennas.js';
|
||||
import type { MiDriveFile } from '@/models/DriveFile.js';
|
||||
import type { MiNote } from '@/models/Note.js';
|
||||
import type { SystemWebhookEventType } from '@/models/SystemWebhook.js';
|
||||
import type { MiUser } from '@/models/User.js';
|
||||
import type { MiWebhook } from '@/models/Webhook.js';
|
||||
import type { MiWebhook, WebhookEventTypes } from '@/models/Webhook.js';
|
||||
import type { IActivity } from '@/core/activitypub/type.js';
|
||||
import type { SystemWebhookPayload } from '@/core/SystemWebhookService.js';
|
||||
import type { UserWebhookPayload } from '@/core/UserWebhookService.js';
|
||||
import type httpSignature from '@peertube/http-signature';
|
||||
|
||||
export type DeliverJobData = {
|
||||
|
@ -106,9 +109,9 @@ export type EndedPollNotificationJobData = {
|
|||
noteId: MiNote['id'];
|
||||
};
|
||||
|
||||
export type SystemWebhookDeliverJobData = {
|
||||
type: string;
|
||||
content: unknown;
|
||||
export type SystemWebhookDeliverJobData<T extends SystemWebhookEventType = SystemWebhookEventType> = {
|
||||
type: T;
|
||||
content: SystemWebhookPayload<T>;
|
||||
webhookId: MiWebhook['id'];
|
||||
to: string;
|
||||
secret: string;
|
||||
|
@ -116,9 +119,9 @@ export type SystemWebhookDeliverJobData = {
|
|||
eventId: string;
|
||||
};
|
||||
|
||||
export type UserWebhookDeliverJobData = {
|
||||
type: string;
|
||||
content: unknown;
|
||||
export type UserWebhookDeliverJobData<T extends WebhookEventTypes = WebhookEventTypes> = {
|
||||
type: T;
|
||||
content: UserWebhookPayload<T>;
|
||||
webhookId: MiWebhook['id'];
|
||||
userId: MiUser['id'];
|
||||
to: string;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,399 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file contains list of all endpoints exported as pathname of API endpoint
|
||||
*
|
||||
* When you add new endpoint, you should add it to this file.
|
||||
* This file is used to generate API documentation and EndpointsModule.
|
||||
*/
|
||||
|
||||
export * as 'admin/abuse-report/notification-recipient/create' from './endpoints/admin/abuse-report/notification-recipient/create.js';
|
||||
export * as 'admin/abuse-report/notification-recipient/delete' from './endpoints/admin/abuse-report/notification-recipient/delete.js';
|
||||
export * as 'admin/abuse-report/notification-recipient/list' from './endpoints/admin/abuse-report/notification-recipient/list.js';
|
||||
export * as 'admin/abuse-report/notification-recipient/show' from './endpoints/admin/abuse-report/notification-recipient/show.js';
|
||||
export * as 'admin/abuse-report/notification-recipient/update' from './endpoints/admin/abuse-report/notification-recipient/update.js';
|
||||
export * as 'admin/abuse-user-reports' from './endpoints/admin/abuse-user-reports.js';
|
||||
export * as 'admin/accounts/create' from './endpoints/admin/accounts/create.js';
|
||||
export * as 'admin/accounts/delete' from './endpoints/admin/accounts/delete.js';
|
||||
export * as 'admin/accounts/find-by-email' from './endpoints/admin/accounts/find-by-email.js';
|
||||
export * as 'admin/ad/create' from './endpoints/admin/ad/create.js';
|
||||
export * as 'admin/ad/delete' from './endpoints/admin/ad/delete.js';
|
||||
export * as 'admin/ad/list' from './endpoints/admin/ad/list.js';
|
||||
export * as 'admin/ad/update' from './endpoints/admin/ad/update.js';
|
||||
export * as 'admin/announcements/create' from './endpoints/admin/announcements/create.js';
|
||||
export * as 'admin/announcements/delete' from './endpoints/admin/announcements/delete.js';
|
||||
export * as 'admin/announcements/list' from './endpoints/admin/announcements/list.js';
|
||||
export * as 'admin/announcements/update' from './endpoints/admin/announcements/update.js';
|
||||
export * as 'admin/avatar-decorations/create' from './endpoints/admin/avatar-decorations/create.js';
|
||||
export * as 'admin/avatar-decorations/delete' from './endpoints/admin/avatar-decorations/delete.js';
|
||||
export * as 'admin/avatar-decorations/list' from './endpoints/admin/avatar-decorations/list.js';
|
||||
export * as 'admin/avatar-decorations/update' from './endpoints/admin/avatar-decorations/update.js';
|
||||
export * as 'admin/captcha/current' from './endpoints/admin/captcha/current.js';
|
||||
export * as 'admin/captcha/save' from './endpoints/admin/captcha/save.js';
|
||||
export * as 'admin/delete-account' from './endpoints/admin/delete-account.js';
|
||||
export * as 'admin/delete-all-files-of-a-user' from './endpoints/admin/delete-all-files-of-a-user.js';
|
||||
export * as 'admin/drive/clean-remote-files' from './endpoints/admin/drive/clean-remote-files.js';
|
||||
export * as 'admin/drive/cleanup' from './endpoints/admin/drive/cleanup.js';
|
||||
export * as 'admin/drive/files' from './endpoints/admin/drive/files.js';
|
||||
export * as 'admin/drive/show-file' from './endpoints/admin/drive/show-file.js';
|
||||
export * as 'admin/emoji/add' from './endpoints/admin/emoji/add.js';
|
||||
export * as 'admin/emoji/add-aliases-bulk' from './endpoints/admin/emoji/add-aliases-bulk.js';
|
||||
export * as 'admin/emoji/copy' from './endpoints/admin/emoji/copy.js';
|
||||
export * as 'admin/emoji/delete' from './endpoints/admin/emoji/delete.js';
|
||||
export * as 'admin/emoji/delete-bulk' from './endpoints/admin/emoji/delete-bulk.js';
|
||||
export * as 'admin/emoji/import-zip' from './endpoints/admin/emoji/import-zip.js';
|
||||
export * as 'admin/emoji/list' from './endpoints/admin/emoji/list.js';
|
||||
export * as 'admin/emoji/list-remote' from './endpoints/admin/emoji/list-remote.js';
|
||||
export * as 'admin/emoji/remove-aliases-bulk' from './endpoints/admin/emoji/remove-aliases-bulk.js';
|
||||
export * as 'admin/emoji/set-aliases-bulk' from './endpoints/admin/emoji/set-aliases-bulk.js';
|
||||
export * as 'admin/emoji/set-category-bulk' from './endpoints/admin/emoji/set-category-bulk.js';
|
||||
export * as 'admin/emoji/set-license-bulk' from './endpoints/admin/emoji/set-license-bulk.js';
|
||||
export * as 'admin/emoji/update' from './endpoints/admin/emoji/update.js';
|
||||
export * as 'admin/federation/delete-all-files' from './endpoints/admin/federation/delete-all-files.js';
|
||||
export * as 'admin/federation/refresh-remote-instance-metadata' from './endpoints/admin/federation/refresh-remote-instance-metadata.js';
|
||||
export * as 'admin/federation/remove-all-following' from './endpoints/admin/federation/remove-all-following.js';
|
||||
export * as 'admin/federation/update-instance' from './endpoints/admin/federation/update-instance.js';
|
||||
export * as 'admin/forward-abuse-user-report' from './endpoints/admin/forward-abuse-user-report.js';
|
||||
export * as 'admin/get-index-stats' from './endpoints/admin/get-index-stats.js';
|
||||
export * as 'admin/get-table-stats' from './endpoints/admin/get-table-stats.js';
|
||||
export * as 'admin/get-user-ips' from './endpoints/admin/get-user-ips.js';
|
||||
export * as 'admin/invite/create' from './endpoints/admin/invite/create.js';
|
||||
export * as 'admin/invite/list' from './endpoints/admin/invite/list.js';
|
||||
export * as 'admin/meta' from './endpoints/admin/meta.js';
|
||||
export * as 'admin/promo/create' from './endpoints/admin/promo/create.js';
|
||||
export * as 'admin/queue/clear' from './endpoints/admin/queue/clear.js';
|
||||
export * as 'admin/queue/deliver-delayed' from './endpoints/admin/queue/deliver-delayed.js';
|
||||
export * as 'admin/queue/inbox-delayed' from './endpoints/admin/queue/inbox-delayed.js';
|
||||
export * as 'admin/queue/promote' from './endpoints/admin/queue/promote.js';
|
||||
export * as 'admin/queue/stats' from './endpoints/admin/queue/stats.js';
|
||||
export * as 'admin/relays/add' from './endpoints/admin/relays/add.js';
|
||||
export * as 'admin/relays/list' from './endpoints/admin/relays/list.js';
|
||||
export * as 'admin/relays/remove' from './endpoints/admin/relays/remove.js';
|
||||
export * as 'admin/reset-password' from './endpoints/admin/reset-password.js';
|
||||
export * as 'admin/resolve-abuse-user-report' from './endpoints/admin/resolve-abuse-user-report.js';
|
||||
export * as 'admin/roles/assign' from './endpoints/admin/roles/assign.js';
|
||||
export * as 'admin/roles/create' from './endpoints/admin/roles/create.js';
|
||||
export * as 'admin/roles/delete' from './endpoints/admin/roles/delete.js';
|
||||
export * as 'admin/roles/list' from './endpoints/admin/roles/list.js';
|
||||
export * as 'admin/roles/show' from './endpoints/admin/roles/show.js';
|
||||
export * as 'admin/roles/unassign' from './endpoints/admin/roles/unassign.js';
|
||||
export * as 'admin/roles/update' from './endpoints/admin/roles/update.js';
|
||||
export * as 'admin/roles/update-default-policies' from './endpoints/admin/roles/update-default-policies.js';
|
||||
export * as 'admin/roles/users' from './endpoints/admin/roles/users.js';
|
||||
export * as 'admin/send-email' from './endpoints/admin/send-email.js';
|
||||
export * as 'admin/server-info' from './endpoints/admin/server-info.js';
|
||||
export * as 'admin/show-moderation-logs' from './endpoints/admin/show-moderation-logs.js';
|
||||
export * as 'admin/show-user' from './endpoints/admin/show-user.js';
|
||||
export * as 'admin/show-users' from './endpoints/admin/show-users.js';
|
||||
export * as 'admin/suspend-user' from './endpoints/admin/suspend-user.js';
|
||||
export * as 'admin/system-webhook/create' from './endpoints/admin/system-webhook/create.js';
|
||||
export * as 'admin/system-webhook/delete' from './endpoints/admin/system-webhook/delete.js';
|
||||
export * as 'admin/system-webhook/list' from './endpoints/admin/system-webhook/list.js';
|
||||
export * as 'admin/system-webhook/show' from './endpoints/admin/system-webhook/show.js';
|
||||
export * as 'admin/system-webhook/test' from './endpoints/admin/system-webhook/test.js';
|
||||
export * as 'admin/system-webhook/update' from './endpoints/admin/system-webhook/update.js';
|
||||
export * as 'admin/unset-user-avatar' from './endpoints/admin/unset-user-avatar.js';
|
||||
export * as 'admin/unset-user-banner' from './endpoints/admin/unset-user-banner.js';
|
||||
export * as 'admin/unsuspend-user' from './endpoints/admin/unsuspend-user.js';
|
||||
export * as 'admin/update-abuse-user-report' from './endpoints/admin/update-abuse-user-report.js';
|
||||
export * as 'admin/update-meta' from './endpoints/admin/update-meta.js';
|
||||
export * as 'admin/update-user-note' from './endpoints/admin/update-user-note.js';
|
||||
export * as 'announcements' from './endpoints/announcements.js';
|
||||
export * as 'announcements/show' from './endpoints/announcements/show.js';
|
||||
export * as 'antennas/create' from './endpoints/antennas/create.js';
|
||||
export * as 'antennas/delete' from './endpoints/antennas/delete.js';
|
||||
export * as 'antennas/list' from './endpoints/antennas/list.js';
|
||||
export * as 'antennas/notes' from './endpoints/antennas/notes.js';
|
||||
export * as 'antennas/show' from './endpoints/antennas/show.js';
|
||||
export * as 'antennas/update' from './endpoints/antennas/update.js';
|
||||
export * as 'ap/get' from './endpoints/ap/get.js';
|
||||
export * as 'ap/show' from './endpoints/ap/show.js';
|
||||
export * as 'app/create' from './endpoints/app/create.js';
|
||||
export * as 'app/show' from './endpoints/app/show.js';
|
||||
export * as 'auth/accept' from './endpoints/auth/accept.js';
|
||||
export * as 'auth/session/generate' from './endpoints/auth/session/generate.js';
|
||||
export * as 'auth/session/show' from './endpoints/auth/session/show.js';
|
||||
export * as 'auth/session/userkey' from './endpoints/auth/session/userkey.js';
|
||||
export * as 'blocking/create' from './endpoints/blocking/create.js';
|
||||
export * as 'blocking/delete' from './endpoints/blocking/delete.js';
|
||||
export * as 'blocking/list' from './endpoints/blocking/list.js';
|
||||
export * as 'bubble-game/ranking' from './endpoints/bubble-game/ranking.js';
|
||||
export * as 'bubble-game/register' from './endpoints/bubble-game/register.js';
|
||||
export * as 'channels/create' from './endpoints/channels/create.js';
|
||||
export * as 'channels/favorite' from './endpoints/channels/favorite.js';
|
||||
export * as 'channels/featured' from './endpoints/channels/featured.js';
|
||||
export * as 'channels/follow' from './endpoints/channels/follow.js';
|
||||
export * as 'channels/followed' from './endpoints/channels/followed.js';
|
||||
export * as 'channels/my-favorites' from './endpoints/channels/my-favorites.js';
|
||||
export * as 'channels/owned' from './endpoints/channels/owned.js';
|
||||
export * as 'channels/search' from './endpoints/channels/search.js';
|
||||
export * as 'channels/show' from './endpoints/channels/show.js';
|
||||
export * as 'channels/timeline' from './endpoints/channels/timeline.js';
|
||||
export * as 'channels/unfavorite' from './endpoints/channels/unfavorite.js';
|
||||
export * as 'channels/unfollow' from './endpoints/channels/unfollow.js';
|
||||
export * as 'channels/update' from './endpoints/channels/update.js';
|
||||
export * as 'charts/active-users' from './endpoints/charts/active-users.js';
|
||||
export * as 'charts/ap-request' from './endpoints/charts/ap-request.js';
|
||||
export * as 'charts/drive' from './endpoints/charts/drive.js';
|
||||
export * as 'charts/federation' from './endpoints/charts/federation.js';
|
||||
export * as 'charts/instance' from './endpoints/charts/instance.js';
|
||||
export * as 'charts/notes' from './endpoints/charts/notes.js';
|
||||
export * as 'charts/user/drive' from './endpoints/charts/user/drive.js';
|
||||
export * as 'charts/user/following' from './endpoints/charts/user/following.js';
|
||||
export * as 'charts/user/notes' from './endpoints/charts/user/notes.js';
|
||||
export * as 'charts/user/pv' from './endpoints/charts/user/pv.js';
|
||||
export * as 'charts/user/reactions' from './endpoints/charts/user/reactions.js';
|
||||
export * as 'charts/users' from './endpoints/charts/users.js';
|
||||
export * as 'clips/add-note' from './endpoints/clips/add-note.js';
|
||||
export * as 'clips/create' from './endpoints/clips/create.js';
|
||||
export * as 'clips/delete' from './endpoints/clips/delete.js';
|
||||
export * as 'clips/favorite' from './endpoints/clips/favorite.js';
|
||||
export * as 'clips/list' from './endpoints/clips/list.js';
|
||||
export * as 'clips/my-favorites' from './endpoints/clips/my-favorites.js';
|
||||
export * as 'clips/notes' from './endpoints/clips/notes.js';
|
||||
export * as 'clips/remove-note' from './endpoints/clips/remove-note.js';
|
||||
export * as 'clips/show' from './endpoints/clips/show.js';
|
||||
export * as 'clips/unfavorite' from './endpoints/clips/unfavorite.js';
|
||||
export * as 'clips/update' from './endpoints/clips/update.js';
|
||||
export * as 'drive' from './endpoints/drive.js';
|
||||
export * as 'drive/files' from './endpoints/drive/files.js';
|
||||
export * as 'drive/files/attached-notes' from './endpoints/drive/files/attached-notes.js';
|
||||
export * as 'drive/files/check-existence' from './endpoints/drive/files/check-existence.js';
|
||||
export * as 'drive/files/create' from './endpoints/drive/files/create.js';
|
||||
export * as 'drive/files/delete' from './endpoints/drive/files/delete.js';
|
||||
export * as 'drive/files/find' from './endpoints/drive/files/find.js';
|
||||
export * as 'drive/files/find-by-hash' from './endpoints/drive/files/find-by-hash.js';
|
||||
export * as 'drive/files/show' from './endpoints/drive/files/show.js';
|
||||
export * as 'drive/files/update' from './endpoints/drive/files/update.js';
|
||||
export * as 'drive/files/upload-from-url' from './endpoints/drive/files/upload-from-url.js';
|
||||
export * as 'drive/folders' from './endpoints/drive/folders.js';
|
||||
export * as 'drive/folders/create' from './endpoints/drive/folders/create.js';
|
||||
export * as 'drive/folders/delete' from './endpoints/drive/folders/delete.js';
|
||||
export * as 'drive/folders/find' from './endpoints/drive/folders/find.js';
|
||||
export * as 'drive/folders/show' from './endpoints/drive/folders/show.js';
|
||||
export * as 'drive/folders/update' from './endpoints/drive/folders/update.js';
|
||||
export * as 'drive/stream' from './endpoints/drive/stream.js';
|
||||
export * as 'email-address/available' from './endpoints/email-address/available.js';
|
||||
export * as 'emoji' from './endpoints/emoji.js';
|
||||
export * as 'emojis' from './endpoints/emojis.js';
|
||||
export * as 'endpoint' from './endpoints/endpoint.js';
|
||||
export * as 'endpoints' from './endpoints/endpoints.js';
|
||||
export * as 'export-custom-emojis' from './endpoints/export-custom-emojis.js';
|
||||
export * as 'federation/followers' from './endpoints/federation/followers.js';
|
||||
export * as 'federation/following' from './endpoints/federation/following.js';
|
||||
export * as 'federation/instances' from './endpoints/federation/instances.js';
|
||||
export * as 'federation/show-instance' from './endpoints/federation/show-instance.js';
|
||||
export * as 'federation/stats' from './endpoints/federation/stats.js';
|
||||
export * as 'federation/update-remote-user' from './endpoints/federation/update-remote-user.js';
|
||||
export * as 'federation/users' from './endpoints/federation/users.js';
|
||||
export * as 'fetch-external-resources' from './endpoints/fetch-external-resources.js';
|
||||
export * as 'fetch-rss' from './endpoints/fetch-rss.js';
|
||||
export * as 'flash/create' from './endpoints/flash/create.js';
|
||||
export * as 'flash/delete' from './endpoints/flash/delete.js';
|
||||
export * as 'flash/featured' from './endpoints/flash/featured.js';
|
||||
export * as 'flash/like' from './endpoints/flash/like.js';
|
||||
export * as 'flash/my' from './endpoints/flash/my.js';
|
||||
export * as 'flash/my-likes' from './endpoints/flash/my-likes.js';
|
||||
export * as 'flash/show' from './endpoints/flash/show.js';
|
||||
export * as 'flash/unlike' from './endpoints/flash/unlike.js';
|
||||
export * as 'flash/update' from './endpoints/flash/update.js';
|
||||
export * as 'following/create' from './endpoints/following/create.js';
|
||||
export * as 'following/delete' from './endpoints/following/delete.js';
|
||||
export * as 'following/invalidate' from './endpoints/following/invalidate.js';
|
||||
export * as 'following/requests/accept' from './endpoints/following/requests/accept.js';
|
||||
export * as 'following/requests/cancel' from './endpoints/following/requests/cancel.js';
|
||||
export * as 'following/requests/list' from './endpoints/following/requests/list.js';
|
||||
export * as 'following/requests/reject' from './endpoints/following/requests/reject.js';
|
||||
export * as 'following/requests/sent' from './endpoints/following/requests/sent.js';
|
||||
export * as 'following/update' from './endpoints/following/update.js';
|
||||
export * as 'following/update-all' from './endpoints/following/update-all.js';
|
||||
export * as 'gallery/featured' from './endpoints/gallery/featured.js';
|
||||
export * as 'gallery/popular' from './endpoints/gallery/popular.js';
|
||||
export * as 'gallery/posts' from './endpoints/gallery/posts.js';
|
||||
export * as 'gallery/posts/create' from './endpoints/gallery/posts/create.js';
|
||||
export * as 'gallery/posts/delete' from './endpoints/gallery/posts/delete.js';
|
||||
export * as 'gallery/posts/like' from './endpoints/gallery/posts/like.js';
|
||||
export * as 'gallery/posts/show' from './endpoints/gallery/posts/show.js';
|
||||
export * as 'gallery/posts/unlike' from './endpoints/gallery/posts/unlike.js';
|
||||
export * as 'gallery/posts/update' from './endpoints/gallery/posts/update.js';
|
||||
export * as 'get-avatar-decorations' from './endpoints/get-avatar-decorations.js';
|
||||
export * as 'get-online-users-count' from './endpoints/get-online-users-count.js';
|
||||
export * as 'hashtags/list' from './endpoints/hashtags/list.js';
|
||||
export * as 'hashtags/search' from './endpoints/hashtags/search.js';
|
||||
export * as 'hashtags/show' from './endpoints/hashtags/show.js';
|
||||
export * as 'hashtags/trend' from './endpoints/hashtags/trend.js';
|
||||
export * as 'hashtags/users' from './endpoints/hashtags/users.js';
|
||||
export * as 'i' from './endpoints/i.js';
|
||||
export * as 'i/2fa/done' from './endpoints/i/2fa/done.js';
|
||||
export * as 'i/2fa/key-done' from './endpoints/i/2fa/key-done.js';
|
||||
export * as 'i/2fa/password-less' from './endpoints/i/2fa/password-less.js';
|
||||
export * as 'i/2fa/register' from './endpoints/i/2fa/register.js';
|
||||
export * as 'i/2fa/register-key' from './endpoints/i/2fa/register-key.js';
|
||||
export * as 'i/2fa/remove-key' from './endpoints/i/2fa/remove-key.js';
|
||||
export * as 'i/2fa/unregister' from './endpoints/i/2fa/unregister.js';
|
||||
export * as 'i/2fa/update-key' from './endpoints/i/2fa/update-key.js';
|
||||
export * as 'i/apps' from './endpoints/i/apps.js';
|
||||
export * as 'i/authorized-apps' from './endpoints/i/authorized-apps.js';
|
||||
export * as 'i/change-password' from './endpoints/i/change-password.js';
|
||||
export * as 'i/claim-achievement' from './endpoints/i/claim-achievement.js';
|
||||
export * as 'i/delete-account' from './endpoints/i/delete-account.js';
|
||||
export * as 'i/export-antennas' from './endpoints/i/export-antennas.js';
|
||||
export * as 'i/export-blocking' from './endpoints/i/export-blocking.js';
|
||||
export * as 'i/export-clips' from './endpoints/i/export-clips.js';
|
||||
export * as 'i/export-favorites' from './endpoints/i/export-favorites.js';
|
||||
export * as 'i/export-following' from './endpoints/i/export-following.js';
|
||||
export * as 'i/export-mute' from './endpoints/i/export-mute.js';
|
||||
export * as 'i/export-notes' from './endpoints/i/export-notes.js';
|
||||
export * as 'i/export-user-lists' from './endpoints/i/export-user-lists.js';
|
||||
export * as 'i/favorites' from './endpoints/i/favorites.js';
|
||||
export * as 'i/gallery/likes' from './endpoints/i/gallery/likes.js';
|
||||
export * as 'i/gallery/posts' from './endpoints/i/gallery/posts.js';
|
||||
export * as 'i/import-antennas' from './endpoints/i/import-antennas.js';
|
||||
export * as 'i/import-blocking' from './endpoints/i/import-blocking.js';
|
||||
export * as 'i/import-following' from './endpoints/i/import-following.js';
|
||||
export * as 'i/import-muting' from './endpoints/i/import-muting.js';
|
||||
export * as 'i/import-user-lists' from './endpoints/i/import-user-lists.js';
|
||||
export * as 'i/move' from './endpoints/i/move.js';
|
||||
export * as 'i/notifications' from './endpoints/i/notifications.js';
|
||||
export * as 'i/notifications-grouped' from './endpoints/i/notifications-grouped.js';
|
||||
export * as 'i/page-likes' from './endpoints/i/page-likes.js';
|
||||
export * as 'i/pages' from './endpoints/i/pages.js';
|
||||
export * as 'i/pin' from './endpoints/i/pin.js';
|
||||
export * as 'i/read-all-unread-notes' from './endpoints/i/read-all-unread-notes.js';
|
||||
export * as 'i/read-announcement' from './endpoints/i/read-announcement.js';
|
||||
export * as 'i/regenerate-token' from './endpoints/i/regenerate-token.js';
|
||||
export * as 'i/registry/get' from './endpoints/i/registry/get.js';
|
||||
export * as 'i/registry/get-all' from './endpoints/i/registry/get-all.js';
|
||||
export * as 'i/registry/get-detail' from './endpoints/i/registry/get-detail.js';
|
||||
export * as 'i/registry/keys' from './endpoints/i/registry/keys.js';
|
||||
export * as 'i/registry/keys-with-type' from './endpoints/i/registry/keys-with-type.js';
|
||||
export * as 'i/registry/remove' from './endpoints/i/registry/remove.js';
|
||||
export * as 'i/registry/scopes-with-domain' from './endpoints/i/registry/scopes-with-domain.js';
|
||||
export * as 'i/registry/set' from './endpoints/i/registry/set.js';
|
||||
export * as 'i/revoke-token' from './endpoints/i/revoke-token.js';
|
||||
export * as 'i/signin-history' from './endpoints/i/signin-history.js';
|
||||
export * as 'i/unpin' from './endpoints/i/unpin.js';
|
||||
export * as 'i/update' from './endpoints/i/update.js';
|
||||
export * as 'i/update-email' from './endpoints/i/update-email.js';
|
||||
export * as 'i/webhooks/create' from './endpoints/i/webhooks/create.js';
|
||||
export * as 'i/webhooks/delete' from './endpoints/i/webhooks/delete.js';
|
||||
export * as 'i/webhooks/list' from './endpoints/i/webhooks/list.js';
|
||||
export * as 'i/webhooks/show' from './endpoints/i/webhooks/show.js';
|
||||
export * as 'i/webhooks/test' from './endpoints/i/webhooks/test.js';
|
||||
export * as 'i/webhooks/update' from './endpoints/i/webhooks/update.js';
|
||||
export * as 'invite/create' from './endpoints/invite/create.js';
|
||||
export * as 'invite/delete' from './endpoints/invite/delete.js';
|
||||
export * as 'invite/limit' from './endpoints/invite/limit.js';
|
||||
export * as 'invite/list' from './endpoints/invite/list.js';
|
||||
export * as 'meta' from './endpoints/meta.js';
|
||||
export * as 'miauth/gen-token' from './endpoints/miauth/gen-token.js';
|
||||
export * as 'mute/create' from './endpoints/mute/create.js';
|
||||
export * as 'mute/delete' from './endpoints/mute/delete.js';
|
||||
export * as 'mute/list' from './endpoints/mute/list.js';
|
||||
export * as 'my/apps' from './endpoints/my/apps.js';
|
||||
export * as 'notes' from './endpoints/notes.js';
|
||||
export * as 'notes/children' from './endpoints/notes/children.js';
|
||||
export * as 'notes/clips' from './endpoints/notes/clips.js';
|
||||
export * as 'notes/conversation' from './endpoints/notes/conversation.js';
|
||||
export * as 'notes/create' from './endpoints/notes/create.js';
|
||||
export * as 'notes/delete' from './endpoints/notes/delete.js';
|
||||
export * as 'notes/favorites/create' from './endpoints/notes/favorites/create.js';
|
||||
export * as 'notes/favorites/delete' from './endpoints/notes/favorites/delete.js';
|
||||
export * as 'notes/featured' from './endpoints/notes/featured.js';
|
||||
export * as 'notes/global-timeline' from './endpoints/notes/global-timeline.js';
|
||||
export * as 'notes/hybrid-timeline' from './endpoints/notes/hybrid-timeline.js';
|
||||
export * as 'notes/local-timeline' from './endpoints/notes/local-timeline.js';
|
||||
export * as 'notes/mentions' from './endpoints/notes/mentions.js';
|
||||
export * as 'notes/polls/recommendation' from './endpoints/notes/polls/recommendation.js';
|
||||
export * as 'notes/polls/vote' from './endpoints/notes/polls/vote.js';
|
||||
export * as 'notes/reactions' from './endpoints/notes/reactions.js';
|
||||
export * as 'notes/reactions/create' from './endpoints/notes/reactions/create.js';
|
||||
export * as 'notes/reactions/delete' from './endpoints/notes/reactions/delete.js';
|
||||
export * as 'notes/renotes' from './endpoints/notes/renotes.js';
|
||||
export * as 'notes/replies' from './endpoints/notes/replies.js';
|
||||
export * as 'notes/search' from './endpoints/notes/search.js';
|
||||
export * as 'notes/search-by-tag' from './endpoints/notes/search-by-tag.js';
|
||||
export * as 'notes/show' from './endpoints/notes/show.js';
|
||||
export * as 'notes/state' from './endpoints/notes/state.js';
|
||||
export * as 'notes/thread-muting/create' from './endpoints/notes/thread-muting/create.js';
|
||||
export * as 'notes/thread-muting/delete' from './endpoints/notes/thread-muting/delete.js';
|
||||
export * as 'notes/timeline' from './endpoints/notes/timeline.js';
|
||||
export * as 'notes/translate' from './endpoints/notes/translate.js';
|
||||
export * as 'notes/unrenote' from './endpoints/notes/unrenote.js';
|
||||
export * as 'notes/user-list-timeline' from './endpoints/notes/user-list-timeline.js';
|
||||
export * as 'notifications/create' from './endpoints/notifications/create.js';
|
||||
export * as 'notifications/flush' from './endpoints/notifications/flush.js';
|
||||
export * as 'notifications/mark-all-as-read' from './endpoints/notifications/mark-all-as-read.js';
|
||||
export * as 'notifications/test-notification' from './endpoints/notifications/test-notification.js';
|
||||
export * as 'page-push' from './endpoints/page-push.js';
|
||||
export * as 'pages/create' from './endpoints/pages/create.js';
|
||||
export * as 'pages/delete' from './endpoints/pages/delete.js';
|
||||
export * as 'pages/featured' from './endpoints/pages/featured.js';
|
||||
export * as 'pages/like' from './endpoints/pages/like.js';
|
||||
export * as 'pages/show' from './endpoints/pages/show.js';
|
||||
export * as 'pages/unlike' from './endpoints/pages/unlike.js';
|
||||
export * as 'pages/update' from './endpoints/pages/update.js';
|
||||
export * as 'ping' from './endpoints/ping.js';
|
||||
export * as 'pinned-users' from './endpoints/pinned-users.js';
|
||||
export * as 'promo/read' from './endpoints/promo/read.js';
|
||||
export * as 'renote-mute/create' from './endpoints/renote-mute/create.js';
|
||||
export * as 'renote-mute/delete' from './endpoints/renote-mute/delete.js';
|
||||
export * as 'renote-mute/list' from './endpoints/renote-mute/list.js';
|
||||
export * as 'request-reset-password' from './endpoints/request-reset-password.js';
|
||||
export * as 'reset-db' from './endpoints/reset-db.js';
|
||||
export * as 'reset-password' from './endpoints/reset-password.js';
|
||||
export * as 'retention' from './endpoints/retention.js';
|
||||
export * as 'reversi/cancel-match' from './endpoints/reversi/cancel-match.js';
|
||||
export * as 'reversi/games' from './endpoints/reversi/games.js';
|
||||
export * as 'reversi/invitations' from './endpoints/reversi/invitations.js';
|
||||
export * as 'reversi/match' from './endpoints/reversi/match.js';
|
||||
export * as 'reversi/show-game' from './endpoints/reversi/show-game.js';
|
||||
export * as 'reversi/surrender' from './endpoints/reversi/surrender.js';
|
||||
export * as 'reversi/verify' from './endpoints/reversi/verify.js';
|
||||
export * as 'roles/list' from './endpoints/roles/list.js';
|
||||
export * as 'roles/notes' from './endpoints/roles/notes.js';
|
||||
export * as 'roles/show' from './endpoints/roles/show.js';
|
||||
export * as 'roles/users' from './endpoints/roles/users.js';
|
||||
export * as 'server-info' from './endpoints/server-info.js';
|
||||
export * as 'stats' from './endpoints/stats.js';
|
||||
export * as 'sw/register' from './endpoints/sw/register.js';
|
||||
export * as 'sw/show-registration' from './endpoints/sw/show-registration.js';
|
||||
export * as 'sw/unregister' from './endpoints/sw/unregister.js';
|
||||
export * as 'sw/update-registration' from './endpoints/sw/update-registration.js';
|
||||
export * as 'test' from './endpoints/test.js';
|
||||
export * as 'username/available' from './endpoints/username/available.js';
|
||||
export * as 'users' from './endpoints/users.js';
|
||||
export * as 'users/achievements' from './endpoints/users/achievements.js';
|
||||
export * as 'users/clips' from './endpoints/users/clips.js';
|
||||
export * as 'users/featured-notes' from './endpoints/users/featured-notes.js';
|
||||
export * as 'users/flashs' from './endpoints/users/flashs.js';
|
||||
export * as 'users/followers' from './endpoints/users/followers.js';
|
||||
export * as 'users/following' from './endpoints/users/following.js';
|
||||
export * as 'users/gallery/posts' from './endpoints/users/gallery/posts.js';
|
||||
export * as 'users/get-frequently-replied-users' from './endpoints/users/get-frequently-replied-users.js';
|
||||
export * as 'users/lists/create' from './endpoints/users/lists/create.js';
|
||||
export * as 'users/lists/create-from-public' from './endpoints/users/lists/create-from-public.js';
|
||||
export * as 'users/lists/delete' from './endpoints/users/lists/delete.js';
|
||||
export * as 'users/lists/favorite' from './endpoints/users/lists/favorite.js';
|
||||
export * as 'users/lists/get-memberships' from './endpoints/users/lists/get-memberships.js';
|
||||
export * as 'users/lists/list' from './endpoints/users/lists/list.js';
|
||||
export * as 'users/lists/pull' from './endpoints/users/lists/pull.js';
|
||||
export * as 'users/lists/push' from './endpoints/users/lists/push.js';
|
||||
export * as 'users/lists/show' from './endpoints/users/lists/show.js';
|
||||
export * as 'users/lists/unfavorite' from './endpoints/users/lists/unfavorite.js';
|
||||
export * as 'users/lists/update' from './endpoints/users/lists/update.js';
|
||||
export * as 'users/lists/update-membership' from './endpoints/users/lists/update-membership.js';
|
||||
export * as 'users/notes' from './endpoints/users/notes.js';
|
||||
export * as 'users/pages' from './endpoints/users/pages.js';
|
||||
export * as 'users/reactions' from './endpoints/users/reactions.js';
|
||||
export * as 'users/recommendation' from './endpoints/users/recommendation.js';
|
||||
export * as 'users/relation' from './endpoints/users/relation.js';
|
||||
export * as 'users/report-abuse' from './endpoints/users/report-abuse.js';
|
||||
export * as 'users/search' from './endpoints/users/search.js';
|
||||
export * as 'users/search-by-username-and-host' from './endpoints/users/search-by-username-and-host.js';
|
||||
export * as 'users/show' from './endpoints/users/show.js';
|
||||
export * as 'users/update-memo' from './endpoints/users/update-memo.js';
|
||||
export * as 'v2/admin/emoji/list' from './endpoints/v2/admin/emoji/list.js';
|
|
@ -6,787 +6,7 @@
|
|||
import { permissions } from 'misskey-js';
|
||||
import type { KeyOf, Schema } from '@/misc/json-schema.js';
|
||||
|
||||
import * as ep___admin_abuseReport_notificationRecipient_list
|
||||
from '@/server/api/endpoints/admin/abuse-report/notification-recipient/list.js';
|
||||
import * as ep___admin_abuseReport_notificationRecipient_show
|
||||
from '@/server/api/endpoints/admin/abuse-report/notification-recipient/show.js';
|
||||
import * as ep___admin_abuseReport_notificationRecipient_create
|
||||
from '@/server/api/endpoints/admin/abuse-report/notification-recipient/create.js';
|
||||
import * as ep___admin_abuseReport_notificationRecipient_update
|
||||
from '@/server/api/endpoints/admin/abuse-report/notification-recipient/update.js';
|
||||
import * as ep___admin_abuseReport_notificationRecipient_delete
|
||||
from '@/server/api/endpoints/admin/abuse-report/notification-recipient/delete.js';
|
||||
import * as ep___admin_abuseUserReports from './endpoints/admin/abuse-user-reports.js';
|
||||
import * as ep___admin_meta from './endpoints/admin/meta.js';
|
||||
import * as ep___admin_accounts_create from './endpoints/admin/accounts/create.js';
|
||||
import * as ep___admin_accounts_delete from './endpoints/admin/accounts/delete.js';
|
||||
import * as ep___admin_accounts_findByEmail from './endpoints/admin/accounts/find-by-email.js';
|
||||
import * as ep___admin_ad_create from './endpoints/admin/ad/create.js';
|
||||
import * as ep___admin_ad_delete from './endpoints/admin/ad/delete.js';
|
||||
import * as ep___admin_ad_list from './endpoints/admin/ad/list.js';
|
||||
import * as ep___admin_ad_update from './endpoints/admin/ad/update.js';
|
||||
import * as ep___admin_announcements_create from './endpoints/admin/announcements/create.js';
|
||||
import * as ep___admin_announcements_delete from './endpoints/admin/announcements/delete.js';
|
||||
import * as ep___admin_announcements_list from './endpoints/admin/announcements/list.js';
|
||||
import * as ep___admin_announcements_update from './endpoints/admin/announcements/update.js';
|
||||
import * as ep___admin_avatarDecorations_create from './endpoints/admin/avatar-decorations/create.js';
|
||||
import * as ep___admin_avatarDecorations_delete from './endpoints/admin/avatar-decorations/delete.js';
|
||||
import * as ep___admin_avatarDecorations_list from './endpoints/admin/avatar-decorations/list.js';
|
||||
import * as ep___admin_avatarDecorations_update from './endpoints/admin/avatar-decorations/update.js';
|
||||
import * as ep___admin_captcha_current from './endpoints/admin/captcha/current.js';
|
||||
import * as ep___admin_captcha_save from './endpoints/admin/captcha/save.js';
|
||||
import * as ep___admin_deleteAllFilesOfAUser from './endpoints/admin/delete-all-files-of-a-user.js';
|
||||
import * as ep___admin_unsetUserAvatar from './endpoints/admin/unset-user-avatar.js';
|
||||
import * as ep___admin_unsetUserBanner from './endpoints/admin/unset-user-banner.js';
|
||||
import * as ep___admin_drive_cleanRemoteFiles from './endpoints/admin/drive/clean-remote-files.js';
|
||||
import * as ep___admin_drive_cleanup from './endpoints/admin/drive/cleanup.js';
|
||||
import * as ep___admin_drive_files from './endpoints/admin/drive/files.js';
|
||||
import * as ep___admin_drive_showFile from './endpoints/admin/drive/show-file.js';
|
||||
import * as ep___admin_emoji_addAliasesBulk from './endpoints/admin/emoji/add-aliases-bulk.js';
|
||||
import * as ep___admin_emoji_add from './endpoints/admin/emoji/add.js';
|
||||
import * as ep___admin_emoji_copy from './endpoints/admin/emoji/copy.js';
|
||||
import * as ep___admin_emoji_deleteBulk from './endpoints/admin/emoji/delete-bulk.js';
|
||||
import * as ep___admin_emoji_delete from './endpoints/admin/emoji/delete.js';
|
||||
import * as ep___admin_emoji_importZip from './endpoints/admin/emoji/import-zip.js';
|
||||
import * as ep___admin_emoji_listRemote from './endpoints/admin/emoji/list-remote.js';
|
||||
import * as ep___admin_emoji_list from './endpoints/admin/emoji/list.js';
|
||||
import * as ep___admin_emoji_removeAliasesBulk from './endpoints/admin/emoji/remove-aliases-bulk.js';
|
||||
import * as ep___admin_emoji_setAliasesBulk from './endpoints/admin/emoji/set-aliases-bulk.js';
|
||||
import * as ep___admin_emoji_setCategoryBulk from './endpoints/admin/emoji/set-category-bulk.js';
|
||||
import * as ep___admin_emoji_setLicenseBulk from './endpoints/admin/emoji/set-license-bulk.js';
|
||||
import * as ep___admin_emoji_update from './endpoints/admin/emoji/update.js';
|
||||
import * as ep___admin_federation_deleteAllFiles from './endpoints/admin/federation/delete-all-files.js';
|
||||
import * as ep___admin_federation_refreshRemoteInstanceMetadata
|
||||
from './endpoints/admin/federation/refresh-remote-instance-metadata.js';
|
||||
import * as ep___admin_federation_removeAllFollowing from './endpoints/admin/federation/remove-all-following.js';
|
||||
import * as ep___admin_federation_updateInstance from './endpoints/admin/federation/update-instance.js';
|
||||
import * as ep___admin_getIndexStats from './endpoints/admin/get-index-stats.js';
|
||||
import * as ep___admin_getTableStats from './endpoints/admin/get-table-stats.js';
|
||||
import * as ep___admin_getUserIps from './endpoints/admin/get-user-ips.js';
|
||||
import * as ep___admin_invite_create from './endpoints/admin/invite/create.js';
|
||||
import * as ep___admin_invite_list from './endpoints/admin/invite/list.js';
|
||||
import * as ep___admin_promo_create from './endpoints/admin/promo/create.js';
|
||||
import * as ep___admin_queue_clear from './endpoints/admin/queue/clear.js';
|
||||
import * as ep___admin_queue_deliverDelayed from './endpoints/admin/queue/deliver-delayed.js';
|
||||
import * as ep___admin_queue_inboxDelayed from './endpoints/admin/queue/inbox-delayed.js';
|
||||
import * as ep___admin_queue_promote from './endpoints/admin/queue/promote.js';
|
||||
import * as ep___admin_queue_stats from './endpoints/admin/queue/stats.js';
|
||||
import * as ep___admin_relays_add from './endpoints/admin/relays/add.js';
|
||||
import * as ep___admin_relays_list from './endpoints/admin/relays/list.js';
|
||||
import * as ep___admin_relays_remove from './endpoints/admin/relays/remove.js';
|
||||
import * as ep___admin_resetPassword from './endpoints/admin/reset-password.js';
|
||||
import * as ep___admin_resolveAbuseUserReport from './endpoints/admin/resolve-abuse-user-report.js';
|
||||
import * as ep___admin_forwardAbuseUserReport from './endpoints/admin/forward-abuse-user-report.js';
|
||||
import * as ep___admin_updateAbuseUserReport from './endpoints/admin/update-abuse-user-report.js';
|
||||
import * as ep___admin_sendEmail from './endpoints/admin/send-email.js';
|
||||
import * as ep___admin_serverInfo from './endpoints/admin/server-info.js';
|
||||
import * as ep___admin_showModerationLogs from './endpoints/admin/show-moderation-logs.js';
|
||||
import * as ep___admin_showUser from './endpoints/admin/show-user.js';
|
||||
import * as ep___admin_showUsers from './endpoints/admin/show-users.js';
|
||||
import * as ep___admin_suspendUser from './endpoints/admin/suspend-user.js';
|
||||
import * as ep___admin_unsuspendUser from './endpoints/admin/unsuspend-user.js';
|
||||
import * as ep___admin_updateMeta from './endpoints/admin/update-meta.js';
|
||||
import * as ep___admin_deleteAccount from './endpoints/admin/delete-account.js';
|
||||
import * as ep___admin_updateUserNote from './endpoints/admin/update-user-note.js';
|
||||
import * as ep___admin_roles_create from './endpoints/admin/roles/create.js';
|
||||
import * as ep___admin_roles_delete from './endpoints/admin/roles/delete.js';
|
||||
import * as ep___admin_roles_list from './endpoints/admin/roles/list.js';
|
||||
import * as ep___admin_roles_show from './endpoints/admin/roles/show.js';
|
||||
import * as ep___admin_roles_update from './endpoints/admin/roles/update.js';
|
||||
import * as ep___admin_roles_assign from './endpoints/admin/roles/assign.js';
|
||||
import * as ep___admin_roles_unassign from './endpoints/admin/roles/unassign.js';
|
||||
import * as ep___admin_roles_updateDefaultPolicies from './endpoints/admin/roles/update-default-policies.js';
|
||||
import * as ep___admin_roles_users from './endpoints/admin/roles/users.js';
|
||||
import * as ep___admin_systemWebhook_create from './endpoints/admin/system-webhook/create.js';
|
||||
import * as ep___admin_systemWebhook_delete from './endpoints/admin/system-webhook/delete.js';
|
||||
import * as ep___admin_systemWebhook_list from './endpoints/admin/system-webhook/list.js';
|
||||
import * as ep___admin_systemWebhook_show from './endpoints/admin/system-webhook/show.js';
|
||||
import * as ep___admin_systemWebhook_update from './endpoints/admin/system-webhook/update.js';
|
||||
import * as ep___admin_systemWebhook_test from './endpoints/admin/system-webhook/test.js';
|
||||
import * as ep___announcements from './endpoints/announcements.js';
|
||||
import * as ep___announcements_show from './endpoints/announcements/show.js';
|
||||
import * as ep___antennas_create from './endpoints/antennas/create.js';
|
||||
import * as ep___antennas_delete from './endpoints/antennas/delete.js';
|
||||
import * as ep___antennas_list from './endpoints/antennas/list.js';
|
||||
import * as ep___antennas_notes from './endpoints/antennas/notes.js';
|
||||
import * as ep___antennas_show from './endpoints/antennas/show.js';
|
||||
import * as ep___antennas_update from './endpoints/antennas/update.js';
|
||||
import * as ep___ap_get from './endpoints/ap/get.js';
|
||||
import * as ep___ap_show from './endpoints/ap/show.js';
|
||||
import * as ep___app_create from './endpoints/app/create.js';
|
||||
import * as ep___app_show from './endpoints/app/show.js';
|
||||
import * as ep___auth_accept from './endpoints/auth/accept.js';
|
||||
import * as ep___auth_session_generate from './endpoints/auth/session/generate.js';
|
||||
import * as ep___auth_session_show from './endpoints/auth/session/show.js';
|
||||
import * as ep___auth_session_userkey from './endpoints/auth/session/userkey.js';
|
||||
import * as ep___blocking_create from './endpoints/blocking/create.js';
|
||||
import * as ep___blocking_delete from './endpoints/blocking/delete.js';
|
||||
import * as ep___blocking_list from './endpoints/blocking/list.js';
|
||||
import * as ep___channels_create from './endpoints/channels/create.js';
|
||||
import * as ep___channels_featured from './endpoints/channels/featured.js';
|
||||
import * as ep___channels_follow from './endpoints/channels/follow.js';
|
||||
import * as ep___channels_followed from './endpoints/channels/followed.js';
|
||||
import * as ep___channels_owned from './endpoints/channels/owned.js';
|
||||
import * as ep___channels_show from './endpoints/channels/show.js';
|
||||
import * as ep___channels_timeline from './endpoints/channels/timeline.js';
|
||||
import * as ep___channels_unfollow from './endpoints/channels/unfollow.js';
|
||||
import * as ep___channels_update from './endpoints/channels/update.js';
|
||||
import * as ep___channels_favorite from './endpoints/channels/favorite.js';
|
||||
import * as ep___channels_unfavorite from './endpoints/channels/unfavorite.js';
|
||||
import * as ep___channels_myFavorites from './endpoints/channels/my-favorites.js';
|
||||
import * as ep___channels_search from './endpoints/channels/search.js';
|
||||
import * as ep___charts_activeUsers from './endpoints/charts/active-users.js';
|
||||
import * as ep___charts_apRequest from './endpoints/charts/ap-request.js';
|
||||
import * as ep___charts_drive from './endpoints/charts/drive.js';
|
||||
import * as ep___charts_federation from './endpoints/charts/federation.js';
|
||||
import * as ep___charts_instance from './endpoints/charts/instance.js';
|
||||
import * as ep___charts_notes from './endpoints/charts/notes.js';
|
||||
import * as ep___charts_user_drive from './endpoints/charts/user/drive.js';
|
||||
import * as ep___charts_user_following from './endpoints/charts/user/following.js';
|
||||
import * as ep___charts_user_notes from './endpoints/charts/user/notes.js';
|
||||
import * as ep___charts_user_pv from './endpoints/charts/user/pv.js';
|
||||
import * as ep___charts_user_reactions from './endpoints/charts/user/reactions.js';
|
||||
import * as ep___charts_users from './endpoints/charts/users.js';
|
||||
import * as ep___clips_addNote from './endpoints/clips/add-note.js';
|
||||
import * as ep___clips_removeNote from './endpoints/clips/remove-note.js';
|
||||
import * as ep___clips_create from './endpoints/clips/create.js';
|
||||
import * as ep___clips_delete from './endpoints/clips/delete.js';
|
||||
import * as ep___clips_list from './endpoints/clips/list.js';
|
||||
import * as ep___clips_notes from './endpoints/clips/notes.js';
|
||||
import * as ep___clips_show from './endpoints/clips/show.js';
|
||||
import * as ep___clips_update from './endpoints/clips/update.js';
|
||||
import * as ep___clips_favorite from './endpoints/clips/favorite.js';
|
||||
import * as ep___clips_unfavorite from './endpoints/clips/unfavorite.js';
|
||||
import * as ep___clips_myFavorites from './endpoints/clips/my-favorites.js';
|
||||
import * as ep___drive from './endpoints/drive.js';
|
||||
import * as ep___drive_files from './endpoints/drive/files.js';
|
||||
import * as ep___drive_files_attachedNotes from './endpoints/drive/files/attached-notes.js';
|
||||
import * as ep___drive_files_checkExistence from './endpoints/drive/files/check-existence.js';
|
||||
import * as ep___drive_files_create from './endpoints/drive/files/create.js';
|
||||
import * as ep___drive_files_delete from './endpoints/drive/files/delete.js';
|
||||
import * as ep___drive_files_findByHash from './endpoints/drive/files/find-by-hash.js';
|
||||
import * as ep___drive_files_find from './endpoints/drive/files/find.js';
|
||||
import * as ep___drive_files_show from './endpoints/drive/files/show.js';
|
||||
import * as ep___drive_files_update from './endpoints/drive/files/update.js';
|
||||
import * as ep___drive_files_uploadFromUrl from './endpoints/drive/files/upload-from-url.js';
|
||||
import * as ep___drive_folders from './endpoints/drive/folders.js';
|
||||
import * as ep___drive_folders_create from './endpoints/drive/folders/create.js';
|
||||
import * as ep___drive_folders_delete from './endpoints/drive/folders/delete.js';
|
||||
import * as ep___drive_folders_find from './endpoints/drive/folders/find.js';
|
||||
import * as ep___drive_folders_show from './endpoints/drive/folders/show.js';
|
||||
import * as ep___drive_folders_update from './endpoints/drive/folders/update.js';
|
||||
import * as ep___drive_stream from './endpoints/drive/stream.js';
|
||||
import * as ep___emailAddress_available from './endpoints/email-address/available.js';
|
||||
import * as ep___endpoint from './endpoints/endpoint.js';
|
||||
import * as ep___endpoints from './endpoints/endpoints.js';
|
||||
import * as ep___exportCustomEmojis from './endpoints/export-custom-emojis.js';
|
||||
import * as ep___federation_followers from './endpoints/federation/followers.js';
|
||||
import * as ep___federation_following from './endpoints/federation/following.js';
|
||||
import * as ep___federation_instances from './endpoints/federation/instances.js';
|
||||
import * as ep___federation_showInstance from './endpoints/federation/show-instance.js';
|
||||
import * as ep___federation_updateRemoteUser from './endpoints/federation/update-remote-user.js';
|
||||
import * as ep___federation_users from './endpoints/federation/users.js';
|
||||
import * as ep___federation_stats from './endpoints/federation/stats.js';
|
||||
import * as ep___following_create from './endpoints/following/create.js';
|
||||
import * as ep___following_delete from './endpoints/following/delete.js';
|
||||
import * as ep___following_update from './endpoints/following/update.js';
|
||||
import * as ep___following_update_all from './endpoints/following/update-all.js';
|
||||
import * as ep___following_invalidate from './endpoints/following/invalidate.js';
|
||||
import * as ep___following_requests_accept from './endpoints/following/requests/accept.js';
|
||||
import * as ep___following_requests_cancel from './endpoints/following/requests/cancel.js';
|
||||
import * as ep___following_requests_list from './endpoints/following/requests/list.js';
|
||||
import * as ep___following_requests_sent from './endpoints/following/requests/sent.js';
|
||||
import * as ep___following_requests_reject from './endpoints/following/requests/reject.js';
|
||||
import * as ep___gallery_featured from './endpoints/gallery/featured.js';
|
||||
import * as ep___gallery_popular from './endpoints/gallery/popular.js';
|
||||
import * as ep___gallery_posts from './endpoints/gallery/posts.js';
|
||||
import * as ep___gallery_posts_create from './endpoints/gallery/posts/create.js';
|
||||
import * as ep___gallery_posts_delete from './endpoints/gallery/posts/delete.js';
|
||||
import * as ep___gallery_posts_like from './endpoints/gallery/posts/like.js';
|
||||
import * as ep___gallery_posts_show from './endpoints/gallery/posts/show.js';
|
||||
import * as ep___gallery_posts_unlike from './endpoints/gallery/posts/unlike.js';
|
||||
import * as ep___gallery_posts_update from './endpoints/gallery/posts/update.js';
|
||||
import * as ep___getOnlineUsersCount from './endpoints/get-online-users-count.js';
|
||||
import * as ep___getAvatarDecorations from './endpoints/get-avatar-decorations.js';
|
||||
import * as ep___hashtags_list from './endpoints/hashtags/list.js';
|
||||
import * as ep___hashtags_search from './endpoints/hashtags/search.js';
|
||||
import * as ep___hashtags_show from './endpoints/hashtags/show.js';
|
||||
import * as ep___hashtags_trend from './endpoints/hashtags/trend.js';
|
||||
import * as ep___hashtags_users from './endpoints/hashtags/users.js';
|
||||
import * as ep___i from './endpoints/i.js';
|
||||
import * as ep___i_2fa_done from './endpoints/i/2fa/done.js';
|
||||
import * as ep___i_2fa_keyDone from './endpoints/i/2fa/key-done.js';
|
||||
import * as ep___i_2fa_passwordLess from './endpoints/i/2fa/password-less.js';
|
||||
import * as ep___i_2fa_registerKey from './endpoints/i/2fa/register-key.js';
|
||||
import * as ep___i_2fa_register from './endpoints/i/2fa/register.js';
|
||||
import * as ep___i_2fa_updateKey from './endpoints/i/2fa/update-key.js';
|
||||
import * as ep___i_2fa_removeKey from './endpoints/i/2fa/remove-key.js';
|
||||
import * as ep___i_2fa_unregister from './endpoints/i/2fa/unregister.js';
|
||||
import * as ep___i_apps from './endpoints/i/apps.js';
|
||||
import * as ep___i_authorizedApps from './endpoints/i/authorized-apps.js';
|
||||
import * as ep___i_claimAchievement from './endpoints/i/claim-achievement.js';
|
||||
import * as ep___i_changePassword from './endpoints/i/change-password.js';
|
||||
import * as ep___i_deleteAccount from './endpoints/i/delete-account.js';
|
||||
import * as ep___i_exportBlocking from './endpoints/i/export-blocking.js';
|
||||
import * as ep___i_exportFollowing from './endpoints/i/export-following.js';
|
||||
import * as ep___i_exportMute from './endpoints/i/export-mute.js';
|
||||
import * as ep___i_exportNotes from './endpoints/i/export-notes.js';
|
||||
import * as ep___i_exportClips from './endpoints/i/export-clips.js';
|
||||
import * as ep___i_exportFavorites from './endpoints/i/export-favorites.js';
|
||||
import * as ep___i_exportUserLists from './endpoints/i/export-user-lists.js';
|
||||
import * as ep___i_exportAntennas from './endpoints/i/export-antennas.js';
|
||||
import * as ep___i_favorites from './endpoints/i/favorites.js';
|
||||
import * as ep___i_gallery_likes from './endpoints/i/gallery/likes.js';
|
||||
import * as ep___i_gallery_posts from './endpoints/i/gallery/posts.js';
|
||||
import * as ep___i_importBlocking from './endpoints/i/import-blocking.js';
|
||||
import * as ep___i_importFollowing from './endpoints/i/import-following.js';
|
||||
import * as ep___i_importMuting from './endpoints/i/import-muting.js';
|
||||
import * as ep___i_importUserLists from './endpoints/i/import-user-lists.js';
|
||||
import * as ep___i_importAntennas from './endpoints/i/import-antennas.js';
|
||||
import * as ep___i_notifications from './endpoints/i/notifications.js';
|
||||
import * as ep___i_notificationsGrouped from './endpoints/i/notifications-grouped.js';
|
||||
import * as ep___i_pageLikes from './endpoints/i/page-likes.js';
|
||||
import * as ep___i_pages from './endpoints/i/pages.js';
|
||||
import * as ep___i_pin from './endpoints/i/pin.js';
|
||||
import * as ep___i_readAllUnreadNotes from './endpoints/i/read-all-unread-notes.js';
|
||||
import * as ep___i_readAnnouncement from './endpoints/i/read-announcement.js';
|
||||
import * as ep___i_regenerateToken from './endpoints/i/regenerate-token.js';
|
||||
import * as ep___i_registry_getAll from './endpoints/i/registry/get-all.js';
|
||||
import * as ep___i_registry_getDetail from './endpoints/i/registry/get-detail.js';
|
||||
import * as ep___i_registry_get from './endpoints/i/registry/get.js';
|
||||
import * as ep___i_registry_keysWithType from './endpoints/i/registry/keys-with-type.js';
|
||||
import * as ep___i_registry_keys from './endpoints/i/registry/keys.js';
|
||||
import * as ep___i_registry_remove from './endpoints/i/registry/remove.js';
|
||||
import * as ep___i_registry_scopesWithDomain from './endpoints/i/registry/scopes-with-domain.js';
|
||||
import * as ep___i_registry_set from './endpoints/i/registry/set.js';
|
||||
import * as ep___i_revokeToken from './endpoints/i/revoke-token.js';
|
||||
import * as ep___i_signinHistory from './endpoints/i/signin-history.js';
|
||||
import * as ep___i_unpin from './endpoints/i/unpin.js';
|
||||
import * as ep___i_updateEmail from './endpoints/i/update-email.js';
|
||||
import * as ep___i_update from './endpoints/i/update.js';
|
||||
import * as ep___i_move from './endpoints/i/move.js';
|
||||
import * as ep___i_webhooks_create from './endpoints/i/webhooks/create.js';
|
||||
import * as ep___i_webhooks_show from './endpoints/i/webhooks/show.js';
|
||||
import * as ep___i_webhooks_list from './endpoints/i/webhooks/list.js';
|
||||
import * as ep___i_webhooks_update from './endpoints/i/webhooks/update.js';
|
||||
import * as ep___i_webhooks_delete from './endpoints/i/webhooks/delete.js';
|
||||
import * as ep___i_webhooks_test from './endpoints/i/webhooks/test.js';
|
||||
import * as ep___invite_create from './endpoints/invite/create.js';
|
||||
import * as ep___invite_delete from './endpoints/invite/delete.js';
|
||||
import * as ep___invite_list from './endpoints/invite/list.js';
|
||||
import * as ep___invite_limit from './endpoints/invite/limit.js';
|
||||
import * as ep___meta from './endpoints/meta.js';
|
||||
import * as ep___emojis from './endpoints/emojis.js';
|
||||
import * as ep___emoji from './endpoints/emoji.js';
|
||||
import * as ep___miauth_genToken from './endpoints/miauth/gen-token.js';
|
||||
import * as ep___mute_create from './endpoints/mute/create.js';
|
||||
import * as ep___mute_delete from './endpoints/mute/delete.js';
|
||||
import * as ep___mute_list from './endpoints/mute/list.js';
|
||||
import * as ep___renoteMute_create from './endpoints/renote-mute/create.js';
|
||||
import * as ep___renoteMute_delete from './endpoints/renote-mute/delete.js';
|
||||
import * as ep___renoteMute_list from './endpoints/renote-mute/list.js';
|
||||
import * as ep___my_apps from './endpoints/my/apps.js';
|
||||
import * as ep___notes from './endpoints/notes.js';
|
||||
import * as ep___notes_children from './endpoints/notes/children.js';
|
||||
import * as ep___notes_clips from './endpoints/notes/clips.js';
|
||||
import * as ep___notes_conversation from './endpoints/notes/conversation.js';
|
||||
import * as ep___notes_create from './endpoints/notes/create.js';
|
||||
import * as ep___notes_delete from './endpoints/notes/delete.js';
|
||||
import * as ep___notes_favorites_create from './endpoints/notes/favorites/create.js';
|
||||
import * as ep___notes_favorites_delete from './endpoints/notes/favorites/delete.js';
|
||||
import * as ep___notes_featured from './endpoints/notes/featured.js';
|
||||
import * as ep___notes_globalTimeline from './endpoints/notes/global-timeline.js';
|
||||
import * as ep___notes_hybridTimeline from './endpoints/notes/hybrid-timeline.js';
|
||||
import * as ep___notes_localTimeline from './endpoints/notes/local-timeline.js';
|
||||
import * as ep___notes_mentions from './endpoints/notes/mentions.js';
|
||||
import * as ep___notes_polls_recommendation from './endpoints/notes/polls/recommendation.js';
|
||||
import * as ep___notes_polls_vote from './endpoints/notes/polls/vote.js';
|
||||
import * as ep___notes_reactions from './endpoints/notes/reactions.js';
|
||||
import * as ep___notes_reactions_create from './endpoints/notes/reactions/create.js';
|
||||
import * as ep___notes_reactions_delete from './endpoints/notes/reactions/delete.js';
|
||||
import * as ep___notes_renotes from './endpoints/notes/renotes.js';
|
||||
import * as ep___notes_replies from './endpoints/notes/replies.js';
|
||||
import * as ep___notes_searchByTag from './endpoints/notes/search-by-tag.js';
|
||||
import * as ep___notes_search from './endpoints/notes/search.js';
|
||||
import * as ep___notes_show from './endpoints/notes/show.js';
|
||||
import * as ep___notes_state from './endpoints/notes/state.js';
|
||||
import * as ep___notes_threadMuting_create from './endpoints/notes/thread-muting/create.js';
|
||||
import * as ep___notes_threadMuting_delete from './endpoints/notes/thread-muting/delete.js';
|
||||
import * as ep___notes_timeline from './endpoints/notes/timeline.js';
|
||||
import * as ep___notes_translate from './endpoints/notes/translate.js';
|
||||
import * as ep___notes_unrenote from './endpoints/notes/unrenote.js';
|
||||
import * as ep___notes_userListTimeline from './endpoints/notes/user-list-timeline.js';
|
||||
import * as ep___notifications_create from './endpoints/notifications/create.js';
|
||||
import * as ep___notifications_flush from './endpoints/notifications/flush.js';
|
||||
import * as ep___notifications_markAllAsRead from './endpoints/notifications/mark-all-as-read.js';
|
||||
import * as ep___notifications_testNotification from './endpoints/notifications/test-notification.js';
|
||||
import * as ep___pagePush from './endpoints/page-push.js';
|
||||
import * as ep___pages_create from './endpoints/pages/create.js';
|
||||
import * as ep___pages_delete from './endpoints/pages/delete.js';
|
||||
import * as ep___pages_featured from './endpoints/pages/featured.js';
|
||||
import * as ep___pages_like from './endpoints/pages/like.js';
|
||||
import * as ep___pages_show from './endpoints/pages/show.js';
|
||||
import * as ep___pages_unlike from './endpoints/pages/unlike.js';
|
||||
import * as ep___pages_update from './endpoints/pages/update.js';
|
||||
import * as ep___flash_create from './endpoints/flash/create.js';
|
||||
import * as ep___flash_delete from './endpoints/flash/delete.js';
|
||||
import * as ep___flash_featured from './endpoints/flash/featured.js';
|
||||
import * as ep___flash_like from './endpoints/flash/like.js';
|
||||
import * as ep___flash_show from './endpoints/flash/show.js';
|
||||
import * as ep___flash_unlike from './endpoints/flash/unlike.js';
|
||||
import * as ep___flash_update from './endpoints/flash/update.js';
|
||||
import * as ep___flash_my from './endpoints/flash/my.js';
|
||||
import * as ep___flash_myLikes from './endpoints/flash/my-likes.js';
|
||||
import * as ep___ping from './endpoints/ping.js';
|
||||
import * as ep___pinnedUsers from './endpoints/pinned-users.js';
|
||||
import * as ep___promo_read from './endpoints/promo/read.js';
|
||||
import * as ep___roles_list from './endpoints/roles/list.js';
|
||||
import * as ep___roles_show from './endpoints/roles/show.js';
|
||||
import * as ep___roles_users from './endpoints/roles/users.js';
|
||||
import * as ep___roles_notes from './endpoints/roles/notes.js';
|
||||
import * as ep___requestResetPassword from './endpoints/request-reset-password.js';
|
||||
import * as ep___resetDb from './endpoints/reset-db.js';
|
||||
import * as ep___resetPassword from './endpoints/reset-password.js';
|
||||
import * as ep___serverInfo from './endpoints/server-info.js';
|
||||
import * as ep___stats from './endpoints/stats.js';
|
||||
import * as ep___sw_show_registration from './endpoints/sw/show-registration.js';
|
||||
import * as ep___sw_update_registration from './endpoints/sw/update-registration.js';
|
||||
import * as ep___sw_register from './endpoints/sw/register.js';
|
||||
import * as ep___sw_unregister from './endpoints/sw/unregister.js';
|
||||
import * as ep___test from './endpoints/test.js';
|
||||
import * as ep___username_available from './endpoints/username/available.js';
|
||||
import * as ep___users from './endpoints/users.js';
|
||||
import * as ep___users_clips from './endpoints/users/clips.js';
|
||||
import * as ep___users_followers from './endpoints/users/followers.js';
|
||||
import * as ep___users_following from './endpoints/users/following.js';
|
||||
import * as ep___users_gallery_posts from './endpoints/users/gallery/posts.js';
|
||||
import * as ep___users_getFrequentlyRepliedUsers from './endpoints/users/get-frequently-replied-users.js';
|
||||
import * as ep___users_featuredNotes from './endpoints/users/featured-notes.js';
|
||||
import * as ep___users_lists_create from './endpoints/users/lists/create.js';
|
||||
import * as ep___users_lists_delete from './endpoints/users/lists/delete.js';
|
||||
import * as ep___users_lists_list from './endpoints/users/lists/list.js';
|
||||
import * as ep___users_lists_pull from './endpoints/users/lists/pull.js';
|
||||
import * as ep___users_lists_push from './endpoints/users/lists/push.js';
|
||||
import * as ep___users_lists_show from './endpoints/users/lists/show.js';
|
||||
import * as ep___users_lists_favorite from './endpoints/users/lists/favorite.js';
|
||||
import * as ep___users_lists_unfavorite from './endpoints/users/lists/unfavorite.js';
|
||||
import * as ep___users_lists_createFromPublic from './endpoints/users/lists/create-from-public.js';
|
||||
import * as ep___users_lists_update from './endpoints/users/lists/update.js';
|
||||
import * as ep___users_lists_updateMembership from './endpoints/users/lists/update-membership.js';
|
||||
import * as ep___users_lists_getMemberships from './endpoints/users/lists/get-memberships.js';
|
||||
import * as ep___users_notes from './endpoints/users/notes.js';
|
||||
import * as ep___users_pages from './endpoints/users/pages.js';
|
||||
import * as ep___users_flashs from './endpoints/users/flashs.js';
|
||||
import * as ep___users_reactions from './endpoints/users/reactions.js';
|
||||
import * as ep___users_recommendation from './endpoints/users/recommendation.js';
|
||||
import * as ep___users_relation from './endpoints/users/relation.js';
|
||||
import * as ep___users_reportAbuse from './endpoints/users/report-abuse.js';
|
||||
import * as ep___users_searchByUsernameAndHost from './endpoints/users/search-by-username-and-host.js';
|
||||
import * as ep___users_search from './endpoints/users/search.js';
|
||||
import * as ep___users_show from './endpoints/users/show.js';
|
||||
import * as ep___users_achievements from './endpoints/users/achievements.js';
|
||||
import * as ep___users_updateMemo from './endpoints/users/update-memo.js';
|
||||
import * as ep___fetchRss from './endpoints/fetch-rss.js';
|
||||
import * as ep___fetchExternalResources from './endpoints/fetch-external-resources.js';
|
||||
import * as ep___retention from './endpoints/retention.js';
|
||||
import * as ep___bubbleGame_register from './endpoints/bubble-game/register.js';
|
||||
import * as ep___bubbleGame_ranking from './endpoints/bubble-game/ranking.js';
|
||||
import * as ep___reversi_cancelMatch from './endpoints/reversi/cancel-match.js';
|
||||
import * as ep___reversi_games from './endpoints/reversi/games.js';
|
||||
import * as ep___reversi_match from './endpoints/reversi/match.js';
|
||||
import * as ep___reversi_invitations from './endpoints/reversi/invitations.js';
|
||||
import * as ep___reversi_showGame from './endpoints/reversi/show-game.js';
|
||||
import * as ep___reversi_surrender from './endpoints/reversi/surrender.js';
|
||||
import * as ep___reversi_verify from './endpoints/reversi/verify.js';
|
||||
|
||||
const eps = [
|
||||
['admin/meta', ep___admin_meta],
|
||||
['admin/abuse-user-reports', ep___admin_abuseUserReports],
|
||||
['admin/abuse-report/notification-recipient/list', ep___admin_abuseReport_notificationRecipient_list],
|
||||
['admin/abuse-report/notification-recipient/show', ep___admin_abuseReport_notificationRecipient_show],
|
||||
['admin/abuse-report/notification-recipient/create', ep___admin_abuseReport_notificationRecipient_create],
|
||||
['admin/abuse-report/notification-recipient/update', ep___admin_abuseReport_notificationRecipient_update],
|
||||
['admin/abuse-report/notification-recipient/delete', ep___admin_abuseReport_notificationRecipient_delete],
|
||||
['admin/accounts/create', ep___admin_accounts_create],
|
||||
['admin/accounts/delete', ep___admin_accounts_delete],
|
||||
['admin/accounts/find-by-email', ep___admin_accounts_findByEmail],
|
||||
['admin/ad/create', ep___admin_ad_create],
|
||||
['admin/ad/delete', ep___admin_ad_delete],
|
||||
['admin/ad/list', ep___admin_ad_list],
|
||||
['admin/ad/update', ep___admin_ad_update],
|
||||
['admin/announcements/create', ep___admin_announcements_create],
|
||||
['admin/announcements/delete', ep___admin_announcements_delete],
|
||||
['admin/announcements/list', ep___admin_announcements_list],
|
||||
['admin/announcements/update', ep___admin_announcements_update],
|
||||
['admin/avatar-decorations/create', ep___admin_avatarDecorations_create],
|
||||
['admin/avatar-decorations/delete', ep___admin_avatarDecorations_delete],
|
||||
['admin/avatar-decorations/list', ep___admin_avatarDecorations_list],
|
||||
['admin/avatar-decorations/update', ep___admin_avatarDecorations_update],
|
||||
['admin/captcha/current', ep___admin_captcha_current],
|
||||
['admin/captcha/save', ep___admin_captcha_save],
|
||||
['admin/delete-all-files-of-a-user', ep___admin_deleteAllFilesOfAUser],
|
||||
['admin/unset-user-avatar', ep___admin_unsetUserAvatar],
|
||||
['admin/unset-user-banner', ep___admin_unsetUserBanner],
|
||||
['admin/drive/clean-remote-files', ep___admin_drive_cleanRemoteFiles],
|
||||
['admin/drive/cleanup', ep___admin_drive_cleanup],
|
||||
['admin/drive/files', ep___admin_drive_files],
|
||||
['admin/drive/show-file', ep___admin_drive_showFile],
|
||||
['admin/emoji/add-aliases-bulk', ep___admin_emoji_addAliasesBulk],
|
||||
['admin/emoji/add', ep___admin_emoji_add],
|
||||
['admin/emoji/copy', ep___admin_emoji_copy],
|
||||
['admin/emoji/delete-bulk', ep___admin_emoji_deleteBulk],
|
||||
['admin/emoji/delete', ep___admin_emoji_delete],
|
||||
['admin/emoji/import-zip', ep___admin_emoji_importZip],
|
||||
['admin/emoji/list-remote', ep___admin_emoji_listRemote],
|
||||
['admin/emoji/list', ep___admin_emoji_list],
|
||||
['admin/emoji/remove-aliases-bulk', ep___admin_emoji_removeAliasesBulk],
|
||||
['admin/emoji/set-aliases-bulk', ep___admin_emoji_setAliasesBulk],
|
||||
['admin/emoji/set-category-bulk', ep___admin_emoji_setCategoryBulk],
|
||||
['admin/emoji/set-license-bulk', ep___admin_emoji_setLicenseBulk],
|
||||
['admin/emoji/update', ep___admin_emoji_update],
|
||||
['admin/federation/delete-all-files', ep___admin_federation_deleteAllFiles],
|
||||
['admin/federation/refresh-remote-instance-metadata', ep___admin_federation_refreshRemoteInstanceMetadata],
|
||||
['admin/federation/remove-all-following', ep___admin_federation_removeAllFollowing],
|
||||
['admin/federation/update-instance', ep___admin_federation_updateInstance],
|
||||
['admin/get-index-stats', ep___admin_getIndexStats],
|
||||
['admin/get-table-stats', ep___admin_getTableStats],
|
||||
['admin/get-user-ips', ep___admin_getUserIps],
|
||||
['admin/invite/create', ep___admin_invite_create],
|
||||
['admin/invite/list', ep___admin_invite_list],
|
||||
['admin/promo/create', ep___admin_promo_create],
|
||||
['admin/queue/clear', ep___admin_queue_clear],
|
||||
['admin/queue/deliver-delayed', ep___admin_queue_deliverDelayed],
|
||||
['admin/queue/inbox-delayed', ep___admin_queue_inboxDelayed],
|
||||
['admin/queue/promote', ep___admin_queue_promote],
|
||||
['admin/queue/stats', ep___admin_queue_stats],
|
||||
['admin/relays/add', ep___admin_relays_add],
|
||||
['admin/relays/list', ep___admin_relays_list],
|
||||
['admin/relays/remove', ep___admin_relays_remove],
|
||||
['admin/reset-password', ep___admin_resetPassword],
|
||||
['admin/resolve-abuse-user-report', ep___admin_resolveAbuseUserReport],
|
||||
['admin/forward-abuse-user-report', ep___admin_forwardAbuseUserReport],
|
||||
['admin/update-abuse-user-report', ep___admin_updateAbuseUserReport],
|
||||
['admin/send-email', ep___admin_sendEmail],
|
||||
['admin/server-info', ep___admin_serverInfo],
|
||||
['admin/show-moderation-logs', ep___admin_showModerationLogs],
|
||||
['admin/show-user', ep___admin_showUser],
|
||||
['admin/show-users', ep___admin_showUsers],
|
||||
['admin/suspend-user', ep___admin_suspendUser],
|
||||
['admin/unsuspend-user', ep___admin_unsuspendUser],
|
||||
['admin/update-meta', ep___admin_updateMeta],
|
||||
['admin/delete-account', ep___admin_deleteAccount],
|
||||
['admin/update-user-note', ep___admin_updateUserNote],
|
||||
['admin/roles/create', ep___admin_roles_create],
|
||||
['admin/roles/delete', ep___admin_roles_delete],
|
||||
['admin/roles/list', ep___admin_roles_list],
|
||||
['admin/roles/show', ep___admin_roles_show],
|
||||
['admin/roles/update', ep___admin_roles_update],
|
||||
['admin/roles/assign', ep___admin_roles_assign],
|
||||
['admin/roles/unassign', ep___admin_roles_unassign],
|
||||
['admin/roles/update-default-policies', ep___admin_roles_updateDefaultPolicies],
|
||||
['admin/roles/users', ep___admin_roles_users],
|
||||
['admin/system-webhook/create', ep___admin_systemWebhook_create],
|
||||
['admin/system-webhook/delete', ep___admin_systemWebhook_delete],
|
||||
['admin/system-webhook/list', ep___admin_systemWebhook_list],
|
||||
['admin/system-webhook/show', ep___admin_systemWebhook_show],
|
||||
['admin/system-webhook/update', ep___admin_systemWebhook_update],
|
||||
['admin/system-webhook/test', ep___admin_systemWebhook_test],
|
||||
['announcements', ep___announcements],
|
||||
['announcements/show', ep___announcements_show],
|
||||
['antennas/create', ep___antennas_create],
|
||||
['antennas/delete', ep___antennas_delete],
|
||||
['antennas/list', ep___antennas_list],
|
||||
['antennas/notes', ep___antennas_notes],
|
||||
['antennas/show', ep___antennas_show],
|
||||
['antennas/update', ep___antennas_update],
|
||||
['ap/get', ep___ap_get],
|
||||
['ap/show', ep___ap_show],
|
||||
['app/create', ep___app_create],
|
||||
['app/show', ep___app_show],
|
||||
['auth/accept', ep___auth_accept],
|
||||
['auth/session/generate', ep___auth_session_generate],
|
||||
['auth/session/show', ep___auth_session_show],
|
||||
['auth/session/userkey', ep___auth_session_userkey],
|
||||
['blocking/create', ep___blocking_create],
|
||||
['blocking/delete', ep___blocking_delete],
|
||||
['blocking/list', ep___blocking_list],
|
||||
['channels/create', ep___channels_create],
|
||||
['channels/featured', ep___channels_featured],
|
||||
['channels/follow', ep___channels_follow],
|
||||
['channels/followed', ep___channels_followed],
|
||||
['channels/owned', ep___channels_owned],
|
||||
['channels/show', ep___channels_show],
|
||||
['channels/timeline', ep___channels_timeline],
|
||||
['channels/unfollow', ep___channels_unfollow],
|
||||
['channels/update', ep___channels_update],
|
||||
['channels/favorite', ep___channels_favorite],
|
||||
['channels/unfavorite', ep___channels_unfavorite],
|
||||
['channels/my-favorites', ep___channels_myFavorites],
|
||||
['channels/search', ep___channels_search],
|
||||
['charts/active-users', ep___charts_activeUsers],
|
||||
['charts/ap-request', ep___charts_apRequest],
|
||||
['charts/drive', ep___charts_drive],
|
||||
['charts/federation', ep___charts_federation],
|
||||
['charts/instance', ep___charts_instance],
|
||||
['charts/notes', ep___charts_notes],
|
||||
['charts/user/drive', ep___charts_user_drive],
|
||||
['charts/user/following', ep___charts_user_following],
|
||||
['charts/user/notes', ep___charts_user_notes],
|
||||
['charts/user/pv', ep___charts_user_pv],
|
||||
['charts/user/reactions', ep___charts_user_reactions],
|
||||
['charts/users', ep___charts_users],
|
||||
['clips/add-note', ep___clips_addNote],
|
||||
['clips/remove-note', ep___clips_removeNote],
|
||||
['clips/create', ep___clips_create],
|
||||
['clips/delete', ep___clips_delete],
|
||||
['clips/list', ep___clips_list],
|
||||
['clips/notes', ep___clips_notes],
|
||||
['clips/show', ep___clips_show],
|
||||
['clips/update', ep___clips_update],
|
||||
['clips/favorite', ep___clips_favorite],
|
||||
['clips/unfavorite', ep___clips_unfavorite],
|
||||
['clips/my-favorites', ep___clips_myFavorites],
|
||||
['drive', ep___drive],
|
||||
['drive/files', ep___drive_files],
|
||||
['drive/files/attached-notes', ep___drive_files_attachedNotes],
|
||||
['drive/files/check-existence', ep___drive_files_checkExistence],
|
||||
['drive/files/create', ep___drive_files_create],
|
||||
['drive/files/delete', ep___drive_files_delete],
|
||||
['drive/files/find-by-hash', ep___drive_files_findByHash],
|
||||
['drive/files/find', ep___drive_files_find],
|
||||
['drive/files/show', ep___drive_files_show],
|
||||
['drive/files/update', ep___drive_files_update],
|
||||
['drive/files/upload-from-url', ep___drive_files_uploadFromUrl],
|
||||
['drive/folders', ep___drive_folders],
|
||||
['drive/folders/create', ep___drive_folders_create],
|
||||
['drive/folders/delete', ep___drive_folders_delete],
|
||||
['drive/folders/find', ep___drive_folders_find],
|
||||
['drive/folders/show', ep___drive_folders_show],
|
||||
['drive/folders/update', ep___drive_folders_update],
|
||||
['drive/stream', ep___drive_stream],
|
||||
['email-address/available', ep___emailAddress_available],
|
||||
['endpoint', ep___endpoint],
|
||||
['endpoints', ep___endpoints],
|
||||
['export-custom-emojis', ep___exportCustomEmojis],
|
||||
['federation/followers', ep___federation_followers],
|
||||
['federation/following', ep___federation_following],
|
||||
['federation/instances', ep___federation_instances],
|
||||
['federation/show-instance', ep___federation_showInstance],
|
||||
['federation/update-remote-user', ep___federation_updateRemoteUser],
|
||||
['federation/users', ep___federation_users],
|
||||
['federation/stats', ep___federation_stats],
|
||||
['following/create', ep___following_create],
|
||||
['following/delete', ep___following_delete],
|
||||
['following/update', ep___following_update],
|
||||
['following/update-all', ep___following_update_all],
|
||||
['following/invalidate', ep___following_invalidate],
|
||||
['following/requests/accept', ep___following_requests_accept],
|
||||
['following/requests/cancel', ep___following_requests_cancel],
|
||||
['following/requests/list', ep___following_requests_list],
|
||||
['following/requests/sent', ep___following_requests_sent],
|
||||
['following/requests/reject', ep___following_requests_reject],
|
||||
['gallery/featured', ep___gallery_featured],
|
||||
['gallery/popular', ep___gallery_popular],
|
||||
['gallery/posts', ep___gallery_posts],
|
||||
['gallery/posts/create', ep___gallery_posts_create],
|
||||
['gallery/posts/delete', ep___gallery_posts_delete],
|
||||
['gallery/posts/like', ep___gallery_posts_like],
|
||||
['gallery/posts/show', ep___gallery_posts_show],
|
||||
['gallery/posts/unlike', ep___gallery_posts_unlike],
|
||||
['gallery/posts/update', ep___gallery_posts_update],
|
||||
['get-online-users-count', ep___getOnlineUsersCount],
|
||||
['get-avatar-decorations', ep___getAvatarDecorations],
|
||||
['hashtags/list', ep___hashtags_list],
|
||||
['hashtags/search', ep___hashtags_search],
|
||||
['hashtags/show', ep___hashtags_show],
|
||||
['hashtags/trend', ep___hashtags_trend],
|
||||
['hashtags/users', ep___hashtags_users],
|
||||
['i', ep___i],
|
||||
['i/2fa/done', ep___i_2fa_done],
|
||||
['i/2fa/key-done', ep___i_2fa_keyDone],
|
||||
['i/2fa/password-less', ep___i_2fa_passwordLess],
|
||||
['i/2fa/register-key', ep___i_2fa_registerKey],
|
||||
['i/2fa/register', ep___i_2fa_register],
|
||||
['i/2fa/update-key', ep___i_2fa_updateKey],
|
||||
['i/2fa/remove-key', ep___i_2fa_removeKey],
|
||||
['i/2fa/unregister', ep___i_2fa_unregister],
|
||||
['i/apps', ep___i_apps],
|
||||
['i/authorized-apps', ep___i_authorizedApps],
|
||||
['i/claim-achievement', ep___i_claimAchievement],
|
||||
['i/change-password', ep___i_changePassword],
|
||||
['i/delete-account', ep___i_deleteAccount],
|
||||
['i/export-blocking', ep___i_exportBlocking],
|
||||
['i/export-following', ep___i_exportFollowing],
|
||||
['i/export-mute', ep___i_exportMute],
|
||||
['i/export-notes', ep___i_exportNotes],
|
||||
['i/export-clips', ep___i_exportClips],
|
||||
['i/export-favorites', ep___i_exportFavorites],
|
||||
['i/export-user-lists', ep___i_exportUserLists],
|
||||
['i/export-antennas', ep___i_exportAntennas],
|
||||
['i/favorites', ep___i_favorites],
|
||||
['i/gallery/likes', ep___i_gallery_likes],
|
||||
['i/gallery/posts', ep___i_gallery_posts],
|
||||
['i/import-blocking', ep___i_importBlocking],
|
||||
['i/import-following', ep___i_importFollowing],
|
||||
['i/import-muting', ep___i_importMuting],
|
||||
['i/import-user-lists', ep___i_importUserLists],
|
||||
['i/import-antennas', ep___i_importAntennas],
|
||||
['i/notifications', ep___i_notifications],
|
||||
['i/notifications-grouped', ep___i_notificationsGrouped],
|
||||
['i/page-likes', ep___i_pageLikes],
|
||||
['i/pages', ep___i_pages],
|
||||
['i/pin', ep___i_pin],
|
||||
['i/read-all-unread-notes', ep___i_readAllUnreadNotes],
|
||||
['i/read-announcement', ep___i_readAnnouncement],
|
||||
['i/regenerate-token', ep___i_regenerateToken],
|
||||
['i/registry/get-all', ep___i_registry_getAll],
|
||||
['i/registry/get-detail', ep___i_registry_getDetail],
|
||||
['i/registry/get', ep___i_registry_get],
|
||||
['i/registry/keys-with-type', ep___i_registry_keysWithType],
|
||||
['i/registry/keys', ep___i_registry_keys],
|
||||
['i/registry/remove', ep___i_registry_remove],
|
||||
['i/registry/scopes-with-domain', ep___i_registry_scopesWithDomain],
|
||||
['i/registry/set', ep___i_registry_set],
|
||||
['i/revoke-token', ep___i_revokeToken],
|
||||
['i/signin-history', ep___i_signinHistory],
|
||||
['i/unpin', ep___i_unpin],
|
||||
['i/update-email', ep___i_updateEmail],
|
||||
['i/update', ep___i_update],
|
||||
['i/move', ep___i_move],
|
||||
['i/webhooks/create', ep___i_webhooks_create],
|
||||
['i/webhooks/list', ep___i_webhooks_list],
|
||||
['i/webhooks/show', ep___i_webhooks_show],
|
||||
['i/webhooks/update', ep___i_webhooks_update],
|
||||
['i/webhooks/delete', ep___i_webhooks_delete],
|
||||
['i/webhooks/test', ep___i_webhooks_test],
|
||||
['invite/create', ep___invite_create],
|
||||
['invite/delete', ep___invite_delete],
|
||||
['invite/list', ep___invite_list],
|
||||
['invite/limit', ep___invite_limit],
|
||||
['meta', ep___meta],
|
||||
['emojis', ep___emojis],
|
||||
['emoji', ep___emoji],
|
||||
['miauth/gen-token', ep___miauth_genToken],
|
||||
['mute/create', ep___mute_create],
|
||||
['mute/delete', ep___mute_delete],
|
||||
['mute/list', ep___mute_list],
|
||||
['renote-mute/create', ep___renoteMute_create],
|
||||
['renote-mute/delete', ep___renoteMute_delete],
|
||||
['renote-mute/list', ep___renoteMute_list],
|
||||
['my/apps', ep___my_apps],
|
||||
['notes', ep___notes],
|
||||
['notes/children', ep___notes_children],
|
||||
['notes/clips', ep___notes_clips],
|
||||
['notes/conversation', ep___notes_conversation],
|
||||
['notes/create', ep___notes_create],
|
||||
['notes/delete', ep___notes_delete],
|
||||
['notes/favorites/create', ep___notes_favorites_create],
|
||||
['notes/favorites/delete', ep___notes_favorites_delete],
|
||||
['notes/featured', ep___notes_featured],
|
||||
['notes/global-timeline', ep___notes_globalTimeline],
|
||||
['notes/hybrid-timeline', ep___notes_hybridTimeline],
|
||||
['notes/local-timeline', ep___notes_localTimeline],
|
||||
['notes/mentions', ep___notes_mentions],
|
||||
['notes/polls/recommendation', ep___notes_polls_recommendation],
|
||||
['notes/polls/vote', ep___notes_polls_vote],
|
||||
['notes/reactions', ep___notes_reactions],
|
||||
['notes/reactions/create', ep___notes_reactions_create],
|
||||
['notes/reactions/delete', ep___notes_reactions_delete],
|
||||
['notes/renotes', ep___notes_renotes],
|
||||
['notes/replies', ep___notes_replies],
|
||||
['notes/search-by-tag', ep___notes_searchByTag],
|
||||
['notes/search', ep___notes_search],
|
||||
['notes/show', ep___notes_show],
|
||||
['notes/state', ep___notes_state],
|
||||
['notes/thread-muting/create', ep___notes_threadMuting_create],
|
||||
['notes/thread-muting/delete', ep___notes_threadMuting_delete],
|
||||
['notes/timeline', ep___notes_timeline],
|
||||
['notes/translate', ep___notes_translate],
|
||||
['notes/unrenote', ep___notes_unrenote],
|
||||
['notes/user-list-timeline', ep___notes_userListTimeline],
|
||||
['notifications/create', ep___notifications_create],
|
||||
['notifications/flush', ep___notifications_flush],
|
||||
['notifications/mark-all-as-read', ep___notifications_markAllAsRead],
|
||||
['notifications/test-notification', ep___notifications_testNotification],
|
||||
['page-push', ep___pagePush],
|
||||
['pages/create', ep___pages_create],
|
||||
['pages/delete', ep___pages_delete],
|
||||
['pages/featured', ep___pages_featured],
|
||||
['pages/like', ep___pages_like],
|
||||
['pages/show', ep___pages_show],
|
||||
['pages/unlike', ep___pages_unlike],
|
||||
['pages/update', ep___pages_update],
|
||||
['flash/create', ep___flash_create],
|
||||
['flash/delete', ep___flash_delete],
|
||||
['flash/featured', ep___flash_featured],
|
||||
['flash/like', ep___flash_like],
|
||||
['flash/show', ep___flash_show],
|
||||
['flash/unlike', ep___flash_unlike],
|
||||
['flash/update', ep___flash_update],
|
||||
['flash/my', ep___flash_my],
|
||||
['flash/my-likes', ep___flash_myLikes],
|
||||
['ping', ep___ping],
|
||||
['pinned-users', ep___pinnedUsers],
|
||||
['promo/read', ep___promo_read],
|
||||
['roles/list', ep___roles_list],
|
||||
['roles/show', ep___roles_show],
|
||||
['roles/users', ep___roles_users],
|
||||
['roles/notes', ep___roles_notes],
|
||||
['request-reset-password', ep___requestResetPassword],
|
||||
['reset-db', ep___resetDb],
|
||||
['reset-password', ep___resetPassword],
|
||||
['server-info', ep___serverInfo],
|
||||
['stats', ep___stats],
|
||||
['sw/show-registration', ep___sw_show_registration],
|
||||
['sw/update-registration', ep___sw_update_registration],
|
||||
['sw/register', ep___sw_register],
|
||||
['sw/unregister', ep___sw_unregister],
|
||||
['test', ep___test],
|
||||
['username/available', ep___username_available],
|
||||
['users', ep___users],
|
||||
['users/clips', ep___users_clips],
|
||||
['users/followers', ep___users_followers],
|
||||
['users/following', ep___users_following],
|
||||
['users/gallery/posts', ep___users_gallery_posts],
|
||||
['users/get-frequently-replied-users', ep___users_getFrequentlyRepliedUsers],
|
||||
['users/featured-notes', ep___users_featuredNotes],
|
||||
['users/lists/create', ep___users_lists_create],
|
||||
['users/lists/delete', ep___users_lists_delete],
|
||||
['users/lists/list', ep___users_lists_list],
|
||||
['users/lists/pull', ep___users_lists_pull],
|
||||
['users/lists/push', ep___users_lists_push],
|
||||
['users/lists/show', ep___users_lists_show],
|
||||
['users/lists/favorite', ep___users_lists_favorite],
|
||||
['users/lists/unfavorite', ep___users_lists_unfavorite],
|
||||
['users/lists/update', ep___users_lists_update],
|
||||
['users/lists/create-from-public', ep___users_lists_createFromPublic],
|
||||
['users/lists/update-membership', ep___users_lists_updateMembership],
|
||||
['users/lists/get-memberships', ep___users_lists_getMemberships],
|
||||
['users/notes', ep___users_notes],
|
||||
['users/pages', ep___users_pages],
|
||||
['users/flashs', ep___users_flashs],
|
||||
['users/reactions', ep___users_reactions],
|
||||
['users/recommendation', ep___users_recommendation],
|
||||
['users/relation', ep___users_relation],
|
||||
['users/report-abuse', ep___users_reportAbuse],
|
||||
['users/search-by-username-and-host', ep___users_searchByUsernameAndHost],
|
||||
['users/search', ep___users_search],
|
||||
['users/show', ep___users_show],
|
||||
['users/achievements', ep___users_achievements],
|
||||
['users/update-memo', ep___users_updateMemo],
|
||||
['fetch-rss', ep___fetchRss],
|
||||
['fetch-external-resources', ep___fetchExternalResources],
|
||||
['retention', ep___retention],
|
||||
['bubble-game/register', ep___bubbleGame_register],
|
||||
['bubble-game/ranking', ep___bubbleGame_ranking],
|
||||
['reversi/cancel-match', ep___reversi_cancelMatch],
|
||||
['reversi/games', ep___reversi_games],
|
||||
['reversi/match', ep___reversi_match],
|
||||
['reversi/invitations', ep___reversi_invitations],
|
||||
['reversi/show-game', ep___reversi_showGame],
|
||||
['reversi/surrender', ep___reversi_surrender],
|
||||
['reversi/verify', ep___reversi_verify],
|
||||
];
|
||||
import * as endpointsObject from './endpoint-list.js';
|
||||
|
||||
interface IEndpointMetaBase {
|
||||
readonly stability?: 'deprecated' | 'experimental' | 'stable';
|
||||
|
@ -910,7 +130,7 @@ export interface IEndpoint {
|
|||
params: Schema;
|
||||
}
|
||||
|
||||
const endpoints: IEndpoint[] = (eps as [string, any]).map(([name, ep]) => {
|
||||
const endpoints: IEndpoint[] = Object.entries(endpointsObject).map(([name, ep]) => {
|
||||
return {
|
||||
name: name,
|
||||
get meta() {
|
||||
|
|
|
@ -9,6 +9,7 @@ import type { DriveFilesRepository } from '@/models/_.js';
|
|||
import { DI } from '@/di-symbols.js';
|
||||
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
import { EmojiEntityService } from '@/core/entities/EmojiEntityService.js';
|
||||
import { FILE_TYPE_IMAGE } from '@/const.js';
|
||||
import { ApiError } from '../../../error.js';
|
||||
|
||||
export const meta = {
|
||||
|
@ -24,6 +25,11 @@ export const meta = {
|
|||
code: 'NO_SUCH_FILE',
|
||||
id: 'fc46b5a4-6b92-4c33-ac66-b806659bb5cf',
|
||||
},
|
||||
unsupportedFileType: {
|
||||
message: 'Unsupported file type.',
|
||||
code: 'UNSUPPORTED_FILE_TYPE',
|
||||
id: 'f7599d96-8750-af68-1633-9575d625c1a7',
|
||||
},
|
||||
duplicateName: {
|
||||
message: 'Duplicate name.',
|
||||
code: 'DUPLICATE_NAME',
|
||||
|
@ -47,15 +53,21 @@ export const paramDef = {
|
|||
nullable: true,
|
||||
description: 'Use `null` to reset the category.',
|
||||
},
|
||||
aliases: { type: 'array', items: {
|
||||
type: 'string',
|
||||
} },
|
||||
aliases: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
license: { type: 'string', nullable: true },
|
||||
isSensitive: { type: 'boolean' },
|
||||
localOnly: { type: 'boolean' },
|
||||
roleIdsThatCanBeUsedThisEmojiAsReaction: { type: 'array', items: {
|
||||
type: 'string',
|
||||
} },
|
||||
roleIdsThatCanBeUsedThisEmojiAsReaction: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
},
|
||||
required: ['name', 'fileId'],
|
||||
} as const;
|
||||
|
@ -67,9 +79,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
constructor(
|
||||
@Inject(DI.driveFilesRepository)
|
||||
private driveFilesRepository: DriveFilesRepository,
|
||||
|
||||
private customEmojiService: CustomEmojiService,
|
||||
|
||||
private emojiEntityService: EmojiEntityService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
|
@ -77,9 +87,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
if (driveFile == null) throw new ApiError(meta.errors.noSuchFile);
|
||||
const isDuplicate = await this.customEmojiService.checkDuplicate(ps.name);
|
||||
if (isDuplicate) throw new ApiError(meta.errors.duplicateName);
|
||||
if (!FILE_TYPE_IMAGE.includes(driveFile.type)) throw new ApiError(meta.errors.unsupportedFileType);
|
||||
|
||||
const emoji = await this.customEmojiService.add({
|
||||
driveFile,
|
||||
originalUrl: driveFile.url,
|
||||
publicUrl: driveFile.webpublicUrl ?? driveFile.url,
|
||||
fileType: driveFile.webpublicType ?? driveFile.type,
|
||||
name: ps.name,
|
||||
category: ps.category ?? null,
|
||||
aliases: ps.aliases ?? [],
|
||||
|
|
|
@ -86,7 +86,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
if (isDuplicate) throw new ApiError(meta.errors.duplicateName);
|
||||
|
||||
const addedEmoji = await this.customEmojiService.add({
|
||||
driveFile,
|
||||
originalUrl: driveFile.url,
|
||||
publicUrl: driveFile.webpublicUrl ?? driveFile.url,
|
||||
fileType: driveFile.webpublicType ?? driveFile.type,
|
||||
name: emoji.name,
|
||||
category: emoji.category,
|
||||
aliases: emoji.aliases,
|
||||
|
|
|
@ -79,13 +79,15 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
}
|
||||
|
||||
// JSON schemeのanyOfの型変換がうまくいっていないらしい
|
||||
const required = { id: ps.id, name: ps.name } as
|
||||
const required = { id: ps.id, name: ps.name } as
|
||||
| { id: MiEmoji['id']; name?: string }
|
||||
| { id?: MiEmoji['id']; name: string };
|
||||
|
||||
const error = await this.customEmojiService.update({
|
||||
...required,
|
||||
driveFile,
|
||||
originalUrl: driveFile != null ? driveFile.url : undefined,
|
||||
publicUrl: driveFile != null ? (driveFile.webpublicUrl ?? driveFile.url) : undefined,
|
||||
fileType: driveFile != null ? (driveFile.webpublicType ?? driveFile.type) : undefined,
|
||||
category: ps.category,
|
||||
aliases: ps.aliases,
|
||||
license: ps.license,
|
||||
|
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||
import { EmojiEntityService } from '@/core/entities/EmojiEntityService.js';
|
||||
import { CustomEmojiService, fetchEmojisHostTypes, fetchEmojisSortKeys } from '@/core/CustomEmojiService.js';
|
||||
|
||||
export const meta = {
|
||||
tags: ['admin'],
|
||||
|
||||
requireCredential: true,
|
||||
requireRolePolicy: 'canManageCustomEmojis',
|
||||
kind: 'read:admin:emoji',
|
||||
|
||||
res: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
emojis: {
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'object',
|
||||
ref: 'EmojiDetailedAdmin',
|
||||
},
|
||||
},
|
||||
count: { type: 'integer' },
|
||||
allCount: { type: 'integer' },
|
||||
allPages: { type: 'integer' },
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
query: {
|
||||
type: 'object',
|
||||
nullable: true,
|
||||
properties: {
|
||||
updatedAtFrom: { type: 'string' },
|
||||
updatedAtTo: { type: 'string' },
|
||||
name: { type: 'string' },
|
||||
host: { type: 'string' },
|
||||
uri: { type: 'string' },
|
||||
publicUrl: { type: 'string' },
|
||||
originalUrl: { type: 'string' },
|
||||
type: { type: 'string' },
|
||||
aliases: { type: 'string' },
|
||||
category: { type: 'string' },
|
||||
license: { type: 'string' },
|
||||
isSensitive: { type: 'boolean' },
|
||||
localOnly: { type: 'boolean' },
|
||||
hostType: {
|
||||
type: 'string',
|
||||
enum: fetchEmojisHostTypes,
|
||||
default: 'all',
|
||||
},
|
||||
roleIds: {
|
||||
type: 'array',
|
||||
items: { type: 'string', format: 'misskey:id' },
|
||||
},
|
||||
},
|
||||
},
|
||||
sinceId: { type: 'string', format: 'misskey:id' },
|
||||
untilId: { type: 'string', format: 'misskey:id' },
|
||||
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
|
||||
page: { type: 'integer' },
|
||||
sortKeys: {
|
||||
type: 'array',
|
||||
default: ['-id'],
|
||||
items: {
|
||||
type: 'string',
|
||||
enum: fetchEmojisSortKeys,
|
||||
},
|
||||
},
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
|
||||
@Injectable()
|
||||
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
|
||||
constructor(
|
||||
private customEmojiService: CustomEmojiService,
|
||||
private emojiEntityService: EmojiEntityService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const q = ps.query;
|
||||
const result = await this.customEmojiService.fetchEmojis(
|
||||
{
|
||||
query: {
|
||||
updatedAtFrom: q?.updatedAtFrom,
|
||||
updatedAtTo: q?.updatedAtTo,
|
||||
name: q?.name,
|
||||
host: q?.host,
|
||||
uri: q?.uri,
|
||||
publicUrl: q?.publicUrl,
|
||||
type: q?.type,
|
||||
aliases: q?.aliases,
|
||||
category: q?.category,
|
||||
license: q?.license,
|
||||
isSensitive: q?.isSensitive,
|
||||
localOnly: q?.localOnly,
|
||||
hostType: q?.hostType,
|
||||
roleIds: q?.roleIds,
|
||||
},
|
||||
sinceId: ps.sinceId,
|
||||
untilId: ps.untilId,
|
||||
},
|
||||
{
|
||||
limit: ps.limit,
|
||||
page: ps.page,
|
||||
sortKeys: ps.sortKeys,
|
||||
},
|
||||
);
|
||||
|
||||
return {
|
||||
emojis: await this.emojiEntityService.packDetailedAdminMany(result.emojis),
|
||||
count: result.count,
|
||||
allCount: result.allCount,
|
||||
allPages: result.allPages,
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
|
@ -317,16 +317,19 @@ export class ClientServerService {
|
|||
done();
|
||||
});
|
||||
} else {
|
||||
const configUrl = new URL(this.config.url);
|
||||
const urlOriginWithoutPort = configUrl.origin.replace(/:\d+$/, '');
|
||||
|
||||
const port = (process.env.VITE_PORT ?? '5173');
|
||||
fastify.register(fastifyProxy, {
|
||||
upstream: 'http://localhost:' + port,
|
||||
upstream: urlOriginWithoutPort + ':' + port,
|
||||
prefix: '/vite',
|
||||
rewritePrefix: '/vite',
|
||||
});
|
||||
|
||||
const embedPort = (process.env.EMBED_VITE_PORT ?? '5174');
|
||||
fastify.register(fastifyProxy, {
|
||||
upstream: 'http://localhost:' + embedPort,
|
||||
upstream: urlOriginWithoutPort + ':' + embedPort,
|
||||
prefix: '/embed_vite',
|
||||
rewritePrefix: '/embed_vite',
|
||||
});
|
||||
|
@ -509,6 +512,7 @@ export class ClientServerService {
|
|||
usernameLower: username.toLowerCase(),
|
||||
host: host ?? IsNull(),
|
||||
isSuspended: false,
|
||||
requireSigninToViewContents: false,
|
||||
});
|
||||
|
||||
return user && await this.feedService.packFeed(user);
|
||||
|
@ -813,6 +817,7 @@ export class ClientServerService {
|
|||
fastify.get<{ Params: { announcementId: string; } }>('/announcements/:announcementId', async (request, reply) => {
|
||||
const announcement = await this.announcementsRepository.findOneBy({
|
||||
id: request.params.announcementId,
|
||||
userId: IsNull(),
|
||||
});
|
||||
|
||||
if (announcement) {
|
||||
|
|
|
@ -17,6 +17,7 @@ services:
|
|||
- ./.config/docker.env
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- COREPACK_DEFAULT_TO_LATEST=0
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ../../../built
|
||||
|
|
|
@ -25,6 +25,7 @@ services:
|
|||
environment:
|
||||
- NODE_ENV=development
|
||||
- NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/rootCA.crt
|
||||
- COREPACK_DEFAULT_TO_LATEST=0
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ../package.json
|
||||
|
@ -85,6 +86,8 @@ services:
|
|||
depends_on:
|
||||
redis.test:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- COREPACK_DEFAULT_TO_LATEST=0
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ../package.json
|
||||
|
|
|
@ -0,0 +1,817 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { afterEach, beforeAll, describe, test } from '@jest/globals';
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { CustomEmojiService } from '@/core/CustomEmojiService.js';
|
||||
import { EmojiEntityService } from '@/core/entities/EmojiEntityService.js';
|
||||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||
import { IdService } from '@/core/IdService.js';
|
||||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
import { UtilityService } from '@/core/UtilityService.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import { GlobalModule } from '@/GlobalModule.js';
|
||||
import { EmojisRepository } from '@/models/_.js';
|
||||
import { MiEmoji } from '@/models/Emoji.js';
|
||||
|
||||
describe('CustomEmojiService', () => {
|
||||
let app: TestingModule;
|
||||
let service: CustomEmojiService;
|
||||
|
||||
let emojisRepository: EmojisRepository;
|
||||
let idService: IdService;
|
||||
|
||||
beforeAll(async () => {
|
||||
app = await Test
|
||||
.createTestingModule({
|
||||
imports: [
|
||||
GlobalModule,
|
||||
],
|
||||
providers: [
|
||||
CustomEmojiService,
|
||||
UtilityService,
|
||||
IdService,
|
||||
EmojiEntityService,
|
||||
ModerationLogService,
|
||||
GlobalEventService,
|
||||
],
|
||||
})
|
||||
.compile();
|
||||
app.enableShutdownHooks();
|
||||
|
||||
service = app.get<CustomEmojiService>(CustomEmojiService);
|
||||
emojisRepository = app.get<EmojisRepository>(DI.emojisRepository);
|
||||
idService = app.get<IdService>(IdService);
|
||||
});
|
||||
|
||||
describe('fetchEmojis', () => {
|
||||
async function insert(data: Partial<MiEmoji>[]) {
|
||||
for (const d of data) {
|
||||
const id = idService.gen();
|
||||
await emojisRepository.insert({
|
||||
id: id,
|
||||
updatedAt: new Date(),
|
||||
...d,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function call(params: Parameters<CustomEmojiService['fetchEmojis']>['0']) {
|
||||
return service.fetchEmojis(
|
||||
params,
|
||||
{
|
||||
// テスト向けに
|
||||
sortKeys: ['+id'],
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
function defaultData(suffix: string, override?: Partial<MiEmoji>): Partial<MiEmoji> {
|
||||
return {
|
||||
name: `emoji${suffix}`,
|
||||
host: null,
|
||||
category: 'default',
|
||||
originalUrl: `https://example.com/emoji${suffix}.png`,
|
||||
publicUrl: `https://example.com/emoji${suffix}.png`,
|
||||
type: 'image/png',
|
||||
aliases: [`emoji${suffix}`],
|
||||
license: 'CC0',
|
||||
isSensitive: false,
|
||||
localOnly: false,
|
||||
roleIdsThatCanBeUsedThisEmojiAsReaction: [],
|
||||
...override,
|
||||
};
|
||||
}
|
||||
|
||||
afterEach(async () => {
|
||||
await emojisRepository.delete({});
|
||||
});
|
||||
|
||||
describe('単独', () => {
|
||||
test('updatedAtFrom', async () => {
|
||||
await insert([
|
||||
defaultData('001', { updatedAt: new Date('2021-01-01T00:00:00.000Z') }),
|
||||
defaultData('002', { updatedAt: new Date('2021-01-02T00:00:00.000Z') }),
|
||||
defaultData('003', { updatedAt: new Date('2021-01-03T00:00:00.000Z') }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
updatedAtFrom: '2021-01-02T00:00:00.000Z',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(2);
|
||||
expect(actual.emojis[0].name).toBe('emoji002');
|
||||
expect(actual.emojis[1].name).toBe('emoji003');
|
||||
});
|
||||
|
||||
test('updatedAtTo', async () => {
|
||||
await insert([
|
||||
defaultData('001', { updatedAt: new Date('2021-01-01T00:00:00.000Z') }),
|
||||
defaultData('002', { updatedAt: new Date('2021-01-02T00:00:00.000Z') }),
|
||||
defaultData('003', { updatedAt: new Date('2021-01-03T00:00:00.000Z') }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
updatedAtTo: '2021-01-02T00:00:00.000Z',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(2);
|
||||
expect(actual.emojis[0].name).toBe('emoji001');
|
||||
expect(actual.emojis[1].name).toBe('emoji002');
|
||||
});
|
||||
|
||||
describe('name', () => {
|
||||
test('single', async () => {
|
||||
await insert([
|
||||
defaultData('001'),
|
||||
defaultData('002'),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
name: 'emoji001',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(1);
|
||||
expect(actual.emojis[0].name).toBe('emoji001');
|
||||
});
|
||||
|
||||
test('multi', async () => {
|
||||
await insert([
|
||||
defaultData('001'),
|
||||
defaultData('002'),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
name: 'emoji001 emoji002',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(2);
|
||||
expect(actual.emojis[0].name).toBe('emoji001');
|
||||
expect(actual.emojis[1].name).toBe('emoji002');
|
||||
});
|
||||
|
||||
test('keyword', async () => {
|
||||
await insert([
|
||||
defaultData('001'),
|
||||
defaultData('002'),
|
||||
defaultData('003', { name: 'em003' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
name: 'oji',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(2);
|
||||
expect(actual.emojis[0].name).toBe('emoji001');
|
||||
expect(actual.emojis[1].name).toBe('emoji002');
|
||||
});
|
||||
|
||||
test('escape', async () => {
|
||||
await insert([
|
||||
defaultData('001'),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
name: '%',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('host', () => {
|
||||
test('single', async () => {
|
||||
await insert([
|
||||
defaultData('001', { host: 'example.com' }),
|
||||
defaultData('002', { host: 'example.com' }),
|
||||
defaultData('003', { host: '1.example.com' }),
|
||||
defaultData('004', { host: '2.example.com' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
host: 'example.com',
|
||||
hostType: 'remote',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(4);
|
||||
});
|
||||
|
||||
test('multi', async () => {
|
||||
await insert([
|
||||
defaultData('001', { host: 'example.com' }),
|
||||
defaultData('002', { host: 'example.com' }),
|
||||
defaultData('003', { host: '1.example.com' }),
|
||||
defaultData('004', { host: '2.example.com' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
host: '1.example.com 2.example.com',
|
||||
hostType: 'remote',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(2);
|
||||
expect(actual.emojis[0].name).toBe('emoji003');
|
||||
expect(actual.emojis[1].name).toBe('emoji004');
|
||||
});
|
||||
|
||||
test('keyword', async () => {
|
||||
await insert([
|
||||
defaultData('001', { host: 'example.com' }),
|
||||
defaultData('002', { host: 'example.com' }),
|
||||
defaultData('003', { host: '1.example.com' }),
|
||||
defaultData('004', { host: '2.example.com' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
host: 'example',
|
||||
hostType: 'remote',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(4);
|
||||
});
|
||||
|
||||
test('escape', async () => {
|
||||
await insert([
|
||||
defaultData('001', { host: 'example.com' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
host: '%',
|
||||
hostType: 'remote',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('uri', () => {
|
||||
test('single', async () => {
|
||||
await insert([
|
||||
defaultData('001', { uri: 'uri001' }),
|
||||
defaultData('002', { uri: 'uri002' }),
|
||||
defaultData('003', { uri: 'uri003' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
uri: 'uri002',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(1);
|
||||
expect(actual.emojis[0].name).toBe('emoji002');
|
||||
});
|
||||
|
||||
test('multi', async () => {
|
||||
await insert([
|
||||
defaultData('001', { uri: 'uri001' }),
|
||||
defaultData('002', { uri: 'uri002' }),
|
||||
defaultData('003', { uri: 'uri003' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
uri: 'uri001 uri003',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(2);
|
||||
expect(actual.emojis[0].name).toBe('emoji001');
|
||||
expect(actual.emojis[1].name).toBe('emoji003');
|
||||
});
|
||||
|
||||
test('keyword', async () => {
|
||||
await insert([
|
||||
defaultData('001', { uri: 'uri001' }),
|
||||
defaultData('002', { uri: 'uri002' }),
|
||||
defaultData('003', { uri: 'uri003' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
uri: 'ri',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(3);
|
||||
});
|
||||
|
||||
test('escape', async () => {
|
||||
await insert([
|
||||
defaultData('001', { uri: 'uri001' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
uri: '%',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('publicUrl', () => {
|
||||
test('single', async () => {
|
||||
await insert([
|
||||
defaultData('001', { publicUrl: 'publicUrl001' }),
|
||||
defaultData('002', { publicUrl: 'publicUrl002' }),
|
||||
defaultData('003', { publicUrl: 'publicUrl003' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
publicUrl: 'publicUrl002',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(1);
|
||||
expect(actual.emojis[0].name).toBe('emoji002');
|
||||
});
|
||||
|
||||
test('multi', async () => {
|
||||
await insert([
|
||||
defaultData('001', { publicUrl: 'publicUrl001' }),
|
||||
defaultData('002', { publicUrl: 'publicUrl002' }),
|
||||
defaultData('003', { publicUrl: 'publicUrl003' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
publicUrl: 'publicUrl001 publicUrl003',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(2);
|
||||
expect(actual.emojis[0].name).toBe('emoji001');
|
||||
expect(actual.emojis[1].name).toBe('emoji003');
|
||||
});
|
||||
|
||||
test('keyword', async () => {
|
||||
await insert([
|
||||
defaultData('001', { publicUrl: 'publicUrl001' }),
|
||||
defaultData('002', { publicUrl: 'publicUrl002' }),
|
||||
defaultData('003', { publicUrl: 'publicUrl003' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
publicUrl: 'Url',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(3);
|
||||
});
|
||||
|
||||
test('escape', async () => {
|
||||
await insert([
|
||||
defaultData('001', { publicUrl: 'publicUrl001' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
publicUrl: '%',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('type', () => {
|
||||
test('single', async () => {
|
||||
await insert([
|
||||
defaultData('001', { type: 'type001' }),
|
||||
defaultData('002', { type: 'type002' }),
|
||||
defaultData('003', { type: 'type003' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
type: 'type002',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(1);
|
||||
expect(actual.emojis[0].name).toBe('emoji002');
|
||||
});
|
||||
|
||||
test('multi', async () => {
|
||||
await insert([
|
||||
defaultData('001', { type: 'type001' }),
|
||||
defaultData('002', { type: 'type002' }),
|
||||
defaultData('003', { type: 'type003' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
type: 'type001 type003',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(2);
|
||||
expect(actual.emojis[0].name).toBe('emoji001');
|
||||
expect(actual.emojis[1].name).toBe('emoji003');
|
||||
});
|
||||
|
||||
test('keyword', async () => {
|
||||
await insert([
|
||||
defaultData('001', { type: 'type001' }),
|
||||
defaultData('002', { type: 'type002' }),
|
||||
defaultData('003', { type: 'type003' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
type: 'pe',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(3);
|
||||
});
|
||||
|
||||
test('escape', async () => {
|
||||
await insert([
|
||||
defaultData('001', { type: 'type001' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
type: '%',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('aliases', () => {
|
||||
test('single', async () => {
|
||||
await insert([
|
||||
defaultData('001', { aliases: ['alias001', 'alias002'] }),
|
||||
defaultData('002', { aliases: ['alias002'] }),
|
||||
defaultData('003', { aliases: ['alias003'] }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
aliases: 'alias002',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(2);
|
||||
expect(actual.emojis[0].name).toBe('emoji001');
|
||||
expect(actual.emojis[1].name).toBe('emoji002');
|
||||
});
|
||||
|
||||
test('multi', async () => {
|
||||
await insert([
|
||||
defaultData('001', { aliases: ['alias001', 'alias002'] }),
|
||||
defaultData('002', { aliases: ['alias002', 'alias004'] }),
|
||||
defaultData('003', { aliases: ['alias003'] }),
|
||||
defaultData('004', { aliases: ['alias004'] }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
aliases: 'alias001 alias004',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(3);
|
||||
expect(actual.emojis[0].name).toBe('emoji001');
|
||||
expect(actual.emojis[1].name).toBe('emoji002');
|
||||
expect(actual.emojis[2].name).toBe('emoji004');
|
||||
});
|
||||
|
||||
test('keyword', async () => {
|
||||
await insert([
|
||||
defaultData('001', { aliases: ['alias001', 'alias002'] }),
|
||||
defaultData('002', { aliases: ['alias002', 'alias004'] }),
|
||||
defaultData('003', { aliases: ['alias003'] }),
|
||||
defaultData('004', { aliases: ['alias004'] }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
aliases: 'ias',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(4);
|
||||
});
|
||||
|
||||
test('escape', async () => {
|
||||
await insert([
|
||||
defaultData('001', { aliases: ['alias001', 'alias002'] }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
aliases: '%',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('category', () => {
|
||||
test('single', async () => {
|
||||
await insert([
|
||||
defaultData('001', { category: 'category001' }),
|
||||
defaultData('002', { category: 'category002' }),
|
||||
defaultData('003', { category: 'category003' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
category: 'category002',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(1);
|
||||
expect(actual.emojis[0].name).toBe('emoji002');
|
||||
});
|
||||
|
||||
test('multi', async () => {
|
||||
await insert([
|
||||
defaultData('001', { category: 'category001' }),
|
||||
defaultData('002', { category: 'category002' }),
|
||||
defaultData('003', { category: 'category003' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
category: 'category001 category003',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(2);
|
||||
expect(actual.emojis[0].name).toBe('emoji001');
|
||||
expect(actual.emojis[1].name).toBe('emoji003');
|
||||
});
|
||||
|
||||
test('keyword', async () => {
|
||||
await insert([
|
||||
defaultData('001', { category: 'category001' }),
|
||||
defaultData('002', { category: 'category002' }),
|
||||
defaultData('003', { category: 'category003' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
category: 'egory',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(3);
|
||||
});
|
||||
|
||||
test('escape', async () => {
|
||||
await insert([
|
||||
defaultData('001', { category: 'category001' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
category: '%',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('license', () => {
|
||||
test('single', async () => {
|
||||
await insert([
|
||||
defaultData('001', { license: 'license001' }),
|
||||
defaultData('002', { license: 'license002' }),
|
||||
defaultData('003', { license: 'license003' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
license: 'license002',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(1);
|
||||
expect(actual.emojis[0].name).toBe('emoji002');
|
||||
});
|
||||
|
||||
test('multi', async () => {
|
||||
await insert([
|
||||
defaultData('001', { license: 'license001' }),
|
||||
defaultData('002', { license: 'license002' }),
|
||||
defaultData('003', { license: 'license003' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
license: 'license001 license003',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(2);
|
||||
expect(actual.emojis[0].name).toBe('emoji001');
|
||||
expect(actual.emojis[1].name).toBe('emoji003');
|
||||
});
|
||||
|
||||
test('keyword', async () => {
|
||||
await insert([
|
||||
defaultData('001', { license: 'license001' }),
|
||||
defaultData('002', { license: 'license002' }),
|
||||
defaultData('003', { license: 'license003' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
license: 'cense',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(3);
|
||||
});
|
||||
|
||||
test('escape', async () => {
|
||||
await insert([
|
||||
defaultData('001', { license: 'license001' }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
license: '%',
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('isSensitive', () => {
|
||||
test('true', async () => {
|
||||
await insert([
|
||||
defaultData('001', { isSensitive: true }),
|
||||
defaultData('002', { isSensitive: false }),
|
||||
defaultData('003', { isSensitive: true }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
isSensitive: true,
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(2);
|
||||
expect(actual.emojis[0].name).toBe('emoji001');
|
||||
expect(actual.emojis[1].name).toBe('emoji003');
|
||||
});
|
||||
|
||||
test('false', async () => {
|
||||
await insert([
|
||||
defaultData('001', { isSensitive: true }),
|
||||
defaultData('002', { isSensitive: false }),
|
||||
defaultData('003', { isSensitive: true }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
isSensitive: false,
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(1);
|
||||
expect(actual.emojis[0].name).toBe('emoji002');
|
||||
});
|
||||
|
||||
test('null', async () => {
|
||||
await insert([
|
||||
defaultData('001', { isSensitive: true }),
|
||||
defaultData('002', { isSensitive: false }),
|
||||
defaultData('003', { isSensitive: true }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(3);
|
||||
});
|
||||
});
|
||||
|
||||
describe('localOnly', () => {
|
||||
test('true', async () => {
|
||||
await insert([
|
||||
defaultData('001', { localOnly: true }),
|
||||
defaultData('002', { localOnly: false }),
|
||||
defaultData('003', { localOnly: true }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
localOnly: true,
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(2);
|
||||
expect(actual.emojis[0].name).toBe('emoji001');
|
||||
expect(actual.emojis[1].name).toBe('emoji003');
|
||||
});
|
||||
|
||||
test('false', async () => {
|
||||
await insert([
|
||||
defaultData('001', { localOnly: true }),
|
||||
defaultData('002', { localOnly: false }),
|
||||
defaultData('003', { localOnly: true }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
localOnly: false,
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(1);
|
||||
expect(actual.emojis[0].name).toBe('emoji002');
|
||||
});
|
||||
|
||||
test('null', async () => {
|
||||
await insert([
|
||||
defaultData('001', { localOnly: true }),
|
||||
defaultData('002', { localOnly: false }),
|
||||
defaultData('003', { localOnly: true }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(3);
|
||||
});
|
||||
});
|
||||
|
||||
describe('roleId', () => {
|
||||
test('single', async () => {
|
||||
await insert([
|
||||
defaultData('001', { roleIdsThatCanBeUsedThisEmojiAsReaction: ['role001'] }),
|
||||
defaultData('002', { roleIdsThatCanBeUsedThisEmojiAsReaction: ['role002'] }),
|
||||
defaultData('003', { roleIdsThatCanBeUsedThisEmojiAsReaction: ['role003'] }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
roleIds: ['role002'],
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(1);
|
||||
expect(actual.emojis[0].name).toBe('emoji002');
|
||||
});
|
||||
|
||||
test('multi', async () => {
|
||||
await insert([
|
||||
defaultData('001', { roleIdsThatCanBeUsedThisEmojiAsReaction: ['role001'] }),
|
||||
defaultData('002', { roleIdsThatCanBeUsedThisEmojiAsReaction: ['role002', 'role003'] }),
|
||||
defaultData('003', { roleIdsThatCanBeUsedThisEmojiAsReaction: ['role003'] }),
|
||||
defaultData('004', { roleIdsThatCanBeUsedThisEmojiAsReaction: ['role004'] }),
|
||||
]);
|
||||
|
||||
const actual = await call({
|
||||
query: {
|
||||
roleIds: ['role001', 'role003'],
|
||||
},
|
||||
});
|
||||
|
||||
expect(actual.allCount).toBe(3);
|
||||
expect(actual.emojis[0].name).toBe('emoji001');
|
||||
expect(actual.emojis[1].name).toBe('emoji002');
|
||||
expect(actual.emojis[2].name).toBe('emoji003');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
|
@ -4,7 +4,6 @@
|
|||
"type": "module",
|
||||
"scripts": {
|
||||
"watch": "vite",
|
||||
"dev": "vite --config vite.config.local-dev.ts --debug hmr",
|
||||
"build": "vite build",
|
||||
"typecheck": "vue-tsc --noEmit",
|
||||
"eslint": "eslint --quiet \"src/**/*.{ts,vue}\"",
|
||||
|
@ -15,7 +14,7 @@
|
|||
"@rollup/plugin-json": "6.1.0",
|
||||
"@rollup/plugin-replace": "5.0.7",
|
||||
"@rollup/pluginutils": "5.1.3",
|
||||
"@tabler/icons-webfont": "3.3.0",
|
||||
"@tabler/icons-webfont": "https://github.com/misskey-dev/tabler-icons/archive/refs/tags/3.29.0-mi.1913+5921534bc.tar.gz",
|
||||
"@twemoji/parser": "15.1.1",
|
||||
"@vitejs/plugin-vue": "5.2.0",
|
||||
"@vue/compiler-sfc": "3.5.12",
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<!--
|
||||
開発モードのviteはこのファイルを起点にサーバーを起動します。
|
||||
このファイルに書かれた [t]js のリンクと (s)cssのリンクと、その依存関係にあるファイルはビルドされます
|
||||
-->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>[DEV] Loading...</title>
|
||||
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
|
||||
<meta
|
||||
http-equiv="Content-Security-Policy"
|
||||
content="default-src 'self' https://newassets.hcaptcha.com/ https://challenges.cloudflare.com/ http://localhost:7493/;
|
||||
worker-src 'self';
|
||||
script-src 'self' 'unsafe-eval' https://*.hcaptcha.com https://challenges.cloudflare.com https://esm.sh;
|
||||
style-src 'self' 'unsafe-inline';
|
||||
img-src 'self' data: blob: www.google.com xn--931a.moe localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000;
|
||||
media-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000;
|
||||
connect-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000 https://newassets.hcaptcha.com;
|
||||
frame-src *;"
|
||||
/>
|
||||
<meta property="og:site_name" content="[DEV BUILD] Misskey" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="misskey_app"></div>
|
||||
<script type="module" src="./boot.ts"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,96 +0,0 @@
|
|||
import dns from 'dns';
|
||||
import { readFile } from 'node:fs/promises';
|
||||
import type { IncomingMessage } from 'node:http';
|
||||
import { defineConfig } from 'vite';
|
||||
import type { UserConfig } from 'vite';
|
||||
import * as yaml from 'js-yaml';
|
||||
import locales from '../../locales/index.js';
|
||||
import { getConfig } from './vite.config.js';
|
||||
|
||||
dns.setDefaultResultOrder('ipv4first');
|
||||
|
||||
const defaultConfig = getConfig();
|
||||
|
||||
const { port } = yaml.load(await readFile('../../.config/default.yml', 'utf-8'));
|
||||
|
||||
const httpUrl = `http://localhost:${port}/`;
|
||||
const websocketUrl = `ws://localhost:${port}/`;
|
||||
|
||||
// activitypubリクエストはProxyを通し、それ以外はViteの開発サーバーを返す
|
||||
function varyHandler(req: IncomingMessage) {
|
||||
if (req.headers.accept?.includes('application/activity+json')) {
|
||||
return null;
|
||||
}
|
||||
return '/index.html';
|
||||
}
|
||||
|
||||
const devConfig: UserConfig = {
|
||||
// 基本の設定は vite.config.js から引き継ぐ
|
||||
...defaultConfig,
|
||||
root: 'src',
|
||||
publicDir: '../assets',
|
||||
base: '/embed',
|
||||
server: {
|
||||
host: 'localhost',
|
||||
port: 5174,
|
||||
proxy: {
|
||||
'/api': {
|
||||
changeOrigin: true,
|
||||
target: httpUrl,
|
||||
},
|
||||
'/assets': httpUrl,
|
||||
'/static-assets': httpUrl,
|
||||
'/client-assets': httpUrl,
|
||||
'/files': httpUrl,
|
||||
'/twemoji': httpUrl,
|
||||
'/fluent-emoji': httpUrl,
|
||||
'/sw.js': httpUrl,
|
||||
'/streaming': {
|
||||
target: websocketUrl,
|
||||
ws: true,
|
||||
},
|
||||
'/favicon.ico': httpUrl,
|
||||
'/robots.txt': httpUrl,
|
||||
'/embed.js': httpUrl,
|
||||
'/identicon': {
|
||||
target: httpUrl,
|
||||
rewrite(path) {
|
||||
return path.replace('@localhost:5173', '');
|
||||
},
|
||||
},
|
||||
'/url': httpUrl,
|
||||
'/proxy': httpUrl,
|
||||
'/_info_card_': httpUrl,
|
||||
'/bios': httpUrl,
|
||||
'/cli': httpUrl,
|
||||
'/inbox': httpUrl,
|
||||
'/emoji/': httpUrl,
|
||||
'/notes': {
|
||||
target: httpUrl,
|
||||
bypass: varyHandler,
|
||||
},
|
||||
'/users': {
|
||||
target: httpUrl,
|
||||
bypass: varyHandler,
|
||||
},
|
||||
'/.well-known': {
|
||||
target: httpUrl,
|
||||
},
|
||||
},
|
||||
},
|
||||
build: {
|
||||
...defaultConfig.build,
|
||||
rollupOptions: {
|
||||
...defaultConfig.build?.rollupOptions,
|
||||
input: 'index.html',
|
||||
},
|
||||
},
|
||||
|
||||
define: {
|
||||
...defaultConfig.define,
|
||||
_LANGS_FULL_: JSON.stringify(Object.entries(locales)),
|
||||
},
|
||||
};
|
||||
|
||||
export default defineConfig(({ command, mode }) => devConfig);
|
||||
|
|
@ -1,12 +1,17 @@
|
|||
import path from 'path';
|
||||
import pluginVue from '@vitejs/plugin-vue';
|
||||
import { type UserConfig, defineConfig } from 'vite';
|
||||
import * as yaml from 'js-yaml';
|
||||
import { promises as fsp } from 'fs';
|
||||
|
||||
import locales from '../../locales/index.js';
|
||||
import meta from '../../package.json';
|
||||
import packageInfo from './package.json' with { type: 'json' };
|
||||
import pluginJson5 from './vite.json5.js';
|
||||
|
||||
const url = process.env.NODE_ENV === 'development' ? yaml.load(await fsp.readFile('../../.config/default.yml', 'utf-8')).url : null;
|
||||
const host = url ? (new URL(url)).hostname : undefined;
|
||||
|
||||
const extensions = ['.ts', '.tsx', '.js', '.jsx', '.mjs', '.json', '.json5', '.svg', '.sass', '.scss', '.css', '.vue'];
|
||||
|
||||
/**
|
||||
|
@ -62,6 +67,7 @@ export function getConfig(): UserConfig {
|
|||
base: '/embed_vite/',
|
||||
|
||||
server: {
|
||||
host,
|
||||
port: 5174,
|
||||
hmr: {
|
||||
// バックエンド経由での起動時、Viteは5174経由でアセットを参照していると思い込んでいるが実際は3000から配信される
|
||||
|
|
|
@ -23,10 +23,14 @@ const options = {
|
|||
sourcemap: 'linked',
|
||||
};
|
||||
|
||||
// js-built配下をすべて削除する
|
||||
fs.rmSync('./js-built', { recursive: true, force: true });
|
||||
const args = process.argv.slice(2).map(arg => arg.toLowerCase());
|
||||
|
||||
if (process.argv.map(arg => arg.toLowerCase()).includes('--watch')) {
|
||||
// js-built配下をすべて削除する
|
||||
if (!args.includes('--no-clean')) {
|
||||
fs.rmSync('./js-built', { recursive: true, force: true });
|
||||
}
|
||||
|
||||
if (args.includes('--watch')) {
|
||||
await watchSrc();
|
||||
} else {
|
||||
await buildSrc();
|
||||
|
|
|
@ -0,0 +1,154 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import seedrandom from 'seedrandom';
|
||||
|
||||
/**
|
||||
* AIで生成した無作為なファーストネーム
|
||||
*/
|
||||
export const firstNameDict = [
|
||||
'Ethan', 'Olivia', 'Jackson', 'Emma', 'Liam', 'Ava', 'Aiden', 'Sophia', 'Mason', 'Isabella',
|
||||
'Noah', 'Mia', 'Lucas', 'Harper', 'Caleb', 'Abigail', 'Samuel', 'Emily', 'Logan',
|
||||
'Madison', 'Benjamin', 'Chloe', 'Elijah', 'Grace', 'Alexander', 'Scarlett', 'William', 'Zoey', 'James', 'Lily',
|
||||
]
|
||||
|
||||
/**
|
||||
* AIで生成した無作為なラストネーム
|
||||
*/
|
||||
export const lastNameDict = [
|
||||
'Anderson', 'Johnson', 'Thompson', 'Davis', 'Rodriguez', 'Smith', 'Patel', 'Williams', 'Lee', 'Brown',
|
||||
'Garcia', 'Jackson', 'Martinez', 'Taylor', 'Harris', 'Nguyen', 'Miller', 'Jones', 'Wilson',
|
||||
'White', 'Thomas', 'Garcia', 'Martinez', 'Robinson', 'Turner', 'Lewis', 'Hall', 'King', 'Baker', 'Cooper',
|
||||
]
|
||||
|
||||
/**
|
||||
* AIで生成した無作為な国名
|
||||
*/
|
||||
export const countryDict = [
|
||||
'Japan', 'Canada', 'Brazil', 'Australia', 'Italy', 'SouthAfrica', 'Mexico', 'Sweden', 'Russia', 'India',
|
||||
'Germany', 'Argentina', 'South Korea', 'France', 'Nigeria', 'Turkey', 'Spain', 'Egypt', 'Thailand',
|
||||
'Vietnam', 'Kenya', 'Saudi Arabia', 'Netherlands', 'Colombia', 'Poland', 'Chile', 'Malaysia', 'Ukraine', 'New Zealand', 'Peru',
|
||||
]
|
||||
|
||||
export function text(length: number = 10, seed?: string): string {
|
||||
let result = "";
|
||||
|
||||
// シード値を使う場合、同じ数値が羅列されるが、ランダム文字列という意味では満たせていると思うのでこのまま使っておく
|
||||
const rand = seed ? seedrandom(seed)() : Math.random();
|
||||
while (result.length < length) {
|
||||
result += rand.toString(36).substring(2);
|
||||
}
|
||||
|
||||
return result.substring(0, length);
|
||||
}
|
||||
|
||||
export function integer(min: number = 0, max: number = 9999, seed?: string): number {
|
||||
const rand = seed ? seedrandom(seed)() : Math.random();
|
||||
return Math.floor(rand * (max - min)) + min;
|
||||
}
|
||||
|
||||
export function date(params?: {
|
||||
yearMin?: number,
|
||||
yearMax?: number,
|
||||
monthMin?: number,
|
||||
monthMax?: number,
|
||||
dayMin?: number,
|
||||
dayMax?: number,
|
||||
hourMin?: number,
|
||||
hourMax?: number,
|
||||
minuteMin?: number,
|
||||
minuteMax?: number,
|
||||
secondMin?: number,
|
||||
secondMax?: number,
|
||||
millisecondMin?: number,
|
||||
millisecondMax?: number,
|
||||
}, seed?: string): Date {
|
||||
const year = integer(params?.yearMin ?? 1970, params?.yearMax ?? (new Date()).getFullYear(), seed);
|
||||
const month = integer(params?.monthMin ?? 1, params?.monthMax ?? 12, seed);
|
||||
let day = integer(params?.dayMin ?? 1, params?.dayMax ?? 31, seed);
|
||||
if (month === 2) {
|
||||
day = Math.min(day, 28);
|
||||
} else if ([4, 6, 9, 11].includes(month)) {
|
||||
day = Math.min(day, 30);
|
||||
} else {
|
||||
day = Math.min(day, 31);
|
||||
}
|
||||
|
||||
const hour = integer(params?.hourMin ?? 0, params?.hourMax ?? 23, seed);
|
||||
const minute = integer(params?.minuteMin ?? 0, params?.minuteMax ?? 59, seed);
|
||||
const second = integer(params?.secondMin ?? 0, params?.secondMax ?? 59, seed);
|
||||
const millisecond = integer(params?.millisecondMin ?? 0, params?.millisecondMax ?? 999, seed);
|
||||
|
||||
return new Date(year, month - 1, day, hour, minute, second, millisecond);
|
||||
}
|
||||
|
||||
export function boolean(seed?: string): boolean {
|
||||
const rand = seed ? seedrandom(seed)() : Math.random();
|
||||
return rand < 0.5;
|
||||
}
|
||||
|
||||
export function choose<T>(array: T[], seed?: string): T {
|
||||
const rand = seed ? seedrandom(seed)() : Math.random();
|
||||
return array[Math.floor(rand * array.length)];
|
||||
}
|
||||
|
||||
export function firstName(seed?: string): string {
|
||||
return choose(firstNameDict, seed);
|
||||
}
|
||||
|
||||
export function lastName(seed?: string): string {
|
||||
return choose(lastNameDict, seed);
|
||||
}
|
||||
|
||||
export function country(seed?: string): string {
|
||||
return choose(countryDict, seed);
|
||||
}
|
||||
|
||||
const TIME2000 = 946684800000;
|
||||
export function fakeId(seed?: string): string {
|
||||
let time = new Date().getTime();
|
||||
|
||||
time = time - TIME2000;
|
||||
if (time < 0) time = 0;
|
||||
|
||||
const timeStr = time.toString(36).padStart(8, '0');
|
||||
const noiseStr = text(2, seed);
|
||||
|
||||
return timeStr + noiseStr;
|
||||
}
|
||||
|
||||
export function imageDataUrl(options?: {
|
||||
size?: {
|
||||
width?: number,
|
||||
height?: number,
|
||||
},
|
||||
color?: {
|
||||
red?: number,
|
||||
green?: number,
|
||||
blue?: number,
|
||||
alpha?: number,
|
||||
}
|
||||
}, seed?: string): string {
|
||||
const canvas = document.createElement('canvas');
|
||||
canvas.width = options?.size?.width ?? 100;
|
||||
canvas.height = options?.size?.height ?? 100;
|
||||
|
||||
const ctx = canvas.getContext('2d');
|
||||
if (!ctx) {
|
||||
throw new Error('Failed to get 2d context');
|
||||
}
|
||||
|
||||
ctx.beginPath()
|
||||
|
||||
const red = options?.color?.red ?? integer(0, 255, seed);
|
||||
const green = options?.color?.green ?? integer(0, 255, seed);
|
||||
const blue = options?.color?.blue ?? integer(0, 255, seed);
|
||||
const alpha = options?.color?.alpha ?? 1;
|
||||
ctx.arc(canvas.width / 2, canvas.height / 2, canvas.width / 2, 0, Math.PI * 2, true);
|
||||
ctx.fillStyle = `rgba(${red}, ${green}, ${blue}, ${alpha})`;
|
||||
ctx.fill();
|
||||
|
||||
return canvas.toDataURL('image/png', 1.0);
|
||||
}
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
import { AISCRIPT_VERSION } from '@syuilo/aiscript';
|
||||
import type { entities } from 'misskey-js'
|
||||
import { date, imageDataUrl, text } from "./fake-utils.js";
|
||||
|
||||
export function abuseUserReport() {
|
||||
return {
|
||||
|
@ -301,3 +302,93 @@ export function inviteCode(isUsed = false, hasExpiration = false, isExpired = fa
|
|||
used: isUsed,
|
||||
}
|
||||
}
|
||||
|
||||
export function role(params: {
|
||||
id?: string,
|
||||
name?: string,
|
||||
color?: string | null,
|
||||
iconUrl?: string | null,
|
||||
description?: string,
|
||||
isModerator?: boolean,
|
||||
isAdministrator?: boolean,
|
||||
displayOrder?: number,
|
||||
createdAt?: string,
|
||||
updatedAt?: string,
|
||||
target?: 'manual' | 'conditional',
|
||||
isPublic?: boolean,
|
||||
isExplorable?: boolean,
|
||||
asBadge?: boolean,
|
||||
canEditMembersByModerator?: boolean,
|
||||
usersCount?: number,
|
||||
}, seed?: string): entities.Role {
|
||||
const prefix = params.displayOrder ? params.displayOrder.toString().padStart(3, '0') + '-' : '';
|
||||
const genId = text(36, seed);
|
||||
const createdAt = params.createdAt ?? date({}, seed).toISOString();
|
||||
const updatedAt = params.updatedAt ?? date({}, seed).toISOString();
|
||||
|
||||
return {
|
||||
id: params.id ?? genId,
|
||||
name: params.name ?? `${prefix}TestRole-${genId}`,
|
||||
color: params.color ?? '#445566',
|
||||
iconUrl: params.iconUrl ?? null,
|
||||
description: params.description ?? '',
|
||||
isModerator: params.isModerator ?? false,
|
||||
isAdministrator: params.isAdministrator ?? false,
|
||||
displayOrder: params.displayOrder ?? 0,
|
||||
createdAt: createdAt,
|
||||
updatedAt: updatedAt,
|
||||
target: params.target ?? 'manual',
|
||||
isPublic: params.isPublic ?? true,
|
||||
isExplorable: params.isExplorable ?? true,
|
||||
asBadge: params.asBadge ?? true,
|
||||
canEditMembersByModerator: params.canEditMembersByModerator ?? false,
|
||||
usersCount: params.usersCount ?? 10,
|
||||
condFormula: {
|
||||
id: '',
|
||||
type: 'or',
|
||||
values: []
|
||||
},
|
||||
policies: {},
|
||||
}
|
||||
}
|
||||
|
||||
export function emoji(params?: {
|
||||
id?: string,
|
||||
name?: string,
|
||||
host?: string,
|
||||
uri?: string,
|
||||
publicUrl?: string,
|
||||
originalUrl?: string,
|
||||
type?: string,
|
||||
aliases?: string[],
|
||||
category?: string,
|
||||
license?: string,
|
||||
isSensitive?: boolean,
|
||||
localOnly?: boolean,
|
||||
roleIdsThatCanBeUsedThisEmojiAsReaction?: {id:string, name:string}[],
|
||||
updatedAt?: string,
|
||||
}, seed?: string): entities.EmojiDetailedAdmin {
|
||||
const _seed = seed ?? (params?.id ?? "DEFAULT_SEED");
|
||||
const id = params?.id ?? text(32, _seed);
|
||||
const name = params?.name ?? text(8, _seed);
|
||||
const updatedAt = params?.updatedAt ?? date({}, _seed).toISOString();
|
||||
|
||||
const image = imageDataUrl({}, _seed)
|
||||
|
||||
return {
|
||||
id: id,
|
||||
name: name,
|
||||
host: params?.host ?? null,
|
||||
uri: params?.uri ?? null,
|
||||
publicUrl: params?.publicUrl ?? image,
|
||||
originalUrl: params?.originalUrl ?? image,
|
||||
type: params?.type ?? 'image/png',
|
||||
aliases: params?.aliases ?? [`alias1-${name}`, `alias2-${name}`],
|
||||
category: params?.category ?? null,
|
||||
license: params?.license ?? null,
|
||||
isSensitive: params?.isSensitive ?? false,
|
||||
localOnly: params?.localOnly ?? false,
|
||||
roleIdsThatCanBeUsedThisEmojiAsReaction: params?.roleIdsThatCanBeUsedThisEmojiAsReaction ?? [],
|
||||
updatedAt: updatedAt,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -416,6 +416,10 @@ function toStories(component: string): Promise<string> {
|
|||
glob('src/components/MkUserSetupDialog.*.vue'),
|
||||
glob('src/components/MkInstanceCardMini.vue'),
|
||||
glob('src/components/MkInviteCode.vue'),
|
||||
glob('src/components/MkTagItem.vue'),
|
||||
glob('src/components/MkRoleSelectDialog.vue'),
|
||||
glob('src/components/grid/MkGrid.vue'),
|
||||
glob('src/pages/admin/custom-emojis-manager2.vue'),
|
||||
glob('src/pages/admin/overview.ap-requests.vue'),
|
||||
glob('src/pages/user/home.vue'),
|
||||
glob('src/pages/search.vue'),
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
"type": "module",
|
||||
"scripts": {
|
||||
"watch": "vite",
|
||||
"dev": "vite --config vite.config.local-dev.ts --debug hmr",
|
||||
"build": "vite build",
|
||||
"storybook-dev": "nodemon --verbose --watch src --ext \"mdx,ts,vue\" --ignore \"*.stories.ts\" --exec \"pnpm build-storybook-pre && pnpm exec storybook dev -p 6006 --ci\"",
|
||||
"build-storybook-pre": "(tsc -p .storybook || echo done.) && node .storybook/generate.js && node .storybook/preload-locale.js && node .storybook/preload-theme.js",
|
||||
|
@ -25,7 +24,7 @@
|
|||
"@rollup/plugin-replace": "5.0.7",
|
||||
"@rollup/pluginutils": "5.1.3",
|
||||
"@syuilo/aiscript": "0.19.0",
|
||||
"@tabler/icons-webfont": "3.3.0",
|
||||
"@tabler/icons-webfont": "https://github.com/misskey-dev/tabler-icons/archive/refs/tags/3.29.0-mi.1913+5921534bc.tar.gz",
|
||||
"@twemoji/parser": "15.1.1",
|
||||
"@vitejs/plugin-vue": "5.2.0",
|
||||
"@vue/compiler-sfc": "3.5.12",
|
||||
|
|
|
@ -1,90 +0,0 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
await main();
|
||||
|
||||
import('@/_boot_.js');
|
||||
|
||||
/**
|
||||
* backend/src/server/web/boot.jsで差し込まれている起動処理のうち、最低限必要なものを模倣するための処理
|
||||
*/
|
||||
async function main() {
|
||||
const forceError = localStorage.getItem('forceError');
|
||||
if (forceError != null) {
|
||||
renderError('FORCED_ERROR', 'This error is forced by having forceError in local storage.');
|
||||
}
|
||||
|
||||
//#region Detect language & fetch translations
|
||||
|
||||
// dev-modeの場合は常に取り直す
|
||||
const supportedLangs = _LANGS_.map(it => it[0]);
|
||||
let lang: string | null | undefined = localStorage.getItem('lang');
|
||||
if (lang == null || !supportedLangs.includes(lang)) {
|
||||
if (supportedLangs.includes(navigator.language)) {
|
||||
lang = navigator.language;
|
||||
} else {
|
||||
lang = supportedLangs.find(x => x.split('-')[0] === navigator.language);
|
||||
|
||||
// Fallback
|
||||
if (lang == null) lang = 'en-US';
|
||||
}
|
||||
}
|
||||
|
||||
// TODO:今のままだと言語ファイル変更後はpnpm devをリスタートする必要があるので、chokidarを使ったり等で対応できるようにする
|
||||
const locale = _LANGS_FULL_.find(it => it[0] === lang);
|
||||
localStorage.setItem('lang', lang);
|
||||
localStorage.setItem('locale', JSON.stringify(locale[1]));
|
||||
localStorage.setItem('localeVersion', _VERSION_);
|
||||
//#endregion
|
||||
|
||||
//#region Theme
|
||||
const theme = localStorage.getItem('theme');
|
||||
if (theme) {
|
||||
for (const [k, v] of Object.entries(JSON.parse(theme))) {
|
||||
document.documentElement.style.setProperty(`--MI_THEME-${k}`, v.toString());
|
||||
|
||||
// HTMLの theme-color 適用
|
||||
if (k === 'htmlThemeColor') {
|
||||
for (const tag of document.head.children) {
|
||||
if (tag.tagName === 'META' && tag.getAttribute('name') === 'theme-color') {
|
||||
tag.setAttribute('content', v);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
const colorScheme = localStorage.getItem('colorScheme');
|
||||
if (colorScheme) {
|
||||
document.documentElement.style.setProperty('color-scheme', colorScheme);
|
||||
}
|
||||
//#endregion
|
||||
|
||||
const fontSize = localStorage.getItem('fontSize');
|
||||
if (fontSize) {
|
||||
document.documentElement.classList.add('f-' + fontSize);
|
||||
}
|
||||
|
||||
const useSystemFont = localStorage.getItem('useSystemFont');
|
||||
if (useSystemFont) {
|
||||
document.documentElement.classList.add('useSystemFont');
|
||||
}
|
||||
|
||||
const wallpaper = localStorage.getItem('wallpaper');
|
||||
if (wallpaper) {
|
||||
document.documentElement.style.backgroundImage = `url(${wallpaper})`;
|
||||
}
|
||||
|
||||
const customCss = localStorage.getItem('customCss');
|
||||
if (customCss && customCss.length > 0) {
|
||||
const style = document.createElement('style');
|
||||
style.innerHTML = customCss;
|
||||
document.head.appendChild(style);
|
||||
}
|
||||
}
|
||||
|
||||
function renderError(code: string, details?: string) {
|
||||
console.log(code, details);
|
||||
}
|
|
@ -41,6 +41,12 @@ export async function signout() {
|
|||
if (!$i) return;
|
||||
|
||||
waiting();
|
||||
document.cookie.split(';').forEach((cookie) => {
|
||||
const cookieName = cookie.split('=')[0].trim();
|
||||
if (cookieName === 'token') {
|
||||
document.cookie = `${cookieName}=; max-age=0; path=/`;
|
||||
}
|
||||
});
|
||||
miLocalStorage.removeItem('account');
|
||||
await removeAccount($i.id);
|
||||
const accounts = await getAccounts();
|
||||
|
@ -101,6 +107,9 @@ export async function removeAccount(idOrToken: Account['id']) {
|
|||
}
|
||||
|
||||
function fetchAccount(token: string, id?: string, forceShowDialog?: boolean): Promise<Account> {
|
||||
document.cookie = "token=; path=/; max-age=0";
|
||||
document.cookie = `token=${token}; path=/queue; max-age=86400; SameSite=Strict; Secure`; // bull dashboardの認証とかで使う
|
||||
|
||||
return new Promise((done, fail) => {
|
||||
window.fetch(`${apiUrl}/i`, {
|
||||
method: 'POST',
|
||||
|
@ -213,7 +222,6 @@ export async function login(token: Account['token'], redirect?: string) {
|
|||
throw reason;
|
||||
});
|
||||
miLocalStorage.setItem('account', JSON.stringify(me));
|
||||
document.cookie = `token=${token}; path=/; max-age=31536000`; // bull dashboardの認証とかで使う
|
||||
await addAccount(me.id, token);
|
||||
|
||||
if (redirect) {
|
||||
|
|
|
@ -98,6 +98,11 @@ export async function common(createVue: () => App<Element>) {
|
|||
// タッチデバイスでCSSの:hoverを機能させる
|
||||
document.addEventListener('touchend', () => {}, { passive: true });
|
||||
|
||||
// URLに#pswpを含む場合は取り除く
|
||||
if (location.hash === '#pswp') {
|
||||
history.replaceState(null, '', location.href.replace('#pswp', ''));
|
||||
}
|
||||
|
||||
// 一斉リロード
|
||||
reloadChannel.addEventListener('message', path => {
|
||||
if (path !== null) location.href = path;
|
||||
|
|
|
@ -7,6 +7,7 @@ import { createApp, defineAsyncComponent, markRaw } from 'vue';
|
|||
import { ui } from '@@/js/config.js';
|
||||
import { common } from './common.js';
|
||||
import type * as Misskey from 'misskey-js';
|
||||
import type { Component } from 'vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { alert, confirm, popup, post, toast } from '@/os.js';
|
||||
import { useStream } from '@/stream.js';
|
||||
|
@ -25,13 +26,38 @@ import { type Keymap, makeHotkey } from '@/scripts/hotkey.js';
|
|||
import { addCustomEmoji, removeCustomEmojis, updateCustomEmojis } from '@/custom-emojis.js';
|
||||
|
||||
export async function mainBoot() {
|
||||
const { isClientUpdated } = await common(() => createApp(
|
||||
new URLSearchParams(window.location.search).has('zen') || (ui === 'deck' && deckStore.state.useSimpleUiForNonRootPages && location.pathname !== '/') ? defineAsyncComponent(() => import('@/ui/zen.vue')) :
|
||||
!$i ? defineAsyncComponent(() => import('@/ui/visitor.vue')) :
|
||||
ui === 'deck' ? defineAsyncComponent(() => import('@/ui/deck.vue')) :
|
||||
ui === 'classic' ? defineAsyncComponent(() => import('@/ui/classic.vue')) :
|
||||
defineAsyncComponent(() => import('@/ui/universal.vue')),
|
||||
));
|
||||
const { isClientUpdated } = await common(() => {
|
||||
let uiStyle = ui;
|
||||
const searchParams = new URLSearchParams(window.location.search);
|
||||
|
||||
if (!$i) uiStyle = 'visitor';
|
||||
|
||||
if (searchParams.has('zen')) uiStyle = 'zen';
|
||||
if (uiStyle === 'deck' && deckStore.state.useSimpleUiForNonRootPages && location.pathname !== '/') uiStyle = 'zen';
|
||||
|
||||
if (searchParams.has('ui')) uiStyle = searchParams.get('ui');
|
||||
|
||||
let rootComponent: Component;
|
||||
switch (uiStyle) {
|
||||
case 'zen':
|
||||
rootComponent = defineAsyncComponent(() => import('@/ui/zen.vue'));
|
||||
break;
|
||||
case 'deck':
|
||||
rootComponent = defineAsyncComponent(() => import('@/ui/deck.vue'));
|
||||
break;
|
||||
case 'visitor':
|
||||
rootComponent = defineAsyncComponent(() => import('@/ui/visitor.vue'));
|
||||
break;
|
||||
case 'classic':
|
||||
rootComponent = defineAsyncComponent(() => import('@/ui/classic.vue'));
|
||||
break;
|
||||
default:
|
||||
rootComponent = defineAsyncComponent(() => import('@/ui/universal.vue'));
|
||||
break;
|
||||
}
|
||||
|
||||
return createApp(rootComponent);
|
||||
});
|
||||
|
||||
reactionPicker.init();
|
||||
emojiPicker.init();
|
||||
|
|
|
@ -57,7 +57,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
<script lang="ts" setup>
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { defineProps, shallowRef } from 'vue';
|
||||
import { shallowRef } from 'vue';
|
||||
import MkLink from '@/components/MkLink.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import MkModalWindow from '@/components/MkModalWindow.vue';
|
||||
|
|
|
@ -18,7 +18,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
:alt="file.name"
|
||||
:title="file.name"
|
||||
:cover="fit !== 'contain'"
|
||||
:forceBlurHash="forceBlurhash"
|
||||
:forceBlurhash="forceBlurhash"
|
||||
/>
|
||||
<i v-else-if="is === 'image'" class="ti ti-photo" :class="$style.icon"></i>
|
||||
<i v-else-if="is === 'video'" class="ti ti-video" :class="$style.icon"></i>
|
||||
|
|
|
@ -38,7 +38,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
>
|
||||
<KeepAlive>
|
||||
<div v-show="opened">
|
||||
<MkSpacer v-if="withSpacer" :marginMin="14" :marginMax="22">
|
||||
<MkSpacer v-if="withSpacer" :marginMin="spacerMin" :marginMax="spacerMax">
|
||||
<slot></slot>
|
||||
</MkSpacer>
|
||||
<div v-else>
|
||||
|
@ -64,10 +64,14 @@ const props = withDefaults(defineProps<{
|
|||
defaultOpen?: boolean;
|
||||
maxHeight?: number | null;
|
||||
withSpacer?: boolean;
|
||||
spacerMin?: number;
|
||||
spacerMax?: number;
|
||||
}>(), {
|
||||
defaultOpen: false,
|
||||
maxHeight: null,
|
||||
withSpacer: true,
|
||||
spacerMin: 14,
|
||||
spacerMax: 22,
|
||||
});
|
||||
|
||||
const rootEl = shallowRef<HTMLElement>();
|
||||
|
|
|
@ -17,6 +17,7 @@ import { instance as localInstance } from '@/instance.js';
|
|||
import { getProxiedImageUrlNullable } from '@/scripts/media-proxy.js';
|
||||
|
||||
const props = defineProps<{
|
||||
host: string | null;
|
||||
instance?: {
|
||||
faviconUrl?: string | null
|
||||
name?: string | null
|
||||
|
@ -25,12 +26,24 @@ const props = defineProps<{
|
|||
}>();
|
||||
|
||||
// if no instance data is given, this is for the local instance
|
||||
const instanceName = computed(() => props.instance?.name ?? localInstanceName);
|
||||
const instanceName = computed(() => props.host == null ? localInstanceName : props.instance?.name ?? props.host);
|
||||
|
||||
const faviconUrl = computed(() => getProxiedImageUrlNullable(props.instance?.faviconUrl ?? localInstance.iconUrl, 'preview') ?? '/favicon.ico');
|
||||
const faviconUrl = computed(() => {
|
||||
let imageSrc: string | null = null;
|
||||
if (props.host == null) {
|
||||
if (localInstance.iconUrl == null) {
|
||||
return '/favicon.ico';
|
||||
} else {
|
||||
imageSrc = localInstance.iconUrl;
|
||||
}
|
||||
} else {
|
||||
imageSrc = props.instance?.faviconUrl ?? null;
|
||||
}
|
||||
return getProxiedImageUrlNullable(imageSrc);
|
||||
});
|
||||
|
||||
const themeColorStyle = computed<CSSProperties>(() => {
|
||||
const themeColor = props.instance?.themeColor ?? localInstance.themeColor ?? '#777777';
|
||||
const themeColor = (props.host == null ? localInstance.themeColor : props.instance?.themeColor) ?? '#777777';
|
||||
return {
|
||||
background: `linear-gradient(90deg, ${themeColor}, ${themeColor}00)`,
|
||||
};
|
||||
|
|
|
@ -288,20 +288,23 @@ const align = () => {
|
|||
const onOpened = () => {
|
||||
emit('opened');
|
||||
|
||||
// NOTE: Chromatic テストの際に undefined になる場合がある
|
||||
if (content.value == null) return;
|
||||
// contentの子要素にアクセスするためレンダリングの完了を待つ必要がある(nextTickが必要)
|
||||
nextTick(() => {
|
||||
// NOTE: Chromatic テストの際に undefined になる場合がある
|
||||
if (content.value == null) return;
|
||||
|
||||
// モーダルコンテンツにマウスボタンが押され、コンテンツ外でマウスボタンが離されたときにモーダルバックグラウンドクリックと判定させないためにマウスイベントを監視しフラグ管理する
|
||||
const el = content.value.children[0];
|
||||
el.addEventListener('mousedown', ev => {
|
||||
contentClicking = true;
|
||||
window.addEventListener('mouseup', ev => {
|
||||
// click イベントより先に mouseup イベントが発生するかもしれないのでちょっと待つ
|
||||
window.setTimeout(() => {
|
||||
contentClicking = false;
|
||||
}, 100);
|
||||
}, { passive: true, once: true });
|
||||
}, { passive: true });
|
||||
// モーダルコンテンツにマウスボタンが押され、コンテンツ外でマウスボタンが離されたときにモーダルバックグラウンドクリックと判定させないためにマウスイベントを監視しフラグ管理する
|
||||
const el = content.value.children[0];
|
||||
el.addEventListener('mousedown', ev => {
|
||||
contentClicking = true;
|
||||
window.addEventListener('mouseup', ev => {
|
||||
// click イベントより先に mouseup イベントが発生するかもしれないのでちょっと待つ
|
||||
window.setTimeout(() => {
|
||||
contentClicking = false;
|
||||
}, 100);
|
||||
}, { passive: true, once: true });
|
||||
}, { passive: true });
|
||||
});
|
||||
};
|
||||
|
||||
const onClosed = () => {
|
||||
|
|
|
@ -50,7 +50,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkAvatar :class="$style.avatar" :user="appearNote.user" :link="!mock" :preview="!mock"/>
|
||||
<div :class="$style.main">
|
||||
<MkNoteHeader :note="appearNote" :mini="true"/>
|
||||
<MkInstanceTicker v-if="showTicker" :instance="appearNote.user.instance"/>
|
||||
<MkInstanceTicker v-if="showTicker" :host="appearNote.user.host" :instance="appearNote.user.instance"/>
|
||||
<div style="container-type: inline-size;">
|
||||
<p v-if="appearNote.cw != null" :class="$style.cw">
|
||||
<Mfm
|
||||
|
@ -88,7 +88,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<div v-if="appearNote.files && appearNote.files.length > 0">
|
||||
<MkMediaList ref="galleryEl" :mediaList="appearNote.files"/>
|
||||
</div>
|
||||
<MkPoll v-if="appearNote.poll" :noteId="appearNote.id" :poll="appearNote.poll" :class="$style.poll"/>
|
||||
<MkPoll v-if="appearNote.poll" :noteId="appearNote.id" :poll="appearNote.poll" :author="appearNote.user" :emojiUrls="appearNote.emojis" :class="$style.poll"/>
|
||||
<div v-if="isEnabledUrlPreview">
|
||||
<MkUrlPreview v-for="url in urls" :key="url" :url="url" :compact="true" :detail="false" :class="$style.urlPreview"/>
|
||||
</div>
|
||||
|
@ -304,16 +304,16 @@ function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array<string
|
|||
function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array<string | string[]> | undefined | null, checkOnly: false): Array<string | string[]> | false | 'sensitiveMute';
|
||||
*/
|
||||
function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array<string | string[]> | undefined | null, checkOnly = false): Array<string | string[]> | false | 'sensitiveMute' {
|
||||
if (mutedWords == null) return false;
|
||||
if (mutedWords != null) {
|
||||
const result = checkWordMute(noteToCheck, $i, mutedWords);
|
||||
if (Array.isArray(result)) return result;
|
||||
|
||||
const result = checkWordMute(noteToCheck, $i, mutedWords);
|
||||
if (Array.isArray(result)) return result;
|
||||
const replyResult = noteToCheck.reply && checkWordMute(noteToCheck.reply, $i, mutedWords);
|
||||
if (Array.isArray(replyResult)) return replyResult;
|
||||
|
||||
const replyResult = noteToCheck.reply && checkWordMute(noteToCheck.reply, $i, mutedWords);
|
||||
if (Array.isArray(replyResult)) return replyResult;
|
||||
|
||||
const renoteResult = noteToCheck.renote && checkWordMute(noteToCheck.renote, $i, mutedWords);
|
||||
if (Array.isArray(renoteResult)) return renoteResult;
|
||||
const renoteResult = noteToCheck.renote && checkWordMute(noteToCheck.renote, $i, mutedWords);
|
||||
if (Array.isArray(renoteResult)) return renoteResult;
|
||||
}
|
||||
|
||||
if (checkOnly) return false;
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<img v-for="(role, i) in appearNote.user.badgeRoles" :key="i" v-tooltip="role.name" :class="$style.noteHeaderBadgeRole" :src="role.iconUrl!"/>
|
||||
</div>
|
||||
</div>
|
||||
<MkInstanceTicker v-if="showTicker" :instance="appearNote.user.instance"/>
|
||||
<MkInstanceTicker v-if="showTicker" :host="appearNote.user.host" :instance="appearNote.user.instance"/>
|
||||
</div>
|
||||
</header>
|
||||
<div :class="$style.noteContent">
|
||||
|
@ -109,7 +109,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<div v-if="appearNote.files && appearNote.files.length > 0">
|
||||
<MkMediaList ref="galleryEl" :mediaList="appearNote.files"/>
|
||||
</div>
|
||||
<MkPoll v-if="appearNote.poll" ref="pollViewer" :noteId="appearNote.id" :poll="appearNote.poll" :class="$style.poll"/>
|
||||
<MkPoll v-if="appearNote.poll" ref="pollViewer" :noteId="appearNote.id" :poll="appearNote.poll" :class="$style.poll" :author="appearNote.user" :emojiUrls="appearNote.emojis"/>
|
||||
<div v-if="isEnabledUrlPreview">
|
||||
<MkUrlPreview v-for="url in urls" :key="url" :url="url" :compact="true" :detail="true" style="margin-top: 6px;"/>
|
||||
</div>
|
||||
|
|
|
@ -6,7 +6,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<template>
|
||||
<template v-for="file in note.files">
|
||||
<div
|
||||
v-if="(defaultStore.state.nsfw === 'force' || file.isSensitive) && defaultStore.state.nsfw !== 'ignore' && !showingFiles.has(file.id)"
|
||||
v-if="(((
|
||||
(defaultStore.state.nsfw === 'force' || file.isSensitive) &&
|
||||
defaultStore.state.nsfw !== 'ignore'
|
||||
) || (defaultStore.state.dataSaver.media && file.type.startsWith('image/'))) &&
|
||||
!showingFiles.has(file.id)
|
||||
)"
|
||||
:class="[$style.filePreview, { [$style.square]: square }]"
|
||||
@click="showingFiles.add(file.id)"
|
||||
>
|
||||
|
@ -20,7 +25,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
/>
|
||||
<div :class="$style.sensitive">
|
||||
<div>
|
||||
<div><i class="ti ti-eye-exclamation"></i> {{ i18n.ts.sensitive }}</div>
|
||||
<div v-if="file.isSensitive"><i class="ti ti-eye-exclamation"></i> {{ i18n.ts.sensitive }}{{ defaultStore.state.dataSaver.media && file.size ? ` (${bytes(file.size)})` : '' }}</div>
|
||||
<div v-else><i class="ti ti-photo"></i> {{ defaultStore.state.dataSaver.media && file.size ? bytes(file.size) : i18n.ts.image }}</div>
|
||||
<div>{{ i18n.ts.clickToShow }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -43,6 +49,7 @@ import { notePage } from '@/filters/note.js';
|
|||
import { i18n } from '@/i18n.js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import bytes from '@/filters/bytes.js';
|
||||
|
||||
import MkDriveFileThumbnail from '@/components/MkDriveFileThumbnail.vue';
|
||||
|
||||
|
@ -91,6 +98,9 @@ const showingFiles = ref<Set<string>>(new Set());
|
|||
display: grid;
|
||||
place-items: center;
|
||||
font-size: 0.8em;
|
||||
text-align: center;
|
||||
padding: 8px;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
backdrop-filter: blur(5px);
|
||||
|
|
|
@ -0,0 +1,124 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div :class="$style.root">
|
||||
<MkButton primary :disabled="min === current" @click="onToPrevButtonClicked"><</MkButton>
|
||||
|
||||
<div :class="$style.buttons">
|
||||
<div v-if="prevDotVisible" :class="$style.headTailButtons">
|
||||
<MkButton @click="onToHeadButtonClicked">{{ min }}</MkButton>
|
||||
<span class="ti ti-dots"/>
|
||||
</div>
|
||||
|
||||
<MkButton
|
||||
v-for="i in buttonRanges" :key="i"
|
||||
:disabled="current === i"
|
||||
@click="onNumberButtonClicked(i)"
|
||||
>
|
||||
{{ i }}
|
||||
</MkButton>
|
||||
|
||||
<div v-if="nextDotVisible" :class="$style.headTailButtons">
|
||||
<span class="ti ti-dots"/>
|
||||
<MkButton @click="onToTailButtonClicked">{{ max }}</MkButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<MkButton primary :disabled="max === current" @click="onToNextButtonClicked">></MkButton>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import { computed, toRefs } from 'vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
|
||||
const min = 1;
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'pageChanged', pageNumber: number): void;
|
||||
}>();
|
||||
|
||||
const props = defineProps<{
|
||||
current: number;
|
||||
max: number;
|
||||
buttonCount: number;
|
||||
}>();
|
||||
|
||||
const { current, max } = toRefs(props);
|
||||
|
||||
const buttonCount = computed(() => Math.min(max.value, props.buttonCount));
|
||||
const buttonCountHalf = computed(() => Math.floor(buttonCount.value / 2));
|
||||
const buttonCountStart = computed(() => Math.min(Math.max(min, current.value - buttonCountHalf.value), max.value - buttonCount.value + 1));
|
||||
const buttonRanges = computed(() => Array.from({ length: buttonCount.value }, (_, i) => buttonCountStart.value + i));
|
||||
|
||||
const prevDotVisible = computed(() => (current.value - 1 > buttonCountHalf.value) && (max.value > buttonCount.value));
|
||||
const nextDotVisible = computed(() => (current.value < max.value - buttonCountHalf.value) && (max.value > buttonCount.value));
|
||||
|
||||
if (_DEV_) {
|
||||
console.log('[MkPagingButtons]', current.value, max.value, buttonCount.value, buttonCountHalf.value);
|
||||
console.log('[MkPagingButtons]', current.value < max.value - buttonCountHalf.value);
|
||||
console.log('[MkPagingButtons]', max.value > buttonCount.value);
|
||||
}
|
||||
|
||||
function onNumberButtonClicked(pageNumber: number) {
|
||||
emit('pageChanged', pageNumber);
|
||||
}
|
||||
|
||||
function onToHeadButtonClicked() {
|
||||
emit('pageChanged', min);
|
||||
}
|
||||
|
||||
function onToPrevButtonClicked() {
|
||||
const newPageNumber = current.value <= min ? min : current.value - 1;
|
||||
emit('pageChanged', newPageNumber);
|
||||
}
|
||||
|
||||
function onToNextButtonClicked() {
|
||||
const newPageNumber = current.value >= max.value ? max.value : current.value + 1;
|
||||
emit('pageChanged', newPageNumber);
|
||||
}
|
||||
|
||||
function onToTailButtonClicked() {
|
||||
emit('pageChanged', max.value);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style module lang="scss">
|
||||
.root {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 24px;
|
||||
|
||||
button {
|
||||
border-radius: 9999px;
|
||||
min-width: 2.5em;
|
||||
min-height: 2.5em;
|
||||
max-width: 2.5em;
|
||||
max-height: 2.5em;
|
||||
padding: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.headTailButtons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
|
||||
span {
|
||||
font-size: 0.75em;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<div :class="$style.bg" :style="{ 'width': `${showResult ? (choice.votes / total * 100) : 0}%` }"></div>
|
||||
<span :class="$style.fg">
|
||||
<template v-if="choice.isVoted"><i class="ti ti-check" style="margin-right: 4px; color: var(--MI_THEME-accent);"></i></template>
|
||||
<Mfm :text="choice.text" :plain="true"/>
|
||||
<Mfm :text="choice.text" :plain="true" :author="author" :emojiUrls="emojiUrls"/>
|
||||
<span v-if="showResult" style="margin-left: 4px; opacity: 0.7;">({{ i18n.tsx._poll.votesCount({ n: choice.votes }) }})</span>
|
||||
</span>
|
||||
</li>
|
||||
|
@ -42,6 +42,8 @@ const props = defineProps<{
|
|||
noteId: string;
|
||||
poll: NonNullable<Misskey.entities.Note['poll']>;
|
||||
readOnly?: boolean;
|
||||
emojiUrls?: Record<string, string>;
|
||||
author?: Misskey.entities.UserLite;
|
||||
}>();
|
||||
|
||||
const remaining = ref(-1);
|
||||
|
|
|
@ -0,0 +1,132 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<MkWindow
|
||||
ref="windowEl"
|
||||
:initialWidth="400"
|
||||
:initialHeight="500"
|
||||
:canResize="true"
|
||||
@close="windowEl?.close()"
|
||||
@closed="emit('closed')"
|
||||
>
|
||||
<template #header>:{{ name }}:</template>
|
||||
|
||||
<div style="display: flex; flex-direction: column; min-height: 100%;">
|
||||
<MkSpacer :marginMin="20" :marginMax="28" style="flex-grow: 1;">
|
||||
<div class="_gaps_m">
|
||||
<div v-if="imgUrl != null" :class="$style.imgs">
|
||||
<div style="background: #000;" :class="$style.imgContainer">
|
||||
<img :src="imgUrl" :class="$style.img" :alt="name"/>
|
||||
</div>
|
||||
<div style="background: #222;" :class="$style.imgContainer">
|
||||
<img :src="imgUrl" :class="$style.img" :alt="name"/>
|
||||
</div>
|
||||
<div style="background: #ddd;" :class="$style.imgContainer">
|
||||
<img :src="imgUrl" :class="$style.img" :alt="name"/>
|
||||
</div>
|
||||
<div style="background: #fff;" :class="$style.imgContainer">
|
||||
<img :src="imgUrl" :class="$style.img" :alt="name"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<MkKeyValue>
|
||||
<template #key>{{ i18n.ts.id }}</template>
|
||||
<template #value>{{ name }}</template>
|
||||
</MkKeyValue>
|
||||
<MkKeyValue>
|
||||
<template #key>{{ i18n.ts.host }}</template>
|
||||
<template #value>{{ host }}</template>
|
||||
</MkKeyValue>
|
||||
<MkKeyValue>
|
||||
<template #key>{{ i18n.ts.license }}</template>
|
||||
<template #value>{{ license }}</template>
|
||||
</MkKeyValue>
|
||||
</div>
|
||||
</MkSpacer>
|
||||
<div :class="$style.footer">
|
||||
<MkButton primary rounded style="margin: 0 auto;" @click="done">
|
||||
<i class="ti ti-plus"></i> {{ i18n.ts.import }}
|
||||
</MkButton>
|
||||
</div>
|
||||
</div>
|
||||
</MkWindow>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import MkKeyValue from '@/components/MkKeyValue.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkInput from '@/components/MkInput.vue';
|
||||
import MkTextarea from '@/components/MkTextarea.vue';
|
||||
import MkWindow from '@/components/MkWindow.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import * as os from '@/os.js';
|
||||
|
||||
const props = defineProps<{
|
||||
emoji: {
|
||||
id: string,
|
||||
name: string,
|
||||
host: string,
|
||||
license: string | null,
|
||||
url: string
|
||||
},
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
// 必要なら戻り値を増やす
|
||||
(ev: 'done'): void,
|
||||
(ev: 'closed'): void
|
||||
}>();
|
||||
|
||||
const windowEl = ref<InstanceType<typeof MkWindow> | null>(null);
|
||||
|
||||
const name = computed(() => props.emoji.name);
|
||||
const host = computed(() => props.emoji.host);
|
||||
const license = computed(() => props.emoji.license);
|
||||
const imgUrl = computed(() => props.emoji.url);
|
||||
|
||||
async function done() {
|
||||
await os.apiWithDialog('admin/emoji/copy', {
|
||||
emojiId: props.emoji.id,
|
||||
});
|
||||
|
||||
emit('done');
|
||||
windowEl.value?.close();
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
.imgs {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.imgContainer {
|
||||
padding: 8px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.img {
|
||||
display: block;
|
||||
height: 64px;
|
||||
width: 64px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: sticky;
|
||||
z-index: 10000;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: 12px;
|
||||
border-top: solid 0.5px var(--MI_THEME-divider);
|
||||
background: var(--MI_THEME-acrylicBg);
|
||||
-webkit-backdrop-filter: var(--MI-blur, blur(15px));
|
||||
backdrop-filter: var(--MI-blur, blur(15px));
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,106 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import { http, HttpResponse } from 'msw';
|
||||
import { role } from '../../.storybook/fakes.js';
|
||||
import { commonHandlers } from '../../.storybook/mocks.js';
|
||||
import MkRoleSelectDialog from '@/components/MkRoleSelectDialog.vue';
|
||||
|
||||
const roles = [
|
||||
role({ displayOrder: 1 }, '1'), role({ displayOrder: 1 }, '1'), role({ displayOrder: 1 }, '1'), role({ displayOrder: 1 }, '1'),
|
||||
role({ displayOrder: 2 }, '2'), role({ displayOrder: 2 }, '2'), role({ displayOrder: 3 }, '3'), role({ displayOrder: 3 }, '3'),
|
||||
role({ displayOrder: 4 }, '4'), role({ displayOrder: 5 }, '5'), role({ displayOrder: 6 }, '6'), role({ displayOrder: 7 }, '7'),
|
||||
role({ displayOrder: 999, name: 'privateRole', isPublic: false }, '999'),
|
||||
];
|
||||
|
||||
export const Default = {
|
||||
render(args) {
|
||||
return {
|
||||
components: {
|
||||
MkRoleSelectDialog,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
args,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
props() {
|
||||
return {
|
||||
...this.args,
|
||||
};
|
||||
},
|
||||
},
|
||||
template: '<MkRoleSelectDialog v-bind="props" />',
|
||||
};
|
||||
},
|
||||
args: {
|
||||
initialRoleIds: undefined,
|
||||
infoMessage: undefined,
|
||||
title: undefined,
|
||||
publicOnly: true,
|
||||
},
|
||||
parameters: {
|
||||
layout: 'centered',
|
||||
msw: {
|
||||
handlers: [
|
||||
...commonHandlers,
|
||||
http.post('/api/admin/roles/list', ({ params }) => {
|
||||
return HttpResponse.json(roles);
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
decorators: [() => ({
|
||||
template: '<div style="width:100cqmin"><story/></div>',
|
||||
})],
|
||||
} satisfies StoryObj<typeof MkRoleSelectDialog>;
|
||||
|
||||
export const InitialIds = {
|
||||
...Default,
|
||||
args: {
|
||||
...Default.args,
|
||||
initialRoleIds: [roles[0].id, roles[1].id, roles[4].id, roles[6].id, roles[8].id, roles[10].id],
|
||||
},
|
||||
} satisfies StoryObj<typeof MkRoleSelectDialog>;
|
||||
|
||||
export const InfoMessage = {
|
||||
...Default,
|
||||
args: {
|
||||
...Default.args,
|
||||
infoMessage: 'This is a message.',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkRoleSelectDialog>;
|
||||
|
||||
export const Title = {
|
||||
...Default,
|
||||
args: {
|
||||
...Default.args,
|
||||
title: 'Select roles',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkRoleSelectDialog>;
|
||||
|
||||
export const Full = {
|
||||
...Default,
|
||||
args: {
|
||||
...Default.args,
|
||||
initialRoleIds: roles.map(it => it.id),
|
||||
infoMessage: InfoMessage.args.infoMessage,
|
||||
title: Title.args.title,
|
||||
},
|
||||
} satisfies StoryObj<typeof MkRoleSelectDialog>;
|
||||
|
||||
export const FullWithPrivate = {
|
||||
...Default,
|
||||
args: {
|
||||
...Default.args,
|
||||
initialRoleIds: roles.map(it => it.id),
|
||||
infoMessage: InfoMessage.args.infoMessage,
|
||||
title: Title.args.title,
|
||||
publicOnly: false,
|
||||
},
|
||||
} satisfies StoryObj<typeof MkRoleSelectDialog>;
|
|
@ -0,0 +1,200 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<MkModalWindow
|
||||
ref="windowEl"
|
||||
:withOkButton="false"
|
||||
:okButtonDisabled="false"
|
||||
:width="400"
|
||||
:height="500"
|
||||
@close="onCloseModalWindow"
|
||||
@closed="console.log('MkRoleSelectDialog: closed') ; $emit('dispose')"
|
||||
>
|
||||
<template #header>{{ title }}</template>
|
||||
<MkSpacer :marginMin="20" :marginMax="28">
|
||||
<MkLoading v-if="fetching"/>
|
||||
<div v-else class="_gaps" :class="$style.root">
|
||||
<div :class="$style.header">
|
||||
<MkButton rounded @click="addRole"><i class="ti ti-plus"></i> {{ i18n.ts.add }}</MkButton>
|
||||
</div>
|
||||
|
||||
<div v-if="selectedRoles.length > 0" class="_gaps" :class="$style.roleItemArea">
|
||||
<div v-for="role in selectedRoles" :key="role.id" :class="$style.roleItem">
|
||||
<MkRolePreview :class="$style.role" :role="role" :forModeration="true" :detailed="false" style="pointer-events: none;"/>
|
||||
<button class="_button" :class="$style.roleUnAssign" @click="removeRole(role.id)"><i class="ti ti-x"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else :class="$style.roleItemArea" style="text-align: center">
|
||||
{{ i18n.ts._roleSelectDialog.notSelected }}
|
||||
</div>
|
||||
|
||||
<MkInfo v-if="infoMessage">{{ infoMessage }}</MkInfo>
|
||||
|
||||
<div :class="$style.buttons">
|
||||
<MkButton primary @click="onOkClicked">{{ i18n.ts.ok }}</MkButton>
|
||||
<MkButton @click="onCancelClicked">{{ i18n.ts.cancel }}</MkButton>
|
||||
</div>
|
||||
</div>
|
||||
</MkSpacer>
|
||||
</MkModalWindow>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, toRefs } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkInfo from '@/components/MkInfo.vue';
|
||||
import MkRolePreview from '@/components/MkRolePreview.vue';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import * as os from '@/os.js';
|
||||
import MkSpacer from '@/components/global/MkSpacer.vue';
|
||||
import MkModalWindow from '@/components/MkModalWindow.vue';
|
||||
import MkLoading from '@/components/global/MkLoading.vue';
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'done', value: Misskey.entities.Role[]),
|
||||
(ev: 'close'),
|
||||
(ev: 'dispose'),
|
||||
}>();
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
initialRoleIds?: string[],
|
||||
infoMessage?: string,
|
||||
title?: string,
|
||||
publicOnly: boolean,
|
||||
}>(), {
|
||||
initialRoleIds: undefined,
|
||||
infoMessage: undefined,
|
||||
title: undefined,
|
||||
publicOnly: true,
|
||||
});
|
||||
|
||||
const { initialRoleIds, infoMessage, title, publicOnly } = toRefs(props);
|
||||
|
||||
const windowEl = ref<InstanceType<typeof MkModalWindow>>();
|
||||
const roles = ref<Misskey.entities.Role[]>([]);
|
||||
const selectedRoleIds = ref<string[]>(initialRoleIds.value ?? []);
|
||||
const fetching = ref(false);
|
||||
|
||||
const selectedRoles = computed(() => {
|
||||
const r = roles.value.filter(role => selectedRoleIds.value.includes(role.id));
|
||||
r.sort((a, b) => {
|
||||
if (a.displayOrder !== b.displayOrder) {
|
||||
return b.displayOrder - a.displayOrder;
|
||||
}
|
||||
|
||||
return a.id.localeCompare(b.id);
|
||||
});
|
||||
return r;
|
||||
});
|
||||
|
||||
async function fetchRoles() {
|
||||
fetching.value = true;
|
||||
const result = await misskeyApi('admin/roles/list', {});
|
||||
roles.value = result.filter(it => publicOnly.value ? it.isPublic : true);
|
||||
fetching.value = false;
|
||||
}
|
||||
|
||||
async function addRole() {
|
||||
const items = roles.value
|
||||
.filter(r => r.isPublic)
|
||||
.filter(r => !selectedRoleIds.value.includes(r.id))
|
||||
.map(r => ({ text: r.name, value: r }));
|
||||
|
||||
const { canceled, result: role } = await os.select({ items });
|
||||
if (canceled) {
|
||||
return;
|
||||
}
|
||||
|
||||
selectedRoleIds.value.push(role.id);
|
||||
}
|
||||
|
||||
async function removeRole(roleId: string) {
|
||||
selectedRoleIds.value = selectedRoleIds.value.filter(x => x !== roleId);
|
||||
}
|
||||
|
||||
function onOkClicked() {
|
||||
emit('done', selectedRoles.value);
|
||||
windowEl.value?.close();
|
||||
}
|
||||
|
||||
function onCancelClicked() {
|
||||
emit('close');
|
||||
windowEl.value?.close();
|
||||
}
|
||||
|
||||
function onCloseModalWindow() {
|
||||
emit('close');
|
||||
windowEl.value?.close();
|
||||
}
|
||||
|
||||
fetchRoles();
|
||||
</script>
|
||||
|
||||
<style module lang="scss">
|
||||
.root {
|
||||
max-height: 410px;
|
||||
height: 410px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.roleItemArea {
|
||||
background-color: var(--MI_THEME-acrylicBg);
|
||||
border-radius: var(--MI-radius);
|
||||
padding: 12px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.roleItem {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.role {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.roleUnAssign {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin-left: 8px;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.title {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.addRoleButton {
|
||||
min-width: 32px;
|
||||
min-height: 32px;
|
||||
max-width: 32px;
|
||||
max-height: 32px;
|
||||
margin-left: 8px;
|
||||
align-self: center;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.divider {
|
||||
border-top: solid 0.5px var(--MI_THEME-divider);
|
||||
}
|
||||
|
||||
</style>
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
export type SortOrderDirection = '+' | '-'
|
||||
|
||||
export type SortOrder<T extends string> = {
|
||||
key: T;
|
||||
direction: SortOrderDirection;
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div :class="$style.sortOrderArea">
|
||||
<div :class="$style.sortOrderAreaTags">
|
||||
<MkTagItem
|
||||
v-for="order in currentOrders"
|
||||
:key="order.key"
|
||||
:iconClass="order.direction === '+' ? 'ti ti-arrow-up' : 'ti ti-arrow-down'"
|
||||
:exButtonIconClass="'ti ti-x'"
|
||||
:content="order.key"
|
||||
:class="$style.sortOrderTag"
|
||||
@click="onToggleSortOrderButtonClicked(order)"
|
||||
@exButtonClick="onRemoveSortOrderButtonClicked(order)"
|
||||
/>
|
||||
</div>
|
||||
<MkButton :class="$style.sortOrderAddButton" @click="onAddSortOrderButtonClicked">
|
||||
<span class="ti ti-plus"></span>
|
||||
</MkButton>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" generic="T extends string">
|
||||
import { toRefs } from 'vue';
|
||||
import MkTagItem from '@/components/MkTagItem.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { MenuItem } from '@/types/menu.js';
|
||||
import * as os from '@/os.js';
|
||||
import { SortOrder } from '@/components/MkSortOrderEditor.define.js';
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'update', sortOrders: SortOrder<T>[]): void;
|
||||
}>();
|
||||
|
||||
const props = defineProps<{
|
||||
baseOrderKeyNames: T[];
|
||||
currentOrders: SortOrder<T>[];
|
||||
}>();
|
||||
|
||||
const { currentOrders } = toRefs(props);
|
||||
|
||||
function onToggleSortOrderButtonClicked(order: SortOrder<T>) {
|
||||
switch (order.direction) {
|
||||
case '+':
|
||||
order.direction = '-';
|
||||
break;
|
||||
case '-':
|
||||
order.direction = '+';
|
||||
break;
|
||||
}
|
||||
|
||||
emitOrder(currentOrders.value);
|
||||
}
|
||||
|
||||
function onAddSortOrderButtonClicked(ev: MouseEvent) {
|
||||
const menuItems: MenuItem[] = props.baseOrderKeyNames
|
||||
.filter(baseKey => !currentOrders.value.map(it => it.key).includes(baseKey))
|
||||
.map(it => {
|
||||
return {
|
||||
text: it,
|
||||
action: () => {
|
||||
emitOrder([...currentOrders.value, { key: it, direction: '+' }]);
|
||||
},
|
||||
};
|
||||
});
|
||||
os.contextMenu(menuItems, ev);
|
||||
}
|
||||
|
||||
function onRemoveSortOrderButtonClicked(order: SortOrder<T>) {
|
||||
emitOrder(currentOrders.value.filter(it => it.key !== order.key));
|
||||
}
|
||||
|
||||
function emitOrder(sortOrders: SortOrder<T>[]) {
|
||||
emit('update', sortOrders);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style module lang="scss">
|
||||
.sortOrderArea {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.sortOrderAreaTags {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.sortOrderAddButton {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
min-width: 2.0em;
|
||||
min-height: 2.0em;
|
||||
max-width: 2.0em;
|
||||
max-height: 2.0em;
|
||||
padding: 8px;
|
||||
margin-left: auto;
|
||||
border-radius: 9999px;
|
||||
background-color: var(--MI_THEME-buttonBg);
|
||||
}
|
||||
|
||||
.sortOrderTag {
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
|
@ -18,7 +18,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</details>
|
||||
<details v-if="note.poll">
|
||||
<summary>{{ i18n.ts.poll }}</summary>
|
||||
<MkPoll :noteId="note.id" :poll="note.poll"/>
|
||||
<MkPoll :noteId="note.id" :poll="note.poll" :author="note.user" :emojiUrls="note.emojis"/>
|
||||
</details>
|
||||
<button v-if="isLong && collapsed" :class="$style.fade" class="_button" @click="collapsed = false">
|
||||
<span :class="$style.fadeLabel">{{ i18n.ts.showMore }}</span>
|
||||
|
@ -32,10 +32,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { shouldCollapsed } from '@@/js/collapsed.js';
|
||||
import MkMediaList from '@/components/MkMediaList.vue';
|
||||
import MkPoll from '@/components/MkPoll.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { shouldCollapsed } from '@@/js/collapsed.js';
|
||||
|
||||
const props = defineProps<{
|
||||
note: Misskey.entities.Note;
|
||||
|
|
|
@ -47,7 +47,7 @@ export type SuperMenuDef = {
|
|||
active?: boolean;
|
||||
action: (ev: MouseEvent) => void;
|
||||
} | {
|
||||
type: 'link';
|
||||
type?: 'link';
|
||||
to: string;
|
||||
icon?: string;
|
||||
text: string;
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
/* eslint-disable import/no-default-export */
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import MkTagItem from './MkTagItem.vue';
|
||||
|
||||
export const Default = {
|
||||
render(args) {
|
||||
return {
|
||||
components: {
|
||||
MkTagItem: MkTagItem,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
args,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
props() {
|
||||
return {
|
||||
...this.args,
|
||||
};
|
||||
},
|
||||
events() {
|
||||
return {
|
||||
click: action('click'),
|
||||
exButtonClick: action('exButtonClick'),
|
||||
};
|
||||
},
|
||||
},
|
||||
template: '<MkTagItem v-bind="props" v-on="events"></MkTagItem>',
|
||||
};
|
||||
},
|
||||
args: {
|
||||
content: 'name',
|
||||
},
|
||||
parameters: {
|
||||
layout: 'centered',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkTagItem>;
|
||||
|
||||
export const Icon = {
|
||||
...Default,
|
||||
args: {
|
||||
...Default.args,
|
||||
iconClass: 'ti ti-arrow-up',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkTagItem>;
|
||||
|
||||
export const ExButton = {
|
||||
...Default,
|
||||
args: {
|
||||
...Default.args,
|
||||
exButtonIconClass: 'ti ti-x',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkTagItem>;
|
||||
|
||||
export const IconExButton = {
|
||||
...Default,
|
||||
args: {
|
||||
...Default.args,
|
||||
iconClass: 'ti ti-arrow-up',
|
||||
exButtonIconClass: 'ti ti-x',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkTagItem>;
|
|
@ -0,0 +1,76 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div :class="$style.root" @click="(ev) => emit('click', ev)">
|
||||
<span v-if="iconClass" :class="[$style.icon, iconClass]"></span>
|
||||
<span :class="$style.content">{{ content }}</span>
|
||||
<MkButton v-if="exButtonIconClass" :class="$style.exButton" @click="(ev) => emit('exButtonClick', ev)">
|
||||
<span :class="[$style.exButtonIcon, exButtonIconClass]"></span>
|
||||
</MkButton>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'click', payload: MouseEvent): void;
|
||||
(ev: 'exButtonClick', payload: MouseEvent): void;
|
||||
}>();
|
||||
|
||||
defineProps<{
|
||||
iconClass?: string;
|
||||
content: string;
|
||||
exButtonIconClass?: string
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<style module lang="scss">
|
||||
$buttonSize : 1.8em;
|
||||
|
||||
.root {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 9999px;
|
||||
padding: 4px 6px;
|
||||
gap: 3px;
|
||||
|
||||
background-color: var(--MI_THEME-buttonBg);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--MI_THEME-buttonHoverBg);
|
||||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 0.70em;
|
||||
}
|
||||
|
||||
.exButton {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 9999px;
|
||||
max-height: $buttonSize;
|
||||
max-width: $buttonSize;
|
||||
min-height: $buttonSize;
|
||||
min-width: $buttonSize;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
font-size: 0.65em;
|
||||
}
|
||||
|
||||
.exButtonIcon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 0.80em;
|
||||
}
|
||||
</style>
|
|
@ -132,6 +132,7 @@ function showMenu(ev: MouseEvent) {
|
|||
height: 32px;
|
||||
border-radius: 8px;
|
||||
font-size: 18px;
|
||||
z-index: 50;
|
||||
}
|
||||
|
||||
.mainFg {
|
||||
|
|
|
@ -48,13 +48,16 @@ import { scrollToTop } from '@@/js/scroll.js';
|
|||
import { globalEvents } from '@/events.js';
|
||||
import { injectReactiveMetadata } from '@/scripts/page-metadata.js';
|
||||
import { $i, openAccountMenu as openAccountMenu_ } from '@/account.js';
|
||||
import { PageHeaderItem } from '@/types/page-header.js';
|
||||
import type { PageHeaderItem } from '@/types/page-header.js';
|
||||
import type { PageMetadata } from '@/scripts/page-metadata.js';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
overridePageMetadata?: PageMetadata;
|
||||
tabs?: Tab[];
|
||||
tab?: string;
|
||||
actions?: PageHeaderItem[] | null;
|
||||
thin?: boolean;
|
||||
hideTitle?: boolean;
|
||||
displayMyAvatar?: boolean;
|
||||
}>(), {
|
||||
tabs: () => ([] as Tab[]),
|
||||
|
@ -64,9 +67,10 @@ const emit = defineEmits<{
|
|||
(ev: 'update:tab', key: string);
|
||||
}>();
|
||||
|
||||
const pageMetadata = injectReactiveMetadata();
|
||||
const injectedPageMetadata = injectReactiveMetadata();
|
||||
const pageMetadata = computed(() => props.overridePageMetadata ?? injectedPageMetadata.value);
|
||||
|
||||
const hideTitle = inject('shouldOmitHeaderTitle', false);
|
||||
const hideTitle = computed(() => inject('shouldOmitHeaderTitle', false) || props.hideTitle);
|
||||
const thin_ = props.thin || inject('shouldHeaderThin', false);
|
||||
|
||||
const el = shallowRef<HTMLElement | undefined>(undefined);
|
||||
|
@ -75,7 +79,7 @@ const narrow = ref(false);
|
|||
const hasTabs = computed(() => props.tabs.length > 0);
|
||||
const hasActions = computed(() => props.actions && props.actions.length > 0);
|
||||
const show = computed(() => {
|
||||
return !hideTitle || hasTabs.value || hasActions.value;
|
||||
return !hideTitle.value || hasTabs.value || hasActions.value;
|
||||
});
|
||||
|
||||
const preventDrag = (ev: TouchEvent) => {
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<MkTooltip ref="tooltip" :showing="showing" :targetElement="targetElement" :maxWidth="250" @closed="emit('closed')">
|
||||
<div :class="$style.root">
|
||||
{{ content }}
|
||||
</div>
|
||||
</MkTooltip>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { } from 'vue';
|
||||
import MkTooltip from '@/components/MkTooltip.vue';
|
||||
|
||||
defineProps<{
|
||||
showing: boolean;
|
||||
content: string;
|
||||
targetElement: HTMLElement;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'closed'): void;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
.root {
|
||||
font-size: 0.9em;
|
||||
text-align: left;
|
||||
text-wrap: normal;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,418 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div
|
||||
v-if="cell.row.using"
|
||||
ref="rootEl"
|
||||
class="mk_grid_td"
|
||||
:class="$style.cell"
|
||||
:style="{ maxWidth: cellWidth, minWidth: cellWidth }"
|
||||
:tabindex="-1"
|
||||
data-grid-cell
|
||||
:data-grid-cell-row="cell.row.index"
|
||||
:data-grid-cell-col="cell.column.index"
|
||||
@keydown="onCellKeyDown"
|
||||
@dblclick.prevent="onCellDoubleClick"
|
||||
>
|
||||
<div
|
||||
:class="[
|
||||
$style.root,
|
||||
[(cell.violation.valid || cell.selected) ? {} : $style.error],
|
||||
[cell.selected ? $style.selected : {}],
|
||||
// 行が選択されているときは範囲選択色の適用を行側に任せる
|
||||
[(cell.ranged && !cell.row.ranged) ? $style.ranged : {}],
|
||||
[needsContentCentering ? $style.center : {}],
|
||||
]"
|
||||
>
|
||||
<div v-if="!editing" :class="[$style.contentArea]" :style="cellType === 'boolean' ? 'justify-content: center' : ''">
|
||||
<div ref="contentAreaEl" :class="$style.content">
|
||||
<div v-if="cellType === 'text'">
|
||||
{{ cell.value }}
|
||||
</div>
|
||||
<div v-if="cellType === 'number'">
|
||||
{{ cell.value }}
|
||||
</div>
|
||||
<div v-if="cellType === 'date'">
|
||||
{{ cell.value }}
|
||||
</div>
|
||||
<div v-else-if="cellType === 'boolean'">
|
||||
<div :class="[$style.bool, {
|
||||
[$style.boolTrue]: cell.value === true,
|
||||
'ti ti-check': cell.value === true,
|
||||
}]"></div>
|
||||
</div>
|
||||
<div v-else-if="cellType === 'image'">
|
||||
<img
|
||||
:src="cell.value"
|
||||
:alt="cell.value"
|
||||
:class="$style.viewImage"
|
||||
@load="emitContentSizeChanged"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else ref="inputAreaEl" :class="$style.inputArea">
|
||||
<input
|
||||
v-if="cellType === 'text'"
|
||||
type="text"
|
||||
:class="$style.editingInput"
|
||||
:value="editingValue"
|
||||
@input="onInputText"
|
||||
@mousedown.stop
|
||||
@contextmenu.stop
|
||||
/>
|
||||
<input
|
||||
v-if="cellType === 'number'"
|
||||
type="number"
|
||||
:class="$style.editingInput"
|
||||
:value="editingValue"
|
||||
@input="onInputText"
|
||||
@mousedown.stop
|
||||
@contextmenu.stop
|
||||
/>
|
||||
<input
|
||||
v-if="cellType === 'date'"
|
||||
type="date"
|
||||
:class="$style.editingInput"
|
||||
:value="editingValue"
|
||||
@input="onInputText"
|
||||
@mousedown.stop
|
||||
@contextmenu.stop
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, defineAsyncComponent, nextTick, onMounted, onUnmounted, ref, shallowRef, toRefs, watch } from 'vue';
|
||||
import { GridEventEmitter, Size } from '@/components/grid/grid.js';
|
||||
import { useTooltip } from '@/scripts/use-tooltip.js';
|
||||
import * as os from '@/os.js';
|
||||
import { CellValue, GridCell } from '@/components/grid/cell.js';
|
||||
import { equalCellAddress, getCellAddress } from '@/components/grid/grid-utils.js';
|
||||
import { GridRowSetting } from '@/components/grid/row.js';
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'operation:beginEdit', sender: GridCell): void;
|
||||
(ev: 'operation:endEdit', sender: GridCell): void;
|
||||
(ev: 'change:value', sender: GridCell, newValue: CellValue): void;
|
||||
(ev: 'change:contentSize', sender: GridCell, newSize: Size): void;
|
||||
}>();
|
||||
const props = defineProps<{
|
||||
cell: GridCell,
|
||||
rowSetting: GridRowSetting,
|
||||
bus: GridEventEmitter,
|
||||
}>();
|
||||
|
||||
const { cell, bus } = toRefs(props);
|
||||
|
||||
const rootEl = shallowRef<InstanceType<typeof HTMLTableCellElement>>();
|
||||
const contentAreaEl = shallowRef<InstanceType<typeof HTMLDivElement>>();
|
||||
const inputAreaEl = shallowRef<InstanceType<typeof HTMLDivElement>>();
|
||||
|
||||
/** 値が編集中かどうか */
|
||||
const editing = ref<boolean>(false);
|
||||
/** 編集中の値. {@link beginEditing}と{@link endEditing}内、および各inputタグやそのコールバックからの操作のみを想定する */
|
||||
const editingValue = ref<CellValue>(undefined);
|
||||
|
||||
const cellWidth = computed(() => cell.value.column.width);
|
||||
const cellType = computed(() => cell.value.column.setting.type);
|
||||
const needsContentCentering = computed(() => {
|
||||
switch (cellType.value) {
|
||||
case 'boolean':
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
watch(() => [cell.value.value], () => {
|
||||
// 中身がセットされた直後はサイズが分からないので、次のタイミングで更新する
|
||||
nextTick(emitContentSizeChanged);
|
||||
}, { immediate: true });
|
||||
|
||||
watch(() => cell.value.selected, () => {
|
||||
if (cell.value.selected) {
|
||||
requestFocus();
|
||||
}
|
||||
});
|
||||
|
||||
function onCellDoubleClick(ev: MouseEvent) {
|
||||
switch (ev.type) {
|
||||
case 'dblclick': {
|
||||
beginEditing(ev.target as HTMLElement);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onOutsideMouseDown(ev: MouseEvent) {
|
||||
const isOutside = ev.target instanceof Node && !rootEl.value?.contains(ev.target);
|
||||
if (isOutside || !equalCellAddress(cell.value.address, getCellAddress(ev.target as HTMLElement))) {
|
||||
endEditing(true, false);
|
||||
}
|
||||
}
|
||||
|
||||
function onCellKeyDown(ev: KeyboardEvent) {
|
||||
if (!editing.value) {
|
||||
ev.preventDefault();
|
||||
switch (ev.code) {
|
||||
case 'NumpadEnter':
|
||||
case 'Enter':
|
||||
case 'F2': {
|
||||
beginEditing(ev.target as HTMLElement);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
switch (ev.code) {
|
||||
case 'Escape': {
|
||||
endEditing(false, true);
|
||||
break;
|
||||
}
|
||||
case 'NumpadEnter':
|
||||
case 'Enter': {
|
||||
if (!ev.isComposing) {
|
||||
endEditing(true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onInputText(ev: Event) {
|
||||
editingValue.value = (ev.target as HTMLInputElement).value;
|
||||
}
|
||||
|
||||
function onForceRefreshContentSize() {
|
||||
emitContentSizeChanged();
|
||||
}
|
||||
|
||||
function registerOutsideMouseDown() {
|
||||
unregisterOutsideMouseDown();
|
||||
addEventListener('mousedown', onOutsideMouseDown);
|
||||
}
|
||||
|
||||
function unregisterOutsideMouseDown() {
|
||||
removeEventListener('mousedown', onOutsideMouseDown);
|
||||
}
|
||||
|
||||
async function beginEditing(target: HTMLElement) {
|
||||
if (editing.value || !cell.value.selected || !cell.value.column.setting.editable) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (cell.value.column.setting.customValueEditor) {
|
||||
emit('operation:beginEdit', cell.value);
|
||||
const newValue = await cell.value.column.setting.customValueEditor(
|
||||
cell.value.row,
|
||||
cell.value.column,
|
||||
cell.value.value,
|
||||
target,
|
||||
);
|
||||
emit('operation:endEdit', cell.value);
|
||||
|
||||
if (newValue !== cell.value.value) {
|
||||
emitValueChange(newValue);
|
||||
}
|
||||
|
||||
requestFocus();
|
||||
} else {
|
||||
switch (cellType.value) {
|
||||
case 'number':
|
||||
case 'date':
|
||||
case 'text': {
|
||||
editingValue.value = cell.value.value;
|
||||
editing.value = true;
|
||||
registerOutsideMouseDown();
|
||||
emit('operation:beginEdit', cell.value);
|
||||
|
||||
await nextTick(() => {
|
||||
// inputの展開後にフォーカスを当てたい
|
||||
if (inputAreaEl.value) {
|
||||
(inputAreaEl.value.querySelector('*') as HTMLElement).focus();
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
case 'boolean': {
|
||||
// とくに特殊なUIは設けず、トグルするだけ
|
||||
emitValueChange(!cell.value.value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function endEditing(applyValue: boolean, requireFocus: boolean) {
|
||||
if (!editing.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
const newValue = editingValue.value;
|
||||
editingValue.value = undefined;
|
||||
|
||||
emit('operation:endEdit', cell.value);
|
||||
unregisterOutsideMouseDown();
|
||||
|
||||
if (applyValue && newValue !== cell.value.value) {
|
||||
emitValueChange(newValue);
|
||||
}
|
||||
|
||||
editing.value = false;
|
||||
|
||||
if (requireFocus) {
|
||||
requestFocus();
|
||||
}
|
||||
}
|
||||
|
||||
function requestFocus() {
|
||||
nextTick(() => {
|
||||
rootEl.value?.focus();
|
||||
});
|
||||
}
|
||||
|
||||
function emitValueChange(newValue: CellValue) {
|
||||
const _cell = cell.value;
|
||||
emit('change:value', _cell, newValue);
|
||||
}
|
||||
|
||||
function emitContentSizeChanged() {
|
||||
emit('change:contentSize', cell.value, {
|
||||
width: contentAreaEl.value?.clientWidth ?? 0,
|
||||
height: contentAreaEl.value?.clientHeight ?? 0,
|
||||
});
|
||||
}
|
||||
|
||||
useTooltip(rootEl, (showing) => {
|
||||
if (cell.value.violation.valid) {
|
||||
return;
|
||||
}
|
||||
|
||||
const content = cell.value.violation.violations.filter(it => !it.valid).map(it => it.result.message).join('\n');
|
||||
const result = os.popup(defineAsyncComponent(() => import('@/components/grid/MkCellTooltip.vue')), {
|
||||
showing,
|
||||
content,
|
||||
targetElement: rootEl.value!,
|
||||
}, {
|
||||
closed: () => {
|
||||
result.dispose();
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
bus.value.on('forceRefreshContentSize', onForceRefreshContentSize);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
bus.value.off('forceRefreshContentSize', onForceRefreshContentSize);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style module lang="scss">
|
||||
$cellHeight: 28px;
|
||||
|
||||
.cell {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
height: $cellHeight;
|
||||
max-height: $cellHeight;
|
||||
min-height: $cellHeight;
|
||||
cursor: cell;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
.root {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
|
||||
// selected適用時に中身がズレてしまうので、透明の線をあらかじめ引いておきたい
|
||||
border: solid 0.5px transparent;
|
||||
|
||||
&.selected {
|
||||
border: solid 0.5px var(--MI_THEME-accentLighten);
|
||||
}
|
||||
|
||||
&.ranged {
|
||||
background-color: var(--MI_THEME-accentedBg);
|
||||
}
|
||||
|
||||
&.center {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
&.error {
|
||||
border: solid 0.5px var(--MI_THEME-error);
|
||||
}
|
||||
}
|
||||
|
||||
.contentArea, .inputArea {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: inline-block;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.viewImage {
|
||||
width: auto;
|
||||
max-height: $cellHeight;
|
||||
height: $cellHeight;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.bool {
|
||||
position: relative;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: var(--MI_THEME-panel);
|
||||
border: solid 2px var(--MI_THEME-divider);
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
|
||||
&.boolTrue {
|
||||
border-color: var(--MI_THEME-accent);
|
||||
background: var(--MI_THEME-accent);
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
color: var(--MI_THEME-fgOnAccent);
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.editingInput {
|
||||
padding: 0 8px;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
box-sizing: border-box;
|
||||
min-height: $cellHeight - 2;
|
||||
max-height: $cellHeight - 2;
|
||||
height: $cellHeight - 2;
|
||||
outline: none;
|
||||
border: none;
|
||||
font-family: 'Hiragino Maru Gothic Pro', "BIZ UDGothic", Roboto, HelveticaNeue, Arial, sans-serif;
|
||||
}
|
||||
|
||||
</style>
|
|
@ -0,0 +1,72 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="mk_grid_tr"
|
||||
:class="[
|
||||
$style.row,
|
||||
row.ranged ? $style.ranged : {},
|
||||
...(row.additionalStyles ?? []).map(it => it.className ?? {}),
|
||||
]"
|
||||
:style="[
|
||||
...(row.additionalStyles ?? []).map(it => it.style ?? {}),
|
||||
]"
|
||||
:data-grid-row="row.index"
|
||||
>
|
||||
<MkNumberCell
|
||||
v-if="setting.showNumber"
|
||||
:content="(row.index + 1).toString()"
|
||||
:row="row"
|
||||
/>
|
||||
<MkDataCell
|
||||
v-for="cell in cells"
|
||||
:key="cell.address.col"
|
||||
:vIf="cell.column.setting.type !== 'hidden'"
|
||||
:cell="cell"
|
||||
:rowSetting="setting"
|
||||
:bus="bus"
|
||||
@operation:beginEdit="(sender) => emit('operation:beginEdit', sender)"
|
||||
@operation:endEdit="(sender) => emit('operation:endEdit', sender)"
|
||||
@change:value="(sender, newValue) => emit('change:value', sender, newValue)"
|
||||
@change:contentSize="(sender, newSize) => emit('change:contentSize', sender, newSize)"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { GridEventEmitter, Size } from '@/components/grid/grid.js';
|
||||
import MkDataCell from '@/components/grid/MkDataCell.vue';
|
||||
import MkNumberCell from '@/components/grid/MkNumberCell.vue';
|
||||
import { CellValue, GridCell } from '@/components/grid/cell.js';
|
||||
import { GridRow, GridRowSetting } from '@/components/grid/row.js';
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'operation:beginEdit', sender: GridCell): void;
|
||||
(ev: 'operation:endEdit', sender: GridCell): void;
|
||||
(ev: 'change:value', sender: GridCell, newValue: CellValue): void;
|
||||
(ev: 'change:contentSize', sender: GridCell, newSize: Size): void;
|
||||
}>();
|
||||
defineProps<{
|
||||
row: GridRow,
|
||||
cells: GridCell[],
|
||||
setting: GridRowSetting,
|
||||
bus: GridEventEmitter,
|
||||
}>();
|
||||
|
||||
</script>
|
||||
|
||||
<style module lang="scss">
|
||||
.row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
|
||||
&.ranged {
|
||||
background-color: var(--MI_THEME-accentedBg);
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,223 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import { ref } from 'vue';
|
||||
import { commonHandlers } from '../../../.storybook/mocks.js';
|
||||
import { boolean, choose, country, date, firstName, integer, lastName, text } from '../../../.storybook/fake-utils.js';
|
||||
import MkGrid from './MkGrid.vue';
|
||||
import { GridContext, GridEvent } from '@/components/grid/grid-event.js';
|
||||
import { DataSource, GridSetting } from '@/components/grid/grid.js';
|
||||
import { GridColumnSetting } from '@/components/grid/column.js';
|
||||
|
||||
function d(p: {
|
||||
check?: boolean,
|
||||
name?: string,
|
||||
email?: string,
|
||||
age?: number,
|
||||
birthday?: string,
|
||||
gender?: string,
|
||||
country?: string,
|
||||
reportCount?: number,
|
||||
createdAt?: string,
|
||||
}, seed: string) {
|
||||
const prefix = text(10, seed);
|
||||
|
||||
return {
|
||||
check: p.check ?? boolean(seed),
|
||||
name: p.name ?? `${firstName(seed)} ${lastName(seed)}`,
|
||||
email: p.email ?? `${prefix}@example.com`,
|
||||
age: p.age ?? integer(20, 80, seed),
|
||||
birthday: date({}, seed).toISOString(),
|
||||
gender: p.gender ?? choose(['male', 'female', 'other', 'unknown'], seed),
|
||||
country: p.country ?? country(seed),
|
||||
reportCount: p.reportCount ?? integer(0, 9999, seed),
|
||||
createdAt: p.createdAt ?? date({}, seed).toISOString(),
|
||||
};
|
||||
}
|
||||
|
||||
const defaultCols: GridColumnSetting[] = [
|
||||
{ bindTo: 'check', icon: 'ti-check', type: 'boolean', width: 50 },
|
||||
{ bindTo: 'name', title: 'Name', type: 'text', width: 'auto' },
|
||||
{ bindTo: 'email', title: 'Email', type: 'text', width: 'auto' },
|
||||
{ bindTo: 'age', title: 'Age', type: 'number', width: 50 },
|
||||
{ bindTo: 'birthday', title: 'Birthday', type: 'date', width: 'auto' },
|
||||
{ bindTo: 'gender', title: 'Gender', type: 'text', width: 80 },
|
||||
{ bindTo: 'country', title: 'Country', type: 'text', width: 120 },
|
||||
{ bindTo: 'reportCount', title: 'ReportCount', type: 'number', width: 'auto' },
|
||||
{ bindTo: 'createdAt', title: 'CreatedAt', type: 'date', width: 'auto' },
|
||||
];
|
||||
|
||||
function createArgs(overrides?: { settings?: Partial<GridSetting>, data?: DataSource[] }) {
|
||||
const refData = ref<ReturnType<typeof d>[]>([]);
|
||||
for (let i = 0; i < 100; i++) {
|
||||
refData.value.push(d({}, i.toString()));
|
||||
}
|
||||
|
||||
return {
|
||||
settings: {
|
||||
row: overrides?.settings?.row,
|
||||
cols: [
|
||||
...defaultCols.filter(col => overrides?.settings?.cols?.every(c => c.bindTo !== col.bindTo) ?? true),
|
||||
...overrides?.settings?.cols ?? [],
|
||||
],
|
||||
cells: overrides?.settings?.cells,
|
||||
},
|
||||
data: refData.value,
|
||||
};
|
||||
}
|
||||
|
||||
function createRender(params: { settings: GridSetting, data: DataSource[] }) {
|
||||
return {
|
||||
render(args) {
|
||||
return {
|
||||
components: {
|
||||
MkGrid,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
args,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
data: args.data,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
props() {
|
||||
return {
|
||||
...args,
|
||||
};
|
||||
},
|
||||
events() {
|
||||
return {
|
||||
event: (event: GridEvent, context: GridContext) => {
|
||||
switch (event.type) {
|
||||
case 'cell-value-change': {
|
||||
args.data[event.row.index][event.column.setting.bindTo] = event.newValue;
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
},
|
||||
template: '<div style="padding:20px"><MkGrid v-bind="props" v-on="events" /></div>',
|
||||
};
|
||||
},
|
||||
args: {
|
||||
...params,
|
||||
},
|
||||
parameters: {
|
||||
layout: 'fullscreen',
|
||||
msw: {
|
||||
handlers: [
|
||||
...commonHandlers,
|
||||
],
|
||||
},
|
||||
},
|
||||
} satisfies StoryObj<typeof MkGrid>;
|
||||
}
|
||||
|
||||
export const Default = createRender(createArgs());
|
||||
|
||||
export const NoNumber = createRender(createArgs({
|
||||
settings: {
|
||||
row: {
|
||||
showNumber: false,
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
export const NoSelectable = createRender(createArgs({
|
||||
settings: {
|
||||
row: {
|
||||
selectable: false,
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
export const Editable = createRender(createArgs({
|
||||
settings: {
|
||||
cols: defaultCols.map(col => ({ ...col, editable: true })),
|
||||
},
|
||||
}));
|
||||
|
||||
export const AdditionalRowStyle = createRender(createArgs({
|
||||
settings: {
|
||||
cols: defaultCols.map(col => ({ ...col, editable: true })),
|
||||
row: {
|
||||
styleRules: [
|
||||
{
|
||||
condition: ({ row }) => AdditionalRowStyle.args.data[row.index].check as boolean,
|
||||
applyStyle: {
|
||||
style: {
|
||||
backgroundColor: 'lightgray',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
export const ContextMenu = createRender(createArgs({
|
||||
settings: {
|
||||
cols: [
|
||||
{
|
||||
bindTo: 'check', icon: 'ti-check', type: 'boolean', width: 50, contextMenuFactory: (col, context) => [
|
||||
{
|
||||
type: 'button',
|
||||
text: 'Check All',
|
||||
action: () => {
|
||||
for (const d of ContextMenu.args.data) {
|
||||
d.check = true;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
text: 'Uncheck All',
|
||||
action: () => {
|
||||
for (const d of ContextMenu.args.data) {
|
||||
d.check = false;
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
row: {
|
||||
contextMenuFactory: (row, context) => [
|
||||
{
|
||||
type: 'button',
|
||||
text: 'Delete',
|
||||
action: () => {
|
||||
const idxes = context.rangedRows.map(r => r.index);
|
||||
const newData = ContextMenu.args.data.filter((d, i) => !idxes.includes(i));
|
||||
|
||||
ContextMenu.args.data.splice(0);
|
||||
ContextMenu.args.data.push(...newData);
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
cells: {
|
||||
contextMenuFactory: (col, row, value, context) => [
|
||||
{
|
||||
type: 'button',
|
||||
text: 'Delete',
|
||||
action: () => {
|
||||
for (const cell of context.rangedCells) {
|
||||
ContextMenu.args.data[cell.row.index][cell.column.setting.bindTo] = undefined;
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
}));
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,216 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div
|
||||
ref="rootEl"
|
||||
class="mk_grid_th"
|
||||
:class="$style.cell"
|
||||
:style="[{ maxWidth: column.width, minWidth: column.width, width: column.width }]"
|
||||
data-grid-cell
|
||||
:data-grid-cell-row="-1"
|
||||
:data-grid-cell-col="column.index"
|
||||
>
|
||||
<div :class="$style.root">
|
||||
<div :class="$style.left"></div>
|
||||
<div :class="$style.wrapper">
|
||||
<div ref="contentEl" :class="$style.contentArea">
|
||||
<span v-if="column.setting.icon" class="ti" :class="column.setting.icon" style="line-height: normal"></span>
|
||||
<span v-else>{{ text }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
:class="$style.right"
|
||||
@mousedown="onHandleMouseDown"
|
||||
@dblclick="onHandleDoubleClick"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, onMounted, onUnmounted, ref, toRefs, watch } from 'vue';
|
||||
import { GridEventEmitter, Size } from '@/components/grid/grid.js';
|
||||
import { GridColumn } from '@/components/grid/column.js';
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'operation:beginWidthChange', sender: GridColumn): void;
|
||||
(ev: 'operation:endWidthChange', sender: GridColumn): void;
|
||||
(ev: 'operation:widthLargest', sender: GridColumn): void;
|
||||
(ev: 'change:width', sender: GridColumn, width: string): void;
|
||||
(ev: 'change:contentSize', sender: GridColumn, newSize: Size): void;
|
||||
}>();
|
||||
const props = defineProps<{
|
||||
column: GridColumn,
|
||||
bus: GridEventEmitter,
|
||||
}>();
|
||||
|
||||
const { column, bus } = toRefs(props);
|
||||
|
||||
const rootEl = ref<InstanceType<typeof HTMLTableCellElement>>();
|
||||
const contentEl = ref<InstanceType<typeof HTMLDivElement>>();
|
||||
|
||||
const resizing = ref<boolean>(false);
|
||||
|
||||
const text = computed(() => {
|
||||
const result = column.value.setting.title ?? column.value.setting.bindTo;
|
||||
return result.length > 0 ? result : ' ';
|
||||
});
|
||||
|
||||
watch(column, () => {
|
||||
// 中身がセットされた直後はサイズが分からないので、次のタイミングで更新する
|
||||
nextTick(emitContentSizeChanged);
|
||||
}, { immediate: true });
|
||||
|
||||
function onHandleDoubleClick(ev: MouseEvent) {
|
||||
switch (ev.type) {
|
||||
case 'dblclick': {
|
||||
emit('operation:widthLargest', column.value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onHandleMouseDown(ev: MouseEvent) {
|
||||
switch (ev.type) {
|
||||
case 'mousedown': {
|
||||
if (!resizing.value) {
|
||||
registerHandleMouseUp();
|
||||
registerHandleMouseMove();
|
||||
resizing.value = true;
|
||||
emit('operation:beginWidthChange', column.value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onHandleMouseMove(ev: MouseEvent) {
|
||||
if (!rootEl.value) {
|
||||
// 型ガード
|
||||
return;
|
||||
}
|
||||
|
||||
switch (ev.type) {
|
||||
case 'mousemove': {
|
||||
if (resizing.value) {
|
||||
const bounds = rootEl.value.getBoundingClientRect();
|
||||
const clientWidth = rootEl.value.clientWidth;
|
||||
const clientRight = bounds.left + clientWidth;
|
||||
const nextWidth = clientWidth + (ev.clientX - clientRight);
|
||||
emit('change:width', column.value, `${nextWidth}px`);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onHandleMouseUp(ev: MouseEvent) {
|
||||
switch (ev.type) {
|
||||
case 'mouseup': {
|
||||
if (resizing.value) {
|
||||
unregisterHandleMouseUp();
|
||||
unregisterHandleMouseMove();
|
||||
resizing.value = false;
|
||||
emit('operation:endWidthChange', column.value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onForceRefreshContentSize() {
|
||||
emitContentSizeChanged();
|
||||
}
|
||||
|
||||
function registerHandleMouseMove() {
|
||||
unregisterHandleMouseMove();
|
||||
addEventListener('mousemove', onHandleMouseMove);
|
||||
}
|
||||
|
||||
function unregisterHandleMouseMove() {
|
||||
removeEventListener('mousemove', onHandleMouseMove);
|
||||
}
|
||||
|
||||
function registerHandleMouseUp() {
|
||||
unregisterHandleMouseUp();
|
||||
addEventListener('mouseup', onHandleMouseUp);
|
||||
}
|
||||
|
||||
function unregisterHandleMouseUp() {
|
||||
removeEventListener('mouseup', onHandleMouseUp);
|
||||
}
|
||||
|
||||
function emitContentSizeChanged() {
|
||||
const clientWidth = contentEl.value?.clientWidth ?? 0;
|
||||
const clientHeight = contentEl.value?.clientHeight ?? 0;
|
||||
emit('change:contentSize', column.value, {
|
||||
// バーの横幅も考慮したいので、+3px
|
||||
width: clientWidth + 3 + 3,
|
||||
height: clientHeight,
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
bus.value.on('forceRefreshContentSize', onForceRefreshContentSize);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
bus.value.off('forceRefreshContentSize', onForceRefreshContentSize);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style module lang="scss">
|
||||
$handleWidth: 5px;
|
||||
$cellHeight: 28px;
|
||||
|
||||
.cell {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.root {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: $cellHeight;
|
||||
max-height: $cellHeight;
|
||||
min-height: $cellHeight;
|
||||
|
||||
.wrapper {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
overflow: hidden;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.contentArea {
|
||||
display: flex;
|
||||
padding: 6px 4px;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.left {
|
||||
// rightのぶんだけズレるのでそれを相殺するためのネガティブマージン
|
||||
margin-left: -$handleWidth;
|
||||
margin-right: auto;
|
||||
width: $handleWidth;
|
||||
min-width: $handleWidth;
|
||||
}
|
||||
|
||||
.right {
|
||||
margin-left: auto;
|
||||
// 判定を罫線の上に重ねたいのでネガティブマージンを使う
|
||||
margin-right: -$handleWidth;
|
||||
width: $handleWidth;
|
||||
min-width: $handleWidth;
|
||||
cursor: w-resize;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,60 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="mk_grid_tr"
|
||||
:class="$style.root"
|
||||
:data-grid-row="-1"
|
||||
>
|
||||
<MkNumberCell
|
||||
v-if="gridSetting.showNumber"
|
||||
content="#"
|
||||
:top="true"
|
||||
/>
|
||||
<MkHeaderCell
|
||||
v-for="column in columns"
|
||||
:key="column.index"
|
||||
:column="column"
|
||||
:bus="bus"
|
||||
@operation:beginWidthChange="(sender) => emit('operation:beginWidthChange', sender)"
|
||||
@operation:endWidthChange="(sender) => emit('operation:endWidthChange', sender)"
|
||||
@operation:widthLargest="(sender) => emit('operation:widthLargest', sender)"
|
||||
@change:width="(sender, width) => emit('change:width', sender, width)"
|
||||
@change:contentSize="(sender, newSize) => emit('change:contentSize', sender, newSize)"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { GridEventEmitter, Size } from '@/components/grid/grid.js';
|
||||
import MkHeaderCell from '@/components/grid/MkHeaderCell.vue';
|
||||
import MkNumberCell from '@/components/grid/MkNumberCell.vue';
|
||||
import { GridColumn } from '@/components/grid/column.js';
|
||||
import { GridRowSetting } from '@/components/grid/row.js';
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'operation:beginWidthChange', sender: GridColumn): void;
|
||||
(ev: 'operation:endWidthChange', sender: GridColumn): void;
|
||||
(ev: 'operation:widthLargest', sender: GridColumn): void;
|
||||
(ev: 'operation:selectionColumn', sender: GridColumn): void;
|
||||
(ev: 'change:width', sender: GridColumn, width: string): void;
|
||||
(ev: 'change:contentSize', sender: GridColumn, newSize: Size): void;
|
||||
}>();
|
||||
|
||||
defineProps<{
|
||||
columns: GridColumn[],
|
||||
gridSetting: GridRowSetting,
|
||||
bus: GridEventEmitter,
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<style module lang="scss">
|
||||
.root {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,61 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="mk_grid_th"
|
||||
:class="[$style.cell]"
|
||||
:tabindex="-1"
|
||||
data-grid-cell
|
||||
:data-grid-cell-row="row?.index ?? -1"
|
||||
:data-grid-cell-col="-1"
|
||||
>
|
||||
<div :class="[$style.root]">
|
||||
{{ content }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import { GridRow } from '@/components/grid/row.js';
|
||||
|
||||
defineProps<{
|
||||
content: string,
|
||||
row?: GridRow,
|
||||
}>();
|
||||
|
||||
</script>
|
||||
|
||||
<style module lang="scss">
|
||||
$cellHeight: 28px;
|
||||
$cellWidth: 34px;
|
||||
|
||||
.cell {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
height: $cellHeight;
|
||||
max-height: $cellHeight;
|
||||
min-height: $cellHeight;
|
||||
min-width: $cellWidth;
|
||||
width: $cellWidth;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.root {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: 0 8px;
|
||||
height: 100%;
|
||||
border: solid 0.5px transparent;
|
||||
|
||||
&.selected {
|
||||
background-color: var(--MI_THEME-accentedBg);
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,110 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { CellValue, GridCell } from '@/components/grid/cell.js';
|
||||
import { GridColumn } from '@/components/grid/column.js';
|
||||
import { GridRow } from '@/components/grid/row.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
|
||||
export type ValidatorParams = {
|
||||
column: GridColumn;
|
||||
row: GridRow;
|
||||
value: CellValue;
|
||||
allCells: GridCell[];
|
||||
};
|
||||
|
||||
export type ValidatorResult = {
|
||||
valid: boolean;
|
||||
message?: string;
|
||||
}
|
||||
|
||||
export type GridCellValidator = {
|
||||
name?: string;
|
||||
ignoreViolation?: boolean;
|
||||
validate: (params: ValidatorParams) => ValidatorResult;
|
||||
}
|
||||
|
||||
export type ValidateViolation = {
|
||||
valid: boolean;
|
||||
params: ValidatorParams;
|
||||
violations: ValidateViolationItem[];
|
||||
}
|
||||
|
||||
export type ValidateViolationItem = {
|
||||
valid: boolean;
|
||||
validator: GridCellValidator;
|
||||
result: ValidatorResult;
|
||||
}
|
||||
|
||||
export function cellValidation(allCells: GridCell[], cell: GridCell, newValue: CellValue): ValidateViolation {
|
||||
const { column, row } = cell;
|
||||
const validators = column.setting.validators ?? [];
|
||||
|
||||
const params: ValidatorParams = {
|
||||
column,
|
||||
row,
|
||||
value: newValue,
|
||||
allCells,
|
||||
};
|
||||
|
||||
const violations: ValidateViolationItem[] = validators.map(validator => {
|
||||
const result = validator.validate(params);
|
||||
return {
|
||||
valid: result.valid,
|
||||
validator,
|
||||
result,
|
||||
};
|
||||
});
|
||||
|
||||
return {
|
||||
valid: violations.every(v => v.result.valid),
|
||||
params,
|
||||
violations,
|
||||
};
|
||||
}
|
||||
|
||||
class ValidatorPreset {
|
||||
required(): GridCellValidator {
|
||||
return {
|
||||
name: 'required',
|
||||
validate: ({ value }): ValidatorResult => {
|
||||
return {
|
||||
valid: value !== null && value !== undefined && value !== '',
|
||||
message: i18n.ts._gridComponent._error.requiredValue,
|
||||
};
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
regex(pattern: RegExp): GridCellValidator {
|
||||
return {
|
||||
name: 'regex',
|
||||
validate: ({ value }): ValidatorResult => {
|
||||
return {
|
||||
valid: (typeof value !== 'string') || pattern.test(value.toString() ?? ''),
|
||||
message: i18n.tsx._gridComponent._error.patternNotMatch({ pattern: pattern.source }),
|
||||
};
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
unique(): GridCellValidator {
|
||||
return {
|
||||
name: 'unique',
|
||||
validate: ({ column, row, value, allCells }): ValidatorResult => {
|
||||
const bindTo = column.setting.bindTo;
|
||||
const isUnique = allCells
|
||||
.filter(it => it.column.setting.bindTo === bindTo && it.row.index !== row.index)
|
||||
.every(cell => cell.value !== value);
|
||||
return {
|
||||
valid: isUnique,
|
||||
message: i18n.ts._gridComponent._error.notUnique,
|
||||
};
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export const validators = new ValidatorPreset();
|
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { ValidateViolation } from '@/components/grid/cell-validators.js';
|
||||
import { Size } from '@/components/grid/grid.js';
|
||||
import { GridColumn } from '@/components/grid/column.js';
|
||||
import { GridRow } from '@/components/grid/row.js';
|
||||
import { MenuItem } from '@/types/menu.js';
|
||||
import { GridContext } from '@/components/grid/grid-event.js';
|
||||
|
||||
export type CellValue = string | boolean | number | undefined | null | Array<unknown> | NonNullable<unknown>;
|
||||
|
||||
export type CellAddress = {
|
||||
row: number;
|
||||
col: number;
|
||||
}
|
||||
|
||||
export const CELL_ADDRESS_NONE: CellAddress = {
|
||||
row: -1,
|
||||
col: -1,
|
||||
};
|
||||
|
||||
export type GridCell = {
|
||||
address: CellAddress;
|
||||
value: CellValue;
|
||||
column: GridColumn;
|
||||
row: GridRow;
|
||||
selected: boolean;
|
||||
ranged: boolean;
|
||||
contentSize: Size;
|
||||
setting: GridCellSetting;
|
||||
violation: ValidateViolation;
|
||||
}
|
||||
|
||||
export type GridCellContextMenuFactory = (col: GridColumn, row: GridRow, value: CellValue, context: GridContext) => MenuItem[];
|
||||
|
||||
export type GridCellSetting = {
|
||||
contextMenuFactory?: GridCellContextMenuFactory;
|
||||
}
|
||||
|
||||
export function createCell(
|
||||
column: GridColumn,
|
||||
row: GridRow,
|
||||
value: CellValue,
|
||||
setting: GridCellSetting,
|
||||
): GridCell {
|
||||
const newValue = (row.using && column.setting.valueTransformer)
|
||||
? column.setting.valueTransformer(row, column, value)
|
||||
: value;
|
||||
|
||||
return {
|
||||
address: { row: row.index, col: column.index },
|
||||
value: newValue,
|
||||
column,
|
||||
row,
|
||||
selected: false,
|
||||
ranged: false,
|
||||
contentSize: { width: 0, height: 0 },
|
||||
violation: {
|
||||
valid: true,
|
||||
params: {
|
||||
column,
|
||||
row,
|
||||
value,
|
||||
allCells: [],
|
||||
},
|
||||
violations: [],
|
||||
},
|
||||
setting,
|
||||
};
|
||||
}
|
||||
|
||||
export function resetCell(cell: GridCell): void {
|
||||
cell.selected = false;
|
||||
cell.ranged = false;
|
||||
cell.violation = {
|
||||
valid: true,
|
||||
params: {
|
||||
column: cell.column,
|
||||
row: cell.row,
|
||||
value: cell.value,
|
||||
allCells: [],
|
||||
},
|
||||
violations: [],
|
||||
};
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { GridCellValidator } from '@/components/grid/cell-validators.js';
|
||||
import { Size, SizeStyle } from '@/components/grid/grid.js';
|
||||
import { calcCellWidth } from '@/components/grid/grid-utils.js';
|
||||
import { CellValue, GridCell } from '@/components/grid/cell.js';
|
||||
import { GridRow } from '@/components/grid/row.js';
|
||||
import { MenuItem } from '@/types/menu.js';
|
||||
import { GridContext } from '@/components/grid/grid-event.js';
|
||||
|
||||
export type ColumnType = 'text' | 'number' | 'date' | 'boolean' | 'image' | 'hidden';
|
||||
|
||||
export type CustomValueEditor = (row: GridRow, col: GridColumn, value: CellValue, cellElement: HTMLElement) => Promise<CellValue>;
|
||||
export type CellValueTransformer = (row: GridRow, col: GridColumn, value: CellValue) => CellValue;
|
||||
export type GridColumnContextMenuFactory = (col: GridColumn, context: GridContext) => MenuItem[];
|
||||
|
||||
export type GridColumnSetting = {
|
||||
bindTo: string;
|
||||
title?: string;
|
||||
icon?: string;
|
||||
type: ColumnType;
|
||||
width: SizeStyle;
|
||||
editable?: boolean;
|
||||
validators?: GridCellValidator[];
|
||||
customValueEditor?: CustomValueEditor;
|
||||
valueTransformer?: CellValueTransformer;
|
||||
contextMenuFactory?: GridColumnContextMenuFactory;
|
||||
events?: {
|
||||
copy?: (value: CellValue) => string;
|
||||
paste?: (text: string) => CellValue;
|
||||
delete?: (cell: GridCell, context: GridContext) => void;
|
||||
}
|
||||
};
|
||||
|
||||
export type GridColumn = {
|
||||
index: number;
|
||||
setting: GridColumnSetting;
|
||||
width: string;
|
||||
contentSize: Size;
|
||||
}
|
||||
|
||||
export function createColumn(setting: GridColumnSetting, index: number): GridColumn {
|
||||
return {
|
||||
index,
|
||||
setting,
|
||||
width: calcCellWidth(setting.width),
|
||||
contentSize: { width: 0, height: 0 },
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { CellAddress, CellValue, GridCell } from '@/components/grid/cell.js';
|
||||
import { GridState } from '@/components/grid/grid.js';
|
||||
import { ValidateViolation } from '@/components/grid/cell-validators.js';
|
||||
import { GridColumn } from '@/components/grid/column.js';
|
||||
import { GridRow } from '@/components/grid/row.js';
|
||||
|
||||
export type GridContext = {
|
||||
selectedCell?: GridCell;
|
||||
rangedCells: GridCell[];
|
||||
rangedRows: GridRow[];
|
||||
randedBounds: {
|
||||
leftTop: CellAddress;
|
||||
rightBottom: CellAddress;
|
||||
};
|
||||
availableBounds: {
|
||||
leftTop: CellAddress;
|
||||
rightBottom: CellAddress;
|
||||
};
|
||||
state: GridState;
|
||||
rows: GridRow[];
|
||||
columns: GridColumn[];
|
||||
};
|
||||
|
||||
export type GridEvent =
|
||||
GridCellValueChangeEvent |
|
||||
GridCellValidationEvent
|
||||
;
|
||||
|
||||
export type GridCellValueChangeEvent = {
|
||||
type: 'cell-value-change';
|
||||
column: GridColumn;
|
||||
row: GridRow;
|
||||
oldValue: CellValue;
|
||||
newValue: CellValue;
|
||||
};
|
||||
|
||||
export type GridCellValidationEvent = {
|
||||
type: 'cell-validation';
|
||||
violation?: ValidateViolation;
|
||||
all: ValidateViolation[];
|
||||
};
|
|
@ -0,0 +1,215 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { isRef, Ref } from 'vue';
|
||||
import { DataSource, SizeStyle } from '@/components/grid/grid.js';
|
||||
import { CELL_ADDRESS_NONE, CellAddress, CellValue, GridCell } from '@/components/grid/cell.js';
|
||||
import { GridRow } from '@/components/grid/row.js';
|
||||
import { GridContext } from '@/components/grid/grid-event.js';
|
||||
import { copyToClipboard } from '@/scripts/copy-to-clipboard.js';
|
||||
import { GridColumn, GridColumnSetting } from '@/components/grid/column.js';
|
||||
|
||||
export function isCellElement(elem: HTMLElement): boolean {
|
||||
return elem.hasAttribute('data-grid-cell');
|
||||
}
|
||||
|
||||
export function isRowElement(elem: HTMLElement): boolean {
|
||||
return elem.hasAttribute('data-grid-row');
|
||||
}
|
||||
|
||||
export function calcCellWidth(widthSetting: SizeStyle): string {
|
||||
switch (widthSetting) {
|
||||
case undefined:
|
||||
case 'auto': {
|
||||
return 'auto';
|
||||
}
|
||||
default: {
|
||||
return `${widthSetting}px`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getCellRowByAttribute(elem: HTMLElement): number {
|
||||
const row = elem.getAttribute('data-grid-cell-row');
|
||||
if (row === null) {
|
||||
throw new Error('data-grid-cell-row attribute not found');
|
||||
}
|
||||
return Number(row);
|
||||
}
|
||||
|
||||
function getCellColByAttribute(elem: HTMLElement): number {
|
||||
const col = elem.getAttribute('data-grid-cell-col');
|
||||
if (col === null) {
|
||||
throw new Error('data-grid-cell-col attribute not found');
|
||||
}
|
||||
return Number(col);
|
||||
}
|
||||
|
||||
export function getCellAddress(elem: HTMLElement, parentNodeCount = 10): CellAddress {
|
||||
let node = elem;
|
||||
for (let i = 0; i < parentNodeCount; i++) {
|
||||
if (!node.parentElement) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (isCellElement(node) && isRowElement(node.parentElement)) {
|
||||
const row = getCellRowByAttribute(node);
|
||||
const col = getCellColByAttribute(node);
|
||||
|
||||
return { row, col };
|
||||
}
|
||||
|
||||
node = node.parentElement;
|
||||
}
|
||||
|
||||
return CELL_ADDRESS_NONE;
|
||||
}
|
||||
|
||||
export function getCellElement(elem: HTMLElement, parentNodeCount = 10): HTMLElement | null {
|
||||
let node = elem;
|
||||
for (let i = 0; i < parentNodeCount; i++) {
|
||||
if (isCellElement(node)) {
|
||||
return node;
|
||||
}
|
||||
|
||||
if (!node.parentElement) {
|
||||
break;
|
||||
}
|
||||
|
||||
node = node.parentElement;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
export function equalCellAddress(a: CellAddress, b: CellAddress): boolean {
|
||||
return a.row === b.row && a.col === b.col;
|
||||
}
|
||||
|
||||
/**
|
||||
* グリッドの選択範囲の内容をタブ区切り形式テキストに変換してクリップボードにコピーする。
|
||||
*/
|
||||
export function copyGridDataToClipboard(
|
||||
gridItems: Ref<DataSource[]> | DataSource[],
|
||||
context: GridContext,
|
||||
) {
|
||||
const items = isRef(gridItems) ? gridItems.value : gridItems;
|
||||
const lines = Array.of<string>();
|
||||
const bounds = context.randedBounds;
|
||||
|
||||
for (let row = bounds.leftTop.row; row <= bounds.rightBottom.row; row++) {
|
||||
const rowItems = Array.of<string>();
|
||||
for (let col = bounds.leftTop.col; col <= bounds.rightBottom.col; col++) {
|
||||
const { bindTo, events } = context.columns[col].setting;
|
||||
const value = items[row][bindTo];
|
||||
const transformValue = events?.copy
|
||||
? events.copy(value)
|
||||
: typeof value === 'object' || Array.isArray(value)
|
||||
? JSON.stringify(value)
|
||||
: value?.toString() ?? '';
|
||||
rowItems.push(transformValue);
|
||||
}
|
||||
lines.push(rowItems.join('\t'));
|
||||
}
|
||||
|
||||
const text = lines.join('\n');
|
||||
copyToClipboard(text);
|
||||
|
||||
if (_DEV_) {
|
||||
console.log(`Copied to clipboard: ${text}`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* クリップボードからタブ区切りテキストとして値を読み取り、グリッドの選択範囲に貼り付けるためのユーティリティ関数。
|
||||
* …と言いつつも、使用箇所により反映方法に差があるため更新操作はコールバック関数に任せている。
|
||||
*/
|
||||
export async function pasteToGridFromClipboard(
|
||||
context: GridContext,
|
||||
callback: (row: GridRow, col: GridColumn, parsedValue: CellValue) => void,
|
||||
) {
|
||||
function parseValue(value: string, setting: GridColumnSetting): CellValue {
|
||||
if (setting.events?.paste) {
|
||||
return setting.events.paste(value);
|
||||
} else {
|
||||
switch (setting.type) {
|
||||
case 'number': {
|
||||
return Number(value);
|
||||
}
|
||||
case 'boolean': {
|
||||
return value === 'true';
|
||||
}
|
||||
default: {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const clipBoardText = await navigator.clipboard.readText();
|
||||
if (_DEV_) {
|
||||
console.log(`Paste from clipboard: ${clipBoardText}`);
|
||||
}
|
||||
|
||||
const bounds = context.randedBounds;
|
||||
const lines = clipBoardText.replace(/\r/g, '')
|
||||
.split('\n')
|
||||
.map(it => it.split('\t'));
|
||||
|
||||
if (lines.length === 1 && lines[0].length === 1) {
|
||||
// 単独文字列の場合は選択範囲全体に同じテキストを貼り付ける
|
||||
const ranges = context.rangedCells;
|
||||
for (const cell of ranges) {
|
||||
if (cell.column.setting.editable) {
|
||||
callback(cell.row, cell.column, parseValue(lines[0][0], cell.column.setting));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 表形式文字列の場合は表形式にパースし、選択範囲に合うように貼り付ける
|
||||
const offsetRow = bounds.leftTop.row;
|
||||
const offsetCol = bounds.leftTop.col;
|
||||
const { columns, rows } = context;
|
||||
for (let row = bounds.leftTop.row; row <= bounds.rightBottom.row; row++) {
|
||||
const rowIdx = row - offsetRow;
|
||||
if (lines.length <= rowIdx) {
|
||||
// クリップボードから読んだ二次元配列よりも選択範囲の方が大きい場合、貼り付け操作を打ち切る
|
||||
break;
|
||||
}
|
||||
|
||||
const items = lines[rowIdx];
|
||||
for (let col = bounds.leftTop.col; col <= bounds.rightBottom.col; col++) {
|
||||
const colIdx = col - offsetCol;
|
||||
if (items.length <= colIdx) {
|
||||
// クリップボードから読んだ二次元配列よりも選択範囲の方が大きい場合、貼り付け操作を打ち切る
|
||||
break;
|
||||
}
|
||||
|
||||
if (columns[col].setting.editable) {
|
||||
callback(rows[row], columns[col], parseValue(items[colIdx], columns[col].setting));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* グリッドの選択範囲にあるデータを削除するためのユーティリティ関数。
|
||||
* …と言いつつも、使用箇所により反映方法に差があるため更新操作はコールバック関数に任せている。
|
||||
*/
|
||||
export function removeDataFromGrid(
|
||||
context: GridContext,
|
||||
callback: (cell: GridCell) => void,
|
||||
) {
|
||||
for (const cell of context.rangedCells) {
|
||||
const { editable, events } = cell.column.setting;
|
||||
if (editable) {
|
||||
if (events?.delete) {
|
||||
events.delete(cell, context);
|
||||
} else {
|
||||
callback(cell);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { EventEmitter } from 'eventemitter3';
|
||||
import { CellValue, GridCellSetting } from '@/components/grid/cell.js';
|
||||
import { GridColumnSetting } from '@/components/grid/column.js';
|
||||
import { GridRowSetting } from '@/components/grid/row.js';
|
||||
|
||||
export type GridSetting = {
|
||||
root?: {
|
||||
noOverflowStyle?: boolean;
|
||||
rounded?: boolean;
|
||||
outerBorder?: boolean;
|
||||
};
|
||||
row?: GridRowSetting;
|
||||
cols: GridColumnSetting[];
|
||||
cells?: GridCellSetting;
|
||||
};
|
||||
|
||||
export type DataSource = Record<string, CellValue>;
|
||||
|
||||
export type GridState =
|
||||
'normal' |
|
||||
'cellSelecting' |
|
||||
'cellEditing' |
|
||||
'colResizing' |
|
||||
'colSelecting' |
|
||||
'rowSelecting' |
|
||||
'hidden'
|
||||
;
|
||||
|
||||
export type Size = {
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
export type SizeStyle = number | 'auto' | undefined;
|
||||
|
||||
export type AdditionalStyle = {
|
||||
className?: string;
|
||||
style?: Record<string, string | number>;
|
||||
}
|
||||
|
||||
export class GridEventEmitter extends EventEmitter<{
|
||||
'forceRefreshContentSize': void;
|
||||
}> {
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue