From 187a698d543f884629083214294345cda72684ba Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 2 Mar 2023 20:47:24 +0900 Subject: [PATCH] :art: --- packages/frontend/src/components/MkFolder.vue | 4 +- packages/frontend/src/components/MkTab.vue | 2 +- packages/frontend/src/const.ts | 19 + .../src/pages/admin/email-settings.vue | 31 +- .../src/pages/admin/object-storage.vue | 24 +- .../frontend/src/pages/admin/roles.edit.vue | 58 ++- .../frontend/src/pages/admin/roles.editor.vue | 348 ++++++++---------- .../frontend/src/pages/admin/roles.role.vue | 2 +- .../frontend/src/pages/admin/settings.vue | 24 +- packages/frontend/src/pages/my-lists/list.vue | 55 +-- 10 files changed, 301 insertions(+), 266 deletions(-) diff --git a/packages/frontend/src/components/MkFolder.vue b/packages/frontend/src/components/MkFolder.vue index b97e36cd5f..a54a1c2305 100644 --- a/packages/frontend/src/components/MkFolder.vue +++ b/packages/frontend/src/components/MkFolder.vue @@ -43,8 +43,8 @@ import { nextTick, onMounted } from 'vue'; const props = withDefaults(defineProps<{ - defaultOpen: boolean; - maxHeight: number | null; + defaultOpen?: boolean; + maxHeight?: number | null; }>(), { defaultOpen: false, maxHeight: null, diff --git a/packages/frontend/src/components/MkTab.vue b/packages/frontend/src/components/MkTab.vue index 81cbde0ac7..6f819bbbd7 100644 --- a/packages/frontend/src/components/MkTab.vue +++ b/packages/frontend/src/components/MkTab.vue @@ -34,7 +34,7 @@ export default defineComponent({ > button { flex: 1; padding: 10px 8px; - border-radius: var(--radius); + border-radius: 999px; &:disabled { opacity: 1 !important; diff --git a/packages/frontend/src/const.ts b/packages/frontend/src/const.ts index da3ae89c37..46ebc7d6a3 100644 --- a/packages/frontend/src/const.ts +++ b/packages/frontend/src/const.ts @@ -47,6 +47,25 @@ https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers export const notificationTypes = ['follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'achievementEarned', 'app'] as const; export const obsoleteNotificationTypes = ['pollVote', 'groupInvited'] as const; +export const ROLE_POLICIES = [ + 'gtlAvailable', + 'ltlAvailable', + 'canPublicNote', + 'canInvite', + 'canManageCustomEmojis', + 'canHideAds', + 'driveCapacityMb', + 'pinLimit', + 'antennaLimit', + 'wordMuteLimit', + 'webhookLimit', + 'clipLimit', + 'noteEachClipsLimit', + 'userListLimit', + 'userEachUserListsLimit', + 'rateLimitFactor', +] as const; + // なんか動かない //export const CURRENT_STICKY_TOP = Symbol('CURRENT_STICKY_TOP'); //export const CURRENT_STICKY_BOTTOM = Symbol('CURRENT_STICKY_BOTTOM'); diff --git a/packages/frontend/src/pages/admin/email-settings.vue b/packages/frontend/src/pages/admin/email-settings.vue index 4ef6a5a19e..b742132af6 100644 --- a/packages/frontend/src/pages/admin/email-settings.vue +++ b/packages/frontend/src/pages/admin/email-settings.vue @@ -1,6 +1,6 @@ @@ -61,6 +71,7 @@ import * as os from '@/os'; import { fetchInstance, instance } from '@/instance'; import { i18n } from '@/i18n'; import { definePageMetadata } from '@/scripts/page-metadata'; +import MkButton from '@/components/MkButton.vue'; let enableEmail: boolean = $ref(false); let email: any = $ref(null); @@ -109,17 +120,6 @@ function save() { }); } -const headerActions = $computed(() => [{ - asFullButton: true, - text: i18n.ts.testEmail, - handler: testEmail, -}, { - asFullButton: true, - icon: 'ti ti-check', - text: i18n.ts.save, - handler: save, -}]); - const headerTabs = $computed(() => []); definePageMetadata({ @@ -127,3 +127,10 @@ definePageMetadata({ icon: 'ti ti-mail', }); + + diff --git a/packages/frontend/src/pages/admin/object-storage.vue b/packages/frontend/src/pages/admin/object-storage.vue index bd7c203512..cbe38b2d81 100644 --- a/packages/frontend/src/pages/admin/object-storage.vue +++ b/packages/frontend/src/pages/admin/object-storage.vue @@ -1,6 +1,6 @@ @@ -79,6 +86,7 @@ import * as os from '@/os'; import { fetchInstance } from '@/instance'; import { i18n } from '@/i18n'; import { definePageMetadata } from '@/scripts/page-metadata'; +import MkButton from '@/components/MkButton.vue'; let useObjectStorage: boolean = $ref(false); let objectStorageBaseUrl: string | null = $ref(null); @@ -131,13 +139,6 @@ function save() { }); } -const headerActions = $computed(() => [{ - asFullButton: true, - icon: 'ti ti-check', - text: i18n.ts.save, - handler: save, -}]); - const headerTabs = $computed(() => []); definePageMetadata({ @@ -145,3 +146,10 @@ definePageMetadata({ icon: 'ti ti-cloud', }); + + diff --git a/packages/frontend/src/pages/admin/roles.edit.vue b/packages/frontend/src/pages/admin/roles.edit.vue index ae884c0111..2a65a75187 100644 --- a/packages/frontend/src/pages/admin/roles.edit.vue +++ b/packages/frontend/src/pages/admin/roles.edit.vue @@ -1,22 +1,31 @@ diff --git a/packages/frontend/src/pages/admin/roles.editor.vue b/packages/frontend/src/pages/admin/roles.editor.vue index 4eea827de7..2fb605f8c0 100644 --- a/packages/frontend/src/pages/admin/roles.editor.vue +++ b/packages/frontend/src/pages/admin/roles.editor.vue @@ -1,19 +1,19 @@ diff --git a/packages/frontend/src/pages/my-lists/list.vue b/packages/frontend/src/pages/my-lists/list.vue index a6a3974d0c..037d00d8ff 100644 --- a/packages/frontend/src/pages/my-lists/list.vue +++ b/packages/frontend/src/pages/my-lists/list.vue @@ -1,33 +1,30 @@ @@ -130,6 +127,10 @@ definePageMetadata(computed(() => list ? {