diff --git a/src/components/Modal/Common/ModalFrame.vue b/src/components/Modal/Common/ModalFrame.vue index 8637f7af9..d56806daf 100644 --- a/src/components/Modal/Common/ModalFrame.vue +++ b/src/components/Modal/Common/ModalFrame.vue @@ -28,7 +28,7 @@ import { useModalStore } from '/@/store/ui/modal' withDefaults( defineProps<{ iconMdi?: boolean - iconName: string + iconName?: string title: string subtitle?: string returnButton?: boolean diff --git a/src/components/Modal/Common/ModalHeader.vue b/src/components/Modal/Common/ModalHeader.vue index 314098f4d..0b892a581 100644 --- a/src/components/Modal/Common/ModalHeader.vue +++ b/src/components/Modal/Common/ModalHeader.vue @@ -3,11 +3,17 @@

- {{ - title - }} + + {{ title }}

-

+

+ +

@@ -19,7 +25,7 @@ import ModalReturnButton from './ModalReturnButton.vue' withDefaults( defineProps<{ iconMdi?: boolean - iconName: string + iconName?: string title: string subtitle?: string returnButton?: boolean @@ -69,6 +75,9 @@ withDefaults( weight: 500; size: 0.875rem; } + &[data-has-icon] { + padding-left: 0; + } } .icon { margin-right: 16px; diff --git a/src/components/Modal/GroupCreateModal/GroupCreateModal.vue b/src/components/Modal/GroupCreateModal/GroupCreateModal.vue index b27832472..4f13d152d 100644 --- a/src/components/Modal/GroupCreateModal/GroupCreateModal.vue +++ b/src/components/Modal/GroupCreateModal/GroupCreateModal.vue @@ -22,8 +22,9 @@ + > + 自分自身をメンバーに追加する +
diff --git a/src/components/Modal/ModalContainer.vue b/src/components/Modal/ModalContainer.vue index a3926b44a..d0bb2f0ad 100644 --- a/src/components/Modal/ModalContainer.vue +++ b/src/components/Modal/ModalContainer.vue @@ -63,6 +63,7 @@ import GroupCreateModal from './GroupCreateModal/GroupCreateModal.vue' import GroupMemberEditModal from './GroupMemberEditModal/GroupMemberEditModal.vue' import GroupAdminAddModal from './GroupAdminAddModal/GroupAdminAddModal.vue' import GroupMemberAddModal from './GroupMemberAddModal/GroupMemberAddModal.vue' +import SettingsCacheClearModal from './SettingsCacheClearModal/SettingsCacheClearModal.vue' import SettingsThemeEditModal from './SettingsThemeEditModal/SettingsThemeEditModal.vue' import type { ModalStateType } from '/@/store/ui/modal/states' @@ -83,6 +84,7 @@ const components: Record = { 'group-member-edit': GroupMemberEditModal, 'group-admin-add': GroupAdminAddModal, 'group-member-add': GroupMemberAddModal, + 'settings-cache-clear': SettingsCacheClearModal, 'settings-theme-edit': SettingsThemeEditModal } const component = computed(() => { diff --git a/src/components/Modal/SettingsCacheClearModal/SettingsCacheClearModal.vue b/src/components/Modal/SettingsCacheClearModal/SettingsCacheClearModal.vue new file mode 100644 index 000000000..0b6694521 --- /dev/null +++ b/src/components/Modal/SettingsCacheClearModal/SettingsCacheClearModal.vue @@ -0,0 +1,186 @@ + + + + + diff --git a/src/components/Settings/BrowserTab/CacheManager.vue b/src/components/Settings/BrowserTab/CacheManager.vue index fd32f080c..14140cf35 100644 --- a/src/components/Settings/BrowserTab/CacheManager.vue +++ b/src/components/Settings/BrowserTab/CacheManager.vue @@ -1,32 +1,16 @@ diff --git a/src/components/UI/FormCheckbox.vue b/src/components/UI/FormCheckbox.vue index 86d4914e7..aae005974 100644 --- a/src/components/UI/FormCheckbox.vue +++ b/src/components/UI/FormCheckbox.vue @@ -1,7 +1,7 @@ @@ -12,11 +12,9 @@ import { useModelValueSyncer } from '/@/composables/useModelSyncer' const props = withDefaults( defineProps<{ modelValue?: boolean - label?: string }>(), { - modelValue: false, - label: '' + modelValue: false } ) @@ -28,8 +26,11 @@ const value = useModelValueSyncer(props, emit) diff --git a/src/lib/basic/file.ts b/src/lib/basic/file.ts index 785ee5a82..3da90d8e5 100644 --- a/src/lib/basic/file.ts +++ b/src/lib/basic/file.ts @@ -59,6 +59,6 @@ const sizePrefix = ['', 'K', 'M', 'G'] /** byteを適当にKBなどに直す */ export const prettifyFileSize = (byte: number) => { - const s = Math.floor(Math.log10(byte) / 3) + const s = byte ? Math.floor(Math.log10(byte) / 3) : 0 return `${Math.round((byte / 1000 ** s) * 100) / 100}${sizePrefix[s]}B` } diff --git a/src/store/ui/modal/states.ts b/src/store/ui/modal/states.ts index a17bd29e2..3a5833a8f 100644 --- a/src/store/ui/modal/states.ts +++ b/src/store/ui/modal/states.ts @@ -23,6 +23,7 @@ export type ModalStateType = | 'group-member-edit' | 'group-admin-add' | 'group-member-add' + | 'settings-cache-clear' | 'settings-theme-edit' export type ModalState = @@ -40,6 +41,7 @@ export type ModalState = | GroupMemberEditModalState | GroupAdminAddModalState | GroupMemberAddModalState + | SettingsCacheClearModalState | SettingsThemeEditState interface BaseModalState { @@ -125,6 +127,10 @@ interface GroupMemberAddModalState extends BaseModalState { id: UserGroupId } +interface SettingsCacheClearModalState extends BaseModalState { + type: 'settings-cache-clear' +} + interface SettingsThemeEditState extends BaseModalState { type: 'settings-theme-edit' }