commit
9ed0d5ccec
|
@ -5,7 +5,7 @@
|
||||||
"workspaceFolder": "/workspace",
|
"workspaceFolder": "/workspace",
|
||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers/features/node:1": {
|
"ghcr.io/devcontainers/features/node:1": {
|
||||||
"version": "22.11.0"
|
"version": "22.15.0"
|
||||||
},
|
},
|
||||||
"ghcr.io/devcontainers-extra/features/pnpm:2": {
|
"ghcr.io/devcontainers-extra/features/pnpm:2": {
|
||||||
"version": "10.10.0"
|
"version": "10.10.0"
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
20.10.0
|
|
@ -17,7 +17,6 @@ jobs:
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [22.11.0]
|
|
||||||
api-json-name: [api-base.json, api-head.json]
|
api-json-name: [api-base.json, api-head.json]
|
||||||
include:
|
include:
|
||||||
- api-json-name: api-base.json
|
- api-json-name: api-base.json
|
||||||
|
@ -32,10 +31,10 @@ jobs:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4.1.0
|
uses: pnpm/action-setup@v4.1.0
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v4.4.0
|
uses: actions/setup-node@v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version-file: '.node-version'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
- run: pnpm i --frozen-lockfile
|
- run: pnpm i --frozen-lockfile
|
||||||
- name: Check pnpm-lock.yaml
|
- name: Check pnpm-lock.yaml
|
||||||
|
|
|
@ -15,22 +15,17 @@ jobs:
|
||||||
contents: read
|
contents: read
|
||||||
id-token: write
|
id-token: write
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [22.11.0]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.2.2
|
- uses: actions/checkout@v4.2.2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4.1.0
|
uses: pnpm/action-setup@v4.1.0
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v4.4.0
|
uses: actions/setup-node@v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version-file: '.node-version'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
registry-url: 'https://registry.npmjs.org'
|
|
||||||
- name: Publish package
|
- name: Publish package
|
||||||
run: |
|
run: |
|
||||||
pnpm i --frozen-lockfile
|
pnpm i --frozen-lockfile
|
||||||
|
|
|
@ -38,7 +38,7 @@ jobs:
|
||||||
run: git checkout "$(git rev-list --parents -n1 HEAD | cut -d" " -f3)"
|
run: git checkout "$(git rev-list --parents -n1 HEAD | cut -d" " -f3)"
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4.1.0
|
uses: pnpm/action-setup@v4.1.0
|
||||||
- name: Use Node.js 20.x
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v4.4.0
|
uses: actions/setup-node@v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
|
|
|
@ -22,10 +22,11 @@ jobs:
|
||||||
unit:
|
unit:
|
||||||
name: Unit tests (backend)
|
name: Unit tests (backend)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [22.11.0]
|
node-version-file:
|
||||||
|
- .node-version
|
||||||
|
- .github/min.node-version
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
|
@ -61,10 +62,10 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v4.4.0
|
uses: actions/setup-node@v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version-file: ${{ matrix.node-version-file }}
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
- run: pnpm i --frozen-lockfile
|
- run: pnpm i --frozen-lockfile
|
||||||
- name: Check pnpm-lock.yaml
|
- name: Check pnpm-lock.yaml
|
||||||
|
@ -84,10 +85,11 @@ jobs:
|
||||||
e2e:
|
e2e:
|
||||||
name: E2E tests (backend)
|
name: E2E tests (backend)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [22.11.0]
|
node-version-file:
|
||||||
|
- .node-version
|
||||||
|
- .github/min.node-version
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
|
@ -108,10 +110,10 @@ jobs:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4.1.0
|
uses: pnpm/action-setup@v4.1.0
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v4.4.0
|
uses: actions/setup-node@v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version-file: ${{ matrix.node-version-file }}
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
- run: pnpm i --frozen-lockfile
|
- run: pnpm i --frozen-lockfile
|
||||||
- name: Check pnpm-lock.yaml
|
- name: Check pnpm-lock.yaml
|
||||||
|
|
|
@ -21,7 +21,9 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [22.11.0]
|
node-version-file:
|
||||||
|
- .node-version
|
||||||
|
- .github/min.node-version
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
@ -43,10 +45,10 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v4.4.0
|
uses: actions/setup-node@v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version-file: ${{ matrix.node-version-file }}
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
- name: Build Misskey
|
- name: Build Misskey
|
||||||
run: |
|
run: |
|
||||||
|
@ -54,6 +56,7 @@ jobs:
|
||||||
pnpm build
|
pnpm build
|
||||||
- name: Setup
|
- name: Setup
|
||||||
run: |
|
run: |
|
||||||
|
echo "NODE_VERSION=$(cat ${{ matrix.node-version-file }})" >> $GITHUB_ENV
|
||||||
cd packages/backend/test-federation
|
cd packages/backend/test-federation
|
||||||
bash ./setup.sh
|
bash ./setup.sh
|
||||||
sudo chmod 644 ./certificates/*.test.key
|
sudo chmod 644 ./certificates/*.test.key
|
||||||
|
|
|
@ -27,20 +27,16 @@ jobs:
|
||||||
name: Unit tests (frontend)
|
name: Unit tests (frontend)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [22.11.0]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.2.2
|
- uses: actions/checkout@v4.2.2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4.1.0
|
uses: pnpm/action-setup@v4.1.0
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v4.4.0
|
uses: actions/setup-node@v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version-file: '.node-version'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
- run: pnpm i --frozen-lockfile
|
- run: pnpm i --frozen-lockfile
|
||||||
- name: Check pnpm-lock.yaml
|
- name: Check pnpm-lock.yaml
|
||||||
|
@ -64,7 +60,6 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [22.11.0]
|
|
||||||
browser: [chrome]
|
browser: [chrome]
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
@ -92,10 +87,10 @@ jobs:
|
||||||
# if: ${{ matrix.browser == 'firefox' }}
|
# if: ${{ matrix.browser == 'firefox' }}
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4.1.0
|
uses: pnpm/action-setup@v4.1.0
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v4.4.0
|
uses: actions/setup-node@v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version-file: '.node-version'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
- run: pnpm i --frozen-lockfile
|
- run: pnpm i --frozen-lockfile
|
||||||
- name: Copy Configure
|
- name: Copy Configure
|
||||||
|
|
|
@ -20,11 +20,6 @@ jobs:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [22.11.0]
|
|
||||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.2.2
|
||||||
|
@ -32,10 +27,10 @@ jobs:
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4.1.0
|
uses: pnpm/action-setup@v4.1.0
|
||||||
|
|
||||||
- name: Setup Node.js ${{ matrix.node-version }}
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4.4.0
|
uses: actions/setup-node@v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version-file: '.node-version'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
|
|
|
@ -15,20 +15,16 @@ jobs:
|
||||||
name: Production build
|
name: Production build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [22.11.0]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.2.2
|
- uses: actions/checkout@v4.2.2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4.1.0
|
uses: pnpm/action-setup@v4.1.0
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v4.4.0
|
uses: actions/setup-node@v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version-file: '.node-version'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
- run: pnpm i --frozen-lockfile
|
- run: pnpm i --frozen-lockfile
|
||||||
- name: Check pnpm-lock.yaml
|
- name: Check pnpm-lock.yaml
|
||||||
|
|
|
@ -16,20 +16,16 @@ jobs:
|
||||||
validate-api-json:
|
validate-api-json:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [22.11.0]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.2.2
|
- uses: actions/checkout@v4.2.2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4.1.0
|
uses: pnpm/action-setup@v4.1.0
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js
|
||||||
uses: actions/setup-node@v4.4.0
|
uses: actions/setup-node@v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version-file: '.node-version'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
- name: Install Redocly CLI
|
- name: Install Redocly CLI
|
||||||
run: npm i -g @redocly/cli
|
run: npm i -g @redocly/cli
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
22.11.0
|
22.15.0
|
||||||
|
|
28
CHANGELOG.md
28
CHANGELOG.md
|
@ -1,3 +1,31 @@
|
||||||
|
## 2025.5.0
|
||||||
|
|
||||||
|
### Note
|
||||||
|
- DockerのNode.jsが22.15.0に更新されました
|
||||||
|
|
||||||
|
### Client
|
||||||
|
- Feat: マウスで中ボタンドラッグによりタイムラインを引っ張って更新できるように
|
||||||
|
- アクセシビリティ設定からオフにすることもできます
|
||||||
|
- Enhance: タイムラインのパフォーマンスを向上
|
||||||
|
- Enhance: バックアップされた設定のプロファイルを削除できるように
|
||||||
|
- Fix: 一部のブラウザでアコーディオンメニューのアニメーションが動作しない問題を修正
|
||||||
|
- Fix: ダイアログのお知らせが画面からはみ出ることがある問題を修正
|
||||||
|
- Fix: ユーザーポップアップでエラーが生じてもインジケーターが表示され続けてしまう問題を修正
|
||||||
|
|
||||||
|
### Server
|
||||||
|
- Enhance: 凍結されたユーザのノートが各種タイムラインで表示されないように `#15775`
|
||||||
|
- Enhance: 連合先のソフトウェア及びバージョン名により配信停止を行えるように `#15727`
|
||||||
|
- Enhance: 2025.4.1 で追加されたインデックスの再生成をノートの追加しながら行えるようになりました。 `#15915`
|
||||||
|
- `MISSKEY_MIGRATION_CREATE_INDEX_CONCURRENTLY` 環境変数を `1` にセットしていると、巨大なテーブルの既存のカラムに関するインデックス再生成が`CREATE INDEX CONCURRENTLY`を使用するようになりました。
|
||||||
|
- 複数のサーバープロセスをクラスタリングしているサーバーにおいて、一部のプロセスが起動している状態でこのオプションを有効にしてマイグレーションすることにより、ダウンタイムを削減することができます。
|
||||||
|
- ただし、このオプションを有効にする場合、インデックスの作成にかかる時間が倍~3倍以上になることがあります。
|
||||||
|
- また、大きなインスタンスである場合にはインデックスの作成に失敗し、複数回再試行する必要がある可能性があります。
|
||||||
|
- Fix: チャンネルのフォロー一覧の結果が一部正しくないのを修正 (#12175)
|
||||||
|
- Fix: ファイルをアップロードした際にファイル名が常に untitled になる問題を修正
|
||||||
|
- Fix: ファイルのアップロードに失敗することがある問題を修正
|
||||||
|
- 投稿フォーム上で画像のクロップを行うと、`Invalid Param.`エラーでノートが投稿出来なくなる問題も解決されます。
|
||||||
|
- この事象によって既にノートが投稿出来ない状態になっている場合は、投稿フォーム右上のメニューから、下書きデータの「リセット」を行ってください。
|
||||||
|
|
||||||
## 2025.4.1
|
## 2025.4.1
|
||||||
|
|
||||||
### General
|
### General
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# syntax = docker/dockerfile:1.4
|
# syntax = docker/dockerfile:1.4
|
||||||
|
|
||||||
ARG NODE_VERSION=22.11.0-bookworm
|
ARG NODE_VERSION=22.15.0-bookworm
|
||||||
|
|
||||||
# build assets & compile TypeScript
|
# build assets & compile TypeScript
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -220,6 +220,7 @@ silenceThisInstance: "Silencia aquesta instància "
|
||||||
mediaSilenceThisInstance: "Silenciar els arxius d'aquesta instància "
|
mediaSilenceThisInstance: "Silenciar els arxius d'aquesta instància "
|
||||||
operations: "Accions"
|
operations: "Accions"
|
||||||
software: "Programari"
|
software: "Programari"
|
||||||
|
softwareName: "Nom del programari"
|
||||||
version: "Versió"
|
version: "Versió"
|
||||||
metadata: "Metadades"
|
metadata: "Metadades"
|
||||||
withNFiles: "{n} fitxer(s)"
|
withNFiles: "{n} fitxer(s)"
|
||||||
|
@ -1347,6 +1348,7 @@ readonly: "Només lectura"
|
||||||
goToDeck: "Tornar al tauler"
|
goToDeck: "Tornar al tauler"
|
||||||
federationJobs: "Treballs sindicats "
|
federationJobs: "Treballs sindicats "
|
||||||
driveAboutTip: "Al Disc veure's una llista de tots els arxius que has anat pujant.<br>\nPots tornar-los a fer servir adjuntant-los a notes noves o pots adelantar-te i pujar arxius per publicar-los més tard!<br>\n<b>Tingués en compte que si esborres un arxiu també desapareixerà de tots els llocs on l'has fet servir (notes, pàgines, avatars, imatges de capçalera, etc.)</b><br>\nTambé pots crear carpetes per organitzar les."
|
driveAboutTip: "Al Disc veure's una llista de tots els arxius que has anat pujant.<br>\nPots tornar-los a fer servir adjuntant-los a notes noves o pots adelantar-te i pujar arxius per publicar-los més tard!<br>\n<b>Tingués en compte que si esborres un arxiu també desapareixerà de tots els llocs on l'has fet servir (notes, pàgines, avatars, imatges de capçalera, etc.)</b><br>\nTambé pots crear carpetes per organitzar les."
|
||||||
|
scrollToClose: "Desplaçar per tancar"
|
||||||
_chat:
|
_chat:
|
||||||
noMessagesYet: "Encara no tens missatges "
|
noMessagesYet: "Encara no tens missatges "
|
||||||
newMessage: "Missatge nou"
|
newMessage: "Missatge nou"
|
||||||
|
@ -1423,6 +1425,8 @@ _settings:
|
||||||
ifOn: "Quan s'activa"
|
ifOn: "Quan s'activa"
|
||||||
ifOff: "Quan es desactiva"
|
ifOff: "Quan es desactiva"
|
||||||
enableSyncThemesBetweenDevices: "Sincronitzar els temes instal·lats entre dispositius"
|
enableSyncThemesBetweenDevices: "Sincronitzar els temes instal·lats entre dispositius"
|
||||||
|
enablePullToRefresh: "Lliscar i actualitzar "
|
||||||
|
enablePullToRefresh_description: "Amb el ratolí, llisca mentre prems la roda."
|
||||||
_chat:
|
_chat:
|
||||||
showSenderName: "Mostrar el nom del remitent"
|
showSenderName: "Mostrar el nom del remitent"
|
||||||
sendOnEnter: "Introdueix per enviar"
|
sendOnEnter: "Introdueix per enviar"
|
||||||
|
@ -1468,6 +1472,7 @@ _delivery:
|
||||||
manuallySuspended: "Suspendre manualment"
|
manuallySuspended: "Suspendre manualment"
|
||||||
goneSuspended: "Servidor suspès perquè el servidor s'ha esborrat"
|
goneSuspended: "Servidor suspès perquè el servidor s'ha esborrat"
|
||||||
autoSuspendedForNotResponding: "Servidor suspès perquè el servidor no respon"
|
autoSuspendedForNotResponding: "Servidor suspès perquè el servidor no respon"
|
||||||
|
softwareSuspended: "Suspès perquè el programari ha deixat de desenvolupar-se "
|
||||||
_bubbleGame:
|
_bubbleGame:
|
||||||
howToPlay: "Com es juga"
|
howToPlay: "Com es juga"
|
||||||
hold: "Mantenir"
|
hold: "Mantenir"
|
||||||
|
@ -1599,6 +1604,8 @@ _serverSettings:
|
||||||
openRegistration: "Registres oberts"
|
openRegistration: "Registres oberts"
|
||||||
openRegistrationWarning: "Obrir els registres és arriscat. Es recomana obrir-los només si el servidor és monitorat constantment i per respondre immediatament davant qualsevol problema."
|
openRegistrationWarning: "Obrir els registres és arriscat. Es recomana obrir-los només si el servidor és monitorat constantment i per respondre immediatament davant qualsevol problema."
|
||||||
thisSettingWillAutomaticallyOffWhenModeratorsInactive: "Si no es detecta activitat per part del moderador durant un període de temps, aquesta opció es desactiva automàticament per evitar el correu brossa."
|
thisSettingWillAutomaticallyOffWhenModeratorsInactive: "Si no es detecta activitat per part del moderador durant un període de temps, aquesta opció es desactiva automàticament per evitar el correu brossa."
|
||||||
|
deliverSuspendedSoftware: "Programari que ja no es distribueix"
|
||||||
|
deliverSuspendedSoftwareDescription: "Pots especificar un rang de noms i versions del programari del servidor per detenir l'entrega, per exemple, degut a vulnerabilitats. Aquesta informació la proporciona el servidor i la seva fiabilitat no es garantitzada. Es pot fer servir una especificació de rang sencer per especificar una versió, però es recomana especificar una versió anterior, com >= 2024.3.1-0, perquè especificar >= 2024.3.1 no incloure versions personalitzades com 2024.3.1-custom.0."
|
||||||
_accountMigration:
|
_accountMigration:
|
||||||
moveFrom: "Migrar un altre compte a aquest"
|
moveFrom: "Migrar un altre compte a aquest"
|
||||||
moveFromSub: "Crear un àlies per un altre compte"
|
moveFromSub: "Crear un àlies per un altre compte"
|
||||||
|
|
|
@ -220,6 +220,7 @@ silenceThisInstance: "Instanz stummschalten"
|
||||||
mediaSilenceThisInstance: "Medien dieses Servers stummschalten"
|
mediaSilenceThisInstance: "Medien dieses Servers stummschalten"
|
||||||
operations: "Aktionen"
|
operations: "Aktionen"
|
||||||
software: "Software"
|
software: "Software"
|
||||||
|
softwareName: "Software Name"
|
||||||
version: "Version"
|
version: "Version"
|
||||||
metadata: "Metadaten"
|
metadata: "Metadaten"
|
||||||
withNFiles: "{n} Datei(en)"
|
withNFiles: "{n} Datei(en)"
|
||||||
|
@ -1347,6 +1348,7 @@ readonly: "Nur Lesezugriff"
|
||||||
goToDeck: "Zurück zum Deck"
|
goToDeck: "Zurück zum Deck"
|
||||||
federationJobs: "Föderation Jobs"
|
federationJobs: "Föderation Jobs"
|
||||||
driveAboutTip: "In Drive sehen Sie eine Liste der Dateien, die Sie in der Vergangenheit hochgeladen haben. <br>\nSie können diese Dateien wiederverwenden um sie zu beispiel an Notizen anzuhängen, oder sie können Dateien vorab hochzuladen, um sie später zu versenden! <br>\n<b>Wenn Sie eine Datei löschen, verschwindet sie auch von allen Stellen, an denen Sie sie verwendet haben (Notizen, Seiten, Avatare, Banner usw.).</b><br>\nSie können auch Ordner erstellen, um sie zu organisieren."
|
driveAboutTip: "In Drive sehen Sie eine Liste der Dateien, die Sie in der Vergangenheit hochgeladen haben. <br>\nSie können diese Dateien wiederverwenden um sie zu beispiel an Notizen anzuhängen, oder sie können Dateien vorab hochzuladen, um sie später zu versenden! <br>\n<b>Wenn Sie eine Datei löschen, verschwindet sie auch von allen Stellen, an denen Sie sie verwendet haben (Notizen, Seiten, Avatare, Banner usw.).</b><br>\nSie können auch Ordner erstellen, um sie zu organisieren."
|
||||||
|
scrollToClose: "Zum Schließen scrollen"
|
||||||
_chat:
|
_chat:
|
||||||
noMessagesYet: "Noch keine Nachrichten"
|
noMessagesYet: "Noch keine Nachrichten"
|
||||||
newMessage: "Neue Nachricht"
|
newMessage: "Neue Nachricht"
|
||||||
|
@ -1423,6 +1425,8 @@ _settings:
|
||||||
ifOn: "Wenn eingeschaltet"
|
ifOn: "Wenn eingeschaltet"
|
||||||
ifOff: "Wenn ausgeschaltet"
|
ifOff: "Wenn ausgeschaltet"
|
||||||
enableSyncThemesBetweenDevices: "Synchronisierung von installierten Themen auf verschiedenen Endgeräten"
|
enableSyncThemesBetweenDevices: "Synchronisierung von installierten Themen auf verschiedenen Endgeräten"
|
||||||
|
enablePullToRefresh: "Ziehen zum Aktualisieren"
|
||||||
|
enablePullToRefresh_description: "Bei Benutzung einer Maus, mit gedrücktem Mausrad ziehen"
|
||||||
_chat:
|
_chat:
|
||||||
showSenderName: "Name des Absenders anzeigen"
|
showSenderName: "Name des Absenders anzeigen"
|
||||||
sendOnEnter: "Eingabetaste sendet Nachricht"
|
sendOnEnter: "Eingabetaste sendet Nachricht"
|
||||||
|
@ -1468,6 +1472,7 @@ _delivery:
|
||||||
manuallySuspended: "Manuell gesperrt"
|
manuallySuspended: "Manuell gesperrt"
|
||||||
goneSuspended: "Gesperrt wegen Löschung des Servers"
|
goneSuspended: "Gesperrt wegen Löschung des Servers"
|
||||||
autoSuspendedForNotResponding: "Gesperrt, weil der Server nicht antwortet"
|
autoSuspendedForNotResponding: "Gesperrt, weil der Server nicht antwortet"
|
||||||
|
softwareSuspended: "Ausgesetzt, weil die Software nicht mehr beliefert wird"
|
||||||
_bubbleGame:
|
_bubbleGame:
|
||||||
howToPlay: "Wie man spielt"
|
howToPlay: "Wie man spielt"
|
||||||
hold: "Halten"
|
hold: "Halten"
|
||||||
|
@ -1599,6 +1604,8 @@ _serverSettings:
|
||||||
openRegistration: "Registrierung von Konten aktivieren"
|
openRegistration: "Registrierung von Konten aktivieren"
|
||||||
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."
|
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."
|
thisSettingWillAutomaticallyOffWhenModeratorsInactive: "Wenn über einen bestimmten Zeitraum keine Moderatorenaktivität festgestellt wird, wird diese Einstellung automatisch deaktiviert, um Spam zu verhindern."
|
||||||
|
deliverSuspendedSoftware: "Software, die nicht mehr beliefert wird"
|
||||||
|
deliverSuspendedSoftwareDescription: "Sie können eine Auswahl von Namen und Versionen verschiedener Serversoftware angeben, um die Zustellung zu stoppen, z. B. aufgrund von Sicherheitslücken. Diese Versionsinformationen werden vom Server bereitgestellt und ihre Zuverlässigkeit ist nicht garantiert. Es wird jedoch empfohlen, eine Vorabversion anzugeben, wie z. B. >= 2024.3.1-0, da die Angabe >= 2024.3.1 keine benutzerdefinierten Versionen wie 2024.3.1-custom.0 einschließt."
|
||||||
_accountMigration:
|
_accountMigration:
|
||||||
moveFrom: "Von einem anderen Konto zu diesem migrieren"
|
moveFrom: "Von einem anderen Konto zu diesem migrieren"
|
||||||
moveFromSub: "Alias für ein anderes Konto erstellen"
|
moveFromSub: "Alias für ein anderes Konto erstellen"
|
||||||
|
|
|
@ -220,6 +220,7 @@ silenceThisInstance: "Silence this instance"
|
||||||
mediaSilenceThisInstance: "Media-silence this server"
|
mediaSilenceThisInstance: "Media-silence this server"
|
||||||
operations: "Operations"
|
operations: "Operations"
|
||||||
software: "Software"
|
software: "Software"
|
||||||
|
softwareName: "Software"
|
||||||
version: "Version"
|
version: "Version"
|
||||||
metadata: "Metadata"
|
metadata: "Metadata"
|
||||||
withNFiles: "{n} file(s)"
|
withNFiles: "{n} file(s)"
|
||||||
|
@ -1347,6 +1348,7 @@ readonly: "Read only"
|
||||||
goToDeck: "Return to Deck"
|
goToDeck: "Return to Deck"
|
||||||
federationJobs: "Federation Jobs"
|
federationJobs: "Federation Jobs"
|
||||||
driveAboutTip: "In Drive, a list of files you've uploaded in the past will be displayed. <br> \nYou can reuse these files when attaching them to notes, or you can upload files in advance to post later. <br> \n<b>Be careful when deleting a file, as it will not be available in all places where it was used (such as notes, pages, avatars, banners, etc.).</b> <br> \nYou can also create folders to organize your files."
|
driveAboutTip: "In Drive, a list of files you've uploaded in the past will be displayed. <br> \nYou can reuse these files when attaching them to notes, or you can upload files in advance to post later. <br> \n<b>Be careful when deleting a file, as it will not be available in all places where it was used (such as notes, pages, avatars, banners, etc.).</b> <br> \nYou can also create folders to organize your files."
|
||||||
|
scrollToClose: "Scroll to close"
|
||||||
_chat:
|
_chat:
|
||||||
noMessagesYet: "No messages yet"
|
noMessagesYet: "No messages yet"
|
||||||
newMessage: "New message"
|
newMessage: "New message"
|
||||||
|
@ -1423,6 +1425,8 @@ _settings:
|
||||||
ifOn: "When turned on"
|
ifOn: "When turned on"
|
||||||
ifOff: "When turned off"
|
ifOff: "When turned off"
|
||||||
enableSyncThemesBetweenDevices: "Synchronize installed themes across devices"
|
enableSyncThemesBetweenDevices: "Synchronize installed themes across devices"
|
||||||
|
enablePullToRefresh: "Pull to Refresh"
|
||||||
|
enablePullToRefresh_description: "When using a mouse, drag while pressing in the scroll wheel."
|
||||||
_chat:
|
_chat:
|
||||||
showSenderName: "Show sender's name"
|
showSenderName: "Show sender's name"
|
||||||
sendOnEnter: "Press Enter to send"
|
sendOnEnter: "Press Enter to send"
|
||||||
|
@ -1468,6 +1472,7 @@ _delivery:
|
||||||
manuallySuspended: "Manually suspended"
|
manuallySuspended: "Manually suspended"
|
||||||
goneSuspended: "Server is suspended due to server deletion"
|
goneSuspended: "Server is suspended due to server deletion"
|
||||||
autoSuspendedForNotResponding: "Server is suspended due to no responding"
|
autoSuspendedForNotResponding: "Server is suspended due to no responding"
|
||||||
|
softwareSuspended: "Suspended as this software is no longer being distributed to"
|
||||||
_bubbleGame:
|
_bubbleGame:
|
||||||
howToPlay: "How to play"
|
howToPlay: "How to play"
|
||||||
hold: "Hold"
|
hold: "Hold"
|
||||||
|
@ -1599,6 +1604,8 @@ _serverSettings:
|
||||||
openRegistration: "Make the account creation open"
|
openRegistration: "Make the account creation open"
|
||||||
openRegistrationWarning: "Opening registration carries risks. It is recommended to only enable it if you have a system in place to continuously monitor the server and respond immediately in case of any issues."
|
openRegistrationWarning: "Opening registration carries risks. It is recommended to only enable it if you have a system in place to continuously monitor the server and respond immediately in case of any issues."
|
||||||
thisSettingWillAutomaticallyOffWhenModeratorsInactive: "If no moderator activity is detected for a while, this setting will be automatically turned off to prevent spam."
|
thisSettingWillAutomaticallyOffWhenModeratorsInactive: "If no moderator activity is detected for a while, this setting will be automatically turned off to prevent spam."
|
||||||
|
deliverSuspendedSoftware: "Suspended Software"
|
||||||
|
deliverSuspendedSoftwareDescription: "You can specify a range of names and versions of the server's software to stop delivery for vulnerability or other reasons. This version information is provided by the server and is not guaranteed to be reliable. A semver range specification can be used to specify the version, but specifying >= 2024.3.1 will not include custom versions such as 2024.3.1-custom.0, so it is recommended that a prerelease specification be used, such as >= 2024.3.1-0"
|
||||||
_accountMigration:
|
_accountMigration:
|
||||||
moveFrom: "Migrate another account to this one"
|
moveFrom: "Migrate another account to this one"
|
||||||
moveFromSub: "Create alias to another account"
|
moveFromSub: "Create alias to another account"
|
||||||
|
|
|
@ -898,6 +898,10 @@ export interface Locale extends ILocale {
|
||||||
* ソフトウェア
|
* ソフトウェア
|
||||||
*/
|
*/
|
||||||
"software": string;
|
"software": string;
|
||||||
|
/**
|
||||||
|
* ソフトウェア名
|
||||||
|
*/
|
||||||
|
"softwareName": string;
|
||||||
/**
|
/**
|
||||||
* バージョン
|
* バージョン
|
||||||
*/
|
*/
|
||||||
|
@ -5409,6 +5413,10 @@ export interface Locale extends ILocale {
|
||||||
* フォルダを作って整理することもできます。
|
* フォルダを作って整理することもできます。
|
||||||
*/
|
*/
|
||||||
"driveAboutTip": string;
|
"driveAboutTip": string;
|
||||||
|
/**
|
||||||
|
* スクロールして閉じる
|
||||||
|
*/
|
||||||
|
"scrollToClose": string;
|
||||||
"_chat": {
|
"_chat": {
|
||||||
/**
|
/**
|
||||||
* まだメッセージはありません
|
* まだメッセージはありません
|
||||||
|
@ -5705,6 +5713,14 @@ export interface Locale extends ILocale {
|
||||||
* デバイス間でインストールしたテーマを同期
|
* デバイス間でインストールしたテーマを同期
|
||||||
*/
|
*/
|
||||||
"enableSyncThemesBetweenDevices": string;
|
"enableSyncThemesBetweenDevices": string;
|
||||||
|
/**
|
||||||
|
* ひっぱって更新
|
||||||
|
*/
|
||||||
|
"enablePullToRefresh": string;
|
||||||
|
/**
|
||||||
|
* マウスでは、ホイールを押し込みながらドラッグします。
|
||||||
|
*/
|
||||||
|
"enablePullToRefresh_description": string;
|
||||||
"_chat": {
|
"_chat": {
|
||||||
/**
|
/**
|
||||||
* 送信者の名前を表示
|
* 送信者の名前を表示
|
||||||
|
@ -5729,6 +5745,10 @@ export interface Locale extends ILocale {
|
||||||
* 例: 「メインPC」、「スマホ」など
|
* 例: 「メインPC」、「スマホ」など
|
||||||
*/
|
*/
|
||||||
"profileNameDescription2": string;
|
"profileNameDescription2": string;
|
||||||
|
/**
|
||||||
|
* プロファイルの管理
|
||||||
|
*/
|
||||||
|
"manageProfiles": string;
|
||||||
};
|
};
|
||||||
"_preferencesBackup": {
|
"_preferencesBackup": {
|
||||||
/**
|
/**
|
||||||
|
@ -5871,6 +5891,10 @@ export interface Locale extends ILocale {
|
||||||
* サーバー応答なしのため停止中
|
* サーバー応答なしのため停止中
|
||||||
*/
|
*/
|
||||||
"autoSuspendedForNotResponding": string;
|
"autoSuspendedForNotResponding": string;
|
||||||
|
/**
|
||||||
|
* 配信停止中のソフトウェアであるため停止中
|
||||||
|
*/
|
||||||
|
"softwareSuspended": string;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"_bubbleGame": {
|
"_bubbleGame": {
|
||||||
|
@ -6356,6 +6380,14 @@ export interface Locale extends ILocale {
|
||||||
* 一定期間モデレーターのアクティビティが検出されなかった場合、スパム防止のためこの設定は自動でオフになります。
|
* 一定期間モデレーターのアクティビティが検出されなかった場合、スパム防止のためこの設定は自動でオフになります。
|
||||||
*/
|
*/
|
||||||
"thisSettingWillAutomaticallyOffWhenModeratorsInactive": string;
|
"thisSettingWillAutomaticallyOffWhenModeratorsInactive": string;
|
||||||
|
/**
|
||||||
|
* 配信停止中のソフトウェア
|
||||||
|
*/
|
||||||
|
"deliverSuspendedSoftware": string;
|
||||||
|
/**
|
||||||
|
* 脆弱性などの理由で、サーバーのソフトウェアの名前及びバージョンの範囲を指定して配信を停止できます。このバージョン情報はサーバーが提供したものであり、信頼性は保証されません。バージョン指定には semver の範囲指定が使用できますが、>= 2024.3.1 と指定すると 2024.3.1-custom.0 のようなカスタムバージョンが含まれないため、>= 2024.3.1-0 のように prerelease の指定を行うことを推奨します。
|
||||||
|
*/
|
||||||
|
"deliverSuspendedSoftwareDescription": string;
|
||||||
};
|
};
|
||||||
"_accountMigration": {
|
"_accountMigration": {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -220,6 +220,7 @@ silenceThisInstance: "サーバーをサイレンス"
|
||||||
mediaSilenceThisInstance: "サーバーをメディアサイレンス"
|
mediaSilenceThisInstance: "サーバーをメディアサイレンス"
|
||||||
operations: "操作"
|
operations: "操作"
|
||||||
software: "ソフトウェア"
|
software: "ソフトウェア"
|
||||||
|
softwareName: "ソフトウェア名"
|
||||||
version: "バージョン"
|
version: "バージョン"
|
||||||
metadata: "メタデータ"
|
metadata: "メタデータ"
|
||||||
withNFiles: "{n}つのファイル"
|
withNFiles: "{n}つのファイル"
|
||||||
|
@ -1347,6 +1348,7 @@ readonly: "読み取り専用"
|
||||||
goToDeck: "デッキへ戻る"
|
goToDeck: "デッキへ戻る"
|
||||||
federationJobs: "連合ジョブ"
|
federationJobs: "連合ジョブ"
|
||||||
driveAboutTip: "ドライブでは、過去にアップロードしたファイルの一覧が表示されます。<br>\nノートに添付する際に再利用したり、あとで投稿するファイルを予めアップロードしておくこともできます。<br>\n<b>ファイルを削除すると、今までそのファイルを使用した全ての場所(ノート、ページ、アバター、バナー等)からも見えなくなるので注意してください。</b><br>\nフォルダを作って整理することもできます。"
|
driveAboutTip: "ドライブでは、過去にアップロードしたファイルの一覧が表示されます。<br>\nノートに添付する際に再利用したり、あとで投稿するファイルを予めアップロードしておくこともできます。<br>\n<b>ファイルを削除すると、今までそのファイルを使用した全ての場所(ノート、ページ、アバター、バナー等)からも見えなくなるので注意してください。</b><br>\nフォルダを作って整理することもできます。"
|
||||||
|
scrollToClose: "スクロールして閉じる"
|
||||||
|
|
||||||
_chat:
|
_chat:
|
||||||
noMessagesYet: "まだメッセージはありません"
|
noMessagesYet: "まだメッセージはありません"
|
||||||
|
@ -1426,6 +1428,8 @@ _settings:
|
||||||
ifOn: "オンのとき"
|
ifOn: "オンのとき"
|
||||||
ifOff: "オフのとき"
|
ifOff: "オフのとき"
|
||||||
enableSyncThemesBetweenDevices: "デバイス間でインストールしたテーマを同期"
|
enableSyncThemesBetweenDevices: "デバイス間でインストールしたテーマを同期"
|
||||||
|
enablePullToRefresh: "ひっぱって更新"
|
||||||
|
enablePullToRefresh_description: "マウスでは、ホイールを押し込みながらドラッグします。"
|
||||||
|
|
||||||
_chat:
|
_chat:
|
||||||
showSenderName: "送信者の名前を表示"
|
showSenderName: "送信者の名前を表示"
|
||||||
|
@ -1435,6 +1439,7 @@ _preferencesProfile:
|
||||||
profileName: "プロファイル名"
|
profileName: "プロファイル名"
|
||||||
profileNameDescription: "このデバイスを識別する名前を設定してください。"
|
profileNameDescription: "このデバイスを識別する名前を設定してください。"
|
||||||
profileNameDescription2: "例: 「メインPC」、「スマホ」など"
|
profileNameDescription2: "例: 「メインPC」、「スマホ」など"
|
||||||
|
manageProfiles: "プロファイルの管理"
|
||||||
|
|
||||||
_preferencesBackup:
|
_preferencesBackup:
|
||||||
autoBackup: "自動バックアップ"
|
autoBackup: "自動バックアップ"
|
||||||
|
@ -1477,6 +1482,7 @@ _delivery:
|
||||||
manuallySuspended: "手動停止中"
|
manuallySuspended: "手動停止中"
|
||||||
goneSuspended: "サーバー削除のため停止中"
|
goneSuspended: "サーバー削除のため停止中"
|
||||||
autoSuspendedForNotResponding: "サーバー応答なしのため停止中"
|
autoSuspendedForNotResponding: "サーバー応答なしのため停止中"
|
||||||
|
softwareSuspended: "配信停止中のソフトウェアであるため停止中"
|
||||||
|
|
||||||
_bubbleGame:
|
_bubbleGame:
|
||||||
howToPlay: "遊び方"
|
howToPlay: "遊び方"
|
||||||
|
@ -1615,6 +1621,8 @@ _serverSettings:
|
||||||
openRegistration: "アカウントの作成をオープンにする"
|
openRegistration: "アカウントの作成をオープンにする"
|
||||||
openRegistrationWarning: "登録を開放することはリスクが伴います。サーバーを常に監視し、トラブルが発生した際にすぐに対応できる体制がある場合のみオンにすることを推奨します。"
|
openRegistrationWarning: "登録を開放することはリスクが伴います。サーバーを常に監視し、トラブルが発生した際にすぐに対応できる体制がある場合のみオンにすることを推奨します。"
|
||||||
thisSettingWillAutomaticallyOffWhenModeratorsInactive: "一定期間モデレーターのアクティビティが検出されなかった場合、スパム防止のためこの設定は自動でオフになります。"
|
thisSettingWillAutomaticallyOffWhenModeratorsInactive: "一定期間モデレーターのアクティビティが検出されなかった場合、スパム防止のためこの設定は自動でオフになります。"
|
||||||
|
deliverSuspendedSoftware: "配信停止中のソフトウェア"
|
||||||
|
deliverSuspendedSoftwareDescription: "脆弱性などの理由で、サーバーのソフトウェアの名前及びバージョンの範囲を指定して配信を停止できます。このバージョン情報はサーバーが提供したものであり、信頼性は保証されません。バージョン指定には semver の範囲指定が使用できますが、>= 2024.3.1 と指定すると 2024.3.1-custom.0 のようなカスタムバージョンが含まれないため、>= 2024.3.1-0 のように prerelease の指定を行うことを推奨します。"
|
||||||
|
|
||||||
_accountMigration:
|
_accountMigration:
|
||||||
moveFrom: "別のアカウントからこのアカウントに移行"
|
moveFrom: "別のアカウントからこのアカウントに移行"
|
||||||
|
|
|
@ -5,6 +5,7 @@ introMisskey: "Добро пожаловать! Misskey — это децент
|
||||||
poweredByMisskeyDescription: "{name} – сервис на платформе с открытым исходным кодом <b>Misskey</b>, называемый экземпляром Misskey."
|
poweredByMisskeyDescription: "{name} – сервис на платформе с открытым исходным кодом <b>Misskey</b>, называемый экземпляром Misskey."
|
||||||
monthAndDay: "{day}.{month}"
|
monthAndDay: "{day}.{month}"
|
||||||
search: "Поиск"
|
search: "Поиск"
|
||||||
|
reset: "Сброс"
|
||||||
notifications: "Уведомления"
|
notifications: "Уведомления"
|
||||||
username: "Имя пользователя"
|
username: "Имя пользователя"
|
||||||
password: "Пароль"
|
password: "Пароль"
|
||||||
|
@ -48,6 +49,7 @@ pin: "Закрепить в профиле"
|
||||||
unpin: "Открепить от профиля"
|
unpin: "Открепить от профиля"
|
||||||
copyContent: "Скопировать содержимое"
|
copyContent: "Скопировать содержимое"
|
||||||
copyLink: "Скопировать ссылку"
|
copyLink: "Скопировать ссылку"
|
||||||
|
copyRemoteLink: "Скопировать ссылку на репост"
|
||||||
copyLinkRenote: "Скопировать ссылку на репост"
|
copyLinkRenote: "Скопировать ссылку на репост"
|
||||||
delete: "Удалить"
|
delete: "Удалить"
|
||||||
deleteAndEdit: "Удалить и отредактировать"
|
deleteAndEdit: "Удалить и отредактировать"
|
||||||
|
@ -215,8 +217,10 @@ perDay: "По дням"
|
||||||
stopActivityDelivery: "Остановить отправку обновлений активности"
|
stopActivityDelivery: "Остановить отправку обновлений активности"
|
||||||
blockThisInstance: "Блокировать этот инстанс"
|
blockThisInstance: "Блокировать этот инстанс"
|
||||||
silenceThisInstance: "Заглушить этот инстанс"
|
silenceThisInstance: "Заглушить этот инстанс"
|
||||||
|
mediaSilenceThisInstance: "Заглушить сервер"
|
||||||
operations: "Операции"
|
operations: "Операции"
|
||||||
software: "Программы"
|
software: "Программы"
|
||||||
|
softwareName: "Software Name"
|
||||||
version: "Версия"
|
version: "Версия"
|
||||||
metadata: "Метаданные"
|
metadata: "Метаданные"
|
||||||
withNFiles: "Файлы, {n} шт."
|
withNFiles: "Файлы, {n} шт."
|
||||||
|
@ -235,7 +239,11 @@ clearCachedFilesConfirm: "Удалить все закэшированные ф
|
||||||
blockedInstances: "Заблокированные инстансы"
|
blockedInstances: "Заблокированные инстансы"
|
||||||
blockedInstancesDescription: "Введите список инстансов, которые хотите заблокировать. Они больше не смогут обмениваться с вашим инстансом."
|
blockedInstancesDescription: "Введите список инстансов, которые хотите заблокировать. Они больше не смогут обмениваться с вашим инстансом."
|
||||||
silencedInstances: "Заглушённые инстансы"
|
silencedInstances: "Заглушённые инстансы"
|
||||||
|
silencedInstancesDescription: "Перечислите имена серверов, которые вы хотите отключить, разделив их новой строкой. Все учетные записи, принадлежащие к указанным в списке серверам, будут заблокированы и смогут отправлять запросы только на повторное использование и не смогут указывать локальные учетные записи, если они не будут отслеживаться. Это не повлияет на заблокированные серверы."
|
||||||
|
mediaSilencedInstances: "Заглушённые сервера"
|
||||||
|
mediaSilencedInstancesDescription: "Укажите названия серверов, для которых вы хотите отключить доступ к файлам, по одному серверу в строке. Все учетные записи, принадлежащие к перечисленным серверам, будут считаться конфиденциальными и не смогут использовать пользовательские эмодзи. Это никак не повлияет на заблокированные серверы."
|
||||||
federationAllowedHosts: "Серверы, поддерживающие федерацию"
|
federationAllowedHosts: "Серверы, поддерживающие федерацию"
|
||||||
|
federationAllowedHostsDescription: "Укажите имена серверов, для которых вы хотите разрешить объединение, разделив их разделителями строк."
|
||||||
muteAndBlock: "Скрытие и блокировка"
|
muteAndBlock: "Скрытие и блокировка"
|
||||||
mutedUsers: "Скрытые пользователи"
|
mutedUsers: "Скрытые пользователи"
|
||||||
blockedUsers: "Заблокированные пользователи"
|
blockedUsers: "Заблокированные пользователи"
|
||||||
|
@ -294,6 +302,7 @@ uploadFromUrlMayTakeTime: "Загрузка может занять некото
|
||||||
explore: "Обзор"
|
explore: "Обзор"
|
||||||
messageRead: "Прочитали"
|
messageRead: "Прочитали"
|
||||||
noMoreHistory: "История закончилась"
|
noMoreHistory: "История закончилась"
|
||||||
|
startChat: "Начать чат"
|
||||||
nUsersRead: "Прочитали {n}"
|
nUsersRead: "Прочитали {n}"
|
||||||
agreeTo: "Я соглашаюсь с {0}"
|
agreeTo: "Я соглашаюсь с {0}"
|
||||||
agree: "Согласен"
|
agree: "Согласен"
|
||||||
|
@ -416,6 +425,7 @@ antennaExcludeBots: "Исключать ботов"
|
||||||
antennaKeywordsDescription: "Пишите слова через пробел в одной строке, чтобы ловить их появление вместе; на отдельных строках располагайте слова, или группы слов, чтобы ловить любые из них."
|
antennaKeywordsDescription: "Пишите слова через пробел в одной строке, чтобы ловить их появление вместе; на отдельных строках располагайте слова, или группы слов, чтобы ловить любые из них."
|
||||||
notifyAntenna: "Уведомлять о новых заметках"
|
notifyAntenna: "Уведомлять о новых заметках"
|
||||||
withFileAntenna: "Только заметки с вложениями"
|
withFileAntenna: "Только заметки с вложениями"
|
||||||
|
excludeNotesInSensitiveChannel: "Исключить заметки из конфиденциальных каналов"
|
||||||
enableServiceworker: "Включить ServiceWorker"
|
enableServiceworker: "Включить ServiceWorker"
|
||||||
antennaUsersDescription: "Пишите каждое название аккаута на отдельной строке"
|
antennaUsersDescription: "Пишите каждое название аккаута на отдельной строке"
|
||||||
caseSensitive: "С учётом регистра"
|
caseSensitive: "С учётом регистра"
|
||||||
|
@ -446,6 +456,8 @@ totpDescription: "Описание приложения-аутентификат
|
||||||
moderator: "Модератор"
|
moderator: "Модератор"
|
||||||
moderation: "Модерация"
|
moderation: "Модерация"
|
||||||
moderationNote: "Примечания модератора"
|
moderationNote: "Примечания модератора"
|
||||||
|
moderationNoteDescription: "Вы можете заполнять заметки, которые будут доступны только модераторам."
|
||||||
|
addModerationNote: ""
|
||||||
moderationLogs: "Журнал модерации"
|
moderationLogs: "Журнал модерации"
|
||||||
nUsersMentioned: "Упомянуло пользователей: {n}"
|
nUsersMentioned: "Упомянуло пользователей: {n}"
|
||||||
securityKeyAndPasskey: "Ключ безопасности и парольная фраза"
|
securityKeyAndPasskey: "Ключ безопасности и парольная фраза"
|
||||||
|
@ -506,6 +518,8 @@ emojiStyle: "Стиль эмодзи"
|
||||||
native: "Системные"
|
native: "Системные"
|
||||||
menuStyle: "Стиль меню"
|
menuStyle: "Стиль меню"
|
||||||
style: "Стиль"
|
style: "Стиль"
|
||||||
|
drawer: "Панель"
|
||||||
|
popup: "Всплывающие окна"
|
||||||
showNoteActionsOnlyHover: "Показывать кнопки у заметок только при наведении"
|
showNoteActionsOnlyHover: "Показывать кнопки у заметок только при наведении"
|
||||||
showReactionsCount: "Видеть количество реакций на заметках"
|
showReactionsCount: "Видеть количество реакций на заметках"
|
||||||
noHistory: "История пока пуста"
|
noHistory: "История пока пуста"
|
||||||
|
@ -560,6 +574,7 @@ serverLogs: "Журнал сервера"
|
||||||
deleteAll: "Удалить всё"
|
deleteAll: "Удалить всё"
|
||||||
showFixedPostForm: "Показывать поле для ввода новой заметки наверху ленты"
|
showFixedPostForm: "Показывать поле для ввода новой заметки наверху ленты"
|
||||||
showFixedPostFormInChannel: "Показывать поле для ввода новой заметки наверху ленты (каналы)"
|
showFixedPostFormInChannel: "Показывать поле для ввода новой заметки наверху ленты (каналы)"
|
||||||
|
withRepliesByDefaultForNewlyFollowed: "По умолчанию включайте ответы новых пользователей, на которых вы подписались, во временную шкалу"
|
||||||
newNoteRecived: "Появилась новая заметка"
|
newNoteRecived: "Появилась новая заметка"
|
||||||
sounds: "Звуки"
|
sounds: "Звуки"
|
||||||
sound: "Звуки"
|
sound: "Звуки"
|
||||||
|
@ -572,6 +587,7 @@ masterVolume: "Основная регулировка громкости"
|
||||||
notUseSound: "Выключить звук"
|
notUseSound: "Выключить звук"
|
||||||
useSoundOnlyWhenActive: "Воспроизводить звук только когда Misskey активен."
|
useSoundOnlyWhenActive: "Воспроизводить звук только когда Misskey активен."
|
||||||
details: "Подробнее"
|
details: "Подробнее"
|
||||||
|
renoteDetails: "Узнать больше"
|
||||||
chooseEmoji: "Выберите эмодзи"
|
chooseEmoji: "Выберите эмодзи"
|
||||||
unableToProcess: "Не удаётся завершить операцию"
|
unableToProcess: "Не удаётся завершить операцию"
|
||||||
recentUsed: "Последние использованные"
|
recentUsed: "Последние использованные"
|
||||||
|
@ -587,6 +603,8 @@ ascendingOrder: "по возрастанию"
|
||||||
descendingOrder: "По убыванию"
|
descendingOrder: "По убыванию"
|
||||||
scratchpad: "Когтеточка"
|
scratchpad: "Когтеточка"
|
||||||
scratchpadDescription: "«Когтеточка» — это место для опытов с AiScript. Здесь можно писать программы, взаимодействующие с Misskey, запускать и смотреть что из этого получается."
|
scratchpadDescription: "«Когтеточка» — это место для опытов с AiScript. Здесь можно писать программы, взаимодействующие с Misskey, запускать и смотреть что из этого получается."
|
||||||
|
uiInspector: "Средство проверки пользовательского интерфейса"
|
||||||
|
uiInspectorDescription: "Вы можете просмотреть список экземпляров компонентов пользовательского интерфейса, существующих в памяти. Элементы пользовательского интерфейса генерируются с помощью серии функций Ui:C:."
|
||||||
output: "Выходы"
|
output: "Выходы"
|
||||||
script: "Скрипт"
|
script: "Скрипт"
|
||||||
disablePagesScript: "Отключить скрипты на «Страницах»"
|
disablePagesScript: "Отключить скрипты на «Страницах»"
|
||||||
|
@ -667,14 +685,19 @@ smtpSecure: "Использовать SSL/TLS для SMTP-соединений"
|
||||||
smtpSecureInfo: "Выключите при использовании STARTTLS."
|
smtpSecureInfo: "Выключите при использовании STARTTLS."
|
||||||
testEmail: "Проверка доставки электронной почты"
|
testEmail: "Проверка доставки электронной почты"
|
||||||
wordMute: "Скрытие слов"
|
wordMute: "Скрытие слов"
|
||||||
|
wordMuteDescription: "Сведите к минимуму записи, содержащие указанное утверждение. Нажмите на свернутую запись, чтобы отобразить ее."
|
||||||
hardWordMute: "Строгое скрытие слов"
|
hardWordMute: "Строгое скрытие слов"
|
||||||
|
showMutedWord: "Отображать слово без уведомления (звука)"
|
||||||
|
hardWordMuteDescription: "Скрыть заметки, содержащие указанное слово или фразу. В отличие от word mute, заметка будет полностью скрыта от просмотра."
|
||||||
regexpError: "Ошибка в регулярном выражении"
|
regexpError: "Ошибка в регулярном выражении"
|
||||||
regexpErrorDescription: "В списке {tab} скрытых слов, в строке {line} обнаружена синтаксическая ошибка:"
|
regexpErrorDescription: "В списке {tab} скрытых слов, в строке {line} обнаружена синтаксическая ошибка:"
|
||||||
instanceMute: "Глушение инстансов"
|
instanceMute: "Глушение инстансов"
|
||||||
userSaysSomething: "{name} что-то сообщает"
|
userSaysSomething: "{name} что-то сообщает"
|
||||||
|
userSaysSomethingAbout: "{name} что-то говорил о「{word}」"
|
||||||
makeActive: "Активировать"
|
makeActive: "Активировать"
|
||||||
display: "Отображение"
|
display: "Отображение"
|
||||||
copy: "Копировать"
|
copy: "Копировать"
|
||||||
|
copiedToClipboard: "Скопированы в буфер обмена"
|
||||||
metrics: "Метрики"
|
metrics: "Метрики"
|
||||||
overview: "Обзор"
|
overview: "Обзор"
|
||||||
logs: "Журналы"
|
logs: "Журналы"
|
||||||
|
@ -840,6 +863,7 @@ administration: "Управление"
|
||||||
accounts: "Учётные записи"
|
accounts: "Учётные записи"
|
||||||
switch: "Переключение"
|
switch: "Переключение"
|
||||||
noMaintainerInformationWarning: "Не заполнены сведения об администраторах"
|
noMaintainerInformationWarning: "Не заполнены сведения об администраторах"
|
||||||
|
noInquiryUrlWarning: "URL-адрес контактной формы еще не задан."
|
||||||
noBotProtectionWarning: "Ботозащита не настроена"
|
noBotProtectionWarning: "Ботозащита не настроена"
|
||||||
configure: "Настроить"
|
configure: "Настроить"
|
||||||
postToGallery: "Опубликовать в галерею"
|
postToGallery: "Опубликовать в галерею"
|
||||||
|
@ -904,6 +928,7 @@ followersVisibility: "Видимость подписчиков"
|
||||||
continueThread: "Показать следующие ответы"
|
continueThread: "Показать следующие ответы"
|
||||||
deleteAccountConfirm: "Учётная запись будет безвозвратно удалена. Подтверждаете?"
|
deleteAccountConfirm: "Учётная запись будет безвозвратно удалена. Подтверждаете?"
|
||||||
incorrectPassword: "Пароль неверен."
|
incorrectPassword: "Пароль неверен."
|
||||||
|
incorrectTotp: "Введен неверный одноразовый пароль или срок его действия истек."
|
||||||
voteConfirm: "Отдать голос за «{choice}»?"
|
voteConfirm: "Отдать голос за «{choice}»?"
|
||||||
hide: "Спрятать"
|
hide: "Спрятать"
|
||||||
useDrawerReactionPickerForMobile: "Выдвижная палитра на мобильном устройстве"
|
useDrawerReactionPickerForMobile: "Выдвижная палитра на мобильном устройстве"
|
||||||
|
@ -928,6 +953,9 @@ oneHour: "1 час"
|
||||||
oneDay: "1 день"
|
oneDay: "1 день"
|
||||||
oneWeek: "1 неделя"
|
oneWeek: "1 неделя"
|
||||||
oneMonth: "1 месяц"
|
oneMonth: "1 месяц"
|
||||||
|
threeMonths: "3 месяца"
|
||||||
|
oneYear: "1 год"
|
||||||
|
threeDays: "3 дня"
|
||||||
reflectMayTakeTime: "Изменения могут занять время для отображения"
|
reflectMayTakeTime: "Изменения могут занять время для отображения"
|
||||||
failedToFetchAccountInformation: "Не удалось получить информацию об аккаунте"
|
failedToFetchAccountInformation: "Не удалось получить информацию об аккаунте"
|
||||||
rateLimitExceeded: "Ограничение скорости превышено"
|
rateLimitExceeded: "Ограничение скорости превышено"
|
||||||
|
@ -952,6 +980,7 @@ document: "Документ"
|
||||||
numberOfPageCache: "Количество сохранённых страниц в кэше"
|
numberOfPageCache: "Количество сохранённых страниц в кэше"
|
||||||
numberOfPageCacheDescription: "Описание количества страниц в кэше"
|
numberOfPageCacheDescription: "Описание количества страниц в кэше"
|
||||||
logoutConfirm: "Вы хотите выйти из аккаунта?"
|
logoutConfirm: "Вы хотите выйти из аккаунта?"
|
||||||
|
logoutWillClearClientData: "Когда вы выйдете из системы, информация о конфигурации клиента будет удалена из браузера.Чтобы иметь возможность восстановить информацию о вашей конфигурации при повторном входе в систему, пожалуйста, включите опцию автоматического резервного копирования в настройках."
|
||||||
lastActiveDate: "Последняя дата использования"
|
lastActiveDate: "Последняя дата использования"
|
||||||
statusbar: "Статусбар"
|
statusbar: "Статусбар"
|
||||||
pleaseSelect: "Пожалуйста, выберите"
|
pleaseSelect: "Пожалуйста, выберите"
|
||||||
|
@ -1001,6 +1030,7 @@ neverShow: "Больше не показывать"
|
||||||
remindMeLater: "Напомнить позже"
|
remindMeLater: "Напомнить позже"
|
||||||
didYouLikeMisskey: "Вам нравится Misskey?"
|
didYouLikeMisskey: "Вам нравится Misskey?"
|
||||||
pleaseDonate: "Сайт {host} работает на Misskey. Это бесплатное программное обеспечение, и ваши пожертвования очень бы помогли продолжать его разработку!"
|
pleaseDonate: "Сайт {host} работает на Misskey. Это бесплатное программное обеспечение, и ваши пожертвования очень бы помогли продолжать его разработку!"
|
||||||
|
correspondingSourceIsAvailable: "Соответствующий исходный код можно найти по адресу {anchor} "
|
||||||
roles: "Роли"
|
roles: "Роли"
|
||||||
role: "Роль"
|
role: "Роль"
|
||||||
noRole: "Нет роли"
|
noRole: "Нет роли"
|
||||||
|
@ -1056,6 +1086,7 @@ prohibitedWords: "Запрещённые слова"
|
||||||
prohibitedWordsDescription: "Включает вывод ошибки при попытке опубликовать пост, содержащий указанное слово/набор слов.\nМножество слов может быть указано, разделяемые новой строкой."
|
prohibitedWordsDescription: "Включает вывод ошибки при попытке опубликовать пост, содержащий указанное слово/набор слов.\nМножество слов может быть указано, разделяемые новой строкой."
|
||||||
prohibitedWordsDescription2: "Разделение пробелом создаёт спецификацию AND, а разделение косой чертой создаёт регулярное выражение."
|
prohibitedWordsDescription2: "Разделение пробелом создаёт спецификацию AND, а разделение косой чертой создаёт регулярное выражение."
|
||||||
hiddenTags: "Скрытые хештеги"
|
hiddenTags: "Скрытые хештеги"
|
||||||
|
hiddenTagsDescription: "Установленные теги не будут отображаться в тренде, можно установить несколько тегов."
|
||||||
notesSearchNotAvailable: "Поиск заметок недоступен"
|
notesSearchNotAvailable: "Поиск заметок недоступен"
|
||||||
license: "Лицензия"
|
license: "Лицензия"
|
||||||
unfavoriteConfirm: "Удалить избранное?"
|
unfavoriteConfirm: "Удалить избранное?"
|
||||||
|
@ -1066,6 +1097,7 @@ retryAllQueuesConfirmTitle: "Хотите попробовать ещё раз?"
|
||||||
retryAllQueuesConfirmText: "Нагрузка на сервер может увеличиться"
|
retryAllQueuesConfirmText: "Нагрузка на сервер может увеличиться"
|
||||||
enableChartsForRemoteUser: "Создание диаграмм для удалённых пользователей"
|
enableChartsForRemoteUser: "Создание диаграмм для удалённых пользователей"
|
||||||
enableChartsForFederatedInstances: "Создание диаграмм для удалённых серверов"
|
enableChartsForFederatedInstances: "Создание диаграмм для удалённых серверов"
|
||||||
|
enableStatsForFederatedInstances: "Получить информацию об удаленном сервере"
|
||||||
showClipButtonInNoteFooter: "Показать кнопку добавления в подборку в меню действий с заметкой"
|
showClipButtonInNoteFooter: "Показать кнопку добавления в подборку в меню действий с заметкой"
|
||||||
reactionsDisplaySize: "Размер реакций"
|
reactionsDisplaySize: "Размер реакций"
|
||||||
limitWidthOfReaction: "Ограничить максимальную ширину реакций и отображать их в уменьшенном размере."
|
limitWidthOfReaction: "Ограничить максимальную ширину реакций и отображать их в уменьшенном размере."
|
||||||
|
@ -1101,6 +1133,7 @@ preservedUsernames: "Зарезервированные имена пользо
|
||||||
preservedUsernamesDescription: "Перечислите зарезервированные имена пользователей, отделяя их строками. Они станут недоступны при создании учётной записи. Это ограничение не применяется при создании учётной записи администраторами. Также, уже существующие учётные записи останутся без изменений."
|
preservedUsernamesDescription: "Перечислите зарезервированные имена пользователей, отделяя их строками. Они станут недоступны при создании учётной записи. Это ограничение не применяется при создании учётной записи администраторами. Также, уже существующие учётные записи останутся без изменений."
|
||||||
createNoteFromTheFile: "Создать заметку из этого файла"
|
createNoteFromTheFile: "Создать заметку из этого файла"
|
||||||
archive: "Архив"
|
archive: "Архив"
|
||||||
|
archived: "Архивировано"
|
||||||
unarchive: "Разархивировать"
|
unarchive: "Разархивировать"
|
||||||
channelArchiveConfirmTitle: "Переместить {name} в архив?"
|
channelArchiveConfirmTitle: "Переместить {name} в архив?"
|
||||||
channelArchiveConfirmDescription: "Архивированные каналы перестанут отображаться в списке каналов или результатах поиска. В них также нельзя будет добавлять новые записи."
|
channelArchiveConfirmDescription: "Архивированные каналы перестанут отображаться в списке каналов или результатах поиска. В них также нельзя будет добавлять новые записи."
|
||||||
|
@ -1121,6 +1154,7 @@ rolesThatCanBeUsedThisEmojiAsReaction: "Роли тех, кому можно и
|
||||||
rolesThatCanBeUsedThisEmojiAsReactionEmptyDescription: "Если здесь ничего не указать, в качестве реакции эту эмодзи сможет использовать каждый."
|
rolesThatCanBeUsedThisEmojiAsReactionEmptyDescription: "Если здесь ничего не указать, в качестве реакции эту эмодзи сможет использовать каждый."
|
||||||
rolesThatCanBeUsedThisEmojiAsReactionPublicRoleWarn: "Эти роли должны быть общедоступными."
|
rolesThatCanBeUsedThisEmojiAsReactionPublicRoleWarn: "Эти роли должны быть общедоступными."
|
||||||
cancelReactionConfirm: "Вы действительно хотите удалить свою реакцию?"
|
cancelReactionConfirm: "Вы действительно хотите удалить свою реакцию?"
|
||||||
|
changeReactionConfirm: "Вы действительно хотите удалить свою реакцию?"
|
||||||
later: "Позже"
|
later: "Позже"
|
||||||
goToMisskey: "К Misskey"
|
goToMisskey: "К Misskey"
|
||||||
additionalEmojiDictionary: "Дополнительные словари эмодзи"
|
additionalEmojiDictionary: "Дополнительные словари эмодзи"
|
||||||
|
@ -1130,9 +1164,16 @@ enableServerMachineStats: "Опубликовать характеристики
|
||||||
enableIdenticonGeneration: "Включить генерацию иконки пользователя"
|
enableIdenticonGeneration: "Включить генерацию иконки пользователя"
|
||||||
turnOffToImprovePerformance: "Отключение этого параметра может повысить производительность."
|
turnOffToImprovePerformance: "Отключение этого параметра может повысить производительность."
|
||||||
createInviteCode: "Создать код приглашения"
|
createInviteCode: "Создать код приглашения"
|
||||||
|
createWithOptions: "Используйте параметры для создания"
|
||||||
createCount: "Количество приглашений"
|
createCount: "Количество приглашений"
|
||||||
|
inviteCodeCreated: "Создан пригласительный код"
|
||||||
|
inviteLimitExceeded: "Достигнут предел количества пригласительных кодов, которые могут быть созданы."
|
||||||
|
createLimitRemaining: "Пригласительные коды, которые могут быть созданы: {limit} "
|
||||||
|
inviteLimitResetCycle: "За определенное {time} Вы можете создать неограниченное количество пригласительных кодов {limit} "
|
||||||
expirationDate: "Дата истечения"
|
expirationDate: "Дата истечения"
|
||||||
noExpirationDate: "Бессрочно"
|
noExpirationDate: "Бессрочно"
|
||||||
|
inviteCodeUsedAt: "Дата и время, когда был использован пригласительный код"
|
||||||
|
registeredUserUsingInviteCode: "Пользователи, которые использовали пригласительный код"
|
||||||
unused: "Неиспользованное"
|
unused: "Неиспользованное"
|
||||||
used: "Использован"
|
used: "Использован"
|
||||||
expired: "Срок действия приглашения истёк"
|
expired: "Срок действия приглашения истёк"
|
||||||
|
|
|
@ -220,6 +220,7 @@ silenceThisInstance: "静音此服务器"
|
||||||
mediaSilenceThisInstance: "隐藏此服务器的媒体文件"
|
mediaSilenceThisInstance: "隐藏此服务器的媒体文件"
|
||||||
operations: "操作"
|
operations: "操作"
|
||||||
software: "软件"
|
software: "软件"
|
||||||
|
softwareName: "软件名"
|
||||||
version: "版本"
|
version: "版本"
|
||||||
metadata: "元数据"
|
metadata: "元数据"
|
||||||
withNFiles: "{n} 个文件"
|
withNFiles: "{n} 个文件"
|
||||||
|
@ -1422,6 +1423,8 @@ _settings:
|
||||||
showNavbarSubButtons: "在导航栏中显示副按钮"
|
showNavbarSubButtons: "在导航栏中显示副按钮"
|
||||||
ifOn: "启用时"
|
ifOn: "启用时"
|
||||||
ifOff: "关闭时"
|
ifOff: "关闭时"
|
||||||
|
enablePullToRefresh: "开启下拉刷新"
|
||||||
|
enablePullToRefresh_description: "使用鼠标时按下滚轮来拖动"
|
||||||
_chat:
|
_chat:
|
||||||
showSenderName: "显示发送者的名字"
|
showSenderName: "显示发送者的名字"
|
||||||
sendOnEnter: "回车键发送"
|
sendOnEnter: "回车键发送"
|
||||||
|
@ -1467,6 +1470,7 @@ _delivery:
|
||||||
manuallySuspended: "手动停止中"
|
manuallySuspended: "手动停止中"
|
||||||
goneSuspended: "因服务器被删除而停止"
|
goneSuspended: "因服务器被删除而停止"
|
||||||
autoSuspendedForNotResponding: "因服务器无应答而停止"
|
autoSuspendedForNotResponding: "因服务器无应答而停止"
|
||||||
|
softwareSuspended: "因有不可用的软件而停止"
|
||||||
_bubbleGame:
|
_bubbleGame:
|
||||||
howToPlay: "游戏说明"
|
howToPlay: "游戏说明"
|
||||||
hold: "抓住"
|
hold: "抓住"
|
||||||
|
@ -1598,6 +1602,7 @@ _serverSettings:
|
||||||
openRegistration: "开放注册"
|
openRegistration: "开放注册"
|
||||||
openRegistrationWarning: "开放注册有风险。建议仅当能够持续监控服务器并在出现问题时能够立即响应时才打开它。"
|
openRegistrationWarning: "开放注册有风险。建议仅当能够持续监控服务器并在出现问题时能够立即响应时才打开它。"
|
||||||
thisSettingWillAutomaticallyOffWhenModeratorsInactive: "若在一段时间内没有检测到管理活动,为防止垃圾信息,此设定将自动关闭。"
|
thisSettingWillAutomaticallyOffWhenModeratorsInactive: "若在一段时间内没有检测到管理活动,为防止垃圾信息,此设定将自动关闭。"
|
||||||
|
deliverSuspendedSoftware: "不可用的软件"
|
||||||
_accountMigration:
|
_accountMigration:
|
||||||
moveFrom: "从别的账号迁移到此账户"
|
moveFrom: "从别的账号迁移到此账户"
|
||||||
moveFromSub: "为另一个账户建立别名"
|
moveFromSub: "为另一个账户建立别名"
|
||||||
|
|
|
@ -220,6 +220,7 @@ silenceThisInstance: "禁言此伺服器"
|
||||||
mediaSilenceThisInstance: "將這個伺服器的媒體設為禁言"
|
mediaSilenceThisInstance: "將這個伺服器的媒體設為禁言"
|
||||||
operations: "操作"
|
operations: "操作"
|
||||||
software: "軟體"
|
software: "軟體"
|
||||||
|
softwareName: "軟體名稱"
|
||||||
version: "版本"
|
version: "版本"
|
||||||
metadata: "詮釋資料"
|
metadata: "詮釋資料"
|
||||||
withNFiles: "{n} 個檔案"
|
withNFiles: "{n} 個檔案"
|
||||||
|
@ -1347,6 +1348,7 @@ readonly: "唯讀"
|
||||||
goToDeck: "回去甲板"
|
goToDeck: "回去甲板"
|
||||||
federationJobs: "聯邦通訊作業"
|
federationJobs: "聯邦通訊作業"
|
||||||
driveAboutTip: "在「雲端硬碟」中,會顯示過去上傳的檔案列表。<br>\n可以在附加到貼文時重新利用,或者事先上傳之後再用於發布。<br>\n<b>請注意,刪除檔案後,之前使用過該檔案的所有地方(貼文、頁面、大頭貼、橫幅等)也會一併無法顯示。</b><br>\n也可以建立資料夾來整理檔案。"
|
driveAboutTip: "在「雲端硬碟」中,會顯示過去上傳的檔案列表。<br>\n可以在附加到貼文時重新利用,或者事先上傳之後再用於發布。<br>\n<b>請注意,刪除檔案後,之前使用過該檔案的所有地方(貼文、頁面、大頭貼、橫幅等)也會一併無法顯示。</b><br>\n也可以建立資料夾來整理檔案。"
|
||||||
|
scrollToClose: "用滾輪關閉"
|
||||||
_chat:
|
_chat:
|
||||||
noMessagesYet: "尚無訊息"
|
noMessagesYet: "尚無訊息"
|
||||||
newMessage: "新訊息"
|
newMessage: "新訊息"
|
||||||
|
@ -1423,6 +1425,8 @@ _settings:
|
||||||
ifOn: "開啟時"
|
ifOn: "開啟時"
|
||||||
ifOff: "關閉時"
|
ifOff: "關閉時"
|
||||||
enableSyncThemesBetweenDevices: "在裝置之間同步已安裝的主題"
|
enableSyncThemesBetweenDevices: "在裝置之間同步已安裝的主題"
|
||||||
|
enablePullToRefresh: "下拉更新"
|
||||||
|
enablePullToRefresh_description: "使用滑鼠,按下並拖曳滾輪。"
|
||||||
_chat:
|
_chat:
|
||||||
showSenderName: "顯示發送者的名稱"
|
showSenderName: "顯示發送者的名稱"
|
||||||
sendOnEnter: "按下 Enter 發送訊息"
|
sendOnEnter: "按下 Enter 發送訊息"
|
||||||
|
@ -1468,6 +1472,7 @@ _delivery:
|
||||||
manuallySuspended: "手動暫停中"
|
manuallySuspended: "手動暫停中"
|
||||||
goneSuspended: "因為伺服器刪除所以暫停中"
|
goneSuspended: "因為伺服器刪除所以暫停中"
|
||||||
autoSuspendedForNotResponding: "因為伺服器沒有回應所以暫停中"
|
autoSuspendedForNotResponding: "因為伺服器沒有回應所以暫停中"
|
||||||
|
softwareSuspended: "此軟體因已停止發佈,目前無法使用"
|
||||||
_bubbleGame:
|
_bubbleGame:
|
||||||
howToPlay: "玩法說明"
|
howToPlay: "玩法說明"
|
||||||
hold: "保留"
|
hold: "保留"
|
||||||
|
@ -1599,6 +1604,8 @@ _serverSettings:
|
||||||
openRegistration: "允許建立帳戶"
|
openRegistration: "允許建立帳戶"
|
||||||
openRegistrationWarning: "開放註冊伴隨著風險。 建議只有在伺服器受到持續監控,並準備好在出現問題時能立即處理的情況下才開放註冊。"
|
openRegistrationWarning: "開放註冊伴隨著風險。 建議只有在伺服器受到持續監控,並準備好在出現問題時能立即處理的情況下才開放註冊。"
|
||||||
thisSettingWillAutomaticallyOffWhenModeratorsInactive: "如果在一段期間內沒有偵測到任何審查員活動,此設定將自動關閉,以防止垃圾內容。"
|
thisSettingWillAutomaticallyOffWhenModeratorsInactive: "如果在一段期間內沒有偵測到任何審查員活動,此設定將自動關閉,以防止垃圾內容。"
|
||||||
|
deliverSuspendedSoftware: "已停止發佈的軟體"
|
||||||
|
deliverSuspendedSoftwareDescription: "由於脆弱性等原因,可以指定伺服器軟體的名稱與版本範圍來停止其發佈。這些版本資訊是由伺服器所提供,其可靠性無法保證。版本的指定可以使用 semver(語意化版本控制) 的範圍語法,但如果指定為 >= 2024.3.1,則像 2024.3.1-custom.0 這樣的自訂版本將不會被包含在內,因此建議使用 >= 2024.3.1-0 的方式來同時包含預發佈版本。"
|
||||||
_accountMigration:
|
_accountMigration:
|
||||||
moveFrom: "從其他帳戶遷移到這個帳戶"
|
moveFrom: "從其他帳戶遷移到這個帳戶"
|
||||||
moveFromSub: "為另一個帳戶建立別名"
|
moveFromSub: "為另一個帳戶建立別名"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"version": "2025.4.1",
|
"version": "2025.5.0",
|
||||||
"codename": "nasubi",
|
"codename": "nasubi",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import tsParser from '@typescript-eslint/parser';
|
import tsParser from '@typescript-eslint/parser';
|
||||||
|
import globals from 'globals';
|
||||||
import sharedConfig from '../shared/eslint.config.js';
|
import sharedConfig from '../shared/eslint.config.js';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
|
@ -6,6 +7,13 @@ export default [
|
||||||
{
|
{
|
||||||
ignores: ['**/node_modules', 'built', '@types/**/*', 'migration'],
|
ignores: ['**/node_modules', 'built', '@types/**/*', 'migration'],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.node,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
files: ['**/*.ts', '**/*.tsx'],
|
files: ['**/*.ts', '**/*.tsx'],
|
||||||
languageOptions: {
|
languageOptions: {
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/env node
|
||||||
|
import child_process from 'node:child_process';
|
||||||
|
import path from 'node:path';
|
||||||
|
import url from 'node:url';
|
||||||
|
|
||||||
|
import semver from 'semver';
|
||||||
|
|
||||||
|
const __filename = url.fileURLToPath(import.meta.url);
|
||||||
|
const __dirname = path.dirname(__filename);
|
||||||
|
|
||||||
|
const args = [];
|
||||||
|
args.push(...[
|
||||||
|
...semver.satisfies(process.version, '^20.17.0 || ^22.0.0') ? ['--no-experimental-require-module'] : [],
|
||||||
|
'--experimental-vm-modules',
|
||||||
|
'--experimental-import-meta-resolve',
|
||||||
|
path.join(__dirname, 'node_modules/jest/bin/jest.js'),
|
||||||
|
...process.argv.slice(2),
|
||||||
|
]);
|
||||||
|
|
||||||
|
child_process.spawn(process.execPath, args, { stdio: 'inherit' });
|
|
@ -0,0 +1,16 @@
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
export class DeliverSuspendedSoftware1743403874305 {
|
||||||
|
name = 'DeliverSuspendedSoftware1743403874305'
|
||||||
|
|
||||||
|
async up(queryRunner) {
|
||||||
|
await queryRunner.query(`ALTER TABLE "meta" ADD "deliverSuspendedSoftware" jsonb NOT NULL DEFAULT '[]'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async down(queryRunner) {
|
||||||
|
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "deliverSuspendedSoftware"`);
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,11 +3,25 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { isConcurrentIndexMigrationEnabled } from "./js/migration-config.js";
|
||||||
|
|
||||||
export class CompositeNoteIndex1745378064470 {
|
export class CompositeNoteIndex1745378064470 {
|
||||||
name = 'CompositeNoteIndex1745378064470';
|
name = 'CompositeNoteIndex1745378064470';
|
||||||
|
transaction = isConcurrentIndexMigrationEnabled() ? false : undefined;
|
||||||
|
|
||||||
async up(queryRunner) {
|
async up(queryRunner) {
|
||||||
await queryRunner.query(`CREATE INDEX "IDX_724b311e6f883751f261ebe378" ON "note" ("userId", "id" DESC)`);
|
const concurrently = isConcurrentIndexMigrationEnabled();
|
||||||
|
|
||||||
|
if (concurrently) {
|
||||||
|
const hasValidIndex = await queryRunner.query(`SELECT indisvalid FROM pg_index INNER JOIN pg_class ON pg_index.indexrelid = pg_class.oid WHERE pg_class.relname = 'IDX_724b311e6f883751f261ebe378'`);
|
||||||
|
if (hasValidIndex.length === 0 || hasValidIndex[0].indisvalid !== true) {
|
||||||
|
await queryRunner.query(`DROP INDEX IF EXISTS "IDX_724b311e6f883751f261ebe378"`);
|
||||||
|
await queryRunner.query(`CREATE INDEX CONCURRENTLY "IDX_724b311e6f883751f261ebe378" ON "note" ("userId", "id" DESC)`);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
await queryRunner.query(`CREATE INDEX IF NOT EXISTS "IDX_724b311e6f883751f261ebe378" ON "note" ("userId", "id" DESC)`);
|
||||||
|
}
|
||||||
|
|
||||||
await queryRunner.query(`DROP INDEX IF EXISTS "IDX_5b87d9d19127bd5d92026017a7"`);
|
await queryRunner.query(`DROP INDEX IF EXISTS "IDX_5b87d9d19127bd5d92026017a7"`);
|
||||||
// Flush all cached Linear Scan Plans and redo statistics for composite index
|
// Flush all cached Linear Scan Plans and redo statistics for composite index
|
||||||
// this is important for Postgres to learn that even in highly complex queries, using this index first can reduce the result set significantly
|
// this is important for Postgres to learn that even in highly complex queries, using this index first can reduce the result set significantly
|
||||||
|
@ -15,7 +29,8 @@ export class CompositeNoteIndex1745378064470 {
|
||||||
}
|
}
|
||||||
|
|
||||||
async down(queryRunner) {
|
async down(queryRunner) {
|
||||||
|
const mayConcurrently = isConcurrentIndexMigrationEnabled() ? 'CONCURRENTLY' : '';
|
||||||
await queryRunner.query(`DROP INDEX IF EXISTS "IDX_724b311e6f883751f261ebe378"`);
|
await queryRunner.query(`DROP INDEX IF EXISTS "IDX_724b311e6f883751f261ebe378"`);
|
||||||
await queryRunner.query(`CREATE INDEX "IDX_5b87d9d19127bd5d92026017a7" ON "note" ("userId")`);
|
await queryRunner.query(`CREATE INDEX ${mayConcurrently} "IDX_5b87d9d19127bd5d92026017a7" ON "note" ("userId")`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
export function isConcurrentIndexMigrationEnabled() {
|
||||||
|
return process.env.MISSKEY_MIGRATION_CREATE_INDEX_CONCURRENTLY === '1';
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
import { DataSource } from 'typeorm';
|
import { DataSource } from 'typeorm';
|
||||||
import { loadConfig } from './built/config.js';
|
import { loadConfig } from './built/config.js';
|
||||||
import { entities } from './built/postgres.js';
|
import { entities } from './built/postgres.js';
|
||||||
|
import { isConcurrentIndexMigrationEnabled } from "./migration/js/migration-config.js";
|
||||||
|
|
||||||
const config = loadConfig();
|
const config = loadConfig();
|
||||||
|
|
||||||
|
@ -14,4 +15,5 @@ export default new DataSource({
|
||||||
extra: config.db.extra,
|
extra: config.db.extra,
|
||||||
entities: entities,
|
entities: entities,
|
||||||
migrations: ['migration/*.js'],
|
migrations: ['migration/*.js'],
|
||||||
|
migrationsTransactionMode: isConcurrentIndexMigrationEnabled() ? 'each' : 'all',
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,12 +22,12 @@
|
||||||
"typecheck": "tsc --noEmit && tsc -p test --noEmit && tsc -p test-federation --noEmit",
|
"typecheck": "tsc --noEmit && tsc -p test --noEmit && tsc -p test-federation --noEmit",
|
||||||
"eslint": "eslint --quiet \"{src,test-federation}/**/*.ts\"",
|
"eslint": "eslint --quiet \"{src,test-federation}/**/*.ts\"",
|
||||||
"lint": "pnpm typecheck && pnpm eslint",
|
"lint": "pnpm typecheck && pnpm eslint",
|
||||||
"jest": "cross-env NODE_ENV=test node --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --forceExit --config jest.config.unit.cjs",
|
"jest": "cross-env NODE_ENV=test node ./jest.js --forceExit --config jest.config.unit.cjs",
|
||||||
"jest:e2e": "cross-env NODE_ENV=test node --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --forceExit --config jest.config.e2e.cjs",
|
"jest:e2e": "cross-env NODE_ENV=test node ./jest.js --forceExit --config jest.config.e2e.cjs",
|
||||||
"jest:fed": "node --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --forceExit --config jest.config.fed.cjs",
|
"jest:fed": "node ./jest.js --forceExit --config jest.config.fed.cjs",
|
||||||
"jest-and-coverage": "cross-env NODE_ENV=test node --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --coverage --forceExit --config jest.config.unit.cjs",
|
"jest-and-coverage": "cross-env NODE_ENV=test node ./jest.js --coverage --forceExit --config jest.config.unit.cjs",
|
||||||
"jest-and-coverage:e2e": "cross-env NODE_ENV=test node --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --coverage --forceExit --config jest.config.e2e.cjs",
|
"jest-and-coverage:e2e": "cross-env NODE_ENV=test node ./jest.js --coverage --forceExit --config jest.config.e2e.cjs",
|
||||||
"jest-clear": "cross-env NODE_ENV=test node --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --clearCache",
|
"jest-clear": "cross-env NODE_ENV=test node ./jest.js --clearCache",
|
||||||
"test": "pnpm jest",
|
"test": "pnpm jest",
|
||||||
"test:e2e": "pnpm build && pnpm build:test && pnpm jest:e2e",
|
"test:e2e": "pnpm build && pnpm build:test && pnpm jest:e2e",
|
||||||
"test:fed": "pnpm jest:fed",
|
"test:fed": "pnpm jest:fed",
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
"@fastify/multipart": "9.0.3",
|
"@fastify/multipart": "9.0.3",
|
||||||
"@fastify/static": "8.1.1",
|
"@fastify/static": "8.1.1",
|
||||||
"@fastify/view": "10.0.2",
|
"@fastify/view": "10.0.2",
|
||||||
"@misskey-dev/sharp-read-bmp": "1.3.0",
|
"@misskey-dev/sharp-read-bmp": "1.2.0",
|
||||||
"@misskey-dev/summaly": "5.2.1",
|
"@misskey-dev/summaly": "5.2.1",
|
||||||
"@napi-rs/canvas": "0.1.69",
|
"@napi-rs/canvas": "0.1.69",
|
||||||
"@nestjs/common": "11.1.0",
|
"@nestjs/common": "11.1.0",
|
||||||
|
@ -168,7 +168,8 @@
|
||||||
"rxjs": "7.8.2",
|
"rxjs": "7.8.2",
|
||||||
"sanitize-html": "2.16.0",
|
"sanitize-html": "2.16.0",
|
||||||
"secure-json-parse": "3.0.2",
|
"secure-json-parse": "3.0.2",
|
||||||
"sharp": "0.34.1",
|
"sharp": "0.33.5",
|
||||||
|
"semver": "7.7.1",
|
||||||
"slacc": "0.0.10",
|
"slacc": "0.0.10",
|
||||||
"strict-event-emitter-types": "2.0.0",
|
"strict-event-emitter-types": "2.0.0",
|
||||||
"stringz": "2.1.0",
|
"stringz": "2.1.0",
|
||||||
|
|
|
@ -24,8 +24,13 @@ const $config: Provider = {
|
||||||
const $db: Provider = {
|
const $db: Provider = {
|
||||||
provide: DI.db,
|
provide: DI.db,
|
||||||
useFactory: async (config) => {
|
useFactory: async (config) => {
|
||||||
|
try {
|
||||||
const db = createPostgresDataSource(config);
|
const db = createPostgresDataSource(config);
|
||||||
return await db.initialize();
|
return await db.initialize();
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
inject: [DI.config],
|
inject: [DI.config],
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,87 +9,7 @@ import type { MiUser } from '@/models/User.js';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
import { bindThis } from '@/decorators.js';
|
import { bindThis } from '@/decorators.js';
|
||||||
import { NotificationService } from '@/core/NotificationService.js';
|
import { NotificationService } from '@/core/NotificationService.js';
|
||||||
|
import { ACHIEVEMENT_TYPES } from '@/models/UserProfile.js';
|
||||||
export const ACHIEVEMENT_TYPES = [
|
|
||||||
'notes1',
|
|
||||||
'notes10',
|
|
||||||
'notes100',
|
|
||||||
'notes500',
|
|
||||||
'notes1000',
|
|
||||||
'notes5000',
|
|
||||||
'notes10000',
|
|
||||||
'notes20000',
|
|
||||||
'notes30000',
|
|
||||||
'notes40000',
|
|
||||||
'notes50000',
|
|
||||||
'notes60000',
|
|
||||||
'notes70000',
|
|
||||||
'notes80000',
|
|
||||||
'notes90000',
|
|
||||||
'notes100000',
|
|
||||||
'login3',
|
|
||||||
'login7',
|
|
||||||
'login15',
|
|
||||||
'login30',
|
|
||||||
'login60',
|
|
||||||
'login100',
|
|
||||||
'login200',
|
|
||||||
'login300',
|
|
||||||
'login400',
|
|
||||||
'login500',
|
|
||||||
'login600',
|
|
||||||
'login700',
|
|
||||||
'login800',
|
|
||||||
'login900',
|
|
||||||
'login1000',
|
|
||||||
'passedSinceAccountCreated1',
|
|
||||||
'passedSinceAccountCreated2',
|
|
||||||
'passedSinceAccountCreated3',
|
|
||||||
'loggedInOnBirthday',
|
|
||||||
'loggedInOnNewYearsDay',
|
|
||||||
'noteClipped1',
|
|
||||||
'noteFavorited1',
|
|
||||||
'myNoteFavorited1',
|
|
||||||
'profileFilled',
|
|
||||||
'markedAsCat',
|
|
||||||
'following1',
|
|
||||||
'following10',
|
|
||||||
'following50',
|
|
||||||
'following100',
|
|
||||||
'following300',
|
|
||||||
'followers1',
|
|
||||||
'followers10',
|
|
||||||
'followers50',
|
|
||||||
'followers100',
|
|
||||||
'followers300',
|
|
||||||
'followers500',
|
|
||||||
'followers1000',
|
|
||||||
'collectAchievements30',
|
|
||||||
'viewAchievements3min',
|
|
||||||
'iLoveMisskey',
|
|
||||||
'foundTreasure',
|
|
||||||
'client30min',
|
|
||||||
'client60min',
|
|
||||||
'noteDeletedWithin1min',
|
|
||||||
'postedAtLateNight',
|
|
||||||
'postedAt0min0sec',
|
|
||||||
'selfQuote',
|
|
||||||
'htl20npm',
|
|
||||||
'viewInstanceChart',
|
|
||||||
'outputHelloWorldOnScratchpad',
|
|
||||||
'open3windows',
|
|
||||||
'driveFolderCircularReference',
|
|
||||||
'reactWithoutRead',
|
|
||||||
'clickedClickHere',
|
|
||||||
'justPlainLucky',
|
|
||||||
'setNameToSyuilo',
|
|
||||||
'cookieClicked',
|
|
||||||
'brainDiver',
|
|
||||||
'smashTestNotificationButton',
|
|
||||||
'tutorialCompleted',
|
|
||||||
'bubbleGameExplodingHead',
|
|
||||||
'bubbleGameDoubleExplodingHead',
|
|
||||||
] as const;
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AchievementService {
|
export class AchievementService {
|
||||||
|
|
|
@ -36,6 +36,7 @@ type TimelineOptions = {
|
||||||
excludeNoFiles?: boolean;
|
excludeNoFiles?: boolean;
|
||||||
excludeReplies?: boolean;
|
excludeReplies?: boolean;
|
||||||
excludePureRenotes: boolean;
|
excludePureRenotes: boolean;
|
||||||
|
ignoreAuthorFromUserSuspension?: boolean;
|
||||||
dbFallback: (untilId: string | null, sinceId: string | null, limit: number) => Promise<MiNote[]>,
|
dbFallback: (untilId: string | null, sinceId: string | null, limit: number) => Promise<MiNote[]>,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -139,6 +140,23 @@ export class FanoutTimelineEndpointService {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
const parentFilter = filter;
|
||||||
|
filter = (note) => {
|
||||||
|
const noteJoined = note as MiNote & {
|
||||||
|
renoteUser: MiUser | null;
|
||||||
|
replyUser: MiUser | null;
|
||||||
|
};
|
||||||
|
if (!ps.ignoreAuthorFromUserSuspension) {
|
||||||
|
if (note.user!.isSuspended) return false;
|
||||||
|
}
|
||||||
|
if (note.userId !== note.renoteUserId && noteJoined.renoteUser?.isSuspended) return false;
|
||||||
|
if (note.userId !== note.replyUserId && noteJoined.replyUser?.isSuspended) return false;
|
||||||
|
|
||||||
|
return parentFilter(note);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const redisTimeline: MiNote[] = [];
|
const redisTimeline: MiNote[] = [];
|
||||||
let readFromRedis = 0;
|
let readFromRedis = 0;
|
||||||
let lastSuccessfulRate = 1; // rateをキャッシュする?
|
let lastSuccessfulRate = 1; // rateをキャッシュする?
|
||||||
|
|
|
@ -43,29 +43,36 @@ export class QueryService {
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public makePaginationQuery<T extends ObjectLiteral>(q: SelectQueryBuilder<T>, sinceId?: string | null, untilId?: string | null, sinceDate?: number | null, untilDate?: number | null): SelectQueryBuilder<T> {
|
public makePaginationQuery<T extends ObjectLiteral>(
|
||||||
|
q: SelectQueryBuilder<T>,
|
||||||
|
sinceId?: string | null,
|
||||||
|
untilId?: string | null,
|
||||||
|
sinceDate?: number | null,
|
||||||
|
untilDate?: number | null,
|
||||||
|
targetColumn = 'id',
|
||||||
|
): SelectQueryBuilder<T> {
|
||||||
if (sinceId && untilId) {
|
if (sinceId && untilId) {
|
||||||
q.andWhere(`${q.alias}.id > :sinceId`, { sinceId: sinceId });
|
q.andWhere(`${q.alias}.${targetColumn} > :sinceId`, { sinceId: sinceId });
|
||||||
q.andWhere(`${q.alias}.id < :untilId`, { untilId: untilId });
|
q.andWhere(`${q.alias}.${targetColumn} < :untilId`, { untilId: untilId });
|
||||||
q.orderBy(`${q.alias}.id`, 'DESC');
|
q.orderBy(`${q.alias}.${targetColumn}`, 'DESC');
|
||||||
} else if (sinceId) {
|
} else if (sinceId) {
|
||||||
q.andWhere(`${q.alias}.id > :sinceId`, { sinceId: sinceId });
|
q.andWhere(`${q.alias}.${targetColumn} > :sinceId`, { sinceId: sinceId });
|
||||||
q.orderBy(`${q.alias}.id`, 'ASC');
|
q.orderBy(`${q.alias}.${targetColumn}`, 'ASC');
|
||||||
} else if (untilId) {
|
} else if (untilId) {
|
||||||
q.andWhere(`${q.alias}.id < :untilId`, { untilId: untilId });
|
q.andWhere(`${q.alias}.${targetColumn} < :untilId`, { untilId: untilId });
|
||||||
q.orderBy(`${q.alias}.id`, 'DESC');
|
q.orderBy(`${q.alias}.${targetColumn}`, 'DESC');
|
||||||
} else if (sinceDate && untilDate) {
|
} else if (sinceDate && untilDate) {
|
||||||
q.andWhere(`${q.alias}.id > :sinceId`, { sinceId: this.idService.gen(sinceDate) });
|
q.andWhere(`${q.alias}.${targetColumn} > :sinceId`, { sinceId: this.idService.gen(sinceDate) });
|
||||||
q.andWhere(`${q.alias}.id < :untilId`, { untilId: this.idService.gen(untilDate) });
|
q.andWhere(`${q.alias}.${targetColumn} < :untilId`, { untilId: this.idService.gen(untilDate) });
|
||||||
q.orderBy(`${q.alias}.id`, 'DESC');
|
q.orderBy(`${q.alias}.${targetColumn}`, 'DESC');
|
||||||
} else if (sinceDate) {
|
} else if (sinceDate) {
|
||||||
q.andWhere(`${q.alias}.id > :sinceId`, { sinceId: this.idService.gen(sinceDate) });
|
q.andWhere(`${q.alias}.${targetColumn} > :sinceId`, { sinceId: this.idService.gen(sinceDate) });
|
||||||
q.orderBy(`${q.alias}.id`, 'ASC');
|
q.orderBy(`${q.alias}.${targetColumn}`, 'ASC');
|
||||||
} else if (untilDate) {
|
} else if (untilDate) {
|
||||||
q.andWhere(`${q.alias}.id < :untilId`, { untilId: this.idService.gen(untilDate) });
|
q.andWhere(`${q.alias}.${targetColumn} < :untilId`, { untilId: this.idService.gen(untilDate) });
|
||||||
q.orderBy(`${q.alias}.id`, 'DESC');
|
q.orderBy(`${q.alias}.${targetColumn}`, 'DESC');
|
||||||
} else {
|
} else {
|
||||||
q.orderBy(`${q.alias}.id`, 'DESC');
|
q.orderBy(`${q.alias}.${targetColumn}`, 'DESC');
|
||||||
}
|
}
|
||||||
return q;
|
return q;
|
||||||
}
|
}
|
||||||
|
@ -287,4 +294,26 @@ export class QueryService {
|
||||||
.andWhere(instanceSuspension('renoteUser'));
|
.andWhere(instanceSuspension('renoteUser'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Requirements: user replyUser renoteUser must be joined
|
||||||
|
@bindThis
|
||||||
|
public generateSuspendedUserQueryForNote(q: SelectQueryBuilder<any>, excludeAuthor?: boolean): void {
|
||||||
|
if (excludeAuthor) {
|
||||||
|
const brakets = (user: string) => new Brackets(qb => qb
|
||||||
|
.where(`note.${user}Id IS NULL`)
|
||||||
|
.orWhere(`user.id = ${user}.id`)
|
||||||
|
.orWhere(`${user}.isSuspended = FALSE`));
|
||||||
|
q
|
||||||
|
.andWhere(brakets('replyUser'))
|
||||||
|
.andWhere(brakets('renoteUser'));
|
||||||
|
} else {
|
||||||
|
const brakets = (user: string) => new Brackets(qb => qb
|
||||||
|
.where(`note.${user}Id IS NULL`)
|
||||||
|
.orWhere(`${user}.isSuspended = FALSE`));
|
||||||
|
q
|
||||||
|
.andWhere('user.isSuspended = FALSE')
|
||||||
|
.andWhere(brakets('replyUser'))
|
||||||
|
.andWhere(brakets('renoteUser'));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,6 +235,7 @@ export class SearchService {
|
||||||
|
|
||||||
this.queryService.generateVisibilityQuery(query, me);
|
this.queryService.generateVisibilityQuery(query, me);
|
||||||
this.queryService.generateBlockedHostQueryForNote(query);
|
this.queryService.generateBlockedHostQueryForNote(query);
|
||||||
|
this.queryService.generateSuspendedUserQueryForNote(query);
|
||||||
if (me) this.queryService.generateMutedUserQueryForNotes(query, me);
|
if (me) this.queryService.generateMutedUserQueryForNotes(query, me);
|
||||||
if (me) this.queryService.generateBlockedUserQueryForNotes(query, me);
|
if (me) this.queryService.generateBlockedUserQueryForNotes(query, me);
|
||||||
|
|
||||||
|
@ -297,11 +298,17 @@ export class SearchService {
|
||||||
])
|
])
|
||||||
: [new Set<string>(), new Set<string>()];
|
: [new Set<string>(), new Set<string>()];
|
||||||
|
|
||||||
const query = this.notesRepository.createQueryBuilder('note');
|
const query = this.notesRepository.createQueryBuilder('note')
|
||||||
|
.innerJoinAndSelect('note.user', 'user')
|
||||||
|
.leftJoinAndSelect('note.reply', 'reply')
|
||||||
|
.leftJoinAndSelect('note.renote', 'renote')
|
||||||
|
.leftJoinAndSelect('reply.user', 'replyUser')
|
||||||
|
.leftJoinAndSelect('renote.user', 'renoteUser');
|
||||||
|
|
||||||
query.where('note.id IN (:...noteIds)', { noteIds: res.hits.map(x => x.id) });
|
query.where('note.id IN (:...noteIds)', { noteIds: res.hits.map(x => x.id) });
|
||||||
|
|
||||||
this.queryService.generateBlockedHostQueryForNote(query);
|
this.queryService.generateBlockedHostQueryForNote(query);
|
||||||
|
this.queryService.generateSuspendedUserQueryForNote(query);
|
||||||
|
|
||||||
const notes = (await query.getMany()).filter(note => {
|
const notes = (await query.getMany()).filter(note => {
|
||||||
if (me && isUserRelated(note, userIdsWhoBlockingMe)) return false;
|
if (me && isUserRelated(note, userIdsWhoBlockingMe)) return false;
|
||||||
|
|
|
@ -6,10 +6,12 @@
|
||||||
import { URL, domainToASCII } from 'node:url';
|
import { URL, domainToASCII } from 'node:url';
|
||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
import RE2 from 're2';
|
import RE2 from 're2';
|
||||||
|
import semver from 'semver';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
import type { Config } from '@/config.js';
|
import type { Config } from '@/config.js';
|
||||||
import { bindThis } from '@/decorators.js';
|
import { bindThis } from '@/decorators.js';
|
||||||
import { MiMeta } from '@/models/Meta.js';
|
import { MiMeta, SoftwareSuspension } from '@/models/Meta.js';
|
||||||
|
import { MiInstance } from '@/models/Instance.js';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class UtilityService {
|
export class UtilityService {
|
||||||
|
@ -143,4 +145,20 @@ export class UtilityService {
|
||||||
const host = this.extractDbHost(uri);
|
const host = this.extractDbHost(uri);
|
||||||
return this.isFederationAllowedHost(host);
|
return this.isFederationAllowedHost(host);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@bindThis
|
||||||
|
public isDeliverSuspendedSoftware(software: Pick<MiInstance, 'softwareName' | 'softwareVersion'>): SoftwareSuspension | undefined {
|
||||||
|
if (software.softwareName == null) return undefined;
|
||||||
|
if (software.softwareVersion == null) {
|
||||||
|
// software version is null; suspend iff versionRange is *
|
||||||
|
return this.meta.deliverSuspendedSoftware.find(x =>
|
||||||
|
x.software === software.softwareName
|
||||||
|
&& x.versionRange.trim() === '*');
|
||||||
|
} else {
|
||||||
|
const softwareVersion = software.softwareVersion;
|
||||||
|
return this.meta.deliverSuspendedSoftware.find(x =>
|
||||||
|
x.software === software.softwareName
|
||||||
|
&& semver.satisfies(softwareVersion, x.versionRange, { includePrerelease: true }));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ export class InstanceEntityService {
|
||||||
me?: { id: MiUser['id']; } | null | undefined,
|
me?: { id: MiUser['id']; } | null | undefined,
|
||||||
): Promise<Packed<'FederationInstance'>> {
|
): Promise<Packed<'FederationInstance'>> {
|
||||||
const iAmModerator = me ? await this.roleService.isModerator(me as MiUser) : false;
|
const iAmModerator = me ? await this.roleService.isModerator(me as MiUser) : false;
|
||||||
|
const softwareSuspended = this.utilityService.isDeliverSuspendedSoftware(instance);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: instance.id,
|
id: instance.id,
|
||||||
|
@ -41,8 +42,8 @@ export class InstanceEntityService {
|
||||||
followingCount: instance.followingCount,
|
followingCount: instance.followingCount,
|
||||||
followersCount: instance.followersCount,
|
followersCount: instance.followersCount,
|
||||||
isNotResponding: instance.isNotResponding,
|
isNotResponding: instance.isNotResponding,
|
||||||
isSuspended: instance.suspensionState !== 'none',
|
isSuspended: instance.suspensionState !== 'none' || Boolean(softwareSuspended),
|
||||||
suspensionState: instance.suspensionState,
|
suspensionState: instance.suspensionState === 'none' && softwareSuspended ? 'softwareSuspended' : instance.suspensionState,
|
||||||
isBlocked: this.utilityService.isBlockedHost(this.meta.blockedHosts, instance.host),
|
isBlocked: this.utilityService.isBlockedHost(this.meta.blockedHosts, instance.host),
|
||||||
softwareName: instance.softwareName,
|
softwareName: instance.softwareName,
|
||||||
softwareVersion: instance.softwareVersion,
|
softwareVersion: instance.softwareVersion,
|
||||||
|
|
|
@ -67,6 +67,7 @@ import { packedChatMessageSchema, packedChatMessageLiteSchema, packedChatMessage
|
||||||
import { packedChatRoomSchema } from '@/models/json-schema/chat-room.js';
|
import { packedChatRoomSchema } from '@/models/json-schema/chat-room.js';
|
||||||
import { packedChatRoomInvitationSchema } from '@/models/json-schema/chat-room-invitation.js';
|
import { packedChatRoomInvitationSchema } from '@/models/json-schema/chat-room-invitation.js';
|
||||||
import { packedChatRoomMembershipSchema } from '@/models/json-schema/chat-room-membership.js';
|
import { packedChatRoomMembershipSchema } from '@/models/json-schema/chat-room-membership.js';
|
||||||
|
import { packedAchievementNameSchema, packedAchievementSchema } from '@/models/json-schema/achievement.js';
|
||||||
|
|
||||||
export const refs = {
|
export const refs = {
|
||||||
UserLite: packedUserLiteSchema,
|
UserLite: packedUserLiteSchema,
|
||||||
|
@ -78,6 +79,8 @@ export const refs = {
|
||||||
User: packedUserSchema,
|
User: packedUserSchema,
|
||||||
|
|
||||||
UserList: packedUserListSchema,
|
UserList: packedUserListSchema,
|
||||||
|
Achievement: packedAchievementSchema,
|
||||||
|
AchievementName: packedAchievementNameSchema,
|
||||||
Ad: packedAdSchema,
|
Ad: packedAdSchema,
|
||||||
Announcement: packedAnnouncementSchema,
|
Announcement: packedAnnouncementSchema,
|
||||||
App: packedAppSchema,
|
App: packedAppSchema,
|
||||||
|
|
|
@ -664,4 +664,14 @@ export class MiMeta {
|
||||||
nullable: true,
|
nullable: true,
|
||||||
})
|
})
|
||||||
public googleAnalyticsMeasurementId: string | null;
|
public googleAnalyticsMeasurementId: string | null;
|
||||||
|
|
||||||
|
@Column('jsonb', {
|
||||||
|
default: [],
|
||||||
|
})
|
||||||
|
public deliverSuspendedSoftware: SoftwareSuspension[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type SoftwareSuspension = {
|
||||||
|
software: string,
|
||||||
|
versionRange: string,
|
||||||
|
};
|
||||||
|
|
|
@ -10,6 +10,16 @@ import { MiUser } from './User.js';
|
||||||
import { MiChannel } from './Channel.js';
|
import { MiChannel } from './Channel.js';
|
||||||
import type { MiDriveFile } from './DriveFile.js';
|
import type { MiDriveFile } from './DriveFile.js';
|
||||||
|
|
||||||
|
// Note: When you create a new index for existing column of this table,
|
||||||
|
// it might be better to index concurrently under isConcurrentIndexMigrationEnabled flag
|
||||||
|
// by editing generated migration file since this table is very large,
|
||||||
|
// and it will make a long lock to create index in most cases.
|
||||||
|
// Please note that `CREATE INDEX CONCURRENTLY` is not supported in transaction,
|
||||||
|
// so you need to set `transaction = false` in migration if isConcurrentIndexMigrationEnabled() is true.
|
||||||
|
// Please refer 1745378064470-composite-note-index.js for example.
|
||||||
|
// You should not use `@Index({ concurrent: true })` decorator because database initialization for test will fail
|
||||||
|
// because it will always run CREATE INDEX in transaction based on decorators.
|
||||||
|
// Not appending `{ concurrent: true }` to `@Index` will not cause any problem in production,
|
||||||
@Index(['userId', 'id'])
|
@Index(['userId', 'id'])
|
||||||
@Entity('note')
|
@Entity('note')
|
||||||
export class MiNote {
|
export class MiNote {
|
||||||
|
@ -229,7 +239,6 @@ export class MiNote {
|
||||||
comment: '[Denormalized]',
|
comment: '[Denormalized]',
|
||||||
})
|
})
|
||||||
public renoteUserHost: string | null;
|
public renoteUserHost: string | null;
|
||||||
//#endregion
|
|
||||||
|
|
||||||
constructor(data: Partial<MiNote>) {
|
constructor(data: Partial<MiNote>) {
|
||||||
if (data == null) return;
|
if (data == null) return;
|
||||||
|
|
|
@ -274,7 +274,7 @@ export class MiUserProfile {
|
||||||
default: [],
|
default: [],
|
||||||
})
|
})
|
||||||
public achievements: {
|
public achievements: {
|
||||||
name: string;
|
name: typeof ACHIEVEMENT_TYPES[number];
|
||||||
unlockedAt: number;
|
unlockedAt: number;
|
||||||
}[];
|
}[];
|
||||||
|
|
||||||
|
@ -295,3 +295,84 @@ export class MiUserProfile {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const ACHIEVEMENT_TYPES = [
|
||||||
|
'notes1',
|
||||||
|
'notes10',
|
||||||
|
'notes100',
|
||||||
|
'notes500',
|
||||||
|
'notes1000',
|
||||||
|
'notes5000',
|
||||||
|
'notes10000',
|
||||||
|
'notes20000',
|
||||||
|
'notes30000',
|
||||||
|
'notes40000',
|
||||||
|
'notes50000',
|
||||||
|
'notes60000',
|
||||||
|
'notes70000',
|
||||||
|
'notes80000',
|
||||||
|
'notes90000',
|
||||||
|
'notes100000',
|
||||||
|
'login3',
|
||||||
|
'login7',
|
||||||
|
'login15',
|
||||||
|
'login30',
|
||||||
|
'login60',
|
||||||
|
'login100',
|
||||||
|
'login200',
|
||||||
|
'login300',
|
||||||
|
'login400',
|
||||||
|
'login500',
|
||||||
|
'login600',
|
||||||
|
'login700',
|
||||||
|
'login800',
|
||||||
|
'login900',
|
||||||
|
'login1000',
|
||||||
|
'passedSinceAccountCreated1',
|
||||||
|
'passedSinceAccountCreated2',
|
||||||
|
'passedSinceAccountCreated3',
|
||||||
|
'loggedInOnBirthday',
|
||||||
|
'loggedInOnNewYearsDay',
|
||||||
|
'noteClipped1',
|
||||||
|
'noteFavorited1',
|
||||||
|
'myNoteFavorited1',
|
||||||
|
'profileFilled',
|
||||||
|
'markedAsCat',
|
||||||
|
'following1',
|
||||||
|
'following10',
|
||||||
|
'following50',
|
||||||
|
'following100',
|
||||||
|
'following300',
|
||||||
|
'followers1',
|
||||||
|
'followers10',
|
||||||
|
'followers50',
|
||||||
|
'followers100',
|
||||||
|
'followers300',
|
||||||
|
'followers500',
|
||||||
|
'followers1000',
|
||||||
|
'collectAchievements30',
|
||||||
|
'viewAchievements3min',
|
||||||
|
'iLoveMisskey',
|
||||||
|
'foundTreasure',
|
||||||
|
'client30min',
|
||||||
|
'client60min',
|
||||||
|
'noteDeletedWithin1min',
|
||||||
|
'postedAtLateNight',
|
||||||
|
'postedAt0min0sec',
|
||||||
|
'selfQuote',
|
||||||
|
'htl20npm',
|
||||||
|
'viewInstanceChart',
|
||||||
|
'outputHelloWorldOnScratchpad',
|
||||||
|
'open3windows',
|
||||||
|
'driveFolderCircularReference',
|
||||||
|
'reactWithoutRead',
|
||||||
|
'clickedClickHere',
|
||||||
|
'justPlainLucky',
|
||||||
|
'setNameToSyuilo',
|
||||||
|
'cookieClicked',
|
||||||
|
'brainDiver',
|
||||||
|
'smashTestNotificationButton',
|
||||||
|
'tutorialCompleted',
|
||||||
|
'bubbleGameExplodingHead',
|
||||||
|
'bubbleGameDoubleExplodingHead',
|
||||||
|
] as const;
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
/*
|
||||||
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { ACHIEVEMENT_TYPES } from '@/models/UserProfile.js';
|
||||||
|
|
||||||
|
export const packedAchievementNameSchema = {
|
||||||
|
type: 'string',
|
||||||
|
enum: ACHIEVEMENT_TYPES,
|
||||||
|
optional: false,
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export const packedAchievementSchema = {
|
||||||
|
type: 'object',
|
||||||
|
properties: {
|
||||||
|
name: {
|
||||||
|
ref: 'AchievementName',
|
||||||
|
},
|
||||||
|
unlockedAt: {
|
||||||
|
type: 'number',
|
||||||
|
optional: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} as const;
|
|
@ -48,7 +48,7 @@ export const packedFederationInstanceSchema = {
|
||||||
suspensionState: {
|
suspensionState: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
nullable: false, optional: false,
|
nullable: false, optional: false,
|
||||||
enum: ['none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding'],
|
enum: ['none', 'manuallySuspended', 'goneSuspended', 'autoSuspendedForNotResponding', 'softwareSuspended'],
|
||||||
},
|
},
|
||||||
isBlocked: {
|
isBlocked: {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ACHIEVEMENT_TYPES } from '@/core/AchievementService.js';
|
|
||||||
import { notificationTypes, userExportableEntities } from '@/types.js';
|
import { notificationTypes, userExportableEntities } from '@/types.js';
|
||||||
|
|
||||||
const baseSchema = {
|
const baseSchema = {
|
||||||
|
@ -312,9 +311,7 @@ export const packedNotificationSchema = {
|
||||||
enum: ['achievementEarned'],
|
enum: ['achievementEarned'],
|
||||||
},
|
},
|
||||||
achievement: {
|
achievement: {
|
||||||
type: 'string',
|
ref: 'AchievementName',
|
||||||
optional: false, nullable: false,
|
|
||||||
enum: ACHIEVEMENT_TYPES,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
|
|
|
@ -630,18 +630,7 @@ export const packedMeDetailedOnlySchema = {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
nullable: false, optional: false,
|
nullable: false, optional: false,
|
||||||
items: {
|
items: {
|
||||||
type: 'object',
|
ref: 'Achievement',
|
||||||
nullable: false, optional: false,
|
|
||||||
properties: {
|
|
||||||
name: {
|
|
||||||
type: 'string',
|
|
||||||
nullable: false, optional: false,
|
|
||||||
},
|
|
||||||
unlockedAt: {
|
|
||||||
type: 'number',
|
|
||||||
nullable: false, optional: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
loggedInDays: {
|
loggedInDays: {
|
||||||
|
|
|
@ -71,6 +71,15 @@ export class DeliverProcessorService {
|
||||||
return 'skip (suspended)';
|
return 'skip (suspended)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const i = await (this.meta.enableStatsForFederatedInstances
|
||||||
|
? this.federatedInstanceService.fetchOrRegister(host)
|
||||||
|
: this.federatedInstanceService.fetch(host));
|
||||||
|
|
||||||
|
// suspend server by software
|
||||||
|
if (i != null && this.utilityService.isDeliverSuspendedSoftware(i)) {
|
||||||
|
return 'skip (software suspended)';
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.apRequestService.signedPost(job.data.user, job.data.to, job.data.content, job.data.digest);
|
await this.apRequestService.signedPost(job.data.user, job.data.to, job.data.content, job.data.digest);
|
||||||
|
|
||||||
|
@ -79,10 +88,6 @@ export class DeliverProcessorService {
|
||||||
|
|
||||||
// Update instance stats
|
// Update instance stats
|
||||||
process.nextTick(async () => {
|
process.nextTick(async () => {
|
||||||
const i = await (this.meta.enableStatsForFederatedInstances
|
|
||||||
? this.federatedInstanceService.fetchOrRegister(host)
|
|
||||||
: this.federatedInstanceService.fetch(host));
|
|
||||||
|
|
||||||
if (i == null) return;
|
if (i == null) return;
|
||||||
|
|
||||||
if (i.isNotResponding) {
|
if (i.isNotResponding) {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import cluster from 'node:cluster';
|
||||||
import * as fs from 'node:fs';
|
import * as fs from 'node:fs';
|
||||||
import { fileURLToPath } from 'node:url';
|
import { fileURLToPath } from 'node:url';
|
||||||
import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common';
|
import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common';
|
||||||
import Fastify, { FastifyInstance } from 'fastify';
|
import Fastify, { type FastifyInstance } from 'fastify';
|
||||||
import fastifyStatic from '@fastify/static';
|
import fastifyStatic from '@fastify/static';
|
||||||
import fastifyRawBody from 'fastify-raw-body';
|
import fastifyRawBody from 'fastify-raw-body';
|
||||||
import { IsNull } from 'typeorm';
|
import { IsNull } from 'typeorm';
|
||||||
|
@ -73,7 +73,7 @@ export class ServerService implements OnApplicationShutdown {
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public async launch() {
|
public async launch(): Promise<void> {
|
||||||
const fastify = Fastify({
|
const fastify = Fastify({
|
||||||
trustProxy: true,
|
trustProxy: true,
|
||||||
logger: false,
|
logger: false,
|
||||||
|
@ -133,8 +133,8 @@ export class ServerService implements OnApplicationShutdown {
|
||||||
reply.header('content-type', 'text/plain; charset=utf-8');
|
reply.header('content-type', 'text/plain; charset=utf-8');
|
||||||
reply.header('link', `<${encodeURI(location)}>; rel="canonical"`);
|
reply.header('link', `<${encodeURI(location)}>; rel="canonical"`);
|
||||||
done(null, [
|
done(null, [
|
||||||
'Refusing to relay remote ActivityPub object lookup.',
|
"Refusing to relay remote ActivityPub object lookup.",
|
||||||
'',
|
"",
|
||||||
`Please remove 'application/activity+json' and 'application/ld+json' from the Accept header or fetch using the authoritative URL at ${location}.`,
|
`Please remove 'application/activity+json' and 'application/ld+json' from the Accept header or fetch using the authoritative URL at ${location}.`,
|
||||||
].join('\n'));
|
].join('\n'));
|
||||||
});
|
});
|
||||||
|
@ -301,7 +301,6 @@ export class ServerService implements OnApplicationShutdown {
|
||||||
}
|
}
|
||||||
|
|
||||||
await fastify.ready();
|
await fastify.ready();
|
||||||
return fastify;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
|
@ -310,6 +309,13 @@ export class ServerService implements OnApplicationShutdown {
|
||||||
await this.#fastify.close();
|
await this.#fastify.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the Fastify instance for testing.
|
||||||
|
*/
|
||||||
|
public get fastify(): FastifyInstance {
|
||||||
|
return this.#fastify;
|
||||||
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
async onApplicationShutdown(signal: string): Promise<void> {
|
async onApplicationShutdown(signal: string): Promise<void> {
|
||||||
await this.dispose();
|
await this.dispose();
|
||||||
|
|
|
@ -6,11 +6,8 @@
|
||||||
import { randomUUID } from 'node:crypto';
|
import { randomUUID } from 'node:crypto';
|
||||||
import * as fs from 'node:fs';
|
import * as fs from 'node:fs';
|
||||||
import * as stream from 'node:stream/promises';
|
import * as stream from 'node:stream/promises';
|
||||||
import { Transform } from 'node:stream';
|
|
||||||
import { type MultipartFile } from '@fastify/multipart';
|
|
||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
import * as Sentry from '@sentry/node';
|
import * as Sentry from '@sentry/node';
|
||||||
import { AttachmentFile } from '@/server/api/endpoint-base.js';
|
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
import { getIpHash } from '@/misc/get-ip-hash.js';
|
import { getIpHash } from '@/misc/get-ip-hash.js';
|
||||||
import type { MiLocalUser, MiUser } from '@/models/User.js';
|
import type { MiLocalUser, MiUser } from '@/models/User.js';
|
||||||
|
@ -19,7 +16,7 @@ import type Logger from '@/logger.js';
|
||||||
import type { MiMeta, UserIpsRepository } from '@/models/_.js';
|
import type { MiMeta, UserIpsRepository } from '@/models/_.js';
|
||||||
import { createTemp } from '@/misc/create-temp.js';
|
import { createTemp } from '@/misc/create-temp.js';
|
||||||
import { bindThis } from '@/decorators.js';
|
import { bindThis } from '@/decorators.js';
|
||||||
import { type RolePolicies, RoleService } from '@/core/RoleService.js';
|
import { RoleService } from '@/core/RoleService.js';
|
||||||
import type { Config } from '@/config.js';
|
import type { Config } from '@/config.js';
|
||||||
import { ApiError } from './error.js';
|
import { ApiError } from './error.js';
|
||||||
import { RateLimiterService } from './RateLimiterService.js';
|
import { RateLimiterService } from './RateLimiterService.js';
|
||||||
|
@ -203,6 +200,18 @@ export class ApiCallService implements OnApplicationShutdown {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const [path, cleanup] = await createTemp();
|
||||||
|
await stream.pipeline(multipartData.file, fs.createWriteStream(path));
|
||||||
|
|
||||||
|
// ファイルサイズが制限を超えていた場合
|
||||||
|
// なお truncated はストリームを読み切ってからでないと機能しないため、stream.pipeline より後にある必要がある
|
||||||
|
if (multipartData.file.truncated) {
|
||||||
|
cleanup();
|
||||||
|
reply.code(413);
|
||||||
|
reply.send();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const fields = {} as Record<string, unknown>;
|
const fields = {} as Record<string, unknown>;
|
||||||
for (const [k, v] of Object.entries(multipartData.fields)) {
|
for (const [k, v] of Object.entries(multipartData.fields)) {
|
||||||
fields[k] = typeof v === 'object' && 'value' in v ? v.value : undefined;
|
fields[k] = typeof v === 'object' && 'value' in v ? v.value : undefined;
|
||||||
|
@ -217,7 +226,10 @@ export class ApiCallService implements OnApplicationShutdown {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.authenticateService.authenticate(token).then(([user, app]) => {
|
this.authenticateService.authenticate(token).then(([user, app]) => {
|
||||||
this.call(endpoint, user, app, fields, multipartData, request).then((res) => {
|
this.call(endpoint, user, app, fields, {
|
||||||
|
name: multipartData.filename,
|
||||||
|
path: path,
|
||||||
|
}, request).then((res) => {
|
||||||
this.send(reply, res);
|
this.send(reply, res);
|
||||||
}).catch((err: ApiError) => {
|
}).catch((err: ApiError) => {
|
||||||
this.#sendApiError(reply, err);
|
this.#sendApiError(reply, err);
|
||||||
|
@ -282,7 +294,10 @@ export class ApiCallService implements OnApplicationShutdown {
|
||||||
user: MiLocalUser | null | undefined,
|
user: MiLocalUser | null | undefined,
|
||||||
token: MiAccessToken | null | undefined,
|
token: MiAccessToken | null | undefined,
|
||||||
data: any,
|
data: any,
|
||||||
multipartFile: MultipartFile | null,
|
file: {
|
||||||
|
name: string;
|
||||||
|
path: string;
|
||||||
|
} | null,
|
||||||
request: FastifyRequest<{ Body: Record<string, unknown> | undefined, Querystring: Record<string, unknown> }>,
|
request: FastifyRequest<{ Body: Record<string, unknown> | undefined, Querystring: Record<string, unknown> }>,
|
||||||
) {
|
) {
|
||||||
const isSecure = user != null && token == null;
|
const isSecure = user != null && token == null;
|
||||||
|
@ -356,37 +371,6 @@ export class ApiCallService implements OnApplicationShutdown {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cast non JSON input
|
|
||||||
if ((ep.meta.requireFile || request.method === 'GET') && ep.params.properties) {
|
|
||||||
for (const k of Object.keys(ep.params.properties)) {
|
|
||||||
const param = ep.params.properties![k];
|
|
||||||
if (['boolean', 'number', 'integer'].includes(param.type ?? '') && typeof data[k] === 'string') {
|
|
||||||
try {
|
|
||||||
data[k] = JSON.parse(data[k]);
|
|
||||||
} catch (e) {
|
|
||||||
throw new ApiError({
|
|
||||||
message: 'Invalid param.',
|
|
||||||
code: 'INVALID_PARAM',
|
|
||||||
id: '0b5f1631-7c1a-41a6-b399-cce335f34d85',
|
|
||||||
}, {
|
|
||||||
param: k,
|
|
||||||
reason: `cannot cast to ${param.type}`,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (token && ((ep.meta.kind && !token.permission.some(p => p === ep.meta.kind))
|
|
||||||
|| (!ep.meta.kind && (ep.meta.requireCredential || ep.meta.requireModerator || ep.meta.requireAdmin)))) {
|
|
||||||
throw new ApiError({
|
|
||||||
message: 'Your app does not have the necessary permissions to use this endpoint.',
|
|
||||||
code: 'PERMISSION_DENIED',
|
|
||||||
kind: 'permission',
|
|
||||||
id: '1370e5b7-d4eb-4566-bb1d-7748ee6a1838',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((ep.meta.requireModerator || ep.meta.requireAdmin) && (this.meta.rootUserId !== user!.id)) {
|
if ((ep.meta.requireModerator || ep.meta.requireAdmin) && (this.meta.rootUserId !== user!.id)) {
|
||||||
const myRoles = await this.roleService.getUserRoles(user!.id);
|
const myRoles = await this.roleService.getUserRoles(user!.id);
|
||||||
if (ep.meta.requireModerator && !myRoles.some(r => r.isModerator || r.isAdministrator)) {
|
if (ep.meta.requireModerator && !myRoles.some(r => r.isModerator || r.isAdministrator)) {
|
||||||
|
@ -420,91 +404,49 @@ export class ApiCallService implements OnApplicationShutdown {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let attachmentFile: AttachmentFile | null = null;
|
if (token && ((ep.meta.kind && !token.permission.some(p => p === ep.meta.kind))
|
||||||
let cleanup = () => {};
|
|| (!ep.meta.kind && (ep.meta.requireCredential || ep.meta.requireModerator || ep.meta.requireAdmin)))) {
|
||||||
if (ep.meta.requireFile && request.method === 'POST' && multipartFile) {
|
throw new ApiError({
|
||||||
const policies = await this.roleService.getUserPolicies(user!.id);
|
message: 'Your app does not have the necessary permissions to use this endpoint.',
|
||||||
const result = await this.handleAttachmentFile(
|
code: 'PERMISSION_DENIED',
|
||||||
Math.min((policies.maxFileSizeMb * 1024 * 1024), this.config.maxFileSize),
|
kind: 'permission',
|
||||||
multipartFile,
|
id: '1370e5b7-d4eb-4566-bb1d-7748ee6a1838',
|
||||||
);
|
});
|
||||||
attachmentFile = result.attachmentFile;
|
}
|
||||||
cleanup = result.cleanup;
|
|
||||||
|
// Cast non JSON input
|
||||||
|
if ((ep.meta.requireFile || request.method === 'GET') && ep.params.properties) {
|
||||||
|
for (const k of Object.keys(ep.params.properties)) {
|
||||||
|
const param = ep.params.properties![k];
|
||||||
|
if (['boolean', 'number', 'integer'].includes(param.type ?? '') && typeof data[k] === 'string') {
|
||||||
|
try {
|
||||||
|
data[k] = JSON.parse(data[k]);
|
||||||
|
} catch (e) {
|
||||||
|
throw new ApiError({
|
||||||
|
message: 'Invalid param.',
|
||||||
|
code: 'INVALID_PARAM',
|
||||||
|
id: '0b5f1631-7c1a-41a6-b399-cce335f34d85',
|
||||||
|
}, {
|
||||||
|
param: k,
|
||||||
|
reason: `cannot cast to ${param.type}`,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// API invoking
|
// API invoking
|
||||||
if (this.config.sentryForBackend) {
|
if (this.config.sentryForBackend) {
|
||||||
return await Sentry.startSpan({
|
return await Sentry.startSpan({
|
||||||
name: 'API: ' + ep.name,
|
name: 'API: ' + ep.name,
|
||||||
}, () => {
|
}, () => ep.exec(data, user, token, file, request.ip, request.headers)
|
||||||
return ep.exec(data, user, token, attachmentFile, request.ip, request.headers)
|
.catch((err: Error) => this.#onExecError(ep, data, err, user?.id)));
|
||||||
.catch((err: Error) => this.#onExecError(ep, data, err, user?.id))
|
|
||||||
.finally(() => cleanup());
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
return await ep.exec(data, user, token, attachmentFile, request.ip, request.headers)
|
return await ep.exec(data, user, token, file, request.ip, request.headers)
|
||||||
.catch((err: Error) => this.#onExecError(ep, data, err, user?.id))
|
.catch((err: Error) => this.#onExecError(ep, data, err, user?.id));
|
||||||
.finally(() => cleanup());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
|
||||||
private async handleAttachmentFile(
|
|
||||||
fileSizeLimit: number,
|
|
||||||
multipartFile: MultipartFile,
|
|
||||||
) {
|
|
||||||
function createTooLongError() {
|
|
||||||
return new ApiError({
|
|
||||||
httpStatusCode: 413,
|
|
||||||
kind: 'client',
|
|
||||||
message: 'File size is too large.',
|
|
||||||
code: 'FILE_SIZE_TOO_LARGE',
|
|
||||||
id: 'ff827ce8-9b4b-4808-8511-422222a3362f',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function createLimitStream(limit: number) {
|
|
||||||
let total = 0;
|
|
||||||
|
|
||||||
return new Transform({
|
|
||||||
transform(chunk, _, callback) {
|
|
||||||
total += chunk.length;
|
|
||||||
if (total > limit) {
|
|
||||||
callback(createTooLongError());
|
|
||||||
} else {
|
|
||||||
callback(null, chunk);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const [path, cleanup] = await createTemp();
|
|
||||||
try {
|
|
||||||
await stream.pipeline(
|
|
||||||
multipartFile.file,
|
|
||||||
createLimitStream(fileSizeLimit),
|
|
||||||
fs.createWriteStream(path),
|
|
||||||
);
|
|
||||||
|
|
||||||
// ファイルサイズが制限を超えていた場合
|
|
||||||
// なお truncated はストリームを読み切ってからでないと機能しないため、stream.pipeline より後にある必要がある
|
|
||||||
if (multipartFile.file.truncated) {
|
|
||||||
throw createTooLongError();
|
|
||||||
}
|
|
||||||
} catch (err) {
|
|
||||||
cleanup();
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
attachmentFile: {
|
|
||||||
name: multipartFile.filename,
|
|
||||||
path,
|
|
||||||
},
|
|
||||||
cleanup,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public dispose(): void {
|
public dispose(): void {
|
||||||
clearInterval(this.userIpHistoriesClearIntervalId);
|
clearInterval(this.userIpHistoriesClearIntervalId);
|
||||||
|
|
|
@ -21,23 +21,23 @@ ajv.addFormat('misskey:id', /^[a-zA-Z0-9]+$/);
|
||||||
|
|
||||||
export type Response = Record<string, any> | void;
|
export type Response = Record<string, any> | void;
|
||||||
|
|
||||||
export type AttachmentFile = {
|
type File = {
|
||||||
name: string | null;
|
name: string | null;
|
||||||
path: string;
|
path: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
// TODO: paramsの型をT['params']のスキーマ定義から推論する
|
// TODO: paramsの型をT['params']のスキーマ定義から推論する
|
||||||
type Executor<T extends IEndpointMeta, Ps extends Schema> =
|
type Executor<T extends IEndpointMeta, Ps extends Schema> =
|
||||||
(params: SchemaType<Ps>, user: T['requireCredential'] extends true ? MiLocalUser : MiLocalUser | null, token: MiAccessToken | null, file?: AttachmentFile, cleanup?: () => any, ip?: string | null, headers?: Record<string, string> | null) =>
|
(params: SchemaType<Ps>, user: T['requireCredential'] extends true ? MiLocalUser : MiLocalUser | null, token: MiAccessToken | null, file?: File, cleanup?: () => any, ip?: string | null, headers?: Record<string, string> | null) =>
|
||||||
Promise<T['res'] extends undefined ? Response : SchemaType<NonNullable<T['res']>>>;
|
Promise<T['res'] extends undefined ? Response : SchemaType<NonNullable<T['res']>>>;
|
||||||
|
|
||||||
export abstract class Endpoint<T extends IEndpointMeta, Ps extends Schema> {
|
export abstract class Endpoint<T extends IEndpointMeta, Ps extends Schema> {
|
||||||
public exec: (params: any, user: T['requireCredential'] extends true ? MiLocalUser : MiLocalUser | null, token: MiAccessToken | null, file?: AttachmentFile, ip?: string | null, headers?: Record<string, string> | null) => Promise<any>;
|
public exec: (params: any, user: T['requireCredential'] extends true ? MiLocalUser : MiLocalUser | null, token: MiAccessToken | null, file?: File, ip?: string | null, headers?: Record<string, string> | null) => Promise<any>;
|
||||||
|
|
||||||
constructor(meta: T, paramDef: Ps, cb: Executor<T, Ps>) {
|
constructor(meta: T, paramDef: Ps, cb: Executor<T, Ps>) {
|
||||||
const validate = ajv.compile(paramDef);
|
const validate = ajv.compile(paramDef);
|
||||||
|
|
||||||
this.exec = (params: any, user: T['requireCredential'] extends true ? MiLocalUser : MiLocalUser | null, token: MiAccessToken | null, file?: AttachmentFile, ip?: string | null, headers?: Record<string, string> | null) => {
|
this.exec = (params: any, user: T['requireCredential'] extends true ? MiLocalUser : MiLocalUser | null, token: MiAccessToken | null, file?: File, ip?: string | null, headers?: Record<string, string> | null) => {
|
||||||
let cleanup: undefined | (() => void) = undefined;
|
let cleanup: undefined | (() => void) = undefined;
|
||||||
|
|
||||||
if (meta.requireFile) {
|
if (meta.requireFile) {
|
||||||
|
|
|
@ -528,6 +528,24 @@ export const meta = {
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
deliverSuspendedSoftware: {
|
||||||
|
type: 'array',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
items: {
|
||||||
|
type: 'object',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
properties: {
|
||||||
|
software: {
|
||||||
|
type: 'string',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
},
|
||||||
|
versionRange: {
|
||||||
|
type: 'string',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -672,6 +690,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
urlPreviewSummaryProxyUrl: instance.urlPreviewSummaryProxyUrl,
|
urlPreviewSummaryProxyUrl: instance.urlPreviewSummaryProxyUrl,
|
||||||
federation: instance.federation,
|
federation: instance.federation,
|
||||||
federationHosts: instance.federationHosts,
|
federationHosts: instance.federationHosts,
|
||||||
|
deliverSuspendedSoftware: instance.deliverSuspendedSoftware,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,6 +185,17 @@ export const paramDef = {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
deliverSuspendedSoftware: {
|
||||||
|
type: 'array',
|
||||||
|
items: {
|
||||||
|
type: 'object',
|
||||||
|
properties: {
|
||||||
|
software: { type: 'string' },
|
||||||
|
versionRange: { type: 'string' },
|
||||||
|
},
|
||||||
|
required: ['software', 'versionRange'],
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
required: [],
|
required: [],
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -671,6 +682,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
set.federation = ps.federation;
|
set.federation = ps.federation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ps.deliverSuspendedSoftware !== undefined) {
|
||||||
|
set.deliverSuspendedSoftware = ps.deliverSuspendedSoftware;
|
||||||
|
}
|
||||||
|
|
||||||
if (Array.isArray(ps.federationHosts)) {
|
if (Array.isArray(ps.federationHosts)) {
|
||||||
set.federationHosts = ps.federationHosts.filter(Boolean).map(x => x.toLowerCase());
|
set.federationHosts = ps.federationHosts.filter(Boolean).map(x => x.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,6 +112,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
// https://github.com/misskey-dev/misskey/pull/15346#discussion_r1929950255
|
// https://github.com/misskey-dev/misskey/pull/15346#discussion_r1929950255
|
||||||
|
|
||||||
this.queryService.generateBlockedHostQueryForNote(query);
|
this.queryService.generateBlockedHostQueryForNote(query);
|
||||||
|
this.queryService.generateSuspendedUserQueryForNote(query);
|
||||||
this.queryService.generateVisibilityQuery(query, me);
|
this.queryService.generateVisibilityQuery(query, me);
|
||||||
this.queryService.generateMutedUserQueryForNotes(query, me);
|
this.queryService.generateMutedUserQueryForNotes(query, me);
|
||||||
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
||||||
|
|
|
@ -48,7 +48,15 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
private queryService: QueryService,
|
private queryService: QueryService,
|
||||||
) {
|
) {
|
||||||
super(meta, paramDef, async (ps, me) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
const query = this.queryService.makePaginationQuery(this.channelFollowingsRepository.createQueryBuilder(), ps.sinceId, ps.untilId)
|
const query = this.queryService
|
||||||
|
.makePaginationQuery(
|
||||||
|
this.channelFollowingsRepository.createQueryBuilder(),
|
||||||
|
ps.sinceId,
|
||||||
|
ps.untilId,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
'followeeId',
|
||||||
|
)
|
||||||
.andWhere({ followerId: me.id });
|
.andWhere({ followerId: me.id });
|
||||||
|
|
||||||
const followings = await query
|
const followings = await query
|
||||||
|
|
|
@ -122,6 +122,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
.leftJoinAndSelect('note.channel', 'channel');
|
.leftJoinAndSelect('note.channel', 'channel');
|
||||||
|
|
||||||
this.queryService.generateBlockedHostQueryForNote(query);
|
this.queryService.generateBlockedHostQueryForNote(query);
|
||||||
|
this.queryService.generateSuspendedUserQueryForNote(query);
|
||||||
if (me) {
|
if (me) {
|
||||||
this.queryService.generateMutedUserQueryForNotes(query, me);
|
this.queryService.generateMutedUserQueryForNotes(query, me);
|
||||||
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
||||||
|
|
|
@ -85,9 +85,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
.leftJoinAndSelect('renote.user', 'renoteUser')
|
.leftJoinAndSelect('renote.user', 'renoteUser')
|
||||||
.andWhere('clipNote.clipId = :clipId', { clipId: clip.id });
|
.andWhere('clipNote.clipId = :clipId', { clipId: clip.id });
|
||||||
|
|
||||||
this.queryService.generateBlockedHostQueryForNote(query);
|
|
||||||
if (me) {
|
|
||||||
this.queryService.generateVisibilityQuery(query, me);
|
this.queryService.generateVisibilityQuery(query, me);
|
||||||
|
this.queryService.generateBlockedHostQueryForNote(query);
|
||||||
|
// this.queryService.generateSuspendedUserQueryForNote(query); // To avoid problems with removing notes, ignoring suspended user for now
|
||||||
|
if (me) {
|
||||||
this.queryService.generateMutedUserQueryForNotes(query, me);
|
this.queryService.generateMutedUserQueryForNotes(query, me);
|
||||||
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,6 +61,7 @@ export const meta = {
|
||||||
message: 'Cannot upload the file because it exceeds the maximum file size.',
|
message: 'Cannot upload the file because it exceeds the maximum file size.',
|
||||||
code: 'MAX_FILE_SIZE_EXCEEDED',
|
code: 'MAX_FILE_SIZE_EXCEEDED',
|
||||||
id: 'b9d8c348-33f0-4673-b9a9-5d4da058977a',
|
id: 'b9d8c348-33f0-4673-b9a9-5d4da058977a',
|
||||||
|
httpStatusCode: 413,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
|
|
||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from '@nestjs/common';
|
||||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||||
import { AchievementService, ACHIEVEMENT_TYPES } from '@/core/AchievementService.js';
|
import { AchievementService } from '@/core/AchievementService.js';
|
||||||
|
import { ACHIEVEMENT_TYPES } from '@/models/UserProfile.js';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
|
|
|
@ -71,6 +71,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
this.queryService.generateVisibilityQuery(query, me);
|
this.queryService.generateVisibilityQuery(query, me);
|
||||||
this.queryService.generateBlockedHostQueryForNote(query);
|
this.queryService.generateBlockedHostQueryForNote(query);
|
||||||
|
this.queryService.generateSuspendedUserQueryForNote(query);
|
||||||
if (me) {
|
if (me) {
|
||||||
this.queryService.generateMutedUserQueryForNotes(query, me);
|
this.queryService.generateMutedUserQueryForNotes(query, me);
|
||||||
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
||||||
|
|
|
@ -97,6 +97,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
.leftJoinAndSelect('note.channel', 'channel');
|
.leftJoinAndSelect('note.channel', 'channel');
|
||||||
|
|
||||||
this.queryService.generateBlockedHostQueryForNote(query);
|
this.queryService.generateBlockedHostQueryForNote(query);
|
||||||
|
this.queryService.generateSuspendedUserQueryForNote(query);
|
||||||
|
|
||||||
const notes = (await query.getMany()).filter(note => {
|
const notes = (await query.getMany()).filter(note => {
|
||||||
if (me && isUserRelated(note, userIdsWhoBlockingMe)) return false;
|
if (me && isUserRelated(note, userIdsWhoBlockingMe)) return false;
|
||||||
|
|
|
@ -244,6 +244,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
this.queryService.generateVisibilityQuery(query, me);
|
this.queryService.generateVisibilityQuery(query, me);
|
||||||
this.queryService.generateBlockedHostQueryForNote(query);
|
this.queryService.generateBlockedHostQueryForNote(query);
|
||||||
|
this.queryService.generateSuspendedUserQueryForNote(query);
|
||||||
this.queryService.generateMutedUserQueryForNotes(query, me);
|
this.queryService.generateMutedUserQueryForNotes(query, me);
|
||||||
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
||||||
this.queryService.generateMutedUserRenotesQueryForNotes(query, me);
|
this.queryService.generateMutedUserRenotesQueryForNotes(query, me);
|
||||||
|
|
|
@ -157,6 +157,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
this.queryService.generateVisibilityQuery(query, me);
|
this.queryService.generateVisibilityQuery(query, me);
|
||||||
this.queryService.generateBlockedHostQueryForNote(query);
|
this.queryService.generateBlockedHostQueryForNote(query);
|
||||||
|
this.queryService.generateSuspendedUserQueryForNote(query);
|
||||||
if (me) this.queryService.generateMutedUserQueryForNotes(query, me);
|
if (me) this.queryService.generateMutedUserQueryForNotes(query, me);
|
||||||
if (me) this.queryService.generateBlockedUserQueryForNotes(query, me);
|
if (me) this.queryService.generateBlockedUserQueryForNotes(query, me);
|
||||||
if (me) this.queryService.generateMutedUserRenotesQueryForNotes(query, me);
|
if (me) this.queryService.generateMutedUserRenotesQueryForNotes(query, me);
|
||||||
|
|
|
@ -73,6 +73,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
this.queryService.generateVisibilityQuery(query, me);
|
this.queryService.generateVisibilityQuery(query, me);
|
||||||
this.queryService.generateBlockedHostQueryForNote(query);
|
this.queryService.generateBlockedHostQueryForNote(query);
|
||||||
|
this.queryService.generateSuspendedUserQueryForNote(query);
|
||||||
this.queryService.generateMutedUserQueryForNotes(query, me);
|
this.queryService.generateMutedUserQueryForNotes(query, me);
|
||||||
this.queryService.generateMutedNoteThreadQuery(query, me);
|
this.queryService.generateMutedNoteThreadQuery(query, me);
|
||||||
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
||||||
|
|
|
@ -73,6 +73,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
this.queryService.generateVisibilityQuery(query, me);
|
this.queryService.generateVisibilityQuery(query, me);
|
||||||
this.queryService.generateBlockedHostQueryForNote(query);
|
this.queryService.generateBlockedHostQueryForNote(query);
|
||||||
|
this.queryService.generateSuspendedUserQueryForNote(query);
|
||||||
if (me) this.queryService.generateMutedUserQueryForNotes(query, me);
|
if (me) this.queryService.generateMutedUserQueryForNotes(query, me);
|
||||||
if (me) this.queryService.generateBlockedUserQueryForNotes(query, me);
|
if (me) this.queryService.generateBlockedUserQueryForNotes(query, me);
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
this.queryService.generateVisibilityQuery(query, me);
|
this.queryService.generateVisibilityQuery(query, me);
|
||||||
this.queryService.generateBlockedHostQueryForNote(query);
|
this.queryService.generateBlockedHostQueryForNote(query);
|
||||||
|
this.queryService.generateSuspendedUserQueryForNote(query);
|
||||||
if (me) this.queryService.generateMutedUserQueryForNotes(query, me);
|
if (me) this.queryService.generateMutedUserQueryForNotes(query, me);
|
||||||
if (me) this.queryService.generateBlockedUserQueryForNotes(query, me);
|
if (me) this.queryService.generateBlockedUserQueryForNotes(query, me);
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
this.queryService.generateVisibilityQuery(query, me);
|
this.queryService.generateVisibilityQuery(query, me);
|
||||||
this.queryService.generateBlockedHostQueryForNote(query);
|
this.queryService.generateBlockedHostQueryForNote(query);
|
||||||
|
this.queryService.generateSuspendedUserQueryForNote(query);
|
||||||
if (me) this.queryService.generateMutedUserQueryForNotes(query, me);
|
if (me) this.queryService.generateMutedUserQueryForNotes(query, me);
|
||||||
if (me) this.queryService.generateBlockedUserQueryForNotes(query, me);
|
if (me) this.queryService.generateBlockedUserQueryForNotes(query, me);
|
||||||
|
|
||||||
|
|
|
@ -200,6 +200,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
this.queryService.generateVisibilityQuery(query, me);
|
this.queryService.generateVisibilityQuery(query, me);
|
||||||
this.queryService.generateBlockedHostQueryForNote(query);
|
this.queryService.generateBlockedHostQueryForNote(query);
|
||||||
|
this.queryService.generateSuspendedUserQueryForNote(query);
|
||||||
this.queryService.generateMutedUserQueryForNotes(query, me);
|
this.queryService.generateMutedUserQueryForNotes(query, me);
|
||||||
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
||||||
this.queryService.generateMutedUserRenotesQueryForNotes(query, me);
|
this.queryService.generateMutedUserRenotesQueryForNotes(query, me);
|
||||||
|
|
|
@ -185,6 +185,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
this.queryService.generateVisibilityQuery(query, me);
|
this.queryService.generateVisibilityQuery(query, me);
|
||||||
this.queryService.generateBlockedHostQueryForNote(query);
|
this.queryService.generateBlockedHostQueryForNote(query);
|
||||||
|
this.queryService.generateSuspendedUserQueryForNote(query);
|
||||||
this.queryService.generateMutedUserQueryForNotes(query, me);
|
this.queryService.generateMutedUserQueryForNotes(query, me);
|
||||||
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
||||||
this.queryService.generateMutedUserRenotesQueryForNotes(query, me);
|
this.queryService.generateMutedUserRenotesQueryForNotes(query, me);
|
||||||
|
|
|
@ -103,6 +103,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
this.queryService.generateVisibilityQuery(query, me);
|
this.queryService.generateVisibilityQuery(query, me);
|
||||||
this.queryService.generateBlockedHostQueryForNote(query);
|
this.queryService.generateBlockedHostQueryForNote(query);
|
||||||
|
this.queryService.generateSuspendedUserQueryForNote(query);
|
||||||
this.queryService.generateMutedUserQueryForNotes(query, me);
|
this.queryService.generateMutedUserQueryForNotes(query, me);
|
||||||
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
||||||
|
|
||||||
|
|
|
@ -14,15 +14,7 @@ export const meta = {
|
||||||
res: {
|
res: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
items: {
|
items: {
|
||||||
type: 'object',
|
ref: 'Achievement',
|
||||||
properties: {
|
|
||||||
name: {
|
|
||||||
type: 'string',
|
|
||||||
},
|
|
||||||
unlockedAt: {
|
|
||||||
type: 'number',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
|
@ -88,6 +88,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
.leftJoinAndSelect('note.channel', 'channel');
|
.leftJoinAndSelect('note.channel', 'channel');
|
||||||
|
|
||||||
this.queryService.generateBlockedHostQueryForNote(query);
|
this.queryService.generateBlockedHostQueryForNote(query);
|
||||||
|
this.queryService.generateSuspendedUserQueryForNote(query);
|
||||||
|
|
||||||
const notes = (await query.getMany()).filter(note => {
|
const notes = (await query.getMany()).filter(note => {
|
||||||
if (me && isUserRelated(note, userIdsWhoBlockingMe, false)) return false;
|
if (me && isUserRelated(note, userIdsWhoBlockingMe, false)) return false;
|
||||||
|
|
|
@ -130,6 +130,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
useDbFallback: true,
|
useDbFallback: true,
|
||||||
ignoreAuthorFromMute: true,
|
ignoreAuthorFromMute: true,
|
||||||
ignoreAuthorFromInstanceBlock: true,
|
ignoreAuthorFromInstanceBlock: true,
|
||||||
|
ignoreAuthorFromUserSuspension: true,
|
||||||
excludeReplies: ps.withChannelNotes && !ps.withReplies, // userTimelineWithChannel may include replies
|
excludeReplies: ps.withChannelNotes && !ps.withReplies, // userTimelineWithChannel may include replies
|
||||||
excludeNoFiles: ps.withChannelNotes && ps.withFiles, // userTimelineWithChannel may include notes without files
|
excludeNoFiles: ps.withChannelNotes && ps.withFiles, // userTimelineWithChannel may include notes without files
|
||||||
excludePureRenotes: !ps.withRenotes,
|
excludePureRenotes: !ps.withRenotes,
|
||||||
|
@ -186,6 +187,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
this.queryService.generateVisibilityQuery(query, me);
|
this.queryService.generateVisibilityQuery(query, me);
|
||||||
this.queryService.generateBlockedHostQueryForNote(query, true);
|
this.queryService.generateBlockedHostQueryForNote(query, true);
|
||||||
|
this.queryService.generateSuspendedUserQueryForNote(query, true);
|
||||||
if (me) {
|
if (me) {
|
||||||
this.queryService.generateMutedUserQueryForNotes(query, me, { id: ps.userId });
|
this.queryService.generateMutedUserQueryForNotes(query, me, { id: ps.userId });
|
||||||
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
this.queryService.generateBlockedUserQueryForNotes(query, me);
|
||||||
|
|
|
@ -99,10 +99,16 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
const query = this.queryService.makePaginationQuery(this.noteReactionsRepository.createQueryBuilder('reaction'),
|
const query = this.queryService.makePaginationQuery(this.noteReactionsRepository.createQueryBuilder('reaction'),
|
||||||
ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
|
ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
|
||||||
.andWhere('reaction.userId = :userId', { userId: ps.userId })
|
.andWhere('reaction.userId = :userId', { userId: ps.userId })
|
||||||
.leftJoinAndSelect('reaction.note', 'note');
|
.leftJoinAndSelect('reaction.note', 'note')
|
||||||
|
.leftJoinAndSelect('note.user', 'user')
|
||||||
|
.leftJoinAndSelect('note.reply', 'reply')
|
||||||
|
.leftJoinAndSelect('note.renote', 'renote')
|
||||||
|
.leftJoinAndSelect('reply.user', 'replyUser')
|
||||||
|
.leftJoinAndSelect('renote.user', 'renoteUser');
|
||||||
|
|
||||||
this.queryService.generateVisibilityQuery(query, me);
|
this.queryService.generateVisibilityQuery(query, me);
|
||||||
this.queryService.generateBlockedHostQueryForNote(query);
|
this.queryService.generateBlockedHostQueryForNote(query);
|
||||||
|
this.queryService.generateSuspendedUserQueryForNote(query);
|
||||||
|
|
||||||
const reactions = (await query
|
const reactions = (await query
|
||||||
.limit(ps.limit)
|
.limit(ps.limit)
|
||||||
|
|
|
@ -10,15 +10,15 @@ cd packages/backend/test-federation
|
||||||
First, you need to start servers by executing following commands:
|
First, you need to start servers by executing following commands:
|
||||||
```sh
|
```sh
|
||||||
bash ./setup.sh
|
bash ./setup.sh
|
||||||
docker compose up --scale tester=0
|
NODE_VERSION=22 docker compose up --scale tester=0
|
||||||
```
|
```
|
||||||
|
|
||||||
Then you can run all tests by a following command:
|
Then you can run all tests by a following command:
|
||||||
```sh
|
```sh
|
||||||
docker compose run --no-deps --rm tester
|
NODE_VERSION=22 docker compose run --no-deps --rm tester
|
||||||
```
|
```
|
||||||
|
|
||||||
For testing a specific file, run a following command:
|
For testing a specific file, run a following command:
|
||||||
```sh
|
```sh
|
||||||
docker compose run --no-deps --rm tester -- pnpm -F backend test:fed packages/backend/test-federation/test/user.test.ts
|
NODE_VERSION=22 docker compose run --no-deps --rm tester -- pnpm -F backend test:fed packages/backend/test-federation/test/user.test.ts
|
||||||
```
|
```
|
||||||
|
|
|
@ -12,7 +12,7 @@ services:
|
||||||
retries: 20
|
retries: 20
|
||||||
|
|
||||||
misskey:
|
misskey:
|
||||||
image: node:20
|
image: node:${NODE_VERSION}
|
||||||
env_file:
|
env_file:
|
||||||
- ./.config/docker.env
|
- ./.config/docker.env
|
||||||
environment:
|
environment:
|
||||||
|
|
|
@ -16,7 +16,7 @@ services:
|
||||||
"
|
"
|
||||||
|
|
||||||
tester:
|
tester:
|
||||||
image: node:20
|
image: node:${NODE_VERSION}
|
||||||
depends_on:
|
depends_on:
|
||||||
a.test:
|
a.test:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
@ -50,6 +50,10 @@ services:
|
||||||
source: ../jest.config.fed.cjs
|
source: ../jest.config.fed.cjs
|
||||||
target: /misskey/packages/backend/jest.config.fed.cjs
|
target: /misskey/packages/backend/jest.config.fed.cjs
|
||||||
read_only: true
|
read_only: true
|
||||||
|
- type: bind
|
||||||
|
source: ../jest.js
|
||||||
|
target: /misskey/packages/backend/jest.js
|
||||||
|
read_only: true
|
||||||
- type: bind
|
- type: bind
|
||||||
source: ../../misskey-js/built
|
source: ../../misskey-js/built
|
||||||
target: /misskey/packages/misskey-js/built
|
target: /misskey/packages/misskey-js/built
|
||||||
|
@ -85,7 +89,7 @@ services:
|
||||||
command: pnpm -F backend test:fed
|
command: pnpm -F backend test:fed
|
||||||
|
|
||||||
daemon:
|
daemon:
|
||||||
image: node:20
|
image: node:${NODE_VERSION}
|
||||||
depends_on:
|
depends_on:
|
||||||
redis.test:
|
redis.test:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
|
@ -159,8 +159,8 @@ describe('API', () => {
|
||||||
user: { token: application3 },
|
user: { token: application3 },
|
||||||
}, {
|
}, {
|
||||||
status: 403,
|
status: 403,
|
||||||
code: 'PERMISSION_DENIED',
|
code: 'ROLE_PERMISSION_DENIED',
|
||||||
id: '1370e5b7-d4eb-4566-bb1d-7748ee6a1838',
|
id: 'c3d38592-54c0-429d-be96-5636b0431a61',
|
||||||
});
|
});
|
||||||
|
|
||||||
await failedApiCall({
|
await failedApiCall({
|
||||||
|
|
|
@ -909,7 +909,7 @@ describe('クリップ', () => {
|
||||||
assert.deepStrictEqual(res.map(x => x.id), [aliceNote.id]);
|
assert.deepStrictEqual(res.map(x => x.id), [aliceNote.id]);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('はPublicなクリップなら認証なしでも取得できる。(非公開ノートはhideされて返ってくる)', async () => {
|
test('はPublicなクリップなら認証なしでも取得できる。(非公開ノートは含まれない)', async () => {
|
||||||
const publicClip = await create({ isPublic: true });
|
const publicClip = await create({ isPublic: true });
|
||||||
await addNote({ clipId: publicClip.id, noteId: aliceNote.id });
|
await addNote({ clipId: publicClip.id, noteId: aliceNote.id });
|
||||||
await addNote({ clipId: publicClip.id, noteId: aliceHomeNote.id });
|
await addNote({ clipId: publicClip.id, noteId: aliceHomeNote.id });
|
||||||
|
@ -919,8 +919,6 @@ describe('クリップ', () => {
|
||||||
const res = await notes({ clipId: publicClip.id }, { user: undefined });
|
const res = await notes({ clipId: publicClip.id }, { user: undefined });
|
||||||
const expects = [
|
const expects = [
|
||||||
aliceNote, aliceHomeNote,
|
aliceNote, aliceHomeNote,
|
||||||
// 認証なしだと非公開ノートは結果には含むけどhideされる。
|
|
||||||
hiddenNote(aliceFollowersNote), hiddenNote(aliceSpecifiedNote),
|
|
||||||
];
|
];
|
||||||
assert.deepStrictEqual(
|
assert.deepStrictEqual(
|
||||||
res.sort(compareBy(s => s.id)).map(x => x.id),
|
res.sort(compareBy(s => s.id)).map(x => x.id),
|
||||||
|
|
|
@ -232,7 +232,7 @@ describe('UserEntityService', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test('MeDetailed', async() => {
|
test('MeDetailed', async() => {
|
||||||
const achievements = [{ name: 'achievement', unlockedAt: new Date().getTime() }];
|
const achievements = [{ name: 'iLoveMisskey' as const, unlockedAt: new Date().getTime() }];
|
||||||
const me = await createUser({}, {
|
const me = await createUser({}, {
|
||||||
birthday: '2000-01-01',
|
birthday: '2000-01-01',
|
||||||
achievements: achievements,
|
achievements: achievements,
|
||||||
|
|
|
@ -3,29 +3,31 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { S3Client } from '@aws-sdk/client-s3';
|
|
||||||
import { Test, TestingModule } from '@nestjs/testing';
|
import { Test, TestingModule } from '@nestjs/testing';
|
||||||
import { mockClient } from 'aws-sdk-client-mock';
|
|
||||||
import { FastifyInstance } from 'fastify';
|
import { FastifyInstance } from 'fastify';
|
||||||
import request from 'supertest';
|
import request from 'supertest';
|
||||||
|
import { randomString } from '../../../../../utils.js';
|
||||||
import { CoreModule } from '@/core/CoreModule.js';
|
import { CoreModule } from '@/core/CoreModule.js';
|
||||||
import { RoleService } from '@/core/RoleService.js';
|
import { RoleService } from '@/core/RoleService.js';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
import { GlobalModule } from '@/GlobalModule.js';
|
import { GlobalModule } from '@/GlobalModule.js';
|
||||||
import { MiRole, UserProfilesRepository, UsersRepository } from '@/models/_.js';
|
import { DriveFoldersRepository, MiDriveFolder, MiRole, UserProfilesRepository, UsersRepository } from '@/models/_.js';
|
||||||
import { MiUser } from '@/models/User.js';
|
import { MiUser } from '@/models/User.js';
|
||||||
import { ServerModule } from '@/server/ServerModule.js';
|
import { ServerModule } from '@/server/ServerModule.js';
|
||||||
import { ServerService } from '@/server/ServerService.js';
|
import { ServerService } from '@/server/ServerService.js';
|
||||||
|
import { IdService } from '@/core/IdService.js';
|
||||||
|
|
||||||
describe('/drive/files/create', () => {
|
describe('/drive/files/create', () => {
|
||||||
let module: TestingModule;
|
let module: TestingModule;
|
||||||
let server: FastifyInstance;
|
let server: FastifyInstance;
|
||||||
const s3Mock = mockClient(S3Client);
|
|
||||||
let roleService: RoleService;
|
let roleService: RoleService;
|
||||||
|
let idService: IdService;
|
||||||
|
|
||||||
let root: MiUser;
|
let root: MiUser;
|
||||||
let role_tinyAttachment: MiRole;
|
let role_tinyAttachment: MiRole;
|
||||||
|
|
||||||
|
let folder: MiDriveFolder;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
module = await Test.createTestingModule({
|
module = await Test.createTestingModule({
|
||||||
imports: [GlobalModule, CoreModule, ServerModule],
|
imports: [GlobalModule, CoreModule, ServerModule],
|
||||||
|
@ -33,21 +35,34 @@ describe('/drive/files/create', () => {
|
||||||
module.enableShutdownHooks();
|
module.enableShutdownHooks();
|
||||||
|
|
||||||
const serverService = module.get<ServerService>(ServerService);
|
const serverService = module.get<ServerService>(ServerService);
|
||||||
server = await serverService.launch();
|
await serverService.launch();
|
||||||
|
server = serverService.fastify;
|
||||||
|
|
||||||
|
idService = module.get(IdService);
|
||||||
|
|
||||||
const usersRepository = module.get<UsersRepository>(DI.usersRepository);
|
const usersRepository = module.get<UsersRepository>(DI.usersRepository);
|
||||||
|
await usersRepository.delete({});
|
||||||
root = await usersRepository.insert({
|
root = await usersRepository.insert({
|
||||||
id: 'root',
|
id: idService.gen(),
|
||||||
username: 'root',
|
username: 'root',
|
||||||
usernameLower: 'root',
|
usernameLower: 'root',
|
||||||
token: '1234567890123456',
|
token: '1234567890123456',
|
||||||
}).then(x => usersRepository.findOneByOrFail(x.identifiers[0]));
|
}).then(x => usersRepository.findOneByOrFail(x.identifiers[0]));
|
||||||
|
|
||||||
const userProfilesRepository = module.get<UserProfilesRepository>(DI.userProfilesRepository);
|
const userProfilesRepository = module.get<UserProfilesRepository>(DI.userProfilesRepository);
|
||||||
|
await userProfilesRepository.delete({});
|
||||||
await userProfilesRepository.insert({
|
await userProfilesRepository.insert({
|
||||||
userId: root.id,
|
userId: root.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const driveFoldersRepository = module.get<DriveFoldersRepository>(DI.driveFoldersRepository);
|
||||||
|
folder = await driveFoldersRepository.insertOne({
|
||||||
|
id: idService.gen(),
|
||||||
|
name: 'root-folder',
|
||||||
|
parentId: null,
|
||||||
|
userId: root.id,
|
||||||
|
});
|
||||||
|
|
||||||
roleService = module.get<RoleService>(RoleService);
|
roleService = module.get<RoleService>(RoleService);
|
||||||
role_tinyAttachment = await roleService.create({
|
role_tinyAttachment = await roleService.create({
|
||||||
name: 'test-role001',
|
name: 'test-role001',
|
||||||
|
@ -65,8 +80,8 @@ describe('/drive/files/create', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
s3Mock.reset();
|
await roleService.unassign(root.id, role_tinyAttachment.id).catch(() => {
|
||||||
await roleService.unassign(root.id, role_tinyAttachment.id).catch(() => {});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
|
@ -74,35 +89,76 @@ describe('/drive/files/create', () => {
|
||||||
await module.close();
|
await module.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('200 ok', async () => {
|
async function postFile(props: {
|
||||||
const result = await request(server.server)
|
name: string,
|
||||||
|
comment: string,
|
||||||
|
isSensitive: boolean,
|
||||||
|
force: boolean,
|
||||||
|
fileContent: Buffer | string,
|
||||||
|
}) {
|
||||||
|
const { name, comment, isSensitive, force, fileContent } = props;
|
||||||
|
|
||||||
|
return await request(server.server)
|
||||||
.post('/api/drive/files/create')
|
.post('/api/drive/files/create')
|
||||||
.set('Content-Type', 'multipart/form-data')
|
.set('Content-Type', 'multipart/form-data')
|
||||||
.set('Authorization', `Bearer ${root.token}`)
|
.attach('file', fileContent)
|
||||||
.attach('file', Buffer.from('a'.repeat(1024 * 1024)));
|
.field('name', name)
|
||||||
|
.field('comment', comment)
|
||||||
|
.field('isSensitive', isSensitive)
|
||||||
|
.field('force', force)
|
||||||
|
.field('folderId', folder.id)
|
||||||
|
.field('i', root.token ?? '');
|
||||||
|
}
|
||||||
|
|
||||||
|
test('200 ok', async () => {
|
||||||
|
const name = randomString();
|
||||||
|
const comment = randomString();
|
||||||
|
const result = await postFile({
|
||||||
|
name: name,
|
||||||
|
comment: comment,
|
||||||
|
isSensitive: true,
|
||||||
|
force: true,
|
||||||
|
fileContent: Buffer.from('a'.repeat(1000 * 1000)),
|
||||||
|
});
|
||||||
expect(result.statusCode).toBe(200);
|
expect(result.statusCode).toBe(200);
|
||||||
|
expect(result.body.name).toBe(name + '.unknown');
|
||||||
|
expect(result.body.comment).toBe(comment);
|
||||||
|
expect(result.body.isSensitive).toBe(true);
|
||||||
|
expect(result.body.folderId).toBe(folder.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('200 ok(with role)', async () => {
|
test('200 ok(with role)', async () => {
|
||||||
await roleService.assign(root.id, role_tinyAttachment.id);
|
await roleService.assign(root.id, role_tinyAttachment.id);
|
||||||
|
|
||||||
const result = await request(server.server)
|
const name = randomString();
|
||||||
.post('/api/drive/files/create')
|
const comment = randomString();
|
||||||
.set('Content-Type', 'multipart/form-data')
|
const result = await postFile({
|
||||||
.set('Authorization', `Bearer ${root.token}`)
|
name: name,
|
||||||
.attach('file', Buffer.from('a'.repeat(10)));
|
comment: comment,
|
||||||
|
isSensitive: true,
|
||||||
|
force: true,
|
||||||
|
fileContent: Buffer.from('a'.repeat(10)),
|
||||||
|
});
|
||||||
expect(result.statusCode).toBe(200);
|
expect(result.statusCode).toBe(200);
|
||||||
|
expect(result.body.name).toBe(name + '.unknown');
|
||||||
|
expect(result.body.comment).toBe(comment);
|
||||||
|
expect(result.body.isSensitive).toBe(true);
|
||||||
|
expect(result.body.folderId).toBe(folder.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('413 too large', async () => {
|
test('413 too large', async () => {
|
||||||
await roleService.assign(root.id, role_tinyAttachment.id);
|
await roleService.assign(root.id, role_tinyAttachment.id);
|
||||||
|
|
||||||
const result = await request(server.server)
|
const name = randomString();
|
||||||
.post('/api/drive/files/create')
|
const comment = randomString();
|
||||||
.set('Content-Type', 'multipart/form-data')
|
const result = await postFile({
|
||||||
.set('Authorization', `Bearer ${root.token}`)
|
name: name,
|
||||||
.attach('file', Buffer.from('a'.repeat(11)));
|
comment: comment,
|
||||||
|
isSensitive: true,
|
||||||
|
force: true,
|
||||||
|
fileContent: Buffer.from('a'.repeat(11)),
|
||||||
|
});
|
||||||
expect(result.statusCode).toBe(413);
|
expect(result.statusCode).toBe(413);
|
||||||
expect(result.body.error.code).toBe('FILE_SIZE_TOO_LARGE');
|
expect(result.body.error.code).toBe('MAX_FILE_SIZE_EXCEEDED');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
"tsconfig-paths": "4.2.0",
|
"tsconfig-paths": "4.2.0",
|
||||||
"typescript": "5.8.3",
|
"typescript": "5.8.3",
|
||||||
"uuid": "11.1.0",
|
"uuid": "11.1.0",
|
||||||
"vite": "6.3.3",
|
"vite": "6.3.4",
|
||||||
"vue": "3.5.13"
|
"vue": "3.5.13"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -6,7 +6,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="_fullinfo">
|
<div class="_fullinfo">
|
||||||
<img :src="notFoundImageUrl" draggable="false"/>
|
|
||||||
<div>{{ i18n.ts.notFoundDescription }}</div>
|
<div>{{ i18n.ts.notFoundDescription }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -14,11 +13,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { inject, computed } from 'vue';
|
import { inject, computed } from 'vue';
|
||||||
import { DEFAULT_NOT_FOUND_IMAGE_URL } from '@@/js/const.js';
|
|
||||||
import { DI } from '@/di.js';
|
import { DI } from '@/di.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
|
|
||||||
const serverMetadata = inject(DI.serverMetadata)!;
|
const serverMetadata = inject(DI.serverMetadata)!;
|
||||||
|
|
||||||
const notFoundImageUrl = computed(() => serverMetadata.notFoundImageUrl ?? DEFAULT_NOT_FOUND_IMAGE_URL);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -286,13 +286,6 @@ rt {
|
||||||
._fullinfo {
|
._fullinfo {
|
||||||
padding: 64px 32px;
|
padding: 64px 32px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
> img {
|
|
||||||
vertical-align: bottom;
|
|
||||||
height: 128px;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
border-radius: 16px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
._link {
|
._link {
|
||||||
|
|
|
@ -112,10 +112,6 @@ export const ROLE_POLICIES = [
|
||||||
'chatAvailability',
|
'chatAvailability',
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
export const DEFAULT_SERVER_ERROR_IMAGE_URL = 'https://xn--931a.moe/assets/error.jpg';
|
|
||||||
export const DEFAULT_NOT_FOUND_IMAGE_URL = 'https://xn--931a.moe/assets/not-found.jpg';
|
|
||||||
export const DEFAULT_INFO_IMAGE_URL = 'https://xn--931a.moe/assets/info.jpg';
|
|
||||||
|
|
||||||
export const MFM_TAGS = ['tada', 'jelly', 'twitch', 'shake', 'spin', 'jump', 'bounce', 'flip', 'x2', 'x3', 'x4', 'scale', 'position', 'fg', 'bg', 'border', 'font', 'blur', 'rainbow', 'sparkle', 'rotate', 'ruby', 'unixtime'];
|
export const MFM_TAGS = ['tada', 'jelly', 'twitch', 'shake', 'spin', 'jump', 'bounce', 'flip', 'x2', 'x3', 'x4', 'scale', 'position', 'fg', 'bg', 'border', 'font', 'blur', 'rainbow', 'sparkle', 'rotate', 'ruby', 'unixtime'];
|
||||||
export const MFM_PARAMS: Record<typeof MFM_TAGS[number], string[]> = {
|
export const MFM_PARAMS: Record<typeof MFM_TAGS[number], string[]> = {
|
||||||
tada: ['speed=', 'delay='],
|
tada: ['speed=', 'delay='],
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
"typescript": "5.8.3",
|
"typescript": "5.8.3",
|
||||||
"uuid": "11.1.0",
|
"uuid": "11.1.0",
|
||||||
"v-code-diff": "1.13.1",
|
"v-code-diff": "1.13.1",
|
||||||
"vite": "6.3.3",
|
"vite": "6.3.4",
|
||||||
"vue": "3.5.13",
|
"vue": "3.5.13",
|
||||||
"vuedraggable": "next",
|
"vuedraggable": "next",
|
||||||
"wanakana": "5.3.1"
|
"wanakana": "5.3.1"
|
||||||
|
|
|
@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<MkModal ref="modal" :zPriority="'middle'" @closed="$emit('closed')" @click="onBgClick">
|
<MkModal ref="modal" :zPriority="'middle'" :preferType="'dialog'" @closed="$emit('closed')" @click="onBgClick">
|
||||||
<div ref="rootEl" :class="$style.root">
|
<div ref="rootEl" :class="$style.root">
|
||||||
<div :class="$style.header">
|
<div :class="$style.header">
|
||||||
<span :class="$style.icon">
|
<span :class="$style.icon">
|
||||||
|
@ -16,13 +16,21 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<span :class="$style.title">{{ announcement.title }}</span>
|
<span :class="$style.title">{{ announcement.title }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div :class="$style.text"><Mfm :text="announcement.text"/></div>
|
<div :class="$style.text"><Mfm :text="announcement.text"/></div>
|
||||||
<MkButton primary full @click="ok">{{ i18n.ts.ok }}</MkButton>
|
<div ref="bottomEl"></div>
|
||||||
|
<div :class="$style.footer">
|
||||||
|
<MkButton
|
||||||
|
primary
|
||||||
|
full
|
||||||
|
:disabled="!hasReachedBottom"
|
||||||
|
@click="ok"
|
||||||
|
>{{ hasReachedBottom ? i18n.ts.close : i18n.ts.scrollToClose }}</MkButton>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</MkModal>
|
</MkModal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, useTemplateRef } from 'vue';
|
import { onMounted, ref, useTemplateRef } from 'vue';
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
|
@ -32,12 +40,12 @@ import { i18n } from '@/i18n.js';
|
||||||
import { $i } from '@/i.js';
|
import { $i } from '@/i.js';
|
||||||
import { updateCurrentAccountPartial } from '@/accounts.js';
|
import { updateCurrentAccountPartial } from '@/accounts.js';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = defineProps<{
|
||||||
announcement: Misskey.entities.Announcement;
|
announcement: Misskey.entities.Announcement;
|
||||||
}>(), {
|
}>();
|
||||||
});
|
|
||||||
|
|
||||||
const rootEl = useTemplateRef('rootEl');
|
const rootEl = useTemplateRef('rootEl');
|
||||||
|
const bottomEl = useTemplateRef('bottomEl');
|
||||||
const modal = useTemplateRef('modal');
|
const modal = useTemplateRef('modal');
|
||||||
|
|
||||||
async function ok() {
|
async function ok() {
|
||||||
|
@ -72,7 +80,34 @@ function onBgClick() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const hasReachedBottom = ref(false);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
if (bottomEl.value && rootEl.value) {
|
||||||
|
const bottomElRect = bottomEl.value.getBoundingClientRect();
|
||||||
|
const rootElRect = rootEl.value.getBoundingClientRect();
|
||||||
|
if (
|
||||||
|
bottomElRect.top >= rootElRect.top &&
|
||||||
|
bottomElRect.top <= (rootElRect.bottom - 66) // 66 ≒ 75 * 0.9 (modalのアニメーション分)
|
||||||
|
) {
|
||||||
|
hasReachedBottom.value = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const observer = new IntersectionObserver(entries => {
|
||||||
|
for (const entry of entries) {
|
||||||
|
if (entry.isIntersecting) {
|
||||||
|
hasReachedBottom.value = true;
|
||||||
|
observer.disconnect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
root: rootEl.value,
|
||||||
|
rootMargin: '0px 0px -75px 0px',
|
||||||
|
});
|
||||||
|
|
||||||
|
observer.observe(bottomEl.value);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -80,9 +115,12 @@ onMounted(() => {
|
||||||
.root {
|
.root {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 32px;
|
padding: 32px 32px 0;
|
||||||
min-width: 320px;
|
min-width: 320px;
|
||||||
max-width: 480px;
|
max-width: 480px;
|
||||||
|
max-height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: var(--MI_THEME-panel);
|
background: var(--MI_THEME-panel);
|
||||||
border-radius: var(--MI-radius);
|
border-radius: var(--MI-radius);
|
||||||
|
@ -103,4 +141,14 @@ onMounted(() => {
|
||||||
.text {
|
.text {
|
||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
position: sticky;
|
||||||
|
bottom: 0;
|
||||||
|
left: -32px;
|
||||||
|
backdrop-filter: var(--MI-blur, blur(15px));
|
||||||
|
background: color(from var(--MI_THEME-bg) srgb r g b / 0.5);
|
||||||
|
margin: 0 -32px;
|
||||||
|
padding: 24px 32px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -5,12 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<MkPagination :pagination="pagination">
|
<MkPagination :pagination="pagination">
|
||||||
<template #empty>
|
<template #empty><MkResult type="empty"/></template>
|
||||||
<div class="_fullinfo">
|
|
||||||
<img :src="infoImageUrl" draggable="false"/>
|
|
||||||
<div>{{ i18n.ts.notFound }}</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #default="{ items }">
|
<template #default="{ items }">
|
||||||
<MkChannelPreview v-for="item in items" :key="item.id" class="_margin" :channel="extractor(item)"/>
|
<MkChannelPreview v-for="item in items" :key="item.id" class="_margin" :channel="extractor(item)"/>
|
||||||
|
@ -23,7 +18,6 @@ import type { Paging } from '@/components/MkPagination.vue';
|
||||||
import MkChannelPreview from '@/components/MkChannelPreview.vue';
|
import MkChannelPreview from '@/components/MkChannelPreview.vue';
|
||||||
import MkPagination from '@/components/MkPagination.vue';
|
import MkPagination from '@/components/MkPagination.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { infoImageUrl } from '@/instance.js';
|
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
pagination: Paging;
|
pagination: Paging;
|
||||||
|
|
|
@ -28,9 +28,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</div>
|
</div>
|
||||||
</MkA>
|
</MkA>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!initializing && history.length == 0" class="_fullinfo">
|
<MkResult v-if="!initializing && history.length == 0" type="empty" :text="i18n.ts._chat.noHistory"/>
|
||||||
<div>{{ i18n.ts._chat.noHistory }}</div>
|
|
||||||
</div>
|
|
||||||
<MkLoading v-if="initializing"/>
|
<MkLoading v-if="initializing"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -11,18 +11,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-else-if="!input && !select"
|
v-else-if="!input && !select"
|
||||||
:class="[$style.icon, {
|
:class="[$style.icon]"
|
||||||
[$style.type_success]: type === 'success',
|
|
||||||
[$style.type_error]: type === 'error',
|
|
||||||
[$style.type_warning]: type === 'warning',
|
|
||||||
[$style.type_info]: type === 'info',
|
|
||||||
}]"
|
|
||||||
>
|
>
|
||||||
<i v-if="type === 'success'" :class="$style.iconInner" class="ti ti-check"></i>
|
<MkSystemIcon v-if="type === 'success'" :class="$style.iconInner" style="width: 45px;" type="success"/>
|
||||||
<i v-else-if="type === 'error'" :class="$style.iconInner" class="ti ti-circle-x"></i>
|
<MkSystemIcon v-else-if="type === 'error'" :class="$style.iconInner" style="width: 45px;" type="error"/>
|
||||||
<i v-else-if="type === 'warning'" :class="$style.iconInner" class="ti ti-alert-triangle"></i>
|
<MkSystemIcon v-else-if="type === 'warning'" :class="$style.iconInner" style="width: 45px;" type="warn"/>
|
||||||
<i v-else-if="type === 'info'" :class="$style.iconInner" class="ti ti-info-circle"></i>
|
<MkSystemIcon v-else-if="type === 'info'" :class="$style.iconInner" style="width: 45px;" type="info"/>
|
||||||
<i v-else-if="type === 'question'" :class="$style.iconInner" class="ti ti-help-circle"></i>
|
<MkSystemIcon v-else-if="type === 'question'" :class="$style.iconInner" style="width: 45px;" type="question"/>
|
||||||
<MkLoading v-else-if="type === 'waiting'" :class="$style.iconInner" :em="true"/>
|
<MkLoading v-else-if="type === 'waiting'" :class="$style.iconInner" :em="true"/>
|
||||||
</div>
|
</div>
|
||||||
<header v-if="title" :class="$style.title" class="_selectable"><Mfm :text="title"/></header>
|
<header v-if="title" :class="$style.title" class="_selectable"><Mfm :text="title"/></header>
|
||||||
|
@ -202,22 +197,6 @@ function onInputKeydown(evt: KeyboardEvent) {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type_info {
|
|
||||||
color: #55c4dd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.type_success {
|
|
||||||
color: var(--MI_THEME-success);
|
|
||||||
}
|
|
||||||
|
|
||||||
.type_error {
|
|
||||||
color: var(--MI_THEME-error);
|
|
||||||
}
|
|
||||||
|
|
||||||
.type_warning {
|
|
||||||
color: var(--MI_THEME-warn);
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
margin: 0 0 8px 0;
|
margin: 0 0 8px 0;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
|
@ -31,6 +31,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
:leaveActiveClass="prefer.s.animation ? $style.transition_toggle_leaveActive : ''"
|
:leaveActiveClass="prefer.s.animation ? $style.transition_toggle_leaveActive : ''"
|
||||||
:enterFromClass="prefer.s.animation ? $style.transition_toggle_enterFrom : ''"
|
:enterFromClass="prefer.s.animation ? $style.transition_toggle_enterFrom : ''"
|
||||||
:leaveToClass="prefer.s.animation ? $style.transition_toggle_leaveTo : ''"
|
:leaveToClass="prefer.s.animation ? $style.transition_toggle_leaveTo : ''"
|
||||||
|
@enter="enter"
|
||||||
|
@afterEnter="afterEnter"
|
||||||
|
@leave="leave"
|
||||||
|
@afterLeave="afterLeave"
|
||||||
>
|
>
|
||||||
<KeepAlive>
|
<KeepAlive>
|
||||||
<div v-show="opened">
|
<div v-show="opened">
|
||||||
|
@ -86,6 +90,42 @@ const bgSame = ref(false);
|
||||||
const opened = ref(props.defaultOpen);
|
const opened = ref(props.defaultOpen);
|
||||||
const openedAtLeastOnce = ref(props.defaultOpen);
|
const openedAtLeastOnce = ref(props.defaultOpen);
|
||||||
|
|
||||||
|
//#region interpolate-sizeに対応していないブラウザ向け(TODO: 主要ブラウザが対応したら消す)
|
||||||
|
function enter(el: Element) {
|
||||||
|
if (CSS.supports('interpolate-size', 'allow-keywords')) return;
|
||||||
|
if (!(el instanceof HTMLElement)) return;
|
||||||
|
|
||||||
|
const elementHeight = el.getBoundingClientRect().height;
|
||||||
|
el.style.height = '0';
|
||||||
|
el.offsetHeight; // reflow
|
||||||
|
el.style.height = `${Math.min(elementHeight, props.maxHeight ?? Infinity)}px`;
|
||||||
|
}
|
||||||
|
|
||||||
|
function afterEnter(el: Element) {
|
||||||
|
if (CSS.supports('interpolate-size', 'allow-keywords')) return;
|
||||||
|
if (!(el instanceof HTMLElement)) return;
|
||||||
|
|
||||||
|
el.style.height = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function leave(el: Element) {
|
||||||
|
if (CSS.supports('interpolate-size', 'allow-keywords')) return;
|
||||||
|
if (!(el instanceof HTMLElement)) return;
|
||||||
|
|
||||||
|
const elementHeight = el.getBoundingClientRect().height;
|
||||||
|
el.style.height = `${elementHeight}px`;
|
||||||
|
el.offsetHeight; // reflow
|
||||||
|
el.style.height = '0';
|
||||||
|
}
|
||||||
|
|
||||||
|
function afterLeave(el: Element) {
|
||||||
|
if (CSS.supports('interpolate-size', 'allow-keywords')) return;
|
||||||
|
if (!(el instanceof HTMLElement)) return;
|
||||||
|
|
||||||
|
el.style.height = '';
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
function toggle() {
|
function toggle() {
|
||||||
if (!opened.value) {
|
if (!opened.value) {
|
||||||
openedAtLeastOnce.value = true;
|
openedAtLeastOnce.value = true;
|
||||||
|
@ -108,17 +148,27 @@ onMounted(() => {
|
||||||
.transition_toggle_enterActive,
|
.transition_toggle_enterActive,
|
||||||
.transition_toggle_leaveActive {
|
.transition_toggle_leaveActive {
|
||||||
overflow-y: hidden; // 子要素のmarginが突き出るため clip を使ってはいけない
|
overflow-y: hidden; // 子要素のmarginが突き出るため clip を使ってはいけない
|
||||||
transition: opacity 0.3s, height 0.3s !important;
|
transition: opacity 0.3s, height 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@supports (interpolate-size: allow-keywords) {
|
||||||
|
.transition_toggle_enterFrom,
|
||||||
|
.transition_toggle_leaveTo {
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.root {
|
||||||
|
interpolate-size: allow-keywords; // heightのtransitionを動作させるために必要
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.transition_toggle_enterFrom,
|
.transition_toggle_enterFrom,
|
||||||
.transition_toggle_leaveTo {
|
.transition_toggle_leaveTo {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
height: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.root {
|
.root {
|
||||||
display: block;
|
display: block;
|
||||||
interpolate-size: allow-keywords; // heightのtransitionを動作させるために必要
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
|
|
|
@ -62,10 +62,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="_fullinfo">
|
<MkResult v-else type="empty"/>
|
||||||
<img :src="infoImageUrl" draggable="false"/>
|
|
||||||
<div>{{ i18n.ts.nothing }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</MkModalWindow>
|
</MkModalWindow>
|
||||||
</template>
|
</template>
|
||||||
|
@ -83,7 +80,6 @@ import XFile from './MkFormDialog.file.vue';
|
||||||
import type { Form } from '@/utility/form.js';
|
import type { Form } from '@/utility/form.js';
|
||||||
import MkModalWindow from '@/components/MkModalWindow.vue';
|
import MkModalWindow from '@/components/MkModalWindow.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { infoImageUrl } from '@/instance.js';
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
title: string;
|
title: string;
|
||||||
|
|
|
@ -12,8 +12,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import type { CSSProperties } from 'vue';
|
|
||||||
import { instanceName as localInstanceName } from '@@/js/config.js';
|
import { instanceName as localInstanceName } from '@@/js/config.js';
|
||||||
|
import type { CSSProperties } from 'vue';
|
||||||
import { instance as localInstance } from '@/instance.js';
|
import { instance as localInstance } from '@/instance.js';
|
||||||
import { getProxiedImageUrlNullable } from '@/utility/media-proxy.js';
|
import { getProxiedImageUrlNullable } from '@/utility/media-proxy.js';
|
||||||
|
|
||||||
|
@ -61,19 +61,9 @@ $height: 2ex;
|
||||||
border-radius: 4px 0 0 4px;
|
border-radius: 4px 0 0 4px;
|
||||||
overflow: clip;
|
overflow: clip;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-shadow: /* .866 ≈ sin(60deg) */
|
|
||||||
1px 0 1px #000,
|
// text-shadowは重いから使うな
|
||||||
.866px .5px 1px #000,
|
|
||||||
.5px .866px 1px #000,
|
|
||||||
0 1px 1px #000,
|
|
||||||
-.5px .866px 1px #000,
|
|
||||||
-.866px .5px 1px #000,
|
|
||||||
-1px 0 1px #000,
|
|
||||||
-.866px -.5px 1px #000,
|
|
||||||
-.5px -.866px 1px #000,
|
|
||||||
0 -1px 1px #000,
|
|
||||||
.5px -.866px 1px #000,
|
|
||||||
.866px -.5px 1px #000;
|
|
||||||
mask-image: linear-gradient(90deg,
|
mask-image: linear-gradient(90deg,
|
||||||
rgb(0,0,0),
|
rgb(0,0,0),
|
||||||
rgb(0,0,0) calc(100% - 16px),
|
rgb(0,0,0) calc(100% - 16px),
|
||||||
|
|
|
@ -5,12 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<MkPagination ref="pagingComponent" :pagination="pagination" :disableAutoLoad="disableAutoLoad">
|
<MkPagination ref="pagingComponent" :pagination="pagination" :disableAutoLoad="disableAutoLoad">
|
||||||
<template #empty>
|
<template #empty><MkResult type="empty" :text="i18n.ts.noNotes"/></template>
|
||||||
<div class="_fullinfo">
|
|
||||||
<img :src="infoImageUrl" draggable="false"/>
|
|
||||||
<div>{{ i18n.ts.noNotes }}</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #default="{ items: notes }">
|
<template #default="{ items: notes }">
|
||||||
<div :class="[$style.root, { [$style.noGap]: noGap, '_gaps': !noGap, [$style.reverse]: pagination.reversed }]">
|
<div :class="[$style.root, { [$style.noGap]: noGap, '_gaps': !noGap, [$style.reverse]: pagination.reversed }]">
|
||||||
|
@ -34,7 +29,6 @@ import type { Paging } from '@/components/MkPagination.vue';
|
||||||
import MkNote from '@/components/MkNote.vue';
|
import MkNote from '@/components/MkNote.vue';
|
||||||
import MkPagination from '@/components/MkPagination.vue';
|
import MkPagination from '@/components/MkPagination.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { infoImageUrl } from '@/instance.js';
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
pagination: Paging;
|
pagination: Paging;
|
||||||
|
|
|
@ -11,7 +11,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<div v-else-if="notification.type === 'reaction:grouped' && notification.note.reactionAcceptance === 'likeOnly'" :class="[$style.icon, $style.icon_reactionGroupHeart]"><i class="ti ti-heart" style="line-height: 1;"></i></div>
|
<div v-else-if="notification.type === 'reaction:grouped' && notification.note.reactionAcceptance === 'likeOnly'" :class="[$style.icon, $style.icon_reactionGroupHeart]"><i class="ti ti-heart" style="line-height: 1;"></i></div>
|
||||||
<div v-else-if="notification.type === 'reaction:grouped'" :class="[$style.icon, $style.icon_reactionGroup]"><i class="ti ti-plus" style="line-height: 1;"></i></div>
|
<div v-else-if="notification.type === 'reaction:grouped'" :class="[$style.icon, $style.icon_reactionGroup]"><i class="ti ti-plus" style="line-height: 1;"></i></div>
|
||||||
<div v-else-if="notification.type === 'renote:grouped'" :class="[$style.icon, $style.icon_renoteGroup]"><i class="ti ti-repeat" style="line-height: 1;"></i></div>
|
<div v-else-if="notification.type === 'renote:grouped'" :class="[$style.icon, $style.icon_renoteGroup]"><i class="ti ti-repeat" style="line-height: 1;"></i></div>
|
||||||
<img v-else-if="notification.type === 'test'" :class="$style.icon" :src="infoImageUrl"/>
|
|
||||||
<MkAvatar v-else-if="'user' in notification" :class="$style.icon" :user="notification.user" link preview/>
|
<MkAvatar v-else-if="'user' in notification" :class="$style.icon" :user="notification.user" link preview/>
|
||||||
<img v-else-if="'icon' in notification && notification.icon != null" :class="[$style.icon, $style.icon_app]" :src="notification.icon" alt=""/>
|
<img v-else-if="'icon' in notification && notification.icon != null" :class="[$style.icon, $style.icon_app]" :src="notification.icon" alt=""/>
|
||||||
<div
|
<div
|
||||||
|
@ -176,7 +175,6 @@ import { userPage } from '@/filters/user.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
import { ensureSignin } from '@/i.js';
|
import { ensureSignin } from '@/i.js';
|
||||||
import { infoImageUrl } from '@/instance.js';
|
|
||||||
|
|
||||||
const $i = ensureSignin();
|
const $i = ensureSignin();
|
||||||
|
|
||||||
|
|
|
@ -4,14 +4,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<MkPullToRefresh :refresher="() => reload()">
|
<component :is="prefer.s.enablePullToRefresh ? MkPullToRefresh : 'div'" :refresher="() => reload()">
|
||||||
<MkPagination ref="pagingComponent" :pagination="pagination">
|
<MkPagination ref="pagingComponent" :pagination="pagination">
|
||||||
<template #empty>
|
<template #empty><MkResult type="empty" :text="i18n.ts.noNotifications"/></template>
|
||||||
<div class="_fullinfo">
|
|
||||||
<img :src="infoImageUrl" draggable="false"/>
|
|
||||||
<div>{{ i18n.ts.noNotifications }}</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #default="{ items: notifications }">
|
<template #default="{ items: notifications }">
|
||||||
<component
|
<component
|
||||||
|
@ -30,7 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
</MkPagination>
|
</MkPagination>
|
||||||
</MkPullToRefresh>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
@ -42,7 +37,6 @@ import XNotification from '@/components/MkNotification.vue';
|
||||||
import MkNote from '@/components/MkNote.vue';
|
import MkNote from '@/components/MkNote.vue';
|
||||||
import { useStream } from '@/stream.js';
|
import { useStream } from '@/stream.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { infoImageUrl } from '@/instance.js';
|
|
||||||
import MkPullToRefresh from '@/components/MkPullToRefresh.vue';
|
import MkPullToRefresh from '@/components/MkPullToRefresh.vue';
|
||||||
import { prefer } from '@/preferences.js';
|
import { prefer } from '@/preferences.js';
|
||||||
|
|
||||||
|
@ -103,18 +97,38 @@ defineExpose({
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" module>
|
<style lang="scss" module>
|
||||||
.transition_x_move,
|
.transition_x_move {
|
||||||
.transition_x_enterActive,
|
transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
|
||||||
.transition_x_leaveActive {
|
|
||||||
transition: opacity 0.3s cubic-bezier(0,.5,.5,1), transform 0.3s cubic-bezier(0,.5,.5,1) !important;
|
|
||||||
}
|
}
|
||||||
.transition_x_enterFrom,
|
|
||||||
|
.transition_x_enterActive {
|
||||||
|
transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1);
|
||||||
|
|
||||||
|
&.item,
|
||||||
|
.item {
|
||||||
|
/* Skip Note Rendering有効時、TransitionGroupで通知を追加するときに一瞬がくっとなる問題を抑制する */
|
||||||
|
content-visibility: visible !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.transition_x_leaveActive {
|
||||||
|
transition: height 0.2s cubic-bezier(0,.5,.5,1), opacity 0.2s cubic-bezier(0,.5,.5,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.transition_x_enterFrom {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(max(-64px, -100%));
|
||||||
|
}
|
||||||
|
|
||||||
|
@supports (interpolate-size: allow-keywords) {
|
||||||
|
.transition_x_enterFrom {
|
||||||
|
interpolate-size: allow-keywords; // heightのtransitionを動作させるために必要
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.transition_x_leaveTo {
|
.transition_x_leaveTo {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateY(-50%);
|
|
||||||
}
|
|
||||||
.transition_x_leaveActive {
|
|
||||||
position: absolute;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.notifications {
|
.notifications {
|
||||||
|
|
|
@ -16,12 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkError v-else-if="error" @retry="init()"/>
|
<MkError v-else-if="error" @retry="init()"/>
|
||||||
|
|
||||||
<div v-else-if="empty" key="_empty_">
|
<div v-else-if="empty" key="_empty_">
|
||||||
<slot name="empty">
|
<slot name="empty"><MkResult type="empty"/></slot>
|
||||||
<div class="_fullinfo">
|
|
||||||
<img :src="infoImageUrl" draggable="false"/>
|
|
||||||
<div>{{ i18n.ts.nothing }}</div>
|
|
||||||
</div>
|
|
||||||
</slot>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else ref="rootEl" class="_gaps">
|
<div v-else ref="rootEl" class="_gaps">
|
||||||
|
@ -88,7 +83,6 @@ function concatMapWithArray(map: MisskeyEntityMap, entities: MisskeyEntity[]): M
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { infoImageUrl } from '@/instance.js';
|
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
|
|
|
@ -4,13 +4,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div ref="rootEl">
|
<div ref="rootEl" :class="isPulling ? $style.isPulling : null">
|
||||||
<div v-if="isPullStart" :class="$style.frame" :style="`--frame-min-height: ${pullDistance / (PULL_BRAKE_BASE + (pullDistance / PULL_BRAKE_FACTOR))}px;`">
|
<!-- 小数が含まれるとレンダリングが高頻度になりすぎパフォーマンスが悪化するためround -->
|
||||||
|
<div v-if="isPulling" :class="$style.frame" :style="`--frame-min-height: ${Math.round(pullDistance / (PULL_BRAKE_BASE + (pullDistance / PULL_BRAKE_FACTOR)))}px;`">
|
||||||
<div :class="$style.frameContent">
|
<div :class="$style.frameContent">
|
||||||
<MkLoading v-if="isRefreshing" :class="$style.loader" :em="true"/>
|
<MkLoading v-if="isRefreshing" :class="$style.loader" :em="true"/>
|
||||||
<i v-else class="ti ti-arrow-bar-to-down" :class="[$style.icon, { [$style.refresh]: isPullEnd }]"></i>
|
<i v-else class="ti ti-arrow-bar-to-down" :class="[$style.icon, { [$style.refresh]: isPulledEnough }]"></i>
|
||||||
<div :class="$style.text">
|
<div :class="$style.text">
|
||||||
<template v-if="isPullEnd">{{ i18n.ts.releaseToRefresh }}</template>
|
<template v-if="isPulledEnough">{{ i18n.ts.releaseToRefresh }}</template>
|
||||||
<template v-else-if="isRefreshing">{{ i18n.ts.refreshing }}</template>
|
<template v-else-if="isRefreshing">{{ i18n.ts.refreshing }}</template>
|
||||||
<template v-else>{{ i18n.ts.pullDownToRefresh }}</template>
|
<template v-else>{{ i18n.ts.pullDownToRefresh }}</template>
|
||||||
</div>
|
</div>
|
||||||
|
@ -29,24 +30,21 @@ import { isHorizontalSwipeSwiping } from '@/utility/touch.js';
|
||||||
|
|
||||||
const SCROLL_STOP = 10;
|
const SCROLL_STOP = 10;
|
||||||
const MAX_PULL_DISTANCE = Infinity;
|
const MAX_PULL_DISTANCE = Infinity;
|
||||||
const FIRE_THRESHOLD = 230;
|
const FIRE_THRESHOLD = 200;
|
||||||
const RELEASE_TRANSITION_DURATION = 200;
|
const RELEASE_TRANSITION_DURATION = 200;
|
||||||
const PULL_BRAKE_BASE = 1.5;
|
const PULL_BRAKE_BASE = 1.5;
|
||||||
const PULL_BRAKE_FACTOR = 170;
|
const PULL_BRAKE_FACTOR = 170;
|
||||||
|
|
||||||
const isPullStart = ref(false);
|
const isPulling = ref(false);
|
||||||
const isPullEnd = ref(false);
|
const isPulledEnough = ref(false);
|
||||||
const isRefreshing = ref(false);
|
const isRefreshing = ref(false);
|
||||||
const pullDistance = ref(0);
|
const pullDistance = ref(0);
|
||||||
|
|
||||||
let supportPointerDesktop = false;
|
|
||||||
let startScreenY: number | null = null;
|
let startScreenY: number | null = null;
|
||||||
|
|
||||||
const rootEl = useTemplateRef('rootEl');
|
const rootEl = useTemplateRef('rootEl');
|
||||||
let scrollEl: HTMLElement | null = null;
|
let scrollEl: HTMLElement | null = null;
|
||||||
|
|
||||||
let disabled = false;
|
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
refresher: () => Promise<void>;
|
refresher: () => Promise<void>;
|
||||||
}>(), {
|
}>(), {
|
||||||
|
@ -57,19 +55,72 @@ const emit = defineEmits<{
|
||||||
(ev: 'refresh'): void;
|
(ev: 'refresh'): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
function getScreenY(event) {
|
function getScreenY(event: TouchEvent | MouseEvent | PointerEvent): number {
|
||||||
if (supportPointerDesktop) {
|
if (event.touches && event.touches[0] && event.touches[0].screenY != null) {
|
||||||
|
return event.touches[0].screenY;
|
||||||
|
} else {
|
||||||
return event.screenY;
|
return event.screenY;
|
||||||
}
|
}
|
||||||
return event.touches[0].screenY;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function moveStart(event) {
|
// When at the top of the page, disable vertical overscroll so passive touch listeners can take over.
|
||||||
if (!isPullStart.value && !isRefreshing.value && !disabled) {
|
function lockDownScroll() {
|
||||||
isPullStart.value = true;
|
if (scrollEl == null) return;
|
||||||
|
scrollEl.style.touchAction = 'pan-x pan-down pinch-zoom';
|
||||||
|
scrollEl.style.overscrollBehavior = 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
function unlockDownScroll() {
|
||||||
|
if (scrollEl == null) return;
|
||||||
|
scrollEl.style.touchAction = 'auto';
|
||||||
|
scrollEl.style.overscrollBehavior = 'contain';
|
||||||
|
}
|
||||||
|
|
||||||
|
function moveStartByMouse(event: MouseEvent) {
|
||||||
|
if (event.button !== 1) return;
|
||||||
|
if (isRefreshing.value) return;
|
||||||
|
|
||||||
|
const scrollPos = scrollEl!.scrollTop;
|
||||||
|
if (scrollPos !== 0) {
|
||||||
|
unlockDownScroll();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
lockDownScroll();
|
||||||
|
|
||||||
|
event.preventDefault(); // 中クリックによるスクロール、テキスト選択などを防ぐ
|
||||||
|
|
||||||
|
isPulling.value = true;
|
||||||
startScreenY = getScreenY(event);
|
startScreenY = getScreenY(event);
|
||||||
pullDistance.value = 0;
|
pullDistance.value = 0;
|
||||||
|
|
||||||
|
window.addEventListener('mousemove', moving, { passive: true });
|
||||||
|
window.addEventListener('mouseup', () => {
|
||||||
|
window.removeEventListener('mousemove', moving);
|
||||||
|
onPullRelease();
|
||||||
|
}, { passive: true, once: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
function moveStartByTouch(event: TouchEvent) {
|
||||||
|
if (isRefreshing.value) return;
|
||||||
|
|
||||||
|
const scrollPos = scrollEl!.scrollTop;
|
||||||
|
if (scrollPos !== 0) {
|
||||||
|
unlockDownScroll();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lockDownScroll();
|
||||||
|
|
||||||
|
isPulling.value = true;
|
||||||
|
startScreenY = getScreenY(event);
|
||||||
|
pullDistance.value = 0;
|
||||||
|
|
||||||
|
window.addEventListener('touchmove', moving, { passive: true });
|
||||||
|
window.addEventListener('touchend', () => {
|
||||||
|
window.removeEventListener('touchmove', moving);
|
||||||
|
onPullRelease();
|
||||||
|
}, { passive: true, once: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
function moveBySystem(to: number): Promise<void> {
|
function moveBySystem(to: number): Promise<void> {
|
||||||
|
@ -108,11 +159,10 @@ async function closeContent() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function moveEnd() {
|
function onPullRelease() {
|
||||||
if (isPullStart.value && !isRefreshing.value) {
|
|
||||||
startScreenY = null;
|
startScreenY = null;
|
||||||
if (isPullEnd.value) {
|
if (isPulledEnough.value) {
|
||||||
isPullEnd.value = false;
|
isPulledEnough.value = false;
|
||||||
isRefreshing.value = true;
|
isRefreshing.value = true;
|
||||||
fixOverContent().then(() => {
|
fixOverContent().then(() => {
|
||||||
emit('refresh');
|
emit('refresh');
|
||||||
|
@ -121,18 +171,24 @@ function moveEnd() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
closeContent().then(() => isPullStart.value = false);
|
closeContent().then(() => isPulling.value = false);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function moving(event: TouchEvent | PointerEvent) {
|
function toggleScrollLockOnTouchEnd() {
|
||||||
if (!isPullStart.value || isRefreshing.value || disabled) return;
|
const scrollPos = scrollEl!.scrollTop;
|
||||||
|
if (scrollPos === 0) {
|
||||||
|
lockDownScroll();
|
||||||
|
} else {
|
||||||
|
unlockDownScroll();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((scrollEl?.scrollTop ?? 0) > (supportPointerDesktop ? SCROLL_STOP : SCROLL_STOP + pullDistance.value) || isHorizontalSwipeSwiping.value) {
|
function moving(event: MouseEvent | TouchEvent) {
|
||||||
|
if ((scrollEl?.scrollTop ?? 0) > SCROLL_STOP + pullDistance.value || isHorizontalSwipeSwiping.value) {
|
||||||
pullDistance.value = 0;
|
pullDistance.value = 0;
|
||||||
isPullEnd.value = false;
|
isPulledEnough.value = false;
|
||||||
moveEnd();
|
onPullRelease();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,15 +200,7 @@ function moving(event: TouchEvent | PointerEvent) {
|
||||||
const moveHeight = moveScreenY - startScreenY!;
|
const moveHeight = moveScreenY - startScreenY!;
|
||||||
pullDistance.value = Math.min(Math.max(moveHeight, 0), MAX_PULL_DISTANCE);
|
pullDistance.value = Math.min(Math.max(moveHeight, 0), MAX_PULL_DISTANCE);
|
||||||
|
|
||||||
if (pullDistance.value > 0) {
|
isPulledEnough.value = pullDistance.value >= FIRE_THRESHOLD;
|
||||||
if (event.cancelable) event.preventDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pullDistance.value > SCROLL_STOP) {
|
|
||||||
event.stopPropagation();
|
|
||||||
}
|
|
||||||
|
|
||||||
isPullEnd.value = pullDistance.value >= FIRE_THRESHOLD;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -162,65 +210,33 @@ function moving(event: TouchEvent | PointerEvent) {
|
||||||
*/
|
*/
|
||||||
function refreshFinished() {
|
function refreshFinished() {
|
||||||
closeContent().then(() => {
|
closeContent().then(() => {
|
||||||
isPullStart.value = false;
|
isPulling.value = false;
|
||||||
isRefreshing.value = false;
|
isRefreshing.value = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function setDisabled(value) {
|
|
||||||
disabled = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
function onScrollContainerScroll() {
|
|
||||||
const scrollPos = scrollEl!.scrollTop;
|
|
||||||
|
|
||||||
// When at the top of the page, disable vertical overscroll so passive touch listeners can take over.
|
|
||||||
if (scrollPos === 0) {
|
|
||||||
scrollEl!.style.touchAction = 'pan-x pan-down pinch-zoom';
|
|
||||||
registerEventListenersForReadyToPull();
|
|
||||||
} else {
|
|
||||||
scrollEl!.style.touchAction = 'auto';
|
|
||||||
unregisterEventListenersForReadyToPull();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function registerEventListenersForReadyToPull() {
|
|
||||||
if (rootEl.value == null) return;
|
|
||||||
rootEl.value.addEventListener('touchstart', moveStart, { passive: true });
|
|
||||||
rootEl.value.addEventListener('touchmove', moving, { passive: false }); // passive: falseにしないとpreventDefaultが使えない
|
|
||||||
}
|
|
||||||
|
|
||||||
function unregisterEventListenersForReadyToPull() {
|
|
||||||
if (rootEl.value == null) return;
|
|
||||||
rootEl.value.removeEventListener('touchstart', moveStart);
|
|
||||||
rootEl.value.removeEventListener('touchmove', moving);
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (rootEl.value == null) return;
|
if (rootEl.value == null) return;
|
||||||
|
|
||||||
scrollEl = getScrollContainer(rootEl.value);
|
scrollEl = getScrollContainer(rootEl.value);
|
||||||
if (scrollEl == null) return;
|
lockDownScroll();
|
||||||
|
rootEl.value.addEventListener('mousedown', moveStartByMouse, { passive: false }); // preventDefaultするため
|
||||||
scrollEl.addEventListener('scroll', onScrollContainerScroll, { passive: true });
|
rootEl.value.addEventListener('touchstart', moveStartByTouch, { passive: true });
|
||||||
|
rootEl.value.addEventListener('touchend', toggleScrollLockOnTouchEnd, { passive: true });
|
||||||
rootEl.value.addEventListener('touchend', moveEnd, { passive: true });
|
|
||||||
|
|
||||||
registerEventListenersForReadyToPull();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
if (scrollEl) scrollEl.removeEventListener('scroll', onScrollContainerScroll);
|
unlockDownScroll();
|
||||||
|
if (rootEl.value) rootEl.value.removeEventListener('mousedown', moveStartByMouse);
|
||||||
unregisterEventListenersForReadyToPull();
|
if (rootEl.value) rootEl.value.removeEventListener('touchstart', moveStartByTouch);
|
||||||
});
|
if (rootEl.value) rootEl.value.removeEventListener('touchend', toggleScrollLockOnTouchEnd);
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
setDisabled,
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" module>
|
<style lang="scss" module>
|
||||||
|
.isPulling {
|
||||||
|
will-change: contents;
|
||||||
|
}
|
||||||
|
|
||||||
.frame {
|
.frame {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: clip;
|
overflow: clip;
|
||||||
|
@ -242,7 +258,6 @@ defineExpose({
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 14px;
|
|
||||||
|
|
||||||
> .icon, > .loader {
|
> .icon, > .loader {
|
||||||
margin: 6px 0;
|
margin: 6px 0;
|
||||||
|
@ -258,6 +273,7 @@ defineExpose({
|
||||||
|
|
||||||
> .text {
|
> .text {
|
||||||
margin: 5px 0;
|
margin: 5px 0;
|
||||||
|
font-size: 90%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -53,12 +53,12 @@ const MIN_SWIPE_DISTANCE = 20;
|
||||||
// スワイプ時の動作を発火する最小の距離
|
// スワイプ時の動作を発火する最小の距離
|
||||||
const SWIPE_DISTANCE_THRESHOLD = 70;
|
const SWIPE_DISTANCE_THRESHOLD = 70;
|
||||||
|
|
||||||
// スワイプを中断するY方向の移動距離
|
|
||||||
const SWIPE_ABORT_Y_THRESHOLD = 75;
|
|
||||||
|
|
||||||
// スワイプできる最大の距離
|
// スワイプできる最大の距離
|
||||||
const MAX_SWIPE_DISTANCE = 120;
|
const MAX_SWIPE_DISTANCE = 120;
|
||||||
|
|
||||||
|
// スワイプ方向を判定する角度の許容範囲(度数)
|
||||||
|
const SWIPE_DIRECTION_ANGLE_THRESHOLD = 50;
|
||||||
|
|
||||||
// ▲ しきい値 ▲ //
|
// ▲ しきい値 ▲ //
|
||||||
|
|
||||||
let startScreenX: number | null = null;
|
let startScreenX: number | null = null;
|
||||||
|
@ -69,6 +69,7 @@ const currentTabIndex = computed(() => props.tabs.findIndex(tab => tab.key === t
|
||||||
const pullDistance = ref(0);
|
const pullDistance = ref(0);
|
||||||
const isSwipingForClass = ref(false);
|
const isSwipingForClass = ref(false);
|
||||||
let swipeAborted = false;
|
let swipeAborted = false;
|
||||||
|
let swipeDirectionLocked: 'horizontal' | 'vertical' | null = null;
|
||||||
|
|
||||||
function touchStart(event: TouchEvent) {
|
function touchStart(event: TouchEvent) {
|
||||||
if (!prefer.r.enableHorizontalSwipe.value) return;
|
if (!prefer.r.enableHorizontalSwipe.value) return;
|
||||||
|
@ -79,6 +80,7 @@ function touchStart(event: TouchEvent) {
|
||||||
|
|
||||||
startScreenX = event.touches[0].screenX;
|
startScreenX = event.touches[0].screenX;
|
||||||
startScreenY = event.touches[0].screenY;
|
startScreenY = event.touches[0].screenY;
|
||||||
|
swipeDirectionLocked = null; // スワイプ方向をリセット
|
||||||
}
|
}
|
||||||
|
|
||||||
function touchMove(event: TouchEvent) {
|
function touchMove(event: TouchEvent) {
|
||||||
|
@ -95,15 +97,24 @@ function touchMove(event: TouchEvent) {
|
||||||
let distanceX = event.touches[0].screenX - startScreenX;
|
let distanceX = event.touches[0].screenX - startScreenX;
|
||||||
let distanceY = event.touches[0].screenY - startScreenY;
|
let distanceY = event.touches[0].screenY - startScreenY;
|
||||||
|
|
||||||
if (Math.abs(distanceY) > SWIPE_ABORT_Y_THRESHOLD) {
|
// スワイプ方向をロック
|
||||||
swipeAborted = true;
|
if (!swipeDirectionLocked) {
|
||||||
|
const angle = Math.abs(Math.atan2(distanceY, distanceX) * (180 / Math.PI));
|
||||||
|
if (angle > 90 - SWIPE_DIRECTION_ANGLE_THRESHOLD && angle < 90 + SWIPE_DIRECTION_ANGLE_THRESHOLD) {
|
||||||
|
swipeDirectionLocked = 'vertical';
|
||||||
|
} else {
|
||||||
|
swipeDirectionLocked = 'horizontal';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 縦方向のスワイプの場合は中断
|
||||||
|
if (swipeDirectionLocked === 'vertical') {
|
||||||
|
swipeAborted = true;
|
||||||
pullDistance.value = 0;
|
pullDistance.value = 0;
|
||||||
isSwiping.value = false;
|
isSwiping.value = false;
|
||||||
window.setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
isSwipingForClass.value = false;
|
isSwipingForClass.value = false;
|
||||||
}, 400);
|
}, 400);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,6 +175,8 @@ function touchEnd(event: TouchEvent) {
|
||||||
window.setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
isSwipingForClass.value = false;
|
isSwipingForClass.value = false;
|
||||||
}, 400);
|
}, 400);
|
||||||
|
|
||||||
|
swipeDirectionLocked = null; // スワイプ方向をリセット
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 横スワイプに関与する可能性のある要素を調べる */
|
/** 横スワイプに関与する可能性のある要素を調べる */
|
||||||
|
@ -190,7 +203,7 @@ watch(tabModel, (newTab, oldTab) => {
|
||||||
const newIndex = props.tabs.findIndex(tab => tab.key === newTab);
|
const newIndex = props.tabs.findIndex(tab => tab.key === newTab);
|
||||||
const oldIndex = props.tabs.findIndex(tab => tab.key === oldTab);
|
const oldIndex = props.tabs.findIndex(tab => tab.key === oldTab);
|
||||||
|
|
||||||
if (oldIndex >= 0 && newIndex && oldIndex < newIndex) {
|
if (oldIndex >= 0 && newIndex >= 0 && oldIndex < newIndex) {
|
||||||
transitionName.value = 'swipeAnimationLeft';
|
transitionName.value = 'swipeAnimationLeft';
|
||||||
} else {
|
} else {
|
||||||
transitionName.value = 'swipeAnimationRight';
|
transitionName.value = 'swipeAnimationRight';
|
||||||
|
|
|
@ -4,14 +4,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<MkPullToRefresh ref="prComponent" :refresher="() => reloadTimeline()">
|
<component :is="prefer.s.enablePullToRefresh ? MkPullToRefresh : 'div'" :refresher="() => reloadTimeline()">
|
||||||
<MkPagination v-if="paginationQuery" ref="pagingComponent" :pagination="paginationQuery" @queue="emit('queue', $event)" @status="prComponent?.setDisabled($event)">
|
<MkPagination v-if="paginationQuery" ref="pagingComponent" :pagination="paginationQuery" @queue="emit('queue', $event)">
|
||||||
<template #empty>
|
<template #empty><MkResult type="empty" :text="i18n.ts.noNotes"/></template>
|
||||||
<div class="_fullinfo">
|
|
||||||
<img :src="infoImageUrl" draggable="false"/>
|
|
||||||
<div>{{ i18n.ts.noNotes }}</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #default="{ items: notes }">
|
<template #default="{ items: notes }">
|
||||||
<component
|
<component
|
||||||
|
@ -21,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
:leaveActiveClass="$style.transition_x_leaveActive"
|
:leaveActiveClass="$style.transition_x_leaveActive"
|
||||||
:enterFromClass="$style.transition_x_enterFrom"
|
:enterFromClass="$style.transition_x_enterFrom"
|
||||||
:leaveToClass="$style.transition_x_leaveTo"
|
:leaveToClass="$style.transition_x_leaveTo"
|
||||||
:moveClass=" $style.transition_x_move"
|
:moveClass="$style.transition_x_move"
|
||||||
tag="div"
|
tag="div"
|
||||||
>
|
>
|
||||||
<template v-for="(note, i) in notes" :key="note.id">
|
<template v-for="(note, i) in notes" :key="note.id">
|
||||||
|
@ -36,7 +31,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
</MkPagination>
|
</MkPagination>
|
||||||
</MkPullToRefresh>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
@ -53,7 +48,6 @@ import { prefer } from '@/preferences.js';
|
||||||
import MkNote from '@/components/MkNote.vue';
|
import MkNote from '@/components/MkNote.vue';
|
||||||
import MkPagination from '@/components/MkPagination.vue';
|
import MkPagination from '@/components/MkPagination.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { infoImageUrl } from '@/instance.js';
|
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
src: BasicTimelineType | 'mentions' | 'directs' | 'list' | 'antenna' | 'channel' | 'role';
|
src: BasicTimelineType | 'mentions' | 'directs' | 'list' | 'antenna' | 'channel' | 'role';
|
||||||
|
@ -93,7 +87,6 @@ type TimelineQueryType = {
|
||||||
roleId?: string
|
roleId?: string
|
||||||
};
|
};
|
||||||
|
|
||||||
const prComponent = useTemplateRef('prComponent');
|
|
||||||
const pagingComponent = useTemplateRef('pagingComponent');
|
const pagingComponent = useTemplateRef('pagingComponent');
|
||||||
|
|
||||||
let tlNotesCount = 0;
|
let tlNotesCount = 0;
|
||||||
|
@ -306,18 +299,38 @@ defineExpose({
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" module>
|
<style lang="scss" module>
|
||||||
.transition_x_move,
|
.transition_x_move {
|
||||||
.transition_x_enterActive,
|
transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
|
||||||
.transition_x_leaveActive {
|
|
||||||
transition: opacity 0.3s cubic-bezier(0,.5,.5,1), transform 0.3s cubic-bezier(0,.5,.5,1) !important;
|
|
||||||
}
|
}
|
||||||
.transition_x_enterFrom,
|
|
||||||
|
.transition_x_enterActive {
|
||||||
|
transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1);
|
||||||
|
|
||||||
|
&.note,
|
||||||
|
.note {
|
||||||
|
/* Skip Note Rendering有効時、TransitionGroupでnoteを追加するときに一瞬がくっとなる問題を抑制する */
|
||||||
|
content-visibility: visible !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.transition_x_leaveActive {
|
||||||
|
transition: height 0.2s cubic-bezier(0,.5,.5,1), opacity 0.2s cubic-bezier(0,.5,.5,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.transition_x_enterFrom {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(max(-64px, -100%));
|
||||||
|
}
|
||||||
|
|
||||||
|
@supports (interpolate-size: allow-keywords) {
|
||||||
|
.transition_x_leaveTo {
|
||||||
|
interpolate-size: allow-keywords; // heightのtransitionを動作させるために必要
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.transition_x_leaveTo {
|
.transition_x_leaveTo {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateY(-50%);
|
|
||||||
}
|
|
||||||
.transition_x_leaveActive {
|
|
||||||
position: absolute;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.reverse {
|
.reverse {
|
||||||
|
|
|
@ -5,12 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<MkPagination :pagination="pagination">
|
<MkPagination :pagination="pagination">
|
||||||
<template #empty>
|
<template #empty><MkResult type="empty" :text="i18n.ts.noUsers"/></template>
|
||||||
<div class="_fullinfo">
|
|
||||||
<img :src="infoImageUrl" draggable="false"/>
|
|
||||||
<div>{{ i18n.ts.noUsers }}</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #default="{ items }">
|
<template #default="{ items }">
|
||||||
<div :class="$style.root">
|
<div :class="$style.root">
|
||||||
|
@ -25,7 +20,6 @@ import type { Paging } from '@/components/MkPagination.vue';
|
||||||
import MkUserInfo from '@/components/MkUserInfo.vue';
|
import MkUserInfo from '@/components/MkUserInfo.vue';
|
||||||
import MkPagination from '@/components/MkPagination.vue';
|
import MkPagination from '@/components/MkPagination.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { infoImageUrl } from '@/instance.js';
|
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
pagination: Paging;
|
pagination: Paging;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue