Compare commits
42 Commits
2024.7.0-r
...
2024.7.0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
59e2e43a68 | ||
![]() |
1a521a44c0 | ||
![]() |
d6ba12e24c | ||
![]() |
4b04b2989b | ||
![]() |
d63b854f96 | ||
![]() |
9dacc20d67 | ||
![]() |
3137c104f2 | ||
![]() |
63f9c271ca | ||
![]() |
400ae6ef01 | ||
![]() |
8b163cd3fb | ||
![]() |
676c599e48 | ||
![]() |
fccc5b6d62 | ||
![]() |
0bb5ac0fca | ||
![]() |
c7354c5e30 | ||
![]() |
5c42a0e439 | ||
![]() |
8f40f932e4 | ||
![]() |
86b4f49880 | ||
![]() |
916ed49441 | ||
![]() |
d0b7c74fd1 | ||
![]() |
2307849c9a | ||
![]() |
8bae2ecabd | ||
![]() |
3411b9c16c | ||
![]() |
674a424db3 | ||
![]() |
d1eb10af24 | ||
![]() |
9181eb277e | ||
![]() |
3548ffba26 | ||
![]() |
f965f65dcd | ||
![]() |
cb3106cdc6 | ||
![]() |
39498ddbf1 | ||
![]() |
f0ec68c3cf | ||
![]() |
b359e3c95b | ||
![]() |
6bd46e790b | ||
![]() |
7135da7887 | ||
![]() |
bff813042e | ||
![]() |
7e9c38d6fb | ||
![]() |
5eea41b089 | ||
![]() |
866abff54d | ||
![]() |
45f909ef33 | ||
![]() |
738b3ea43b | ||
![]() |
de3ddb5b44 | ||
![]() |
b44313fe3c | ||
![]() |
1a79f0dc2a |
1
.github/workflows/get-api-diff.yml
vendored
1
.github/workflows/get-api-diff.yml
vendored
@@ -9,7 +9,6 @@ on:
|
||||
paths:
|
||||
- packages/backend/**
|
||||
- .github/workflows/get-api-diff.yml
|
||||
- .github/workflows/get-api-diff.yml
|
||||
jobs:
|
||||
get-from-misskey:
|
||||
runs-on: ubuntu-latest
|
||||
|
35
CHANGELOG.md
35
CHANGELOG.md
@@ -9,11 +9,19 @@
|
||||
- Feat: ユーザーのアイコン/バナーの変更可否をロールで設定可能に
|
||||
- 変更不可となっていても、設定済みのものを解除してデフォルト画像に戻すことは出来ます
|
||||
- Feat: ユーザ作成時にSystemWebhookを送信可能に #14281
|
||||
- Feat: メディアサイレンスを実装 #13842
|
||||
- メディアサイレンスされたサーバーに所属するアカウントによるファイルはすべてセンシティブとして扱われ、カスタム絵文字が使用できないようになります。
|
||||
- Enhance: 管理画面でアーカイブにしたお知らせを表示・編集できるように
|
||||
- Fix: 配信停止したインスタンス一覧が見れなくなる問題を修正
|
||||
- Fix: Dockerコンテナの立ち上げ時に`pnpm`のインストールで固まることがある問題
|
||||
- Fix: デフォルトテーマに無効なテーマコードを入力するとUIが使用できなくなる問題を修正
|
||||
- 翻訳の更新
|
||||
- 依存関係の更新
|
||||
|
||||
### Client
|
||||
- Feat: ユーザーページから「このユーザーのノートを検索」できるように (#14128)
|
||||
- Feat: 検索ページはクエリを受け付けるようになりました (#14128)
|
||||
- Enhance: 検索ページのUI改善 (#14128)
|
||||
- Enhance: 内蔵APIドキュメントのデザイン・パフォーマンスを改善
|
||||
- Enhance: 非ログイン時に他サーバーに遷移するアクションを追加
|
||||
- Enhance: 非ログイン時のハイライトTLのデザインを改善
|
||||
@@ -24,6 +32,15 @@
|
||||
- Enhance: AiScriptを0.19.0にアップデート
|
||||
- Enhance: Allow negative delay for MFM animation elements (`tada`, `jelly`, `twitch`, `shake`, `spin`, `jump`, `bounce`, `rainbow`)
|
||||
- Enhance: センシティブなメディアを開く際に確認ダイアログを出せるように
|
||||
- Enhance: 検索(ノート/ユーザー)で `#` から始まる文字列を入力すると、そのハッシュタグのノート/ユーザー一覧ページが表示できるように
|
||||
- Enhance: 検索(ノート/ユーザー)において、入力に空白が含まれている場合は照会を行わないように
|
||||
- Enhance: 検索(ノート/ユーザー)において、照会を行うかどうか、ハッシュタグのノート/ユーザー一覧ページを表示するかどうかの確認ダイアログを出すように
|
||||
- Enhance: 検索(ノート/ユーザー)で `@` から始まる文字列(`@user@host`など)を入力すると、そのユーザーを照会できるように
|
||||
- Enhance: ドライブのファイル・フォルダをドラッグしなくても移動できるように
|
||||
(Cherry-picked from https://github.com/nafu-at/misskey/commit/b89c2af6945c6a9f9f10e83f54d2bcf0f240b0b4, https://github.com/nafu-at/misskey/commit/8a7d710c6acb83f50c83f050bd1423c764d60a99)
|
||||
- Enhance: デッキのアンテナ・リスト選択画面からそれぞれを新規作成できるように
|
||||
- Enhance: ブラウザのコンテキストメニューを使用できるように
|
||||
- Enhance: 連合の「連合中」,「購読中」,「配信中」に対してブロックしているサーバー、配信停止しているサーバーを含めないように
|
||||
- Fix: `/about#federation` ページなどで各インスタンスのチャートが表示されなくなっていた問題を修正
|
||||
- Fix: ユーザーページの追加情報のラベルを投稿者のサーバーの絵文字で表示する (#13968)
|
||||
- Fix: リバーシの対局を正しく共有できないことがある問題を修正
|
||||
@@ -46,6 +63,14 @@
|
||||
- Fix: ダイレクト投稿の"削除して編集"において、宛先が保持されていなかった問題を修正
|
||||
- Fix: 投稿フォームへのURL貼り付けによる引用が下書きに保存されていなかった問題を修正
|
||||
- Fix: "削除して編集"や下書きにおいて、リアクションの受け入れ設定が保持/保存されていなかった問題を修正
|
||||
- Fix: 照会に `#` から始まる文字列を入力してそのハッシュタグのページを表示する際、入力が `#` のみの場合に「指定されたURLに該当するページはありませんでした。」が表示されてしまう問題を修正
|
||||
- Fix: 照会に `@` から始まる文字列を入力してユーザーを照会する際、入力が `@` のみの場合に「問題が発生しました」が表示されてしまう問題を修正
|
||||
- Fix: 投稿フォームにノートのURLを貼り付けて"引用として添付"した場合、投稿文を空にすることによるRenote化が出来なかった問題を修正
|
||||
- Fix: フォロー中のユーザーに関する"TLに他の人への返信を含める"の設定が分かりづらい問題を修正
|
||||
- Fix: タイムラインページを開いた時、`TLに他の人への返信を含める`がオフのときに`ファイル付きのみ`をオンにできない問題を修正
|
||||
- Fix: deck uiでタイムラインを切り替えた際にTLの設定項目が更新されず、`TLに他の人への返信を含める`のトグルが表示されない問題を修正
|
||||
- Fix: ウィジェットのタイムライン選択欄に無効化されたタイムラインが表示される問題を修正
|
||||
- Fix: サウンドにドライブの音声を使用している際にドライブの音声が再生できなくなると設定が変更できなくなる問題を修正
|
||||
|
||||
### Server
|
||||
- Feat: レートリミット制限に引っかかったときに`Retry-After`ヘッダーを返すように (#13949)
|
||||
@@ -56,6 +81,7 @@
|
||||
- Enhance: エンドポイント`i/webhook/update`の必須項目を`webhookId`のみに
|
||||
- Enhance: エンドポイント`admin/ad/update`の必須項目を`id`のみに
|
||||
- Enhance: `default.yml`内の`url`, `db.db`, `db.user`, `db.pass`を環境変数から読み込めるように
|
||||
- Enhance: エンドポイント`api/meta`にプロパティ`noteSearchableScope`が増え、`string`値`local`または`global`を返却します
|
||||
- Fix: チャート生成時にinstance.suspensionStateに置き換えられたinstance.isSuspendedが参照されてしまう問題を修正
|
||||
- Fix: ユーザーのフィードページのMFMをHTMLに展開するように (#14006)
|
||||
- Fix: アンテナ・クリップ・リスト・ウェブフックがロールポリシーの上限より一つ多く作れてしまうのを修正 (#14036)
|
||||
@@ -83,6 +109,15 @@
|
||||
- Fix: リノートのミュートが適用されるまでに時間がかかることがある問題を修正
|
||||
(Cherry-picked from https://github.com/Type4ny-Project/Type4ny/commit/e9601029b52e0ad43d9131b555b614e56c84ebc1)
|
||||
- Fix: Steaming APIが不正なデータを受けた場合の動作が不安定である問題 #14251
|
||||
- Fix: `users/search`において `@` から始まる文字列が与えられた際の処理が正しくなかった問題を修正
|
||||
- 名前や自己紹介に `@` から始まる文言が含まれるユーザーも検索できるようになります
|
||||
- Fix: 一部のMisskey以外のソフトウェアからファイルを受け取れない問題
|
||||
(Cherry-picked from https://github.com/Secineralyr/misskey.dream/pull/73/commits/652eaff1e8aa00b890d71d2e1e52c263c1e67c76)
|
||||
- NOTE: `drive_file`の`url`, `uri`, `src`の上限が512から1024に変更されます
|
||||
Migrationではカラム定義の変更のみが行われます。
|
||||
サーバー管理者は各サーバーの必要に応じ`drive_file` `("uri")`に対するインデックスを張りなおすことでより安定しDBの探索が行われる可能性があります。詳細 は [GitHub](https://github.com/misskey-dev/misskey/pull/14323#issuecomment-2257562228)で確認可能です
|
||||
- Fix: 自分のフォロワー限定投稿に対するリプライがホームタイムラインで見えないことが有る問題を修正
|
||||
- Fix: フォローしていないユーザによるフォロワー限定投稿に対するリプライがソーシャルタイムラインで表示されることがある問題を修正
|
||||
|
||||
### Misskey.js
|
||||
- Feat: `/drive/files/create` のリクエストに対応(`multipart/form-data`に対応)
|
||||
|
@@ -2010,7 +2010,6 @@ _webhookSettings:
|
||||
createWebhook: "Vytvořit Webhook"
|
||||
name: "Jméno"
|
||||
secret: "Tajné"
|
||||
events: "Události Webhook"
|
||||
active: "Zapnuto"
|
||||
_events:
|
||||
follow: "Při sledování uživatele"
|
||||
|
@@ -2191,7 +2191,6 @@ _webhookSettings:
|
||||
createWebhook: "Webhook erstellen"
|
||||
name: "Name"
|
||||
secret: "Secret"
|
||||
events: "Webhook-Ereignisse"
|
||||
active: "Aktiviert"
|
||||
_events:
|
||||
follow: "Wenn du jemandem folgst"
|
||||
|
@@ -60,6 +60,7 @@ copyFileId: "Copy file ID"
|
||||
copyFolderId: "Copy folder ID"
|
||||
copyProfileUrl: "Copy profile URL"
|
||||
searchUser: "Search for a user"
|
||||
searchThisUsersNotes: "Search this user’s notes"
|
||||
reply: "Reply"
|
||||
loadMore: "Load more"
|
||||
showMore: "Show more"
|
||||
@@ -154,6 +155,7 @@ editList: "Edit list"
|
||||
selectChannel: "Select a channel"
|
||||
selectAntenna: "Select an antenna"
|
||||
editAntenna: "Edit antenna"
|
||||
createAntenna: "Create an antenna"
|
||||
selectWidget: "Select a widget"
|
||||
editWidgets: "Edit widgets"
|
||||
editWidgetsExit: "Done"
|
||||
@@ -165,7 +167,7 @@ emojiUrl: "Emoji URL"
|
||||
addEmoji: "Add an emoji"
|
||||
settingGuide: "Recommended settings"
|
||||
cacheRemoteFiles: "Cache remote files"
|
||||
cacheRemoteFilesDescription: "When this setting is disabled, remote files are loaded directly from the remote instance. Disabling this will decrease storage usage, but increase traffic, as thumbnails will not be generated."
|
||||
cacheRemoteFilesDescription: "When this setting is disabled, remote files are loaded directly from the remote servers. Disabling this will decrease storage usage, but increase traffic, as thumbnails will not be generated."
|
||||
youCanCleanRemoteFilesCache: "You can clear the cache by clicking the 🗑️ button in the file management view."
|
||||
cacheRemoteSensitiveFiles: "Cache sensitive remote files"
|
||||
cacheRemoteSensitiveFilesDescription: "When this setting is disabled, sensitive remote files are loaded directly from the remote instance without caching."
|
||||
@@ -194,6 +196,7 @@ followConfirm: "Are you sure that you want to follow {name}?"
|
||||
proxyAccount: "Proxy account"
|
||||
proxyAccountDescription: "A proxy account is an account that acts as a remote follower for users under certain conditions. For example, when a user adds a remote user to the list, the remote user's activity will not be delivered to the instance if no local user is following that user, so the proxy account will follow instead."
|
||||
host: "Host"
|
||||
selectSelf: "Select myself"
|
||||
selectUser: "Select a user"
|
||||
recipient: "Recipient"
|
||||
annotation: "Comments"
|
||||
@@ -209,6 +212,7 @@ perDay: "Per Day"
|
||||
stopActivityDelivery: "Stop sending activities"
|
||||
blockThisInstance: "Block this instance"
|
||||
silenceThisInstance: "Silence this instance"
|
||||
mediaSilenceThisInstance: "Media-silence this server"
|
||||
operations: "Operations"
|
||||
software: "Software"
|
||||
version: "Version"
|
||||
@@ -229,7 +233,9 @@ clearCachedFilesConfirm: "Are you sure that you want to delete all cached remote
|
||||
blockedInstances: "Blocked Instances"
|
||||
blockedInstancesDescription: "List the hostnames of the instances you want to block separated by linebreaks. Listed instances will no longer be able to communicate with this instance."
|
||||
silencedInstances: "Silenced instances"
|
||||
silencedInstancesDescription: "List the hostnames of the instances that you want to silence. All accounts of the listed instances will be treated as silenced, can only make follow requests, and cannot mention local accounts if not followed. This will not affect blocked instances."
|
||||
silencedInstancesDescription: "List the host names of the servers that you want to silence, separated by a new line. All accounts belonging to the listed servers will be treated as silenced, and can only make follow requests, and cannot mention local accounts if not followed. This will not affect the blocked servers."
|
||||
mediaSilencedInstances: "Media-silenced servers"
|
||||
mediaSilencedInstancesDescription: "List the host names of the servers that you want to media-silence, separated by a new line. All accounts belonging to the listed servers will be treated as sensitive, and can't use custom emojis. This will not affect the blocked servers."
|
||||
muteAndBlock: "Mutes and Blocks"
|
||||
mutedUsers: "Muted users"
|
||||
blockedUsers: "Blocked users"
|
||||
@@ -392,7 +398,7 @@ mcaptcha: "mCaptcha"
|
||||
enableMcaptcha: "Enable mCaptcha"
|
||||
mcaptchaSiteKey: "Site key"
|
||||
mcaptchaSecretKey: "Secret key"
|
||||
mcaptchaInstanceUrl: "mCaptcha instance URL"
|
||||
mcaptchaInstanceUrl: "mCaptcha server URL"
|
||||
recaptcha: "reCAPTCHA"
|
||||
enableRecaptcha: "Enable reCAPTCHA"
|
||||
recaptchaSiteKey: "Site key"
|
||||
@@ -1106,6 +1112,8 @@ preservedUsernames: "Reserved usernames"
|
||||
preservedUsernamesDescription: "List usernames to reserve separated by linebreaks. These will become unable during normal account creation, but can be used by administrators to manually create accounts. Already existing accounts using these usernames will not be affected."
|
||||
createNoteFromTheFile: "Compose note from this file"
|
||||
archive: "Archive"
|
||||
archived: "Archived"
|
||||
unarchive: "Unarchive"
|
||||
channelArchiveConfirmTitle: "Really archive {name}?"
|
||||
channelArchiveConfirmDescription: "An archived channel won't appear in the channel list or search results anymore. New posts can also not be added to it anymore."
|
||||
thisChannelArchived: "This channel has been archived."
|
||||
@@ -1116,6 +1124,9 @@ preventAiLearning: "Reject usage in Machine Learning (Generative AI)"
|
||||
preventAiLearningDescription: "Requests crawlers to not use posted text or image material etc. in machine learning (Predictive / Generative AI) data sets. This is achieved by adding a \"noai\" HTML-Response flag to the respective content. A complete prevention can however not be achieved through this flag, as it may simply be ignored."
|
||||
options: "Options"
|
||||
specifyUser: "Specific user"
|
||||
lookupConfirm: "Do you want to look up?"
|
||||
openTagPageConfirm: "Do you want to open a hashtag page?"
|
||||
specifyHost: "Specify a host"
|
||||
failedToPreviewUrl: "Could not preview"
|
||||
update: "Update"
|
||||
rolesThatCanBeUsedThisEmojiAsReaction: "Roles that can use this emoji as reaction"
|
||||
@@ -1250,6 +1261,8 @@ inquiry: "Contact"
|
||||
tryAgain: "Please try again later"
|
||||
confirmWhenRevealingSensitiveMedia: "Confirm when revealing sensitive media"
|
||||
sensitiveMediaRevealConfirm: "This might be a sensitive media. Are you sure to reveal?"
|
||||
createdLists: "Created lists"
|
||||
createdAntennas: "Created antennas"
|
||||
_delivery:
|
||||
status: "Delivery status"
|
||||
stop: "Suspended"
|
||||
@@ -1384,7 +1397,7 @@ _serverSettings:
|
||||
fanoutTimelineDescription: "Greatly increases performance of timeline retrieval and reduces load on the database when enabled. In exchange, memory usage of Redis will increase. Consider disabling this in case of low server memory or server instability."
|
||||
fanoutTimelineDbFallback: "Fallback to database"
|
||||
fanoutTimelineDbFallbackDescription: "When enabled, the timeline will fall back to the database for additional queries if the timeline is not cached. Disabling it further reduces the server load by eliminating the fallback process, but limits the range of timelines that can be retrieved."
|
||||
inquiryUrl: "Query URL"
|
||||
inquiryUrl: "Inquiry URL"
|
||||
inquiryUrlDescription: "Specify a URL for the inquiry form to the server maintainer or a web page for the contact information."
|
||||
_accountMigration:
|
||||
moveFrom: "Migrate another account to this one"
|
||||
@@ -1954,6 +1967,7 @@ _soundSettings:
|
||||
driveFileTypeWarnDescription: "Select an audio file"
|
||||
driveFileDurationWarn: "The audio is too long."
|
||||
driveFileDurationWarnDescription: "Long audio may disrupt using Misskey. Still continue?"
|
||||
driveFileError: "It couldn't load the sound. Please change the setting."
|
||||
_ago:
|
||||
future: "Future"
|
||||
justNow: "Just now"
|
||||
@@ -2412,7 +2426,7 @@ _webhookSettings:
|
||||
modifyWebhook: "Modify Webhook"
|
||||
name: "Name"
|
||||
secret: "Secret"
|
||||
events: "Webhook Events"
|
||||
trigger: "Trigger"
|
||||
active: "Enabled"
|
||||
_events:
|
||||
follow: "When following a user"
|
||||
@@ -2425,6 +2439,7 @@ _webhookSettings:
|
||||
_systemEvents:
|
||||
abuseReport: "When received a new abuse report"
|
||||
abuseReportResolved: "When resolved abuse reports"
|
||||
userCreated: "When user is created"
|
||||
deleteConfirm: "Are you sure you want to delete the Webhook?"
|
||||
_abuseReport:
|
||||
_notificationRecipient:
|
||||
@@ -2615,3 +2630,8 @@ _mediaControls:
|
||||
pip: "Picture in Picture"
|
||||
playbackRate: "Playback Speed"
|
||||
loop: "Loop playback"
|
||||
_contextMenu:
|
||||
title: "Context menu"
|
||||
app: "Application"
|
||||
appWithShift: "Application with shift key"
|
||||
native: "Native"
|
||||
|
@@ -2382,7 +2382,6 @@ _webhookSettings:
|
||||
createWebhook: "Crear Webhook"
|
||||
name: "Nombre"
|
||||
secret: "Secreto"
|
||||
events: "Eventos de webhook"
|
||||
active: "Activado"
|
||||
_events:
|
||||
follow: "Cuando se sigue a alguien"
|
||||
|
@@ -2403,7 +2403,6 @@ _webhookSettings:
|
||||
modifyWebhook: "Sunting Webhook"
|
||||
name: "Nama"
|
||||
secret: "Secret"
|
||||
events: "Webhook Events"
|
||||
active: "Aktif"
|
||||
_events:
|
||||
follow: "Ketika mengikuti pengguna"
|
||||
|
78
locales/index.d.ts
vendored
78
locales/index.d.ts
vendored
@@ -256,6 +256,10 @@ export interface Locale extends ILocale {
|
||||
* ユーザーを検索
|
||||
*/
|
||||
"searchUser": string;
|
||||
/**
|
||||
* ユーザーのノートを検索
|
||||
*/
|
||||
"searchThisUsersNotes": string;
|
||||
/**
|
||||
* 返信
|
||||
*/
|
||||
@@ -632,6 +636,10 @@ export interface Locale extends ILocale {
|
||||
* アンテナを編集
|
||||
*/
|
||||
"editAntenna": string;
|
||||
/**
|
||||
* アンテナを作成
|
||||
*/
|
||||
"createAntenna": string;
|
||||
/**
|
||||
* ウィジェットを選択
|
||||
*/
|
||||
@@ -792,6 +800,10 @@ export interface Locale extends ILocale {
|
||||
* ホスト
|
||||
*/
|
||||
"host": string;
|
||||
/**
|
||||
* 自分を選択
|
||||
*/
|
||||
"selectSelf": string;
|
||||
/**
|
||||
* ユーザーを選択
|
||||
*/
|
||||
@@ -852,6 +864,10 @@ export interface Locale extends ILocale {
|
||||
* サーバーをサイレンス
|
||||
*/
|
||||
"silenceThisInstance": string;
|
||||
/**
|
||||
* サーバーをメディアサイレンス
|
||||
*/
|
||||
"mediaSilenceThisInstance": string;
|
||||
/**
|
||||
* 操作
|
||||
*/
|
||||
@@ -936,6 +952,14 @@ export interface Locale extends ILocale {
|
||||
* サイレンスしたいサーバーのホストを改行で区切って設定します。サイレンスされたサーバーに所属するアカウントはすべて「サイレンス」として扱われ、フォローがすべてリクエストになります。ブロックしたインスタンスには影響しません。
|
||||
*/
|
||||
"silencedInstancesDescription": string;
|
||||
/**
|
||||
* メディアサイレンスしたサーバー
|
||||
*/
|
||||
"mediaSilencedInstances": string;
|
||||
/**
|
||||
* メディアサイレンスしたいサーバーのホストを改行で区切って設定します。メディアサイレンスされたサーバーに所属するアカウントによるファイルはすべてセンシティブとして扱われ、カスタム絵文字が使用できないようになります。ブロックしたインスタンスには影響しません。
|
||||
*/
|
||||
"mediaSilencedInstancesDescription": string;
|
||||
/**
|
||||
* ミュートとブロック
|
||||
*/
|
||||
@@ -4440,6 +4464,14 @@ export interface Locale extends ILocale {
|
||||
* アーカイブ
|
||||
*/
|
||||
"archive": string;
|
||||
/**
|
||||
* アーカイブ済み
|
||||
*/
|
||||
"archived": string;
|
||||
/**
|
||||
* アーカイブ解除
|
||||
*/
|
||||
"unarchive": string;
|
||||
/**
|
||||
* {name}をアーカイブしますか?
|
||||
*/
|
||||
@@ -4480,6 +4512,18 @@ export interface Locale extends ILocale {
|
||||
* ユーザー指定
|
||||
*/
|
||||
"specifyUser": string;
|
||||
/**
|
||||
* 照会しますか?
|
||||
*/
|
||||
"lookupConfirm": string;
|
||||
/**
|
||||
* ハッシュタグのページを開きますか?
|
||||
*/
|
||||
"openTagPageConfirm": string;
|
||||
/**
|
||||
* ホスト指定
|
||||
*/
|
||||
"specifyHost": string;
|
||||
/**
|
||||
* プレビューできません
|
||||
*/
|
||||
@@ -5016,6 +5060,14 @@ export interface Locale extends ILocale {
|
||||
* センシティブなメディアです。表示しますか?
|
||||
*/
|
||||
"sensitiveMediaRevealConfirm": string;
|
||||
/**
|
||||
* 作成したリスト
|
||||
*/
|
||||
"createdLists": string;
|
||||
/**
|
||||
* 作成したアンテナ
|
||||
*/
|
||||
"createdAntennas": string;
|
||||
"_delivery": {
|
||||
/**
|
||||
* 配信状態
|
||||
@@ -7581,6 +7633,10 @@ export interface Locale extends ILocale {
|
||||
* 長い音声を使用するとMisskeyの使用に支障をきたす可能性があります。それでも続行しますか?
|
||||
*/
|
||||
"driveFileDurationWarnDescription": string;
|
||||
/**
|
||||
* 音声が読み込めませんでした。設定を変更してください
|
||||
*/
|
||||
"driveFileError": string;
|
||||
};
|
||||
"_ago": {
|
||||
/**
|
||||
@@ -9346,9 +9402,9 @@ export interface Locale extends ILocale {
|
||||
*/
|
||||
"secret": string;
|
||||
/**
|
||||
* Webhookを実行するタイミング
|
||||
* トリガー
|
||||
*/
|
||||
"events": string;
|
||||
"trigger": string;
|
||||
/**
|
||||
* 有効
|
||||
*/
|
||||
@@ -10098,6 +10154,24 @@ export interface Locale extends ILocale {
|
||||
*/
|
||||
"loop": string;
|
||||
};
|
||||
"_contextMenu": {
|
||||
/**
|
||||
* コンテキストメニュー
|
||||
*/
|
||||
"title": string;
|
||||
/**
|
||||
* アプリケーション
|
||||
*/
|
||||
"app": string;
|
||||
/**
|
||||
* Shiftキーでアプリケーション
|
||||
*/
|
||||
"appWithShift": string;
|
||||
/**
|
||||
* ブラウザのUI
|
||||
*/
|
||||
"native": string;
|
||||
};
|
||||
}
|
||||
declare const locales: {
|
||||
[lang: string]: Locale;
|
||||
|
@@ -2412,7 +2412,6 @@ _webhookSettings:
|
||||
modifyWebhook: "Modifica Webhook"
|
||||
name: "Nome"
|
||||
secret: "Segreto"
|
||||
events: "Quando eseguire il Webhook"
|
||||
active: "Attivo"
|
||||
_events:
|
||||
follow: "Quando segui un profilo"
|
||||
|
@@ -60,6 +60,7 @@ copyFileId: "ファイルIDをコピー"
|
||||
copyFolderId: "フォルダーIDをコピー"
|
||||
copyProfileUrl: "プロフィールURLをコピー"
|
||||
searchUser: "ユーザーを検索"
|
||||
searchThisUsersNotes: "ユーザーのノートを検索"
|
||||
reply: "返信"
|
||||
loadMore: "もっと見る"
|
||||
showMore: "もっと見る"
|
||||
@@ -154,6 +155,7 @@ editList: "リストを編集"
|
||||
selectChannel: "チャンネルを選択"
|
||||
selectAntenna: "アンテナを選択"
|
||||
editAntenna: "アンテナを編集"
|
||||
createAntenna: "アンテナを作成"
|
||||
selectWidget: "ウィジェットを選択"
|
||||
editWidgets: "ウィジェットを編集"
|
||||
editWidgetsExit: "編集を終了"
|
||||
@@ -194,6 +196,7 @@ followConfirm: "{name}をフォローしますか?"
|
||||
proxyAccount: "プロキシアカウント"
|
||||
proxyAccountDescription: "プロキシアカウントは、特定の条件下でユーザーのリモートフォローを代行するアカウントです。例えば、ユーザーがリモートユーザーをリストに入れたとき、リストに入れられたユーザーを誰もフォローしていないとアクティビティがサーバーに配達されないため、代わりにプロキシアカウントがフォローするようにします。"
|
||||
host: "ホスト"
|
||||
selectSelf: "自分を選択"
|
||||
selectUser: "ユーザーを選択"
|
||||
recipient: "宛先"
|
||||
annotation: "注釈"
|
||||
@@ -209,6 +212,7 @@ perDay: "1日ごと"
|
||||
stopActivityDelivery: "アクティビティの配送を停止"
|
||||
blockThisInstance: "このサーバーをブロック"
|
||||
silenceThisInstance: "サーバーをサイレンス"
|
||||
mediaSilenceThisInstance: "サーバーをメディアサイレンス"
|
||||
operations: "操作"
|
||||
software: "ソフトウェア"
|
||||
version: "バージョン"
|
||||
@@ -230,6 +234,8 @@ blockedInstances: "ブロックしたサーバー"
|
||||
blockedInstancesDescription: "ブロックしたいサーバーのホストを改行で区切って設定します。ブロックされたサーバーは、このインスタンスとやり取りできなくなります。"
|
||||
silencedInstances: "サイレンスしたサーバー"
|
||||
silencedInstancesDescription: "サイレンスしたいサーバーのホストを改行で区切って設定します。サイレンスされたサーバーに所属するアカウントはすべて「サイレンス」として扱われ、フォローがすべてリクエストになります。ブロックしたインスタンスには影響しません。"
|
||||
mediaSilencedInstances: "メディアサイレンスしたサーバー"
|
||||
mediaSilencedInstancesDescription: "メディアサイレンスしたいサーバーのホストを改行で区切って設定します。メディアサイレンスされたサーバーに所属するアカウントによるファイルはすべてセンシティブとして扱われ、カスタム絵文字が使用できないようになります。ブロックしたインスタンスには影響しません。"
|
||||
muteAndBlock: "ミュートとブロック"
|
||||
mutedUsers: "ミュートしたユーザー"
|
||||
blockedUsers: "ブロックしたユーザー"
|
||||
@@ -1106,6 +1112,8 @@ preservedUsernames: "予約ユーザー名"
|
||||
preservedUsernamesDescription: "予約するユーザー名を改行で列挙します。ここで指定されたユーザー名はアカウント作成時に使えなくなりますが、管理者によるアカウント作成時はこの制限を受けません。また、既に存在するアカウントも影響を受けません。"
|
||||
createNoteFromTheFile: "このファイルからノートを作成"
|
||||
archive: "アーカイブ"
|
||||
archived: "アーカイブ済み"
|
||||
unarchive: "アーカイブ解除"
|
||||
channelArchiveConfirmTitle: "{name}をアーカイブしますか?"
|
||||
channelArchiveConfirmDescription: "アーカイブすると、チャンネル一覧や検索結果に表示されなくなり、新たな書き込みもできなくなります。"
|
||||
thisChannelArchived: "このチャンネルはアーカイブされています。"
|
||||
@@ -1116,6 +1124,9 @@ preventAiLearning: "生成AIによる学習を拒否"
|
||||
preventAiLearningDescription: "外部の文章生成AIや画像生成AIに対して、投稿したノートや画像などのコンテンツを学習の対象にしないように要求します。これはnoaiフラグをHTMLレスポンスに含めることによって実現されますが、この要求に従うかはそのAI次第であるため、学習を完全に防止するものではありません。"
|
||||
options: "オプション"
|
||||
specifyUser: "ユーザー指定"
|
||||
lookupConfirm: "照会しますか?"
|
||||
openTagPageConfirm: "ハッシュタグのページを開きますか?"
|
||||
specifyHost: "ホスト指定"
|
||||
failedToPreviewUrl: "プレビューできません"
|
||||
update: "更新"
|
||||
rolesThatCanBeUsedThisEmojiAsReaction: "リアクションとして使えるロール"
|
||||
@@ -1250,6 +1261,8 @@ inquiry: "お問い合わせ"
|
||||
tryAgain: "もう一度お試しください。"
|
||||
confirmWhenRevealingSensitiveMedia: "センシティブなメディアを表示するとき確認する"
|
||||
sensitiveMediaRevealConfirm: "センシティブなメディアです。表示しますか?"
|
||||
createdLists: "作成したリスト"
|
||||
createdAntennas: "作成したアンテナ"
|
||||
|
||||
_delivery:
|
||||
status: "配信状態"
|
||||
@@ -1989,6 +2002,7 @@ _soundSettings:
|
||||
driveFileTypeWarnDescription: "音声ファイルを選択してください"
|
||||
driveFileDurationWarn: "音声が長すぎます"
|
||||
driveFileDurationWarnDescription: "長い音声を使用するとMisskeyの使用に支障をきたす可能性があります。それでも続行しますか?"
|
||||
driveFileError: "音声が読み込めませんでした。設定を変更してください"
|
||||
|
||||
_ago:
|
||||
future: "未来"
|
||||
@@ -2478,7 +2492,7 @@ _webhookSettings:
|
||||
modifyWebhook: "Webhookを編集"
|
||||
name: "名前"
|
||||
secret: "シークレット"
|
||||
events: "Webhookを実行するタイミング"
|
||||
trigger: "トリガー"
|
||||
active: "有効"
|
||||
_events:
|
||||
follow: "フォローしたとき"
|
||||
@@ -2692,3 +2706,9 @@ _mediaControls:
|
||||
pip: "ピクチャインピクチャ"
|
||||
playbackRate: "再生速度"
|
||||
loop: "ループ再生"
|
||||
|
||||
_contextMenu:
|
||||
title: "コンテキストメニュー"
|
||||
app: "アプリケーション"
|
||||
appWithShift: "Shiftキーでアプリケーション"
|
||||
native: "ブラウザのUI"
|
||||
|
@@ -2391,7 +2391,6 @@ _webhookSettings:
|
||||
createWebhook: "Webhookをつくる"
|
||||
name: "名前"
|
||||
secret: "シークレット"
|
||||
events: "Webhookを投げるタイミング"
|
||||
active: "有効"
|
||||
_events:
|
||||
follow: "フォローしたとき~!"
|
||||
|
@@ -180,6 +180,10 @@ addAccount: "계정 추가"
|
||||
reloadAccountsList: "계정 목록 새로고침"
|
||||
loginFailed: "로그인에 실패했습니다"
|
||||
showOnRemote: "리모트에서 보기"
|
||||
continueOnRemote: "리모트에서 계속"
|
||||
chooseServerOnMisskeyHub: "Misskey Hub에서 서버 찾아보기"
|
||||
specifyServerHost: "서버 도메인 직접 지정"
|
||||
inputHostName: "도메인을 입력하세요"
|
||||
general: "일반"
|
||||
wallpaper: "배경"
|
||||
setWallpaper: "배경 설정"
|
||||
@@ -477,6 +481,7 @@ noMessagesYet: "아직 대화가 없습니다"
|
||||
newMessageExists: "새 메시지가 있습니다"
|
||||
onlyOneFileCanBeAttached: "메시지에 첨부할 수 있는 파일은 하나까지입니다"
|
||||
signinRequired: "진행하기 전에 로그인을 해 주세요"
|
||||
signinOrContinueOnRemote: "계속하려면 사용하는 서버로 이동하거나 이 서버에 로그인해야 합니다."
|
||||
invitations: "초대"
|
||||
invitationCode: "초대 코드"
|
||||
checking: "확인하는 중입니다"
|
||||
@@ -1242,6 +1247,8 @@ keepOriginalFilenameDescription: "이 설정을 끄면 업로드를 할 때 파
|
||||
noDescription: "설명문이 없습니다"
|
||||
alwaysConfirmFollow: "팔로우일 때 항상 확인하기"
|
||||
inquiry: "문의하기"
|
||||
tryAgain: "다시 시도해 주세요."
|
||||
confirmWhenRevealingSensitiveMedia: "민감한 미디어를 열 때 두 번 확인"
|
||||
_delivery:
|
||||
status: "전송 상태"
|
||||
stop: "정지됨"
|
||||
@@ -1694,6 +1701,7 @@ _role:
|
||||
canManageAvatarDecorations: "아바타 꾸미기 관리"
|
||||
driveCapacity: "드라이브 용량"
|
||||
alwaysMarkNsfw: "파일을 항상 NSFW로 지정"
|
||||
canUpdateBioMedia: "아바타 및 배너 이미지 변경 허용"
|
||||
pinMax: "고정할 수 있는 노트 수"
|
||||
antennaMax: "만들 수 있는 안테나 수"
|
||||
wordMuteMax: "단어 뮤트할 수 있는 문자 수"
|
||||
@@ -2403,7 +2411,6 @@ _webhookSettings:
|
||||
modifyWebhook: "Webhook 수정"
|
||||
name: "이름"
|
||||
secret: "시크릿"
|
||||
events: "Webhook을 실행할 타이밍"
|
||||
active: "활성화"
|
||||
_events:
|
||||
follow: "누군가를 팔로우했을 때"
|
||||
@@ -2416,6 +2423,7 @@ _webhookSettings:
|
||||
_systemEvents:
|
||||
abuseReport: "유저로부터 신고를 받았을 때"
|
||||
abuseReportResolved: "받은 신고를 처리했을 때"
|
||||
userCreated: "유저가 생성되었을 때"
|
||||
deleteConfirm: "Webhook을 삭제할까요?"
|
||||
_abuseReport:
|
||||
_notificationRecipient:
|
||||
|
@@ -1544,7 +1544,6 @@ _webhookSettings:
|
||||
createWebhook: "Stwórz Webhook"
|
||||
name: "Nazwa"
|
||||
secret: "Sekret"
|
||||
events: "Uruchomienie Webhooka"
|
||||
active: "Właczono"
|
||||
_events:
|
||||
follow: "Po zaobserwowaniu użytkownika"
|
||||
|
@@ -60,6 +60,7 @@ copyFileId: "คัดลอกไฟล์ ID"
|
||||
copyFolderId: "คัดลอกโฟลเดอร์ ID"
|
||||
copyProfileUrl: "คัดลอกโปรไฟล์ URL"
|
||||
searchUser: "ค้นหาผู้ใช้"
|
||||
searchThisUsersNotes: "ค้นหาโน้ตของผู้ใช้"
|
||||
reply: "ตอบกลับ"
|
||||
loadMore: "แสดงเพิ่มเติม"
|
||||
showMore: "แสดงเพิ่มเติม"
|
||||
@@ -154,6 +155,7 @@ editList: "แก้ไขรายชื่อ"
|
||||
selectChannel: "เลือกช่อง"
|
||||
selectAntenna: "เลือกเสาอากาศ"
|
||||
editAntenna: "แก้ไขเสาอากาศ"
|
||||
createAntenna: "สร้างเสาอากาศ"
|
||||
selectWidget: "เลือกวิดเจ็ต"
|
||||
editWidgets: "แก้ไขวิดเจ็ต"
|
||||
editWidgetsExit: "เรียบร้อย"
|
||||
@@ -194,6 +196,7 @@ followConfirm: "ต้องการติดตาม {name} ใช่ไห
|
||||
proxyAccount: "บัญชีพร็อกซี่"
|
||||
proxyAccountDescription: "บัญชีพร็อกซี คือ บัญชีที่ทำหน้าที่ติดตาม(ผู้ใช้)ระยะไกลภายใต้เงื่อนไขบางประการ ตัวอย่างเช่น เมื่อผู้ใช้ท้องถิ่นเพิ่มผู้ใช้ระยะไกลลงรายชื่อ หากไม่มีใครติดตามผู้ใช้ระยะไกลในรายชื่อนั้น กิจกรรมก็จะไม่ถูกส่งมายังเซิร์ฟเวอร์ ดังนั้นจึงมีบัญชีพร็อกซีไว้ติดตามผู้ใช้ระยะไกลเหล่านั้น"
|
||||
host: "โฮสต์"
|
||||
selectSelf: "เลือกตัวเอง"
|
||||
selectUser: "เลือกผู้ใช้งาน"
|
||||
recipient: "ผู้รับ"
|
||||
annotation: "หมายเหตุประกอบ"
|
||||
@@ -209,6 +212,7 @@ perDay: "ต่อวัน"
|
||||
stopActivityDelivery: "หยุดส่งกิจกรรม"
|
||||
blockThisInstance: "บล็อกเซิร์ฟเวอร์นี้"
|
||||
silenceThisInstance: "ปิดปากเซิร์ฟเวอร์นี้"
|
||||
mediaSilenceThisInstance: "ปิดปากสื่อของเซิร์ฟเวอร์นี้"
|
||||
operations: "ดำเนินการ"
|
||||
software: "ซอฟต์แวร์"
|
||||
version: "เวอร์ชั่น"
|
||||
@@ -230,6 +234,8 @@ blockedInstances: "เซิร์ฟเวอร์ที่ถูกบล็
|
||||
blockedInstancesDescription: "ระบุโฮสต์ของเซิร์ฟเวอร์ที่ต้องการบล็อก คั่นด้วยการขึ้นบรรทัดใหม่ เซิร์ฟเวอร์ที่ถูกบล็อกจะไม่สามารถติดต่อกับอินสแตนซ์นี้ได้"
|
||||
silencedInstances: "ปิดปากเซิร์ฟเวอร์นี้แล้ว"
|
||||
silencedInstancesDescription: "ระบุโฮสต์ของเซิร์ฟเวอร์ที่ต้องการปิดปาก คั่นด้วยการขึ้นบรรทัดใหม่, บัญชีทั้งหมดของเซิร์ฟเวอร์ดังกล่าวจะถือว่าถูกปิดปากเช่นกัน ทำได้เฉพาะคำขอติดตามเท่านั้น และไม่สามารถกล่าวถึงบัญชีในเซิร์ฟเวอร์นี้ได้หากไม่ได้ถูกติดตามกลับ | สิ่งนี้ไม่มีผลต่ออินสแตนซ์ที่ถูกบล็อก"
|
||||
mediaSilencedInstances: "เซิร์ฟเวอร์ที่ถูกปิดปากสื่อ"
|
||||
mediaSilencedInstancesDescription: "ระบุโฮสต์ของเซิร์ฟเวอร์ที่ต้องการปิดปากสื่อ คั่นด้วยการขึ้นบรรทัดใหม่, ไฟล์ที่ถูกส่งจากบัญชีของเซิร์ฟเวอร์ดังกล่าวจะถือว่าถูกปิดปาก แล้วจะถูกติดเครื่องหมายว่ามีเนื้อหาละเอียดอ่อน และเอโมจิแบบกำหนดเองก็จะใช้ไม่ได้ด้วย | สิ่งนี้ไม่มีผลต่ออินสแตนซ์ที่ถูกบล็อก"
|
||||
muteAndBlock: "ปิดเสียงและบล็อก"
|
||||
mutedUsers: "ผู้ใช้ที่ถูกปิดเสียง"
|
||||
blockedUsers: "ผู้ใช้ที่ถูกบล็อก"
|
||||
@@ -443,7 +449,7 @@ moderator: "ผู้ควบคุม"
|
||||
moderation: "การกลั่นกรอง"
|
||||
moderationNote: "โน้ตการกลั่นกรอง"
|
||||
addModerationNote: "เพิ่มโน้ตการกลั่นกรอง"
|
||||
moderationLogs: "ปูมการแก้ไข"
|
||||
moderationLogs: "ปูมการควบคุมดูแล"
|
||||
nUsersMentioned: "กล่าวถึงโดยผู้ใช้ {n} ราย"
|
||||
securityKeyAndPasskey: "ความปลอดภัยและรหัสผ่าน"
|
||||
securityKey: "กุญแจความปลอดภัย"
|
||||
@@ -509,7 +515,7 @@ showReactionsCount: "แสดงจำนวนรีแอกชั่นใ
|
||||
noHistory: "ไม่มีประวัติ"
|
||||
signinHistory: "ประวัติการเข้าสู่ระบบ"
|
||||
enableAdvancedMfm: "เปิดใช้งาน MFM ขั้นสูง"
|
||||
enableAnimatedMfm: "เปิดการใช้งาน MFM ด้วยแอนิเมชั่น"
|
||||
enableAnimatedMfm: "เปิดการใช้งาน MFM แบบเคลื่อนไหว"
|
||||
doing: "กำลังประมวลผล......"
|
||||
category: "หมวดหมู่"
|
||||
tags: "นามแฝง"
|
||||
@@ -625,7 +631,7 @@ enablePlayer: "เปิดเครื่องเล่นวิดีโอ"
|
||||
disablePlayer: "ปิดเครื่องเล่นวิดีโอ"
|
||||
expandTweet: "ขยายทวีต"
|
||||
themeEditor: "ตัวแก้ไขธีม"
|
||||
description: "รายละเอียด"
|
||||
description: "คำอธิบาย"
|
||||
describeFile: "เพิ่มแคปชั่น"
|
||||
enterFileDescription: "ใส่แคปชั่น"
|
||||
author: "ผู้เขียน"
|
||||
@@ -666,7 +672,7 @@ smtpSecure: "ใช้โดยนัย SSL/TLS สำหรับการเ
|
||||
smtpSecureInfo: "ปิดสิ่งนี้เมื่อใช้ STARTTLS"
|
||||
testEmail: "ทดสอบการส่งอีเมล"
|
||||
wordMute: "ปิดเสียงคำ"
|
||||
hardWordMute: "ปิดเสียงคำยาก"
|
||||
hardWordMute: "ปิดเสียงคำแบบแข็งโป๊ก"
|
||||
regexpError: "เกิดข้อผิดพลาดใน regular expression"
|
||||
regexpErrorDescription: "เกิดข้อผิดพลาดใน regular expression บรรทัดที่ {line} ของการปิดเสียงคำ {tab} :"
|
||||
instanceMute: "ปิดเสียงเซิร์ฟเวอร์"
|
||||
@@ -1034,7 +1040,7 @@ thisPostMayBeAnnoyingIgnore: "โพสต์ยังไงก็แล้ว
|
||||
collapseRenotes: "ยุบรีโน้ตที่คุณเคยเห็นแล้ว"
|
||||
collapseRenotesDescription: "พับย่อโน้ตที่เคยตอบสนองหรือรีโน้ตแล้ว"
|
||||
internalServerError: "เซิร์ฟเวอร์ภายในเกิดข้อผิดพลาด"
|
||||
internalServerErrorDescription: "เซิร์ฟเวอร์รันค้นพบข้อผิดพลาดที่ไม่คาดคิด"
|
||||
internalServerErrorDescription: "เกิดข้อผิดพลาดที่ไม่คาดคิดภายในเซิร์ฟเวอร์"
|
||||
copyErrorInfo: "คัดลอกรายละเอียดข้อผิดพลาด"
|
||||
joinThisServer: "ลงทะเบียนบนเซิร์ฟเวอร์นี้"
|
||||
exploreOtherServers: "มองหาเซิร์ฟเวอร์อื่น"
|
||||
@@ -1042,7 +1048,7 @@ letsLookAtTimeline: "มาดูไทม์ไลน์กัน"
|
||||
disableFederationConfirm: "ปิดใช้งานสหพันธ์เลยใช่ไหม?"
|
||||
disableFederationConfirmWarn: "โพสต์จะยังคงเป็นสาธารณะต่อไป เว้นแต่จะตั้งค่าเป็นอย่างอื่น"
|
||||
disableFederationOk: "ปิดการใช้งาน"
|
||||
invitationRequiredToRegister: "ขณะนี้เซิร์ฟเวอร์นี้เปิดรับสมาชิกใหม่ผ่านระบบเชิญเท่านั้น ผู้ที่มีรหัสเชิญสามารถลงทะเบียนได้"
|
||||
invitationRequiredToRegister: "เซิร์ฟเวอร์นี้เป็นแบบรับเชิญ เฉพาะผู้มีรหัสเชิญเท่านั้นถึงสามารถลงทะเบียนได้"
|
||||
emailNotSupported: "เซิร์ฟเวอร์นี้ไม่รองรับการส่งอีเมล"
|
||||
postToTheChannel: "โพสต์ลงช่อง"
|
||||
cannotBeChangedLater: "สิ่งนี้ไม่สามารถเปลี่ยนแปลงได้ในภายหลังนะ"
|
||||
@@ -1052,7 +1058,7 @@ likeOnlyForRemote: "ทั้งหมด (เฉพาะการถูกใ
|
||||
nonSensitiveOnly: "เฉพาะไม่มีเนื้อหาละเอียดอ่อน"
|
||||
nonSensitiveOnlyForLocalLikeOnlyForRemote: "เฉพาะไม่มีเนื้อหาละเอียดอ่อน (เฉพาะการถูกใจจากระยะไกลเท่านั้น)"
|
||||
rolesAssignedToMe: "บทบาทที่ได้รับมอบหมายให้ฉัน"
|
||||
resetPasswordConfirm: "รีเซ็ตรหัสผ่านของคุณจริงๆหรอ?"
|
||||
resetPasswordConfirm: "ต้องการรีเซ็ตรหัสผ่านใช่ไหม?"
|
||||
sensitiveWords: "คำที่มีเนื้อหาละเอียดอ่อน"
|
||||
sensitiveWordsDescription: "โน้ตที่มีคำที่ระบุไว้จะถูกตั้งค่าการมองเห็นของให้แสดงเฉพาะในหน้าหลักเท่านั้น คั่นคำด้วยการขึ้นบรรทัดใหม่"
|
||||
sensitiveWordsDescription2: "ถ้าแยกด้วยเว้นวรรคจะเป็นการระบุ AND และถ้าล้อมคำด้วยสแลช (/) จะเป็นการใช้ regular expression"
|
||||
@@ -1106,6 +1112,8 @@ preservedUsernames: "ชื่อผู้ใช้ที่สงวนไว
|
||||
preservedUsernamesDescription: "ระบุชื่อผู้ใช้ที่จะสงวนชื่อไว้ คั่นด้วยการขึ้นบรรทัดใหม่ ชื่อผู้ใช้ที่ระบุที่นี่จะไม่สามารถใช้งานได้อีกต่อไปเมื่อสร้างบัญชีใหม่ ยกเว้นเมื่อผู้ดูแลระบบสร้างบัญชี นอกจากนี้ บัญชีที่มีอยู่แล้วจะไม่ได้รับผลกระทบ"
|
||||
createNoteFromTheFile: "เรียบเรียงโน้ตจากไฟล์นี้"
|
||||
archive: "เก็บถาวร"
|
||||
archived: "เก็บถาวรแล้ว"
|
||||
unarchive: "เลิกการเก็บถาวร"
|
||||
channelArchiveConfirmTitle: "ต้องการเก็บถาวรเจ้า {name} ใช่ไหม?"
|
||||
channelArchiveConfirmDescription: "เมื่อเก็บถาวรแล้ว จะไม่ปรากฏในรายการช่องหรือผลการค้นหาอีกต่อไป และจะไม่สามารถโพสต์ใหม่ได้อีกต่อไป"
|
||||
thisChannelArchived: "ช่องนี้ถูกเก็บถาวรแล้วนะ"
|
||||
@@ -1116,6 +1124,9 @@ preventAiLearning: "ปฏิเสธการเรียนรู้ด้ว
|
||||
preventAiLearningDescription: "ส่งคำร้องขอไม่ให้ใช้ ข้อความในโน้ตที่โพสต์, หรือเนื้อหารูปภาพ ฯลฯ ในการเรียนรู้ของเครื่อง(machine learning) / Predictive AI / Generative AI โดยการเพิ่มแฟล็ก “noai” ลง HTML-Response ให้กับเนื้อหาที่เกี่ยวข้อง แต่ทั้งนี้ ไม่ได้ป้องกัน AI จากการเรียนรู้ได้อย่างสมบูรณ์ เนื่องจากมี AI บางตัวเท่านั้นที่จะเคารพคำขอดังกล่าว"
|
||||
options: "ตัวเลือกบทบาท"
|
||||
specifyUser: "ผู้ใช้เฉพาะ"
|
||||
lookupConfirm: "ต้องการเรียกดูข้อมูลใช่ไหม?"
|
||||
openTagPageConfirm: "ต้องการเปิดหน้าแฮชแท็กใช่ไหม?"
|
||||
specifyHost: "ระบุโฮสต์"
|
||||
failedToPreviewUrl: "ไม่สามารถดูตัวอย่างได้"
|
||||
update: "อัปเดต"
|
||||
rolesThatCanBeUsedThisEmojiAsReaction: "บทบาทที่สามารถใช้เอโมจินี้เป็นรีแอคชั่นได้"
|
||||
@@ -1169,7 +1180,7 @@ notifyNotes: "แจ้งเตือนเกี่ยวกับโพสต
|
||||
unnotifyNotes: "หยุดการแจ้งเตือนเกี่ยวกับโน้ตใหม่"
|
||||
authentication: "การตรวจสอบสิทธิ์"
|
||||
authenticationRequiredToContinue: "กรุณายืนยันตัวตนทางอิเล็กทรอนิกส์เพื่อดำเนินการต่อ"
|
||||
dateAndTime: "เวลาประทับ"
|
||||
dateAndTime: "วันเวลา"
|
||||
showRenotes: "แสดงรีโน้ต"
|
||||
edited: "แก้ไขแล้ว"
|
||||
notificationRecieveConfig: "การตั้งค่าการแจ้งเตือน"
|
||||
@@ -1184,7 +1195,7 @@ confirmShowRepliesAll: "การดำเนินการนี้ไม่
|
||||
confirmHideRepliesAll: "การดำเนินการนี้ไม่สามารถย้อนกลับได้ คุณต้องการซ่อนการตอบกลับผู้อื่นจากผู้ใช้ทุกคนที่คุณติดตามอยู่ ไปจากไทม์ไลน์ใช่ไหม?"
|
||||
externalServices: "บริการภายนอก"
|
||||
sourceCode: "ซอร์สโค้ด"
|
||||
sourceCodeIsNotYetProvided: "ซอร์สโค้ดยังไม่พร้อมใช้งาน โปรดติดต่อผู้ดูแลระบบของคุณเพื่อแก้ไขปัญหานี้"
|
||||
sourceCodeIsNotYetProvided: "ซอร์สโค้ดยังไม่พร้อมใช้งาน โปรดติดต่อผู้ดูแลระบบเพื่อแก้ไขปัญหานี้"
|
||||
repositoryUrl: "URL ของ repository"
|
||||
repositoryUrlDescription: "หากมีที่เก็บซอร์สโค้ดที่เปิดเผยต่อสาธารณะ ให้ป้อน URL ที่เก็บซอร์สโค้ดนั้น แต่หากคุณใช้ Misskey ตามต้นฉบับ (ไม่มีการเปลี่ยนแปลงซอร์สโค้ด) ให้ป้อน https://github.com/misskey-dev/misskey"
|
||||
repositoryUrlOrTarballRequired: "หากคุณไม่มี repository สาธารณะ คุณจะต้องจัดเตรียม tarball แทน ดู .config/example.yml สำหรับรายละเอียด"
|
||||
@@ -1250,6 +1261,8 @@ inquiry: "ติดต่อเรา"
|
||||
tryAgain: "โปรดลองอีกครั้ง"
|
||||
confirmWhenRevealingSensitiveMedia: "ตรวจสอบก่อนแสดงสื่อที่มีเนื้อหาละเอียดอ่อน"
|
||||
sensitiveMediaRevealConfirm: "สื่อนี้มีเนื้อหาละเอียดอ่อน, ต้องการแสดงใช่ไหม?"
|
||||
createdLists: "รายชื่อที่ถูกสร้าง"
|
||||
createdAntennas: "เสาอากาศที่ถูกสร้าง"
|
||||
_delivery:
|
||||
status: "สถานะการจัดส่ง"
|
||||
stop: "ระงับการส่ง"
|
||||
@@ -1275,20 +1288,20 @@ _bubbleGame:
|
||||
section2: "เมื่อวัตถุประเภทเดียวกันมารวมกัน พวกมันจะกลายเป็นวัตถุใหม่และคุณจะได้รับคะแนน"
|
||||
section3: "หากวัตถุล้นออกมาจากกล่อง เกมก็จะจบลง ตั้งเป้าทำคะแนนให้สูงด้วยการหลอมวัตถุต่าง ๆ โดยไม่ทำให้ล้นกล่อง!"
|
||||
_announcement:
|
||||
forExistingUsers: "ผู้ใช้งานที่มีอยู่เท่านั้น"
|
||||
forExistingUsersDescription: "การประกาศนี้จะแสดงต่อผู้ใช้ที่มีอยู่ ณ จุดที่เผยแพร่นั้นๆถ้าหากเปิดใช้งาน ถ้าหากปิดใช้งานผู้ที่กำลังสมัครใหม่หลังจากโพสต์แล้วนั้นก็จะเห็นเช่นกัน"
|
||||
forExistingUsers: "ผู้ใช้งานที่มีอยู่ตอนนี้เท่านั้น"
|
||||
forExistingUsersDescription: "หากเปิดใช้งาน การประกาศนี้จะแสดงเฉพาะกับผู้ใช้ที่สร้างบัญชีก่อน/ที่มีอยู่ในขณะที่สร้างประกาศนี้เท่านั้น หากปิดใช้งาน การประกาศนี้จะแสดงกับผู้ใช้ที่สร้างบัญชีหลังจากสร้างประกาศนี้ด้วย"
|
||||
needConfirmationToRead: "จำเป็นต้องยืนยันว่าอ่านแล้ว"
|
||||
needConfirmationToReadDescription: "กล่องโต้ตอบการยืนยันจะปรากฏขึ้นเมื่อจะทำเครื่องหมายว่าอ่านแล้ว นอกจากนี้ยังทำให้ประกาศนี้ยังไม่ถูกอ่านเมื่อใช้ฟังก์ชั่น “ทำเครื่องหมายฯ ทั้งหมดว่าอ่านแล้ว”"
|
||||
end: "เก็บประกาศ"
|
||||
tooManyActiveAnnouncementDescription: "การมีประกาศที่ใช้งานมากเกินไปนั้นอาจจะทำให้ประสบการณ์ของผู้ใช้งานนั้นดูแย่ลง โปรดกรุณาพิจารณาการเก็บประกาศที่ล้าสมัยด้วยนะค่ะ"
|
||||
tooManyActiveAnnouncementDescription: "เนื่องจากมีการประกาศที่ยังใช้งานอยู่จำนวนมาก อาจทำให้ UX ลดลง แนะนำให้พิจารณาการเก็บประกาศที่สิ้นสุดไปแล้ว"
|
||||
readConfirmTitle: "ทำเครื่องหมายว่าอ่านแล้วเลยไหม?"
|
||||
readConfirmText: "จะทำเครื่องหมายใส่ “{title}” ว่าอ่านแล้ว"
|
||||
shouldNotBeUsedToPresentPermanentInfo: "เราขอแนะนำให้ใช้ประกาศเพื่อโพสต์ข้อมูลแบบ flow มากกว่าข้อมูลแบบ stock เนื่องจากมีแนวโน้มที่จะส่งผลเสียต่อ UX โดยเฉพาะสำหรับผู้ใช้ใหม่"
|
||||
shouldNotBeUsedToPresentPermanentInfo: "เนื่องจากมีความเป็นไปได้สูงที่จะส่งผลเสียต่อง UX ของผู้ใช้ใหม่ จึงขอแนะนำให้ใช้ประกาศสำหรับข้อมูลที่ต้องการการตอบสนองในทันที ไม่ใช่ข้อมูลที่ต้องการแสดงตลอดเวลา"
|
||||
dialogAnnouncementUxWarn: "เราขอแนะนำให้ใช้ด้วยความระมัดระวัง เนื่องจากการแจ้งเตือนแบบกล่องโต้ตอบตั้งแต่ 2 รายการขึ้นไปพร้อมกันอาจส่งผลเสียต่อ UX ได้อย่างมาก"
|
||||
silence: "ไม่มีการแจ้งเตือน"
|
||||
silenceDescription: "หากเปิดใช้งาน จะไม่มีการแจ้งเตือนประกาศนี้ และผู้ใช้จะไม่จำเป็นต้องทำเครื่องหมายว่าอ่านแล้ว"
|
||||
_initialAccountSetting:
|
||||
accountCreated: "คุณได้สร้างบัญชีของคุณสำเร็จเรียบร้อยแล้ว!"
|
||||
accountCreated: "สร้างบัญชีเสร็จสมบูรณ์!"
|
||||
letsStartAccountSetup: "สำหรับผู้เริ่มต้นมาตั้งค่าโปรไฟล์ของคุณกันเถอะ"
|
||||
letsFillYourProfile: "ก่อนอื่นมาตั้งค่าโปรไฟล์ของคุณ"
|
||||
profileSetting: "ตั้งค่าโปรไฟล์"
|
||||
@@ -1387,26 +1400,26 @@ _serverSettings:
|
||||
inquiryUrl: "URL สำหรับการติดต่อสอบถาม"
|
||||
inquiryUrlDescription: "ระบุ URL ของหน้าเว็บที่มีแบบฟอร์มสำหรับติดต่อผู้ดูแลเซิร์ฟเวอร์ หรือข้อมูลการติดต่อของผู้ดูแลเซิร์ฟเวอร์"
|
||||
_accountMigration:
|
||||
moveFrom: "ย้ายข้อมูลบัญชีอื่นไปยังอีกบัญชีนี้หนึ่ง"
|
||||
moveFrom: "ย้ายจากบัญชีอื่นมาที่บัญชีนี้"
|
||||
moveFromSub: "สร้างนามแฝงไปยังบัญชีอื่น"
|
||||
moveFromLabel: "บัญชีที่จะย้ายจาก #{n}"
|
||||
moveFromDescription: "หากต้องการโอนข้อมูลจากบัญชีอื่นมายังบัญชีนี้ จำเป็นต้องสร้างบัญชีนามแฝง (alias) ไว้ที่นี่ด้วย\nกรุณากรอกบัญชีเดิมในรูปแบบ: @username@server.example.com\nหากต้องการลบ alias, ให้เว้นว่างไว้แล้วบันทึก (ไม่แนะนำ)"
|
||||
moveTo: "ย้ายข้อมูลบัญชีนี้ไปยังบัญชีอีกหนึ่ง"
|
||||
moveTo: "ย้ายบัญชีนี้ไปยังบัญชีใหม่"
|
||||
moveToLabel: "บัญชีที่จะย้ายไปที่:"
|
||||
moveCannotBeUndone: "ไม่สามารถยกเลิกการโอนย้ายบัญชีได้"
|
||||
moveAccountDescription: "การดำเนินการนี้จะย้ายบัญชีของคุณไปยังบัญชีอื่น\n・ผู้ที่กำลังติดตามคุณจากบัญชีนี้จะถูกย้ายไปยังบัญชีใหม่โดยอัตโนมัติ\n・บัญชีนี้จะเลิกติดตามผู้ใช้ทั้งหมดที่กำลังติดตามอยู่\n・คุณจะไม่สามารถสร้างโน้ต ฯลฯ ในบัญชีนี้ได้\n\nแม้ว่าการย้ายผู้ที่ติดตามคุณจะเป็นไปโดยอัตโนมัติ แต่คุณต้องเตรียมขั้นตอนบางอย่างด้วยตนเอง เพื่อย้ายรายชื่อผู้ใช้ที่คุณกำลังติดตาม โดยดำเนินการส่งออกรายชื่อแล้วค่อยนำเข้ามาภายหลังในเมนูการตั้งค่าของบัญชีใหม่ ใช้ขั้นตอนเดียวกันนี้ใช้รายชื่อผู้ใช้ที่ถูกปิดเสียงและถูกบล็อก\n\n(คำอธิบายนี้ใช้กับ Misskey v13.12.0 ขึ้นไป, ซอฟต์แวร์ ActivityPub อื่นๆ เช่น Mastodon อาจทำงานแตกต่างออกไป)"
|
||||
moveAccountHowTo: "หากต้องการย้ายข้อมูลก่อนอื่นให้สร้างชื่อแทนสำหรับบัญชีนี้ ในบัญชีที่จะต้องการย้ายไป\nหลังจากที่คุณสร้างนามแฝงนั้นแล้ว ให้ป้อนบัญชีที่ต้องการจะย้ายไปในรูปแบบดังต่อไปนี้: @username@server.example.com"
|
||||
moveAccountHowTo: "การย้ายบัญชีจะเริ่มต้นโดยการสร้างบัญชีนามแฝง (alias) ของบัญชีนี้ ณ บัญชีที่เป็นปลายทาง หลังจากสร้างนามแฝงแล้ว ให้ป้อนบัญชีปลายทางในรูปแบบดังนี้: @username@server.example.com"
|
||||
startMigration: "โอนย้าย"
|
||||
migrationConfirm: "ยืนยันการย้ายข้อมูลบัญชีนี้ไปที่ {account} เมื่อเริ่มแล้วจะไม่สามารถหยุดหรือนำกลับคืนมาได้ และคุณจะไม่สามารถใช้บัญชีนี้ในสถานะดั้งเดิมได้อีกต่อไป\n\nนอกจากนี้ คุณจำเป็นต้องสร้างบัญชีสำรองสำหรับการย้ายบัญชี"
|
||||
movedAndCannotBeUndone: "\nบัญชีนี้ถูกโอนย้ายไปแล้ว\nไม่สามารถย้อนกลับโอนย้ายข้อมูลได้"
|
||||
postMigrationNote: "บัญชีนี้จะถูกเลิกติดตามบัญชีทั้งหมดที่กำลังติดตามภายใน 24 ชั่วโมงหลังจากการย้ายข้อมูลนั้นเสร็จสิ้น ทั้งจำนวนผู้ติดตามและผู้ติดตามนั้นจะกลายเป็นศูนย์ เพื่อหลีกเลี่ยงป้องกันไม่ให้ผู้ติดตามของคุณนั้นไม่สามารถเห็นโพสต์เฉพาะผู้ติดตามของบัญชีนี้ได้ แต่อย่างไรก็ตามแล้วพวกเขาจะยังคงติดตามบัญชีนี้ต่อไป"
|
||||
movedTo: "บัญชีที่จะย้ายไปที่:"
|
||||
movedAndCannotBeUndone: "\nบัญชีนี้ถูกโอนย้ายไปแล้ว\nไม่สามารถยกเลิกการโอนย้ายได้"
|
||||
postMigrationNote: "บัญชีนี้จะดำเนินการยกเลิกการติดตามทั้งหมดหลังจากการย้ายข้อมูลไปแล้ว 24 ชั่วโมง จำนวนกำลังติดตามและจำนวนผู้ติดตามของบัญชีนี้จะเป็น 0 และเพื่อหลีกเลี่ยงไม่ให้ผู้ติดตามคุณนั้นไม่สามารถเห็นโพสต์เฉพาะผู้ติดตามฯได้ การยกเลิกการติดตามจะไม่กระทบกับผู้ติดตามคุณ ดังนั้นผู้ติดตามคุณยังคงสามารถดูโพสต์ของบัญชีนี้ได้"
|
||||
movedTo: "บัญชีที่จะย้ายไป:"
|
||||
_achievements:
|
||||
earnedAt: "ได้รับเมื่อ"
|
||||
_types:
|
||||
_notes1:
|
||||
title: "just setting up my msky"
|
||||
description: "โพสต์โน้ตแรกของคุณ"
|
||||
description: "โพสต์โน้ตเป็นครั้งแรก"
|
||||
flavor: "ขอให้มีช่วงเวลาที่ดีกับ Misskey นะคะ!"
|
||||
_notes10:
|
||||
title: "โน้ตไม่กี่ชิ้น"
|
||||
@@ -1506,19 +1519,19 @@ _achievements:
|
||||
flavor: "ขอบคุณที่ใช้ Misskey นะ !"
|
||||
_noteClipped1:
|
||||
title: "อดไม่ได้ที่จะต้องคลิปมันเอาไว้"
|
||||
description: "คลิปโน้ตตัวแรกของคุณ"
|
||||
description: "คลิปโน้ตเป็นครั้งแรก"
|
||||
_noteFavorited1:
|
||||
title: "สตาร์เกเซอร์"
|
||||
description: "ชื่นชอบโน้ตแรกของคุณ"
|
||||
description: "ใส่โน้ตเป็นรายการโปรดเป็นครั้งแรก"
|
||||
_myNoteFavorited1:
|
||||
title: "แสวงหาดวงดาว"
|
||||
description: "มีคนอื่นๆที่ชื่นชอบหนึ่งในโน้ตของคุณ"
|
||||
description: "โน้ตตัวเองถูกคนอื่นเพิ่มลงรายการโปรดของเขา"
|
||||
_profileFilled:
|
||||
title: "เตรียมตัวอย่างดี"
|
||||
description: "ตั้งค่าโปรไฟล์ของคุณ"
|
||||
description: "ตั้งค่าโปรไฟล์"
|
||||
_markedAsCat:
|
||||
title: "ฉันเป็นแมว"
|
||||
description: "ทำเครื่องหมายบัญชีของคุณว่าเป็นแมว"
|
||||
description: "ตั้งค่าบัญชีเป็นแมวเมี้ยวเมี้ยว"
|
||||
flavor: "แมวน้อยไร้ชื่อ"
|
||||
_following1:
|
||||
title: "ก้าวแรกสู่...กดติดตาม"
|
||||
@@ -1561,7 +1574,7 @@ _achievements:
|
||||
description: "ได้รับความสำเร็จ 30 ครั้ง"
|
||||
_viewAchievements3min:
|
||||
title: "ชอบบรรลุความสําเร็จ"
|
||||
description: "มองดูรายการความสำเร็จของคุณเป็นเวลาอย่างน้อย 3 นาที"
|
||||
description: "มองดูรายการความสำเร็จเป็นเวลานานกว่า 3 นาที"
|
||||
_iLoveMisskey:
|
||||
title: "ฉันรัก Misskey"
|
||||
description: "โพสต์ “I ❤ #Misskey”"
|
||||
@@ -1588,13 +1601,13 @@ _achievements:
|
||||
flavor: "โป๊ะ โป๊ะ โป๊ะ ปิ้งงงงง"
|
||||
_selfQuote:
|
||||
title: "อ้างอิงตนเอง"
|
||||
description: "อ้างโน้ตของคุณเอง"
|
||||
description: "อ้างอิงโน้ตตัวเอง"
|
||||
_htl20npm:
|
||||
title: "ไทม์ไลน์ไหล"
|
||||
description: "มีการทำความเร็วของไทม์ไลน์หลักเกิน 20 npm (โน้ตต่อนาที)"
|
||||
_viewInstanceChart:
|
||||
title: "วิเคราะห์"
|
||||
description: "ดูแผนภูมิเซิร์ฟเวอร์ของคุณ"
|
||||
description: "ดูแผนภูมิของเซิร์ฟเวอร์"
|
||||
_outputHelloWorldOnScratchpad:
|
||||
title: "หวัดดีชาวโลก!"
|
||||
description: "เอาพุต \"hello world\" ใน Scratchpad"
|
||||
@@ -1615,16 +1628,16 @@ _achievements:
|
||||
description: "มีโอกาสที่จะได้รับด้วยความน่าจะเป็นไปได้ 0.005% ทุก ๆ 10 วินาที"
|
||||
_setNameToSyuilo:
|
||||
title: "คอมเพล็กซ์ของพระเจ้า"
|
||||
description: "ตั้งชื่อของคุณเป็น “syuilo”"
|
||||
description: "ตั้งชื่อเป็น “syuilo”"
|
||||
_passedSinceAccountCreated1:
|
||||
title: "ครบรอบหนึ่งปี"
|
||||
description: "ผ่านไปหนึ่งปีแล้วนะตั้งแต่บัญชีของคุณถูกสร้างขึ้นมาน่ะ"
|
||||
description: "ผ่านไป 1 ปีนับตั้งแต่สร้างบัญชี"
|
||||
_passedSinceAccountCreated2:
|
||||
title: "ครบรอบสองปี"
|
||||
description: "ผ่านไปสองปีแล้วนะตั้งแต่บัญชีของคุณถูกสร้างขึ้นมาน่ะ"
|
||||
description: "ผ่านไป 2 ปีนับตั้งแต่สร้างบัญชี"
|
||||
_passedSinceAccountCreated3:
|
||||
title: "ครบรอบสามปี"
|
||||
description: "ผ่านไปสามปีแล้วนะตั้งแต่บัญชีของคุณถูกสร้างขึ้นมาน่ะ"
|
||||
description: "ผ่านไป 3 ปีนับตั้งแต่สร้างบัญชี"
|
||||
_loggedInOnBirthday:
|
||||
title: "สุขสันต์วันเกิด"
|
||||
description: "เข้าสู่ระบบในวันเกิดของคุณ"
|
||||
@@ -1672,8 +1685,8 @@ _role:
|
||||
descriptionOfIsPublic: "บทบาทจะปรากฏบนโปรไฟล์ของผู้ใช้และเปิดเผยต่อสาธารณะ (ทุกคนสามารถเห็นได้ว่าผู้ใช้รายนี้มีบทบาทนี้)"
|
||||
options: "ตัวเลือกบทบาท"
|
||||
policies: "นโยบาย"
|
||||
baseRole: "เทมเพลตบทบาท"
|
||||
useBaseValue: "ใช้ตามเทมเพลตบทบาท"
|
||||
baseRole: "แม่แบบบทบาท"
|
||||
useBaseValue: "ใช้ตามแม่แบบบทบาท"
|
||||
chooseRoleToAssign: "เลือกบทบาทที่ต้องการกำหนด"
|
||||
iconUrl: "URL ไอคอน"
|
||||
asBadge: "แสดงเป็นตรา"
|
||||
@@ -1797,7 +1810,7 @@ _plugin:
|
||||
viewSource: "ดูต้นฉบับ"
|
||||
viewLog: "แสดงปูม"
|
||||
_preferencesBackups:
|
||||
list: "การตั้งค่าสำรองที่สร้างไว้"
|
||||
list: "การตั้งค่าที่สำรองไว้"
|
||||
saveNew: "บันทึกการตั้งค่าสำรองใหม่"
|
||||
loadFile: "โหลดจากไฟล์"
|
||||
apply: "นำไปใช้กับอุปกรณ์นี้"
|
||||
@@ -1864,7 +1877,7 @@ _menuDisplay:
|
||||
hide: "ซ่อน"
|
||||
_wordMute:
|
||||
muteWords: "ปิดเสียงคำ"
|
||||
muteWordsDescription: "คั่นด้วยช่องว่างสำหรับเงื่อนไข AND หรือด้วยการขึ้นบรรทัดใหม่สำหรับเงื่อนไข OR นะ"
|
||||
muteWordsDescription: "คั่นด้วยเว้นวรรคสำหรับเงื่อนไข AND, หรือขึ้นบรรทัดใหม่สำหรับเงื่อนไข OR"
|
||||
muteWordsDescription2: "ล้อมรอบคีย์เวิร์ดด้วยเครื่องหมายทับเพื่อใช้นิพจน์ทั่วไป"
|
||||
_instanceMute:
|
||||
instanceMuteDescription: "ปิดเสียง “โน้ต/รีโน้ต” ทั้งหมดจากเซิร์ฟเวอร์ที่ระบุไว้ รวมถึงโน้ตของผู้ใช้ที่ตอบกลับผู้ใช้จากเซิร์ฟเวอร์ที่ถูกปิดเสียง"
|
||||
@@ -1954,6 +1967,7 @@ _soundSettings:
|
||||
driveFileTypeWarnDescription: "กรุณาเลือกไฟล์เสียง"
|
||||
driveFileDurationWarn: "เสียงยาวเกินไป"
|
||||
driveFileDurationWarnDescription: "การใช้เสียงที่ยาว อาจรบกวนการใช้งาน Misskey, ต้องการดำเนินการต่อใช่ไหม?"
|
||||
driveFileError: "ไม่สามารถโหลดไฟล์เสียงได้ กรุณาเปลี่ยนแปลงการตั้งค่า"
|
||||
_ago:
|
||||
future: "อนาคต"
|
||||
justNow: "เมื่อกี๊นี้"
|
||||
@@ -2008,38 +2022,38 @@ _2fa:
|
||||
backupCodesExhaustedWarning: "รหัสแบ๊กอัปทั้งหมดถูกใช้งานแล้ว หากยังไม่สามารถใช้แอปพลิเคชันการยืนยันตัวตนได้ก็จะไม่สามารถเข้าถึงบัญชีนี้ได้อีกต่อไป กรุณาลงทะเบียนแอปพลิเคชันการยืนยันตัวตนใหม่"
|
||||
moreDetailedGuideHere: "คลิกที่นี่เพื่อดูคำแนะนำโดยละเอียด"
|
||||
_permissions:
|
||||
"read:account": "ดูข้อมูลบัญชีของคุณ"
|
||||
"write:account": "แก้ไขข้อมูลบัญชีของคุณ"
|
||||
"read:blocks": "ดูรายชื่อผู้ใช้ที่ถูกบล็อกของคุณ"
|
||||
"write:blocks": "แก้ไขรายชื่อผู้ใช้ที่ถูกบล็อกของคุณ"
|
||||
"read:drive": "เข้าถึงไฟล์และโฟลเดอร์ในไดรฟ์ของคุณ"
|
||||
"write:drive": "แก้ไขหรือลบไฟล์และโฟลเดอร์ในไดรฟ์ของคุณ"
|
||||
"read:account": "ดูข้อมูลบัญชี"
|
||||
"write:account": "แก้ไขข้อมูลบัญชี"
|
||||
"read:blocks": "ดูรายชื่อผู้ใช้ที่ถูกบล็อก"
|
||||
"write:blocks": "แก้ไขรายชื่อผู้ใช้ที่ถูกบล็อก"
|
||||
"read:drive": "เข้าถึงไดรฟ์"
|
||||
"write:drive": "จัดการไดรฟ์"
|
||||
"read:favorites": "ดูรายการโปรด"
|
||||
"write:favorites": "แก้ไขรายการโปรด"
|
||||
"read:following": "ดูข้อมูลว่าใครที่คุณติดตาม"
|
||||
"write:following": "ติดตามหรือเลิกติดตามบัญชีอื่น"
|
||||
"read:messaging": "ดูแชทของคุณ"
|
||||
"read:messaging": "ดูแชท"
|
||||
"write:messaging": "เขียนหรือลบข้อความแชท"
|
||||
"read:mutes": "ดูรายชื่อผู้ใช้ที่ปิดเสียงของคุณ"
|
||||
"read:mutes": "ดูรายชื่อผู้ใช้ที่ถูกปิดเสียง"
|
||||
"write:mutes": "แก้ไขรายชื่อผู้ใช้ที่ถูกปิดเสียง"
|
||||
"write:notes": "เขียนหรือลบโน้ต"
|
||||
"read:notifications": "ดูการแจ้งเตือนของคุณ"
|
||||
"write:notifications": "จัดการแจ้งเตือนของคุณ"
|
||||
"read:reactions": "ดูรีแอคชั่นของคุณ"
|
||||
"write:reactions": "แก้ไขรีแอคชั่นของคุณ"
|
||||
"read:notifications": "ดูการแจ้งเตือน"
|
||||
"write:notifications": "จัดการแจ้งเตือน"
|
||||
"read:reactions": "ดูรีแอคชั่น"
|
||||
"write:reactions": "แก้ไขรีแอคชั่น"
|
||||
"write:votes": "โหวตบนสำรวจความคิดเห็น"
|
||||
"read:pages": "ดูหน้าเพจ"
|
||||
"write:pages": "แก้ไขหรือลบเพจของคุณ"
|
||||
"write:pages": "แก้ไขหรือลบเพจ"
|
||||
"read:page-likes": "ดูรายการเพจที่ถูกใจไว้"
|
||||
"write:page-likes": "แก้ไขรายการเพจที่ถูกใจ"
|
||||
"read:user-groups": "ดูกลุ่มผู้ใช้ของคุณ"
|
||||
"write:user-groups": "แก้ไขหรือลบกลุ่มผู้ใช้ของคุณ"
|
||||
"read:channels": "ดูแชนแนลของคุณ"
|
||||
"write:channels": "แก้ไขแชนแนลของคุณ"
|
||||
"read:user-groups": "ดูกลุ่มผู้ใช้"
|
||||
"write:user-groups": "แก้ไขหรือลบกลุ่มผู้ใช้"
|
||||
"read:channels": "ดูช่อง"
|
||||
"write:channels": "แก้ไขช่อง"
|
||||
"read:gallery": "ดูแกลเลอรี่"
|
||||
"write:gallery": "แก้ไขแกลเลอรี่ของคุณ"
|
||||
"read:gallery-likes": "ดูรายการโพสต์แกลเลอรีที่ถูกใจไว้"
|
||||
"write:gallery-likes": "แก้ไขรายการโพสต์แกลเลอรีที่ถูกใจไว้"
|
||||
"write:gallery": "แก้ไขแกลเลอรี"
|
||||
"read:gallery-likes": "ดูแกลเลอรีที่ถูกใจไว้"
|
||||
"write:gallery-likes": "จัดการแกลเลอรีที่ถูกใจไว้"
|
||||
"read:flash": "ดู Play"
|
||||
"write:flash": "แก้ไข Play"
|
||||
"read:flash-likes": "ดูรายการ play ที่ถูกใจไว้"
|
||||
@@ -2048,20 +2062,20 @@ _permissions:
|
||||
"write:admin:delete-account": "ลบบัญชีผู้ใช้"
|
||||
"write:admin:delete-all-files-of-a-user": "ลบไฟล์ทั้งหมดของผู้ใช้"
|
||||
"read:admin:index-stats": "ดูข้อมูลเกี่ยวกับดัชนีฐานข้อมูล"
|
||||
"read:admin:table-stats": "ดูข้อมูลเกี่ยวกับตารางฐานข้อมูล"
|
||||
"read:admin:table-stats": "ดูข้อมูลเกี่ยวกับตารางในฐานข้อมูล"
|
||||
"read:admin:user-ips": "ดูที่อยู่ IP ของผู้ใช้"
|
||||
"read:admin:meta": "ดูข้อมูลเมตาของอินสแตนซ์"
|
||||
"read:admin:meta": "ดูข้อมูลอภิพันธุ์ของอินสแตนซ์"
|
||||
"write:admin:reset-password": "รีเซ็ตรหัสผ่านของผู้ใช้"
|
||||
"write:admin:resolve-abuse-user-report": "แก้ไขรายงานจากผู้ใช้"
|
||||
"write:admin:send-email": "ส่งอีเมล"
|
||||
"read:admin:server-info": "ดูข้อมูลเซิร์ฟเวอร์"
|
||||
"read:admin:show-moderation-log": "ดูปูมการแก้ไข"
|
||||
"read:admin:show-moderation-log": "ดูปูมการควบคุมดูแล"
|
||||
"read:admin:show-user": "ดูข้อมูลส่วนตัวของผู้ใช้"
|
||||
"write:admin:suspend-user": "ระงับผู้ใช้"
|
||||
"write:admin:unset-user-avatar": "ลบอวตารผู้ใช้"
|
||||
"write:admin:unset-user-banner": "ลบแบนเนอร์ผู้ใช้"
|
||||
"write:admin:unsuspend-user": "ยกเลิกการระงับผู้ใช้"
|
||||
"write:admin:meta": "จัดการข้อมูลเมตาของอินสแตนซ์"
|
||||
"write:admin:meta": "จัดการข้อมูลอภิพันธุ์ของอินสแตนซ์"
|
||||
"write:admin:user-note": "จัดการโน้ตการกลั่นกรอง"
|
||||
"write:admin:roles": "จัดการบทบาท"
|
||||
"read:admin:roles": "ดูบทบาท"
|
||||
@@ -2088,8 +2102,8 @@ _permissions:
|
||||
"read:admin:ad": "ดูโฆษณา"
|
||||
"write:invite-codes": "สร้างรหัสเชิญ"
|
||||
"read:invite-codes": "รับรหัสเชิญ"
|
||||
"write:clip-favorite": "ควบคุมการถูกใจของคลิป"
|
||||
"read:clip-favorite": "ดูการถูกใจของคลิป"
|
||||
"write:clip-favorite": "จัดการคลิปที่ถูกใจ"
|
||||
"read:clip-favorite": "ดูคลิปที่ถูกใจ"
|
||||
"read:federation": "รับข้อมูลเกี่ยวกับสหพันธ์"
|
||||
"write:report-abuse": "รายงานการละเมิด"
|
||||
_auth:
|
||||
@@ -2165,7 +2179,7 @@ _poll:
|
||||
deadlineTime: "เวลา"
|
||||
duration: "ระยะเวลา"
|
||||
votesCount: "{n} คะแนนเสียง"
|
||||
totalVotes: "{n} คะแนนเสียงทั้งหมด"
|
||||
totalVotes: "ทั้งหมด {n} คะแนนเสียง"
|
||||
vote: "โหวต"
|
||||
showResult: "ดูผลลัพธ์"
|
||||
voted: "โหวตแล้ว"
|
||||
@@ -2266,7 +2280,7 @@ _play:
|
||||
featured: "เป็นที่นิยม"
|
||||
title: "หัวข้อ"
|
||||
script: "สคริปต์"
|
||||
summary: "รายละเอียด"
|
||||
summary: "คำอธิบาย"
|
||||
visibilityDescription: "หากตั้งค่าเป็นส่วนตัว มันจะไม่ปรากฏในโปรไฟล์อีกต่อไป แต่ผู้ที่ทราบ URL ของมันจะยังสามารถเข้าถึงได้"
|
||||
_pages:
|
||||
newPage: "สร้างหน้าเพจใหม่"
|
||||
@@ -2412,7 +2426,6 @@ _webhookSettings:
|
||||
modifyWebhook: "แก้ไข Webhook"
|
||||
name: "ชื่อ"
|
||||
secret: "ความลับ"
|
||||
events: "อีเว้นท์ Webhook"
|
||||
active: "เปิดใช้งาน"
|
||||
_events:
|
||||
follow: "เมื่อกำลังติดตามผู้ใช้"
|
||||
@@ -2425,6 +2438,7 @@ _webhookSettings:
|
||||
_systemEvents:
|
||||
abuseReport: "เมื่อมีการรายงานจากผู้ใช้"
|
||||
abuseReportResolved: "เมื่อมีการจัดการกับการรายงานจากผู้ใช้"
|
||||
userCreated: "เมื่อผู้ใช้ถูกสร้างขึ้น"
|
||||
deleteConfirm: "ต้องการลบ Webhook ใช่ไหม?"
|
||||
_abuseReport:
|
||||
_notificationRecipient:
|
||||
@@ -2535,7 +2549,7 @@ _externalResourceInstaller:
|
||||
description: "เกิดปัญหาระหว่างการติดตั้งธีม กรุณาลองอีกครั้ง. รายละเอียดข้อผิดพลาดสามารถดูได้ในคอนโซล Javascript"
|
||||
_dataSaver:
|
||||
_media:
|
||||
title: "โหลดมีเดีย"
|
||||
title: "โหลดสื่อ"
|
||||
description: "กันไม่ให้ภาพและวิดีโอโหลดโดยอัตโนมัติ แตะรูปภาพ/วิดีโอที่ซ่อนอยู่เพื่อโหลด"
|
||||
_avatar:
|
||||
title: "รูปไอคอน"
|
||||
@@ -2615,3 +2629,8 @@ _mediaControls:
|
||||
pip: "รูปภาพในรูปภาม"
|
||||
playbackRate: "ความเร็วในการเล่น"
|
||||
loop: "เล่นวนซ้ำ"
|
||||
_contextMenu:
|
||||
title: "เมนูเนื้อหา"
|
||||
app: "แอปพลิเคชัน"
|
||||
appWithShift: "แอปฟลิเคชันด้วยปุ่มยกแคร่ (Shift)"
|
||||
native: "UI ของเบราว์เซอร์"
|
||||
|
@@ -1918,7 +1918,6 @@ _webhookSettings:
|
||||
createWebhook: "Tạo Webhook"
|
||||
name: "Tên"
|
||||
secret: "Mã bí mật"
|
||||
events: "Sự kiện Webhook"
|
||||
active: "Đã bật"
|
||||
_events:
|
||||
reaction: "Khi nhận được sự kiện"
|
||||
|
@@ -60,6 +60,7 @@ copyFileId: "复制文件ID"
|
||||
copyFolderId: "复制文件夹ID"
|
||||
copyProfileUrl: "复制个人资料URL"
|
||||
searchUser: "搜索用户"
|
||||
searchThisUsersNotes: "搜索用户帖子"
|
||||
reply: "回复"
|
||||
loadMore: "查看更多"
|
||||
showMore: "查看更多"
|
||||
@@ -154,6 +155,7 @@ editList: "编辑列表"
|
||||
selectChannel: "选择频道"
|
||||
selectAntenna: "选择天线"
|
||||
editAntenna: "编辑天线"
|
||||
createAntenna: "创建天线"
|
||||
selectWidget: "选择小工具"
|
||||
editWidgets: "编辑部件"
|
||||
editWidgetsExit: "完成编辑"
|
||||
@@ -194,6 +196,7 @@ followConfirm: "你确定要关注 {name} 吗?"
|
||||
proxyAccount: "代理账户"
|
||||
proxyAccountDescription: "代理账户是在某些情况下替代用户进行远程关注用的账户。 例如说,当用户将一位远程用户放入一个列表中时,如果本地服务器上没有任何人关注这位远程用户,则这位远程用户的账户活动将不会被送到本地服务器上。作为替代,此时将使用代理账户进行关注。"
|
||||
host: "主机名"
|
||||
selectSelf: "选择自己"
|
||||
selectUser: "选择用户"
|
||||
recipient: "收件人"
|
||||
annotation: "注解"
|
||||
@@ -209,6 +212,7 @@ perDay: "每天"
|
||||
stopActivityDelivery: "停止发送活动"
|
||||
blockThisInstance: "阻止此服务器向本服务器推流"
|
||||
silenceThisInstance: "使服务器静音"
|
||||
mediaSilenceThisInstance: "隐藏此服务器的媒体文件"
|
||||
operations: "操作"
|
||||
software: "软件"
|
||||
version: "版本"
|
||||
@@ -227,9 +231,11 @@ clearQueueConfirmText: "未送达的帖子将不会被投递。 通常无需执
|
||||
clearCachedFiles: "清除缓存"
|
||||
clearCachedFilesConfirm: "确定要清除所有缓存的远程文件?"
|
||||
blockedInstances: "被封锁的服务器"
|
||||
blockedInstancesDescription: "设定要封锁的服务器,以换行来进行分割。被封锁的服务器将无法与本服务器进行交换通讯。子域名也同样会被封锁。"
|
||||
blockedInstancesDescription: "设定要封锁的服务器,以换行分隔。被封锁的服务器将无法与本服务器进行交换通讯。子域名也同样会被封锁。"
|
||||
silencedInstances: "被静音的服务器"
|
||||
silencedInstancesDescription: "设置要静音的服务器,以换行符分隔。被静音的服务器内所有的账户将默认处于「静音」状态,仅能发送关注请求,并且在未关注状态下无法提及本地账户。被阻止的实例不受影响。"
|
||||
silencedInstancesDescription: "设置要静音的服务器,以换行分隔。被静音的服务器内所有的账户将默认处于「静音」状态,仅能发送关注请求,并且在未关注状态下无法提及本地账户。被阻止的实例不受影响。"
|
||||
mediaSilencedInstances: "已隐藏媒体文件的服务器"
|
||||
mediaSilencedInstancesDescription: "设置要隐藏媒体文件的服务器,以换行分隔。被设置为隐藏媒体文件服务器内所有账号的文件均按照「敏感内容」处理,且将无法使用自定义表情符号。被阻止的实例不受影响。"
|
||||
muteAndBlock: "静音/拉黑"
|
||||
mutedUsers: "已静音用户"
|
||||
blockedUsers: "已拉黑的用户"
|
||||
@@ -1106,6 +1112,8 @@ preservedUsernames: "保留的用户名"
|
||||
preservedUsernamesDescription: "列出需要保留的用户名,使用换行来作为分割。被指定的用户名在建立账户时无法使用,但由管理员所创建的账户不受该限制。此外,现有的账户也不会受到影响。"
|
||||
createNoteFromTheFile: "从文件创建帖子"
|
||||
archive: "归档"
|
||||
archived: "已归档"
|
||||
unarchive: "取消归档"
|
||||
channelArchiveConfirmTitle: "要将 {name} 归档吗?"
|
||||
channelArchiveConfirmDescription: "归档后,在频道列表与搜索结果中不会显示,也无法发布新的贴文。"
|
||||
thisChannelArchived: "该频道已被归档。"
|
||||
@@ -1116,6 +1124,9 @@ preventAiLearning: "拒绝接受生成式 AI 的学习"
|
||||
preventAiLearningDescription: "要求文章生成 AI 或图像生成 AI 不能够以发布的帖子和图像等内容作为学习对象。这是通过在 HTML 响应中包含 noai 标志来实现的,这不能完全阻止 AI 学习你的发布内容,并不是所有 AI 都会遵守这类请求。"
|
||||
options: "选项"
|
||||
specifyUser: "用户指定"
|
||||
lookupConfirm: "确定查询?"
|
||||
openTagPageConfirm: "确定打开话题标签页面?"
|
||||
specifyHost: "指定主机名"
|
||||
failedToPreviewUrl: "无法预览"
|
||||
update: "更新"
|
||||
rolesThatCanBeUsedThisEmojiAsReaction: "可以使用表情作为回应的角色"
|
||||
@@ -1250,6 +1261,8 @@ inquiry: "联系我们"
|
||||
tryAgain: "请再试一次"
|
||||
confirmWhenRevealingSensitiveMedia: "显示敏感内容前需要确认"
|
||||
sensitiveMediaRevealConfirm: "这是敏感内容。是否显示?"
|
||||
createdLists: "已创建的列表"
|
||||
createdAntennas: "已创建的天线"
|
||||
_delivery:
|
||||
status: "投递状态"
|
||||
stop: "停止投递"
|
||||
@@ -1953,6 +1966,7 @@ _soundSettings:
|
||||
driveFileTypeWarnDescription: "请选择音频文件"
|
||||
driveFileDurationWarn: "音频过长"
|
||||
driveFileDurationWarnDescription: "使用长音频可能会影响 Misskey 的使用。即使这样也要继续吗?"
|
||||
driveFileError: "无法读取声音。请更改设置。"
|
||||
_ago:
|
||||
future: "未来"
|
||||
justNow: "最近"
|
||||
@@ -2411,7 +2425,7 @@ _webhookSettings:
|
||||
modifyWebhook: "编辑 webhook"
|
||||
name: "名称"
|
||||
secret: "密钥"
|
||||
events: "何时运行 Webhook"
|
||||
trigger: "触发器"
|
||||
active: "已启用"
|
||||
_events:
|
||||
follow: "关注时"
|
||||
@@ -2424,6 +2438,7 @@ _webhookSettings:
|
||||
_systemEvents:
|
||||
abuseReport: "当收到举报时"
|
||||
abuseReportResolved: "当举报被处理时"
|
||||
userCreated: "当用户被创建时"
|
||||
deleteConfirm: "要删除 webhook 吗?"
|
||||
_abuseReport:
|
||||
_notificationRecipient:
|
||||
@@ -2614,3 +2629,8 @@ _mediaControls:
|
||||
pip: "画中画"
|
||||
playbackRate: "播放速度"
|
||||
loop: "循环播放"
|
||||
_contextMenu:
|
||||
title: "上下文菜单"
|
||||
app: "应用"
|
||||
appWithShift: "Shift 键应用"
|
||||
native: "浏览器的用户界面"
|
||||
|
@@ -60,6 +60,7 @@ copyFileId: "複製檔案 ID"
|
||||
copyFolderId: "複製資料夾ID"
|
||||
copyProfileUrl: "複製個人資料網址"
|
||||
searchUser: "搜尋使用者"
|
||||
searchThisUsersNotes: "搜尋這個使用者的貼文"
|
||||
reply: "回覆"
|
||||
loadMore: "載入更多"
|
||||
showMore: "載入更多"
|
||||
@@ -154,6 +155,7 @@ editList: "編輯清單"
|
||||
selectChannel: "選擇頻道"
|
||||
selectAntenna: "選擇天線"
|
||||
editAntenna: "編輯天線"
|
||||
createAntenna: "建立天線"
|
||||
selectWidget: "選擇小工具"
|
||||
editWidgets: "編輯小工具"
|
||||
editWidgetsExit: "完成"
|
||||
@@ -194,6 +196,7 @@ followConfirm: "你真的要追隨{name}嗎?"
|
||||
proxyAccount: "代理帳戶"
|
||||
proxyAccountDescription: "代理帳戶是在特定條件下充當遠端追隨者的帳戶。例如,當使用者新增遠端使用者至其列表時,若沒有本地使用者追隨該遠端使用者,則其活動將不會傳送至伺服器,此時便會由代理帳戶代為追隨以解決問題。"
|
||||
host: "主機"
|
||||
selectSelf: "選擇自己"
|
||||
selectUser: "選取使用者"
|
||||
recipient: "收件人"
|
||||
annotation: "註解"
|
||||
@@ -209,6 +212,7 @@ perDay: "每日"
|
||||
stopActivityDelivery: "停止發送活動"
|
||||
blockThisInstance: "封鎖此伺服器"
|
||||
silenceThisInstance: "禁言此伺服器"
|
||||
mediaSilenceThisInstance: "將這個伺服器的媒體設為禁言"
|
||||
operations: "操作"
|
||||
software: "軟體"
|
||||
version: "版本"
|
||||
@@ -230,6 +234,8 @@ blockedInstances: "已封鎖的伺服器"
|
||||
blockedInstancesDescription: "請逐行輸入需要封鎖的伺服器。已封鎖的伺服器將無法與本伺服器進行通訊。"
|
||||
silencedInstances: "被禁言的伺服器"
|
||||
silencedInstancesDescription: "設定要禁言的伺服器主機名稱,以換行分隔。隸屬於禁言伺服器的所有帳戶都將被視為「禁言帳戶」,只能發出「追隨請求」,而且無法提及未追隨的本地帳戶。這不會影響已封鎖的實例。"
|
||||
mediaSilencedInstances: "媒體被禁言的伺服器"
|
||||
mediaSilencedInstancesDescription: "設定您想要對媒體設定禁言的伺服器,以換行符號區隔。來自被媒體禁言的伺服器所屬帳戶的所有檔案都會被視為敏感檔案,且自訂表情符號不能使用。被封鎖的伺服器不受影響。"
|
||||
muteAndBlock: "靜音和封鎖"
|
||||
mutedUsers: "被靜音的使用者"
|
||||
blockedUsers: "被封鎖的使用者"
|
||||
@@ -1106,6 +1112,8 @@ preservedUsernames: "保留的使用者名稱"
|
||||
preservedUsernamesDescription: "換行列舉要保留的使用者名稱。此處出現的名稱將在註冊時禁用,但由管理者建立帳戶則不受此限。此外,既有的帳戶也不受影響。"
|
||||
createNoteFromTheFile: "由此檔案建立貼文"
|
||||
archive: "封存"
|
||||
archived: "已封存"
|
||||
unarchive: "取消封存"
|
||||
channelArchiveConfirmTitle: "要封存{name}嗎?"
|
||||
channelArchiveConfirmDescription: "封存後,將不會在頻道列表與搜尋結果中顯示,也無法發佈新貼文。"
|
||||
thisChannelArchived: "這個頻道已被封存。"
|
||||
@@ -1116,6 +1124,9 @@ preventAiLearning: "拒絕接受生成式AI的訓練"
|
||||
preventAiLearningDescription: "要求站外生成式 AI 不使用您發佈的內容訓練模型。此功能會使伺服器於 HTML 回應新增「noai」標籤,而因為要視乎 AI 會否遵守該標籤,所以此功能無法完全阻止所有 AI 使用您的內容。"
|
||||
options: "選項"
|
||||
specifyUser: "指定使用者"
|
||||
lookupConfirm: "要查詢嗎?"
|
||||
openTagPageConfirm: "要開啟標籤的頁面嗎?"
|
||||
specifyHost: "指定主機"
|
||||
failedToPreviewUrl: "無法預覽"
|
||||
update: "更新"
|
||||
rolesThatCanBeUsedThisEmojiAsReaction: "可以使用此表情符號為反應的角色"
|
||||
@@ -1250,6 +1261,8 @@ inquiry: "聯絡我們"
|
||||
tryAgain: "請再試一次。"
|
||||
confirmWhenRevealingSensitiveMedia: "要顯示敏感媒體時需確認"
|
||||
sensitiveMediaRevealConfirm: "這是敏感媒體。確定要顯示嗎?"
|
||||
createdLists: "已建立的清單"
|
||||
createdAntennas: "已建立的天線"
|
||||
_delivery:
|
||||
status: "傳送狀態"
|
||||
stop: "停止發送"
|
||||
@@ -1954,6 +1967,7 @@ _soundSettings:
|
||||
driveFileTypeWarnDescription: "請選擇音效檔案"
|
||||
driveFileDurationWarn: "音效太長了"
|
||||
driveFileDurationWarnDescription: "使用長音效檔可能會影響 Misskey 的使用體驗。仍要使用此檔案嗎?"
|
||||
driveFileError: "無法載入語音。請更改設定"
|
||||
_ago:
|
||||
future: "未來"
|
||||
justNow: "剛剛"
|
||||
@@ -2412,7 +2426,7 @@ _webhookSettings:
|
||||
modifyWebhook: "編輯 Webhook"
|
||||
name: "名字"
|
||||
secret: "密鑰"
|
||||
events: "何時運行 Webhook"
|
||||
trigger: "觸發器"
|
||||
active: "已啟用"
|
||||
_events:
|
||||
follow: "當你追隨時"
|
||||
@@ -2615,3 +2629,7 @@ _mediaControls:
|
||||
pip: "畫中畫"
|
||||
playbackRate: "播放速度"
|
||||
loop: "循環播放"
|
||||
_contextMenu:
|
||||
title: "內容功能表"
|
||||
app: "應用程式"
|
||||
native: "瀏覽器的使用者介面"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "misskey",
|
||||
"version": "2024.7.0-rc.4",
|
||||
"version": "2024.7.0",
|
||||
"codename": "nasubi",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
export class MediaSilenceForHosts1716197366117 {
|
||||
name = 'MediaSilenceForHosts1716197366117'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "meta" ADD "mediaSilencedHosts" character varying(1024) array NOT NULL DEFAULT '{}'`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "mediaSilencedHosts"`);
|
||||
}
|
||||
}
|
24
packages/backend/migration/1721666053703-fixDriveUrl.js
Normal file
24
packages/backend/migration/1721666053703-fixDriveUrl.js
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
export class FixDriveUrl1721666053703 {
|
||||
name = 'FixDriveUrl1721666053703'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "drive_file" ALTER COLUMN "url" TYPE character varying(1024), ALTER COLUMN "url" SET NOT NULL`);
|
||||
await queryRunner.query(`COMMENT ON COLUMN "drive_file"."url" IS 'The URL of the DriveFile.'`);
|
||||
await queryRunner.query(`ALTER TABLE "drive_file" ALTER COLUMN "uri" TYPE character varying(1024)`);
|
||||
await queryRunner.query(`COMMENT ON COLUMN "drive_file"."uri" IS 'The URI of the DriveFile. it will be null when the DriveFile is local.'`);
|
||||
await queryRunner.query(`ALTER TABLE "drive_file" ALTER COLUMN "src" TYPE character varying(1024)`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "drive_file" ALTER COLUMN "src" TYPE character varying(512)`);
|
||||
await queryRunner.query(`COMMENT ON COLUMN "drive_file"."uri" IS 'The URI of the DriveFile. it will be null when the DriveFile is local.'`);
|
||||
await queryRunner.query(`ALTER TABLE "drive_file" ALTER COLUMN "uri" TYPE character varying(512)`);
|
||||
await queryRunner.query(`COMMENT ON COLUMN "drive_file"."url" IS 'The URL of the DriveFile.'`);
|
||||
await queryRunner.query(`ALTER TABLE "drive_file" ALTER COLUMN "url" TYPE character varying(512), ALTER COLUMN "url" SET NOT NULL`);
|
||||
}
|
||||
}
|
@@ -3,7 +3,6 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
// dummy
|
||||
export const MAX_NOTE_TEXT_LENGTH = 3000;
|
||||
|
||||
export const USER_ONLINE_THRESHOLD = 1000 * 60 * 10; // 10min
|
||||
|
@@ -43,6 +43,7 @@ import { RoleService } from '@/core/RoleService.js';
|
||||
import { correctFilename } from '@/misc/correct-filename.js';
|
||||
import { isMimeImage } from '@/misc/is-mime-image.js';
|
||||
import { ModerationLogService } from '@/core/ModerationLogService.js';
|
||||
import { UtilityService } from '@/core/UtilityService.js';
|
||||
|
||||
type AddFileArgs = {
|
||||
/** User who wish to add file */
|
||||
@@ -127,6 +128,7 @@ export class DriveService {
|
||||
private driveChart: DriveChart,
|
||||
private perUserDriveChart: PerUserDriveChart,
|
||||
private instanceChart: InstanceChart,
|
||||
private utilityService: UtilityService,
|
||||
) {
|
||||
const logger = new Logger('drive', 'blue');
|
||||
this.registerLogger = logger.createSubLogger('register', 'yellow');
|
||||
@@ -587,6 +589,7 @@ export class DriveService {
|
||||
sensitive ?? false
|
||||
: false;
|
||||
|
||||
if (user && this.utilityService.isMediaSilencedHost(instance.mediaSilencedHosts, user.host)) file.isSensitive = true;
|
||||
if (info.sensitive && profile!.autoSensitive) file.isSensitive = true;
|
||||
if (info.sensitive && instance.setSensitiveFlagAutomatically) file.isSensitive = true;
|
||||
if (userRoleNSFW) file.isSensitive = true;
|
||||
|
@@ -364,6 +364,9 @@ export class NoteCreateService implements OnApplicationShutdown {
|
||||
mentionedUsers = data.apMentions ?? await this.extractMentionedUsers(user, combinedTokens);
|
||||
}
|
||||
|
||||
// if the host is media-silenced, custom emojis are not allowed
|
||||
if (this.utilityService.isMediaSilencedHost(meta.mediaSilencedHosts, user.host)) emojis = [];
|
||||
|
||||
tags = tags.filter(tag => Array.from(tag).length <= 128).splice(0, 32);
|
||||
|
||||
if (data.reply && (user.id !== data.reply.userId) && !mentionedUsers.some(u => u.id === data.reply!.userId)) {
|
||||
|
@@ -105,6 +105,8 @@ export class ReactionService {
|
||||
|
||||
@bindThis
|
||||
public async create(user: { id: MiUser['id']; host: MiUser['host']; isBot: MiUser['isBot'] }, note: MiNote, _reaction?: string | null) {
|
||||
const meta = await this.metaService.fetch();
|
||||
|
||||
// Check blocking
|
||||
if (note.userId !== user.id) {
|
||||
const blocked = await this.userBlockingService.checkBlocked(note.userId, user.id);
|
||||
@@ -148,6 +150,11 @@ export class ReactionService {
|
||||
if ((note.reactionAcceptance === 'nonSensitiveOnly' || note.reactionAcceptance === 'nonSensitiveOnlyForLocalLikeOnlyForRemote') && emoji.isSensitive) {
|
||||
reaction = FALLBACK;
|
||||
}
|
||||
|
||||
// for media silenced host, custom emoji reactions are not allowed
|
||||
if (reacterHost != null && this.utilityService.isMediaSilencedHost(meta.mediaSilencedHosts, reacterHost)) {
|
||||
reaction = FALLBACK;
|
||||
}
|
||||
} else {
|
||||
// リアクションとして使う権限がない
|
||||
reaction = FALLBACK;
|
||||
@@ -220,8 +227,6 @@ export class ReactionService {
|
||||
}
|
||||
}
|
||||
|
||||
const meta = await this.metaService.fetch();
|
||||
|
||||
if (meta.enableChartsForRemoteUser || (user.host == null)) {
|
||||
this.perUserReactionsChart.update(user, note);
|
||||
}
|
||||
|
@@ -42,6 +42,12 @@ export class UtilityService {
|
||||
return silencedHosts.some(x => `.${host.toLowerCase()}`.endsWith(`.${x}`));
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public isMediaSilencedHost(silencedHosts: string[] | undefined, host: string | null): boolean {
|
||||
if (!silencedHosts || host == null) return false;
|
||||
return silencedHosts.some(x => host.toLowerCase() === x);
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public concatNoteContentsForKeyWordCheck(content: {
|
||||
cw?: string | null;
|
||||
|
@@ -50,6 +50,7 @@ export class InstanceEntityService {
|
||||
maintainerName: instance.maintainerName,
|
||||
maintainerEmail: instance.maintainerEmail,
|
||||
isSilenced: this.utilityService.isSilencedHost(meta.silencedHosts, instance.host),
|
||||
isMediaSilenced: this.utilityService.isMediaSilencedHost(meta.mediaSilencedHosts, instance.host),
|
||||
iconUrl: instance.iconUrl,
|
||||
faviconUrl: instance.faviconUrl,
|
||||
themeColor: instance.themeColor,
|
||||
|
@@ -128,6 +128,7 @@ export class MetaEntityService {
|
||||
|
||||
mediaProxy: this.config.mediaProxy,
|
||||
enableUrlPreview: instance.urlPreviewEnabled,
|
||||
noteSearchableScope: (this.config.meilisearch == null || this.config.meilisearch.scope !== 'local') ? 'global' : 'local',
|
||||
};
|
||||
|
||||
return packed;
|
||||
|
@@ -82,7 +82,7 @@ export class MiDriveFile {
|
||||
public storedInternal: boolean;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512,
|
||||
length: 1024,
|
||||
comment: 'The URL of the DriveFile.',
|
||||
})
|
||||
public url: string;
|
||||
@@ -124,13 +124,13 @@ export class MiDriveFile {
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
length: 1024, nullable: true,
|
||||
comment: 'The URI of the DriveFile. it will be null when the DriveFile is local.',
|
||||
})
|
||||
public uri: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
length: 1024, nullable: true,
|
||||
})
|
||||
public src: string | null;
|
||||
|
||||
|
@@ -86,6 +86,11 @@ export class MiMeta {
|
||||
})
|
||||
public silencedHosts: string[];
|
||||
|
||||
@Column('varchar', {
|
||||
length: 1024, array: true, default: '{}',
|
||||
})
|
||||
public mediaSilencedHosts: string[];
|
||||
|
||||
@Column('varchar', {
|
||||
length: 1024,
|
||||
nullable: true,
|
||||
|
@@ -88,6 +88,10 @@ export const packedFederationInstanceSchema = {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
isMediaSilenced: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
iconUrl: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
|
@@ -247,6 +247,12 @@ export const packedMetaLiteSchema = {
|
||||
optional: false, nullable: false,
|
||||
ref: 'RolePolicies',
|
||||
},
|
||||
noteSearchableScope: {
|
||||
type: 'string',
|
||||
enum: ['local', 'global'],
|
||||
optional: false, nullable: false,
|
||||
default: 'local',
|
||||
},
|
||||
},
|
||||
} as const;
|
||||
|
||||
|
@@ -204,7 +204,7 @@ export const packedNoteSchema = {
|
||||
reactionAcceptance: {
|
||||
type: 'string',
|
||||
optional: false, nullable: true,
|
||||
enum: ['likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'],
|
||||
enum: ['likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote', null],
|
||||
},
|
||||
reactionEmojis: {
|
||||
type: 'object',
|
||||
|
@@ -69,6 +69,7 @@ export const paramDef = {
|
||||
sinceId: { type: 'string', format: 'misskey:id' },
|
||||
untilId: { type: 'string', format: 'misskey:id' },
|
||||
userId: { type: 'string', format: 'misskey:id', nullable: true },
|
||||
status: { type: 'string', enum: ['all', 'active', 'archived'], default: 'active' },
|
||||
},
|
||||
required: [],
|
||||
} as const;
|
||||
@@ -87,7 +88,13 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const query = this.queryService.makePaginationQuery(this.announcementsRepository.createQueryBuilder('announcement'), ps.sinceId, ps.untilId);
|
||||
query.andWhere('announcement.isActive = true');
|
||||
|
||||
if (ps.status === 'archived') {
|
||||
query.andWhere('announcement.isActive = false');
|
||||
} else if (ps.status === 'active') {
|
||||
query.andWhere('announcement.isActive = true');
|
||||
}
|
||||
|
||||
if (ps.userId) {
|
||||
query.andWhere('announcement.userId = :userId', { userId: ps.userId });
|
||||
} else {
|
||||
|
@@ -128,6 +128,16 @@ export const meta = {
|
||||
nullable: false,
|
||||
},
|
||||
},
|
||||
mediaSilencedHosts: {
|
||||
type: 'array',
|
||||
optional: false,
|
||||
nullable: false,
|
||||
items: {
|
||||
type: 'string',
|
||||
optional: false,
|
||||
nullable: false,
|
||||
},
|
||||
},
|
||||
pinnedUsers: {
|
||||
type: 'array',
|
||||
optional: false, nullable: false,
|
||||
@@ -552,6 +562,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
hiddenTags: instance.hiddenTags,
|
||||
blockedHosts: instance.blockedHosts,
|
||||
silencedHosts: instance.silencedHosts,
|
||||
mediaSilencedHosts: instance.mediaSilencedHosts,
|
||||
sensitiveWords: instance.sensitiveWords,
|
||||
prohibitedWords: instance.prohibitedWords,
|
||||
preservedUsernames: instance.preservedUsernames,
|
||||
|
@@ -150,6 +150,13 @@ export const paramDef = {
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
mediaSilencedHosts: {
|
||||
type: 'array',
|
||||
nullable: true,
|
||||
items: {
|
||||
type: 'string',
|
||||
},
|
||||
},
|
||||
summalyProxy: {
|
||||
type: 'string', nullable: true,
|
||||
description: '[Deprecated] Use "urlPreviewSummaryProxyUrl" instead.',
|
||||
@@ -203,6 +210,14 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
return h !== '' && h !== lv && !set.blockedHosts?.includes(h);
|
||||
});
|
||||
}
|
||||
if (Array.isArray(ps.mediaSilencedHosts)) {
|
||||
let lastValue = '';
|
||||
set.mediaSilencedHosts = ps.mediaSilencedHosts.sort().filter((h) => {
|
||||
const lv = lastValue;
|
||||
lastValue = h;
|
||||
return h !== '' && h !== lv && !set.blockedHosts?.includes(h);
|
||||
});
|
||||
}
|
||||
if (ps.themeColor !== undefined) {
|
||||
set.themeColor = ps.themeColor;
|
||||
}
|
||||
|
@@ -143,6 +143,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
];
|
||||
}
|
||||
|
||||
const [
|
||||
followings,
|
||||
] = await Promise.all([
|
||||
this.cacheService.userFollowingsCache.fetch(me.id),
|
||||
]);
|
||||
|
||||
const redisTimeline = await this.fanoutTimelineEndpointService.timeline({
|
||||
untilId,
|
||||
sinceId,
|
||||
@@ -153,6 +159,13 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
useDbFallback: serverSettings.enableFanoutTimelineDbFallback,
|
||||
alwaysIncludeMyNotes: true,
|
||||
excludePureRenotes: !ps.withRenotes,
|
||||
noteFilter: note => {
|
||||
if (note.reply && note.reply.visibility === 'followers') {
|
||||
if (!Object.hasOwn(followings, note.reply.userId) && note.reply.userId !== me.id) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
dbFallback: async (untilId, sinceId, limit) => await this.getFromDb({
|
||||
untilId,
|
||||
sinceId,
|
||||
|
@@ -114,7 +114,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
excludePureRenotes: !ps.withRenotes,
|
||||
noteFilter: note => {
|
||||
if (note.reply && note.reply.visibility === 'followers') {
|
||||
if (!Object.hasOwn(followings, note.reply.userId)) return false;
|
||||
if (!Object.hasOwn(followings, note.reply.userId) && note.reply.userId !== me.id) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@@ -57,88 +57,66 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
const activeThreshold = new Date(Date.now() - (1000 * 60 * 60 * 24 * 30)); // 30日
|
||||
|
||||
ps.query = ps.query.trim();
|
||||
const isUsername = ps.query.startsWith('@');
|
||||
const isUsername = ps.query.startsWith('@') && !ps.query.includes(' ') && ps.query.indexOf('@', 1) === -1;
|
||||
|
||||
let users: MiUser[] = [];
|
||||
|
||||
if (isUsername) {
|
||||
const usernameQuery = this.usersRepository.createQueryBuilder('user')
|
||||
.where('user.usernameLower LIKE :username', { username: sqlLikeEscape(ps.query.replace('@', '').toLowerCase()) + '%' })
|
||||
.andWhere(new Brackets(qb => {
|
||||
qb
|
||||
.where('user.updatedAt IS NULL')
|
||||
.orWhere('user.updatedAt > :activeThreshold', { activeThreshold: activeThreshold });
|
||||
}))
|
||||
.andWhere('user.isSuspended = FALSE');
|
||||
const nameQuery = this.usersRepository.createQueryBuilder('user')
|
||||
.where(new Brackets(qb => {
|
||||
qb.where('user.name ILIKE :query', { query: '%' + sqlLikeEscape(ps.query) + '%' });
|
||||
|
||||
if (ps.origin === 'local') {
|
||||
usernameQuery.andWhere('user.host IS NULL');
|
||||
} else if (ps.origin === 'remote') {
|
||||
usernameQuery.andWhere('user.host IS NOT NULL');
|
||||
}
|
||||
|
||||
users = await usernameQuery
|
||||
.orderBy('user.updatedAt', 'DESC', 'NULLS LAST')
|
||||
.limit(ps.limit)
|
||||
.offset(ps.offset)
|
||||
.getMany();
|
||||
} else {
|
||||
const nameQuery = this.usersRepository.createQueryBuilder('user')
|
||||
.where(new Brackets(qb => {
|
||||
qb.where('user.name ILIKE :query', { query: '%' + sqlLikeEscape(ps.query) + '%' });
|
||||
|
||||
// Also search username if it qualifies as username
|
||||
if (this.userEntityService.validateLocalUsername(ps.query)) {
|
||||
qb.orWhere('user.usernameLower LIKE :username', { username: '%' + sqlLikeEscape(ps.query.toLowerCase()) + '%' });
|
||||
}
|
||||
}))
|
||||
.andWhere(new Brackets(qb => {
|
||||
qb
|
||||
.where('user.updatedAt IS NULL')
|
||||
.orWhere('user.updatedAt > :activeThreshold', { activeThreshold: activeThreshold });
|
||||
}))
|
||||
.andWhere('user.isSuspended = FALSE');
|
||||
|
||||
if (ps.origin === 'local') {
|
||||
nameQuery.andWhere('user.host IS NULL');
|
||||
} else if (ps.origin === 'remote') {
|
||||
nameQuery.andWhere('user.host IS NOT NULL');
|
||||
}
|
||||
|
||||
users = await nameQuery
|
||||
.orderBy('user.updatedAt', 'DESC', 'NULLS LAST')
|
||||
.limit(ps.limit)
|
||||
.offset(ps.offset)
|
||||
.getMany();
|
||||
|
||||
if (users.length < ps.limit) {
|
||||
const profQuery = this.userProfilesRepository.createQueryBuilder('prof')
|
||||
.select('prof.userId')
|
||||
.where('prof.description ILIKE :query', { query: '%' + sqlLikeEscape(ps.query) + '%' });
|
||||
|
||||
if (ps.origin === 'local') {
|
||||
profQuery.andWhere('prof.userHost IS NULL');
|
||||
} else if (ps.origin === 'remote') {
|
||||
profQuery.andWhere('prof.userHost IS NOT NULL');
|
||||
if (isUsername) {
|
||||
qb.orWhere('user.usernameLower LIKE :username', { username: sqlLikeEscape(ps.query.replace('@', '').toLowerCase()) + '%' });
|
||||
} else if (this.userEntityService.validateLocalUsername(ps.query)) { // Also search username if it qualifies as username
|
||||
qb.orWhere('user.usernameLower LIKE :username', { username: '%' + sqlLikeEscape(ps.query.toLowerCase()) + '%' });
|
||||
}
|
||||
}))
|
||||
.andWhere(new Brackets(qb => {
|
||||
qb
|
||||
.where('user.updatedAt IS NULL')
|
||||
.orWhere('user.updatedAt > :activeThreshold', { activeThreshold: activeThreshold });
|
||||
}))
|
||||
.andWhere('user.isSuspended = FALSE');
|
||||
|
||||
const query = this.usersRepository.createQueryBuilder('user')
|
||||
.where(`user.id IN (${ profQuery.getQuery() })`)
|
||||
.andWhere(new Brackets(qb => {
|
||||
qb
|
||||
.where('user.updatedAt IS NULL')
|
||||
.orWhere('user.updatedAt > :activeThreshold', { activeThreshold: activeThreshold });
|
||||
}))
|
||||
.andWhere('user.isSuspended = FALSE')
|
||||
.setParameters(profQuery.getParameters());
|
||||
if (ps.origin === 'local') {
|
||||
nameQuery.andWhere('user.host IS NULL');
|
||||
} else if (ps.origin === 'remote') {
|
||||
nameQuery.andWhere('user.host IS NOT NULL');
|
||||
}
|
||||
|
||||
users = users.concat(await query
|
||||
.orderBy('user.updatedAt', 'DESC', 'NULLS LAST')
|
||||
.limit(ps.limit)
|
||||
.offset(ps.offset)
|
||||
.getMany(),
|
||||
);
|
||||
users = await nameQuery
|
||||
.orderBy('user.updatedAt', 'DESC', 'NULLS LAST')
|
||||
.limit(ps.limit)
|
||||
.offset(ps.offset)
|
||||
.getMany();
|
||||
|
||||
if (users.length < ps.limit) {
|
||||
const profQuery = this.userProfilesRepository.createQueryBuilder('prof')
|
||||
.select('prof.userId')
|
||||
.where('prof.description ILIKE :query', { query: '%' + sqlLikeEscape(ps.query) + '%' });
|
||||
|
||||
if (ps.origin === 'local') {
|
||||
profQuery.andWhere('prof.userHost IS NULL');
|
||||
} else if (ps.origin === 'remote') {
|
||||
profQuery.andWhere('prof.userHost IS NOT NULL');
|
||||
}
|
||||
|
||||
const query = this.usersRepository.createQueryBuilder('user')
|
||||
.where(`user.id IN (${ profQuery.getQuery() })`)
|
||||
.andWhere(new Brackets(qb => {
|
||||
qb
|
||||
.where('user.updatedAt IS NULL')
|
||||
.orWhere('user.updatedAt > :activeThreshold', { activeThreshold: activeThreshold });
|
||||
}))
|
||||
.andWhere('user.isSuspended = FALSE')
|
||||
.setParameters(profQuery.getParameters());
|
||||
|
||||
users = users.concat(await query
|
||||
.orderBy('user.updatedAt', 'DESC', 'NULLS LAST')
|
||||
.limit(ps.limit)
|
||||
.offset(ps.offset)
|
||||
.getMany(),
|
||||
);
|
||||
}
|
||||
|
||||
return await this.userEntityService.packMany(users, me, { schema: ps.detail ? 'UserDetailed' : 'UserLite' });
|
||||
|
@@ -60,7 +60,7 @@ class HomeTimelineChannel extends Channel {
|
||||
const reply = note.reply;
|
||||
if (this.following[note.userId]?.withReplies) {
|
||||
// 自分のフォローしていないユーザーの visibility: followers な投稿への返信は弾く
|
||||
if (reply.visibility === 'followers' && !Object.hasOwn(this.following, reply.userId)) return;
|
||||
if (reply.visibility === 'followers' && !Object.hasOwn(this.following, reply.userId) && reply.userId !== this.user!.id) return;
|
||||
} else {
|
||||
// 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合
|
||||
if (reply.userId !== this.user!.id && !isMe && reply.userId !== note.userId) return;
|
||||
@@ -73,7 +73,7 @@ class HomeTimelineChannel extends Channel {
|
||||
if (note.renote.reply) {
|
||||
const reply = note.renote.reply;
|
||||
// 自分のフォローしていないユーザーの visibility: followers な投稿への返信のリノートは弾く
|
||||
if (reply.visibility === 'followers' && !Object.hasOwn(this.following, reply.userId)) return;
|
||||
if (reply.visibility === 'followers' && !Object.hasOwn(this.following, reply.userId) && reply.userId !== this.user!.id) return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -76,14 +76,22 @@ class HybridTimelineChannel extends Channel {
|
||||
const reply = note.reply;
|
||||
if ((this.following[note.userId]?.withReplies ?? false) || this.withReplies) {
|
||||
// 自分のフォローしていないユーザーの visibility: followers な投稿への返信は弾く
|
||||
if (reply.visibility === 'followers' && !Object.hasOwn(this.following, reply.userId)) return;
|
||||
if (reply.visibility === 'followers' && !Object.hasOwn(this.following, reply.userId) && reply.userId !== this.user!.id) return;
|
||||
} else {
|
||||
// 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合
|
||||
if (reply.userId !== this.user!.id && !isMe && reply.userId !== note.userId) return;
|
||||
}
|
||||
}
|
||||
|
||||
if (isRenotePacked(note) && !isQuotePacked(note) && !this.withRenotes) return;
|
||||
// 純粋なリノート(引用リノートでないリノート)の場合
|
||||
if (isRenotePacked(note) && !isQuotePacked(note) && note.renote) {
|
||||
if (!this.withRenotes) return;
|
||||
if (note.renote.reply) {
|
||||
const reply = note.renote.reply;
|
||||
// 自分のフォローしていないユーザーの visibility: followers な投稿への返信のリノートは弾く
|
||||
if (reply.visibility === 'followers' && !Object.hasOwn(this.following, reply.userId) && reply.userId !== this.user!.id) return;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.user && note.renoteId && !note.text) {
|
||||
if (note.renote && Object.keys(note.renote.reactions).length > 0) {
|
||||
|
@@ -34,6 +34,7 @@ describe('Streaming', () => {
|
||||
let kyoko: misskey.entities.SignupResponse;
|
||||
let chitose: misskey.entities.SignupResponse;
|
||||
let kanako: misskey.entities.SignupResponse;
|
||||
let erin: misskey.entities.SignupResponse;
|
||||
|
||||
// Remote users
|
||||
let akari: misskey.entities.SignupResponse;
|
||||
@@ -53,6 +54,7 @@ describe('Streaming', () => {
|
||||
kyoko = await signup({ username: 'kyoko' });
|
||||
chitose = await signup({ username: 'chitose' });
|
||||
kanako = await signup({ username: 'kanako' });
|
||||
erin = await signup({ username: 'erin' }); // erin: A generic fifth participant
|
||||
|
||||
akari = await signup({ username: 'akari', host: 'example.com' });
|
||||
chinatsu = await signup({ username: 'chinatsu', host: 'example.com' });
|
||||
@@ -71,6 +73,12 @@ describe('Streaming', () => {
|
||||
// Follow: kyoko => chitose
|
||||
await api('following/create', { userId: chitose.id }, kyoko);
|
||||
|
||||
// Follow: erin <=> ayano each other.
|
||||
// erin => ayano: withReplies: true
|
||||
await api('following/create', { userId: ayano.id, withReplies: true }, erin);
|
||||
// ayano => erin: withReplies: false
|
||||
await api('following/create', { userId: erin.id, withReplies: false }, ayano);
|
||||
|
||||
// Mute: chitose => kanako
|
||||
await api('mute/create', { userId: kanako.id }, chitose);
|
||||
|
||||
@@ -297,6 +305,28 @@ describe('Streaming', () => {
|
||||
|
||||
assert.strictEqual(fired, true);
|
||||
});
|
||||
|
||||
test('withReplies: true のとき自分のfollowers投稿に対するリプライが流れる', async () => {
|
||||
const erinNote = await post(erin, { text: 'hi', visibility: 'followers' });
|
||||
const fired = await waitFire(
|
||||
erin, 'homeTimeline', // erin:home
|
||||
() => api('notes/create', { text: 'hello', replyId: erinNote.id }, ayano), // ayano reply to erin's followers post
|
||||
msg => msg.type === 'note' && msg.body.userId === ayano.id, // wait ayano
|
||||
);
|
||||
|
||||
assert.strictEqual(fired, true);
|
||||
});
|
||||
|
||||
test('withReplies: false でも自分の投稿に対するリプライが流れる', async () => {
|
||||
const ayanoNote = await post(ayano, { text: 'hi', visibility: 'followers' });
|
||||
const fired = await waitFire(
|
||||
ayano, 'homeTimeline', // ayano:home
|
||||
() => api('notes/create', { text: 'hello', replyId: ayanoNote.id }, erin), // erin reply to ayano's followers post
|
||||
msg => msg.type === 'note' && msg.body.userId === erin.id, // wait erin
|
||||
);
|
||||
|
||||
assert.strictEqual(fired, true);
|
||||
});
|
||||
}); // Home
|
||||
|
||||
describe('Local Timeline', () => {
|
||||
@@ -475,6 +505,38 @@ describe('Streaming', () => {
|
||||
|
||||
assert.strictEqual(fired, false);
|
||||
});
|
||||
|
||||
test('withReplies: true のとき自分のfollowers投稿に対するリプライが流れる', async () => {
|
||||
const erinNote = await post(erin, { text: 'hi', visibility: 'followers' });
|
||||
const fired = await waitFire(
|
||||
erin, 'homeTimeline', // erin:home
|
||||
() => api('notes/create', { text: 'hello', replyId: erinNote.id }, ayano), // ayano reply to erin's followers post
|
||||
msg => msg.type === 'note' && msg.body.userId === ayano.id, // wait ayano
|
||||
);
|
||||
|
||||
assert.strictEqual(fired, true);
|
||||
});
|
||||
|
||||
test('withReplies: false でも自分の投稿に対するリプライが流れる', async () => {
|
||||
const ayanoNote = await post(ayano, { text: 'hi', visibility: 'followers' });
|
||||
const fired = await waitFire(
|
||||
ayano, 'homeTimeline', // ayano:home
|
||||
() => api('notes/create', { text: 'hello', replyId: ayanoNote.id }, erin), // erin reply to ayano's followers post
|
||||
msg => msg.type === 'note' && msg.body.userId === erin.id, // wait erin
|
||||
);
|
||||
|
||||
assert.strictEqual(fired, true);
|
||||
});
|
||||
|
||||
test('withReplies: true のフォローしていない人のfollowersノートに対するリプライが流れない', async () => {
|
||||
const fired = await waitFire(
|
||||
erin, 'homeTimeline', // erin:home
|
||||
() => api('notes/create', { text: 'hello', replyId: chitose.id }, ayano), // ayano reply to chitose's post
|
||||
msg => msg.type === 'note' && msg.body.userId === ayano.id, // wait ayano
|
||||
);
|
||||
|
||||
assert.strictEqual(fired, false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Global Timeline', () => {
|
||||
|
@@ -127,6 +127,7 @@ describe('Timelines', () => {
|
||||
test.concurrent('withReplies: true でフォローしているユーザーの他人の visibility: followers な投稿への返信が含まれない', async () => {
|
||||
const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);
|
||||
|
||||
await api('following/create', { userId: carol.id }, bob);
|
||||
await api('following/create', { userId: bob.id }, alice);
|
||||
await api('following/update', { userId: bob.id, withReplies: true }, alice);
|
||||
await setTimeout(1000);
|
||||
@@ -161,6 +162,24 @@ describe('Timelines', () => {
|
||||
assert.strictEqual(res.body.find(note => note.id === carolNote.id)?.text, 'hi');
|
||||
});
|
||||
|
||||
test.concurrent('withReplies: true でフォローしているユーザーの自分の visibility: followers な投稿への返信が含まれる', async () => {
|
||||
const [alice, bob] = await Promise.all([signup(), signup()]);
|
||||
|
||||
await api('following/create', { userId: bob.id }, alice);
|
||||
await api('following/create', { userId: alice.id }, bob);
|
||||
await api('following/update', { userId: bob.id, withReplies: true }, alice);
|
||||
await setTimeout(1000);
|
||||
const aliceNote = await post(alice, { text: 'hi', visibility: 'followers' });
|
||||
const bobNote = await post(bob, { text: 'hi', replyId: aliceNote.id });
|
||||
|
||||
await waitForPushToTl();
|
||||
|
||||
const res = await api('notes/timeline', { limit: 100 }, alice);
|
||||
|
||||
assert.strictEqual(res.body.some((note: any) => note.id === bobNote.id), true);
|
||||
assert.strictEqual(res.body.some((note: any) => note.id === aliceNote.id), true);
|
||||
});
|
||||
|
||||
test.concurrent('withReplies: true でフォローしているユーザーの行った別のフォローしているユーザーの投稿への visibility: specified な返信が含まれない', async () => {
|
||||
const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);
|
||||
|
||||
@@ -684,6 +703,21 @@ describe('Timelines', () => {
|
||||
assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
|
||||
});
|
||||
|
||||
test.concurrent('withReplies: false でフォローしていないユーザーからの自分への返信が含まれる', async () => {
|
||||
const [alice, bob] = await Promise.all([signup(), signup()]);
|
||||
|
||||
await setTimeout(1000);
|
||||
const aliceNote = await post(alice, { text: 'hi' });
|
||||
const bobNote = await post(bob, { text: 'hi', replyId: aliceNote.id });
|
||||
|
||||
await waitForPushToTl();
|
||||
|
||||
const res = await api('notes/local-timeline', { limit: 100 }, alice);
|
||||
|
||||
assert.strictEqual(res.body.some(note => note.id === aliceNote.id), true);
|
||||
assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
|
||||
});
|
||||
|
||||
test.concurrent('[withReplies: true] 他人の他人への返信が含まれる', async () => {
|
||||
const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);
|
||||
|
||||
@@ -768,6 +802,62 @@ describe('Timelines', () => {
|
||||
assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
|
||||
});
|
||||
|
||||
test.concurrent('withReplies: true でフォローしているユーザーの他人の visibility: followers な投稿への返信が含まれない', async () => {
|
||||
const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);
|
||||
|
||||
await api('following/create', { userId: carol.id }, bob);
|
||||
await api('following/create', { userId: bob.id }, alice);
|
||||
await api('following/update', { userId: bob.id, withReplies: true }, alice);
|
||||
await setTimeout(1000);
|
||||
const carolNote = await post(carol, { text: 'hi', visibility: 'followers' });
|
||||
const bobNote = await post(bob, { text: 'hi', replyId: carolNote.id });
|
||||
|
||||
await waitForPushToTl();
|
||||
|
||||
const res = await api('notes/hybrid-timeline', { limit: 100 }, alice);
|
||||
|
||||
assert.strictEqual(res.body.some((note: any) => note.id === bobNote.id), false);
|
||||
assert.strictEqual(res.body.some((note: any) => note.id === carolNote.id), false);
|
||||
});
|
||||
|
||||
test.concurrent('withReplies: true でフォローしているユーザーの行った別のフォローしているユーザーの visibility: followers な投稿への返信が含まれる', async () => {
|
||||
const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);
|
||||
|
||||
await api('following/create', { userId: bob.id }, alice);
|
||||
await api('following/create', { userId: carol.id }, alice);
|
||||
await api('following/create', { userId: carol.id }, bob);
|
||||
await api('following/update', { userId: bob.id, withReplies: true }, alice);
|
||||
await setTimeout(1000);
|
||||
const carolNote = await post(carol, { text: 'hi', visibility: 'followers' });
|
||||
const bobNote = await post(bob, { text: 'hi', replyId: carolNote.id });
|
||||
|
||||
await waitForPushToTl();
|
||||
|
||||
const res = await api('notes/hybrid-timeline', { limit: 100 }, alice);
|
||||
|
||||
assert.strictEqual(res.body.some((note: any) => note.id === bobNote.id), true);
|
||||
assert.strictEqual(res.body.some((note: any) => note.id === carolNote.id), true);
|
||||
assert.strictEqual(res.body.find((note: any) => note.id === carolNote.id)?.text, 'hi');
|
||||
});
|
||||
|
||||
test.concurrent('withReplies: true でフォローしているユーザーの自分の visibility: followers な投稿への返信が含まれる', async () => {
|
||||
const [alice, bob] = await Promise.all([signup(), signup()]);
|
||||
|
||||
await api('following/create', { userId: bob.id }, alice);
|
||||
await api('following/create', { userId: alice.id }, bob);
|
||||
await api('following/update', { userId: bob.id, withReplies: true }, alice);
|
||||
await setTimeout(1000);
|
||||
const aliceNote = await post(alice, { text: 'hi', visibility: 'followers' });
|
||||
const bobNote = await post(bob, { text: 'hi', replyId: aliceNote.id });
|
||||
|
||||
await waitForPushToTl();
|
||||
|
||||
const res = await api('notes/hybrid-timeline', { limit: 100 }, alice);
|
||||
|
||||
assert.strictEqual(res.body.some((note: any) => note.id === bobNote.id), true);
|
||||
assert.strictEqual(res.body.some((note: any) => note.id === aliceNote.id), true);
|
||||
});
|
||||
|
||||
test.concurrent('他人の他人への返信が含まれない', async () => {
|
||||
const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);
|
||||
|
||||
@@ -824,6 +914,21 @@ describe('Timelines', () => {
|
||||
assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
|
||||
});
|
||||
|
||||
test.concurrent('withReplies: false でフォローしていないユーザーからの自分への返信が含まれる', async () => {
|
||||
const [alice, bob] = await Promise.all([signup(), signup()]);
|
||||
|
||||
await setTimeout(1000);
|
||||
const aliceNote = await post(alice, { text: 'hi' });
|
||||
const bobNote = await post(bob, { text: 'hi', replyId: aliceNote.id });
|
||||
|
||||
await waitForPushToTl();
|
||||
|
||||
const res = await api('notes/local-timeline', { limit: 100 }, alice);
|
||||
|
||||
assert.strictEqual(res.body.some(note => note.id === aliceNote.id), true);
|
||||
assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
|
||||
});
|
||||
|
||||
test.concurrent('[withReplies: true] 他人の他人への返信が含まれる', async () => {
|
||||
const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);
|
||||
|
||||
|
@@ -47,18 +47,7 @@ export function clip(id = 'someclipid', name = 'Some Clip'): entities.Clip {
|
||||
createdAt: '2016-12-28T22:49:51.000Z',
|
||||
lastClippedAt: null,
|
||||
userId: 'someuserid',
|
||||
user: {
|
||||
id: 'someuserid',
|
||||
name: 'Misskey User',
|
||||
username: 'miskist',
|
||||
host: 'misskey-hub.net',
|
||||
avatarUrl: 'https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/about-icon.png?raw=true',
|
||||
avatarBlurhash: 'eQFRshof5NWBRi},juayfPju53WB?0ofs;s*a{ofjuay^SoMEJR%ay',
|
||||
avatarDecorations: [],
|
||||
emojis: {},
|
||||
badgeRoles: [],
|
||||
onlineStatus: 'unknown',
|
||||
},
|
||||
user: userLite(),
|
||||
notesCount: undefined,
|
||||
name,
|
||||
description: 'Some clip description',
|
||||
@@ -125,6 +114,15 @@ export function file(isSensitive = false) {
|
||||
};
|
||||
}
|
||||
|
||||
export function folder(id = 'somefolderid', name = 'Some Folder', parentId: string | null = null): entities.DriveFolder {
|
||||
return {
|
||||
id,
|
||||
createdAt: '2016-12-28T22:49:51.000Z',
|
||||
name,
|
||||
parentId,
|
||||
};
|
||||
}
|
||||
|
||||
export function federationInstance(): entities.FederationInstance {
|
||||
return {
|
||||
id: 'someinstanceid',
|
||||
@@ -154,7 +152,27 @@ export function federationInstance(): entities.FederationInstance {
|
||||
};
|
||||
}
|
||||
|
||||
export function userDetailed(id = 'someuserid', username = 'miskist', host = 'misskey-hub.net', name = 'Misskey User'): entities.UserDetailed {
|
||||
export function note(id = 'somenoteid'): entities.Note {
|
||||
return {
|
||||
id,
|
||||
createdAt: '2016-12-28T22:49:51.000Z',
|
||||
deletedAt: null,
|
||||
text: 'some note',
|
||||
cw: null,
|
||||
userId: 'someuserid',
|
||||
user: userLite(),
|
||||
visibility: 'public',
|
||||
reactionAcceptance: 'nonSensitiveOnly',
|
||||
reactionEmojis: {},
|
||||
reactions: {},
|
||||
myReaction: null,
|
||||
reactionCount: 0,
|
||||
renoteCount: 0,
|
||||
repliesCount: 0,
|
||||
};
|
||||
}
|
||||
|
||||
export function userLite(id = 'someuserid', username = 'miskist', host: entities.UserDetailed['host'] = 'misskey-hub.net', name: entities.UserDetailed['name'] = 'Misskey User'): entities.UserLite {
|
||||
return {
|
||||
id,
|
||||
username,
|
||||
@@ -165,6 +183,12 @@ export function userDetailed(id = 'someuserid', username = 'miskist', host = 'mi
|
||||
avatarBlurhash: 'eQFRshof5NWBRi},juayfPju53WB?0ofs;s*a{ofjuay^SoMEJR%ay',
|
||||
avatarDecorations: [],
|
||||
emojis: {},
|
||||
};
|
||||
}
|
||||
|
||||
export function userDetailed(id = 'someuserid', username = 'miskist', host: entities.UserDetailed['host'] = 'misskey-hub.net', name: entities.UserDetailed['name'] = 'Misskey User'): entities.UserDetailed {
|
||||
return {
|
||||
...userLite(id, username, host, name),
|
||||
bannerBlurhash: 'eQA^IW^-MH8w9tE8I=S^o{$*R4RikXtSxutRozjEnNR.RQadoyozog',
|
||||
bannerUrl: 'https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/fedi.jpg?raw=true',
|
||||
birthday: '2014-06-20',
|
||||
@@ -215,7 +239,7 @@ export function userDetailed(id = 'someuserid', username = 'miskist', host = 'mi
|
||||
movedTo: null,
|
||||
alsoKnownAs: null,
|
||||
notify: 'none',
|
||||
memo: null
|
||||
memo: null,
|
||||
};
|
||||
}
|
||||
|
||||
|
@@ -397,14 +397,14 @@ function toStories(component: string): Promise<string> {
|
||||
const globs = await Promise.all([
|
||||
glob('src/components/global/Mk*.vue'),
|
||||
glob('src/components/global/RouterView.vue'),
|
||||
glob('src/components/Mk[A-C]*.vue'),
|
||||
glob('src/components/MkDigitalClock.vue'),
|
||||
glob('src/components/Mk[A-E]*.vue'),
|
||||
glob('src/components/MkGalleryPostPreview.vue'),
|
||||
glob('src/components/MkSignupServerRules.vue'),
|
||||
glob('src/components/MkUserSetupDialog.vue'),
|
||||
glob('src/components/MkUserSetupDialog.*.vue'),
|
||||
glob('src/components/MkInstanceCardMini.vue'),
|
||||
glob('src/components/MkInviteCode.vue'),
|
||||
glob('src/pages/search.vue'),
|
||||
glob('src/pages/user/home.vue'),
|
||||
]);
|
||||
const components = globs.flat();
|
||||
|
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import { HttpResponse, http } from 'msw';
|
||||
import { commonHandlers } from '../../.storybook/mocks.js';
|
||||
import MkAntennaEditor from './MkAntennaEditor.vue';
|
||||
export const Default = {
|
||||
render(args) {
|
||||
return {
|
||||
components: {
|
||||
MkAntennaEditor,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
args,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
props() {
|
||||
return {
|
||||
...this.args,
|
||||
};
|
||||
},
|
||||
events() {
|
||||
return {
|
||||
created: action('created'),
|
||||
updated: action('updated'),
|
||||
deleted: action('deleted'),
|
||||
};
|
||||
},
|
||||
},
|
||||
template: '<MkAntennaEditor v-bind="props" v-on="events" />',
|
||||
};
|
||||
},
|
||||
args: {
|
||||
},
|
||||
parameters: {
|
||||
layout: 'fullscreen',
|
||||
msw: {
|
||||
handlers: [
|
||||
...commonHandlers,
|
||||
http.post('/api/antennas/create', async ({ request }) => {
|
||||
action('POST /api/antennas/create')(await request.json());
|
||||
return HttpResponse.json({});
|
||||
}),
|
||||
http.post('/api/antennas/update', async ({ request }) => {
|
||||
action('POST /api/antennas/update')(await request.json());
|
||||
return HttpResponse.json({});
|
||||
}),
|
||||
http.post('/api/antennas/delete', async ({ request }) => {
|
||||
action('POST /api/antennas/delete')(await request.json());
|
||||
return HttpResponse.json();
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
} satisfies StoryObj<typeof MkAntennaEditor>;
|
@@ -43,7 +43,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<div :class="$style.actions">
|
||||
<div class="_buttons">
|
||||
<MkButton inline primary @click="saveAntenna()"><i class="ti ti-device-floppy"></i> {{ i18n.ts.save }}</MkButton>
|
||||
<MkButton v-if="antenna.id != null" inline danger @click="deleteAntenna()"><i class="ti ti-trash"></i> {{ i18n.ts.delete }}</MkButton>
|
||||
<MkButton v-if="initialAntenna.id != null" inline danger @click="deleteAntenna()"><i class="ti ti-trash"></i> {{ i18n.ts.delete }}</MkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -61,28 +61,53 @@ import MkSwitch from '@/components/MkSwitch.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { deepMerge } from '@/scripts/merge.js';
|
||||
import type { DeepPartial } from '@/scripts/merge.js';
|
||||
|
||||
type PartialAllowedAntenna = Omit<Misskey.entities.Antenna, 'id' | 'createdAt' | 'updatedAt'> & {
|
||||
id?: string;
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
};
|
||||
|
||||
const props = defineProps<{
|
||||
antenna: Misskey.entities.Antenna
|
||||
antenna?: DeepPartial<PartialAllowedAntenna>;
|
||||
}>();
|
||||
|
||||
const initialAntenna = deepMerge<PartialAllowedAntenna>(props.antenna ?? {}, {
|
||||
name: '',
|
||||
src: 'all',
|
||||
userListId: null,
|
||||
users: [],
|
||||
keywords: [],
|
||||
excludeKeywords: [],
|
||||
excludeBots: false,
|
||||
withReplies: false,
|
||||
caseSensitive: false,
|
||||
localOnly: false,
|
||||
withFile: false,
|
||||
isActive: true,
|
||||
hasUnreadNote: false,
|
||||
notify: false,
|
||||
});
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'created'): void,
|
||||
(ev: 'updated'): void,
|
||||
(ev: 'created', newAntenna: Misskey.entities.Antenna): void,
|
||||
(ev: 'updated', editedAntenna: Misskey.entities.Antenna): void,
|
||||
(ev: 'deleted'): void,
|
||||
}>();
|
||||
|
||||
const name = ref<string>(props.antenna.name);
|
||||
const src = ref<Misskey.entities.AntennasCreateRequest['src']>(props.antenna.src);
|
||||
const userListId = ref<string | null>(props.antenna.userListId);
|
||||
const users = ref<string>(props.antenna.users.join('\n'));
|
||||
const keywords = ref<string>(props.antenna.keywords.map(x => x.join(' ')).join('\n'));
|
||||
const excludeKeywords = ref<string>(props.antenna.excludeKeywords.map(x => x.join(' ')).join('\n'));
|
||||
const caseSensitive = ref<boolean>(props.antenna.caseSensitive);
|
||||
const localOnly = ref<boolean>(props.antenna.localOnly);
|
||||
const excludeBots = ref<boolean>(props.antenna.excludeBots);
|
||||
const withReplies = ref<boolean>(props.antenna.withReplies);
|
||||
const withFile = ref<boolean>(props.antenna.withFile);
|
||||
const name = ref<string>(initialAntenna.name);
|
||||
const src = ref<Misskey.entities.AntennasCreateRequest['src']>(initialAntenna.src);
|
||||
const userListId = ref<string | null>(initialAntenna.userListId);
|
||||
const users = ref<string>(initialAntenna.users.join('\n'));
|
||||
const keywords = ref<string>(initialAntenna.keywords.map(x => x.join(' ')).join('\n'));
|
||||
const excludeKeywords = ref<string>(initialAntenna.excludeKeywords.map(x => x.join(' ')).join('\n'));
|
||||
const caseSensitive = ref<boolean>(initialAntenna.caseSensitive);
|
||||
const localOnly = ref<boolean>(initialAntenna.localOnly);
|
||||
const excludeBots = ref<boolean>(initialAntenna.excludeBots);
|
||||
const withReplies = ref<boolean>(initialAntenna.withReplies);
|
||||
const withFile = ref<boolean>(initialAntenna.withFile);
|
||||
const userLists = ref<Misskey.entities.UserList[] | null>(null);
|
||||
|
||||
watch(() => src.value, async () => {
|
||||
@@ -106,24 +131,26 @@ async function saveAntenna() {
|
||||
excludeKeywords: excludeKeywords.value.trim().split('\n').map(x => x.trim().split(' ')),
|
||||
};
|
||||
|
||||
if (props.antenna.id == null) {
|
||||
await os.apiWithDialog('antennas/create', antennaData);
|
||||
emit('created');
|
||||
if (initialAntenna.id == null) {
|
||||
const res = await os.apiWithDialog('antennas/create', antennaData);
|
||||
emit('created', res);
|
||||
} else {
|
||||
await os.apiWithDialog('antennas/update', { ...antennaData, antennaId: props.antenna.id });
|
||||
emit('updated');
|
||||
const res = await os.apiWithDialog('antennas/update', { ...antennaData, antennaId: initialAntenna.id });
|
||||
emit('updated', res);
|
||||
}
|
||||
}
|
||||
|
||||
async function deleteAntenna() {
|
||||
if (initialAntenna.id == null) return;
|
||||
|
||||
const { canceled } = await os.confirm({
|
||||
type: 'warning',
|
||||
text: i18n.tsx.removeAreYouSure({ x: props.antenna.name }),
|
||||
text: i18n.tsx.removeAreYouSure({ x: initialAntenna.name }),
|
||||
});
|
||||
if (canceled) return;
|
||||
|
||||
await misskeyApi('antennas/delete', {
|
||||
antennaId: props.antenna.id,
|
||||
antennaId: initialAntenna.id,
|
||||
});
|
||||
|
||||
os.success();
|
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import { HttpResponse, http } from 'msw';
|
||||
import { commonHandlers } from '../../.storybook/mocks.js';
|
||||
import MkAntennaEditorDialog from './MkAntennaEditorDialog.vue';
|
||||
export const Default = {
|
||||
render(args) {
|
||||
return {
|
||||
components: {
|
||||
MkAntennaEditorDialog,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
args,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
props() {
|
||||
return {
|
||||
...this.args,
|
||||
};
|
||||
},
|
||||
events() {
|
||||
return {
|
||||
created: action('created'),
|
||||
updated: action('updated'),
|
||||
deleted: action('deleted'),
|
||||
closed: action('closed'),
|
||||
};
|
||||
},
|
||||
},
|
||||
template: '<MkAntennaEditorDialog v-bind="props" v-on="events" />',
|
||||
};
|
||||
},
|
||||
args: {
|
||||
},
|
||||
parameters: {
|
||||
layout: 'centered',
|
||||
msw: {
|
||||
handlers: [
|
||||
...commonHandlers,
|
||||
http.post('/api/antennas/create', async ({ request }) => {
|
||||
action('POST /api/antennas/create')(await request.json());
|
||||
return HttpResponse.json({});
|
||||
}),
|
||||
http.post('/api/antennas/update', async ({ request }) => {
|
||||
action('POST /api/antennas/update')(await request.json());
|
||||
return HttpResponse.json({});
|
||||
}),
|
||||
http.post('/api/antennas/delete', async ({ request }) => {
|
||||
action('POST /api/antennas/delete')(await request.json());
|
||||
return HttpResponse.json();
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
} satisfies StoryObj<typeof MkAntennaEditorDialog>;
|
63
packages/frontend/src/components/MkAntennaEditorDialog.vue
Normal file
63
packages/frontend/src/components/MkAntennaEditorDialog.vue
Normal file
@@ -0,0 +1,63 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<MkModalWindow
|
||||
ref="dialog"
|
||||
:withOkButton="false"
|
||||
:width="500"
|
||||
:height="550"
|
||||
@close="close()"
|
||||
@closed="emit('closed')"
|
||||
>
|
||||
<template #header>{{ antenna == null ? i18n.ts.createAntenna : i18n.ts.editAntenna }}</template>
|
||||
<XAntennaEditor
|
||||
:antenna="antenna"
|
||||
@created="onAntennaCreated"
|
||||
@updated="onAntennaUpdated"
|
||||
@deleted="onAntennaDeleted"
|
||||
/>
|
||||
</MkModalWindow>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { shallowRef } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkModalWindow from '@/components/MkModalWindow.vue';
|
||||
import XAntennaEditor from '@/components/MkAntennaEditor.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
|
||||
defineProps<{
|
||||
antenna?: Misskey.entities.Antenna;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'created', newAntenna: Misskey.entities.Antenna): void,
|
||||
(ev: 'updated', editedAntenna: Misskey.entities.Antenna): void,
|
||||
(ev: 'deleted'): void,
|
||||
(ev: 'closed'): void,
|
||||
}>();
|
||||
|
||||
const dialog = shallowRef<InstanceType<typeof MkModalWindow>>();
|
||||
|
||||
function onAntennaCreated(newAntenna: Misskey.entities.Antenna) {
|
||||
emit('created', newAntenna);
|
||||
dialog.value?.close();
|
||||
}
|
||||
|
||||
function onAntennaUpdated(editedAntenna: Misskey.entities.Antenna) {
|
||||
emit('updated', editedAntenna);
|
||||
dialog.value?.close();
|
||||
}
|
||||
|
||||
function onAntennaDeleted() {
|
||||
emit('deleted');
|
||||
dialog.value?.close();
|
||||
}
|
||||
|
||||
function close() {
|
||||
dialog.value?.close();
|
||||
}
|
||||
</script>
|
@@ -31,6 +31,7 @@ export const Default = {
|
||||
},
|
||||
args: {
|
||||
clip: clip(),
|
||||
noUserInfo: false,
|
||||
},
|
||||
parameters: {
|
||||
layout: 'fullscreen',
|
||||
|
@@ -12,10 +12,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<div v-if="clip.lastClippedAt">{{ i18n.ts.updatedAt }}: <MkTime :time="clip.lastClippedAt" mode="detail"/></div>
|
||||
<div v-if="clip.notesCount != null">{{ i18n.ts.notesCount }}: {{ number(clip.notesCount) }} / {{ $i?.policies.noteEachClipsLimit }} ({{ i18n.tsx.remainingN({ n: remaining }) }})</div>
|
||||
</div>
|
||||
<div :class="$style.divider"></div>
|
||||
<div>
|
||||
<MkAvatar :user="clip.user" :class="$style.userAvatar" indicator link preview/> <MkUserName :user="clip.user" :nowrap="false"/>
|
||||
</div>
|
||||
<template v-if="!props.noUserInfo">
|
||||
<div :class="$style.divider"></div>
|
||||
<div>
|
||||
<MkAvatar :user="clip.user" :class="$style.userAvatar" indicator link preview/> <MkUserName :user="clip.user" :nowrap="false"/>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</MkA>
|
||||
</template>
|
||||
@@ -27,9 +29,12 @@ import { i18n } from '@/i18n.js';
|
||||
import { $i } from '@/account.js';
|
||||
import number from '@/filters/number.js';
|
||||
|
||||
const props = defineProps<{
|
||||
const props = withDefaults(defineProps<{
|
||||
clip: Misskey.entities.Clip;
|
||||
}>();
|
||||
noUserInfo?: boolean;
|
||||
}>(), {
|
||||
noUserInfo: false,
|
||||
});
|
||||
|
||||
const remaining = computed(() => {
|
||||
return ($i?.policies && props.clip.notesCount != null) ? ($i.policies.noteEachClipsLimit - props.clip.notesCount) : i18n.ts.unknown;
|
||||
|
@@ -0,0 +1,7 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import MkDateSeparatedList from './MkDateSeparatedList.vue';
|
||||
void MkDateSeparatedList;
|
159
packages/frontend/src/components/MkDialog.stories.impl.ts
Normal file
159
packages/frontend/src/components/MkDialog.stories.impl.ts
Normal file
@@ -0,0 +1,159 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { expect, userEvent, waitFor, within } from '@storybook/test';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import MkDialog from './MkDialog.vue';
|
||||
const Base = {
|
||||
render(args) {
|
||||
return {
|
||||
components: {
|
||||
MkDialog,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
args,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
props() {
|
||||
return {
|
||||
...this.args,
|
||||
};
|
||||
},
|
||||
events() {
|
||||
return {
|
||||
done: action('done'),
|
||||
closed: action('closed'),
|
||||
};
|
||||
},
|
||||
},
|
||||
template: '<MkDialog v-bind="props" v-on="events" />',
|
||||
};
|
||||
},
|
||||
args: {
|
||||
text: 'Hello, world!',
|
||||
},
|
||||
parameters: {
|
||||
layout: 'centered',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkDialog>;
|
||||
export const Success = {
|
||||
...Base,
|
||||
args: {
|
||||
...Base.args,
|
||||
type: 'success',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkDialog>;
|
||||
export const Error = {
|
||||
...Base,
|
||||
args: {
|
||||
...Base.args,
|
||||
type: 'error',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkDialog>;
|
||||
export const Warning = {
|
||||
...Base,
|
||||
args: {
|
||||
...Base.args,
|
||||
type: 'warning',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkDialog>;
|
||||
export const Info = {
|
||||
...Base,
|
||||
args: {
|
||||
...Base.args,
|
||||
type: 'info',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkDialog>;
|
||||
export const Question = {
|
||||
...Base,
|
||||
args: {
|
||||
...Base.args,
|
||||
type: 'question',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkDialog>;
|
||||
export const Waiting = {
|
||||
...Base,
|
||||
args: {
|
||||
...Base.args,
|
||||
type: 'waiting',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkDialog>;
|
||||
export const DialogWithActions = {
|
||||
...Question,
|
||||
args: {
|
||||
...Question.args,
|
||||
text: i18n.ts.areYouSure,
|
||||
actions: [
|
||||
{
|
||||
text: i18n.ts.yes,
|
||||
primary: true,
|
||||
callback() {
|
||||
action('YES')();
|
||||
},
|
||||
},
|
||||
{
|
||||
text: i18n.ts.no,
|
||||
callback() {
|
||||
action('NO')();
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
} satisfies StoryObj<typeof MkDialog>;
|
||||
export const DialogWithDangerActions = {
|
||||
...Warning,
|
||||
args: {
|
||||
...Warning.args,
|
||||
text: i18n.ts.resetAreYouSure,
|
||||
actions: [
|
||||
{
|
||||
text: i18n.ts.yes,
|
||||
danger: true,
|
||||
primary: true,
|
||||
callback() {
|
||||
action('YES')();
|
||||
},
|
||||
},
|
||||
{
|
||||
text: i18n.ts.no,
|
||||
callback() {
|
||||
action('NO')();
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
} satisfies StoryObj<typeof MkDialog>;
|
||||
export const DialogWithInput = {
|
||||
...Question,
|
||||
args: {
|
||||
...Question.args,
|
||||
title: 'Hello, world!',
|
||||
text: undefined,
|
||||
input: {
|
||||
placeholder: i18n.ts.inputMessageHere,
|
||||
type: 'text',
|
||||
default: null,
|
||||
minLength: 2,
|
||||
maxLength: 3,
|
||||
},
|
||||
},
|
||||
async play({ canvasElement }) {
|
||||
const canvas = within(canvasElement);
|
||||
await expect(canvasElement).toHaveTextContent(i18n.tsx._dialog.charactersBelow({ current: 0, min: 2 }));
|
||||
const okButton = canvas.getByRole('button', { name: i18n.ts.ok });
|
||||
await expect(okButton).toBeDisabled();
|
||||
const input = canvas.getByRole<HTMLInputElement>('combobox');
|
||||
await waitFor(() => userEvent.hover(input));
|
||||
await waitFor(() => userEvent.click(input));
|
||||
await waitFor(() => userEvent.type(input, 'M'));
|
||||
await expect(canvasElement).toHaveTextContent(i18n.tsx._dialog.charactersBelow({ current: 1, min: 2 }));
|
||||
await waitFor(() => userEvent.type(input, 'i'));
|
||||
await expect(okButton).toBeEnabled();
|
||||
},
|
||||
} satisfies StoryObj<typeof MkDialog>;
|
@@ -36,7 +36,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</MkInput>
|
||||
<MkSelect v-if="select" v-model="selectedValue" autofocus>
|
||||
<template v-if="select.items">
|
||||
<option v-for="item in select.items" :value="item.value">{{ item.text }}</option>
|
||||
<template v-for="item in select.items">
|
||||
<optgroup v-if="'sectionTitle' in item" :label="item.sectionTitle">
|
||||
<option v-for="subItem in item.items" :value="subItem.value">{{ subItem.text }}</option>
|
||||
</optgroup>
|
||||
<option v-else :value="item.value">{{ item.text }}</option>
|
||||
</template>
|
||||
</template>
|
||||
</MkSelect>
|
||||
<div v-if="(showOkButton || showCancelButton) && !actions" :class="$style.buttons">
|
||||
@@ -67,11 +72,16 @@ type Input = {
|
||||
maxLength?: number;
|
||||
};
|
||||
|
||||
type SelectItem = {
|
||||
value: any;
|
||||
text: string;
|
||||
};
|
||||
|
||||
type Select = {
|
||||
items: {
|
||||
value: any;
|
||||
text: string;
|
||||
}[];
|
||||
items: (SelectItem | {
|
||||
sectionTitle: string;
|
||||
items: SelectItem[];
|
||||
})[];
|
||||
default: string | null;
|
||||
};
|
||||
|
||||
|
@@ -0,0 +1,7 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import MkDivider from './MkDivider.vue';
|
||||
void MkDivider;
|
54
packages/frontend/src/components/MkDonation.stories.impl.ts
Normal file
54
packages/frontend/src/components/MkDonation.stories.impl.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import { onBeforeUnmount } from 'vue';
|
||||
import MkDonation from './MkDonation.vue';
|
||||
import { instance } from '@/instance.js';
|
||||
export const Default = {
|
||||
render(args) {
|
||||
return {
|
||||
components: {
|
||||
MkDonation,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
args,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
props() {
|
||||
return {
|
||||
...this.args,
|
||||
};
|
||||
},
|
||||
events() {
|
||||
return {
|
||||
closed: action('closed'),
|
||||
};
|
||||
},
|
||||
},
|
||||
template: '<MkDonation v-bind="props" v-on="events" />',
|
||||
};
|
||||
},
|
||||
args: {
|
||||
// @ts-expect-error name is used for mocking instance
|
||||
name: 'Misskey Hub',
|
||||
},
|
||||
decorators: [
|
||||
(_, { args }) => ({
|
||||
setup() {
|
||||
// @ts-expect-error name is used for mocking instance
|
||||
instance.name = args.name;
|
||||
onBeforeUnmount(() => instance.name = null);
|
||||
},
|
||||
template: '<story/>',
|
||||
}),
|
||||
],
|
||||
parameters: {
|
||||
layout: 'centered',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkDonation>;
|
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import MkDrive_file from './MkDrive.file.vue';
|
||||
import { file } from '../../.storybook/fakes.js';
|
||||
export const Default = {
|
||||
render(args) {
|
||||
return {
|
||||
components: {
|
||||
MkDrive_file,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
args,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
props() {
|
||||
return {
|
||||
...this.args,
|
||||
};
|
||||
},
|
||||
events() {
|
||||
return {
|
||||
chosen: action('chosen'),
|
||||
dragstart: action('dragstart'),
|
||||
dragend: action('dragend'),
|
||||
};
|
||||
},
|
||||
},
|
||||
template: '<MkDrive_file v-bind="props" v-on="events" />',
|
||||
};
|
||||
},
|
||||
args: {
|
||||
file: file(),
|
||||
},
|
||||
parameters: {
|
||||
chromatic: {
|
||||
// NOTE: ロードが終わるまで待つ
|
||||
delay: 3000,
|
||||
},
|
||||
layout: 'centered',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkDrive_file>;
|
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import { http, HttpResponse } from 'msw';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkDrive_folder from './MkDrive.folder.vue';
|
||||
import { folder } from '../../.storybook/fakes.js';
|
||||
import { commonHandlers } from '../../.storybook/mocks.js';
|
||||
export const Default = {
|
||||
render(args) {
|
||||
return {
|
||||
components: {
|
||||
MkDrive_folder,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
args,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
props() {
|
||||
return {
|
||||
...this.args,
|
||||
};
|
||||
},
|
||||
events() {
|
||||
return {
|
||||
chosen: action('chosen'),
|
||||
move: action('move'),
|
||||
upload: action('upload'),
|
||||
removeFile: action('removeFile'),
|
||||
removeFolder: action('removeFolder'),
|
||||
dragstart: action('dragstart'),
|
||||
dragend: action('dragend'),
|
||||
};
|
||||
},
|
||||
},
|
||||
template: '<MkDrive_folder v-bind="props" v-on="events" />',
|
||||
};
|
||||
},
|
||||
args: {
|
||||
folder: folder(),
|
||||
},
|
||||
parameters: {
|
||||
layout: 'centered',
|
||||
msw: {
|
||||
handlers: [
|
||||
...commonHandlers,
|
||||
http.post('/api/drive/folders/delete', async ({ request }) => {
|
||||
action('POST /api/drive/folders/delete')(await request.json());
|
||||
return HttpResponse.json(undefined, { status: 204 });
|
||||
}),
|
||||
http.post('/api/drive/folders/update', async ({ request }) => {
|
||||
const req = await request.json() as Misskey.entities.DriveFoldersUpdateRequest;
|
||||
action('POST /api/drive/folders/update')(req);
|
||||
return HttpResponse.json({
|
||||
...folder(),
|
||||
id: req.folderId,
|
||||
name: req.name ?? folder().name,
|
||||
parentId: req.parentId ?? folder().parentId,
|
||||
});
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
} satisfies StoryObj<typeof MkDrive_folder>;
|
@@ -27,7 +27,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<p v-if="defaultStore.state.uploadFolder == folder.id" :class="$style.upload">
|
||||
{{ i18n.ts.uploadFolder }}
|
||||
</p>
|
||||
<button v-if="selectMode" class="_button" :class="[$style.checkbox, { [$style.checked]: isSelected }]" @click.prevent.stop="checkboxClicked"></button>
|
||||
<button v-if="selectMode" class="_button" :class="$style.checkboxWrapper" @click.prevent.stop="checkboxClicked">
|
||||
<div :class="[$style.checkbox, { [$style.checked]: isSelected }]"></div>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -53,6 +55,7 @@ const props = withDefaults(defineProps<{
|
||||
|
||||
const emit = defineEmits<{
|
||||
(ev: 'chosen', v: Misskey.entities.DriveFolder): void;
|
||||
(ev: 'unchose', v: Misskey.entities.DriveFolder): void;
|
||||
(ev: 'move', v: Misskey.entities.DriveFolder): void;
|
||||
(ev: 'upload', file: File, folder: Misskey.entities.DriveFolder);
|
||||
(ev: 'removeFile', v: Misskey.entities.DriveFile['id']): void;
|
||||
@@ -68,7 +71,11 @@ const isDragging = ref(false);
|
||||
const title = computed(() => props.folder.name);
|
||||
|
||||
function checkboxClicked() {
|
||||
emit('chosen', props.folder);
|
||||
if (props.isSelected) {
|
||||
emit('unchose', props.folder);
|
||||
} else {
|
||||
emit('chosen', props.folder);
|
||||
}
|
||||
}
|
||||
|
||||
function onClick() {
|
||||
@@ -222,6 +229,17 @@ function rename() {
|
||||
});
|
||||
}
|
||||
|
||||
function move() {
|
||||
os.selectDriveFolder(false).then(folder => {
|
||||
if (folder[0] && folder[0].id === props.folder.id) return;
|
||||
|
||||
misskeyApi('drive/folders/update', {
|
||||
folderId: props.folder.id,
|
||||
parentId: folder[0] ? folder[0].id : null,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function deleteFolder() {
|
||||
misskeyApi('drive/folders/delete', {
|
||||
folderId: props.folder.id,
|
||||
@@ -267,6 +285,10 @@ function onContextmenu(ev: MouseEvent) {
|
||||
text: i18n.ts.rename,
|
||||
icon: 'ti ti-forms',
|
||||
action: rename,
|
||||
}, {
|
||||
text: i18n.ts.move,
|
||||
icon: 'ti ti ti-folder-symlink',
|
||||
action: move,
|
||||
}, { type: 'divider' }, {
|
||||
text: i18n.ts.delete,
|
||||
icon: 'ti ti-trash',
|
||||
@@ -310,17 +332,43 @@ function onContextmenu(ev: MouseEvent) {
|
||||
}
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
.checkboxWrapper {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 8px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background: #fff;
|
||||
border: solid 1px #000;
|
||||
border-radius: 50%;
|
||||
bottom: 2px;
|
||||
right: 2px;
|
||||
padding: 8px;
|
||||
box-sizing: border-box;
|
||||
|
||||
&.checked {
|
||||
background: var(--accent);
|
||||
> .checkbox {
|
||||
position: relative;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: #fff;
|
||||
border: solid 2px var(--divider);
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
|
||||
&.checked {
|
||||
border-color: var(--accent);
|
||||
background: var(--accent);
|
||||
|
||||
&::after {
|
||||
content: "\ea5e";
|
||||
font-family: 'tabler-icons';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
line-height: 22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: var(--accentedBg);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,7 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import MkDrive_navFolder from './MkDrive.navFolder.vue';
|
||||
void MkDrive_navFolder;
|
82
packages/frontend/src/components/MkDrive.stories.impl.ts
Normal file
82
packages/frontend/src/components/MkDrive.stories.impl.ts
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import { http, HttpResponse } from 'msw';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import MkDrive from './MkDrive.vue';
|
||||
import { file, folder } from '../../.storybook/fakes.js';
|
||||
import { commonHandlers } from '../../.storybook/mocks.js';
|
||||
export const Default = {
|
||||
render(args) {
|
||||
return {
|
||||
components: {
|
||||
MkDrive,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
args,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
props() {
|
||||
return {
|
||||
...this.args,
|
||||
};
|
||||
},
|
||||
events() {
|
||||
return {
|
||||
selected: action('selected'),
|
||||
'change-selection': action('change-selection'),
|
||||
'move-root': action('move-root'),
|
||||
cd: action('cd'),
|
||||
'open-folder': action('open-folder'),
|
||||
};
|
||||
},
|
||||
},
|
||||
template: '<MkDrive v-bind="props" v-on="events" />',
|
||||
};
|
||||
},
|
||||
parameters: {
|
||||
chromatic: {
|
||||
// NOTE: ロードが終わるまで待つ
|
||||
delay: 3000,
|
||||
},
|
||||
layout: 'centered',
|
||||
msw: {
|
||||
handlers: [
|
||||
...commonHandlers,
|
||||
http.post('/api/drive/files', async ({ request }) => {
|
||||
action('POST /api/drive/files')(await request.json());
|
||||
return HttpResponse.json([file()]);
|
||||
}),
|
||||
http.post('/api/drive/folders', async ({ request }) => {
|
||||
action('POST /api/drive/folders')(await request.json());
|
||||
return HttpResponse.json([folder(crypto.randomUUID())]);
|
||||
}),
|
||||
http.post('/api/drive/folders/create', async ({ request }) => {
|
||||
const req = await request.json() as Misskey.entities.DriveFoldersCreateRequest;
|
||||
action('POST /api/drive/folders/create')(req);
|
||||
return HttpResponse.json(folder(crypto.randomUUID(), req.name, req.parentId));
|
||||
}),
|
||||
http.post('/api/drive/folders/delete', async ({ request }) => {
|
||||
action('POST /api/drive/folders/delete')(await request.json());
|
||||
return HttpResponse.json(undefined, { status: 204 });
|
||||
}),
|
||||
http.post('/api/drive/folders/update', async ({ request }) => {
|
||||
const req = await request.json() as Misskey.entities.DriveFoldersUpdateRequest;
|
||||
action('POST /api/drive/folders/update')(req);
|
||||
return HttpResponse.json({
|
||||
...folder(),
|
||||
id: req.folderId,
|
||||
name: req.name ?? folder().name,
|
||||
parentId: req.parentId ?? folder().parentId,
|
||||
});
|
||||
}),
|
||||
]
|
||||
},
|
||||
},
|
||||
} satisfies StoryObj<typeof MkDrive>;
|
@@ -52,6 +52,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
:selectMode="select === 'folder'"
|
||||
:isSelected="selectedFolders.some(x => x.id === f.id)"
|
||||
@chosen="chooseFolder"
|
||||
@unchose="unchoseFolder"
|
||||
@move="move"
|
||||
@upload="upload"
|
||||
@removeFile="removeFile"
|
||||
@@ -428,6 +429,11 @@ function chooseFolder(folderToChoose: Misskey.entities.DriveFolder) {
|
||||
}
|
||||
}
|
||||
|
||||
function unchoseFolder(folderToUnchose: Misskey.entities.DriveFolder) {
|
||||
selectedFolders.value = selectedFolders.value.filter(f => f.id !== folderToUnchose.id);
|
||||
emit('change-selection', selectedFolders.value);
|
||||
}
|
||||
|
||||
function move(target?: Misskey.entities.DriveFolder | Misskey.entities.DriveFolder['id' | 'parentId']) {
|
||||
if (!target) {
|
||||
goRoot();
|
||||
|
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import MkDriveFileThumbnail from './MkDriveFileThumbnail.vue';
|
||||
import { file } from '../../.storybook/fakes.js';
|
||||
export const Default = {
|
||||
render(args) {
|
||||
return {
|
||||
components: {
|
||||
MkDriveFileThumbnail,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
args,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
props() {
|
||||
return {
|
||||
...this.args,
|
||||
};
|
||||
},
|
||||
},
|
||||
template: '<MkDriveFileThumbnail v-bind="props" />',
|
||||
};
|
||||
},
|
||||
args: {
|
||||
file: file(),
|
||||
fit: 'contain',
|
||||
},
|
||||
parameters: {
|
||||
chromatic: {
|
||||
// NOTE: ロードが終わるまで待つ
|
||||
delay: 3000,
|
||||
},
|
||||
layout: 'centered',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkDriveFileThumbnail>;
|
@@ -26,7 +26,7 @@ import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
|
||||
|
||||
const props = defineProps<{
|
||||
file: Misskey.entities.DriveFile;
|
||||
fit: string;
|
||||
fit: 'cover' | 'contain';
|
||||
}>();
|
||||
|
||||
const is = computed(() => {
|
||||
|
@@ -0,0 +1,7 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import MkDriveSelectDialog from './MkDriveSelectDialog.vue';
|
||||
void MkDriveSelectDialog;
|
@@ -0,0 +1,7 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import MkDriveWindow from './MkDriveWindow.vue';
|
||||
void MkDriveWindow;
|
@@ -0,0 +1,7 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import MkEmojiPicker_section from './MkEmojiPicker.section.vue';
|
||||
void MkEmojiPicker_section;
|
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { expect, userEvent, waitFor, within } from '@storybook/test';
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import MkEmojiPicker from './MkEmojiPicker.vue';
|
||||
export const Default = {
|
||||
render(args) {
|
||||
return {
|
||||
components: {
|
||||
MkEmojiPicker,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
args,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
props() {
|
||||
return {
|
||||
...this.args,
|
||||
};
|
||||
},
|
||||
events() {
|
||||
return {
|
||||
chosen: action('chosen'),
|
||||
};
|
||||
},
|
||||
},
|
||||
template: '<MkEmojiPicker v-bind="props" v-on="events" />',
|
||||
};
|
||||
},
|
||||
async play({ canvasElement }) {
|
||||
const canvas = within(canvasElement);
|
||||
const faceSection = canvas.getByText(/face/i);
|
||||
await waitFor(() => userEvent.click(faceSection));
|
||||
const grinning = canvasElement.querySelector('[data-emoji="😀"]');
|
||||
await expect(grinning).toBeInTheDocument();
|
||||
if (grinning == null) throw new Error(); // NOTE: not called
|
||||
await waitFor(() => userEvent.click(grinning));
|
||||
const recentUsedSection = canvas.getByText(new RegExp(i18n.ts.recentUsed)).parentElement;
|
||||
await expect(recentUsedSection).toBeInTheDocument();
|
||||
if (recentUsedSection == null) throw new Error(); // NOTE: not called
|
||||
await expect(within(recentUsedSection).getByAltText('😀')).toBeInTheDocument();
|
||||
await expect(within(recentUsedSection).queryByAltText('😬')).toEqual(null);
|
||||
},
|
||||
parameters: {
|
||||
layout: 'centered',
|
||||
},
|
||||
} satisfies StoryObj<typeof MkEmojiPicker>;
|
@@ -0,0 +1,7 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import MkEmojiPickerDialog from './MkEmojiPickerDialog.vue';
|
||||
void MkEmojiPickerDialog;
|
@@ -79,7 +79,7 @@ const props = defineProps<{
|
||||
const emit = defineEmits<{
|
||||
(ev: 'change', _ev: KeyboardEvent): void;
|
||||
(ev: 'keydown', _ev: KeyboardEvent): void;
|
||||
(ev: 'enter'): void;
|
||||
(ev: 'enter', _ev: KeyboardEvent): void;
|
||||
(ev: 'update:modelValue', value: string | number): void;
|
||||
}>();
|
||||
|
||||
@@ -111,7 +111,7 @@ const onKeydown = (ev: KeyboardEvent) => {
|
||||
emit('keydown', ev);
|
||||
|
||||
if (ev.code === 'Enter') {
|
||||
emit('enter');
|
||||
emit('enter', ev);
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -259,7 +259,7 @@ const canPost = computed((): boolean => {
|
||||
1 <= files.value.length ||
|
||||
poll.value != null ||
|
||||
props.renote != null ||
|
||||
(props.reply != null && quoteId.value != null)
|
||||
quoteId.value != null
|
||||
) &&
|
||||
(textLength.value <= maxTextLength.value) &&
|
||||
(!poll.value || poll.value.choices.length >= 2);
|
||||
@@ -906,10 +906,23 @@ async function insertEmoji(ev: MouseEvent) {
|
||||
textAreaReadOnly.value = true;
|
||||
const target = ev.currentTarget ?? ev.target;
|
||||
if (target == null) return;
|
||||
|
||||
// emojiPickerはダイアログが閉じずにtextareaとやりとりするので、
|
||||
// focustrapをかけているとinsertTextAtCursorが効かない
|
||||
// そのため、投稿フォームのテキストに直接注入する
|
||||
// See: https://github.com/misskey-dev/misskey/pull/14282
|
||||
// https://github.com/misskey-dev/misskey/issues/14274
|
||||
|
||||
let pos = textareaEl.value?.selectionStart ?? 0;
|
||||
let posEnd = textareaEl.value?.selectionEnd ?? text.value.length;
|
||||
emojiPicker.show(
|
||||
target as HTMLElement,
|
||||
emoji => {
|
||||
insertTextAtCursor(textareaEl.value, emoji);
|
||||
const textBefore = text.value.substring(0, pos);
|
||||
const textAfter = text.value.substring(posEnd);
|
||||
text.value = textBefore + emoji + textAfter;
|
||||
pos += emoji.length;
|
||||
posEnd += emoji.length;
|
||||
},
|
||||
() => {
|
||||
textAreaReadOnly.value = false;
|
||||
|
@@ -29,6 +29,9 @@ export default defineComponent({
|
||||
// なぜかFragmentになることがあるため
|
||||
if (options.length === 1 && options[0].props == null) options = options[0].children as VNode[];
|
||||
|
||||
// vnodeのうちv-if=falseなものを除外する(trueになるものはoptionなど他typeになる)
|
||||
options = options.filter(vnode => !(typeof vnode.type === 'symbol' && vnode.type.description === 'v-cmt' && vnode.children === 'v-if'));
|
||||
|
||||
return () => h('div', {
|
||||
class: 'novjtcto',
|
||||
}, [
|
||||
@@ -40,6 +43,7 @@ export default defineComponent({
|
||||
}, options.map(option => h(MkRadio, {
|
||||
key: option.key as string,
|
||||
value: option.props?.value,
|
||||
disabled: option.props?.disabled,
|
||||
modelValue: value.value,
|
||||
'onUpdate:modelValue': _v => value.value = _v,
|
||||
}, () => option.children)),
|
||||
|
@@ -18,47 +18,49 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<template #header>
|
||||
{{ mode === 'create' ? i18n.ts._webhookSettings.createWebhook : i18n.ts._webhookSettings.modifyWebhook }}
|
||||
</template>
|
||||
<MkSpacer :marginMin="20" :marginMax="28">
|
||||
<MkLoading v-if="loading !== 0"/>
|
||||
<div v-else :class="$style.root" class="_gaps_m">
|
||||
<MkInput v-model="title">
|
||||
<template #label>{{ i18n.ts._webhookSettings.name }}</template>
|
||||
</MkInput>
|
||||
<MkInput v-model="url">
|
||||
<template #label>URL</template>
|
||||
</MkInput>
|
||||
<MkInput v-model="secret">
|
||||
<template #label>{{ i18n.ts._webhookSettings.secret }}</template>
|
||||
</MkInput>
|
||||
<MkFolder :defaultOpen="true">
|
||||
<template #label>{{ i18n.ts._webhookSettings.events }}</template>
|
||||
|
||||
<div class="_gaps_s">
|
||||
<MkSwitch v-model="events.abuseReport" :disabled="disabledEvents.abuseReport">
|
||||
<template #label>{{ i18n.ts._webhookSettings._systemEvents.abuseReport }}</template>
|
||||
</MkSwitch>
|
||||
<MkSwitch v-model="events.abuseReportResolved" :disabled="disabledEvents.abuseReportResolved">
|
||||
<template #label>{{ i18n.ts._webhookSettings._systemEvents.abuseReportResolved }}</template>
|
||||
</MkSwitch>
|
||||
<MkSwitch v-model="events.userCreated" :disabled="disabledEvents.userCreated">
|
||||
<template #label>{{ i18n.ts._webhookSettings._systemEvents.userCreated }}</template>
|
||||
</MkSwitch>
|
||||
</div>
|
||||
</MkFolder>
|
||||
<div style="display: flex; flex-direction: column; min-height: 100%;">
|
||||
<MkSpacer :marginMin="20" :marginMax="28" style="flex-grow: 1;">
|
||||
<MkLoading v-if="loading !== 0"/>
|
||||
<div v-else :class="$style.root" class="_gaps_m">
|
||||
<MkInput v-model="title">
|
||||
<template #label>{{ i18n.ts._webhookSettings.name }}</template>
|
||||
</MkInput>
|
||||
<MkInput v-model="url">
|
||||
<template #label>URL</template>
|
||||
</MkInput>
|
||||
<MkInput v-model="secret">
|
||||
<template #label>{{ i18n.ts._webhookSettings.secret }}</template>
|
||||
</MkInput>
|
||||
<MkFolder :defaultOpen="true">
|
||||
<template #label>{{ i18n.ts._webhookSettings.trigger }}</template>
|
||||
|
||||
<MkSwitch v-model="isActive">
|
||||
<template #label>{{ i18n.ts.enable }}</template>
|
||||
</MkSwitch>
|
||||
<div class="_gaps_s">
|
||||
<MkSwitch v-model="events.abuseReport" :disabled="disabledEvents.abuseReport">
|
||||
<template #label>{{ i18n.ts._webhookSettings._systemEvents.abuseReport }}</template>
|
||||
</MkSwitch>
|
||||
<MkSwitch v-model="events.abuseReportResolved" :disabled="disabledEvents.abuseReportResolved">
|
||||
<template #label>{{ i18n.ts._webhookSettings._systemEvents.abuseReportResolved }}</template>
|
||||
</MkSwitch>
|
||||
<MkSwitch v-model="events.userCreated" :disabled="disabledEvents.userCreated">
|
||||
<template #label>{{ i18n.ts._webhookSettings._systemEvents.userCreated }}</template>
|
||||
</MkSwitch>
|
||||
</div>
|
||||
</MkFolder>
|
||||
|
||||
<div :class="$style.footer" class="_buttonsCenter">
|
||||
<MkButton primary :disabled="disableSubmitButton" @click="onSubmitClicked">
|
||||
<i class="ti ti-check"></i>
|
||||
{{ i18n.ts.ok }}
|
||||
</MkButton>
|
||||
<MkButton @click="onCancelClicked"><i class="ti ti-x"></i> {{ i18n.ts.cancel }}</MkButton>
|
||||
<MkSwitch v-model="isActive">
|
||||
<template #label>{{ i18n.ts.enable }}</template>
|
||||
</MkSwitch>
|
||||
</div>
|
||||
</MkSpacer>
|
||||
<div :class="$style.footer" class="_buttonsCenter">
|
||||
<MkButton primary rounded :disabled="disableSubmitButton" @click="onSubmitClicked">
|
||||
<i class="ti ti-check"></i>
|
||||
{{ i18n.ts.ok }}
|
||||
</MkButton>
|
||||
<MkButton rounded @click="onCancelClicked"><i class="ti ti-x"></i> {{ i18n.ts.cancel }}</MkButton>
|
||||
</div>
|
||||
</MkSpacer>
|
||||
</div>
|
||||
</MkModalWindow>
|
||||
</template>
|
||||
|
||||
@@ -223,9 +225,14 @@ onMounted(async () => {
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-end;
|
||||
margin-top: 20px;
|
||||
position: sticky;
|
||||
z-index: 10000;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: 12px;
|
||||
border-top: solid 0.5px var(--divider);
|
||||
background: var(--acrylicBg);
|
||||
-webkit-backdrop-filter: var(--blur, blur(15px));
|
||||
backdrop-filter: var(--blur, blur(15px));
|
||||
}
|
||||
</style>
|
||||
|
@@ -19,6 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<script lang="ts" setup>
|
||||
import { computed, watch, onUnmounted, provide, ref, shallowRef } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import type { BasicTimelineType } from '@/timelines.js';
|
||||
import MkNotes from '@/components/MkNotes.vue';
|
||||
import MkPullToRefresh from '@/components/MkPullToRefresh.vue';
|
||||
import { useStream } from '@/stream.js';
|
||||
@@ -29,7 +30,7 @@ import { defaultStore } from '@/store.js';
|
||||
import { Paging } from '@/components/MkPagination.vue';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
src: 'home' | 'local' | 'social' | 'global' | 'mentions' | 'directs' | 'list' | 'antenna' | 'channel' | 'role';
|
||||
src: BasicTimelineType | 'mentions' | 'directs' | 'list' | 'antenna' | 'channel' | 'role';
|
||||
list?: string;
|
||||
antenna?: string;
|
||||
channel?: string;
|
||||
|
@@ -7,10 +7,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<div class="_gaps">
|
||||
<div style="text-align: center; padding: 0 16px;">{{ i18n.ts._initialTutorial._timeline.description1 }}</div>
|
||||
<div class="_gaps_s">
|
||||
<div><i class="ti ti-home"></i> <b>{{ i18n.ts._timelines.home }}</b> … {{ i18n.ts._initialTutorial._timeline.home }}</div>
|
||||
<div><i class="ti ti-planet"></i> <b>{{ i18n.ts._timelines.local }}</b> … {{ i18n.ts._initialTutorial._timeline.local }}</div>
|
||||
<div><i class="ti ti-universe"></i> <b>{{ i18n.ts._timelines.social }}</b> … {{ i18n.ts._initialTutorial._timeline.social }}</div>
|
||||
<div><i class="ti ti-whirl"></i> <b>{{ i18n.ts._timelines.global }}</b> … {{ i18n.ts._initialTutorial._timeline.global }}</div>
|
||||
<div v-for="tl in basicTimelineTypes">
|
||||
<i :class="basicTimelineIconClass(tl)"></i> <b>{{ i18n.ts._timelines[tl] }}</b> … {{ i18n.ts._initialTutorial._timeline[tl] }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="_gaps_s">
|
||||
<div>{{ i18n.ts._initialTutorial._timeline.description2 }}</div>
|
||||
@@ -22,12 +21,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<a href="https://misskey-hub.net/docs/for-users/features/timeline/" target="_blank" class="_link">{{ i18n.ts.help }}</a>
|
||||
</template>
|
||||
</I18n>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { basicTimelineIconClass, basicTimelineTypes } from '@/timelines.js';
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
@@ -11,6 +11,7 @@ import * as Misskey from 'misskey-js';
|
||||
import type { ComponentProps as CP } from 'vue-component-type-helpers';
|
||||
import type { Form, GetFormResultType } from '@/scripts/form.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import MkPostFormDialog from '@/components/MkPostFormDialog.vue';
|
||||
import MkWaitingDialog from '@/components/MkWaitingDialog.vue';
|
||||
@@ -447,15 +448,20 @@ export function authenticateDialog(): Promise<{
|
||||
});
|
||||
}
|
||||
|
||||
type SelectItem<C> = {
|
||||
value: C;
|
||||
text: string;
|
||||
};
|
||||
|
||||
// default が指定されていたら result は null になり得ないことを保証する overload function
|
||||
export function select<C = any>(props: {
|
||||
title?: string;
|
||||
text?: string;
|
||||
default: string;
|
||||
items: {
|
||||
value: C;
|
||||
text: string;
|
||||
}[];
|
||||
items: (SelectItem<C> | {
|
||||
sectionTitle: string;
|
||||
items: SelectItem<C>[];
|
||||
} | undefined)[];
|
||||
}): Promise<{
|
||||
canceled: true; result: undefined;
|
||||
} | {
|
||||
@@ -465,10 +471,10 @@ export function select<C = any>(props: {
|
||||
title?: string;
|
||||
text?: string;
|
||||
default?: string | null;
|
||||
items: {
|
||||
value: C;
|
||||
text: string;
|
||||
}[];
|
||||
items: (SelectItem<C> | {
|
||||
sectionTitle: string;
|
||||
items: SelectItem<C>[];
|
||||
} | undefined)[];
|
||||
}): Promise<{
|
||||
canceled: true; result: undefined;
|
||||
} | {
|
||||
@@ -478,10 +484,10 @@ export function select<C = any>(props: {
|
||||
title?: string;
|
||||
text?: string;
|
||||
default?: string | null;
|
||||
items: {
|
||||
value: C;
|
||||
text: string;
|
||||
}[];
|
||||
items: (SelectItem<C> | {
|
||||
sectionTitle: string;
|
||||
items: SelectItem<C>[];
|
||||
} | undefined)[];
|
||||
}): Promise<{
|
||||
canceled: true; result: undefined;
|
||||
} | {
|
||||
@@ -492,7 +498,7 @@ export function select<C = any>(props: {
|
||||
title: props.title,
|
||||
text: props.text,
|
||||
select: {
|
||||
items: props.items,
|
||||
items: props.items.filter(x => x !== undefined),
|
||||
default: props.default ?? null,
|
||||
},
|
||||
}, {
|
||||
@@ -649,6 +655,13 @@ export function popupMenu(items: MenuItem[], src?: HTMLElement | EventTarget | n
|
||||
}
|
||||
|
||||
export function contextMenu(items: MenuItem[], ev: MouseEvent): Promise<void> {
|
||||
if (
|
||||
defaultStore.state.contextMenu === 'native' ||
|
||||
(defaultStore.state.contextMenu === 'appWithShift' && !ev.shiftKey)
|
||||
) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
let returnFocusTo = getHTMLElementOrNull(ev.currentTarget ?? ev.target) ?? getHTMLElementOrNull(document.activeElement);
|
||||
ev.preventDefault();
|
||||
return new Promise(resolve => nextTick(() => {
|
||||
|
@@ -258,6 +258,12 @@ const patronsWithIcon = [{
|
||||
}, {
|
||||
name: 'えとゔぁす',
|
||||
icon: 'https://assets.misskey-hub.net/patrons/2578f441b82a44cfaa55ba83a318b26e.jpg',
|
||||
}, {
|
||||
name: 'Soli',
|
||||
icon: 'https://assets.misskey-hub.net/patrons/448070c81ebd41eda4ea2328291b2efe.jpg',
|
||||
}, {
|
||||
name: 'ささくれりょう',
|
||||
icon: 'https://assets.misskey-hub.net/patrons/cf55022cee6c41da8e70a43587aaad9a.jpg',
|
||||
}];
|
||||
|
||||
const patrons = [
|
||||
|
@@ -71,9 +71,9 @@ const pagination = {
|
||||
sort: sort.value,
|
||||
host: host.value !== '' ? host.value : null,
|
||||
...(
|
||||
state.value === 'federating' ? { federating: true } :
|
||||
state.value === 'subscribing' ? { subscribing: true } :
|
||||
state.value === 'publishing' ? { publishing: true } :
|
||||
state.value === 'federating' ? { federating: true, suspended: false, blocked: false } :
|
||||
state.value === 'subscribing' ? { subscribing: true, suspended: false, blocked: false } :
|
||||
state.value === 'publishing' ? { publishing: true, suspended: false, blocked: false } :
|
||||
state.value === 'suspended' ? { suspended: true } :
|
||||
state.value === 'blocked' ? { blocked: true } :
|
||||
state.value === 'silenced' ? { silenced: true } :
|
||||
|
@@ -24,8 +24,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<div class="buttons right">
|
||||
<template v-if="actions">
|
||||
<template v-for="action in actions">
|
||||
<MkButton v-if="action.asFullButton" class="fullButton" primary @click.stop="action.handler"><i :class="action.icon" style="margin-right: 6px;"></i>{{ action.text }}</MkButton>
|
||||
<button v-else v-tooltip.noDelay="action.text" class="_button button" :class="{ highlighted: action.highlighted }" @click.stop="action.handler" @touchstart="preventDrag"><i :class="action.icon"></i></button>
|
||||
<MkButton v-if="action.asFullButton" class="fullButton" primary :disabled="action.disabled" @click.stop="action.handler"><i :class="action.icon" style="margin-right: 6px;"></i>{{ action.text }}</MkButton>
|
||||
<button v-else v-tooltip.noDelay="action.text" class="_button button" :class="{ highlighted: action.highlighted }" :disabled="action.disabled" @click.stop="action.handler" @touchstart="preventDrag"><i :class="action.icon"></i></button>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
@@ -56,6 +56,7 @@ const props = defineProps<{
|
||||
text: string;
|
||||
icon: string;
|
||||
asFullButton?: boolean;
|
||||
disabled?: boolean;
|
||||
handler: (ev: MouseEvent) => void;
|
||||
}[];
|
||||
thin?: boolean;
|
||||
|
@@ -16,8 +16,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<template #header>
|
||||
{{ mode === 'create' ? i18n.ts._abuseReport._notificationRecipient.createRecipient : i18n.ts._abuseReport._notificationRecipient.modifyRecipient }}
|
||||
</template>
|
||||
<div v-if="loading === 0">
|
||||
<MkSpacer :marginMin="20" :marginMax="28">
|
||||
<div v-if="loading === 0" style="display: flex; flex-direction: column; min-height: 100%;">
|
||||
<MkSpacer :marginMin="20" :marginMax="28" style="flex-grow: 1;">
|
||||
<div :class="$style.root" class="_gaps_m">
|
||||
<MkInput v-model="title">
|
||||
<template #label>{{ i18n.ts.title }}</template>
|
||||
@@ -44,7 +44,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
{{ webhook.name }}
|
||||
</option>
|
||||
</MkSelect>
|
||||
<MkButton rounded @click="onEditSystemWebhookClicked">
|
||||
<MkButton rounded :class="$style.systemWebhookEditButton" @click="onEditSystemWebhookClicked">
|
||||
<span v-if="systemWebhookId === null" class="ti ti-plus" style="line-height: normal"/>
|
||||
<span v-else class="ti ti-settings" style="line-height: normal"/>
|
||||
</MkButton>
|
||||
@@ -60,8 +60,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</MkSpacer>
|
||||
|
||||
<div :class="$style.footer" class="_buttonsCenter">
|
||||
<MkButton primary :disabled="disableSubmitButton" @click="onSubmitClicked"><i class="ti ti-check"></i> {{ i18n.ts.ok }}</MkButton>
|
||||
<MkButton @click="onCancelClicked"><i class="ti ti-x"></i> {{ i18n.ts.cancel }}</MkButton>
|
||||
<MkButton primary rounded :disabled="disableSubmitButton" @click="onSubmitClicked"><i class="ti ti-check"></i> {{ i18n.ts.ok }}</MkButton>
|
||||
<MkButton rounded @click="onCancelClicked"><i class="ti ti-x"></i> {{ i18n.ts.cancel }}</MkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
@@ -289,10 +289,15 @@ onMounted(async () => {
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-end;
|
||||
margin-top: 20px;
|
||||
position: sticky;
|
||||
z-index: 10000;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: 12px;
|
||||
border-top: solid 0.5px var(--divider);
|
||||
background: var(--acrylicBg);
|
||||
-webkit-backdrop-filter: var(--blur, blur(15px));
|
||||
backdrop-filter: var(--blur, blur(15px));
|
||||
}
|
||||
|
||||
.systemWebhook {
|
||||
@@ -301,16 +306,16 @@ onMounted(async () => {
|
||||
justify-content: stretch;
|
||||
align-items: flex-end;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
button {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
flex-shrink: 0;
|
||||
box-sizing: border-box;
|
||||
margin: 1px 0;
|
||||
padding: 6px;
|
||||
}
|
||||
.systemWebhookEditButton {
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
flex-shrink: 0;
|
||||
box-sizing: border-box;
|
||||
margin: 1px 0;
|
||||
padding: 6px;
|
||||
}
|
||||
</style>
|
||||
|
@@ -11,70 +11,83 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<MkInfo>{{ i18n.ts._announcement.shouldNotBeUsedToPresentPermanentInfo }}</MkInfo>
|
||||
<MkInfo v-if="announcements.length > 5" warn>{{ i18n.ts._announcement.tooManyActiveAnnouncementDescription }}</MkInfo>
|
||||
|
||||
<MkFolder v-for="announcement in announcements" :key="announcement.id ?? announcement._id" :defaultOpen="announcement.id == null">
|
||||
<template #label>{{ announcement.title }}</template>
|
||||
<template #icon>
|
||||
<i v-if="announcement.icon === 'info'" class="ti ti-info-circle"></i>
|
||||
<i v-else-if="announcement.icon === 'warning'" class="ti ti-alert-triangle" style="color: var(--warn);"></i>
|
||||
<i v-else-if="announcement.icon === 'error'" class="ti ti-circle-x" style="color: var(--error);"></i>
|
||||
<i v-else-if="announcement.icon === 'success'" class="ti ti-check" style="color: var(--success);"></i>
|
||||
</template>
|
||||
<template #caption>{{ announcement.text }}</template>
|
||||
<MkSelect v-model="announcementsStatus">
|
||||
<template #label>{{ i18n.ts.filter }}</template>
|
||||
<option value="active">{{ i18n.ts.active }}</option>
|
||||
<option value="archived">{{ i18n.ts.archived }}</option>
|
||||
</MkSelect>
|
||||
|
||||
<div class="_gaps_m">
|
||||
<MkInput v-model="announcement.title">
|
||||
<template #label>{{ i18n.ts.title }}</template>
|
||||
</MkInput>
|
||||
<MkTextarea v-model="announcement.text" mfmAutocomplete :mfmPreview="true">
|
||||
<template #label>{{ i18n.ts.text }}</template>
|
||||
</MkTextarea>
|
||||
<MkInput v-model="announcement.imageUrl" type="url">
|
||||
<template #label>{{ i18n.ts.imageUrl }}</template>
|
||||
</MkInput>
|
||||
<MkRadios v-model="announcement.icon">
|
||||
<template #label>{{ i18n.ts.icon }}</template>
|
||||
<option value="info"><i class="ti ti-info-circle"></i></option>
|
||||
<option value="warning"><i class="ti ti-alert-triangle" style="color: var(--warn);"></i></option>
|
||||
<option value="error"><i class="ti ti-circle-x" style="color: var(--error);"></i></option>
|
||||
<option value="success"><i class="ti ti-check" style="color: var(--success);"></i></option>
|
||||
</MkRadios>
|
||||
<MkRadios v-model="announcement.display">
|
||||
<template #label>{{ i18n.ts.display }}</template>
|
||||
<option value="normal">{{ i18n.ts.normal }}</option>
|
||||
<option value="banner">{{ i18n.ts.banner }}</option>
|
||||
<option value="dialog">{{ i18n.ts.dialog }}</option>
|
||||
</MkRadios>
|
||||
<MkInfo v-if="announcement.display === 'dialog'" warn>{{ i18n.ts._announcement.dialogAnnouncementUxWarn }}</MkInfo>
|
||||
<MkSwitch v-model="announcement.forExistingUsers" :helpText="i18n.ts._announcement.forExistingUsersDescription">
|
||||
{{ i18n.ts._announcement.forExistingUsers }}
|
||||
</MkSwitch>
|
||||
<MkSwitch v-model="announcement.silence" :helpText="i18n.ts._announcement.silenceDescription">
|
||||
{{ i18n.ts._announcement.silence }}
|
||||
</MkSwitch>
|
||||
<MkSwitch v-model="announcement.needConfirmationToRead" :helpText="i18n.ts._announcement.needConfirmationToReadDescription">
|
||||
{{ i18n.ts._announcement.needConfirmationToRead }}
|
||||
</MkSwitch>
|
||||
<p v-if="announcement.reads">{{ i18n.tsx.nUsersRead({ n: announcement.reads }) }}</p>
|
||||
<div class="buttons _buttons">
|
||||
<MkButton class="button" inline primary @click="save(announcement)"><i class="ti ti-device-floppy"></i> {{ i18n.ts.save }}</MkButton>
|
||||
<MkButton v-if="announcement.id != null" class="button" inline @click="archive(announcement)"><i class="ti ti-check"></i> {{ i18n.ts._announcement.end }} ({{ i18n.ts.archive }})</MkButton>
|
||||
<MkButton v-if="announcement.id != null" class="button" inline danger @click="del(announcement)"><i class="ti ti-trash"></i> {{ i18n.ts.delete }}</MkButton>
|
||||
<MkLoading v-if="loading"/>
|
||||
|
||||
<template v-else>
|
||||
<MkFolder v-for="announcement in announcements" :key="announcement.id ?? announcement._id" :defaultOpen="announcement.id == null">
|
||||
<template #label>{{ announcement.title }}</template>
|
||||
<template #icon>
|
||||
<i v-if="announcement.icon === 'info'" class="ti ti-info-circle"></i>
|
||||
<i v-else-if="announcement.icon === 'warning'" class="ti ti-alert-triangle" style="color: var(--warn);"></i>
|
||||
<i v-else-if="announcement.icon === 'error'" class="ti ti-circle-x" style="color: var(--error);"></i>
|
||||
<i v-else-if="announcement.icon === 'success'" class="ti ti-check" style="color: var(--success);"></i>
|
||||
</template>
|
||||
<template #caption>{{ announcement.text }}</template>
|
||||
|
||||
<div class="_gaps_m">
|
||||
<MkInput v-model="announcement.title">
|
||||
<template #label>{{ i18n.ts.title }}</template>
|
||||
</MkInput>
|
||||
<MkTextarea v-model="announcement.text" mfmAutocomplete :mfmPreview="true">
|
||||
<template #label>{{ i18n.ts.text }}</template>
|
||||
</MkTextarea>
|
||||
<MkInput v-model="announcement.imageUrl" type="url">
|
||||
<template #label>{{ i18n.ts.imageUrl }}</template>
|
||||
</MkInput>
|
||||
<MkRadios v-model="announcement.icon">
|
||||
<template #label>{{ i18n.ts.icon }}</template>
|
||||
<option value="info"><i class="ti ti-info-circle"></i></option>
|
||||
<option value="warning"><i class="ti ti-alert-triangle" style="color: var(--warn);"></i></option>
|
||||
<option value="error"><i class="ti ti-circle-x" style="color: var(--error);"></i></option>
|
||||
<option value="success"><i class="ti ti-check" style="color: var(--success);"></i></option>
|
||||
</MkRadios>
|
||||
<MkRadios v-model="announcement.display">
|
||||
<template #label>{{ i18n.ts.display }}</template>
|
||||
<option value="normal">{{ i18n.ts.normal }}</option>
|
||||
<option value="banner">{{ i18n.ts.banner }}</option>
|
||||
<option value="dialog">{{ i18n.ts.dialog }}</option>
|
||||
</MkRadios>
|
||||
<MkInfo v-if="announcement.display === 'dialog'" warn>{{ i18n.ts._announcement.dialogAnnouncementUxWarn }}</MkInfo>
|
||||
<MkSwitch v-model="announcement.forExistingUsers" :helpText="i18n.ts._announcement.forExistingUsersDescription">
|
||||
{{ i18n.ts._announcement.forExistingUsers }}
|
||||
</MkSwitch>
|
||||
<MkSwitch v-model="announcement.silence" :helpText="i18n.ts._announcement.silenceDescription">
|
||||
{{ i18n.ts._announcement.silence }}
|
||||
</MkSwitch>
|
||||
<MkSwitch v-model="announcement.needConfirmationToRead" :helpText="i18n.ts._announcement.needConfirmationToReadDescription">
|
||||
{{ i18n.ts._announcement.needConfirmationToRead }}
|
||||
</MkSwitch>
|
||||
<p v-if="announcement.reads">{{ i18n.tsx.nUsersRead({ n: announcement.reads }) }}</p>
|
||||
<div class="buttons _buttons">
|
||||
<MkButton class="button" inline primary @click="save(announcement)"><i class="ti ti-device-floppy"></i> {{ i18n.ts.save }}</MkButton>
|
||||
<MkButton v-if="announcement.id != null && announcement.isActive" class="button" inline @click="archive(announcement)"><i class="ti ti-check"></i> {{ i18n.ts._announcement.end }} ({{ i18n.ts.archive }})</MkButton>
|
||||
<MkButton v-if="announcement.id != null && !announcement.isActive" class="button" inline @click="unarchive(announcement)"><i class="ti ti-restore"></i> {{ i18n.ts.unarchive }}</MkButton>
|
||||
<MkButton v-if="announcement.id != null" class="button" inline danger @click="del(announcement)"><i class="ti ti-trash"></i> {{ i18n.ts.delete }}</MkButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</MkFolder>
|
||||
<MkButton class="button" @click="more()">
|
||||
<i class="ti ti-reload"></i>{{ i18n.ts.more }}
|
||||
</MkButton>
|
||||
</MkFolder>
|
||||
<MkLoading v-if="loadingMore"/>
|
||||
<MkButton class="button" @click="more()">
|
||||
<i class="ti ti-reload"></i>{{ i18n.ts.more }}
|
||||
</MkButton>
|
||||
</template>
|
||||
</div>
|
||||
</MkSpacer>
|
||||
</MkStickyContainer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { ref, computed, watch } from 'vue';
|
||||
import XHeader from './_header_.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkInput from '@/components/MkInput.vue';
|
||||
import MkSelect from '@/components/MkSelect.vue';
|
||||
import MkSwitch from '@/components/MkSwitch.vue';
|
||||
import MkRadios from '@/components/MkRadios.vue';
|
||||
import MkInfo from '@/components/MkInfo.vue';
|
||||
@@ -85,11 +98,22 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import MkFolder from '@/components/MkFolder.vue';
|
||||
import MkTextarea from '@/components/MkTextarea.vue';
|
||||
|
||||
const announcementsStatus = ref<'active' | 'archived'>('active');
|
||||
|
||||
const loading = ref(true);
|
||||
const loadingMore = ref(false);
|
||||
|
||||
const announcements = ref<any[]>([]);
|
||||
|
||||
misskeyApi('admin/announcements/list').then(announcementResponse => {
|
||||
announcements.value = announcementResponse;
|
||||
});
|
||||
watch(announcementsStatus, (to) => {
|
||||
loading.value = true;
|
||||
misskeyApi('admin/announcements/list', {
|
||||
status: to,
|
||||
}).then(announcementResponse => {
|
||||
announcements.value = announcementResponse;
|
||||
loading.value = false;
|
||||
});
|
||||
}, { immediate: true });
|
||||
|
||||
function add() {
|
||||
announcements.value.unshift({
|
||||
@@ -125,6 +149,14 @@ async function archive(announcement) {
|
||||
refresh();
|
||||
}
|
||||
|
||||
async function unarchive(announcement) {
|
||||
await os.apiWithDialog('admin/announcements/update', {
|
||||
...announcement,
|
||||
isActive: true,
|
||||
});
|
||||
refresh();
|
||||
}
|
||||
|
||||
async function save(announcement) {
|
||||
if (announcement.id == null) {
|
||||
await os.apiWithDialog('admin/announcements/create', announcement);
|
||||
@@ -135,24 +167,32 @@ async function save(announcement) {
|
||||
}
|
||||
|
||||
function more() {
|
||||
misskeyApi('admin/announcements/list', { untilId: announcements.value.reduce((acc, announcement) => announcement.id != null ? announcement : acc).id }).then(announcementResponse => {
|
||||
loadingMore.value = true;
|
||||
misskeyApi('admin/announcements/list', {
|
||||
status: announcementsStatus.value,
|
||||
untilId: announcements.value.reduce((acc, announcement) => announcement.id != null ? announcement : acc).id
|
||||
}).then(announcementResponse => {
|
||||
announcements.value = announcements.value.concat(announcementResponse);
|
||||
loadingMore.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function refresh() {
|
||||
misskeyApi('admin/announcements/list').then(announcementResponse => {
|
||||
loading.value = true;
|
||||
misskeyApi('admin/announcements/list', {
|
||||
status: announcementsStatus.value,
|
||||
}).then(announcementResponse => {
|
||||
announcements.value = announcementResponse;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
refresh();
|
||||
|
||||
const headerActions = computed(() => [{
|
||||
asFullButton: true,
|
||||
icon: 'ti ti-plus',
|
||||
text: i18n.ts.add,
|
||||
handler: add,
|
||||
disabled: announcementsStatus.value === 'archived',
|
||||
}]);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
@@ -80,9 +80,9 @@ const pagination = {
|
||||
sort: sort.value,
|
||||
host: host.value !== '' ? host.value : null,
|
||||
...(
|
||||
state.value === 'federating' ? { federating: true } :
|
||||
state.value === 'subscribing' ? { subscribing: true } :
|
||||
state.value === 'publishing' ? { publishing: true } :
|
||||
state.value === 'federating' ? { federating: true, suspended: false, blocked: false } :
|
||||
state.value === 'subscribing' ? { subscribing: true, suspended: false, blocked: false } :
|
||||
state.value === 'publishing' ? { publishing: true, suspended: false, blocked: false } :
|
||||
state.value === 'suspended' ? { suspended: true } :
|
||||
state.value === 'blocked' ? { blocked: true } :
|
||||
state.value === 'silenced' ? { silenced: true } :
|
||||
|
@@ -8,14 +8,22 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<template #header><XHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template>
|
||||
<MkSpacer :contentMax="700" :marginMin="16" :marginMax="32">
|
||||
<FormSuspense :p="init">
|
||||
<MkTextarea v-if="tab === 'block'" v-model="blockedHosts">
|
||||
<span>{{ i18n.ts.blockedInstances }}</span>
|
||||
<template #caption>{{ i18n.ts.blockedInstancesDescription }}</template>
|
||||
</MkTextarea>
|
||||
<MkTextarea v-else-if="tab === 'silence'" v-model="silencedHosts" class="_formBlock">
|
||||
<span>{{ i18n.ts.silencedInstances }}</span>
|
||||
<template #caption>{{ i18n.ts.silencedInstancesDescription }}</template>
|
||||
</MkTextarea>
|
||||
<template v-if="tab === 'block'">
|
||||
<MkTextarea v-model="blockedHosts">
|
||||
<span>{{ i18n.ts.blockedInstances }}</span>
|
||||
<template #caption>{{ i18n.ts.blockedInstancesDescription }}</template>
|
||||
</MkTextarea>
|
||||
</template>
|
||||
<template v-else-if="tab === 'silence'">
|
||||
<MkTextarea v-model="silencedHosts" class="_formBlock">
|
||||
<span>{{ i18n.ts.silencedInstances }}</span>
|
||||
<template #caption>{{ i18n.ts.silencedInstancesDescription }}</template>
|
||||
</MkTextarea>
|
||||
<MkTextarea v-model="mediaSilencedHosts" class="_formBlock">
|
||||
<span>{{ i18n.ts.mediaSilencedInstances }}</span>
|
||||
<template #caption>{{ i18n.ts.mediaSilencedInstancesDescription }}</template>
|
||||
</MkTextarea>
|
||||
</template>
|
||||
<MkButton primary @click="save"><i class="ti ti-device-floppy"></i> {{ i18n.ts.save }}</MkButton>
|
||||
</FormSuspense>
|
||||
</MkSpacer>
|
||||
@@ -36,18 +44,21 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
|
||||
const blockedHosts = ref<string>('');
|
||||
const silencedHosts = ref<string>('');
|
||||
const mediaSilencedHosts = ref<string>('');
|
||||
const tab = ref('block');
|
||||
|
||||
async function init() {
|
||||
const meta = await misskeyApi('admin/meta');
|
||||
blockedHosts.value = meta.blockedHosts.join('\n');
|
||||
silencedHosts.value = meta.silencedHosts.join('\n');
|
||||
mediaSilencedHosts.value = meta.mediaSilencedHosts.join('\n');
|
||||
}
|
||||
|
||||
function save() {
|
||||
os.apiWithDialog('admin/update-meta', {
|
||||
blockedHosts: blockedHosts.value.split('\n') || [],
|
||||
silencedHosts: silencedHosts.value.split('\n') || [],
|
||||
mediaSilencedHosts: mediaSilencedHosts.value.split('\n') || [],
|
||||
|
||||
}).then(() => {
|
||||
fetchInstance(true);
|
||||
|
@@ -37,11 +37,17 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="_button" :class="$style.fileAltEditBtn" @click="describe()">
|
||||
<div class="_gaps_s">
|
||||
<button class="_button" :class="$style.kvEditBtn" @click="move()">
|
||||
<MkKeyValue>
|
||||
<template #key>{{ i18n.ts.folder }}</template>
|
||||
<template #value>{{ folderHierarchy.join(' > ') }}<i class="ti ti-pencil" :class="$style.kvEditIcon"></i></template>
|
||||
</MkKeyValue>
|
||||
</button>
|
||||
<button class="_button" :class="$style.kvEditBtn" @click="describe()">
|
||||
<MkKeyValue>
|
||||
<template #key>{{ i18n.ts.description }}</template>
|
||||
<template #value>{{ file.comment ? file.comment : `(${i18n.ts.none})` }}<i class="ti ti-pencil" :class="$style.fileAltEditIcon"></i></template>
|
||||
<template #value>{{ file.comment ? file.comment : `(${i18n.ts.none})` }}<i class="ti ti-pencil" :class="$style.kvEditIcon"></i></template>
|
||||
</MkKeyValue>
|
||||
</button>
|
||||
<MkKeyValue :class="$style.fileMetaDataChildren">
|
||||
@@ -90,6 +96,18 @@ const props = defineProps<{
|
||||
|
||||
const fetching = ref(true);
|
||||
const file = ref<Misskey.entities.DriveFile>();
|
||||
const folderHierarchy = computed(() => {
|
||||
if (!file.value) return [i18n.ts.drive];
|
||||
const folderNames = [i18n.ts.drive];
|
||||
|
||||
function get(folder: Misskey.entities.DriveFolder) {
|
||||
if (folder.parent) get(folder.parent);
|
||||
folderNames.push(folder.name);
|
||||
}
|
||||
|
||||
if (file.value.folder) get(file.value.folder);
|
||||
return folderNames;
|
||||
});
|
||||
const isImage = computed(() => file.value?.type.startsWith('image/'));
|
||||
|
||||
async function fetch() {
|
||||
@@ -122,6 +140,19 @@ function crop() {
|
||||
});
|
||||
}
|
||||
|
||||
function move() {
|
||||
if (!file.value) return;
|
||||
|
||||
os.selectDriveFolder(false).then(folder => {
|
||||
misskeyApi('drive/files/update', {
|
||||
fileId: file.value.id,
|
||||
folderId: folder[0] ? folder[0].id : null,
|
||||
}).then(async () => {
|
||||
await fetch();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function toggleSensitive() {
|
||||
if (!file.value) return;
|
||||
|
||||
@@ -282,14 +313,14 @@ onMounted(async () => {
|
||||
padding: .5rem 1rem;
|
||||
}
|
||||
|
||||
.fileAltEditBtn {
|
||||
.kvEditBtn {
|
||||
text-align: start;
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: .5rem 1rem;
|
||||
border-radius: var(--radius);
|
||||
|
||||
.fileAltEditIcon {
|
||||
.kvEditIcon {
|
||||
display: inline-block;
|
||||
color: transparent;
|
||||
visibility: hidden;
|
||||
@@ -300,7 +331,7 @@ onMounted(async () => {
|
||||
color: var(--accent);
|
||||
background-color: var(--accentedBg);
|
||||
|
||||
.fileAltEditIcon {
|
||||
.kvEditIcon {
|
||||
color: var(--accent);
|
||||
visibility: visible;
|
||||
}
|
||||
|
@@ -15,8 +15,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<template v-if="emoji" #header>:{{ emoji.name }}:</template>
|
||||
<template v-else #header>New emoji</template>
|
||||
|
||||
<div>
|
||||
<MkSpacer :marginMin="20" :marginMax="28">
|
||||
<div style="display: flex; flex-direction: column; min-height: 100%;">
|
||||
<MkSpacer :marginMin="20" :marginMax="28" style="flex-grow: 1;">
|
||||
<div class="_gaps_m">
|
||||
<div v-if="imgUrl != null" :class="$style.imgs">
|
||||
<div style="background: #000;" :class="$style.imgContainer">
|
||||
@@ -239,10 +239,12 @@ async function del() {
|
||||
|
||||
.footer {
|
||||
position: sticky;
|
||||
z-index: 10000;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: 12px;
|
||||
border-top: solid 0.5px var(--divider);
|
||||
background: var(--acrylicBg);
|
||||
-webkit-backdrop-filter: var(--blur, blur(15px));
|
||||
backdrop-filter: var(--blur, blur(15px));
|
||||
}
|
||||
|
@@ -47,6 +47,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<MkButton v-if="suspensionState !== 'none'" :disabled="!instance" @click="resumeDelivery">{{ i18n.ts._delivery.resume }}</MkButton>
|
||||
<MkSwitch v-model="isBlocked" :disabled="!meta || !instance" @update:modelValue="toggleBlock">{{ i18n.ts.blockThisInstance }}</MkSwitch>
|
||||
<MkSwitch v-model="isSilenced" :disabled="!meta || !instance" @update:modelValue="toggleSilenced">{{ i18n.ts.silenceThisInstance }}</MkSwitch>
|
||||
<MkSwitch v-model="isMediaSilenced" :disabled="!meta || !instance" @update:modelValue="toggleMediaSilenced">{{ i18n.ts.mediaSilenceThisInstance }}</MkSwitch>
|
||||
<MkButton @click="refreshMetadata"><i class="ti ti-refresh"></i> Refresh metadata</MkButton>
|
||||
<MkTextarea v-model="moderationNote" manualSave>
|
||||
<template #label>{{ i18n.ts.moderationNote }}</template>
|
||||
@@ -167,6 +168,7 @@ const instance = ref<Misskey.entities.FederationInstance | null>(null);
|
||||
const suspensionState = ref<'none' | 'manuallySuspended' | 'goneSuspended' | 'autoSuspendedForNotResponding'>('none');
|
||||
const isBlocked = ref(false);
|
||||
const isSilenced = ref(false);
|
||||
const isMediaSilenced = ref(false);
|
||||
const faviconUrl = ref<string | null>(null);
|
||||
const moderationNote = ref('');
|
||||
|
||||
@@ -195,8 +197,9 @@ async function fetch(): Promise<void> {
|
||||
suspensionState.value = instance.value?.suspensionState ?? 'none';
|
||||
isBlocked.value = instance.value?.isBlocked ?? false;
|
||||
isSilenced.value = instance.value?.isSilenced ?? false;
|
||||
isMediaSilenced.value = instance.value?.isMediaSilenced ?? false;
|
||||
faviconUrl.value = getProxiedImageUrlNullable(instance.value?.faviconUrl, 'preview') ?? getProxiedImageUrlNullable(instance.value?.iconUrl, 'preview');
|
||||
moderationNote.value = instance.value?.moderationNote;
|
||||
moderationNote.value = instance.value?.moderationNote ?? '';
|
||||
}
|
||||
|
||||
async function toggleBlock(): Promise<void> {
|
||||
@@ -218,6 +221,16 @@ async function toggleSilenced(): Promise<void> {
|
||||
});
|
||||
}
|
||||
|
||||
async function toggleMediaSilenced(): Promise<void> {
|
||||
if (!meta.value) throw new Error('No meta?');
|
||||
if (!instance.value) throw new Error('No instance?');
|
||||
const { host } = instance.value;
|
||||
const mediaSilencedHosts = meta.value.mediaSilencedHosts ?? [];
|
||||
await misskeyApi('admin/update-meta', {
|
||||
mediaSilencedHosts: isMediaSilenced.value ? mediaSilencedHosts.concat([host]) : mediaSilencedHosts.filter(x => x !== host),
|
||||
});
|
||||
}
|
||||
|
||||
async function stopDelivery(): Promise<void> {
|
||||
if (!instance.value) throw new Error('No instance?');
|
||||
suspensionState.value = 'manuallySuspended';
|
||||
|
@@ -4,43 +4,33 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<XAntenna :antenna="draft" @created="onAntennaCreated"/>
|
||||
</div>
|
||||
<MkStickyContainer>
|
||||
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
|
||||
|
||||
<MkAntennaEditor @created="onAntennaCreated"/>
|
||||
</MkStickyContainer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import XAntenna from './editor.vue';
|
||||
import { computed } from 'vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { antennasCache } from '@/cache.js';
|
||||
import { useRouter } from '@/router/supplier.js';
|
||||
import MkAntennaEditor from '@/components/MkAntennaEditor.vue';
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const draft = ref({
|
||||
name: '',
|
||||
src: 'all',
|
||||
userListId: null,
|
||||
users: [],
|
||||
keywords: [],
|
||||
excludeKeywords: [],
|
||||
excludeBots: false,
|
||||
withReplies: false,
|
||||
caseSensitive: false,
|
||||
localOnly: false,
|
||||
withFile: false,
|
||||
notify: false,
|
||||
});
|
||||
|
||||
function onAntennaCreated() {
|
||||
antennasCache.delete();
|
||||
router.push('/my/antennas');
|
||||
}
|
||||
|
||||
const headerActions = computed(() => []);
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.manageAntennas,
|
||||
title: i18n.ts.createAntenna,
|
||||
icon: 'ti ti-antenna',
|
||||
}));
|
||||
</script>
|
||||
|
@@ -4,15 +4,17 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="">
|
||||
<XAntenna v-if="antenna" :antenna="antenna" @updated="onAntennaUpdated"/>
|
||||
</div>
|
||||
<MkStickyContainer>
|
||||
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
|
||||
|
||||
<MkAntennaEditor v-if="antenna" :antenna="antenna" @updated="onAntennaUpdated"/>
|
||||
</MkStickyContainer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { ref, computed } from 'vue';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import XAntenna from './editor.vue';
|
||||
import MkAntennaEditor from '@/components/MkAntennaEditor.vue';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
@@ -36,8 +38,11 @@ misskeyApi('antennas/show', { antennaId: props.antennaId }).then((antennaRespons
|
||||
antenna.value = antennaResponse;
|
||||
});
|
||||
|
||||
const headerActions = computed(() => []);
|
||||
const headerTabs = computed(() => []);
|
||||
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.manageAntennas,
|
||||
title: i18n.ts.editAntenna,
|
||||
icon: 'ti ti-antenna',
|
||||
}));
|
||||
</script>
|
||||
|
@@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<MkButton primary rounded class="add" @click="create"><i class="ti ti-plus"></i> {{ i18n.ts.add }}</MkButton>
|
||||
|
||||
<MkPagination v-slot="{ items }" ref="pagingComponent" :pagination="pagination" class="_gaps">
|
||||
<MkClipPreview v-for="item in items" :key="item.id" :clip="item"/>
|
||||
<MkClipPreview v-for="item in items" :key="item.id" :clip="item" :noUserInfo="true"/>
|
||||
</MkPagination>
|
||||
</div>
|
||||
<div v-else-if="tab === 'favorites'" key="favorites" class="_gaps">
|
||||
|
@@ -133,22 +133,25 @@ async function removeUser(item, ev) {
|
||||
}
|
||||
|
||||
async function showMembershipMenu(item, ev) {
|
||||
const withRepliesRef = ref(item.withReplies);
|
||||
os.popupMenu([{
|
||||
text: item.withReplies ? i18n.ts.hideRepliesToOthersInTimeline : i18n.ts.showRepliesToOthersInTimeline,
|
||||
icon: item.withReplies ? 'ti ti-messages-off' : 'ti ti-messages',
|
||||
action: async () => {
|
||||
misskeyApi('users/lists/update-membership', {
|
||||
listId: list.value.id,
|
||||
userId: item.userId,
|
||||
withReplies: !item.withReplies,
|
||||
}).then(() => {
|
||||
paginationEl.value.updateItem(item.id, (old) => ({
|
||||
...old,
|
||||
withReplies: !item.withReplies,
|
||||
}));
|
||||
});
|
||||
},
|
||||
type: 'switch',
|
||||
text: i18n.ts.showRepliesToOthersInTimeline,
|
||||
icon: 'ti ti-messages',
|
||||
ref: withRepliesRef,
|
||||
}], ev.currentTarget ?? ev.target);
|
||||
watch(withRepliesRef, withReplies => {
|
||||
misskeyApi('users/lists/update-membership', {
|
||||
listId: list.value!.id,
|
||||
userId: item.userId,
|
||||
withReplies,
|
||||
}).then(() => {
|
||||
paginationEl.value!.updateItem(item.id, (old) => ({
|
||||
...old,
|
||||
withReplies,
|
||||
}));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async function deleteList() {
|
||||
|
@@ -6,29 +6,38 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<template>
|
||||
<div class="_gaps">
|
||||
<div class="_gaps">
|
||||
<MkInput v-model="searchQuery" :large="true" :autofocus="true" type="search" @enter="search">
|
||||
<MkInput v-model="searchQuery" :large="true" :autofocus="true" type="search" @enter.prevent="search">
|
||||
<template #prefix><i class="ti ti-search"></i></template>
|
||||
</MkInput>
|
||||
<MkFolder>
|
||||
<template #label>{{ i18n.ts.options }}</template>
|
||||
<MkFoldableSection :expanded="true">
|
||||
<template #header>{{ i18n.ts.options }}</template>
|
||||
|
||||
<div class="_gaps_m">
|
||||
<MkSwitch v-model="isLocalOnly">{{ i18n.ts.localOnly }}</MkSwitch>
|
||||
<MkRadios v-model="hostSelect">
|
||||
<template #label>{{ i18n.ts.host }}</template>
|
||||
<option value="all" default>{{ i18n.ts.all }}</option>
|
||||
<option value="local">{{ i18n.ts.local }}</option>
|
||||
<option v-if="noteSearchableScope === 'global'" value="specified">{{ i18n.ts.specifyHost }}</option>
|
||||
</MkRadios>
|
||||
<MkInput v-if="noteSearchableScope === 'global'" v-model="hostInput" :disabled="hostSelect !== 'specified'" :large="true" type="search">
|
||||
<template #prefix><i class="ti ti-server"></i></template>
|
||||
</MkInput>
|
||||
|
||||
<MkFolder :defaultOpen="true">
|
||||
<template #label>{{ i18n.ts.specifyUser }}</template>
|
||||
<template v-if="user" #suffix>@{{ user.username }}</template>
|
||||
<template v-if="user" #suffix>@{{ user.username }}{{ user.host ? `@${user.host}` : "" }}</template>
|
||||
|
||||
<div style="text-align: center;" class="_gaps">
|
||||
<div v-if="user">@{{ user.username }}</div>
|
||||
<div>
|
||||
<MkButton v-if="user == null" primary rounded inline @click="selectUser">{{ i18n.ts.selectUser }}</MkButton>
|
||||
<MkButton v-else danger rounded inline @click="user = null">{{ i18n.ts.remove }}</MkButton>
|
||||
<div class="_gaps">
|
||||
<div :class="$style.userItem">
|
||||
<MkUserCardMini v-if="user" :class="$style.userCard" :user="user" :withChart="false"/>
|
||||
<MkButton v-if="user == null && $i != null" transparent :class="$style.addMeButton" @click="selectSelf"><div :class="$style.addUserButtonInner"><span><i class="ti ti-plus"></i><i class="ti ti-user"></i></span><span>{{ i18n.ts.selectSelf }}</span></div></MkButton>
|
||||
<MkButton v-if="user == null" transparent :class="$style.addUserButton" @click="selectUser"><div :class="$style.addUserButtonInner"><i class="ti ti-plus"></i><span>{{ i18n.ts.selectUser }}</span></div></MkButton>
|
||||
<button class="_button" :class="$style.remove" :disabled="user == null" @click="removeUser"><i class="ti ti-x"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</MkFolder>
|
||||
</div>
|
||||
</MkFolder>
|
||||
</MkFoldableSection>
|
||||
<div>
|
||||
<MkButton large primary gradate rounded style="margin: 0 auto;" @click="search">{{ i18n.ts.search }}</MkButton>
|
||||
</div>
|
||||
@@ -42,31 +51,90 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { computed, ref, toRef, watch } from 'vue';
|
||||
import type { UserDetailed } from 'misskey-js/entities.js';
|
||||
import type { Paging } from '@/components/MkPagination.vue';
|
||||
import MkNotes from '@/components/MkNotes.vue';
|
||||
import MkInput from '@/components/MkInput.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import MkSwitch from '@/components/MkSwitch.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
||||
import MkFolder from '@/components/MkFolder.vue';
|
||||
import { useRouter } from '@/router/supplier.js';
|
||||
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
||||
import MkRadios from '@/components/MkRadios.vue';
|
||||
import { $i } from '@/account.js';
|
||||
import { instance } from '@/instance.js';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
query?: string;
|
||||
userId?: string;
|
||||
username?: string;
|
||||
host?: string | null;
|
||||
}>(), {
|
||||
query: '',
|
||||
userId: undefined,
|
||||
username: undefined,
|
||||
host: '',
|
||||
});
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const key = ref(0);
|
||||
const searchQuery = ref('');
|
||||
const searchOrigin = ref('combined');
|
||||
const notePagination = ref();
|
||||
const user = ref<any>(null);
|
||||
const isLocalOnly = ref(false);
|
||||
const searchQuery = ref(toRef(props, 'query').value);
|
||||
const notePagination = ref<Paging>();
|
||||
const user = ref<UserDetailed | null>(null);
|
||||
const hostInput = ref(toRef(props, 'host').value);
|
||||
|
||||
function selectUser() {
|
||||
os.selectUser({ includeSelf: true }).then(_user => {
|
||||
const noteSearchableScope = instance.noteSearchableScope ?? 'local';
|
||||
|
||||
const hostSelect = ref<'all' | 'local' | 'specified'>('all');
|
||||
|
||||
const setHostSelectWithInput = (after:string|undefined|null, before:string|undefined|null) => {
|
||||
if (before === after) return;
|
||||
if (after === '') hostSelect.value = 'all';
|
||||
else hostSelect.value = 'specified';
|
||||
};
|
||||
|
||||
setHostSelectWithInput(hostInput.value, undefined);
|
||||
|
||||
watch(hostInput, setHostSelectWithInput);
|
||||
|
||||
const searchHost = computed(() => {
|
||||
if (hostSelect.value === 'local') return '.';
|
||||
if (hostSelect.value === 'specified') return hostInput.value;
|
||||
return null;
|
||||
});
|
||||
|
||||
if (props.userId != null) {
|
||||
misskeyApi('users/show', { userId: props.userId }).then(_user => {
|
||||
user.value = _user;
|
||||
});
|
||||
} else if (props.username != null) {
|
||||
misskeyApi('users/show', {
|
||||
username: props.username,
|
||||
...(props.host != null && props.host !== '') ? { host: props.host } : {},
|
||||
}).then(_user => {
|
||||
user.value = _user;
|
||||
});
|
||||
}
|
||||
|
||||
function selectUser() {
|
||||
os.selectUser({ includeSelf: true, localOnly: instance.noteSearchableScope === 'local' }).then(_user => {
|
||||
user.value = _user;
|
||||
hostInput.value = _user.host ?? '';
|
||||
});
|
||||
}
|
||||
|
||||
function selectSelf() {
|
||||
user.value = $i as UserDetailed | null;
|
||||
hostInput.value = null;
|
||||
}
|
||||
|
||||
function removeUser() {
|
||||
user.value = null;
|
||||
hostInput.value = '';
|
||||
}
|
||||
|
||||
async function search() {
|
||||
@@ -74,22 +142,54 @@ async function search() {
|
||||
|
||||
if (query == null || query === '') return;
|
||||
|
||||
if (query.startsWith('https://')) {
|
||||
const promise = misskeyApi('ap/show', {
|
||||
uri: query,
|
||||
//#region AP lookup
|
||||
if (query.startsWith('https://') && !query.includes(' ')) {
|
||||
const confirm = await os.confirm({
|
||||
type: 'info',
|
||||
text: i18n.ts.lookupConfirm,
|
||||
});
|
||||
if (!confirm.canceled) {
|
||||
const promise = misskeyApi('ap/show', {
|
||||
uri: query,
|
||||
});
|
||||
|
||||
os.promiseDialog(promise, null, null, i18n.ts.fetchingAsApObject);
|
||||
os.promiseDialog(promise, null, null, i18n.ts.fetchingAsApObject);
|
||||
|
||||
const res = await promise;
|
||||
const res = await promise;
|
||||
|
||||
if (res.type === 'User') {
|
||||
router.push(`/@${res.object.username}@${res.object.host}`);
|
||||
} else if (res.type === 'Note') {
|
||||
router.push(`/notes/${res.object.id}`);
|
||||
if (res.type === 'User') {
|
||||
router.push(`/@${res.object.username}@${res.object.host}`);
|
||||
} else if (res.type === 'Note') {
|
||||
router.push(`/notes/${res.object.id}`);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
//#endregion
|
||||
|
||||
if (query.length > 1 && !query.includes(' ')) {
|
||||
if (query.startsWith('@')) {
|
||||
const confirm = await os.confirm({
|
||||
type: 'info',
|
||||
text: i18n.ts.lookupConfirm,
|
||||
});
|
||||
if (!confirm.canceled) {
|
||||
router.push(`/${query}`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
if (query.startsWith('#')) {
|
||||
const confirm = await os.confirm({
|
||||
type: 'info',
|
||||
text: i18n.ts.openTagPageConfirm,
|
||||
});
|
||||
if (!confirm.canceled) {
|
||||
router.push(`/tags/${encodeURIComponent(query.substring(1))}`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
notePagination.value = {
|
||||
@@ -98,11 +198,49 @@ async function search() {
|
||||
params: {
|
||||
query: searchQuery.value,
|
||||
userId: user.value ? user.value.id : null,
|
||||
...(searchHost.value ? { host: searchHost.value } : {}),
|
||||
},
|
||||
};
|
||||
|
||||
if (isLocalOnly.value) notePagination.value.params.host = '.';
|
||||
|
||||
key.value++;
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" module>
|
||||
.userItem {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.addMeButton {
|
||||
border: 2px dashed var(--fgTransparent);
|
||||
padding: 12px;
|
||||
margin-right: 16px;
|
||||
}
|
||||
.addUserButton {
|
||||
border: 2px dashed var(--fgTransparent);
|
||||
padding: 12px;
|
||||
flex-grow: 1;
|
||||
}
|
||||
.addUserButtonInner {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
min-height: 38px;
|
||||
}
|
||||
.userCard {
|
||||
flex-grow: 1;
|
||||
}
|
||||
.remove {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
align-self: center;
|
||||
|
||||
& > i:before {
|
||||
color: #ff2a2a;
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
88
packages/frontend/src/pages/search.stories.impl.ts
Normal file
88
packages/frontend/src/pages/search.stories.impl.ts
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { StoryObj } from '@storybook/vue3';
|
||||
import { HttpResponse, http } from 'msw';
|
||||
import search_ from './search.vue';
|
||||
import { userDetailed } from '@/../.storybook/fakes.js';
|
||||
import { commonHandlers } from '@/../.storybook/mocks.js';
|
||||
|
||||
const localUser = userDetailed('someuserid', 'miskist', null, 'Local Misskey User');
|
||||
|
||||
export const Default = {
|
||||
render(args) {
|
||||
return {
|
||||
components: {
|
||||
search_,
|
||||
},
|
||||
setup() {
|
||||
return {
|
||||
args,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
props() {
|
||||
return {
|
||||
...this.args,
|
||||
};
|
||||
},
|
||||
},
|
||||
template: '<search_ v-bind="props" />',
|
||||
};
|
||||
},
|
||||
args: {
|
||||
ignoreNotesSearchAvailable: true,
|
||||
},
|
||||
parameters: {
|
||||
layout: 'fullscreen',
|
||||
msw: {
|
||||
handlers: [
|
||||
...commonHandlers,
|
||||
http.post('/api/users/show', () => {
|
||||
return HttpResponse.json(userDetailed());
|
||||
}),
|
||||
http.post('/api/users/search', () => {
|
||||
return HttpResponse.json([userDetailed(), localUser]);
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
} satisfies StoryObj<typeof search_>;
|
||||
|
||||
export const NoteSearchDisabled = {
|
||||
...Default,
|
||||
args: {},
|
||||
} satisfies StoryObj<typeof search_>;
|
||||
|
||||
export const WithUsernameLocal = {
|
||||
...Default,
|
||||
|
||||
args: {
|
||||
...Default.args,
|
||||
username: localUser.username,
|
||||
host: localUser.host,
|
||||
},
|
||||
parameters: {
|
||||
layout: 'fullscreen',
|
||||
msw: {
|
||||
handlers: [
|
||||
...commonHandlers,
|
||||
http.post('/api/users/show', () => {
|
||||
return HttpResponse.json(localUser);
|
||||
}),
|
||||
http.post('/api/users/search', () => {
|
||||
return HttpResponse.json([userDetailed(), localUser]);
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
} satisfies StoryObj<typeof search_>;
|
||||
|
||||
export const WithUserType = {
|
||||
...Default,
|
||||
args: {
|
||||
type: 'user',
|
||||
},
|
||||
} satisfies StoryObj<typeof search_>;
|
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<template>
|
||||
<div class="_gaps">
|
||||
<div class="_gaps">
|
||||
<MkInput v-model="searchQuery" :large="true" :autofocus="true" type="search" @enter="search">
|
||||
<MkInput v-model="searchQuery" :large="true" :autofocus="true" type="search" @enter.prevent="search">
|
||||
<template #prefix><i class="ti ti-search"></i></template>
|
||||
</MkInput>
|
||||
<MkRadios v-model="searchOrigin" @update:modelValue="search()">
|
||||
@@ -25,7 +25,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { ref, toRef } from 'vue';
|
||||
import type { Endpoints } from 'misskey-js';
|
||||
import type { Paging } from '@/components/MkPagination.vue';
|
||||
import MkUserList from '@/components/MkUserList.vue';
|
||||
import MkInput from '@/components/MkInput.vue';
|
||||
import MkRadios from '@/components/MkRadios.vue';
|
||||
@@ -36,34 +38,74 @@ import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { useRouter } from '@/router/supplier.js';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
query?: string,
|
||||
origin?: Endpoints['users/search']['req']['origin'],
|
||||
}>(), {
|
||||
query: '',
|
||||
origin: 'combined',
|
||||
});
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const key = ref('');
|
||||
const searchQuery = ref('');
|
||||
const searchOrigin = ref('combined');
|
||||
const userPagination = ref();
|
||||
const searchQuery = ref(toRef(props, 'query').value);
|
||||
const searchOrigin = ref(toRef(props, 'origin').value);
|
||||
const userPagination = ref<Paging>();
|
||||
|
||||
async function search() {
|
||||
const query = searchQuery.value.toString().trim();
|
||||
|
||||
if (query == null || query === '') return;
|
||||
|
||||
if (query.startsWith('https://')) {
|
||||
const promise = misskeyApi('ap/show', {
|
||||
uri: query,
|
||||
//#region AP lookup
|
||||
if (query.startsWith('https://') && !query.includes(' ')) {
|
||||
const confirm = await os.confirm({
|
||||
type: 'info',
|
||||
text: i18n.ts.lookupConfirm,
|
||||
});
|
||||
if (!confirm.canceled) {
|
||||
const promise = misskeyApi('ap/show', {
|
||||
uri: query,
|
||||
});
|
||||
|
||||
os.promiseDialog(promise, null, null, i18n.ts.fetchingAsApObject);
|
||||
os.promiseDialog(promise, null, null, i18n.ts.fetchingAsApObject);
|
||||
|
||||
const res = await promise;
|
||||
const res = await promise;
|
||||
|
||||
if (res.type === 'User') {
|
||||
router.push(`/@${res.object.username}@${res.object.host}`);
|
||||
} else if (res.type === 'Note') {
|
||||
router.push(`/notes/${res.object.id}`);
|
||||
if (res.type === 'User') {
|
||||
router.push(`/@${res.object.username}@${res.object.host}`);
|
||||
} else if (res.type === 'Note') {
|
||||
router.push(`/notes/${res.object.id}`);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
//#endregion
|
||||
|
||||
if (query.length > 1 && !query.includes(' ')) {
|
||||
if (query.startsWith('@')) {
|
||||
const confirm = await os.confirm({
|
||||
type: 'info',
|
||||
text: i18n.ts.lookupConfirm,
|
||||
});
|
||||
if (!confirm.canceled) {
|
||||
router.push(`/${query}`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
if (query.startsWith('#')) {
|
||||
const confirm = await os.confirm({
|
||||
type: 'info',
|
||||
text: i18n.ts.openTagPageConfirm,
|
||||
});
|
||||
if (!confirm.canceled) {
|
||||
router.push(`/user-tags/${encodeURIComponent(query.substring(1))}`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
userPagination.value = {
|
||||
|
@@ -9,8 +9,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
<MkHorizontalSwipe v-model:tab="tab" :tabs="headerTabs">
|
||||
<MkSpacer v-if="tab === 'note'" key="note" :contentMax="800">
|
||||
<div v-if="notesSearchAvailable">
|
||||
<XNote/>
|
||||
<div v-if="notesSearchAvailable || ignoreNotesSearchAvailable">
|
||||
<XNote v-bind="props"/>
|
||||
</div>
|
||||
<div v-else>
|
||||
<MkInfo warn>{{ i18n.ts.notesSearchNotAvailable }}</MkInfo>
|
||||
@@ -18,27 +18,43 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</MkSpacer>
|
||||
|
||||
<MkSpacer v-else-if="tab === 'user'" key="user" :contentMax="800">
|
||||
<XUser/>
|
||||
<XUser v-bind="props"/>
|
||||
</MkSpacer>
|
||||
</MkHorizontalSwipe>
|
||||
</MkStickyContainer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, defineAsyncComponent, ref } from 'vue';
|
||||
import { computed, defineAsyncComponent, ref, toRef } from 'vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { instance } from '@/instance.js';
|
||||
import { notesSearchAvailable } from '@/scripts/check-permissions.js';
|
||||
import MkInfo from '@/components/MkInfo.vue';
|
||||
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
query?: string,
|
||||
userId?: string,
|
||||
username?: string,
|
||||
host?: string | null,
|
||||
type?: 'note' | 'user',
|
||||
origin?: 'combined' | 'local' | 'remote',
|
||||
// For storybook only
|
||||
ignoreNotesSearchAvailable?: boolean,
|
||||
}>(), {
|
||||
query: '',
|
||||
userId: undefined,
|
||||
username: undefined,
|
||||
host: undefined,
|
||||
type: 'note',
|
||||
origin: 'combined',
|
||||
ignoreNotesSearchAvailable: false,
|
||||
});
|
||||
|
||||
const XNote = defineAsyncComponent(() => import('./search.note.vue'));
|
||||
const XUser = defineAsyncComponent(() => import('./search.user.vue'));
|
||||
|
||||
const tab = ref('note');
|
||||
|
||||
const notesSearchAvailable = (($i == null && instance.policies.canSearchNotes) || ($i != null && $i.policies.canSearchNotes));
|
||||
const tab = ref(toRef(props, 'type').value);
|
||||
|
||||
const headerActions = computed(() => []);
|
||||
|
||||
|
@@ -177,6 +177,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<option value="dialog">{{ i18n.ts._serverDisconnectedBehavior.dialog }}</option>
|
||||
<option value="quiet">{{ i18n.ts._serverDisconnectedBehavior.quiet }}</option>
|
||||
</MkSelect>
|
||||
<MkSelect v-model="contextMenu">
|
||||
<template #label>{{ i18n.ts._contextMenu.title }}</template>
|
||||
<option value="app">{{ i18n.ts._contextMenu.app }}</option>
|
||||
<option value="appWithShift">{{ i18n.ts._contextMenu.appWithShift }}</option>
|
||||
<option value="native">{{ i18n.ts._contextMenu.native }}</option>
|
||||
</MkSelect>
|
||||
<MkRange v-model="numberOfPageCache" :min="1" :max="10" :step="1" easing>
|
||||
<template #label>{{ i18n.ts.numberOfPageCache }}</template>
|
||||
<template #caption>{{ i18n.ts.numberOfPageCacheDescription }}</template>
|
||||
@@ -317,6 +323,7 @@ const enableHorizontalSwipe = computed(defaultStore.makeGetterSetter('enableHori
|
||||
const useNativeUIForVideoAudioPlayer = computed(defaultStore.makeGetterSetter('useNativeUIForVideoAudioPlayer'));
|
||||
const alwaysConfirmFollow = computed(defaultStore.makeGetterSetter('alwaysConfirmFollow'));
|
||||
const confirmWhenRevealingSensitiveMedia = computed(defaultStore.makeGetterSetter('confirmWhenRevealingSensitiveMedia'));
|
||||
const contextMenu = computed(defaultStore.makeGetterSetter('contextMenu'));
|
||||
|
||||
watch(lang, () => {
|
||||
miLocalStorage.setItem('lang', lang.value as string);
|
||||
@@ -360,6 +367,7 @@ watch([
|
||||
enableSeasonalScreenEffect,
|
||||
alwaysConfirmFollow,
|
||||
confirmWhenRevealingSensitiveMedia,
|
||||
contextMenu,
|
||||
], async () => {
|
||||
await reloadAsk();
|
||||
});
|
||||
|
@@ -9,7 +9,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<template #label>{{ i18n.ts.sound }}</template>
|
||||
<option v-for="x in soundsTypes" :key="x ?? 'null'" :value="x">{{ getSoundTypeName(x) }}</option>
|
||||
</MkSelect>
|
||||
<div v-if="type === '_driveFile_'" :class="$style.fileSelectorRoot">
|
||||
<div v-if="type === '_driveFile_' && driveFileError === true" :class="$style.fileSelectorRoot">
|
||||
<MkButton :class="$style.fileSelectorButton" inline rounded primary @click="selectSound">{{ i18n.ts.selectFile }}</MkButton>
|
||||
<div :class="$style.fileErrorRoot">
|
||||
<MkCondensedLine>{{ i18n.ts._soundSettings.driveFileError }}</MkCondensedLine>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="type === '_driveFile_'" :class="$style.fileSelectorRoot">
|
||||
<MkButton :class="$style.fileSelectorButton" inline rounded primary @click="selectSound">{{ i18n.ts.selectFile }}</MkButton>
|
||||
<div :class="['_nowrap', !fileUrl && $style.fileNotSelected]">{{ friendlyFileName }}</div>
|
||||
</div>
|
||||
@@ -19,13 +25,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
<div class="_buttons">
|
||||
<MkButton inline @click="listen"><i class="ti ti-player-play"></i> {{ i18n.ts.listen }}</MkButton>
|
||||
<MkButton inline primary @click="save"><i class="ti ti-check"></i> {{ i18n.ts.save }}</MkButton>
|
||||
<MkButton inline primary :disabled="!hasChanged || driveFileError" @click="save"><i class="ti ti-check"></i> {{ i18n.ts.save }}</MkButton>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { ref, computed, watch } from 'vue';
|
||||
import type { SoundType } from '@/scripts/sound.js';
|
||||
import MkSelect from '@/components/MkSelect.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
@@ -51,13 +57,18 @@ const type = ref<SoundType>(props.type);
|
||||
const fileId = ref(props.fileId);
|
||||
const fileUrl = ref(props.fileUrl);
|
||||
const fileName = ref<string>('');
|
||||
const driveFileError = ref(false);
|
||||
const hasChanged = ref(false);
|
||||
const volume = ref(props.volume);
|
||||
|
||||
if (type.value === '_driveFile_' && fileId.value) {
|
||||
const apiRes = await misskeyApi('drive/files/show', {
|
||||
await misskeyApi('drive/files/show', {
|
||||
fileId: fileId.value,
|
||||
}).then((res) => {
|
||||
fileName.value = res.name;
|
||||
}).catch((res) => {
|
||||
driveFileError.value = true;
|
||||
});
|
||||
fileName.value = apiRes.name;
|
||||
}
|
||||
|
||||
function getSoundTypeName(f: SoundType): string {
|
||||
@@ -107,9 +118,21 @@ function selectSound(ev) {
|
||||
fileUrl.value = file.url;
|
||||
fileName.value = file.name;
|
||||
fileId.value = file.id;
|
||||
driveFileError.value = false;
|
||||
hasChanged.value = true;
|
||||
});
|
||||
}
|
||||
|
||||
watch([type, volume], ([typeTo, volumeTo], [typeFrom, volumeFrom]) => {
|
||||
if (typeFrom !== typeTo && typeTo !== '_driveFile_') {
|
||||
fileUrl.value = undefined;
|
||||
fileName.value = '';
|
||||
fileId.value = undefined;
|
||||
driveFileError.value = false;
|
||||
}
|
||||
hasChanged.value = true;
|
||||
});
|
||||
|
||||
function listen() {
|
||||
if (type.value === '_driveFile_' && (!fileUrl.value || !fileId.value)) {
|
||||
os.alert({
|
||||
@@ -131,6 +154,10 @@ function listen() {
|
||||
}
|
||||
|
||||
function save() {
|
||||
if (hasChanged.value === false || driveFileError.value === true) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (type.value === '_driveFile_' && !fileUrl.value) {
|
||||
os.alert({
|
||||
type: 'warning',
|
||||
@@ -163,6 +190,13 @@ function save() {
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.fileErrorRoot {
|
||||
flex-grow: 1;
|
||||
min-width: 0;
|
||||
font-weight: 700;
|
||||
color: var(--error);
|
||||
}
|
||||
|
||||
.fileSelectorButton {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
@@ -21,8 +21,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<MkFolder v-for="type in operationTypes" :key="type">
|
||||
<template #label>{{ i18n.ts._sfx[type] }}</template>
|
||||
<template #suffix>{{ getSoundTypeName(sounds[type].type) }}</template>
|
||||
|
||||
<XSound :type="sounds[type].type" :volume="sounds[type].volume" :fileId="sounds[type].fileId" :fileUrl="sounds[type].fileUrl" @update="(res) => updated(type, res)"/>
|
||||
<Suspense>
|
||||
<template #default>
|
||||
<XSound :type="sounds[type].type" :volume="sounds[type].volume" :fileId="sounds[type].fileId" :fileUrl="sounds[type].fileUrl" @update="(res) => updated(type, res)"/>
|
||||
</template>
|
||||
<template #fallback>
|
||||
<MkLoading/>
|
||||
</template>
|
||||
</Suspense>
|
||||
</MkFolder>
|
||||
</div>
|
||||
</FormSection>
|
||||
|
@@ -19,7 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</MkInput>
|
||||
|
||||
<FormSection>
|
||||
<template #label>{{ i18n.ts._webhookSettings.events }}</template>
|
||||
<template #label>{{ i18n.ts._webhookSettings.trigger }}</template>
|
||||
|
||||
<div class="_gaps_s">
|
||||
<MkSwitch v-model="event_follow">{{ i18n.ts._webhookSettings._events.follow }}</MkSwitch>
|
||||
|
@@ -19,7 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</MkInput>
|
||||
|
||||
<FormSection>
|
||||
<template #label>{{ i18n.ts._webhookSettings.events }}</template>
|
||||
<template #label>{{ i18n.ts._webhookSettings.trigger }}</template>
|
||||
|
||||
<div class="_gaps_s">
|
||||
<MkSwitch v-model="event_follow">{{ i18n.ts._webhookSettings._events.follow }}</MkSwitch>
|
||||
|
@@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<MkSpacer :contentMax="800">
|
||||
<MkHorizontalSwipe v-model:tab="src" :tabs="$i ? headerTabs : headerTabsWhenNotLogin">
|
||||
<div :key="src" ref="rootEl">
|
||||
<MkInfo v-if="['home', 'local', 'social', 'global'].includes(src) && !defaultStore.reactiveState.timelineTutorials.value[src]" style="margin-bottom: var(--margin);" closable @close="closeTutorial()">
|
||||
<MkInfo v-if="isBasicTimeline(src) && !defaultStore.reactiveState.timelineTutorials.value[src]" style="margin-bottom: var(--margin);" closable @close="closeTutorial()">
|
||||
{{ i18n.ts._timelineDescription[src] }}
|
||||
</MkInfo>
|
||||
<MkPostForm v-if="defaultStore.reactiveState.showFixedPostForm.value" :class="$style.postForm" class="post-form _panel" fixed style="margin-bottom: var(--margin);"/>
|
||||
@@ -45,7 +45,6 @@ import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/scripts/misskey-api.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { instance } from '@/instance.js';
|
||||
import { $i } from '@/account.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { antennasCache, userListsCache, favoritedChannelsCache } from '@/cache.js';
|
||||
@@ -53,17 +52,15 @@ import { deviceKind } from '@/scripts/device-kind.js';
|
||||
import { deepMerge } from '@/scripts/merge.js';
|
||||
import { MenuItem } from '@/types/menu.js';
|
||||
import { miLocalStorage } from '@/local-storage.js';
|
||||
import { availableBasicTimelines, hasWithReplies, isAvailableBasicTimeline, isBasicTimeline, basicTimelineIconClass } from '@/timelines.js';
|
||||
|
||||
provide('shouldOmitHeaderTitle', true);
|
||||
|
||||
const isLocalTimelineAvailable = ($i == null && instance.policies.ltlAvailable) || ($i != null && $i.policies.ltlAvailable);
|
||||
const isGlobalTimelineAvailable = ($i == null && instance.policies.gtlAvailable) || ($i != null && $i.policies.gtlAvailable);
|
||||
|
||||
const tlComponent = shallowRef<InstanceType<typeof MkTimeline>>();
|
||||
const rootEl = shallowRef<HTMLElement>();
|
||||
|
||||
const queue = ref(0);
|
||||
const srcWhenNotSignin = ref<'local' | 'global'>(isLocalTimelineAvailable ? 'local' : 'global');
|
||||
const srcWhenNotSignin = ref<'local' | 'global'>(isAvailableBasicTimeline('local') ? 'local' : 'global');
|
||||
const src = computed<'home' | 'local' | 'social' | 'global' | `list:${string}`>({
|
||||
get: () => ($i ? defaultStore.reactiveState.tl.value.src : srcWhenNotSignin.value),
|
||||
set: (x) => saveSrc(x),
|
||||
@@ -74,7 +71,11 @@ const withRenotes = computed<boolean>({
|
||||
});
|
||||
|
||||
// computed内での無限ループを防ぐためのフラグ
|
||||
const localSocialTLFilterSwitchStore = ref<'withReplies' | 'onlyFiles' | false>('withReplies');
|
||||
const localSocialTLFilterSwitchStore = ref<'withReplies' | 'onlyFiles' | false>(
|
||||
defaultStore.reactiveState.tl.value.filter.withReplies ? 'withReplies' :
|
||||
defaultStore.reactiveState.tl.value.filter.onlyFiles ? 'onlyFiles' :
|
||||
false,
|
||||
);
|
||||
|
||||
const withReplies = computed<boolean>({
|
||||
get: () => {
|
||||
@@ -229,7 +230,7 @@ function focus(): void {
|
||||
}
|
||||
|
||||
function closeTutorial(): void {
|
||||
if (!['home', 'local', 'social', 'global'].includes(src.value)) return;
|
||||
if (!isBasicTimeline(src.value)) return;
|
||||
const before = defaultStore.state.timelineTutorials;
|
||||
before[src.value] = true;
|
||||
defaultStore.set('timelineTutorials', before);
|
||||
@@ -245,7 +246,7 @@ const headerActions = computed(() => {
|
||||
type: 'switch',
|
||||
text: i18n.ts.showRenotes,
|
||||
ref: withRenotes,
|
||||
}, src.value === 'local' || src.value === 'social' ? {
|
||||
}, isBasicTimeline(src.value) && hasWithReplies(src.value) ? {
|
||||
type: 'switch',
|
||||
text: i18n.ts.showRepliesToOthersInTimeline,
|
||||
ref: withReplies,
|
||||
@@ -258,7 +259,7 @@ const headerActions = computed(() => {
|
||||
type: 'switch',
|
||||
text: i18n.ts.fileAttachedOnly,
|
||||
ref: onlyFiles,
|
||||
disabled: src.value === 'local' || src.value === 'social' ? withReplies : false,
|
||||
disabled: isBasicTimeline(src.value) && hasWithReplies(src.value) ? withReplies : false,
|
||||
}], ev.currentTarget ?? ev.target);
|
||||
},
|
||||
},
|
||||
@@ -280,27 +281,12 @@ const headerTabs = computed(() => [...(defaultStore.reactiveState.pinnedUserList
|
||||
title: l.name,
|
||||
icon: 'ti ti-star',
|
||||
iconOnly: true,
|
||||
}))), {
|
||||
key: 'home',
|
||||
title: i18n.ts._timelines.home,
|
||||
icon: 'ti ti-home',
|
||||
}))), ...availableBasicTimelines().map(tl => ({
|
||||
key: tl,
|
||||
title: i18n.ts._timelines[tl],
|
||||
icon: basicTimelineIconClass(tl),
|
||||
iconOnly: true,
|
||||
}, ...(isLocalTimelineAvailable ? [{
|
||||
key: 'local',
|
||||
title: i18n.ts._timelines.local,
|
||||
icon: 'ti ti-planet',
|
||||
iconOnly: true,
|
||||
}, {
|
||||
key: 'social',
|
||||
title: i18n.ts._timelines.social,
|
||||
icon: 'ti ti-universe',
|
||||
iconOnly: true,
|
||||
}] : []), ...(isGlobalTimelineAvailable ? [{
|
||||
key: 'global',
|
||||
title: i18n.ts._timelines.global,
|
||||
icon: 'ti ti-whirl',
|
||||
iconOnly: true,
|
||||
}] : []), {
|
||||
})), {
|
||||
icon: 'ti ti-list',
|
||||
title: i18n.ts.lists,
|
||||
iconOnly: true,
|
||||
@@ -317,24 +303,16 @@ const headerTabs = computed(() => [...(defaultStore.reactiveState.pinnedUserList
|
||||
onClick: chooseChannel,
|
||||
}] as Tab[]);
|
||||
|
||||
const headerTabsWhenNotLogin = computed(() => [
|
||||
...(isLocalTimelineAvailable ? [{
|
||||
key: 'local',
|
||||
title: i18n.ts._timelines.local,
|
||||
icon: 'ti ti-planet',
|
||||
iconOnly: true,
|
||||
}] : []),
|
||||
...(isGlobalTimelineAvailable ? [{
|
||||
key: 'global',
|
||||
title: i18n.ts._timelines.global,
|
||||
icon: 'ti ti-whirl',
|
||||
iconOnly: true,
|
||||
}] : []),
|
||||
] as Tab[]);
|
||||
const headerTabsWhenNotLogin = computed(() => [...availableBasicTimelines().map(tl => ({
|
||||
key: tl,
|
||||
title: i18n.ts._timelines[tl],
|
||||
icon: basicTimelineIconClass(tl),
|
||||
iconOnly: true,
|
||||
}))] as Tab[]);
|
||||
|
||||
definePageMetadata(() => ({
|
||||
title: i18n.ts.timeline,
|
||||
icon: src.value === 'local' ? 'ti ti-planet' : src.value === 'social' ? 'ti ti-universe' : src.value === 'global' ? 'ti ti-whirl' : 'ti ti-home',
|
||||
icon: isBasicTimeline(src.value) ? basicTimelineIconClass(src.value) : 'ti ti-home',
|
||||
}));
|
||||
</script>
|
||||
|
||||
|
@@ -232,6 +232,9 @@ const routes: RouteDef[] = [{
|
||||
component: page(() => import('@/pages/search.vue')),
|
||||
query: {
|
||||
q: 'query',
|
||||
userId: 'userId',
|
||||
username: 'username',
|
||||
host: 'host',
|
||||
channel: 'channel',
|
||||
type: 'type',
|
||||
origin: 'origin',
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user