Compare commits
81 Commits
13.0.0-rc.
...
13.0.0-rc.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1f8f051ee2 | ||
![]() |
94004b7a3f | ||
![]() |
3e9f88506e | ||
![]() |
81f11d8f86 | ||
![]() |
518b3e2f73 | ||
![]() |
d0157b3bfd | ||
![]() |
7fc8d2e6d5 | ||
![]() |
fb0f9711ba | ||
![]() |
92136272b0 | ||
![]() |
e1159e9ef2 | ||
![]() |
a2e61c6708 | ||
![]() |
726959911c | ||
![]() |
d59914b959 | ||
![]() |
07025caee9 | ||
![]() |
1c0289e490 | ||
![]() |
275fcd8bbc | ||
![]() |
0c0aa93668 | ||
![]() |
bfcd5ea440 | ||
![]() |
3ff43cca02 | ||
![]() |
6bd536c526 | ||
![]() |
7738a36014 | ||
![]() |
daddec8362 | ||
![]() |
a3832d73fd | ||
![]() |
cedb4267ba | ||
![]() |
9c6629d582 | ||
![]() |
4ee4e70ee0 | ||
![]() |
bb7867351c | ||
![]() |
fea7460930 | ||
![]() |
1bf2bf1773 | ||
![]() |
3d668ad10d | ||
![]() |
2801338a3c | ||
![]() |
b66f4ebba1 | ||
![]() |
9ee1b5f30a | ||
![]() |
0f31a0548c | ||
![]() |
ffc29aa6f5 | ||
![]() |
d23aa94b41 | ||
![]() |
c1b6378951 | ||
![]() |
bb5d2bda51 | ||
![]() |
d075471b2d | ||
![]() |
199d98bf79 | ||
![]() |
3ae798d526 | ||
![]() |
e1bd61c70e | ||
![]() |
0296f841c3 | ||
![]() |
bd1f4b8d98 | ||
![]() |
dc19f20153 | ||
![]() |
f5cd809f62 | ||
![]() |
09d5a7806a | ||
![]() |
4606f23ed8 | ||
![]() |
8451e08aaa | ||
![]() |
2047449294 | ||
![]() |
d61eee695f | ||
![]() |
73b62797cd | ||
![]() |
170cfc6a0e | ||
![]() |
6bf1d7e398 | ||
![]() |
e46e7f5252 | ||
![]() |
5952f1ac24 | ||
![]() |
a08369fe36 | ||
![]() |
6cb9612943 | ||
![]() |
76c049522e | ||
![]() |
c41879c542 | ||
![]() |
99bdb11d24 | ||
![]() |
c2009acb2d | ||
![]() |
46d2a8726e | ||
![]() |
7df3ca7388 | ||
![]() |
51b8d4ae3e | ||
![]() |
ab1124abba | ||
![]() |
3db84a2e8f | ||
![]() |
9a78bbf0f1 | ||
![]() |
efbec444e8 | ||
![]() |
2f06f2a6da | ||
![]() |
b8da51e08c | ||
![]() |
af6a578fa6 | ||
![]() |
73d735a1f7 | ||
![]() |
b8b1899a9f | ||
![]() |
d52f0617a1 | ||
![]() |
c730973294 | ||
![]() |
2c2e064871 | ||
![]() |
e3c39d4b52 | ||
![]() |
5da74897ae | ||
![]() |
4b1009b34e | ||
![]() |
203a7ad073 |
151
.config/docker_example.yml
Normal file
151
.config/docker_example.yml
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
# Misskey configuration
|
||||||
|
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
|
||||||
|
# ┌─────┐
|
||||||
|
#───┘ URL └─────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
# Final accessible URL seen by a user.
|
||||||
|
url: https://example.tld/
|
||||||
|
|
||||||
|
# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
|
||||||
|
# URL SETTINGS AFTER THAT!
|
||||||
|
|
||||||
|
# ┌───────────────────────┐
|
||||||
|
#───┘ Port and TLS settings └───────────────────────────────────
|
||||||
|
|
||||||
|
#
|
||||||
|
# Misskey requires a reverse proxy to support HTTPS connections.
|
||||||
|
#
|
||||||
|
# +----- https://example.tld/ ------------+
|
||||||
|
# +------+ |+-------------+ +----------------+|
|
||||||
|
# | User | ---> || Proxy (443) | ---> | Misskey (3000) ||
|
||||||
|
# +------+ |+-------------+ +----------------+|
|
||||||
|
# +---------------------------------------+
|
||||||
|
#
|
||||||
|
# You need to set up a reverse proxy. (e.g. nginx)
|
||||||
|
# An encrypted connection with HTTPS is highly recommended
|
||||||
|
# because tokens may be transferred in GET requests.
|
||||||
|
|
||||||
|
# The port that your Misskey server should listen on.
|
||||||
|
port: 3000
|
||||||
|
|
||||||
|
# ┌──────────────────────────┐
|
||||||
|
#───┘ PostgreSQL configuration └────────────────────────────────
|
||||||
|
|
||||||
|
db:
|
||||||
|
host: db
|
||||||
|
port: 5432
|
||||||
|
|
||||||
|
# Database name
|
||||||
|
db: misskey
|
||||||
|
|
||||||
|
# Auth
|
||||||
|
user: example-misskey-user
|
||||||
|
pass: example-misskey-pass
|
||||||
|
|
||||||
|
# Whether disable Caching queries
|
||||||
|
#disableCache: true
|
||||||
|
|
||||||
|
# Extra Connection options
|
||||||
|
#extra:
|
||||||
|
# ssl: true
|
||||||
|
|
||||||
|
# ┌─────────────────────┐
|
||||||
|
#───┘ Redis configuration └─────────────────────────────────────
|
||||||
|
|
||||||
|
redis:
|
||||||
|
host: redis
|
||||||
|
port: 6379
|
||||||
|
#family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
||||||
|
#pass: example-pass
|
||||||
|
#prefix: example-prefix
|
||||||
|
#db: 1
|
||||||
|
|
||||||
|
# ┌─────────────────────────────┐
|
||||||
|
#───┘ Elasticsearch configuration └─────────────────────────────
|
||||||
|
|
||||||
|
#elasticsearch:
|
||||||
|
# host: localhost
|
||||||
|
# port: 9200
|
||||||
|
# ssl: false
|
||||||
|
# user:
|
||||||
|
# pass:
|
||||||
|
|
||||||
|
# ┌───────────────┐
|
||||||
|
#───┘ ID generation └───────────────────────────────────────────
|
||||||
|
|
||||||
|
# You can select the ID generation method.
|
||||||
|
# You don't usually need to change this setting, but you can
|
||||||
|
# change it according to your preferences.
|
||||||
|
|
||||||
|
# Available methods:
|
||||||
|
# aid ... Short, Millisecond accuracy
|
||||||
|
# meid ... Similar to ObjectID, Millisecond accuracy
|
||||||
|
# ulid ... Millisecond accuracy
|
||||||
|
# objectid ... This is left for backward compatibility
|
||||||
|
|
||||||
|
# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
|
||||||
|
# ID SETTINGS AFTER THAT!
|
||||||
|
|
||||||
|
id: 'aid'
|
||||||
|
|
||||||
|
# ┌─────────────────────┐
|
||||||
|
#───┘ Other configuration └─────────────────────────────────────
|
||||||
|
|
||||||
|
# Whether disable HSTS
|
||||||
|
#disableHsts: true
|
||||||
|
|
||||||
|
# Number of worker processes
|
||||||
|
#clusterLimit: 1
|
||||||
|
|
||||||
|
# Job concurrency per worker
|
||||||
|
# deliverJobConcurrency: 128
|
||||||
|
# inboxJobConcurrency: 16
|
||||||
|
|
||||||
|
# Job rate limiter
|
||||||
|
# deliverJobPerSec: 128
|
||||||
|
# inboxJobPerSec: 16
|
||||||
|
|
||||||
|
# Job attempts
|
||||||
|
# deliverJobMaxAttempts: 12
|
||||||
|
# inboxJobMaxAttempts: 8
|
||||||
|
|
||||||
|
# IP address family used for outgoing request (ipv4, ipv6 or dual)
|
||||||
|
#outgoingAddressFamily: ipv4
|
||||||
|
|
||||||
|
# Syslog option
|
||||||
|
#syslog:
|
||||||
|
# host: localhost
|
||||||
|
# port: 514
|
||||||
|
|
||||||
|
# Proxy for HTTP/HTTPS
|
||||||
|
#proxy: http://127.0.0.1:3128
|
||||||
|
|
||||||
|
proxyBypassHosts:
|
||||||
|
- api.deepl.com
|
||||||
|
- api-free.deepl.com
|
||||||
|
- www.recaptcha.net
|
||||||
|
- hcaptcha.com
|
||||||
|
- challenges.cloudflare.com
|
||||||
|
|
||||||
|
# Proxy for SMTP/SMTPS
|
||||||
|
#proxySmtp: http://127.0.0.1:3128 # use HTTP/1.1 CONNECT
|
||||||
|
#proxySmtp: socks4://127.0.0.1:1080 # use SOCKS4
|
||||||
|
#proxySmtp: socks5://127.0.0.1:1080 # use SOCKS5
|
||||||
|
|
||||||
|
# Media Proxy
|
||||||
|
#mediaProxy: https://example.com/proxy
|
||||||
|
|
||||||
|
# Proxy remote files (default: false)
|
||||||
|
#proxyRemoteFiles: true
|
||||||
|
|
||||||
|
# Sign to ActivityPub GET request (default: true)
|
||||||
|
signToActivityPubGet: true
|
||||||
|
|
||||||
|
#allowedPrivateNetworks: [
|
||||||
|
# '127.0.0.1/32'
|
||||||
|
#]
|
||||||
|
|
||||||
|
# Upload or download file size limits (bytes)
|
||||||
|
#maxFileSize: 262144000
|
10
.github/dependabot.yml
vendored
10
.github/dependabot.yml
vendored
@@ -5,6 +5,11 @@
|
|||||||
|
|
||||||
version: 2
|
version: 2
|
||||||
updates:
|
updates:
|
||||||
|
- package-ecosystem: github-actions
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 0
|
||||||
- package-ecosystem: npm
|
- package-ecosystem: npm
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
@@ -20,3 +25,8 @@ updates:
|
|||||||
schedule:
|
schedule:
|
||||||
interval: daily
|
interval: daily
|
||||||
open-pull-requests-limit: 0
|
open-pull-requests-limit: 0
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: "/packages/sw"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 0
|
||||||
|
4
.github/workflows/docker-develop.yml
vendored
4
.github/workflows/docker-develop.yml
vendored
@@ -10,10 +10,10 @@ jobs:
|
|||||||
push_to_registry:
|
push_to_registry:
|
||||||
name: Push Docker image to Docker Hub
|
name: Push Docker image to Docker Hub
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: github.repository == 'misskey-dev/misskey'
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repo
|
- name: Check out the repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3.3.0
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v3
|
uses: docker/metadata-action@v3
|
||||||
|
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repo
|
- name: Check out the repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3.3.0
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v3
|
uses: docker/metadata-action@v3
|
||||||
|
8
.github/workflows/lint.yml
vendored
8
.github/workflows/lint.yml
vendored
@@ -11,11 +11,11 @@ jobs:
|
|||||||
yarn_install:
|
yarn_install:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3.3.0
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
- uses: actions/setup-node@v3.2.0
|
- uses: actions/setup-node@v3.6.0
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
node-version: 18.x
|
||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
@@ -33,11 +33,11 @@ jobs:
|
|||||||
- frontend
|
- frontend
|
||||||
- sw
|
- sw
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3.3.0
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
- uses: actions/setup-node@v3.2.0
|
- uses: actions/setup-node@v3.6.0
|
||||||
with:
|
with:
|
||||||
node-version: 18.x
|
node-version: 18.x
|
||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
|
11
.github/workflows/pr-preview-deploy.yml
vendored
11
.github/workflows/pr-preview-deploy.yml
vendored
@@ -1,7 +1,5 @@
|
|||||||
# Run secret-dependent integration tests only after /deploy approval
|
# Run secret-dependent integration tests only after /deploy approval
|
||||||
on:
|
on:
|
||||||
pull_request:
|
|
||||||
types: [opened, reopened, synchronize]
|
|
||||||
repository_dispatch:
|
repository_dispatch:
|
||||||
types: [deploy-command]
|
types: [deploy-command]
|
||||||
|
|
||||||
@@ -12,11 +10,10 @@ jobs:
|
|||||||
deploy-preview-environment:
|
deploy-preview-environment:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if:
|
if:
|
||||||
github.event_name == 'repository_dispatch' &&
|
|
||||||
github.event.client_payload.slash_command.sha != '' &&
|
github.event.client_payload.slash_command.sha != '' &&
|
||||||
contains(github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.sha)
|
contains(github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.sha)
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6.3.3
|
||||||
id: check-id
|
id: check-id
|
||||||
env:
|
env:
|
||||||
number: ${{ github.event.client_payload.pull_request.number }}
|
number: ${{ github.event.client_payload.pull_request.number }}
|
||||||
@@ -40,7 +37,7 @@ jobs:
|
|||||||
|
|
||||||
return check[0].id;
|
return check[0].id;
|
||||||
|
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6.3.3
|
||||||
env:
|
env:
|
||||||
check_id: ${{ steps.check-id.outputs.result }}
|
check_id: ${{ steps.check-id.outputs.result }}
|
||||||
details_url: ${{ github.server_url }}/${{ github.repository }}/runs/${{ github.run_id }}
|
details_url: ${{ github.server_url }}/${{ github.repository }}/runs/${{ github.run_id }}
|
||||||
@@ -56,7 +53,7 @@ jobs:
|
|||||||
|
|
||||||
# Check out merge commit
|
# Check out merge commit
|
||||||
- name: Fork based /deploy checkout
|
- name: Fork based /deploy checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3.3.0
|
||||||
with:
|
with:
|
||||||
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge'
|
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge'
|
||||||
|
|
||||||
@@ -75,7 +72,7 @@ jobs:
|
|||||||
timeout: 15m
|
timeout: 15m
|
||||||
|
|
||||||
# Update check run called "integration-fork"
|
# Update check run called "integration-fork"
|
||||||
- uses: actions/github-script@v5
|
- uses: actions/github-script@v6.3.3
|
||||||
id: update-check-run
|
id: update-check-run
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
env:
|
env:
|
||||||
|
1
.github/workflows/pr-preview-destroy.yml
vendored
1
.github/workflows/pr-preview-destroy.yml
vendored
@@ -9,6 +9,7 @@ name: Destroy preview environment
|
|||||||
jobs:
|
jobs:
|
||||||
destroy-preview-environment:
|
destroy-preview-environment:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: github.repository == github.event.pull_request.head.repo.full_name
|
||||||
steps:
|
steps:
|
||||||
- name: Context
|
- name: Context
|
||||||
uses: okteto/context@latest
|
uses: okteto/context@latest
|
||||||
|
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
@@ -30,11 +30,11 @@ jobs:
|
|||||||
- 56312:6379
|
- 56312:6379
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3.3.0
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v3.2.0
|
uses: actions/setup-node@v3.6.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
@@ -77,7 +77,7 @@ jobs:
|
|||||||
- 56312:6379
|
- 56312:6379
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3.3.0
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
# https://github.com/cypress-io/cypress-docker-images/issues/150
|
# https://github.com/cypress-io/cypress-docker-images/issues/150
|
||||||
@@ -87,7 +87,7 @@ jobs:
|
|||||||
#- uses: browser-actions/setup-firefox@latest
|
#- uses: browser-actions/setup-firefox@latest
|
||||||
# if: ${{ matrix.browser == 'firefox' }}
|
# if: ${{ matrix.browser == 'firefox' }}
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v3.2.0
|
uses: actions/setup-node@v3.6.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -30,6 +30,7 @@ coverage
|
|||||||
# config
|
# config
|
||||||
/.config/*
|
/.config/*
|
||||||
!/.config/example.yml
|
!/.config/example.yml
|
||||||
|
!/.config/docker_example.yml
|
||||||
!/.config/docker_example.env
|
!/.config/docker_example.env
|
||||||
|
|
||||||
# misskey
|
# misskey
|
||||||
|
@@ -52,6 +52,7 @@ You should also include the user name that made the change.
|
|||||||
- 0.12.x未満のプラグインは読み込むことはできません
|
- 0.12.x未満のプラグインは読み込むことはできません
|
||||||
- iOS15以下のデバイスはサポートされなくなりました
|
- iOS15以下のデバイスはサポートされなくなりました
|
||||||
- Firefox110以下はサポートされなくなりました
|
- Firefox110以下はサポートされなくなりました
|
||||||
|
- 109でもContainerQueriesのフラグを有効にする事で問題なく使用できます
|
||||||
|
|
||||||
#### For app developers
|
#### For app developers
|
||||||
- API: metaのレスポンスに`emojis`プロパティが含まれなくなりました
|
- API: metaのレスポンスに`emojis`プロパティが含まれなくなりました
|
||||||
@@ -73,16 +74,21 @@ You should also include the user name that made the change.
|
|||||||
- Push notification of Antenna note @tamaina
|
- Push notification of Antenna note @tamaina
|
||||||
- AVIF support @tamaina
|
- AVIF support @tamaina
|
||||||
- Add Cloudflare Turnstile CAPTCHA support @CyberRex0
|
- Add Cloudflare Turnstile CAPTCHA support @CyberRex0
|
||||||
|
- レートリミットをユーザーごとに調整可能に @syuilo
|
||||||
- 非モデレーターでも、権限を持つロールをアサインされたユーザーはインスタンスの招待コードを発行できるように @syuilo
|
- 非モデレーターでも、権限を持つロールをアサインされたユーザーはインスタンスの招待コードを発行できるように @syuilo
|
||||||
- 非モデレーターでも、権限を持つロールをアサインされたユーザーはカスタム絵文字の追加、編集、削除を行えるように @syuilo
|
- 非モデレーターでも、権限を持つロールをアサインされたユーザーはカスタム絵文字の追加、編集、削除を行えるように @syuilo
|
||||||
|
- クリップおよびクリップ内のノートの作成可能数を設定可能に @syuilo
|
||||||
|
- ユーザーリストおよびユーザーリスト内のユーザーの作成可能数を設定可能に @syuilo
|
||||||
- ハードワードミュートの最大文字数を設定可能に @syuilo
|
- ハードワードミュートの最大文字数を設定可能に @syuilo
|
||||||
- Webhookの作成可能数を設定可能に @syuilo
|
- Webhookの作成可能数を設定可能に @syuilo
|
||||||
|
- ノートをピン留めできる数を設定可能に @syuilo
|
||||||
- Server: signToActivityPubGet is set to true by default @syuilo
|
- Server: signToActivityPubGet is set to true by default @syuilo
|
||||||
- Server: improve syslog performance @syuilo
|
- Server: improve syslog performance @syuilo
|
||||||
- Server: Use undici instead of node-fetch and got @tamaina
|
- Server: Use undici instead of node-fetch and got @tamaina
|
||||||
- Server: Judge instance block by endsWith @tamaina
|
- Server: Judge instance block by endsWith @tamaina
|
||||||
- Server: improve note scoring for featured notes @CyberRex0
|
- Server: improve note scoring for featured notes @CyberRex0
|
||||||
- Server: アンケート選択肢の文字数制限を緩和 @syuilo
|
- Server: アンケート選択肢の文字数制限を緩和 @syuilo
|
||||||
|
- Server: add rate limits for some endpoints @syuilo
|
||||||
- Server: improve stats api performance @syuilo
|
- Server: improve stats api performance @syuilo
|
||||||
- Server: improve nodeinfo performance @syuilo
|
- Server: improve nodeinfo performance @syuilo
|
||||||
- Server: delete outdated notifications regularly to improve db performance @syuilo
|
- Server: delete outdated notifications regularly to improve db performance @syuilo
|
||||||
@@ -94,6 +100,7 @@ You should also include the user name that made the change.
|
|||||||
- Client: Add link to user RSS feed in profile menu @ssmucny
|
- Client: Add link to user RSS feed in profile menu @ssmucny
|
||||||
- Client: Compress non-animated PNG files @saschanaz
|
- Client: Compress non-animated PNG files @saschanaz
|
||||||
- Client: YouTube window player @sim1222
|
- Client: YouTube window player @sim1222
|
||||||
|
- Client: show readable error when rate limit exceeded @syuilo
|
||||||
- Client: enhance dashboard of control panel @syuilo
|
- Client: enhance dashboard of control panel @syuilo
|
||||||
- Client: Vite is upgraded to v4 @syuilo, @tamaina
|
- Client: Vite is upgraded to v4 @syuilo, @tamaina
|
||||||
- Client: HMR is available while yarn dev @tamaina
|
- Client: HMR is available while yarn dev @tamaina
|
||||||
@@ -120,6 +127,7 @@ You should also include the user name that made the change.
|
|||||||
- Client: clicker game @syuilo
|
- Client: clicker game @syuilo
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
|
- Server: Fix @tensorflow/tfjs-core's MODULE_NOT_FOUND error @ikuradon
|
||||||
- Server: 引用内の文章がnyaizeされてしまう問題を修正 @kabo2468
|
- Server: 引用内の文章がnyaizeされてしまう問題を修正 @kabo2468
|
||||||
- Server: Bug fix for Pinned Users lookup on instance @squidicuzz
|
- Server: Bug fix for Pinned Users lookup on instance @squidicuzz
|
||||||
- Server: Fix peers API returning suspended instances @ineffyble
|
- Server: Fix peers API returning suspended instances @ineffyble
|
||||||
@@ -133,6 +141,7 @@ You should also include the user name that made the change.
|
|||||||
- Server: 非公開のクリップのURLでOGPレンダリングされる問題を修正 @syuilo
|
- Server: 非公開のクリップのURLでOGPレンダリングされる問題を修正 @syuilo
|
||||||
- Server: アンテナタイムライン(ストリーミング)が、フォローしていないユーザーの鍵投稿も拾ってしまう @syuilo
|
- Server: アンテナタイムライン(ストリーミング)が、フォローしていないユーザーの鍵投稿も拾ってしまう @syuilo
|
||||||
- Server: follow request list api pagination @sim1222
|
- Server: follow request list api pagination @sim1222
|
||||||
|
- Server: ドライブ容量超過時のエラーが適切にレスポンスされない問題を修正 @syuilo
|
||||||
- Client: パスワードマネージャーなどでユーザー名がオートコンプリートされない問題を修正 @massongit
|
- Client: パスワードマネージャーなどでユーザー名がオートコンプリートされない問題を修正 @massongit
|
||||||
- Client: 日付形式の文字列などがカスタム絵文字として表示されるのを修正 @syuilo
|
- Client: 日付形式の文字列などがカスタム絵文字として表示されるのを修正 @syuilo
|
||||||
- Client: case insensitive emoji search @saschanaz
|
- Client: case insensitive emoji search @saschanaz
|
||||||
|
2
COPYING
2
COPYING
@@ -1,5 +1,5 @@
|
|||||||
Unless otherwise stated this repository is
|
Unless otherwise stated this repository is
|
||||||
Copyright © 2014-2022 syuilo and contributers
|
Copyright © 2014-2023 syuilo and contributers
|
||||||
|
|
||||||
And is distributed under The GNU Affero General Public License Version 3, you should have received a copy of the license file as LICENSE.
|
And is distributed under The GNU Affero General Public License Version 3, you should have received a copy of the license file as LICENSE.
|
||||||
|
|
||||||
|
30
Dockerfile
30
Dockerfile
@@ -1,4 +1,6 @@
|
|||||||
FROM node:18.13.0-bullseye AS builder
|
ARG NODE_VERSION=18.13.0-bullseye
|
||||||
|
|
||||||
|
FROM node:${NODE_VERSION} AS builder
|
||||||
|
|
||||||
ARG NODE_ENV=production
|
ARG NODE_ENV=production
|
||||||
|
|
||||||
@@ -22,23 +24,29 @@ COPY . ./
|
|||||||
RUN git submodule update --init
|
RUN git submodule update --init
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
FROM node:18.13.0-bullseye-slim AS runner
|
FROM node:${NODE_VERSION}-slim AS runner
|
||||||
|
|
||||||
WORKDIR /misskey
|
ARG UID="991"
|
||||||
|
ARG GID="991"
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
ffmpeg tini \
|
ffmpeg tini \
|
||||||
&& apt-get -y clean \
|
&& apt-get -y clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& groupadd -g "${GID}" misskey \
|
||||||
|
&& useradd -l -u "${UID}" -g "${GID}" -m -d /misskey misskey
|
||||||
|
|
||||||
COPY --from=builder /misskey/.yarn/install-state.gz ./.yarn/install-state.gz
|
USER misskey
|
||||||
COPY --from=builder /misskey/node_modules ./node_modules
|
WORKDIR /misskey
|
||||||
COPY --from=builder /misskey/built ./built
|
|
||||||
COPY --from=builder /misskey/packages/backend/node_modules ./packages/backend/node_modules
|
COPY --chown=misskey:misskey --from=builder /misskey/.yarn/install-state.gz ./.yarn/install-state.gz
|
||||||
COPY --from=builder /misskey/packages/backend/built ./packages/backend/built
|
COPY --chown=misskey:misskey --from=builder /misskey/node_modules ./node_modules
|
||||||
COPY --from=builder /misskey/packages/frontend/node_modules ./packages/frontend/node_modules
|
COPY --chown=misskey:misskey --from=builder /misskey/built ./built
|
||||||
COPY . ./
|
COPY --chown=misskey:misskey --from=builder /misskey/packages/backend/node_modules ./packages/backend/node_modules
|
||||||
|
COPY --chown=misskey:misskey --from=builder /misskey/packages/backend/built ./packages/backend/built
|
||||||
|
COPY --chown=misskey:misskey --from=builder /misskey/packages/frontend/node_modules ./packages/frontend/node_modules
|
||||||
|
COPY --chown=misskey:misskey . ./
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENTRYPOINT ["/usr/bin/tini", "--"]
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
||||||
|
@@ -29,17 +29,17 @@ describe('After user signed in', () => {
|
|||||||
|
|
||||||
it('first widget should be removed', () => {
|
it('first widget should be removed', () => {
|
||||||
cy.get('.mk-widget-edit').click();
|
cy.get('.mk-widget-edit').click();
|
||||||
cy.get('.customize-container:first-child .remove._button').click();
|
cy.get('.data-cy-customize-container:first-child .data-cy-customize-container-remove._button').click();
|
||||||
cy.get('.customize-container').should('have.length', 2);
|
cy.get('.data-cy-customize-container').should('have.length', 2);
|
||||||
});
|
});
|
||||||
|
|
||||||
function buildWidgetTest(widgetName) {
|
function buildWidgetTest(widgetName) {
|
||||||
it(`${widgetName} widget should get added`, () => {
|
it(`${widgetName} widget should get added`, () => {
|
||||||
cy.get('.mk-widget-edit').click();
|
cy.get('.mk-widget-edit').click();
|
||||||
cy.get('.mk-widget-select select').select(widgetName, { force: true });
|
cy.get('.mk-widget-select select').select(widgetName, { force: true });
|
||||||
cy.get('.bg._modalBg.transparent').click({ multiple: true, force: true });
|
cy.get('.data-cy-bg._modalBg.data-cy-transparent').click({ multiple: true, force: true });
|
||||||
cy.get('.mk-widget-add').click({ force: true });
|
cy.get('.mk-widget-add').click({ force: true });
|
||||||
cy.get(`.mkw-${widgetName}`).should('exist');
|
cy.get(`.data-cy-mkw-${widgetName}`).should('exist');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -8,6 +8,11 @@ services:
|
|||||||
- db
|
- db
|
||||||
- redis
|
- redis
|
||||||
# - es
|
# - es
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
networks:
|
networks:
|
||||||
@@ -24,6 +29,10 @@ services:
|
|||||||
- internal_network
|
- internal_network
|
||||||
volumes:
|
volumes:
|
||||||
- ./redis:/data
|
- ./redis:/data
|
||||||
|
healthcheck:
|
||||||
|
test: "redis-cli ping"
|
||||||
|
interval: 5s
|
||||||
|
retries: 20
|
||||||
|
|
||||||
db:
|
db:
|
||||||
restart: always
|
restart: always
|
||||||
@@ -34,6 +43,10 @@ services:
|
|||||||
- .config/docker.env
|
- .config/docker.env
|
||||||
volumes:
|
volumes:
|
||||||
- ./db:/var/lib/postgresql/data
|
- ./db:/var/lib/postgresql/data
|
||||||
|
healthcheck:
|
||||||
|
test: "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"
|
||||||
|
interval: 5s
|
||||||
|
retries: 20
|
||||||
|
|
||||||
# es:
|
# es:
|
||||||
# restart: always
|
# restart: always
|
||||||
|
@@ -931,12 +931,21 @@ undefined: "Undefiniert"
|
|||||||
assign: "Zuweisen"
|
assign: "Zuweisen"
|
||||||
unassign: "Entfernen"
|
unassign: "Entfernen"
|
||||||
color: "Farbe"
|
color: "Farbe"
|
||||||
|
manageCustomEmojis: "Benutzerdefinierte Emojis verwalten"
|
||||||
|
youCannotCreateAnymore: "Du hast das Erstellungslimit erreicht."
|
||||||
_role:
|
_role:
|
||||||
new: "Rolle erstellen"
|
new: "Rolle erstellen"
|
||||||
edit: "Rolle bearbeiten"
|
edit: "Rolle bearbeiten"
|
||||||
name: "Rollenname"
|
name: "Rollenname"
|
||||||
description: "Rollenbeschreibung"
|
description: "Rollenbeschreibung"
|
||||||
permission: "Rollenberechtigungen"
|
permission: "Rollenberechtigungen"
|
||||||
|
descriptionOfPermission: "<b>Moderatoren</b> können grundlegende Verwaltungsaufgaben erledigen.\n<b>Administratoren</b> können alle Einstellungen der Instanz verwalten."
|
||||||
|
assignTarget: "Zuweisungsart"
|
||||||
|
descriptionOfAssignTarget: "<b>Manuell</b> bedeutet, dass die Liste der Benutzer einer Rolle manuell verwaltet wird.\n<b>Konditionell</b> bedeutet, dass die Liste der Benutzer einer Rolle durch eine Bedingung automatisch verwaltet wird."
|
||||||
|
manual: "Manuell"
|
||||||
|
conditional: "Konditional"
|
||||||
|
condition: "Bedingung"
|
||||||
|
isConditionalRole: "Dies ist eine konditionale Rolle."
|
||||||
isPublic: "Öffentliche Rolle"
|
isPublic: "Öffentliche Rolle"
|
||||||
descriptionOfIsPublic: "Ist dies aktiviert, so kann jeder die Liste der Benutzer, die dieser Rolle zugewiesen sind, einsehen. Zusätzlich wird diese Rolle im Profil zugewiesener Benutzer angezeigt."
|
descriptionOfIsPublic: "Ist dies aktiviert, so kann jeder die Liste der Benutzer, die dieser Rolle zugewiesen sind, einsehen. Zusätzlich wird diese Rolle im Profil zugewiesener Benutzer angezeigt."
|
||||||
options: "Optionen"
|
options: "Optionen"
|
||||||
@@ -949,8 +958,29 @@ _role:
|
|||||||
gtlAvailable: "Kann auf die globale Chronik zugreifen"
|
gtlAvailable: "Kann auf die globale Chronik zugreifen"
|
||||||
ltlAvailable: "Kann auf die lokale Chronik zugreifen"
|
ltlAvailable: "Kann auf die lokale Chronik zugreifen"
|
||||||
canPublicNote: "Kann öffentliche Notizen erstellen"
|
canPublicNote: "Kann öffentliche Notizen erstellen"
|
||||||
|
canInvite: "Einladungscodes für diese Instanz erstellen"
|
||||||
|
canManageCustomEmojis: "Benutzerdefinierte Emojis verwalten"
|
||||||
driveCapacity: "Drive-Kapazität"
|
driveCapacity: "Drive-Kapazität"
|
||||||
|
pinMax: "Maximale Anzahl an angehefteten Notizen"
|
||||||
antennaMax: "Maximale Anzahl an Antennen"
|
antennaMax: "Maximale Anzahl an Antennen"
|
||||||
|
wordMuteMax: "Maximale Zeichenlänge für Wortstummschaltungen"
|
||||||
|
webhookMax: "Maximale Anzahl an Webhooks"
|
||||||
|
clipMax: "Maximale Anzahl an Clips"
|
||||||
|
noteEachClipsMax: "Maximale Anzahl an Notizen innerhalb eines Clips"
|
||||||
|
userListMax: "Maximale Anzahl an Benutzern in einer Benutzerliste"
|
||||||
|
userEachUserListsMax: "Maximale Anzahl an Benutzerlisten"
|
||||||
|
_condition:
|
||||||
|
isLocal: "Lokaler Benutzer"
|
||||||
|
isRemote: "Benutzer fremder Instanz"
|
||||||
|
createdLessThan: "Kontoerstellung liegt weniger als X zurück"
|
||||||
|
createdMoreThan: "Kontoerstellung liegt mehr als X zurück"
|
||||||
|
followersLessThanOrEq: "Hat X oder weniger Follower"
|
||||||
|
followersMoreThanOrEq: "Hat X oder mehr Follower"
|
||||||
|
followingLessThanOrEq: "Folgt X oder weniger Benutzern"
|
||||||
|
followingMoreThanOrEq: "Folgt X oder mehr Benutzern"
|
||||||
|
and: "UND-Bedingung"
|
||||||
|
or: "ODER-Bedingung"
|
||||||
|
not: "NICHT-Bedingung"
|
||||||
_sensitiveMediaDetection:
|
_sensitiveMediaDetection:
|
||||||
description: "Ermöglicht eine Erleichterung der Servermoderation durch die automatische Erkennungen von NSFW-Medien unter Verwendung von Machine Learning. Hierdurch wird die Serverlast etwas erhöht."
|
description: "Ermöglicht eine Erleichterung der Servermoderation durch die automatische Erkennungen von NSFW-Medien unter Verwendung von Machine Learning. Hierdurch wird die Serverlast etwas erhöht."
|
||||||
sensitivity: "Erkennungssensitivität"
|
sensitivity: "Erkennungssensitivität"
|
||||||
|
@@ -931,12 +931,21 @@ undefined: "Undefined"
|
|||||||
assign: "Assign"
|
assign: "Assign"
|
||||||
unassign: "Unassign"
|
unassign: "Unassign"
|
||||||
color: "Color"
|
color: "Color"
|
||||||
|
manageCustomEmojis: "Manage Custom Emojis"
|
||||||
|
youCannotCreateAnymore: "You've hit the creation limit."
|
||||||
_role:
|
_role:
|
||||||
new: "New role"
|
new: "New role"
|
||||||
edit: "Edit role"
|
edit: "Edit role"
|
||||||
name: "Role name"
|
name: "Role name"
|
||||||
description: "Role description"
|
description: "Role description"
|
||||||
permission: "Role permissions"
|
permission: "Role permissions"
|
||||||
|
descriptionOfPermission: "<b>Moderators</b> can perform basic moderation operations.\n<b>Administrators</b> can change all settings of the instance."
|
||||||
|
assignTarget: "Assignment type"
|
||||||
|
descriptionOfAssignTarget: "<b>Manual</b> to manually change who is part of this role and who is not.\n<b>Conditional</b> to have users be automatically assigned and removed from this role based on a condition."
|
||||||
|
manual: "Manual"
|
||||||
|
conditional: "Conditional"
|
||||||
|
condition: "Condition"
|
||||||
|
isConditionalRole: "This is a conditional role."
|
||||||
isPublic: "Public role"
|
isPublic: "Public role"
|
||||||
descriptionOfIsPublic: "Anyone will be able to view a list of users assigned to this role. In addition, this role will be displayed in the profiles of assigned users."
|
descriptionOfIsPublic: "Anyone will be able to view a list of users assigned to this role. In addition, this role will be displayed in the profiles of assigned users."
|
||||||
options: "Role options"
|
options: "Role options"
|
||||||
@@ -949,8 +958,29 @@ _role:
|
|||||||
gtlAvailable: "Viewing the global timeline"
|
gtlAvailable: "Viewing the global timeline"
|
||||||
ltlAvailable: "Viewing the local timeline"
|
ltlAvailable: "Viewing the local timeline"
|
||||||
canPublicNote: "Can send public notes"
|
canPublicNote: "Can send public notes"
|
||||||
|
canInvite: "Create instance invite codes"
|
||||||
|
canManageCustomEmojis: "Manage Custom Emojis"
|
||||||
driveCapacity: "Drive capacity"
|
driveCapacity: "Drive capacity"
|
||||||
|
pinMax: "Maximum number of pinned notes"
|
||||||
antennaMax: "Maximum number of antennas"
|
antennaMax: "Maximum number of antennas"
|
||||||
|
wordMuteMax: "Maximum number of characters allowed in word mutes"
|
||||||
|
webhookMax: "Maximum number of Webhooks"
|
||||||
|
clipMax: "Maximum number of Clips"
|
||||||
|
noteEachClipsMax: "Maximum number of notes within a clip"
|
||||||
|
userListMax: "Maximum number of user lists"
|
||||||
|
userEachUserListsMax: "Maximum number of users within a user list"
|
||||||
|
_condition:
|
||||||
|
isLocal: "Local user"
|
||||||
|
isRemote: "Remote user"
|
||||||
|
createdLessThan: "Less than X has passed since account creation"
|
||||||
|
createdMoreThan: "More than X has passed since account creation"
|
||||||
|
followersLessThanOrEq: "Has X or fewer followers"
|
||||||
|
followersMoreThanOrEq: "Has X or more followers"
|
||||||
|
followingLessThanOrEq: "Follows X or fewer accounts"
|
||||||
|
followingMoreThanOrEq: "Follows X or more accounts"
|
||||||
|
and: "AND-Condition"
|
||||||
|
or: "OR-Condition"
|
||||||
|
not: "NOT-Condition"
|
||||||
_sensitiveMediaDetection:
|
_sensitiveMediaDetection:
|
||||||
description: "Reduces the effort of server moderation through automatically recognizing NSFW media via Machine Learning. This will slightly increase the load on the server."
|
description: "Reduces the effort of server moderation through automatically recognizing NSFW media via Machine Learning. This will slightly increase the load on the server."
|
||||||
sensitivity: "Detection sensitivity"
|
sensitivity: "Detection sensitivity"
|
||||||
|
@@ -924,7 +924,51 @@ neverShow: "Non mostrare più"
|
|||||||
remindMeLater: "Rimanda"
|
remindMeLater: "Rimanda"
|
||||||
didYouLikeMisskey: "Ti piace Misskey?"
|
didYouLikeMisskey: "Ti piace Misskey?"
|
||||||
pleaseDonate: "Misskey è il software libero utilizzato su {host}. Offrendo una donazione è più facile continuare a svilupparlo!"
|
pleaseDonate: "Misskey è il software libero utilizzato su {host}. Offrendo una donazione è più facile continuare a svilupparlo!"
|
||||||
|
roles: "Ruoli"
|
||||||
|
role: "Ruolo"
|
||||||
|
normalUser: "Profilo standard"
|
||||||
|
undefined: "Indefinito"
|
||||||
|
assign: "Assegna"
|
||||||
|
unassign: "Disassegna"
|
||||||
color: "Colore"
|
color: "Colore"
|
||||||
|
manageCustomEmojis: "Gestisci le emoji personalizzate"
|
||||||
|
_role:
|
||||||
|
new: "Nuovo ruolo"
|
||||||
|
edit: "Modifica ruolo"
|
||||||
|
name: "Nome del ruolo"
|
||||||
|
description: "Descrizione del ruolo"
|
||||||
|
permission: "Permessi del ruolo"
|
||||||
|
descriptionOfPermission: "<b>Moderatori</b> possono svolgere le attività di moderazione basilari.\n<b>Amministratori</b> possono modificare la configurazione dell'istanza."
|
||||||
|
assignTarget: "Assegna il target"
|
||||||
|
descriptionOfAssignTarget: "<b>Manuale</b> per assegnare manualmente questo ruolo ai profili.\n<b>Condizionale</b> per assegnare o rimuovere automaticamente questo ruolo ai profili, secondo determinate condizioni."
|
||||||
|
manual: "Manuale"
|
||||||
|
conditional: "Condizionale"
|
||||||
|
condition: "Condizioni"
|
||||||
|
isConditionalRole: "Questo è un ruolo condizionato"
|
||||||
|
isPublic: "Ruolo pubblico"
|
||||||
|
descriptionOfIsPublic: "La lista di profili assegnati a questo ruolo è visibile a chiunque. Inoltre, il ruolo verrà mostrato nei relativi profili."
|
||||||
|
options: "Opzioni del ruolo"
|
||||||
|
baseRole: "Ruolo di base"
|
||||||
|
useBaseValue: "Eredita dal ruolo base"
|
||||||
|
chooseRoleToAssign: "Seleziona il ruolo da assegnare"
|
||||||
|
canEditMembersByModerator: "Consenti ai Moderatori di modificare i membri di questo ruolo"
|
||||||
|
descriptionOfCanEditMembersByModerator: "Se attivo, anche i Moderatori potranno assegnare o togliere questo ruolo. Altrimenti, se disattivo, potranno solo gli Amministratori."
|
||||||
|
_options:
|
||||||
|
gtlAvailable: "Disponibilità della Timeline Federata"
|
||||||
|
ltlAvailable: "Disponibilità della Timeline Locale"
|
||||||
|
canPublicNote: "Può scrivere Note con Visibilità Pubblica"
|
||||||
|
canInvite: "Genera codici di invito all'istanza"
|
||||||
|
canManageCustomEmojis: "Gestire le emoji personalizzate"
|
||||||
|
driveCapacity: "Capienza del Drive"
|
||||||
|
antennaMax: "Numero massimo di Antenne"
|
||||||
|
_condition:
|
||||||
|
isLocal: "Profilo locale"
|
||||||
|
isRemote: "Profilo remoto"
|
||||||
|
createdLessThan: "Creato meno di"
|
||||||
|
createdMoreThan: "Creato più di"
|
||||||
|
and: "E"
|
||||||
|
or: "O"
|
||||||
|
not: "NON"
|
||||||
_sensitiveMediaDetection:
|
_sensitiveMediaDetection:
|
||||||
description: "L'apprendimento automatico può essere utilizzato per individuare automaticamente i media sensibili da moderare. Il carico del server aumenta leggermente."
|
description: "L'apprendimento automatico può essere utilizzato per individuare automaticamente i media sensibili da moderare. Il carico del server aumenta leggermente."
|
||||||
sensitivity: "Sensibilità di rilevamento"
|
sensitivity: "Sensibilità di rilevamento"
|
||||||
|
@@ -932,6 +932,9 @@ assign: "アサイン"
|
|||||||
unassign: "アサインを解除"
|
unassign: "アサインを解除"
|
||||||
color: "色"
|
color: "色"
|
||||||
manageCustomEmojis: "カスタム絵文字の管理"
|
manageCustomEmojis: "カスタム絵文字の管理"
|
||||||
|
youCannotCreateAnymore: "これ以上作成することはできません。"
|
||||||
|
cannotPerformTemporary: "一時的に利用できません"
|
||||||
|
cannotPerformTemporaryDescription: "操作回数が制限を超過するため一時的に利用できません。しばらく時間を置いてから再度お試しください。"
|
||||||
|
|
||||||
_role:
|
_role:
|
||||||
new: "ロールの作成"
|
new: "ロールの作成"
|
||||||
@@ -949,11 +952,17 @@ _role:
|
|||||||
isPublic: "ロールを公開"
|
isPublic: "ロールを公開"
|
||||||
descriptionOfIsPublic: "ロールにアサインされたユーザーを誰でも見ることができます。また、ユーザーのプロフィールでこのロールが表示されます。"
|
descriptionOfIsPublic: "ロールにアサインされたユーザーを誰でも見ることができます。また、ユーザーのプロフィールでこのロールが表示されます。"
|
||||||
options: "オプション"
|
options: "オプション"
|
||||||
|
policies: "ポリシー"
|
||||||
baseRole: "ベースロール"
|
baseRole: "ベースロール"
|
||||||
useBaseValue: "ベースロールの値を使用"
|
useBaseValue: "ベースロールの値を使用"
|
||||||
chooseRoleToAssign: "アサインするロールを選択"
|
chooseRoleToAssign: "アサインするロールを選択"
|
||||||
canEditMembersByModerator: "モデレーターのメンバー編集を許可"
|
canEditMembersByModerator: "モデレーターのメンバー編集を許可"
|
||||||
descriptionOfCanEditMembersByModerator: "オンにすると、管理者に加えてモデレーターもこのロールへユーザーをアサイン/アサイン解除できるようになります。オフにすると管理者のみが行えます。"
|
descriptionOfCanEditMembersByModerator: "オンにすると、管理者に加えてモデレーターもこのロールへユーザーをアサイン/アサイン解除できるようになります。オフにすると管理者のみが行えます。"
|
||||||
|
priority: "優先度"
|
||||||
|
_priority:
|
||||||
|
low: "低"
|
||||||
|
middle: "中"
|
||||||
|
high: "高"
|
||||||
_options:
|
_options:
|
||||||
gtlAvailable: "グローバルタイムラインの閲覧"
|
gtlAvailable: "グローバルタイムラインの閲覧"
|
||||||
ltlAvailable: "ローカルタイムラインの閲覧"
|
ltlAvailable: "ローカルタイムラインの閲覧"
|
||||||
@@ -961,9 +970,16 @@ _role:
|
|||||||
canInvite: "インスタンス招待コードの発行"
|
canInvite: "インスタンス招待コードの発行"
|
||||||
canManageCustomEmojis: "カスタム絵文字の管理"
|
canManageCustomEmojis: "カスタム絵文字の管理"
|
||||||
driveCapacity: "ドライブ容量"
|
driveCapacity: "ドライブ容量"
|
||||||
|
pinMax: "ノートのピン留めの最大数"
|
||||||
antennaMax: "アンテナの作成可能数"
|
antennaMax: "アンテナの作成可能数"
|
||||||
wordMuteMax: "ワードミュートの最大文字数"
|
wordMuteMax: "ワードミュートの最大文字数"
|
||||||
webhookMax: "Webhookの作成可能数"
|
webhookMax: "Webhookの作成可能数"
|
||||||
|
clipMax: "クリップの作成可能数"
|
||||||
|
noteEachClipsMax: "クリップ内のノートの最大数"
|
||||||
|
userListMax: "ユーザーリストの作成可能数"
|
||||||
|
userEachUserListsMax: "ユーザーリスト内のユーザーの最大数"
|
||||||
|
rateLimitFactor: "レートリミット"
|
||||||
|
descriptionOfRateLimitFactor: "小さいほど制限が緩和され、大きいほど制限が強化されます。"
|
||||||
_condition:
|
_condition:
|
||||||
isLocal: "ローカルユーザー"
|
isLocal: "ローカルユーザー"
|
||||||
isRemote: "リモートユーザー"
|
isRemote: "リモートユーザー"
|
||||||
|
@@ -907,7 +907,7 @@ subscribePushNotification: "푸시 알림 켜기"
|
|||||||
unsubscribePushNotification: "푸시 알림 끄기"
|
unsubscribePushNotification: "푸시 알림 끄기"
|
||||||
pushNotificationAlreadySubscribed: "푸시 알림이 이미 켜져 있습니다"
|
pushNotificationAlreadySubscribed: "푸시 알림이 이미 켜져 있습니다"
|
||||||
pushNotificationNotSupported: "브라우저나 인스턴스에서 푸시 알림이 지원되지 않습니다"
|
pushNotificationNotSupported: "브라우저나 인스턴스에서 푸시 알림이 지원되지 않습니다"
|
||||||
sendPushNotificationReadMessage: "푸시 알림이니 메시지를 읽으면 푸시 알림을 삭제합니다"
|
sendPushNotificationReadMessage: "푸시 알림이나 메시지를 읽은 뒤 푸시 알림을 삭제"
|
||||||
sendPushNotificationReadMessageCaption: "「{emptyPushNotificationMessage}」이라는 알림이 잠깐 표시됩니다. 기기의 전력 소비량이 증가할 수 있습니다."
|
sendPushNotificationReadMessageCaption: "「{emptyPushNotificationMessage}」이라는 알림이 잠깐 표시됩니다. 기기의 전력 소비량이 증가할 수 있습니다."
|
||||||
windowMaximize: "최대화"
|
windowMaximize: "최대화"
|
||||||
windowRestore: "복구"
|
windowRestore: "복구"
|
||||||
@@ -926,15 +926,26 @@ didYouLikeMisskey: "Misskey가 마음에 드시나요?"
|
|||||||
pleaseDonate: "{host}은(는) 무료 소프트웨어 Misskey를 사용합니다. 후원을 통해 저희의 개발이 이어질 수 있게 도와주세요!"
|
pleaseDonate: "{host}은(는) 무료 소프트웨어 Misskey를 사용합니다. 후원을 통해 저희의 개발이 이어질 수 있게 도와주세요!"
|
||||||
roles: "역할"
|
roles: "역할"
|
||||||
role: "역할"
|
role: "역할"
|
||||||
|
normalUser: "일반 사용자"
|
||||||
undefined: "정의되지 않음"
|
undefined: "정의되지 않음"
|
||||||
assign: "할당"
|
assign: "할당"
|
||||||
unassign: "할당 취소"
|
unassign: "할당 취소"
|
||||||
color: "색"
|
color: "색"
|
||||||
|
manageCustomEmojis: "커스텀 이모지 관리"
|
||||||
|
youCannotCreateAnymore: "더 이상 생성할 수 없습니다."
|
||||||
_role:
|
_role:
|
||||||
new: "새 역할 생성"
|
new: "새 역할 생성"
|
||||||
edit: "역할 수정"
|
edit: "역할 수정"
|
||||||
name: "역할 이름"
|
name: "역할 이름"
|
||||||
description: "역할 설명"
|
description: "역할 설명"
|
||||||
|
permission: "역할의 권한"
|
||||||
|
descriptionOfPermission: "<b>모더레이터</b>는 기본적인 중재와 관련된 작업을 수행할 수 있습니다.\n<b>관리자</b>는 인스턴스의 모든 설정을 변경할 수 있습니다."
|
||||||
|
assignTarget: "할당 대상"
|
||||||
|
descriptionOfAssignTarget: "<b>수동</b>을 선택하면 누가 이 역할에 포함되는지를 수동으로 관리할 수 있습니다.\n<b>조건부</b>를 선택하면 조건을 설정해 일치하는 사용자를 자동으로 포함되게 할 수 있습니다."
|
||||||
|
manual: "수동"
|
||||||
|
conditional: "조건부"
|
||||||
|
condition: "조건"
|
||||||
|
isConditionalRole: "조건부 역할입니다."
|
||||||
isPublic: "공개 역할"
|
isPublic: "공개 역할"
|
||||||
descriptionOfIsPublic: "역할에 할당된 사용자를 누구나 볼 수 있습니다. 또한 사용자 프로필에 이 역할이 표시됩니다."
|
descriptionOfIsPublic: "역할에 할당된 사용자를 누구나 볼 수 있습니다. 또한 사용자 프로필에 이 역할이 표시됩니다."
|
||||||
options: "옵션"
|
options: "옵션"
|
||||||
@@ -947,8 +958,29 @@ _role:
|
|||||||
gtlAvailable: "글로벌 타임라인 보이기"
|
gtlAvailable: "글로벌 타임라인 보이기"
|
||||||
ltlAvailable: "로컬 타임라인 보이기"
|
ltlAvailable: "로컬 타임라인 보이기"
|
||||||
canPublicNote: "공개 노트 허용"
|
canPublicNote: "공개 노트 허용"
|
||||||
|
canInvite: "인스턴스 초대 코드 발행"
|
||||||
|
canManageCustomEmojis: "커스텀 이모지 관리"
|
||||||
driveCapacity: "드라이브 용량"
|
driveCapacity: "드라이브 용량"
|
||||||
|
pinMax: "고정할 수 있는 노트 수"
|
||||||
antennaMax: "최대 안테나 생성 허용 수"
|
antennaMax: "최대 안테나 생성 허용 수"
|
||||||
|
wordMuteMax: "뮤트할 수 있는 단어의 수"
|
||||||
|
webhookMax: "생성할 수 있는 WebHook의 수"
|
||||||
|
clipMax: "생성할 수 있는 클립 수"
|
||||||
|
noteEachClipsMax: "각 클립에 추가할 수 있는 노트 수"
|
||||||
|
userListMax: "생성할 수 있는 리스트 수"
|
||||||
|
userEachUserListsMax: "리스트당 최대 사용자 수"
|
||||||
|
_condition:
|
||||||
|
isLocal: "로컬 사용자"
|
||||||
|
isRemote: "리모트 사용자"
|
||||||
|
createdLessThan: "다음 일수 이내에 가입한 유저"
|
||||||
|
createdMoreThan: "다음 일수 이상 활동한 유저"
|
||||||
|
followersLessThanOrEq: "팔로워 수가 다음 이하인 유저"
|
||||||
|
followersMoreThanOrEq: "팔로워 수가 다음 이상인 유저"
|
||||||
|
followingLessThanOrEq: "팔로잉 수가 다음 이하인 유저"
|
||||||
|
followingMoreThanOrEq: "팔로잉 수가 다음 이상인 유저"
|
||||||
|
and: "다음을 모두 만족"
|
||||||
|
or: "다음을 하나라도 만족"
|
||||||
|
not: "다음을 만족하지 않음"
|
||||||
_sensitiveMediaDetection:
|
_sensitiveMediaDetection:
|
||||||
description: "기계학습을 통해 자동으로 민감한 미디어를 탐지하여, 모더레이션에 참고할 수 있도록 합니다. 서버의 부하를 약간 증가시킵니다."
|
description: "기계학습을 통해 자동으로 민감한 미디어를 탐지하여, 모더레이션에 참고할 수 있도록 합니다. 서버의 부하를 약간 증가시킵니다."
|
||||||
sensitivity: "탐지 민감도"
|
sensitivity: "탐지 민감도"
|
||||||
@@ -1352,7 +1384,7 @@ _widgets:
|
|||||||
aiscript: "AiScript 콘솔"
|
aiscript: "AiScript 콘솔"
|
||||||
aiscriptApp: "AiScript 앱"
|
aiscriptApp: "AiScript 앱"
|
||||||
aichan: "아이"
|
aichan: "아이"
|
||||||
userList: "사용자 목록"
|
userList: "유저 리스트"
|
||||||
_userList:
|
_userList:
|
||||||
chooseList: "리스트 선택"
|
chooseList: "리스트 선택"
|
||||||
clicker: "클리커"
|
clicker: "클리커"
|
||||||
|
@@ -926,15 +926,25 @@ didYouLikeMisskey: "คุณเคยชอบ Misskey ไหม?"
|
|||||||
pleaseDonate: "{host} ใช้ซอฟต์แวร์ฟรี Misskey เราขอขอบคุณการบริจาคของคุณอย่างสูงเพื่อให้การพัฒนา Misskey สามารถดำเนินต่อไปได้นะ!"
|
pleaseDonate: "{host} ใช้ซอฟต์แวร์ฟรี Misskey เราขอขอบคุณการบริจาคของคุณอย่างสูงเพื่อให้การพัฒนา Misskey สามารถดำเนินต่อไปได้นะ!"
|
||||||
roles: "บทบาท"
|
roles: "บทบาท"
|
||||||
role: "บทบาท"
|
role: "บทบาท"
|
||||||
|
normalUser: "ผู้ใช้มาตรฐาน"
|
||||||
undefined: "ไม่ได้กำหนด"
|
undefined: "ไม่ได้กำหนด"
|
||||||
assign: "กำหนด"
|
assign: "กำหนด"
|
||||||
unassign: "ยังไม่มอบหมาย"
|
unassign: "ยังไม่มอบหมาย"
|
||||||
color: "สี"
|
color: "สี"
|
||||||
|
manageCustomEmojis: "จัดการอีโมจิแบบกำหนดเอง"
|
||||||
_role:
|
_role:
|
||||||
new: "บทบาทใหม่"
|
new: "บทบาทใหม่"
|
||||||
edit: "แก้ไขบทบาท"
|
edit: "แก้ไขบทบาท"
|
||||||
name: "ชื่อบทบาท"
|
name: "ชื่อบทบาท"
|
||||||
description: "คำอธิบายบทบาท"
|
description: "คำอธิบายบทบาท"
|
||||||
|
permission: "สิทธิ์ตามบทบาท"
|
||||||
|
descriptionOfPermission: "<b>ผู้ดูแลกลั่นกรองเนื้อหา</b> สามารถดำเนินการดูแลขั้นพื้นฐานได้นะ\n<b>ผู้ดูแลระบบ</b> สามารถเปลี่ยนการตั้งค่าทั้งหมดของอินสแตนซ์ได้นะ"
|
||||||
|
assignTarget: "กำหนดเป้าหมาย"
|
||||||
|
descriptionOfAssignTarget: "<b>แมนนวล</b> เพื่อเปลี่ยนผู้ที่เป็นส่วนหนึ่งของบทบาทนี้และใครที่ไม่ใช่ด้วยตนเอง\n<b>เงื่อนไข</b> เพื่อให้ผู้ใช้ได้รับการกำหนดและนำออกจากบทบาทนี้โดยอัตโนมัติตามเงื่อนไขชุดหนึ่ง"
|
||||||
|
manual: "ปรับเอง"
|
||||||
|
conditional: "มีเงื่อนไข"
|
||||||
|
condition: "เงื่อนไข"
|
||||||
|
isConditionalRole: "นี่คือบทบาทที่มีเงื่อนไข"
|
||||||
isPublic: "บทบาทสาธารณะ"
|
isPublic: "บทบาทสาธารณะ"
|
||||||
descriptionOfIsPublic: "ทุกคนสามารถดูได้ว่าผู้ใช้งานนั้นได้รับมอบหมายบทบาทด้วยหรือไม่ \n\nบทบาทจะแสดงในโปรไฟล์ของผู้ใช้ด้วย"
|
descriptionOfIsPublic: "ทุกคนสามารถดูได้ว่าผู้ใช้งานนั้นได้รับมอบหมายบทบาทด้วยหรือไม่ \n\nบทบาทจะแสดงในโปรไฟล์ของผู้ใช้ด้วย"
|
||||||
options: "ตัวเลือกบทบาท"
|
options: "ตัวเลือกบทบาท"
|
||||||
@@ -947,8 +957,22 @@ _role:
|
|||||||
gtlAvailable: "การดูไทม์ไลน์ทั่วโลก"
|
gtlAvailable: "การดูไทม์ไลน์ทั่วโลก"
|
||||||
ltlAvailable: "การดูไทม์ไลน์ในท้องถิ่น"
|
ltlAvailable: "การดูไทม์ไลน์ในท้องถิ่น"
|
||||||
canPublicNote: "สามารถส่งโน้ตสาธารณะ"
|
canPublicNote: "สามารถส่งโน้ตสาธารณะ"
|
||||||
|
canInvite: "สร้างรหัสเชิญอินสแตนซ์"
|
||||||
|
canManageCustomEmojis: "จัดการอีโมจิแบบกำหนดเอง"
|
||||||
driveCapacity: "ความจุของไดรฟ์"
|
driveCapacity: "ความจุของไดรฟ์"
|
||||||
antennaMax: "จำนวนสูงสุดของเสาอากาศ"
|
antennaMax: "จำนวนสูงสุดของเสาอากาศ"
|
||||||
|
_condition:
|
||||||
|
isLocal: "ผู้ใช้ภายใน"
|
||||||
|
isRemote: "ผู้ใช้ระยะไกล"
|
||||||
|
createdLessThan: "สร้างน้อยกว่า"
|
||||||
|
createdMoreThan: "สร้างมากกว่า"
|
||||||
|
followersLessThanOrEq: "จำนวนผู้ติดตามน้อยกว่าหรือเท่ากับ\n"
|
||||||
|
followersMoreThanOrEq: "จำนวนผู้ติดตามมากกว่าหรือเท่ากับ\n"
|
||||||
|
followingLessThanOrEq: "จำนวนบัญชีต่อไปนี้คือ น้อยกว่าหรือเท่ากับ"
|
||||||
|
followingMoreThanOrEq: "จำนวนบัญชีต่อไปนี้คือ มากกว่าหรือเท่ากับ"
|
||||||
|
and: "และ"
|
||||||
|
or: "หรือ"
|
||||||
|
not: "ไม่"
|
||||||
_sensitiveMediaDetection:
|
_sensitiveMediaDetection:
|
||||||
description: "ลดความพยายามในการดูแลเซิร์ฟเวอร์ผ่านการจดจำสื่อ NSFW โดยอัตโนมัติผ่านการเรียนรู้ของเครื่อง การทำสิ่งนี้อาจจะเพิ่มภาระบนเซิร์ฟเวอร์เล็กน้อย"
|
description: "ลดความพยายามในการดูแลเซิร์ฟเวอร์ผ่านการจดจำสื่อ NSFW โดยอัตโนมัติผ่านการเรียนรู้ของเครื่อง การทำสิ่งนี้อาจจะเพิ่มภาระบนเซิร์ฟเวอร์เล็กน้อย"
|
||||||
sensitivity: "การตรวจจับความไว"
|
sensitivity: "การตรวจจับความไว"
|
||||||
|
@@ -931,41 +931,56 @@ undefined: "未定义"
|
|||||||
assign: "分配"
|
assign: "分配"
|
||||||
unassign: "取消分配"
|
unassign: "取消分配"
|
||||||
color: "颜色"
|
color: "颜色"
|
||||||
|
manageCustomEmojis: "管理自定义表情符号"
|
||||||
|
youCannotCreateAnymore: "抱歉,您无法再创建更多了。"
|
||||||
_role:
|
_role:
|
||||||
new: "创建角色"
|
new: "创建角色"
|
||||||
edit: "编辑角色"
|
edit: "编辑角色"
|
||||||
name: "用户组名称"
|
name: "角色名称"
|
||||||
description: "用户组的描述"
|
description: "角色描述"
|
||||||
permission: "用户组的权限"
|
permission: "角色权限"
|
||||||
descriptionOfPermission: "<b>监察员</b>可以执行基本的审核操作。\n<b>管理员</b>可以更改实例的所有设置。"
|
descriptionOfPermission: "<b>监察员</b>可以执行基本的审核操作。\n<b>管理员</b>可以更改实例的所有设置。"
|
||||||
assignTarget: "授权对象"
|
assignTarget: "授权对象"
|
||||||
descriptionOfAssignTarget: "<b>手动</b>指手动选择谁被包括在这个用户组中。\n<b>符合条件</b>指设置条件以自动包括符合条件的用户。"
|
descriptionOfAssignTarget: "<b>手动</b>指手动选择谁被包括在这个角色中。\n<b>符合条件</b>指设置条件以自动包括符合条件的用户。"
|
||||||
manual: "手动"
|
manual: "手动"
|
||||||
conditional: "符合条件"
|
conditional: "符合条件"
|
||||||
condition: "条件"
|
condition: "条件"
|
||||||
isConditionalRole: "这是一个条件控制的用户组。"
|
isConditionalRole: "这是一个条件控制的角色。"
|
||||||
isPublic: "公开用户组"
|
isPublic: "角色公开"
|
||||||
descriptionOfIsPublic: "任何人都可以看到分配该用户组的用户,用户的个人资料也将显示该用户组。"
|
descriptionOfIsPublic: "任何人都可以看到分配该角色的用户。而用户的个人资料也将显示该角色。"
|
||||||
options: "选项"
|
options: "选项"
|
||||||
baseRole: "基本角色"
|
baseRole: "基本角色"
|
||||||
useBaseValue: "使用基本角色的值"
|
useBaseValue: "使用基本角色的值"
|
||||||
chooseRoleToAssign: "选择要分配的角色"
|
chooseRoleToAssign: "选择要分配的角色"
|
||||||
canEditMembersByModerator: "允许版主编辑成员"
|
canEditMembersByModerator: "允许监察者编辑成员"
|
||||||
descriptionOfCanEditMembersByModerator: "如果选中,版主和管理员都能够为用户分配/取消分配角色。如果未选中,则只有管理员可以执行此操作。"
|
descriptionOfCanEditMembersByModerator: "如果选中,监察者和管理员都能够为用户分配/取消分配角色。如果未选中,则只有管理员可以执行此操作。"
|
||||||
_options:
|
_options:
|
||||||
gtlAvailable: "查看全局时间线"
|
gtlAvailable: "查看全局时间线"
|
||||||
ltlAvailable: "查看本地时间线"
|
ltlAvailable: "查看本地时间线"
|
||||||
canPublicNote: "允许公开发帖"
|
canPublicNote: "允许公开发帖"
|
||||||
|
canInvite: "发放实例邀请码"
|
||||||
|
canManageCustomEmojis: "管理自定义表情符号"
|
||||||
driveCapacity: "网盘容量"
|
driveCapacity: "网盘容量"
|
||||||
|
pinMax: "帖子置顶数量限制"
|
||||||
antennaMax: "可创建的最大天线数量"
|
antennaMax: "可创建的最大天线数量"
|
||||||
|
wordMuteMax: "屏蔽词的字数限制"
|
||||||
|
webhookMax: "Webhook 创建数量限制"
|
||||||
|
clipMax: "便签创建数量限制"
|
||||||
|
noteEachClipsMax: "单个便签内的贴文数量限制"
|
||||||
|
userListMax: "用户列表创建数量限制"
|
||||||
|
userEachUserListsMax: "单个用户列表内用户数量限制"
|
||||||
_condition:
|
_condition:
|
||||||
isLocal: "是本地用户"
|
isLocal: "是本地用户"
|
||||||
isRemote: "是远程用户"
|
isRemote: "是远程用户"
|
||||||
createdLessThan: "账户创建时间少于"
|
createdLessThan: "账户创建时间少于"
|
||||||
createdMoreThan: "账户创建时间超过"
|
createdMoreThan: "账户创建时间超过"
|
||||||
and: "全部符合"
|
followersLessThanOrEq: "关注者不多于"
|
||||||
or: "任一符合"
|
followersMoreThanOrEq: "关注者不少于"
|
||||||
not: "不符合"
|
followingLessThanOrEq: "关注中不多于"
|
||||||
|
followingMoreThanOrEq: "关注中不少于"
|
||||||
|
and: "符合以下全部条件"
|
||||||
|
or: "符合以下任一条件"
|
||||||
|
not: "不符合以下任何条件"
|
||||||
_sensitiveMediaDetection:
|
_sensitiveMediaDetection:
|
||||||
description: "可以使用机器学习技术自动检测敏感媒体,以便进行审核。服务器负载将略微增加。"
|
description: "可以使用机器学习技术自动检测敏感媒体,以便进行审核。服务器负载将略微增加。"
|
||||||
sensitivity: "检测敏感度"
|
sensitivity: "检测敏感度"
|
||||||
|
@@ -324,7 +324,7 @@ integration: "整合"
|
|||||||
connectService: "己連結"
|
connectService: "己連結"
|
||||||
disconnectService: "己斷開 "
|
disconnectService: "己斷開 "
|
||||||
enableLocalTimeline: "開啟本地時間軸"
|
enableLocalTimeline: "開啟本地時間軸"
|
||||||
enableGlobalTimeline: "啟用公開時間軸"
|
enableGlobalTimeline: "啟用全域時間軸"
|
||||||
disablingTimelinesInfo: "為了方便,即使您關閉了時間線功能,管理員和審核員仍可以繼續使用。"
|
disablingTimelinesInfo: "為了方便,即使您關閉了時間線功能,管理員和審核員仍可以繼續使用。"
|
||||||
registration: "註冊"
|
registration: "註冊"
|
||||||
enableRegistration: "開啟新使用者註冊"
|
enableRegistration: "開啟新使用者註冊"
|
||||||
@@ -388,7 +388,7 @@ aboutMisskey: "關於 Misskey"
|
|||||||
administrator: "管理員"
|
administrator: "管理員"
|
||||||
token: "權杖"
|
token: "權杖"
|
||||||
twoStepAuthentication: "兩階段驗證"
|
twoStepAuthentication: "兩階段驗證"
|
||||||
moderator: "審核員"
|
moderator: "監察員"
|
||||||
moderation: "言論調節"
|
moderation: "言論調節"
|
||||||
nUsersMentioned: "提到了{n}"
|
nUsersMentioned: "提到了{n}"
|
||||||
securityKey: "安全金鑰"
|
securityKey: "安全金鑰"
|
||||||
@@ -869,7 +869,7 @@ recommended: "推薦"
|
|||||||
check: "檢查"
|
check: "檢查"
|
||||||
driveCapOverrideLabel: "更改這個使用者的雲端硬碟容量上限"
|
driveCapOverrideLabel: "更改這個使用者的雲端硬碟容量上限"
|
||||||
driveCapOverrideCaption: "如果指定0以下的值,就會被取消。"
|
driveCapOverrideCaption: "如果指定0以下的值,就會被取消。"
|
||||||
requireAdminForView: "必須以管理者帳號登入才可以檢視。"
|
requireAdminForView: "必須以管理員帳號登入才可以檢視。"
|
||||||
isSystemAccount: "由系統自動建立與管理的帳號。"
|
isSystemAccount: "由系統自動建立與管理的帳號。"
|
||||||
typeToConfirm: "要執行這項操作,請輸入 {x} "
|
typeToConfirm: "要執行這項操作,請輸入 {x} "
|
||||||
deleteAccount: "刪除帳號"
|
deleteAccount: "刪除帳號"
|
||||||
@@ -931,29 +931,51 @@ undefined: "未定義"
|
|||||||
assign: "指派"
|
assign: "指派"
|
||||||
unassign: "取消指派"
|
unassign: "取消指派"
|
||||||
color: "顏色"
|
color: "顏色"
|
||||||
|
manageCustomEmojis: "管理自訂表情符號"
|
||||||
_role:
|
_role:
|
||||||
new: "建立角色"
|
new: "建立角色"
|
||||||
edit: "編輯角色"
|
edit: "編輯角色"
|
||||||
name: "角色名稱"
|
name: "角色名稱"
|
||||||
description: "角色描述 "
|
description: "角色描述 "
|
||||||
permission: "角色的權限"
|
permission: "角色的權限"
|
||||||
descriptionOfPermission: "<b>審核員</b>執行與審核相關的基本操作。\n<b>管理者</b>能變更實例的全部設定。"
|
descriptionOfPermission: "<b>審核員</b>執行與審核相關的基本操作。\n<b>管理員</b>能變更實例的全部設定。"
|
||||||
assignTarget: "指派目標"
|
assignTarget: "指派目標"
|
||||||
|
descriptionOfAssignTarget: "<b>手動</b>是以手動管理這個角色包含的人員。\n<b>符合條件</b>是設定條件以自動包含符合條件的使用者。"
|
||||||
manual: "手動"
|
manual: "手動"
|
||||||
|
conditional: "符合條件"
|
||||||
condition: "條件"
|
condition: "條件"
|
||||||
isConditionalRole: "這是條件角色。"
|
isConditionalRole: "這是條件角色。"
|
||||||
isPublic: "角色為公開"
|
isPublic: "角色為公開"
|
||||||
|
descriptionOfIsPublic: "任何人都可以看到被指派了角色的使用者。此外,使用者的個人檔案將顯示這個角色。"
|
||||||
options: "選項"
|
options: "選項"
|
||||||
baseRole: "基本角色"
|
baseRole: "基本角色"
|
||||||
useBaseValue: "使用基本角色的值"
|
useBaseValue: "使用基本角色的值"
|
||||||
chooseRoleToAssign: "選擇要指派的角色"
|
chooseRoleToAssign: "選擇要指派的角色"
|
||||||
|
canEditMembersByModerator: "允許編輯監察員的成員"
|
||||||
|
descriptionOfCanEditMembersByModerator: "如果開啟,管理員與監察員都可以為使用者指派/解除指派該角色。如果關閉,則只有管理員可以執行。"
|
||||||
_options:
|
_options:
|
||||||
|
gtlAvailable: "瀏覽全域時間軸"
|
||||||
|
ltlAvailable: "瀏覽本地時間軸"
|
||||||
|
canPublicNote: "允許公開貼文"
|
||||||
|
canInvite: "發行實例邀請碼"
|
||||||
|
canManageCustomEmojis: "管理自訂表情符號"
|
||||||
driveCapacity: "雲端硬碟容量"
|
driveCapacity: "雲端硬碟容量"
|
||||||
|
pinMax: "置頂貼文的最大數量"
|
||||||
|
antennaMax: "可建立的天線數量"
|
||||||
|
webhookMax: "可建立的Webhook數量"
|
||||||
|
clipMax: "可建立的摘錄數量"
|
||||||
_condition:
|
_condition:
|
||||||
isLocal: "本地使用者"
|
isLocal: "本地使用者"
|
||||||
isRemote: "遠端使用者"
|
isRemote: "遠端使用者"
|
||||||
createdLessThan: "自建立帳戶開始~以內"
|
createdLessThan: "自建立帳戶開始~以內"
|
||||||
createdMoreThan: "自建立帳戶開始~經過"
|
createdMoreThan: "自建立帳戶開始~經過"
|
||||||
|
followersLessThanOrEq: "追隨者人數在~以下"
|
||||||
|
followersMoreThanOrEq: "追隨者人數在~以上"
|
||||||
|
followingLessThanOrEq: "追隨人數在~以下"
|
||||||
|
followingMoreThanOrEq: "追隨人數在~以上"
|
||||||
|
and: "~和~"
|
||||||
|
or: "~或~"
|
||||||
|
not: "~否"
|
||||||
_sensitiveMediaDetection:
|
_sensitiveMediaDetection:
|
||||||
description: "您可以使用機器學習自動檢測敏感媒體並將其用於審核。 伺服器的負荷會稍微增加。"
|
description: "您可以使用機器學習自動檢測敏感媒體並將其用於審核。 伺服器的負荷會稍微增加。"
|
||||||
sensitivity: "檢測敏感度"
|
sensitivity: "檢測敏感度"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"version": "13.0.0-rc.1",
|
"version": "13.0.0-rc.9",
|
||||||
"codename": "indigo",
|
"codename": "indigo",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -53,12 +53,15 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/gulp": "4.0.10",
|
"@types/gulp": "4.0.10",
|
||||||
"@types/gulp-rename": "2.0.1",
|
"@types/gulp-rename": "2.0.1",
|
||||||
"@typescript-eslint/eslint-plugin": "5.48.0",
|
"@typescript-eslint/eslint-plugin": "5.48.1",
|
||||||
"@typescript-eslint/parser": "5.48.0",
|
"@typescript-eslint/parser": "5.48.1",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"cypress": "12.3.0",
|
"cypress": "12.3.0",
|
||||||
"eslint": "^8.31.0",
|
"eslint": "^8.31.0",
|
||||||
"start-server-and-test": "1.15.2",
|
"start-server-and-test": "1.15.2",
|
||||||
"typescript": "4.9.4"
|
"typescript": "4.9.4"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@tensorflow/tfjs-core": "^4.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
13
packages/backend/migration/1673783015567-Policies.js
Normal file
13
packages/backend/migration/1673783015567-Policies.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
export class Policies1673783015567 {
|
||||||
|
name = 'Policies1673783015567'
|
||||||
|
|
||||||
|
async up(queryRunner) {
|
||||||
|
await queryRunner.query(`ALTER TABLE "role" RENAME COLUMN "options" TO "policies"`);
|
||||||
|
await queryRunner.query(`ALTER TABLE "meta" RENAME COLUMN "defaultRoleOverride" TO "policies"`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async down(queryRunner) {
|
||||||
|
await queryRunner.query(`ALTER TABLE "meta" RENAME COLUMN "policies" TO "defaultRoleOverride"`);
|
||||||
|
await queryRunner.query(`ALTER TABLE "role" RENAME COLUMN "policies" TO "options"`);
|
||||||
|
}
|
||||||
|
}
|
@@ -21,17 +21,17 @@
|
|||||||
"@tensorflow/tfjs-node": "4.1.0"
|
"@tensorflow/tfjs-node": "4.1.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@bull-board/api": "^4.10.1",
|
"@bull-board/api": "^4.10.2",
|
||||||
"@bull-board/fastify": "^4.10.1",
|
"@bull-board/fastify": "^4.10.2",
|
||||||
"@bull-board/ui": "^4.10.1",
|
"@bull-board/ui": "^4.10.2",
|
||||||
"@discordapp/twemoji": "14.0.2",
|
"@discordapp/twemoji": "14.0.2",
|
||||||
"@fastify/accepts": "4.1.0",
|
"@fastify/accepts": "4.1.0",
|
||||||
"@fastify/cookie": "^8.3.0",
|
"@fastify/cookie": "^8.3.0",
|
||||||
"@fastify/cors": "8.2.0",
|
"@fastify/cors": "8.2.0",
|
||||||
"@fastify/http-proxy": "^8.4.0",
|
"@fastify/http-proxy": "^8.4.0",
|
||||||
"@fastify/multipart": "7.3.0",
|
"@fastify/multipart": "7.4.0",
|
||||||
"@fastify/static": "6.6.0",
|
"@fastify/static": "6.6.1",
|
||||||
"@fastify/view": "7.3.0",
|
"@fastify/view": "7.4.0",
|
||||||
"@nestjs/common": "9.2.1",
|
"@nestjs/common": "9.2.1",
|
||||||
"@nestjs/core": "9.2.1",
|
"@nestjs/core": "9.2.1",
|
||||||
"@nestjs/testing": "9.2.1",
|
"@nestjs/testing": "9.2.1",
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
"ajv": "8.12.0",
|
"ajv": "8.12.0",
|
||||||
"archiver": "5.3.1",
|
"archiver": "5.3.1",
|
||||||
"autwh": "0.1.0",
|
"autwh": "0.1.0",
|
||||||
"aws-sdk": "2.1289.0",
|
"aws-sdk": "2.1295.0",
|
||||||
"bcryptjs": "2.4.3",
|
"bcryptjs": "2.4.3",
|
||||||
"blurhash": "2.0.4",
|
"blurhash": "2.0.4",
|
||||||
"bull": "4.10.2",
|
"bull": "4.10.2",
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
"escape-regexp": "0.0.1",
|
"escape-regexp": "0.0.1",
|
||||||
"fastify": "4.11.0",
|
"fastify": "4.11.0",
|
||||||
"feed": "4.2.2",
|
"feed": "4.2.2",
|
||||||
"file-type": "18.0.0",
|
"file-type": "18.1.0",
|
||||||
"fluent-ffmpeg": "2.1.2",
|
"fluent-ffmpeg": "2.1.2",
|
||||||
"form-data": "^4.0.0",
|
"form-data": "^4.0.0",
|
||||||
"got": "12.5.3",
|
"got": "12.5.3",
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
"ip-cidr": "3.0.11",
|
"ip-cidr": "3.0.11",
|
||||||
"is-svg": "4.3.2",
|
"is-svg": "4.3.2",
|
||||||
"js-yaml": "4.1.0",
|
"js-yaml": "4.1.0",
|
||||||
"jsdom": "20.0.3",
|
"jsdom": "21.0.0",
|
||||||
"json5": "2.2.3",
|
"json5": "2.2.3",
|
||||||
"json5-loader": "4.0.1",
|
"json5-loader": "4.0.1",
|
||||||
"jsonld": "8.1.0",
|
"jsonld": "8.1.0",
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
"misskey-js": "0.0.14",
|
"misskey-js": "0.0.14",
|
||||||
"ms": "3.0.0-canary.1",
|
"ms": "3.0.0-canary.1",
|
||||||
"nested-property": "4.0.0",
|
"nested-property": "4.0.0",
|
||||||
"nodemailer": "6.8.0",
|
"nodemailer": "6.9.0",
|
||||||
"nsfwjs": "2.4.2",
|
"nsfwjs": "2.4.2",
|
||||||
"oauth": "^0.10.0",
|
"oauth": "^0.10.0",
|
||||||
"os-utils": "0.0.14",
|
"os-utils": "0.0.14",
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
"probe-image-size": "7.2.3",
|
"probe-image-size": "7.2.3",
|
||||||
"promise-limit": "2.7.0",
|
"promise-limit": "2.7.0",
|
||||||
"pug": "3.0.2",
|
"pug": "3.0.2",
|
||||||
"punycode": "2.1.1",
|
"punycode": "2.2.0",
|
||||||
"pureimage": "0.3.15",
|
"pureimage": "0.3.15",
|
||||||
"qrcode": "1.5.1",
|
"qrcode": "1.5.1",
|
||||||
"random-seed": "0.3.0",
|
"random-seed": "0.3.0",
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
"stringz": "2.1.0",
|
"stringz": "2.1.0",
|
||||||
"summaly": "2.7.0",
|
"summaly": "2.7.0",
|
||||||
"syslog-pro": "git+https://github.com/misskey-dev/SyslogPro#0.2.9-misskey.2",
|
"syslog-pro": "git+https://github.com/misskey-dev/SyslogPro#0.2.9-misskey.2",
|
||||||
"systeminformation": "5.17.1",
|
"systeminformation": "5.17.3",
|
||||||
"tinycolor2": "1.5.2",
|
"tinycolor2": "1.5.2",
|
||||||
"tmp": "0.2.1",
|
"tmp": "0.2.1",
|
||||||
"tsc-alias": "1.8.2",
|
"tsc-alias": "1.8.2",
|
||||||
@@ -117,18 +117,18 @@
|
|||||||
"twemoji-parser": "14.0.0",
|
"twemoji-parser": "14.0.0",
|
||||||
"typeorm": "0.3.11",
|
"typeorm": "0.3.11",
|
||||||
"ulid": "2.3.0",
|
"ulid": "2.3.0",
|
||||||
"undici": "^5.14.0",
|
"undici": "^5.15.0",
|
||||||
"unzipper": "0.10.11",
|
"unzipper": "0.10.11",
|
||||||
"uuid": "9.0.0",
|
"uuid": "9.0.0",
|
||||||
"vary": "1.1.2",
|
"vary": "1.1.2",
|
||||||
"web-push": "3.5.0",
|
"web-push": "3.5.0",
|
||||||
"websocket": "1.0.34",
|
"websocket": "1.0.34",
|
||||||
"ws": "8.11.0",
|
"ws": "8.12.0",
|
||||||
"xev": "3.0.2"
|
"xev": "3.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@redocly/openapi-core": "1.0.0-beta.117",
|
"@redocly/openapi-core": "1.0.0-beta.120",
|
||||||
"@swc/core": "1.3.25",
|
"@swc/core": "1.3.26",
|
||||||
"@swc/jest": "0.2.24",
|
"@swc/jest": "0.2.24",
|
||||||
"@types/accepts": "1.3.5",
|
"@types/accepts": "1.3.5",
|
||||||
"@types/archiver": "5.3.1",
|
"@types/archiver": "5.3.1",
|
||||||
@@ -172,11 +172,11 @@
|
|||||||
"@types/web-push": "3.3.2",
|
"@types/web-push": "3.3.2",
|
||||||
"@types/websocket": "1.0.5",
|
"@types/websocket": "1.0.5",
|
||||||
"@types/ws": "8.5.4",
|
"@types/ws": "8.5.4",
|
||||||
"@typescript-eslint/eslint-plugin": "5.48.0",
|
"@typescript-eslint/eslint-plugin": "5.48.1",
|
||||||
"@typescript-eslint/parser": "5.48.0",
|
"@typescript-eslint/parser": "5.48.1",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"eslint": "8.31.0",
|
"eslint": "8.31.0",
|
||||||
"eslint-plugin-import": "2.26.0",
|
"eslint-plugin-import": "2.27.4",
|
||||||
"execa": "6.1.0",
|
"execa": "6.1.0",
|
||||||
"jest": "29.3.1",
|
"jest": "29.3.1",
|
||||||
"jest-mock": "^29.3.1",
|
"jest-mock": "^29.3.1",
|
||||||
|
@@ -479,8 +479,8 @@ export class DriveService {
|
|||||||
if (user && !isLink) {
|
if (user && !isLink) {
|
||||||
const usage = await this.driveFileEntityService.calcDriveUsageOf(user);
|
const usage = await this.driveFileEntityService.calcDriveUsageOf(user);
|
||||||
|
|
||||||
const role = await this.roleService.getUserRoleOptions(user.id);
|
const policies = await this.roleService.getUserPolicies(user.id);
|
||||||
const driveCapacity = 1024 * 1024 * role.driveCapacityMb;
|
const driveCapacity = 1024 * 1024 * policies.driveCapacityMb;
|
||||||
this.registerLogger.debug('drive capacity override applied');
|
this.registerLogger.debug('drive capacity override applied');
|
||||||
this.registerLogger.debug(`overrideCap: ${driveCapacity}bytes, usage: ${usage}bytes, u+s: ${usage + info.size}bytes`);
|
this.registerLogger.debug(`overrideCap: ${driveCapacity}bytes, usage: ${usage}bytes, u+s: ${usage + info.size}bytes`);
|
||||||
|
|
||||||
|
@@ -226,7 +226,7 @@ export class NoteCreateService {
|
|||||||
if (data.channel != null) data.localOnly = true;
|
if (data.channel != null) data.localOnly = true;
|
||||||
|
|
||||||
if (data.visibility === 'public' && data.channel == null) {
|
if (data.visibility === 'public' && data.channel == null) {
|
||||||
if ((await this.roleService.getUserRoleOptions(user.id)).canPublicNote === false) {
|
if ((await this.roleService.getUserPolicies(user.id)).canPublicNote === false) {
|
||||||
data.visibility = 'home';
|
data.visibility = 'home';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -12,6 +12,7 @@ import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
|||||||
import { ApDeliverManagerService } from '@/core/activitypub/ApDeliverManagerService.js';
|
import { ApDeliverManagerService } from '@/core/activitypub/ApDeliverManagerService.js';
|
||||||
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
|
import { ApRendererService } from '@/core/activitypub/ApRendererService.js';
|
||||||
import { bindThis } from '@/decorators.js';
|
import { bindThis } from '@/decorators.js';
|
||||||
|
import { RoleService } from '@/core/RoleService.js';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class NotePiningService {
|
export class NotePiningService {
|
||||||
@@ -30,6 +31,7 @@ export class NotePiningService {
|
|||||||
|
|
||||||
private userEntityService: UserEntityService,
|
private userEntityService: UserEntityService,
|
||||||
private idService: IdService,
|
private idService: IdService,
|
||||||
|
private roleService: RoleService,
|
||||||
private relayService: RelayService,
|
private relayService: RelayService,
|
||||||
private apDeliverManagerService: ApDeliverManagerService,
|
private apDeliverManagerService: ApDeliverManagerService,
|
||||||
private apRendererService: ApRendererService,
|
private apRendererService: ApRendererService,
|
||||||
@@ -55,7 +57,7 @@ export class NotePiningService {
|
|||||||
|
|
||||||
const pinings = await this.userNotePiningsRepository.findBy({ userId: user.id });
|
const pinings = await this.userNotePiningsRepository.findBy({ userId: user.id });
|
||||||
|
|
||||||
if (pinings.length >= 5) {
|
if (pinings.length >= (await this.roleService.getUserPolicies(user.id)).pinLimit) {
|
||||||
throw new IdentifiableError('15a018eb-58e5-4da1-93be-330fcc5e4e1a', 'You can not pin notes any more.');
|
throw new IdentifiableError('15a018eb-58e5-4da1-93be-330fcc5e4e1a', 'You can not pin notes any more.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -8,33 +8,45 @@ import { DI } from '@/di-symbols.js';
|
|||||||
import { bindThis } from '@/decorators.js';
|
import { bindThis } from '@/decorators.js';
|
||||||
import { MetaService } from '@/core/MetaService.js';
|
import { MetaService } from '@/core/MetaService.js';
|
||||||
import { UserCacheService } from '@/core/UserCacheService.js';
|
import { UserCacheService } from '@/core/UserCacheService.js';
|
||||||
import { RoleCondFormulaValue } from '@/models/entities/Role.js';
|
import type { RoleCondFormulaValue } from '@/models/entities/Role.js';
|
||||||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||||
import { StreamMessages } from '@/server/api/stream/types.js';
|
import { StreamMessages } from '@/server/api/stream/types.js';
|
||||||
import type { OnApplicationShutdown } from '@nestjs/common';
|
import type { OnApplicationShutdown } from '@nestjs/common';
|
||||||
|
|
||||||
export type RoleOptions = {
|
export type RolePolicies = {
|
||||||
gtlAvailable: boolean;
|
gtlAvailable: boolean;
|
||||||
ltlAvailable: boolean;
|
ltlAvailable: boolean;
|
||||||
canPublicNote: boolean;
|
canPublicNote: boolean;
|
||||||
canInvite: boolean;
|
canInvite: boolean;
|
||||||
canManageCustomEmojis: boolean;
|
canManageCustomEmojis: boolean;
|
||||||
driveCapacityMb: number;
|
driveCapacityMb: number;
|
||||||
|
pinLimit: number;
|
||||||
antennaLimit: number;
|
antennaLimit: number;
|
||||||
wordMuteLimit: number;
|
wordMuteLimit: number;
|
||||||
webhookLimit: number;
|
webhookLimit: number;
|
||||||
|
clipLimit: number;
|
||||||
|
noteEachClipsLimit: number;
|
||||||
|
userListLimit: number;
|
||||||
|
userEachUserListsLimit: number;
|
||||||
|
rateLimitFactor: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DEFAULT_ROLE: RoleOptions = {
|
export const DEFAULT_POLICIES: RolePolicies = {
|
||||||
gtlAvailable: true,
|
gtlAvailable: true,
|
||||||
ltlAvailable: true,
|
ltlAvailable: true,
|
||||||
canPublicNote: true,
|
canPublicNote: true,
|
||||||
canInvite: false,
|
canInvite: false,
|
||||||
canManageCustomEmojis: false,
|
canManageCustomEmojis: false,
|
||||||
driveCapacityMb: 100,
|
driveCapacityMb: 100,
|
||||||
|
pinLimit: 5,
|
||||||
antennaLimit: 5,
|
antennaLimit: 5,
|
||||||
wordMuteLimit: 200,
|
wordMuteLimit: 200,
|
||||||
webhookLimit: 3,
|
webhookLimit: 3,
|
||||||
|
clipLimit: 10,
|
||||||
|
noteEachClipsLimit: 200,
|
||||||
|
userListLimit: 10,
|
||||||
|
userEachUserListsLimit: 50,
|
||||||
|
rateLimitFactor: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@@ -183,29 +195,44 @@ export class RoleService implements OnApplicationShutdown {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public async getUserRoleOptions(userId: User['id'] | null): Promise<RoleOptions> {
|
public async getUserPolicies(userId: User['id'] | null): Promise<RolePolicies> {
|
||||||
const meta = await this.metaService.fetch();
|
const meta = await this.metaService.fetch();
|
||||||
const baseRoleOptions = { ...DEFAULT_ROLE, ...meta.defaultRoleOverride };
|
const basePolicies = { ...DEFAULT_POLICIES, ...meta.policies };
|
||||||
|
|
||||||
if (userId == null) return baseRoleOptions;
|
if (userId == null) return basePolicies;
|
||||||
|
|
||||||
const roles = await this.getUserRoles(userId);
|
const roles = await this.getUserRoles(userId);
|
||||||
|
|
||||||
function getOptionValues(option: keyof RoleOptions) {
|
function calc<T extends keyof RolePolicies>(name: T, aggregate: (values: RolePolicies[T][]) => RolePolicies[T]) {
|
||||||
if (roles.length === 0) return [baseRoleOptions[option]];
|
if (roles.length === 0) return basePolicies[name];
|
||||||
return roles.map(role => (role.options[option] && (role.options[option].useDefault !== true)) ? role.options[option].value : baseRoleOptions[option]);
|
|
||||||
|
const policies = roles.map(role => role.policies[name] ?? { priority: 0, useDefault: true });
|
||||||
|
|
||||||
|
const p2 = policies.filter(policy => policy.priority === 2);
|
||||||
|
if (p2.length > 0) return aggregate(p2.map(policy => policy.useDefault ? basePolicies[name] : policy.value));
|
||||||
|
|
||||||
|
const p1 = policies.filter(policy => policy.priority === 1);
|
||||||
|
if (p1.length > 0) return aggregate(p2.map(policy => policy.useDefault ? basePolicies[name] : policy.value));
|
||||||
|
|
||||||
|
return aggregate(policies.map(policy => policy.useDefault ? basePolicies[name] : policy.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
gtlAvailable: getOptionValues('gtlAvailable').some(x => x === true),
|
gtlAvailable: calc('gtlAvailable', vs => vs.some(v => v === true)),
|
||||||
ltlAvailable: getOptionValues('ltlAvailable').some(x => x === true),
|
ltlAvailable: calc('ltlAvailable', vs => vs.some(v => v === true)),
|
||||||
canPublicNote: getOptionValues('canPublicNote').some(x => x === true),
|
canPublicNote: calc('canPublicNote', vs => vs.some(v => v === true)),
|
||||||
canInvite: getOptionValues('canInvite').some(x => x === true),
|
canInvite: calc('canInvite', vs => vs.some(v => v === true)),
|
||||||
canManageCustomEmojis: getOptionValues('canManageCustomEmojis').some(x => x === true),
|
canManageCustomEmojis: calc('canManageCustomEmojis', vs => vs.some(v => v === true)),
|
||||||
driveCapacityMb: Math.max(...getOptionValues('driveCapacityMb')),
|
driveCapacityMb: calc('driveCapacityMb', vs => Math.max(...vs)),
|
||||||
antennaLimit: Math.max(...getOptionValues('antennaLimit')),
|
pinLimit: calc('pinLimit', vs => Math.max(...vs)),
|
||||||
wordMuteLimit: Math.max(...getOptionValues('wordMuteLimit')),
|
antennaLimit: calc('antennaLimit', vs => Math.max(...vs)),
|
||||||
webhookLimit: Math.max(...getOptionValues('webhookLimit')),
|
wordMuteLimit: calc('wordMuteLimit', vs => Math.max(...vs)),
|
||||||
|
webhookLimit: calc('webhookLimit', vs => Math.max(...vs)),
|
||||||
|
clipLimit: calc('clipLimit', vs => Math.max(...vs)),
|
||||||
|
noteEachClipsLimit: calc('noteEachClipsLimit', vs => Math.max(...vs)),
|
||||||
|
userListLimit: calc('userListLimit', vs => Math.max(...vs)),
|
||||||
|
userEachUserListsLimit: calc('userEachUserListsLimit', vs => Math.max(...vs)),
|
||||||
|
rateLimitFactor: calc('rateLimitFactor', vs => Math.max(...vs)),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -10,6 +10,7 @@ import { DI } from '@/di-symbols.js';
|
|||||||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||||
import { ProxyAccountService } from '@/core/ProxyAccountService.js';
|
import { ProxyAccountService } from '@/core/ProxyAccountService.js';
|
||||||
import { bindThis } from '@/decorators.js';
|
import { bindThis } from '@/decorators.js';
|
||||||
|
import { RoleService } from '@/core/RoleService.js';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class UserListService {
|
export class UserListService {
|
||||||
@@ -23,13 +24,21 @@ export class UserListService {
|
|||||||
private userEntityService: UserEntityService,
|
private userEntityService: UserEntityService,
|
||||||
private idService: IdService,
|
private idService: IdService,
|
||||||
private userFollowingService: UserFollowingService,
|
private userFollowingService: UserFollowingService,
|
||||||
|
private roleService: RoleService,
|
||||||
private globalEventServie: GlobalEventService,
|
private globalEventServie: GlobalEventService,
|
||||||
private proxyAccountService: ProxyAccountService,
|
private proxyAccountService: ProxyAccountService,
|
||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public async push(target: User, list: UserList) {
|
public async push(target: User, list: UserList, me: User) {
|
||||||
|
const currentCount = await this.userListJoiningsRepository.countBy({
|
||||||
|
userListId: list.id,
|
||||||
|
});
|
||||||
|
if (currentCount > (await this.roleService.getUserPolicies(me.id)).userEachUserListsLimit) {
|
||||||
|
throw new Error('Too many users');
|
||||||
|
}
|
||||||
|
|
||||||
await this.userListJoiningsRepository.insert({
|
await this.userListJoiningsRepository.insert({
|
||||||
id: this.idService.genId(),
|
id: this.idService.genId(),
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
|
@@ -6,7 +6,7 @@ import type { Packed } from '@/misc/schema.js';
|
|||||||
import type { User } from '@/models/entities/User.js';
|
import type { User } from '@/models/entities/User.js';
|
||||||
import type { Role } from '@/models/entities/Role.js';
|
import type { Role } from '@/models/entities/Role.js';
|
||||||
import { bindThis } from '@/decorators.js';
|
import { bindThis } from '@/decorators.js';
|
||||||
import { DEFAULT_ROLE } from '@/core/RoleService.js';
|
import { DEFAULT_POLICIES } from '@/core/RoleService.js';
|
||||||
import { UserEntityService } from './UserEntityService.js';
|
import { UserEntityService } from './UserEntityService.js';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@@ -40,10 +40,11 @@ export class RoleEntityService {
|
|||||||
roleId: role.id,
|
roleId: role.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
const roleOptions = { ...role.options };
|
const policies = { ...role.policies };
|
||||||
for (const [k, v] of Object.entries(DEFAULT_ROLE)) {
|
for (const [k, v] of Object.entries(DEFAULT_POLICIES)) {
|
||||||
if (roleOptions[k] == null) roleOptions[k] = {
|
if (policies[k] == null) policies[k] = {
|
||||||
useDefault: true,
|
useDefault: true,
|
||||||
|
priority: 0,
|
||||||
value: v,
|
value: v,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -61,7 +62,7 @@ export class RoleEntityService {
|
|||||||
isAdministrator: role.isAdministrator,
|
isAdministrator: role.isAdministrator,
|
||||||
isModerator: role.isModerator,
|
isModerator: role.isModerator,
|
||||||
canEditMembersByModerator: role.canEditMembersByModerator,
|
canEditMembersByModerator: role.canEditMembersByModerator,
|
||||||
options: roleOptions,
|
policies: policies,
|
||||||
usersCount: assigns.length,
|
usersCount: assigns.length,
|
||||||
...(opts.detail ? {
|
...(opts.detail ? {
|
||||||
users: this.userEntityService.packMany(assigns.map(x => x.userId), me),
|
users: this.userEntityService.packMany(assigns.map(x => x.userId), me),
|
||||||
|
@@ -423,7 +423,7 @@ export class UserEntityService implements OnModuleInit {
|
|||||||
bannerUrl: user.banner ? this.driveFileEntityService.getPublicUrl(user.banner, false) : null,
|
bannerUrl: user.banner ? this.driveFileEntityService.getPublicUrl(user.banner, false) : null,
|
||||||
bannerBlurhash: user.banner?.blurhash ?? null,
|
bannerBlurhash: user.banner?.blurhash ?? null,
|
||||||
isLocked: user.isLocked,
|
isLocked: user.isLocked,
|
||||||
isSilenced: this.roleService.getUserRoleOptions(user.id).then(r => !r.canPublicNote),
|
isSilenced: this.roleService.getUserPolicies(user.id).then(r => !r.canPublicNote),
|
||||||
isSuspended: user.isSuspended ?? falsy,
|
isSuspended: user.isSuspended ?? falsy,
|
||||||
description: profile!.description,
|
description: profile!.description,
|
||||||
location: profile!.location,
|
location: profile!.location,
|
||||||
@@ -496,7 +496,7 @@ export class UserEntityService implements OnModuleInit {
|
|||||||
} : {}),
|
} : {}),
|
||||||
|
|
||||||
...(opts.includeSecrets ? {
|
...(opts.includeSecrets ? {
|
||||||
role: this.roleService.getUserRoleOptions(user.id),
|
policies: this.roleService.getUserPolicies(user.id),
|
||||||
email: profile!.email,
|
email: profile!.email,
|
||||||
emailVerified: profile!.emailVerified,
|
emailVerified: profile!.emailVerified,
|
||||||
securityKeysList: profile!.twoFactorEnabled
|
securityKeysList: profile!.twoFactorEnabled
|
||||||
|
@@ -458,5 +458,5 @@ export class Meta {
|
|||||||
@Column('jsonb', {
|
@Column('jsonb', {
|
||||||
default: { },
|
default: { },
|
||||||
})
|
})
|
||||||
public defaultRoleOverride: Record<string, any>;
|
public policies: Record<string, any>;
|
||||||
}
|
}
|
||||||
|
@@ -136,8 +136,9 @@ export class Role {
|
|||||||
@Column('jsonb', {
|
@Column('jsonb', {
|
||||||
default: { },
|
default: { },
|
||||||
})
|
})
|
||||||
public options: Record<string, {
|
public policies: Record<string, {
|
||||||
useDefault: boolean;
|
useDefault: boolean;
|
||||||
|
priority: number;
|
||||||
value: any;
|
value: any;
|
||||||
}>;
|
}>;
|
||||||
}
|
}
|
||||||
|
@@ -10,10 +10,10 @@ import { DownloadService } from '@/core/DownloadService.js';
|
|||||||
import { UserListService } from '@/core/UserListService.js';
|
import { UserListService } from '@/core/UserListService.js';
|
||||||
import { IdService } from '@/core/IdService.js';
|
import { IdService } from '@/core/IdService.js';
|
||||||
import { UtilityService } from '@/core/UtilityService.js';
|
import { UtilityService } from '@/core/UtilityService.js';
|
||||||
|
import { bindThis } from '@/decorators.js';
|
||||||
import { QueueLoggerService } from '../QueueLoggerService.js';
|
import { QueueLoggerService } from '../QueueLoggerService.js';
|
||||||
import type Bull from 'bull';
|
import type Bull from 'bull';
|
||||||
import type { DbUserImportJobData } from '../types.js';
|
import type { DbUserImportJobData } from '../types.js';
|
||||||
import { bindThis } from '@/decorators.js';
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ImportUserListsProcessorService {
|
export class ImportUserListsProcessorService {
|
||||||
@@ -102,7 +102,7 @@ export class ImportUserListsProcessorService {
|
|||||||
|
|
||||||
if (await this.userListJoiningsRepository.findOneBy({ userListId: list!.id, userId: target.id }) != null) continue;
|
if (await this.userListJoiningsRepository.findOneBy({ userListId: list!.id, userId: target.id }) != null) continue;
|
||||||
|
|
||||||
this.userListService.push(target, list!);
|
this.userListService.push(target, list!, user);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.logger.warn(`Error in line:${linenum} ${e}`);
|
this.logger.warn(`Error in line:${linenum} ${e}`);
|
||||||
}
|
}
|
||||||
|
@@ -10,7 +10,7 @@ import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
|||||||
import { bindThis } from '@/decorators.js';
|
import { bindThis } from '@/decorators.js';
|
||||||
import NotesChart from '@/core/chart/charts/notes.js';
|
import NotesChart from '@/core/chart/charts/notes.js';
|
||||||
import UsersChart from '@/core/chart/charts/users.js';
|
import UsersChart from '@/core/chart/charts/users.js';
|
||||||
import { DEFAULT_ROLE } from '@/core/RoleService.js';
|
import { DEFAULT_POLICIES } from '@/core/RoleService.js';
|
||||||
import type { FastifyInstance, FastifyPluginOptions } from 'fastify';
|
import type { FastifyInstance, FastifyPluginOptions } from 'fastify';
|
||||||
|
|
||||||
const nodeinfo2_1path = '/nodeinfo/2.1';
|
const nodeinfo2_1path = '/nodeinfo/2.1';
|
||||||
@@ -74,7 +74,7 @@ export class NodeinfoServerService {
|
|||||||
|
|
||||||
const proxyAccount = meta.proxyAccountId ? await this.userEntityService.pack(meta.proxyAccountId).catch(() => null) : null;
|
const proxyAccount = meta.proxyAccountId ? await this.userEntityService.pack(meta.proxyAccountId).catch(() => null) : null;
|
||||||
|
|
||||||
const baseRoleOptions = { ...DEFAULT_ROLE, ...meta.defaultRoleOverride };
|
const basePolicies = { ...DEFAULT_POLICIES, ...meta.policies };
|
||||||
|
|
||||||
return {
|
return {
|
||||||
software: {
|
software: {
|
||||||
@@ -105,8 +105,8 @@ export class NodeinfoServerService {
|
|||||||
repositoryUrl: meta.repositoryUrl,
|
repositoryUrl: meta.repositoryUrl,
|
||||||
feedbackUrl: meta.feedbackUrl,
|
feedbackUrl: meta.feedbackUrl,
|
||||||
disableRegistration: meta.disableRegistration,
|
disableRegistration: meta.disableRegistration,
|
||||||
disableLocalTimeline: !baseRoleOptions.ltlAvailable,
|
disableLocalTimeline: !basePolicies.ltlAvailable,
|
||||||
disableGlobalTimeline: !baseRoleOptions.gtlAvailable,
|
disableGlobalTimeline: !basePolicies.gtlAvailable,
|
||||||
emailRequiredForSignup: meta.emailRequiredForSignup,
|
emailRequiredForSignup: meta.emailRequiredForSignup,
|
||||||
enableHcaptcha: meta.enableHcaptcha,
|
enableHcaptcha: meta.enableHcaptcha,
|
||||||
enableRecaptcha: meta.enableRecaptcha,
|
enableRecaptcha: meta.enableRecaptcha,
|
||||||
|
@@ -224,8 +224,11 @@ export class ApiCallService implements OnApplicationShutdown {
|
|||||||
limit.key = ep.name;
|
limit.key = ep.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: 毎リクエスト計算するのもあれだしキャッシュしたい
|
||||||
|
const factor = user ? (await this.roleService.getUserPolicies(user.id)).rateLimitFactor : 1;
|
||||||
|
|
||||||
// Rate limit
|
// Rate limit
|
||||||
await this.rateLimiterService.limit(limit as IEndpointMeta['limit'] & { key: NonNullable<string> }, limitActor).catch(err => {
|
await this.rateLimiterService.limit(limit as IEndpointMeta['limit'] & { key: NonNullable<string> }, limitActor, factor).catch(err => {
|
||||||
throw new ApiError({
|
throw new ApiError({
|
||||||
message: 'Rate limit exceeded. Please try again later.',
|
message: 'Rate limit exceeded. Please try again later.',
|
||||||
code: 'RATE_LIMIT_EXCEEDED',
|
code: 'RATE_LIMIT_EXCEEDED',
|
||||||
@@ -271,9 +274,9 @@ export class ApiCallService implements OnApplicationShutdown {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ep.meta.requireRoleOption != null && !user!.isRoot) {
|
if (ep.meta.requireRolePolicy != null && !user!.isRoot) {
|
||||||
const myRole = await this.roleService.getUserRoleOptions(user!.id);
|
const policies = await this.roleService.getUserPolicies(user!.id);
|
||||||
if (!myRole[ep.meta.requireRoleOption]) {
|
if (!policies[ep.meta.requireRolePolicy]) {
|
||||||
throw new ApiError({
|
throw new ApiError({
|
||||||
message: 'You are not assigned to a required role.',
|
message: 'You are not assigned to a required role.',
|
||||||
code: 'ROLE_PERMISSION_DENIED',
|
code: 'ROLE_PERMISSION_DENIED',
|
||||||
|
@@ -65,7 +65,7 @@ import * as ep___admin_roles_show from './endpoints/admin/roles/show.js';
|
|||||||
import * as ep___admin_roles_update from './endpoints/admin/roles/update.js';
|
import * as ep___admin_roles_update from './endpoints/admin/roles/update.js';
|
||||||
import * as ep___admin_roles_assign from './endpoints/admin/roles/assign.js';
|
import * as ep___admin_roles_assign from './endpoints/admin/roles/assign.js';
|
||||||
import * as ep___admin_roles_unassign from './endpoints/admin/roles/unassign.js';
|
import * as ep___admin_roles_unassign from './endpoints/admin/roles/unassign.js';
|
||||||
import * as ep___admin_roles_updateDefaultRoleOverride from './endpoints/admin/roles/update-default-role-override.js';
|
import * as ep___admin_roles_updateDefaultPolicies from './endpoints/admin/roles/update-default-policies.js';
|
||||||
import * as ep___announcements from './endpoints/announcements.js';
|
import * as ep___announcements from './endpoints/announcements.js';
|
||||||
import * as ep___antennas_create from './endpoints/antennas/create.js';
|
import * as ep___antennas_create from './endpoints/antennas/create.js';
|
||||||
import * as ep___antennas_delete from './endpoints/antennas/delete.js';
|
import * as ep___antennas_delete from './endpoints/antennas/delete.js';
|
||||||
@@ -399,7 +399,7 @@ const $admin_roles_show: Provider = { provide: 'ep:admin/roles/show', useClass:
|
|||||||
const $admin_roles_update: Provider = { provide: 'ep:admin/roles/update', useClass: ep___admin_roles_update.default };
|
const $admin_roles_update: Provider = { provide: 'ep:admin/roles/update', useClass: ep___admin_roles_update.default };
|
||||||
const $admin_roles_assign: Provider = { provide: 'ep:admin/roles/assign', useClass: ep___admin_roles_assign.default };
|
const $admin_roles_assign: Provider = { provide: 'ep:admin/roles/assign', useClass: ep___admin_roles_assign.default };
|
||||||
const $admin_roles_unassign: Provider = { provide: 'ep:admin/roles/unassign', useClass: ep___admin_roles_unassign.default };
|
const $admin_roles_unassign: Provider = { provide: 'ep:admin/roles/unassign', useClass: ep___admin_roles_unassign.default };
|
||||||
const $admin_roles_updateDefaultRoleOverride: Provider = { provide: 'ep:admin/roles/update-default-role-override', useClass: ep___admin_roles_updateDefaultRoleOverride.default };
|
const $admin_roles_updateDefaultPolicies: Provider = { provide: 'ep:admin/roles/update-default-policies', useClass: ep___admin_roles_updateDefaultPolicies.default };
|
||||||
const $announcements: Provider = { provide: 'ep:announcements', useClass: ep___announcements.default };
|
const $announcements: Provider = { provide: 'ep:announcements', useClass: ep___announcements.default };
|
||||||
const $antennas_create: Provider = { provide: 'ep:antennas/create', useClass: ep___antennas_create.default };
|
const $antennas_create: Provider = { provide: 'ep:antennas/create', useClass: ep___antennas_create.default };
|
||||||
const $antennas_delete: Provider = { provide: 'ep:antennas/delete', useClass: ep___antennas_delete.default };
|
const $antennas_delete: Provider = { provide: 'ep:antennas/delete', useClass: ep___antennas_delete.default };
|
||||||
@@ -737,7 +737,7 @@ const $retention: Provider = { provide: 'ep:retention', useClass: ep___retention
|
|||||||
$admin_roles_update,
|
$admin_roles_update,
|
||||||
$admin_roles_assign,
|
$admin_roles_assign,
|
||||||
$admin_roles_unassign,
|
$admin_roles_unassign,
|
||||||
$admin_roles_updateDefaultRoleOverride,
|
$admin_roles_updateDefaultPolicies,
|
||||||
$announcements,
|
$announcements,
|
||||||
$antennas_create,
|
$antennas_create,
|
||||||
$antennas_delete,
|
$antennas_delete,
|
||||||
@@ -1069,7 +1069,7 @@ const $retention: Provider = { provide: 'ep:retention', useClass: ep___retention
|
|||||||
$admin_roles_update,
|
$admin_roles_update,
|
||||||
$admin_roles_assign,
|
$admin_roles_assign,
|
||||||
$admin_roles_unassign,
|
$admin_roles_unassign,
|
||||||
$admin_roles_updateDefaultRoleOverride,
|
$admin_roles_updateDefaultPolicies,
|
||||||
$announcements,
|
$announcements,
|
||||||
$antennas_create,
|
$antennas_create,
|
||||||
$antennas_delete,
|
$antennas_delete,
|
||||||
|
@@ -26,7 +26,7 @@ export class RateLimiterService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public limit(limitation: IEndpointMeta['limit'] & { key: NonNullable<string> }, actor: string) {
|
public limit(limitation: IEndpointMeta['limit'] & { key: NonNullable<string> }, actor: string, factor = 1) {
|
||||||
return new Promise<void>((ok, reject) => {
|
return new Promise<void>((ok, reject) => {
|
||||||
if (this.disabled) ok();
|
if (this.disabled) ok();
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ export class RateLimiterService {
|
|||||||
const min = (): void => {
|
const min = (): void => {
|
||||||
const minIntervalLimiter = new Limiter({
|
const minIntervalLimiter = new Limiter({
|
||||||
id: `${actor}:${limitation.key}:min`,
|
id: `${actor}:${limitation.key}:min`,
|
||||||
duration: limitation.minInterval,
|
duration: limitation.minInterval * factor,
|
||||||
max: 1,
|
max: 1,
|
||||||
db: this.redisClient,
|
db: this.redisClient,
|
||||||
});
|
});
|
||||||
@@ -62,8 +62,8 @@ export class RateLimiterService {
|
|||||||
const max = (): void => {
|
const max = (): void => {
|
||||||
const limiter = new Limiter({
|
const limiter = new Limiter({
|
||||||
id: `${actor}:${limitation.key}`,
|
id: `${actor}:${limitation.key}`,
|
||||||
duration: limitation.duration,
|
duration: limitation.duration * factor,
|
||||||
max: limitation.max,
|
max: limitation.max / factor,
|
||||||
db: this.redisClient,
|
db: this.redisClient,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -64,7 +64,7 @@ import * as ep___admin_roles_show from './endpoints/admin/roles/show.js';
|
|||||||
import * as ep___admin_roles_update from './endpoints/admin/roles/update.js';
|
import * as ep___admin_roles_update from './endpoints/admin/roles/update.js';
|
||||||
import * as ep___admin_roles_assign from './endpoints/admin/roles/assign.js';
|
import * as ep___admin_roles_assign from './endpoints/admin/roles/assign.js';
|
||||||
import * as ep___admin_roles_unassign from './endpoints/admin/roles/unassign.js';
|
import * as ep___admin_roles_unassign from './endpoints/admin/roles/unassign.js';
|
||||||
import * as ep___admin_roles_updateDefaultRoleOverride from './endpoints/admin/roles/update-default-role-override.js';
|
import * as ep___admin_roles_updateDefaultPolicies from './endpoints/admin/roles/update-default-policies.js';
|
||||||
import * as ep___announcements from './endpoints/announcements.js';
|
import * as ep___announcements from './endpoints/announcements.js';
|
||||||
import * as ep___antennas_create from './endpoints/antennas/create.js';
|
import * as ep___antennas_create from './endpoints/antennas/create.js';
|
||||||
import * as ep___antennas_delete from './endpoints/antennas/delete.js';
|
import * as ep___antennas_delete from './endpoints/antennas/delete.js';
|
||||||
@@ -396,7 +396,7 @@ const eps = [
|
|||||||
['admin/roles/update', ep___admin_roles_update],
|
['admin/roles/update', ep___admin_roles_update],
|
||||||
['admin/roles/assign', ep___admin_roles_assign],
|
['admin/roles/assign', ep___admin_roles_assign],
|
||||||
['admin/roles/unassign', ep___admin_roles_unassign],
|
['admin/roles/unassign', ep___admin_roles_unassign],
|
||||||
['admin/roles/update-default-role-override', ep___admin_roles_updateDefaultRoleOverride],
|
['admin/roles/update-default-policies', ep___admin_roles_updateDefaultPolicies],
|
||||||
['announcements', ep___announcements],
|
['announcements', ep___announcements],
|
||||||
['antennas/create', ep___antennas_create],
|
['antennas/create', ep___antennas_create],
|
||||||
['antennas/delete', ep___antennas_delete],
|
['antennas/delete', ep___antennas_delete],
|
||||||
@@ -695,7 +695,7 @@ export interface IEndpointMeta {
|
|||||||
*/
|
*/
|
||||||
readonly requireAdmin?: boolean;
|
readonly requireAdmin?: boolean;
|
||||||
|
|
||||||
readonly requireRoleOption?: string;
|
readonly requireRolePolicy?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* エンドポイントのリミテーションに関するやつ
|
* エンドポイントのリミテーションに関するやつ
|
||||||
|
@@ -8,7 +8,7 @@ export const meta = {
|
|||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
requireRoleOption: 'canManageCustomEmojis',
|
requireRolePolicy: 'canManageCustomEmojis',
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const paramDef = {
|
export const paramDef = {
|
||||||
|
@@ -14,7 +14,7 @@ export const meta = {
|
|||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
requireRoleOption: 'canManageCustomEmojis',
|
requireRolePolicy: 'canManageCustomEmojis',
|
||||||
|
|
||||||
errors: {
|
errors: {
|
||||||
noSuchFile: {
|
noSuchFile: {
|
||||||
|
@@ -14,7 +14,7 @@ export const meta = {
|
|||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
requireRoleOption: 'canManageCustomEmojis',
|
requireRolePolicy: 'canManageCustomEmojis',
|
||||||
|
|
||||||
errors: {
|
errors: {
|
||||||
noSuchEmoji: {
|
noSuchEmoji: {
|
||||||
|
@@ -9,7 +9,7 @@ export const meta = {
|
|||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
requireRoleOption: 'canManageCustomEmojis',
|
requireRolePolicy: 'canManageCustomEmojis',
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const paramDef = {
|
export const paramDef = {
|
||||||
|
@@ -10,7 +10,7 @@ export const meta = {
|
|||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
requireRoleOption: 'canManageCustomEmojis',
|
requireRolePolicy: 'canManageCustomEmojis',
|
||||||
|
|
||||||
errors: {
|
errors: {
|
||||||
noSuchEmoji: {
|
noSuchEmoji: {
|
||||||
|
@@ -5,7 +5,7 @@ import { QueueService } from '@/core/QueueService.js';
|
|||||||
export const meta = {
|
export const meta = {
|
||||||
secure: true,
|
secure: true,
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
requireRoleOption: 'canManageCustomEmojis',
|
requireRolePolicy: 'canManageCustomEmojis',
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const paramDef = {
|
export const paramDef = {
|
||||||
|
@@ -11,7 +11,7 @@ export const meta = {
|
|||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
requireRoleOption: 'canManageCustomEmojis',
|
requireRolePolicy: 'canManageCustomEmojis',
|
||||||
|
|
||||||
res: {
|
res: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
|
@@ -11,7 +11,7 @@ export const meta = {
|
|||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
requireRoleOption: 'canManageCustomEmojis',
|
requireRolePolicy: 'canManageCustomEmojis',
|
||||||
|
|
||||||
res: {
|
res: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
|
@@ -8,7 +8,7 @@ export const meta = {
|
|||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
requireRoleOption: 'canManageCustomEmojis',
|
requireRolePolicy: 'canManageCustomEmojis',
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const paramDef = {
|
export const paramDef = {
|
||||||
|
@@ -8,7 +8,7 @@ export const meta = {
|
|||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
requireRoleOption: 'canManageCustomEmojis',
|
requireRolePolicy: 'canManageCustomEmojis',
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const paramDef = {
|
export const paramDef = {
|
||||||
|
@@ -8,7 +8,7 @@ export const meta = {
|
|||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
requireRoleOption: 'canManageCustomEmojis',
|
requireRolePolicy: 'canManageCustomEmojis',
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const paramDef = {
|
export const paramDef = {
|
||||||
|
@@ -9,7 +9,7 @@ export const meta = {
|
|||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
requireRoleOption: 'canManageCustomEmojis',
|
requireRolePolicy: 'canManageCustomEmojis',
|
||||||
|
|
||||||
errors: {
|
errors: {
|
||||||
noSuchEmoji: {
|
noSuchEmoji: {
|
||||||
|
@@ -4,7 +4,7 @@ import { Endpoint } from '@/server/api/endpoint-base.js';
|
|||||||
import { MetaService } from '@/core/MetaService.js';
|
import { MetaService } from '@/core/MetaService.js';
|
||||||
import type { Config } from '@/config.js';
|
import type { Config } from '@/config.js';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
import { DEFAULT_ROLE } from '@/core/RoleService.js';
|
import { DEFAULT_POLICIES } from '@/core/RoleService.js';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['meta'],
|
tags: ['meta'],
|
||||||
@@ -440,7 +440,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
deeplIsPro: instance.deeplIsPro,
|
deeplIsPro: instance.deeplIsPro,
|
||||||
enableIpLogging: instance.enableIpLogging,
|
enableIpLogging: instance.enableIpLogging,
|
||||||
enableActiveEmailValidation: instance.enableActiveEmailValidation,
|
enableActiveEmailValidation: instance.enableActiveEmailValidation,
|
||||||
baseRole: { ...DEFAULT_ROLE, ...instance.defaultRoleOverride },
|
policies: { ...DEFAULT_POLICIES, ...instance.policies },
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -25,7 +25,7 @@ export const paramDef = {
|
|||||||
isModerator: { type: 'boolean' },
|
isModerator: { type: 'boolean' },
|
||||||
isAdministrator: { type: 'boolean' },
|
isAdministrator: { type: 'boolean' },
|
||||||
canEditMembersByModerator: { type: 'boolean' },
|
canEditMembersByModerator: { type: 'boolean' },
|
||||||
options: {
|
policies: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -39,7 +39,7 @@ export const paramDef = {
|
|||||||
'isModerator',
|
'isModerator',
|
||||||
'isAdministrator',
|
'isAdministrator',
|
||||||
'canEditMembersByModerator',
|
'canEditMembersByModerator',
|
||||||
'options',
|
'policies',
|
||||||
],
|
],
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
isAdministrator: ps.isAdministrator,
|
isAdministrator: ps.isAdministrator,
|
||||||
isModerator: ps.isModerator,
|
isModerator: ps.isModerator,
|
||||||
canEditMembersByModerator: ps.canEditMembersByModerator,
|
canEditMembersByModerator: ps.canEditMembersByModerator,
|
||||||
options: ps.options,
|
policies: ps.policies,
|
||||||
}).then(x => this.rolesRepository.findOneByOrFail(x.identifiers[0]));
|
}).then(x => this.rolesRepository.findOneByOrFail(x.identifiers[0]));
|
||||||
|
|
||||||
this.globalEventService.publishInternalEvent('roleCreated', created);
|
this.globalEventService.publishInternalEvent('roleCreated', created);
|
||||||
|
@@ -16,12 +16,12 @@ export const meta = {
|
|||||||
export const paramDef = {
|
export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
options: {
|
policies: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
required: [
|
required: [
|
||||||
'options',
|
'policies',
|
||||||
],
|
],
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
@@ -34,9 +34,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
) {
|
) {
|
||||||
super(meta, paramDef, async (ps) => {
|
super(meta, paramDef, async (ps) => {
|
||||||
await this.metaService.update({
|
await this.metaService.update({
|
||||||
defaultRoleOverride: ps.options,
|
policies: ps.policies,
|
||||||
});
|
});
|
||||||
this.globalEventService.publishInternalEvent('defaultRoleOverrideUpdated', ps.options);
|
this.globalEventService.publishInternalEvent('policiesUpdated', ps.policies);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -33,7 +33,7 @@ export const paramDef = {
|
|||||||
isModerator: { type: 'boolean' },
|
isModerator: { type: 'boolean' },
|
||||||
isAdministrator: { type: 'boolean' },
|
isAdministrator: { type: 'boolean' },
|
||||||
canEditMembersByModerator: { type: 'boolean' },
|
canEditMembersByModerator: { type: 'boolean' },
|
||||||
options: {
|
policies: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -48,7 +48,7 @@ export const paramDef = {
|
|||||||
'isModerator',
|
'isModerator',
|
||||||
'isAdministrator',
|
'isAdministrator',
|
||||||
'canEditMembersByModerator',
|
'canEditMembersByModerator',
|
||||||
'options',
|
'policies',
|
||||||
],
|
],
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
isModerator: ps.isModerator,
|
isModerator: ps.isModerator,
|
||||||
isAdministrator: ps.isAdministrator,
|
isAdministrator: ps.isAdministrator,
|
||||||
canEditMembersByModerator: ps.canEditMembersByModerator,
|
canEditMembersByModerator: ps.canEditMembersByModerator,
|
||||||
options: ps.options,
|
policies: ps.policies,
|
||||||
});
|
});
|
||||||
const updated = await this.rolesRepository.findOneByOrFail({ id: ps.roleId });
|
const updated = await this.rolesRepository.findOneByOrFail({ id: ps.roleId });
|
||||||
this.globalEventService.publishInternalEvent('roleUpdated', updated);
|
this.globalEventService.publishInternalEvent('roleUpdated', updated);
|
||||||
|
@@ -52,7 +52,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const isModerator = await this.roleService.isModerator(user);
|
const isModerator = await this.roleService.isModerator(user);
|
||||||
const isSilenced = !(await this.roleService.getUserRoleOptions(user.id)).canPublicNote;
|
const isSilenced = !(await this.roleService.getUserPolicies(user.id)).canPublicNote;
|
||||||
|
|
||||||
const _me = await this.usersRepository.findOneByOrFail({ id: me.id });
|
const _me = await this.usersRepository.findOneByOrFail({ id: me.id });
|
||||||
if (!await this.roleService.isAdministrator(_me) && await this.roleService.isAdministrator(user)) {
|
if (!await this.roleService.isAdministrator(_me) && await this.roleService.isAdministrator(user)) {
|
||||||
@@ -94,6 +94,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
lastActiveDate: user.lastActiveDate,
|
lastActiveDate: user.lastActiveDate,
|
||||||
moderationNote: profile.moderationNote,
|
moderationNote: profile.moderationNote,
|
||||||
signins,
|
signins,
|
||||||
|
policies: await this.roleService.getUserPolicies(user.id),
|
||||||
roles: await this.roleEntityService.packMany(roles, me, { detail: false }),
|
roles: await this.roleEntityService.packMany(roles, me, { detail: false }),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@@ -92,7 +92,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
const currentAntennasCount = await this.antennasRepository.countBy({
|
const currentAntennasCount = await this.antennasRepository.countBy({
|
||||||
userId: me.id,
|
userId: me.id,
|
||||||
});
|
});
|
||||||
if (currentAntennasCount > (await this.roleService.getUserRoleOptions(me.id)).antennaLimit) {
|
if (currentAntennasCount > (await this.roleService.getUserPolicies(me.id)).antennaLimit) {
|
||||||
throw new ApiError(meta.errors.tooManyAntennas);
|
throw new ApiError(meta.errors.tooManyAntennas);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -5,15 +5,15 @@ import type { UsersRepository, BlockingsRepository } from '@/models/index.js';
|
|||||||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||||
import { UserBlockingService } from '@/core/UserBlockingService.js';
|
import { UserBlockingService } from '@/core/UserBlockingService.js';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
import { ApiError } from '../../error.js';
|
|
||||||
import { GetterService } from '@/server/api/GetterService.js';
|
import { GetterService } from '@/server/api/GetterService.js';
|
||||||
|
import { ApiError } from '../../error.js';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['account'],
|
tags: ['account'],
|
||||||
|
|
||||||
limit: {
|
limit: {
|
||||||
duration: ms('1hour'),
|
duration: ms('1hour'),
|
||||||
max: 100,
|
max: 20,
|
||||||
},
|
},
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
|
import ms from 'ms';
|
||||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||||
import type { ChannelsRepository, DriveFilesRepository } from '@/models/index.js';
|
import type { ChannelsRepository, DriveFilesRepository } from '@/models/index.js';
|
||||||
import type { Channel } from '@/models/entities/Channel.js';
|
import type { Channel } from '@/models/entities/Channel.js';
|
||||||
@@ -14,6 +15,11 @@ export const meta = {
|
|||||||
|
|
||||||
kind: 'write:channels',
|
kind: 'write:channels',
|
||||||
|
|
||||||
|
limit: {
|
||||||
|
duration: ms('1hour'),
|
||||||
|
max: 10,
|
||||||
|
},
|
||||||
|
|
||||||
res: {
|
res: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
|
@@ -1,10 +1,12 @@
|
|||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
|
import ms from 'ms';
|
||||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||||
import { IdService } from '@/core/IdService.js';
|
import { IdService } from '@/core/IdService.js';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
import type { ClipNotesRepository, ClipsRepository } from '@/models/index.js';
|
import type { ClipNotesRepository, ClipsRepository } from '@/models/index.js';
|
||||||
import { ApiError } from '../../error.js';
|
|
||||||
import { GetterService } from '@/server/api/GetterService.js';
|
import { GetterService } from '@/server/api/GetterService.js';
|
||||||
|
import { RoleService } from '@/core/RoleService.js';
|
||||||
|
import { ApiError } from '../../error.js';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['account', 'notes', 'clips'],
|
tags: ['account', 'notes', 'clips'],
|
||||||
@@ -13,6 +15,11 @@ export const meta = {
|
|||||||
|
|
||||||
kind: 'write:account',
|
kind: 'write:account',
|
||||||
|
|
||||||
|
limit: {
|
||||||
|
duration: ms('1hour'),
|
||||||
|
max: 20,
|
||||||
|
},
|
||||||
|
|
||||||
errors: {
|
errors: {
|
||||||
noSuchClip: {
|
noSuchClip: {
|
||||||
message: 'No such clip.',
|
message: 'No such clip.',
|
||||||
@@ -31,6 +38,12 @@ export const meta = {
|
|||||||
code: 'ALREADY_CLIPPED',
|
code: 'ALREADY_CLIPPED',
|
||||||
id: '734806c4-542c-463a-9311-15c512803965',
|
id: '734806c4-542c-463a-9311-15c512803965',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
tooManyClipNotes: {
|
||||||
|
message: 'You cannot add notes to the clip any more.',
|
||||||
|
code: 'TOO_MANY_CLIP_NOTES',
|
||||||
|
id: 'f0dba960-ff73-4615-8df4-d6ac5d9dc118',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
@@ -54,6 +67,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
private clipNotesRepository: ClipNotesRepository,
|
private clipNotesRepository: ClipNotesRepository,
|
||||||
|
|
||||||
private idService: IdService,
|
private idService: IdService,
|
||||||
|
private roleService: RoleService,
|
||||||
private getterService: GetterService,
|
private getterService: GetterService,
|
||||||
) {
|
) {
|
||||||
super(meta, paramDef, async (ps, me) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
@@ -80,6 +94,13 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
throw new ApiError(meta.errors.alreadyClipped);
|
throw new ApiError(meta.errors.alreadyClipped);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const currentCount = await this.clipNotesRepository.countBy({
|
||||||
|
clipId: clip.id,
|
||||||
|
});
|
||||||
|
if (currentCount > (await this.roleService.getUserPolicies(me.id)).noteEachClipsLimit) {
|
||||||
|
throw new ApiError(meta.errors.tooManyClipNotes);
|
||||||
|
}
|
||||||
|
|
||||||
await this.clipNotesRepository.insert({
|
await this.clipNotesRepository.insert({
|
||||||
id: this.idService.genId(),
|
id: this.idService.genId(),
|
||||||
noteId: note.id,
|
noteId: note.id,
|
||||||
|
@@ -4,6 +4,8 @@ import { IdService } from '@/core/IdService.js';
|
|||||||
import type { ClipsRepository } from '@/models/index.js';
|
import type { ClipsRepository } from '@/models/index.js';
|
||||||
import { ClipEntityService } from '@/core/entities/ClipEntityService.js';
|
import { ClipEntityService } from '@/core/entities/ClipEntityService.js';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
|
import { RoleService } from '@/core/RoleService.js';
|
||||||
|
import { ApiError } from '@/server/api/error.js';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['clips'],
|
tags: ['clips'],
|
||||||
@@ -17,6 +19,14 @@ export const meta = {
|
|||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
ref: 'Clip',
|
ref: 'Clip',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
errors: {
|
||||||
|
tooManyClips: {
|
||||||
|
message: 'You cannot create clip any more.',
|
||||||
|
code: 'TOO_MANY_CLIPS',
|
||||||
|
id: '920f7c2d-6208-4b76-8082-e632020f5883',
|
||||||
|
},
|
||||||
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const paramDef = {
|
export const paramDef = {
|
||||||
@@ -37,9 +47,17 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
private clipsRepository: ClipsRepository,
|
private clipsRepository: ClipsRepository,
|
||||||
|
|
||||||
private clipEntityService: ClipEntityService,
|
private clipEntityService: ClipEntityService,
|
||||||
|
private roleService: RoleService,
|
||||||
private idService: IdService,
|
private idService: IdService,
|
||||||
) {
|
) {
|
||||||
super(meta, paramDef, async (ps, me) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
|
const currentCount = await this.clipsRepository.countBy({
|
||||||
|
userId: me.id,
|
||||||
|
});
|
||||||
|
if (currentCount > (await this.roleService.getUserPolicies(me.id)).clipLimit) {
|
||||||
|
throw new ApiError(meta.errors.tooManyClips);
|
||||||
|
}
|
||||||
|
|
||||||
const clip = await this.clipsRepository.insert({
|
const clip = await this.clipsRepository.insert({
|
||||||
id: this.idService.genId(),
|
id: this.idService.genId(),
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
|
@@ -47,10 +47,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
// Calculate drive usage
|
// Calculate drive usage
|
||||||
const usage = await this.driveFileEntityService.calcDriveUsageOf(me.id);
|
const usage = await this.driveFileEntityService.calcDriveUsageOf(me.id);
|
||||||
|
|
||||||
const myRole = await this.roleService.getUserRoleOptions(me.id);
|
const policies = await this.roleService.getUserPolicies(me.id);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
capacity: 1024 * 1024 * myRole.driveCapacityMb,
|
capacity: 1024 * 1024 * policies.driveCapacityMb,
|
||||||
usage: usage,
|
usage: usage,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@@ -90,7 +90,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const meta = await this.metaService.fetch();
|
const instance = await this.metaService.fetch();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Create file
|
// Create file
|
||||||
@@ -102,8 +102,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
folderId: ps.folderId,
|
folderId: ps.folderId,
|
||||||
force: ps.force,
|
force: ps.force,
|
||||||
sensitive: ps.isSensitive,
|
sensitive: ps.isSensitive,
|
||||||
requestIp: meta.enableIpLogging ? ip : null,
|
requestIp: instance.enableIpLogging ? ip : null,
|
||||||
requestHeaders: meta.enableIpLogging ? headers : null,
|
requestHeaders: instance.enableIpLogging ? headers : null,
|
||||||
});
|
});
|
||||||
return await this.driveFileEntityService.pack(driveFile, { self: true });
|
return await this.driveFileEntityService.pack(driveFile, { self: true });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@@ -116,7 +116,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
}
|
}
|
||||||
throw new ApiError();
|
throw new ApiError();
|
||||||
} finally {
|
} finally {
|
||||||
cleanup!();
|
cleanup!();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
|
import ms from 'ms';
|
||||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||||
import type { DriveFoldersRepository } from '@/models/index.js';
|
import type { DriveFoldersRepository } from '@/models/index.js';
|
||||||
import { IdService } from '@/core/IdService.js';
|
import { IdService } from '@/core/IdService.js';
|
||||||
@@ -14,6 +15,11 @@ export const meta = {
|
|||||||
|
|
||||||
kind: 'write:drive',
|
kind: 'write:drive',
|
||||||
|
|
||||||
|
limit: {
|
||||||
|
duration: ms('1hour'),
|
||||||
|
max: 10,
|
||||||
|
},
|
||||||
|
|
||||||
errors: {
|
errors: {
|
||||||
noSuchFolder: {
|
noSuchFolder: {
|
||||||
message: 'No such folder.',
|
message: 'No such folder.',
|
||||||
|
@@ -6,15 +6,15 @@ import { IdentifiableError } from '@/misc/identifiable-error.js';
|
|||||||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||||
import { UserFollowingService } from '@/core/UserFollowingService.js';
|
import { UserFollowingService } from '@/core/UserFollowingService.js';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
import { ApiError } from '../../error.js';
|
|
||||||
import { GetterService } from '@/server/api/GetterService.js';
|
import { GetterService } from '@/server/api/GetterService.js';
|
||||||
|
import { ApiError } from '../../error.js';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['following', 'users'],
|
tags: ['following', 'users'],
|
||||||
|
|
||||||
limit: {
|
limit: {
|
||||||
duration: ms('1hour'),
|
duration: ms('1hour'),
|
||||||
max: 100,
|
max: 50,
|
||||||
},
|
},
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
|
@@ -60,7 +60,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
private queryService: QueryService,
|
private queryService: QueryService,
|
||||||
) {
|
) {
|
||||||
super(meta, paramDef, async (ps, me) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
const query = this.queryService.makePaginationQuery(this.followRequestsRepository.createQueryBuilder('request'), ps.sinceId, ps.untilId);
|
const query = this.queryService.makePaginationQuery(this.followRequestsRepository.createQueryBuilder('request'), ps.sinceId, ps.untilId)
|
||||||
|
.andWhere('request.followeeId = :meId', { meId: me.id });
|
||||||
|
|
||||||
const requests = await query
|
const requests = await query
|
||||||
.take(ps.limit)
|
.take(ps.limit)
|
||||||
|
@@ -18,7 +18,7 @@ export const meta = {
|
|||||||
|
|
||||||
limit: {
|
limit: {
|
||||||
duration: ms('1hour'),
|
duration: ms('1hour'),
|
||||||
max: 300,
|
max: 20,
|
||||||
},
|
},
|
||||||
|
|
||||||
res: {
|
res: {
|
||||||
|
@@ -173,7 +173,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
if (ps.mutedWords !== undefined) {
|
if (ps.mutedWords !== undefined) {
|
||||||
// TODO: ちゃんと数える
|
// TODO: ちゃんと数える
|
||||||
const length = JSON.stringify(ps.mutedWords).length;
|
const length = JSON.stringify(ps.mutedWords).length;
|
||||||
if (length > (await this.roleService.getUserRoleOptions(user.id)).wordMuteLimit) {
|
if (length > (await this.roleService.getUserPolicies(user.id)).wordMuteLimit) {
|
||||||
throw new ApiError(meta.errors.tooManyMutedWords);
|
throw new ApiError(meta.errors.tooManyMutedWords);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -6,6 +6,7 @@ import { webhookEventTypes } from '@/models/entities/Webhook.js';
|
|||||||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
import { RoleService } from '@/core/RoleService.js';
|
import { RoleService } from '@/core/RoleService.js';
|
||||||
|
import { ApiError } from '@/server/api/error.js';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['webhooks'],
|
tags: ['webhooks'],
|
||||||
@@ -53,7 +54,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
const currentWebhooksCount = await this.webhooksRepository.countBy({
|
const currentWebhooksCount = await this.webhooksRepository.countBy({
|
||||||
userId: me.id,
|
userId: me.id,
|
||||||
});
|
});
|
||||||
if (currentWebhooksCount > (await this.roleService.getUserRoleOptions(me.id)).webhookLimit) {
|
if (currentWebhooksCount > (await this.roleService.getUserPolicies(me.id)).webhookLimit) {
|
||||||
throw new ApiError(meta.errors.tooManyWebhooks);
|
throw new ApiError(meta.errors.tooManyWebhooks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@ export const meta = {
|
|||||||
tags: ['meta'],
|
tags: ['meta'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
requireRoleOption: 'canInvite',
|
requireRolePolicy: 'canInvite',
|
||||||
|
|
||||||
res: {
|
res: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
|
import ms from 'ms';
|
||||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||||
import type { BlockingsRepository, UserGroupJoiningsRepository, DriveFilesRepository, UserGroupsRepository } from '@/models/index.js';
|
import type { BlockingsRepository, UserGroupJoiningsRepository, DriveFilesRepository, UserGroupsRepository } from '@/models/index.js';
|
||||||
import type { User } from '@/models/entities/User.js';
|
import type { User } from '@/models/entities/User.js';
|
||||||
@@ -15,6 +16,11 @@ export const meta = {
|
|||||||
|
|
||||||
kind: 'write:messaging',
|
kind: 'write:messaging',
|
||||||
|
|
||||||
|
limit: {
|
||||||
|
duration: ms('1hour'),
|
||||||
|
max: 120,
|
||||||
|
},
|
||||||
|
|
||||||
res: {
|
res: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
|
@@ -7,7 +7,7 @@ import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
|||||||
import { MetaService } from '@/core/MetaService.js';
|
import { MetaService } from '@/core/MetaService.js';
|
||||||
import type { Config } from '@/config.js';
|
import type { Config } from '@/config.js';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
import { DEFAULT_ROLE } from '@/core/RoleService.js';
|
import { DEFAULT_POLICIES } from '@/core/RoleService.js';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['meta'],
|
tags: ['meta'],
|
||||||
@@ -334,7 +334,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
|
|
||||||
translatorAvailable: instance.deeplAuthKey != null,
|
translatorAvailable: instance.deeplAuthKey != null,
|
||||||
|
|
||||||
baseRole: { ...DEFAULT_ROLE, ...instance.defaultRoleOverride },
|
policies: { ...DEFAULT_POLICIES, ...instance.policies },
|
||||||
|
|
||||||
...(ps.detail ? {
|
...(ps.detail ? {
|
||||||
pinnedPages: instance.pinnedPages,
|
pinnedPages: instance.pinnedPages,
|
||||||
|
@@ -1,12 +1,13 @@
|
|||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
|
import ms from 'ms';
|
||||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||||
import { IdService } from '@/core/IdService.js';
|
import { IdService } from '@/core/IdService.js';
|
||||||
import type { MutingsRepository } from '@/models/index.js';
|
import type { MutingsRepository } from '@/models/index.js';
|
||||||
import type { Muting } from '@/models/entities/Muting.js';
|
import type { Muting } from '@/models/entities/Muting.js';
|
||||||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
import { ApiError } from '../../error.js';
|
|
||||||
import { GetterService } from '@/server/api/GetterService.js';
|
import { GetterService } from '@/server/api/GetterService.js';
|
||||||
|
import { ApiError } from '../../error.js';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['account'],
|
tags: ['account'],
|
||||||
@@ -15,6 +16,11 @@ export const meta = {
|
|||||||
|
|
||||||
kind: 'write:mutes',
|
kind: 'write:mutes',
|
||||||
|
|
||||||
|
limit: {
|
||||||
|
duration: ms('1hour'),
|
||||||
|
max: 20,
|
||||||
|
},
|
||||||
|
|
||||||
errors: {
|
errors: {
|
||||||
noSuchUser: {
|
noSuchUser: {
|
||||||
message: 'No such user.',
|
message: 'No such user.',
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
|
import ms from 'ms';
|
||||||
import type { NoteFavoritesRepository } from '@/models/index.js';
|
import type { NoteFavoritesRepository } from '@/models/index.js';
|
||||||
import { IdService } from '@/core/IdService.js';
|
import { IdService } from '@/core/IdService.js';
|
||||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||||
@@ -13,6 +14,11 @@ export const meta = {
|
|||||||
|
|
||||||
kind: 'write:favorites',
|
kind: 'write:favorites',
|
||||||
|
|
||||||
|
limit: {
|
||||||
|
duration: ms('1hour'),
|
||||||
|
max: 20,
|
||||||
|
},
|
||||||
|
|
||||||
errors: {
|
errors: {
|
||||||
noSuchNote: {
|
noSuchNote: {
|
||||||
message: 'No such note.',
|
message: 'No such note.',
|
||||||
|
@@ -62,8 +62,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
private activeUsersChart: ActiveUsersChart,
|
private activeUsersChart: ActiveUsersChart,
|
||||||
) {
|
) {
|
||||||
super(meta, paramDef, async (ps, me) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
const role = await this.roleService.getUserRoleOptions(me ? me.id : null);
|
const policies = await this.roleService.getUserPolicies(me ? me.id : null);
|
||||||
if (!role.gtlAvailable) {
|
if (!policies.gtlAvailable) {
|
||||||
throw new ApiError(meta.errors.gtlDisabled);
|
throw new ApiError(meta.errors.gtlDisabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -71,8 +71,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
private activeUsersChart: ActiveUsersChart,
|
private activeUsersChart: ActiveUsersChart,
|
||||||
) {
|
) {
|
||||||
super(meta, paramDef, async (ps, me) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
const role = await this.roleService.getUserRoleOptions(me.id);
|
const policies = await this.roleService.getUserPolicies(me.id);
|
||||||
if (!role.ltlAvailable) {
|
if (!policies.ltlAvailable) {
|
||||||
throw new ApiError(meta.errors.stlDisabled);
|
throw new ApiError(meta.errors.stlDisabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -67,8 +67,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
private activeUsersChart: ActiveUsersChart,
|
private activeUsersChart: ActiveUsersChart,
|
||||||
) {
|
) {
|
||||||
super(meta, paramDef, async (ps, me) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
const role = await this.roleService.getUserRoleOptions(me ? me.id : null);
|
const policies = await this.roleService.getUserPolicies(me ? me.id : null);
|
||||||
if (!role.ltlAvailable) {
|
if (!policies.ltlAvailable) {
|
||||||
throw new ApiError(meta.errors.ltlDisabled);
|
throw new ApiError(meta.errors.ltlDisabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
|
import ms from 'ms';
|
||||||
import type { NotesRepository, NoteThreadMutingsRepository } from '@/models/index.js';
|
import type { NotesRepository, NoteThreadMutingsRepository } from '@/models/index.js';
|
||||||
import { IdService } from '@/core/IdService.js';
|
import { IdService } from '@/core/IdService.js';
|
||||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||||
@@ -14,6 +15,11 @@ export const meta = {
|
|||||||
|
|
||||||
kind: 'write:account',
|
kind: 'write:account',
|
||||||
|
|
||||||
|
limit: {
|
||||||
|
duration: ms('1hour'),
|
||||||
|
max: 10,
|
||||||
|
},
|
||||||
|
|
||||||
errors: {
|
errors: {
|
||||||
noSuchNote: {
|
noSuchNote: {
|
||||||
message: 'No such note.',
|
message: 'No such note.',
|
||||||
|
@@ -17,7 +17,7 @@ export const meta = {
|
|||||||
|
|
||||||
limit: {
|
limit: {
|
||||||
duration: ms('1hour'),
|
duration: ms('1hour'),
|
||||||
max: 300,
|
max: 10,
|
||||||
},
|
},
|
||||||
|
|
||||||
res: {
|
res: {
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
|
import ms from 'ms';
|
||||||
import type { UserGroupsRepository, UserGroupJoiningsRepository } from '@/models/index.js';
|
import type { UserGroupsRepository, UserGroupJoiningsRepository } from '@/models/index.js';
|
||||||
import { IdService } from '@/core/IdService.js';
|
import { IdService } from '@/core/IdService.js';
|
||||||
import type { UserGroup } from '@/models/entities/UserGroup.js';
|
import type { UserGroup } from '@/models/entities/UserGroup.js';
|
||||||
@@ -16,6 +17,11 @@ export const meta = {
|
|||||||
|
|
||||||
description: 'Create a new group.',
|
description: 'Create a new group.',
|
||||||
|
|
||||||
|
limit: {
|
||||||
|
duration: ms('1hour'),
|
||||||
|
max: 10,
|
||||||
|
},
|
||||||
|
|
||||||
res: {
|
res: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
|
@@ -5,6 +5,8 @@ import type { UserList } from '@/models/entities/UserList.js';
|
|||||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||||
import { UserListEntityService } from '@/core/entities/UserListEntityService.js';
|
import { UserListEntityService } from '@/core/entities/UserListEntityService.js';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
|
import { ApiError } from '@/server/api/error.js';
|
||||||
|
import { RoleService } from '@/core/RoleService.js';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['lists'],
|
tags: ['lists'],
|
||||||
@@ -20,6 +22,14 @@ export const meta = {
|
|||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
ref: 'UserList',
|
ref: 'UserList',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
errors: {
|
||||||
|
tooManyUserLists: {
|
||||||
|
message: 'You cannot create user list any more.',
|
||||||
|
code: 'TOO_MANY_USERLISTS',
|
||||||
|
id: '0cf21a28-7715-4f39-a20d-777bfdb8d138',
|
||||||
|
},
|
||||||
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const paramDef = {
|
export const paramDef = {
|
||||||
@@ -39,8 +49,16 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
|
|
||||||
private userListEntityService: UserListEntityService,
|
private userListEntityService: UserListEntityService,
|
||||||
private idService: IdService,
|
private idService: IdService,
|
||||||
|
private roleService: RoleService,
|
||||||
) {
|
) {
|
||||||
super(meta, paramDef, async (ps, me) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
|
const currentCount = await this.userListsRepository.countBy({
|
||||||
|
userId: me.id,
|
||||||
|
});
|
||||||
|
if (currentCount > (await this.roleService.getUserPolicies(me.id)).userListLimit) {
|
||||||
|
throw new ApiError(meta.errors.tooManyUserLists);
|
||||||
|
}
|
||||||
|
|
||||||
const userList = await this.userListsRepository.insert({
|
const userList = await this.userListsRepository.insert({
|
||||||
id: this.idService.genId(),
|
id: this.idService.genId(),
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
|
import ms from 'ms';
|
||||||
import type { UserListsRepository, UserListJoiningsRepository, BlockingsRepository } from '@/models/index.js';
|
import type { UserListsRepository, UserListJoiningsRepository, BlockingsRepository } from '@/models/index.js';
|
||||||
import { Endpoint } from '@/server/api/endpoint-base.js';
|
import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||||
import { GetterService } from '@/server/api/GetterService.js';
|
import { GetterService } from '@/server/api/GetterService.js';
|
||||||
@@ -15,6 +16,11 @@ export const meta = {
|
|||||||
|
|
||||||
description: 'Add a user to an existing list.',
|
description: 'Add a user to an existing list.',
|
||||||
|
|
||||||
|
limit: {
|
||||||
|
duration: ms('1hour'),
|
||||||
|
max: 30,
|
||||||
|
},
|
||||||
|
|
||||||
errors: {
|
errors: {
|
||||||
noSuchList: {
|
noSuchList: {
|
||||||
message: 'No such list.',
|
message: 'No such list.',
|
||||||
@@ -105,7 +111,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Push the user
|
// Push the user
|
||||||
await this.userListService.push(user, userList);
|
await this.userListService.push(user, userList, me);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -29,8 +29,8 @@ class GlobalTimelineChannel extends Channel {
|
|||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public async init(params: any) {
|
public async init(params: any) {
|
||||||
const role = await this.roleService.getUserRoleOptions(this.user ? this.user.id : null);
|
const policies = await this.roleService.getUserPolicies(this.user ? this.user.id : null);
|
||||||
if (!role.gtlAvailable) return;
|
if (!policies.gtlAvailable) return;
|
||||||
|
|
||||||
// Subscribe events
|
// Subscribe events
|
||||||
this.subscriber.on('notesStream', this.onNote);
|
this.subscriber.on('notesStream', this.onNote);
|
||||||
|
@@ -30,8 +30,8 @@ class HybridTimelineChannel extends Channel {
|
|||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public async init(params: any): Promise<void> {
|
public async init(params: any): Promise<void> {
|
||||||
const role = await this.roleService.getUserRoleOptions(this.user ? this.user.id : null);
|
const policies = await this.roleService.getUserPolicies(this.user ? this.user.id : null);
|
||||||
if (!role.ltlAvailable) return;
|
if (!policies.ltlAvailable) return;
|
||||||
|
|
||||||
// Subscribe events
|
// Subscribe events
|
||||||
this.subscriber.on('notesStream', this.onNote);
|
this.subscriber.on('notesStream', this.onNote);
|
||||||
|
@@ -28,8 +28,8 @@ class LocalTimelineChannel extends Channel {
|
|||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public async init(params: any) {
|
public async init(params: any) {
|
||||||
const role = await this.roleService.getUserRoleOptions(this.user ? this.user.id : null);
|
const policies = await this.roleService.getUserPolicies(this.user ? this.user.id : null);
|
||||||
if (!role.ltlAvailable) return;
|
if (!policies.ltlAvailable) return;
|
||||||
|
|
||||||
// Subscribe events
|
// Subscribe events
|
||||||
this.subscriber.on('notesStream', this.onNote);
|
this.subscriber.on('notesStream', this.onNote);
|
||||||
|
@@ -30,7 +30,7 @@ export interface InternalStreamTypes {
|
|||||||
remoteUserUpdated: Serialized<{ id: User['id']; }>;
|
remoteUserUpdated: Serialized<{ id: User['id']; }>;
|
||||||
follow: Serialized<{ followerId: User['id']; followeeId: User['id']; }>;
|
follow: Serialized<{ followerId: User['id']; followeeId: User['id']; }>;
|
||||||
unfollow: Serialized<{ followerId: User['id']; followeeId: User['id']; }>;
|
unfollow: Serialized<{ followerId: User['id']; followeeId: User['id']; }>;
|
||||||
defaultRoleOverrideUpdated: Serialized<Role['options']>;
|
policiesUpdated: Serialized<Role['options']>;
|
||||||
roleCreated: Serialized<Role>;
|
roleCreated: Serialized<Role>;
|
||||||
roleDeleted: Serialized<Role>;
|
roleDeleted: Serialized<Role>;
|
||||||
roleUpdated: Serialized<Role>;
|
roleUpdated: Serialized<Role>;
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
"autobind-decorator": "2.4.0",
|
"autobind-decorator": "2.4.0",
|
||||||
"autosize": "5.0.2",
|
"autosize": "5.0.2",
|
||||||
"blurhash": "2.0.4",
|
"blurhash": "2.0.4",
|
||||||
"broadcast-channel": "4.19.1",
|
"broadcast-channel": "4.20.1",
|
||||||
"browser-image-resizer": "git+https://github.com/misskey-dev/browser-image-resizer#v2.2.1-misskey.3",
|
"browser-image-resizer": "git+https://github.com/misskey-dev/browser-image-resizer#v2.2.1-misskey.3",
|
||||||
"canvas-confetti": "^1.6.0",
|
"canvas-confetti": "^1.6.0",
|
||||||
"chart.js": "4.1.2",
|
"chart.js": "4.1.2",
|
||||||
@@ -41,10 +41,10 @@
|
|||||||
"misskey-js": "0.0.14",
|
"misskey-js": "0.0.14",
|
||||||
"photoswipe": "5.3.4",
|
"photoswipe": "5.3.4",
|
||||||
"prismjs": "1.29.0",
|
"prismjs": "1.29.0",
|
||||||
"punycode": "2.1.1",
|
"punycode": "2.2.0",
|
||||||
"querystring": "0.2.1",
|
"querystring": "0.2.1",
|
||||||
"rndstr": "1.0.0",
|
"rndstr": "1.0.0",
|
||||||
"rollup": "3.9.1",
|
"rollup": "3.10.0",
|
||||||
"s-age": "1.1.2",
|
"s-age": "1.1.2",
|
||||||
"sanitize-html": "^2.8.1",
|
"sanitize-html": "^2.8.1",
|
||||||
"sass": "1.57.1",
|
"sass": "1.57.1",
|
||||||
@@ -73,6 +73,7 @@
|
|||||||
"@types/gulp": "4.0.10",
|
"@types/gulp": "4.0.10",
|
||||||
"@types/gulp-rename": "2.0.1",
|
"@types/gulp-rename": "2.0.1",
|
||||||
"@types/matter-js": "0.18.2",
|
"@types/matter-js": "0.18.2",
|
||||||
|
"@types/node": "^18.11.18",
|
||||||
"@types/punycode": "2.1.0",
|
"@types/punycode": "2.1.0",
|
||||||
"@types/sanitize-html": "^2.8.0",
|
"@types/sanitize-html": "^2.8.0",
|
||||||
"@types/seedrandom": "3.0.4",
|
"@types/seedrandom": "3.0.4",
|
||||||
@@ -81,16 +82,16 @@
|
|||||||
"@types/uuid": "9.0.0",
|
"@types/uuid": "9.0.0",
|
||||||
"@types/websocket": "1.0.5",
|
"@types/websocket": "1.0.5",
|
||||||
"@types/ws": "8.5.4",
|
"@types/ws": "8.5.4",
|
||||||
"@typescript-eslint/eslint-plugin": "5.48.0",
|
"@typescript-eslint/eslint-plugin": "5.48.1",
|
||||||
"@typescript-eslint/parser": "5.48.0",
|
"@typescript-eslint/parser": "5.48.1",
|
||||||
"@vue/runtime-core": "3.2.45",
|
"@vue/runtime-core": "3.2.45",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"cypress": "12.3.0",
|
"cypress": "12.3.0",
|
||||||
"eslint": "8.31.0",
|
"eslint": "8.31.0",
|
||||||
"eslint-plugin-import": "2.26.0",
|
"eslint-plugin-import": "2.27.4",
|
||||||
"eslint-plugin-vue": "9.8.0",
|
"eslint-plugin-vue": "9.9.0",
|
||||||
"start-server-and-test": "1.15.2",
|
"start-server-and-test": "1.15.2",
|
||||||
"vue-eslint-parser": "^9.1.0",
|
"vue-eslint-parser": "^9.1.0",
|
||||||
"vue-tsc": "^1.0.22"
|
"vue-tsc": "^1.0.24"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,34 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<div ref="rootEl" class="swhvrteh _popup _shadow" :style="{ zIndex }" @contextmenu.prevent="() => {}">
|
<div ref="rootEl" :class="$style.root" class="_popup _shadow" :style="{ zIndex }" @contextmenu.prevent="() => {}">
|
||||||
<ol v-if="type === 'user'" ref="suggests" class="users">
|
<ol v-if="type === 'user'" ref="suggests" :class="$style.list">
|
||||||
<li v-for="user in users" tabindex="-1" class="user" @click="complete(type, user)" @keydown="onKeydown">
|
<li v-for="user in users" tabindex="-1" :class="$style.item" @click="complete(type, user)" @keydown="onKeydown">
|
||||||
<img class="avatar" :src="user.avatarUrl"/>
|
<img :class="$style.avatar" :src="user.avatarUrl"/>
|
||||||
<span class="name">
|
<span :class="$style.userName">
|
||||||
<MkUserName :key="user.id" :user="user"/>
|
<MkUserName :key="user.id" :user="user"/>
|
||||||
</span>
|
</span>
|
||||||
<span class="username">@{{ acct(user) }}</span>
|
<span>@{{ acct(user) }}</span>
|
||||||
</li>
|
</li>
|
||||||
<li tabindex="-1" class="choose" @click="chooseUser()" @keydown="onKeydown">{{ i18n.ts.selectUser }}</li>
|
<li tabindex="-1" :class="$style.item" @click="chooseUser()" @keydown="onKeydown">{{ i18n.ts.selectUser }}</li>
|
||||||
</ol>
|
</ol>
|
||||||
<ol v-else-if="hashtags.length > 0" ref="suggests" class="hashtags">
|
<ol v-else-if="hashtags.length > 0" ref="suggests" :class="[$style.list, $style.hashtags]">
|
||||||
<li v-for="hashtag in hashtags" tabindex="-1" @click="complete(type, hashtag)" @keydown="onKeydown">
|
<li v-for="hashtag in hashtags" tabindex="-1" :class="$style.item" @click="complete(type, hashtag)" @keydown="onKeydown">
|
||||||
<span class="name">{{ hashtag }}</span>
|
<span class="name">{{ hashtag }}</span>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
<ol v-else-if="emojis.length > 0" ref="suggests" class="emojis">
|
<ol v-else-if="emojis.length > 0" ref="suggests" :class="$style.list">
|
||||||
<li v-for="emoji in emojis" :key="emoji.emoji" tabindex="-1" @click="complete(type, emoji.emoji)" @keydown="onKeydown">
|
<li v-for="emoji in emojis" :key="emoji.emoji" :class="$style.item" tabindex="-1" @click="complete(type, emoji.emoji)" @keydown="onKeydown">
|
||||||
<div class="emoji">
|
<MkEmoji :emoji="emoji.emoji" :class="$style.emoji"/>
|
||||||
<MkEmoji :emoji="emoji.emoji"/>
|
|
||||||
</div>
|
|
||||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||||
<span v-if="q" class="name" v-html="sanitizeHtml(emoji.name.replace(q, `<b>${q}</b>`))"></span>
|
<span v-if="q" :class="$style.emojiName" v-html="sanitizeHtml(emoji.name.replace(q, `<b>${q}</b>`))"></span>
|
||||||
<span v-else v-text="emoji.name"></span>
|
<span v-else v-text="emoji.name"></span>
|
||||||
<span v-if="emoji.aliasOf" class="alias">({{ emoji.aliasOf }})</span>
|
<span v-if="emoji.aliasOf" :class="$style.emojiAlias">({{ emoji.aliasOf }})</span>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
<ol v-else-if="mfmTags.length > 0" ref="suggests" class="mfmTags">
|
<ol v-else-if="mfmTags.length > 0" ref="suggests" :class="$style.list">
|
||||||
<li v-for="tag in mfmTags" tabindex="-1" @click="complete(type, tag)" @keydown="onKeydown">
|
<li v-for="tag in mfmTags" tabindex="-1" :class="$style.item" @click="complete(type, tag)" @keydown="onKeydown">
|
||||||
<span class="tag">{{ tag }}</span>
|
<span>{{ tag }}</span>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
@@ -379,113 +377,89 @@ onBeforeUnmount(() => {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" module>
|
||||||
.swhvrteh {
|
.root {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
margin-top: calc(1em + 8px);
|
margin-top: calc(1em + 8px);
|
||||||
overflow: clip;
|
overflow: clip;
|
||||||
transition: top 0.1s ease, left 0.1s ease;
|
transition: top 0.1s ease, left 0.1s ease;
|
||||||
|
}
|
||||||
|
|
||||||
> ol {
|
.list {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 4px 0;
|
padding: 4px 0;
|
||||||
max-height: 190px;
|
max-height: 190px;
|
||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
> li {
|
.item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 4px 12px;
|
padding: 4px 12px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: clip;
|
overflow: clip;
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
user-select: none;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
&, * {
|
&:hover {
|
||||||
user-select: none;
|
background: var(--X3);
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: var(--X3);
|
|
||||||
}
|
|
||||||
|
|
||||||
&[data-selected='true'] {
|
|
||||||
background: var(--accent);
|
|
||||||
|
|
||||||
&, * {
|
|
||||||
color: #fff !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:active {
|
|
||||||
background: var(--accentDarken);
|
|
||||||
|
|
||||||
&, * {
|
|
||||||
color: #fff !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
> .users > li {
|
&[data-selected='true'] {
|
||||||
|
background: var(--accent);
|
||||||
.avatar {
|
color: #fff !important;
|
||||||
min-width: 28px;
|
|
||||||
min-height: 28px;
|
|
||||||
max-width: 28px;
|
|
||||||
max-height: 28px;
|
|
||||||
margin: 0 8px 0 0;
|
|
||||||
border-radius: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.name {
|
|
||||||
margin: 0 8px 0 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
> .emojis > li {
|
&:active {
|
||||||
|
background: var(--accentDarken);
|
||||||
.emoji {
|
color: #fff !important;
|
||||||
flex-shrink: 0;
|
|
||||||
display: flex;
|
|
||||||
margin: 0 4px 0 0;
|
|
||||||
height: 24px;
|
|
||||||
width: 24px;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 20px;
|
|
||||||
|
|
||||||
> img {
|
|
||||||
height: 24px;
|
|
||||||
width: 24px;
|
|
||||||
object-fit: scale-down;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.name {
|
|
||||||
flex-shrink: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.alias {
|
|
||||||
flex-shrink: 9999999;
|
|
||||||
margin: 0 0 0 8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
> .mfmTags > li {
|
|
||||||
|
|
||||||
.name {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.avatar {
|
||||||
|
min-width: 28px;
|
||||||
|
min-height: 28px;
|
||||||
|
max-width: 28px;
|
||||||
|
max-height: 28px;
|
||||||
|
margin: 0 8px 0 0;
|
||||||
|
border-radius: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.userName {
|
||||||
|
margin: 0 8px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emoji {
|
||||||
|
flex-shrink: 0 !important;
|
||||||
|
display: flex !important;
|
||||||
|
margin: 0 4px 0 0 !important;
|
||||||
|
height: 24px !important;
|
||||||
|
width: 24px !important;
|
||||||
|
justify-content: center !important;
|
||||||
|
align-items: center !important;
|
||||||
|
font-size: 20px !important;
|
||||||
|
pointer-events: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emojiImg {
|
||||||
|
height: 24px;
|
||||||
|
width: 24px;
|
||||||
|
object-fit: scale-down;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emojiName {
|
||||||
|
flex-shrink: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.emojiAlias {
|
||||||
|
flex-shrink: 9999999;
|
||||||
|
margin: 0 0 0 8px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@@ -1,32 +1,34 @@
|
|||||||
<template>
|
<template>
|
||||||
<button
|
<button
|
||||||
v-if="!link"
|
v-if="!link"
|
||||||
ref="el" class="bghgjjyj _button"
|
ref="el" class="_button"
|
||||||
:class="{ inline, primary, gradate, danger, rounded, full, small, large, asLike }"
|
:class="[$style.root, { [$style.inline]: inline, [$style.primary]: primary, [$style.gradate]: gradate, [$style.danger]: danger, [$style.rounded]: rounded, [$style.full]: full, [$style.small]: small, [$style.large]: large, [$style.asLike]: asLike }]"
|
||||||
:type="type"
|
:type="type"
|
||||||
@click="emit('click', $event)"
|
@click="emit('click', $event)"
|
||||||
@mousedown="onMousedown"
|
@mousedown="onMousedown"
|
||||||
>
|
>
|
||||||
<div ref="ripples" class="ripples"></div>
|
<div ref="ripples" :class="$style.ripples"></div>
|
||||||
<div class="content">
|
<div :class="$style.content">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
<MkA
|
<MkA
|
||||||
v-else class="bghgjjyj _button"
|
v-else class="_button"
|
||||||
:class="{ inline, primary, gradate, danger, rounded, full, small }"
|
:class="[$style.root, { [$style.inline]: inline, [$style.primary]: primary, [$style.gradate]: gradate, [$style.danger]: danger, [$style.rounded]: rounded, [$style.full]: full, [$style.small]: small, [$style.large]: large, [$style.asLike]: asLike }]"
|
||||||
:to="to"
|
:to="to"
|
||||||
@mousedown="onMousedown"
|
@mousedown="onMousedown"
|
||||||
>
|
>
|
||||||
<div ref="ripples" class="ripples"></div>
|
<div ref="ripples" :class="$style.ripples"></div>
|
||||||
<div class="content">
|
<div :class="$style.content">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
</MkA>
|
</MkA>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { nextTick, onMounted } from 'vue';
|
import { nextTick, onMounted, useCssModule } from 'vue';
|
||||||
|
|
||||||
|
const $style = useCssModule();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
type?: 'button' | 'submit' | 'reset';
|
type?: 'button' | 'submit' | 'reset';
|
||||||
@@ -78,6 +80,7 @@ function onMousedown(evt: MouseEvent): void {
|
|||||||
const rect = target.getBoundingClientRect();
|
const rect = target.getBoundingClientRect();
|
||||||
|
|
||||||
const ripple = document.createElement('div');
|
const ripple = document.createElement('div');
|
||||||
|
ripple.classList.add($style.ripple);
|
||||||
ripple.style.top = (evt.clientY - rect.top - 1).toString() + 'px';
|
ripple.style.top = (evt.clientY - rect.top - 1).toString() + 'px';
|
||||||
ripple.style.left = (evt.clientX - rect.left - 1).toString() + 'px';
|
ripple.style.left = (evt.clientX - rect.left - 1).toString() + 'px';
|
||||||
|
|
||||||
@@ -101,8 +104,8 @@ function onMousedown(evt: MouseEvent): void {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" module>
|
||||||
.bghgjjyj {
|
.root {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1; // 他コンポーネントのbox-shadowに隠されないようにするため
|
z-index: 1; // 他コンポーネントのbox-shadowに隠されないようにするため
|
||||||
display: block;
|
display: block;
|
||||||
@@ -173,7 +176,7 @@ function onMousedown(evt: MouseEvent): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
> .ripples {
|
> .ripples {
|
||||||
::v-deep(div) {
|
> .ripple {
|
||||||
background: rgba(255, 60, 106, 0.15);
|
background: rgba(255, 60, 106, 0.15);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -237,35 +240,37 @@ function onMousedown(evt: MouseEvent): void {
|
|||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .ripples {
|
&.primary > .ripples > .ripple {
|
||||||
position: absolute;
|
|
||||||
z-index: 0;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border-radius: 6px;
|
|
||||||
overflow: clip;
|
|
||||||
|
|
||||||
::v-deep(div) {
|
|
||||||
position: absolute;
|
|
||||||
width: 2px;
|
|
||||||
height: 2px;
|
|
||||||
border-radius: 100%;
|
|
||||||
background: rgba(0, 0, 0, 0.1);
|
|
||||||
opacity: 1;
|
|
||||||
transform: scale(1);
|
|
||||||
transition: all 0.5s cubic-bezier(0,.5,0,1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.primary > .ripples ::v-deep(div) {
|
|
||||||
background: rgba(0, 0, 0, 0.15);
|
background: rgba(0, 0, 0, 0.15);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
> .content {
|
.ripples {
|
||||||
position: relative;
|
position: absolute;
|
||||||
z-index: 1;
|
z-index: 0;
|
||||||
}
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 6px;
|
||||||
|
overflow: clip;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ripple {
|
||||||
|
position: absolute;
|
||||||
|
width: 2px;
|
||||||
|
height: 2px;
|
||||||
|
border-radius: 100%;
|
||||||
|
background: rgba(0, 0, 0, 0.1);
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale(1);
|
||||||
|
transition: all 0.5s cubic-bezier(0,.5,0,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<MkTooltip ref="tooltip" :showing="showing" :x="x" :y="y" :max-width="340" :direction="'top'" :inner-margin="16" @closed="emit('closed')">
|
<MkTooltip ref="tooltip" :showing="showing" :x="x" :y="y" :max-width="340" :direction="'top'" :inner-margin="16" @closed="emit('closed')">
|
||||||
<div v-if="title || series" class="qpcyisrl">
|
<div v-if="title || series">
|
||||||
<div v-if="title" class="title">{{ title }}</div>
|
<div v-if="title" :class="$style.title">{{ title }}</div>
|
||||||
<template v-if="series">
|
<template v-if="series">
|
||||||
<div v-for="x in series" class="series">
|
<div v-for="x in series">
|
||||||
<span class="color" :style="{ background: x.backgroundColor, borderColor: x.borderColor }"></span>
|
<span :class="$style.color" :style="{ background: x.backgroundColor, borderColor: x.borderColor }"></span>
|
||||||
<span>{{ x.text }}</span>
|
<span>{{ x.text }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -33,21 +33,17 @@ const emit = defineEmits<{
|
|||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" module>
|
||||||
.qpcyisrl {
|
.title {
|
||||||
> .title {
|
margin-bottom: 4px;
|
||||||
margin-bottom: 4px;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
> .series {
|
.color {
|
||||||
> .color {
|
display: inline-block;
|
||||||
display: inline-block;
|
width: 8px;
|
||||||
width: 8px;
|
height: 8px;
|
||||||
height: 8px;
|
border-width: 1px;
|
||||||
border-width: 1px;
|
border-style: solid;
|
||||||
border-style: solid;
|
margin-right: 8px;
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@@ -1,26 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="ukygtjoj _panel" :class="{ naked, thin, hideHeader: !showHeader, scrollable, closed: !showBody }">
|
<div class="_panel" :class="[$style.root, { [$style.naked]: naked, [$style.thin]: thin, [$style.hideHeader]: !showHeader, [$style.scrollable]: scrollable, [$style.closed]: !showBody }]">
|
||||||
<header v-if="showHeader" ref="header">
|
<header v-if="showHeader" ref="header" :class="$style.header">
|
||||||
<div class="title"><slot name="header"></slot></div>
|
<div :class="$style.title">
|
||||||
<div class="sub">
|
<span :class="$style.titleIcon"><slot name="icon"></slot></span>
|
||||||
<slot name="func"></slot>
|
<slot name="header"></slot>
|
||||||
<button v-if="foldable" class="_button" @click="() => showBody = !showBody">
|
</div>
|
||||||
|
<div :class="$style.headerSub">
|
||||||
|
<slot name="func" :button-style-class="$style.headerButton"></slot>
|
||||||
|
<button v-if="foldable" :class="$style.headerButton" class="_button" @click="() => showBody = !showBody">
|
||||||
<template v-if="showBody"><i class="ti ti-chevron-up"></i></template>
|
<template v-if="showBody"><i class="ti ti-chevron-up"></i></template>
|
||||||
<template v-else><i class="ti ti-chevron-down"></i></template>
|
<template v-else><i class="ti ti-chevron-down"></i></template>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<Transition
|
<Transition
|
||||||
:name="$store.state.animation ? 'container-toggle' : ''"
|
:enter-active-class="$store.state.animation ? $style.transition_toggle_enterActive : ''"
|
||||||
|
:leave-active-class="$store.state.animation ? $style.transition_toggle_leaveActive : ''"
|
||||||
|
:enter-from-class="$store.state.animation ? $style.transition_toggle_enterFrom : ''"
|
||||||
|
:leave-to-class="$store.state.animation ? $style.transition_toggle_leaveTo : ''"
|
||||||
@enter="enter"
|
@enter="enter"
|
||||||
@after-enter="afterEnter"
|
@after-enter="afterEnter"
|
||||||
@leave="leave"
|
@leave="leave"
|
||||||
@after-leave="afterLeave"
|
@after-leave="afterLeave"
|
||||||
>
|
>
|
||||||
<div v-show="showBody" ref="content" class="content" :class="{ omitted }">
|
<div v-show="showBody" ref="content" :class="[$style.content, { omitted }]">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
<button v-if="omitted" class="fade _button" @click="() => { ignoreOmit = true; omitted = false; }">
|
<button v-if="omitted" :class="$style.fade" class="_button" @click="() => { ignoreOmit = true; omitted = false; }">
|
||||||
<span>{{ $ts.showMore }}</span>
|
<span :class="$style.fadeLabel">{{ $ts.showMore }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</Transition>
|
</Transition>
|
||||||
@@ -129,19 +135,18 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" module>
|
||||||
.container-toggle-enter-active, .container-toggle-leave-active {
|
.transition_toggle_enterActive,
|
||||||
|
.transition_toggle_leaveActive {
|
||||||
overflow-y: clip;
|
overflow-y: clip;
|
||||||
transition: opacity 0.5s, height 0.5s !important;
|
transition: opacity 0.5s, height 0.5s !important;
|
||||||
}
|
}
|
||||||
.container-toggle-enter-from {
|
.transition_toggle_enterFrom,
|
||||||
opacity: 0;
|
.transition_toggle_leaveTo {
|
||||||
}
|
|
||||||
.container-toggle-leave-to {
|
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ukygtjoj {
|
.root {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: clip;
|
overflow: clip;
|
||||||
contain: content;
|
contain: content;
|
||||||
@@ -160,116 +165,93 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> header {
|
|
||||||
position: sticky;
|
|
||||||
top: var(--stickyTop, 0px);
|
|
||||||
left: 0;
|
|
||||||
color: var(--panelHeaderFg);
|
|
||||||
background: var(--panelHeaderBg);
|
|
||||||
border-bottom: solid 0.5px var(--panelHeaderDivider);
|
|
||||||
z-index: 2;
|
|
||||||
line-height: 1.4em;
|
|
||||||
|
|
||||||
> .title {
|
|
||||||
margin: 0;
|
|
||||||
padding: 12px 16px;
|
|
||||||
|
|
||||||
> ::v-deep(i) {
|
|
||||||
margin-right: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:empty {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
> .sub {
|
|
||||||
position: absolute;
|
|
||||||
z-index: 2;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
> ::v-deep(button) {
|
|
||||||
width: 42px;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
> .content {
|
|
||||||
--stickyTop: 0px;
|
|
||||||
|
|
||||||
&.omitted {
|
|
||||||
position: relative;
|
|
||||||
max-height: var(--maxHeight);
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
> .fade {
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
z-index: 10;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 64px;
|
|
||||||
background: linear-gradient(0deg, var(--panel), var(--X15));
|
|
||||||
|
|
||||||
> span {
|
|
||||||
display: inline-block;
|
|
||||||
background: var(--panel);
|
|
||||||
padding: 6px 10px;
|
|
||||||
font-size: 0.8em;
|
|
||||||
border-radius: 999px;
|
|
||||||
box-shadow: 0 2px 6px rgb(0 0 0 / 20%);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
> span {
|
|
||||||
background: var(--panelHighlight);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.thin {
|
&.thin {
|
||||||
> header {
|
> .header {
|
||||||
> .title {
|
> .title {
|
||||||
padding: 8px 10px;
|
padding: 8px 10px;
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
> .content {
|
.header {
|
||||||
|
position: sticky;
|
||||||
|
top: var(--stickyTop, 0px);
|
||||||
|
left: 0;
|
||||||
|
color: var(--panelHeaderFg);
|
||||||
|
background: var(--panelHeaderBg);
|
||||||
|
border-bottom: solid 0.5px var(--panelHeaderDivider);
|
||||||
|
z-index: 2;
|
||||||
|
line-height: 1.4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
margin: 0;
|
||||||
|
padding: 12px 16px;
|
||||||
|
|
||||||
|
&:empty {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.titleIcon {
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.headerSub {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 2;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.headerButton {
|
||||||
|
width: 42px;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
--stickyTop: 0px;
|
||||||
|
|
||||||
|
&.omitted {
|
||||||
|
position: relative;
|
||||||
|
max-height: var(--maxHeight);
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
> .fade {
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 10;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 64px;
|
||||||
|
background: linear-gradient(0deg, var(--panel), var(--X15));
|
||||||
|
|
||||||
|
> .fadeLabel {
|
||||||
|
display: inline-block;
|
||||||
|
background: var(--panel);
|
||||||
|
padding: 6px 10px;
|
||||||
|
font-size: 0.8em;
|
||||||
|
border-radius: 999px;
|
||||||
|
box-shadow: 0 2px 6px rgb(0 0 0 / 20%);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
> .fadeLabel {
|
||||||
|
background: var(--panelHighlight);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@container (max-width: 380px) {
|
@container (max-width: 380px) {
|
||||||
.ukygtjoj {
|
.title {
|
||||||
> header {
|
padding: 8px 10px;
|
||||||
> .title {
|
font-size: 0.9em;
|
||||||
padding: 8px 10px;
|
|
||||||
font-size: 0.9em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
._forceContainerFull_ .ukygtjoj {
|
|
||||||
> header {
|
|
||||||
> .title {
|
|
||||||
padding: 12px 16px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
._forceContainerFull_.ukygtjoj {
|
|
||||||
> header {
|
|
||||||
> .title {
|
|
||||||
padding: 12px 16px !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@@ -1,6 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<Transition :name="$store.state.animation ? 'fade' : ''" appear>
|
<Transition
|
||||||
<div ref="rootEl" class="nvlagfpb" :style="{ zIndex }" @contextmenu.prevent.stop="() => {}">
|
appear
|
||||||
|
:enter-active-class="$store.state.animation ? $style.transition_fade_enterActive : ''"
|
||||||
|
:leave-active-class="$store.state.animation ? $style.transition_fade_leaveActive : ''"
|
||||||
|
:enter-from-class="$store.state.animation ? $style.transition_fade_enterFrom : ''"
|
||||||
|
:leave-to-class="$store.state.animation ? $style.transition_fade_leaveTo : ''"
|
||||||
|
>
|
||||||
|
<div ref="rootEl" :class="$style.root" :style="{ zIndex }" @contextmenu.prevent.stop="() => {}">
|
||||||
<MkMenu :items="items" :align="'left'" @close="$emit('closed')"/>
|
<MkMenu :items="items" :align="'left'" @close="$emit('closed')"/>
|
||||||
</div>
|
</div>
|
||||||
</Transition>
|
</Transition>
|
||||||
@@ -68,18 +74,19 @@ function onMousedown(evt: Event) {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" module>
|
||||||
.nvlagfpb {
|
.transition_fade_enterActive,
|
||||||
position: absolute;
|
.transition_fade_leaveActive {
|
||||||
}
|
|
||||||
|
|
||||||
.fade-enter-active, .fade-leave-active {
|
|
||||||
transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
||||||
transform-origin: left top;
|
transform-origin: left top;
|
||||||
}
|
}
|
||||||
|
.transition_fade_enterFrom,
|
||||||
.fade-enter-from, .fade-leave-to {
|
.transition_fade_leaveTo {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: scale(0.9);
|
transform: scale(0.9);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.root {
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@@ -146,6 +146,7 @@ onBeforeUnmount(() => {
|
|||||||
<style lang="scss" module>
|
<style lang="scss" module>
|
||||||
.root {
|
.root {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
margin: auto;
|
||||||
padding: 32px;
|
padding: 32px;
|
||||||
min-width: 320px;
|
min-width: 320px;
|
||||||
max-width: 480px;
|
max-width: 480px;
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<span class="zjobosdg">
|
<span>
|
||||||
<span v-text="hh"></span>
|
<span v-text="hh"></span>
|
||||||
<span class="colon" :class="{ showColon }">:</span>
|
<span :class="[$style.colon, { [$style.showColon]: showColon }]">:</span>
|
||||||
<span v-text="mm"></span>
|
<span v-text="mm"></span>
|
||||||
<span v-if="showS" class="colon" :class="{ showColon }">:</span>
|
<span v-if="showS" :class="[$style.colon, { [$style.showColon]: showColon }]">:</span>
|
||||||
<span v-if="showS" v-text="ss"></span>
|
<span v-if="showS" v-text="ss"></span>
|
||||||
<span v-if="showMs" class="colon" :class="{ showColon }">:</span>
|
<span v-if="showMs" :class="[$style.colon, { [$style.showColon]: showColon }]">:</span>
|
||||||
<span v-if="showMs" v-text="ms"></span>
|
<span v-if="showMs" v-text="ms"></span>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -62,16 +62,14 @@ onUnmounted(() => {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" module>
|
||||||
.zjobosdg {
|
.colon {
|
||||||
> .colon {
|
opacity: 0;
|
||||||
opacity: 0;
|
transition: opacity 1s ease;
|
||||||
transition: opacity 1s ease;
|
|
||||||
|
|
||||||
&.showColon {
|
&.showColon {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transition: opacity 0s;
|
transition: opacity 0s;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@@ -31,6 +31,3 @@ const emit = defineEmits<{
|
|||||||
|
|
||||||
const shown = ref(!!props.initialShown);
|
const shown = ref(!!props.initialShown);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
</style>
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="meta" class="xfbouadm" :style="{ backgroundImage: `url(${ meta.backgroundImageUrl })` }"></div>
|
<div v-if="meta" :class="$style.root" :style="{ backgroundImage: `url(${ meta.backgroundImageUrl })` }"></div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@@ -14,8 +14,8 @@ os.api('meta', { detail: true }).then(gotMeta => {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" module>
|
||||||
.xfbouadm {
|
.root {
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<MkSpacer :margin-min="20" :margin-max="32">
|
<MkSpacer :margin-min="20" :margin-max="32">
|
||||||
<div class="xkpnjxcv _gaps_m">
|
<div class="_gaps_m">
|
||||||
<template v-for="item in Object.keys(form).filter(item => !form[item].hidden)">
|
<template v-for="item in Object.keys(form).filter(item => !form[item].hidden)">
|
||||||
<MkInput v-if="form[item].type === 'number'" v-model="values[item]" type="number" :step="form[item].step || 1">
|
<MkInput v-if="form[item].type === 'number'" v-model="values[item]" type="number" :step="form[item].step || 1">
|
||||||
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span></template>
|
<template #label><span v-text="form[item].label || item"></span><span v-if="form[item].required === false"> ({{ $ts.optional }})</span></template>
|
||||||
@@ -119,9 +119,3 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.xkpnjxcv {
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mk-google">
|
<div :class="$style.root">
|
||||||
<input v-model="query" type="search" :placeholder="q">
|
<input v-model="query" :class="$style.input" type="search" :placeholder="q">
|
||||||
<button @click="search"><i class="ti ti-search"></i> {{ $ts.searchByGoogle }}</button>
|
<button :class="$style.button" @click="search"><i class="ti ti-search"></i> {{ $ts.searchByGoogle }}</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -19,33 +19,33 @@ const search = () => {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" module>
|
||||||
.mk-google {
|
.root {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: 8px 0;
|
margin: 8px 0;
|
||||||
|
}
|
||||||
|
|
||||||
> input {
|
.input {
|
||||||
flex-shrink: 1;
|
flex-shrink: 1;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
border: solid 1px var(--divider);
|
border: solid 1px var(--divider);
|
||||||
border-radius: 4px 0 0 4px;
|
border-radius: 4px 0 0 4px;
|
||||||
-webkit-appearance: textfield;
|
-webkit-appearance: textfield;
|
||||||
}
|
}
|
||||||
|
|
||||||
> button {
|
.button {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
border: solid 1px var(--divider);
|
border: solid 1px var(--divider);
|
||||||
border-left: none;
|
border-left: none;
|
||||||
border-radius: 0 4px 4px 0;
|
border-radius: 0 4px 4px 0;
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
box-shadow: 0 2px 4px rgba(#000, 0.15) inset;
|
box-shadow: 0 2px 4px rgba(#000, 0.15) inset;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@@ -33,6 +33,7 @@ const modal = $shallowRef<InstanceType<typeof MkModal>>();
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.xubzgfga {
|
.xubzgfga {
|
||||||
|
margin: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user