From e89d0aa8151c9a13b95409fc1db4cb3605b0715e Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 20 Apr 2023 04:34:59 +0000 Subject: [PATCH 1/6] update pnpm and summaly --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 7929a9340d..3dd67f085a 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "type": "git", "url": "https://github.com/misskey-dev/misskey.git" }, - "packageManager": "pnpm@8.1.1", + "packageManager": "pnpm@8.3.1", "workspaces": [ "packages/frontend", "packages/backend", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 25958c37ad..cfdfca88c1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -342,7 +342,7 @@ importers: version: 2.1.0 summaly: specifier: github:misskey-dev/summaly - version: github.com/misskey-dev/summaly/1bab7afee616429b8bbf7a7cbcbb8ebcef66d992 + version: github.com/misskey-dev/summaly/c7d71a9ec2467268b3911dc2ac805c2b8a898d3e systeminformation: specifier: 5.17.12 version: 5.17.12 @@ -942,7 +942,7 @@ importers: version: github.com/misskey-dev/storybook-addon-misskey-theme/cf583db098365b2ccc81a82f63ca9c93bc32b640(@storybook/blocks@7.0.6)(@storybook/components@7.0.6)(@storybook/core-events@7.0.6)(@storybook/manager-api@7.0.6)(@storybook/preview-api@7.0.6)(@storybook/theming@7.0.6)(@storybook/types@7.0.2)(react-dom@18.2.0)(react@18.2.0) summaly: specifier: github:misskey-dev/summaly - version: github.com/misskey-dev/summaly/1bab7afee616429b8bbf7a7cbcbb8ebcef66d992 + version: github.com/misskey-dev/summaly/c7d71a9ec2467268b3911dc2ac805c2b8a898d3e vite-plugin-turbosnap: specifier: ^1.0.1 version: 1.0.1 @@ -20237,10 +20237,10 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: true - github.com/misskey-dev/summaly/1bab7afee616429b8bbf7a7cbcbb8ebcef66d992: - resolution: {tarball: https://codeload.github.com/misskey-dev/summaly/tar.gz/1bab7afee616429b8bbf7a7cbcbb8ebcef66d992} + github.com/misskey-dev/summaly/c7d71a9ec2467268b3911dc2ac805c2b8a898d3e: + resolution: {tarball: https://codeload.github.com/misskey-dev/summaly/tar.gz/c7d71a9ec2467268b3911dc2ac805c2b8a898d3e} name: summaly - version: 4.0.1 + version: 4.0.2 dependencies: cheerio: 1.0.0-rc.12 escape-regexp: 0.0.1 From 795cb1ecf42377291d1c2fe3b5a4613a5568b397 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 20 Apr 2023 15:39:59 +0900 Subject: [PATCH 2/6] :art: --- packages/frontend/src/components/MkSignupDialog.rules.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/frontend/src/components/MkSignupDialog.rules.vue b/packages/frontend/src/components/MkSignupDialog.rules.vue index ed179ffdeb..5bdc530195 100644 --- a/packages/frontend/src/components/MkSignupDialog.rules.vue +++ b/packages/frontend/src/components/MkSignupDialog.rules.vue @@ -90,7 +90,6 @@ const emit = defineEmits<{ .rule { display: flex; - align-items: center; gap: 8px; word-break: break-word; From 3af99d075e9715f020fb514fc54ab7fdbafc656c Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 20 Apr 2023 17:23:35 +0900 Subject: [PATCH 3/6] =?UTF-8?q?enhance(frontend):=20=E3=82=B5=E3=83=BC?= =?UTF-8?q?=E3=83=90=E3=83=BC=E6=83=85=E5=A0=B1=E3=83=9A=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=81=A7=E3=82=B5=E3=83=BC=E3=83=90=E3=83=BC=E3=83=AB=E3=83=BC?= =?UTF-8?q?=E3=83=AB=E3=82=92=E8=A6=8B=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/pages/about.vue | 82 ++++++++++++++++++++------- 1 file changed, 61 insertions(+), 21 deletions(-) diff --git a/packages/frontend/src/pages/about.vue b/packages/frontend/src/pages/about.vue index 1ca5ba6ca7..8e29990426 100644 --- a/packages/frontend/src/pages/about.vue +++ b/packages/frontend/src/pages/about.vue @@ -3,10 +3,10 @@
-
-
- -
+
+
+ +
{{ instance.name ?? host }}
@@ -41,6 +41,13 @@ + + + +
    +
  1. +
+
{{ i18n.ts.termsOfService }}
@@ -94,6 +101,7 @@ import FormLink from '@/components/form/link.vue'; import FormSection from '@/components/form/section.vue'; import FormSuspense from '@/components/form/suspense.vue'; import FormSplit from '@/components/form/split.vue'; +import MkFolder from '@/components/MkFolder.vue'; import MkKeyValue from '@/components/MkKeyValue.vue'; import MkInstanceStats from '@/components/MkInstanceStats.vue'; import * as os from '@/os'; @@ -148,31 +156,63 @@ definePageMetadata(computed(() => ({ }))); - From 40debf20d866836a94d963dd041f946c3af4a8f4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 20 Apr 2023 19:40:02 +0900 Subject: [PATCH 4/6] add new achievement --- CHANGELOG.md | 1 + locales/ja-JP.yml | 3 +++ packages/backend/src/core/AchievementService.ts | 1 + packages/frontend/src/init.ts | 4 ++++ packages/frontend/src/scripts/achievements.ts | 6 ++++++ 5 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89a8cc3ee3..a6fd309526 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ * 画像が全て隠れた状態で表示されるようになります - 1枚だけのメディアリストの画像のアスペクト比を画像に応じて縦長にするように - Fix: リアクションをホバーした時のユーザーリストで猫耳が切れてしまっていた問題を修正 +- 新しい実績を追加 ### Server - Fix: エクスポートデータの拡張子がunknownになる問題を修正 diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 8c1334c6a8..6f6f49ab22 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1199,6 +1199,9 @@ _achievements: _client30min: title: "ひとやすみ" description: "クライアントを起動してから30分以上経過した" + _client60min: + title: "Misskeyの見すぎ" + description: "クライアントを起動してから60分以上経過した" _noteDeletedWithin1min: title: "いまのなし" description: "投稿してから1分以内にその投稿を削除した" diff --git a/packages/backend/src/core/AchievementService.ts b/packages/backend/src/core/AchievementService.ts index 1ca38d8bb0..9e223f1492 100644 --- a/packages/backend/src/core/AchievementService.ts +++ b/packages/backend/src/core/AchievementService.ts @@ -64,6 +64,7 @@ export const ACHIEVEMENT_TYPES = [ 'iLoveMisskey', 'foundTreasure', 'client30min', + 'client60min', 'noteDeletedWithin1min', 'postedAtLateNight', 'postedAt0min0sec', diff --git a/packages/frontend/src/init.ts b/packages/frontend/src/init.ts index 91cdc15ef9..d40b761329 100644 --- a/packages/frontend/src/init.ts +++ b/packages/frontend/src/init.ts @@ -431,6 +431,10 @@ if ($i) { claimAchievement('client30min'); }, 1000 * 60 * 30); + window.setTimeout(() => { + claimAchievement('client60min'); + }, 1000 * 60 * 60); + const lastUsed = miLocalStorage.getItem('lastUsed'); if (lastUsed) { const lastUsedDate = parseInt(lastUsed, 10); diff --git a/packages/frontend/src/scripts/achievements.ts b/packages/frontend/src/scripts/achievements.ts index 25e8b71a12..f1da8a76da 100644 --- a/packages/frontend/src/scripts/achievements.ts +++ b/packages/frontend/src/scripts/achievements.ts @@ -60,6 +60,7 @@ export const ACHIEVEMENT_TYPES = [ 'iLoveMisskey', 'foundTreasure', 'client30min', + 'client60min', 'noteDeletedWithin1min', 'postedAtLateNight', 'postedAt0min0sec', @@ -343,6 +344,11 @@ export const ACHIEVEMENT_BADGES = { bg: 'linear-gradient(0deg, rgb(220 223 225), rgb(172 192 207))', frame: 'bronze', }, + 'client60min': { + img: '/fluent-emoji/1f552.png', + bg: 'linear-gradient(0deg, rgb(220 223 225), rgb(172 192 207))', + frame: 'silver', + }, 'noteDeletedWithin1min': { img: '/fluent-emoji/1f5d1.png', bg: 'linear-gradient(0deg, rgb(220 223 225), rgb(172 192 207))', From af738d9ca9c13f07d1ba72d0ead7267e95ef7fc4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 20 Apr 2023 20:01:54 +0900 Subject: [PATCH 5/6] :art: --- packages/frontend/src/components/MkContainer.vue | 1 - packages/frontend/src/themes/_dark.json5 | 1 - packages/frontend/src/themes/_light.json5 | 1 - packages/frontend/src/themes/d-astro.json5 | 1 - packages/frontend/src/themes/d-botanical.json5 | 2 -- packages/frontend/src/themes/d-dark.json5 | 2 -- packages/frontend/src/themes/d-future.json5 | 2 -- packages/frontend/src/themes/d-green-lime.json5 | 2 -- packages/frontend/src/themes/d-green-orange.json5 | 2 -- packages/frontend/src/themes/d-u0.json5 | 1 - packages/frontend/src/themes/l-botanical.json5 | 2 -- packages/frontend/src/themes/l-light.json5 | 1 - packages/frontend/src/themes/l-rainy.json5 | 1 - packages/frontend/src/themes/l-u0.json5 | 1 - packages/frontend/src/themes/l-vivid.json5 | 1 - packages/frontend/src/ui/deck/column.vue | 6 +----- 16 files changed, 1 insertion(+), 26 deletions(-) diff --git a/packages/frontend/src/components/MkContainer.vue b/packages/frontend/src/components/MkContainer.vue index a6372b7b6f..1b62a697e2 100644 --- a/packages/frontend/src/components/MkContainer.vue +++ b/packages/frontend/src/components/MkContainer.vue @@ -185,7 +185,6 @@ export default defineComponent({ left: 0; color: var(--panelHeaderFg); background: var(--panelHeaderBg); - border-bottom: solid 0.5px var(--panelHeaderDivider); z-index: 2; line-height: 1.4em; } diff --git a/packages/frontend/src/themes/_dark.json5 b/packages/frontend/src/themes/_dark.json5 index a23d25e866..aea8148209 100644 --- a/packages/frontend/src/themes/_dark.json5 +++ b/packages/frontend/src/themes/_dark.json5 @@ -27,7 +27,6 @@ panelHighlight: ':lighten<3<@panel', panelHeaderBg: ':lighten<3<@panel', panelHeaderFg: '@fg', - panelHeaderDivider: 'rgba(0, 0, 0, 0)', panelBorder: '" solid 1px var(--divider)', acrylicPanel: ':alpha<0.5<@panel', windowHeader: ':alpha<0.85<@panel', diff --git a/packages/frontend/src/themes/_light.json5 b/packages/frontend/src/themes/_light.json5 index 713756221a..a8b5489671 100644 --- a/packages/frontend/src/themes/_light.json5 +++ b/packages/frontend/src/themes/_light.json5 @@ -27,7 +27,6 @@ panelHighlight: ':darken<3<@panel', panelHeaderBg: ':lighten<3<@panel', panelHeaderFg: '@fg', - panelHeaderDivider: 'rgba(0, 0, 0, 0)', panelBorder: '" solid 1px var(--divider)', acrylicPanel: ':alpha<0.5<@panel', windowHeader: ':alpha<0.85<@panel', diff --git a/packages/frontend/src/themes/d-astro.json5 b/packages/frontend/src/themes/d-astro.json5 index c6a927ec3a..86a8403bb4 100644 --- a/packages/frontend/src/themes/d-astro.json5 +++ b/packages/frontend/src/themes/d-astro.json5 @@ -57,7 +57,6 @@ listItemHoverBg: 'rgba(255, 255, 255, 0.03)', scrollbarHandle: 'rgba(255, 255, 255, 0.2)', wallpaperOverlay: 'rgba(0, 0, 0, 0.5)', - panelHeaderDivider: 'rgba(0, 0, 0, 0)', scrollbarHandleHover: 'rgba(255, 255, 255, 0.4)', X2: ':darken<2<@panel', X3: 'rgba(255, 255, 255, 0.05)', diff --git a/packages/frontend/src/themes/d-botanical.json5 b/packages/frontend/src/themes/d-botanical.json5 index c03b95e2d7..b98908984b 100644 --- a/packages/frontend/src/themes/d-botanical.json5 +++ b/packages/frontend/src/themes/d-botanical.json5 @@ -13,8 +13,6 @@ fgHighlighted: '#fff', divider: 'rgba(255, 255, 255, 0.14)', panel: 'rgb(47, 47, 44)', - panelHeaderBg: '@panel', - panelHeaderDivider: '@divider', header: ':alpha<0.7<@panel', navBg: '#363636', renote: '@accent', diff --git a/packages/frontend/src/themes/d-dark.json5 b/packages/frontend/src/themes/d-dark.json5 index d24ce4df69..354b999d29 100644 --- a/packages/frontend/src/themes/d-dark.json5 +++ b/packages/frontend/src/themes/d-dark.json5 @@ -13,8 +13,6 @@ fgHighlighted: '#fff', divider: 'rgba(255, 255, 255, 0.14)', panel: '#2d2d2d', - panelHeaderBg: '@panel', - panelHeaderDivider: '@divider', header: ':alpha<0.7<@panel', navBg: '#363636', renote: '@accent', diff --git a/packages/frontend/src/themes/d-future.json5 b/packages/frontend/src/themes/d-future.json5 index b6fa1ab0c1..ac1d3166bc 100644 --- a/packages/frontend/src/themes/d-future.json5 +++ b/packages/frontend/src/themes/d-future.json5 @@ -14,8 +14,6 @@ fgOnAccent: '#000', divider: 'rgba(255, 255, 255, 0.1)', panel: '#18181c', - panelHeaderBg: '@panel', - panelHeaderDivider: '@divider', renote: '@accent', mention: '#f2c97d', mentionMe: '@accent', diff --git a/packages/frontend/src/themes/d-green-lime.json5 b/packages/frontend/src/themes/d-green-lime.json5 index a6983b9ac2..17629190d0 100644 --- a/packages/frontend/src/themes/d-green-lime.json5 +++ b/packages/frontend/src/themes/d-green-lime.json5 @@ -14,8 +14,6 @@ fgOnAccent: '#192320', divider: '#e7fffb24', panel: '#192320', - panelHeaderBg: '@panel', - panelHeaderDivider: '@divider', popup: '#293330', renote: '@accent', mentionMe: '#ffaa00', diff --git a/packages/frontend/src/themes/d-green-orange.json5 b/packages/frontend/src/themes/d-green-orange.json5 index 62adc39e29..bddcc242e7 100644 --- a/packages/frontend/src/themes/d-green-orange.json5 +++ b/packages/frontend/src/themes/d-green-orange.json5 @@ -14,8 +14,6 @@ fgOnAccent: '#192320', divider: '#e7fffb24', panel: '#192320', - panelHeaderBg: '@panel', - panelHeaderDivider: '@divider', popup: '#293330', renote: '@accent', mentionMe: '#b4e900', diff --git a/packages/frontend/src/themes/d-u0.json5 b/packages/frontend/src/themes/d-u0.json5 index b270f809ac..fb9b36663d 100644 --- a/packages/frontend/src/themes/d-u0.json5 +++ b/packages/frontend/src/themes/d-u0.json5 @@ -81,7 +81,6 @@ inputBorderHover: 'rgba(255, 255, 255, 0.2)', wallpaperOverlay: 'rgba(0, 0, 0, 0.5)', fgTransparentWeak: ':alpha<0.75<@fg', - panelHeaderDivider: 'rgba(0, 0, 0, 0)', scrollbarHandleHover: 'rgba(255, 255, 255, 0.4)', deckDivider: '#142022', }, diff --git a/packages/frontend/src/themes/l-botanical.json5 b/packages/frontend/src/themes/l-botanical.json5 index 2ea9a7d6c9..70089a55d2 100644 --- a/packages/frontend/src/themes/l-botanical.json5 +++ b/packages/frontend/src/themes/l-botanical.json5 @@ -13,8 +13,6 @@ fgHighlighted: '#6bc9a0', divider: '#cfcfcf', panel: '@X14', - panelHeaderBg: '@panel', - panelHeaderDivider: '@divider', header: ':alpha<0.7<@panel', navBg: '@X14', renote: '#229e92', diff --git a/packages/frontend/src/themes/l-light.json5 b/packages/frontend/src/themes/l-light.json5 index 248355c945..cd9f0c477d 100644 --- a/packages/frontend/src/themes/l-light.json5 +++ b/packages/frontend/src/themes/l-light.json5 @@ -14,7 +14,6 @@ header: ':alpha<0.7<@panel', navBg: '#fff', panel: '#fff', - panelHeaderDivider: '@divider', mentionMe: 'rgb(0, 179, 70)', }, } diff --git a/packages/frontend/src/themes/l-rainy.json5 b/packages/frontend/src/themes/l-rainy.json5 index 283dd74c6c..8bc63ee43d 100644 --- a/packages/frontend/src/themes/l-rainy.json5 +++ b/packages/frontend/src/themes/l-rainy.json5 @@ -12,7 +12,6 @@ fg: '#636b71', panel: '#fff', divider: 'rgb(230 233 234)', - panelHeaderDivider: '@divider', renote: '@accent', link: '@accent', mention: '@accent', diff --git a/packages/frontend/src/themes/l-u0.json5 b/packages/frontend/src/themes/l-u0.json5 index 03b114ba39..2cb79791b8 100644 --- a/packages/frontend/src/themes/l-u0.json5 +++ b/packages/frontend/src/themes/l-u0.json5 @@ -81,7 +81,6 @@ inputBorderHover: 'rgba(255, 255, 255, 0.2)', wallpaperOverlay: 'rgba(0, 0, 0, 0.5)', fgTransparentWeak: ':alpha<0.75<@fg', - panelHeaderDivider: 'rgba(0, 0, 0, 0)', scrollbarHandleHover: 'rgba(255, 255, 255, 0.4)', }, } diff --git a/packages/frontend/src/themes/l-vivid.json5 b/packages/frontend/src/themes/l-vivid.json5 index b3c08f38ae..0ff087f471 100644 --- a/packages/frontend/src/themes/l-vivid.json5 +++ b/packages/frontend/src/themes/l-vivid.json5 @@ -60,7 +60,6 @@ scrollbarHandle: 'rgba(0, 0, 0, 0.2)', wallpaperOverlay: 'rgba(255, 255, 255, 0.5)', fgTransparentWeak: ':alpha<0.75<@fg', - panelHeaderDivider: '@divider', scrollbarHandleHover: 'rgba(0, 0, 0, 0.4)', X2: ':darken<2<@panel', X3: 'rgba(0, 0, 0, 0.05)', diff --git a/packages/frontend/src/ui/deck/column.vue b/packages/frontend/src/ui/deck/column.vue index e895847bd9..7f6004ba62 100644 --- a/packages/frontend/src/ui/deck/column.vue +++ b/packages/frontend/src/ui/deck/column.vue @@ -316,12 +316,8 @@ function onDrop(ev) { font-size: 0.9em; color: var(--panelHeaderFg); background: var(--panelHeaderBg); - box-shadow: 0 1px 0 0 var(--panelHeaderDivider); cursor: pointer; - - &, * { - user-select: none; - } + user-select: none; } .title { From 8dc60cd3273be7103050bb8e680db03f2856cec3 Mon Sep 17 00:00:00 2001 From: nenohi Date: Thu, 20 Apr 2023 20:02:50 +0900 Subject: [PATCH 6/6] Role timeline setting (#10677) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ロールタイムライン設定 * isRoleTimeline to isExplorable * ポリシーではないので削除 * 型からも * wip * 足りてなかった説 * wip * listはpublicを表示 * 前回の記載修正( #10671 ) --------- Co-authored-by: syuilo --- CHANGELOG.md | 4 +++- locales/ja-JP.yml | 2 ++ .../backend/migration/1681870960239-RoleTLSetting.js | 12 ++++++++++++ .../backend/src/core/entities/RoleEntityService.ts | 1 + packages/backend/src/models/entities/Role.ts | 5 +++++ .../src/server/api/endpoints/admin/roles/create.ts | 3 +++ .../src/server/api/endpoints/admin/roles/update.ts | 2 ++ .../backend/src/server/api/endpoints/roles/notes.ts | 5 ++++- packages/frontend/src/pages/admin/roles.edit.vue | 1 + packages/frontend/src/pages/admin/roles.editor.vue | 6 ++++++ 10 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 packages/backend/migration/1681870960239-RoleTLSetting.js diff --git a/CHANGELOG.md b/CHANGELOG.md index a6fd309526..97ce4ec7b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,6 @@ ### Client - -- カスタム絵文字のライセンスを複数でセットできるようになりました。 ### Server - @@ -24,6 +23,9 @@ (自分自身に対してもメモを追加できます。) * ユーザーメニューから追加できます。 (デスクトップ表示ではusernameの右側のボタンからも追加可能) +- ロールタイムラインをロールごとに表示するかどうかの選択できるようになりました。 + * デフォルトがオフになるので、ロールタイムラインを表示する場合はオンにしてください。 +- カスタム絵文字のライセンスを複数でセットできるようになりました。 ### Client - 通知の表示をカスタマイズできるように diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 6f6f49ab22..69fca92f6f 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1291,6 +1291,8 @@ _role: iconUrl: "アイコン画像のURL" asBadge: "バッジとして表示" descriptionOfAsBadge: "オンにすると、ユーザー名の横にロールのアイコンが表示されます。" + isExplorable: "ロールタイムラインを公開" + descriptionOfIsExplorable: "オンにすると、ロールのタイムラインを公開します。ロールの公開がオフの場合、タイムラインの公開はされません。" displayOrder: "表示順" descriptionOfDisplayOrder: "数値が大きいほどUI上で先頭に表示されます。" canEditMembersByModerator: "モデレーターのメンバー編集を許可" diff --git a/packages/backend/migration/1681870960239-RoleTLSetting.js b/packages/backend/migration/1681870960239-RoleTLSetting.js new file mode 100644 index 0000000000..2280f44eaa --- /dev/null +++ b/packages/backend/migration/1681870960239-RoleTLSetting.js @@ -0,0 +1,12 @@ +export class RoleTLSetting1681870960239 { + name = 'RoleTLSetting1681870960239' + + async up(queryRunner) { + await queryRunner.query(`ALTER TABLE "role" ADD "isExplorable" boolean NOT NULL DEFAULT false`); + } + + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "role" DROP COLUMN "isExplorable"`); + } + +} diff --git a/packages/backend/src/core/entities/RoleEntityService.ts b/packages/backend/src/core/entities/RoleEntityService.ts index e111a10b77..54818782dd 100644 --- a/packages/backend/src/core/entities/RoleEntityService.ts +++ b/packages/backend/src/core/entities/RoleEntityService.ts @@ -59,6 +59,7 @@ export class RoleEntityService { isPublic: role.isPublic, isAdministrator: role.isAdministrator, isModerator: role.isModerator, + isExplorable: role.isExplorable, asBadge: role.asBadge, canEditMembersByModerator: role.canEditMembersByModerator, displayOrder: role.displayOrder, diff --git a/packages/backend/src/models/entities/Role.ts b/packages/backend/src/models/entities/Role.ts index eca9bcf270..61f40d59da 100644 --- a/packages/backend/src/models/entities/Role.ts +++ b/packages/backend/src/models/entities/Role.ts @@ -151,6 +151,11 @@ export class Role { }) public isAdministrator: boolean; + @Column('boolean', { + default: false, + }) + public isExplorable: boolean; + @Column('boolean', { default: false, }) diff --git a/packages/backend/src/server/api/endpoints/admin/roles/create.ts b/packages/backend/src/server/api/endpoints/admin/roles/create.ts index 1359894634..5440c4563f 100644 --- a/packages/backend/src/server/api/endpoints/admin/roles/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/roles/create.ts @@ -25,6 +25,7 @@ export const paramDef = { isPublic: { type: 'boolean' }, isModerator: { type: 'boolean' }, isAdministrator: { type: 'boolean' }, + isExplorable: { type: 'boolean' }, asBadge: { type: 'boolean' }, canEditMembersByModerator: { type: 'boolean' }, displayOrder: { type: 'number' }, @@ -42,6 +43,7 @@ export const paramDef = { 'isPublic', 'isModerator', 'isAdministrator', + 'isExplorable', 'asBadge', 'canEditMembersByModerator', 'displayOrder', @@ -76,6 +78,7 @@ export default class extends Endpoint { isPublic: ps.isPublic, isAdministrator: ps.isAdministrator, isModerator: ps.isModerator, + isExplorable: ps.isExplorable, asBadge: ps.asBadge, canEditMembersByModerator: ps.canEditMembersByModerator, displayOrder: ps.displayOrder, diff --git a/packages/backend/src/server/api/endpoints/admin/roles/update.ts b/packages/backend/src/server/api/endpoints/admin/roles/update.ts index 37b68c4c41..467f157a61 100644 --- a/packages/backend/src/server/api/endpoints/admin/roles/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/roles/update.ts @@ -33,6 +33,7 @@ export const paramDef = { isPublic: { type: 'boolean' }, isModerator: { type: 'boolean' }, isAdministrator: { type: 'boolean' }, + isExplorable: { type: 'boolean' }, asBadge: { type: 'boolean' }, canEditMembersByModerator: { type: 'boolean' }, displayOrder: { type: 'number' }, @@ -85,6 +86,7 @@ export default class extends Endpoint { isPublic: ps.isPublic, isModerator: ps.isModerator, isAdministrator: ps.isAdministrator, + isExplorable: ps.isExplorable, asBadge: ps.asBadge, canEditMembersByModerator: ps.canEditMembersByModerator, displayOrder: ps.displayOrder, diff --git a/packages/backend/src/server/api/endpoints/roles/notes.ts b/packages/backend/src/server/api/endpoints/roles/notes.ts index 90c8281a49..6202c740f1 100644 --- a/packages/backend/src/server/api/endpoints/roles/notes.ts +++ b/packages/backend/src/server/api/endpoints/roles/notes.ts @@ -65,12 +65,15 @@ export default class extends Endpoint { super(meta, paramDef, async (ps, me) => { const role = await this.rolesRepository.findOneBy({ id: ps.roleId, + isPublic: true, }); if (role == null) { throw new ApiError(meta.errors.noSuchRole); } - + if (!role.isExplorable) { + return []; + } const limit = ps.limit + (ps.untilId ? 1 : 0) + (ps.sinceId ? 1 : 0); // untilIdに指定したものも含まれるため+1 const noteIdsRes = await this.redisClient.xrevrange( `roleTimeline:${role.id}`, diff --git a/packages/frontend/src/pages/admin/roles.edit.vue b/packages/frontend/src/pages/admin/roles.edit.vue index b1aa03f1f7..c211ef2f05 100644 --- a/packages/frontend/src/pages/admin/roles.edit.vue +++ b/packages/frontend/src/pages/admin/roles.edit.vue @@ -54,6 +54,7 @@ if (props.id) { target: 'manual', condFormula: { id: uuid(), type: 'isRemote' }, isPublic: false, + isExplorable: false, asBadge: false, canEditMembersByModerator: false, displayOrder: 0, diff --git a/packages/frontend/src/pages/admin/roles.editor.vue b/packages/frontend/src/pages/admin/roles.editor.vue index 873ff02feb..649f64d125 100644 --- a/packages/frontend/src/pages/admin/roles.editor.vue +++ b/packages/frontend/src/pages/admin/roles.editor.vue @@ -59,6 +59,11 @@ + + + + +
@@ -475,6 +480,7 @@ const save = throttle(100, () => { isAdministrator: role.isAdministrator, isModerator: role.isModerator, isPublic: role.isPublic, + isExplorable: role.isExplorable, asBadge: role.asBadge, canEditMembersByModerator: role.canEditMembersByModerator, policies: role.policies,