summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts
diff options
context:
space:
mode:
authornenohi <kimutipartylove@gmail.com>2023-05-05 14:18:06 +0900
committerGitHub <noreply@github.com>2023-05-05 14:18:06 +0900
commit2d84e042405322fc7f9dd5955f9d72f59cdb3a81 (patch)
tree4fc0725045c36b6937c49e363f17be7758c36b64 /packages/frontend/src/scripts
parentMerge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff)
downloadsharkey-2d84e042405322fc7f9dd5955f9d72f59cdb3a81.tar.gz
sharkey-2d84e042405322fc7f9dd5955f9d72f59cdb3a81.tar.bz2
sharkey-2d84e042405322fc7f9dd5955f9d72f59cdb3a81.zip
ロールにNSFWを強制的につけるオプションを追加 (#10731)
* ロールにNSFWを強制的につけるオプションを追加 * すでにあるファイルにNSFWが付与できない * NSFWを付与しようとするとエラーに * add test * Update packages/backend/src/core/RoleService.ts Co-authored-by: syuilo <Syuilotan@yahoo.co.jp> * spacingで怒られたので * ロール作成時のプロパティ削除 --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
Diffstat (limited to 'packages/frontend/src/scripts')
-rw-r--r--packages/frontend/src/scripts/get-drive-file-menu.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/frontend/src/scripts/get-drive-file-menu.ts b/packages/frontend/src/scripts/get-drive-file-menu.ts
index e4ebdcb15b..ed01b49054 100644
--- a/packages/frontend/src/scripts/get-drive-file-menu.ts
+++ b/packages/frontend/src/scripts/get-drive-file-menu.ts
@@ -36,6 +36,12 @@ function toggleSensitive(file: Misskey.entities.DriveFile) {
os.api('drive/files/update', {
fileId: file.id,
isSensitive: !file.isSensitive,
+ }).catch(err => {
+ os.alert({
+ type: 'error',
+ title: i18n.ts.error,
+ text: err.message,
+ });
});
}