Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.
TypeScript albumsexif-extractiongeocodinglive-photomotion-photophoto-galleryphoto-sharingwebgl-viewer
ui: fix wrong width of form field
Timothy Yin2f2d7b3cd87d
diff --git a/app/app.config.ts b/app/app.config.tsindex d9d3b773..2a867ab1 100644--- a/app/app.config.ts+++ b/app/app.config.ts@@ -38,7 +38,6 @@ export default defineAppConfig({formField: {slots: {label: 'mb-1',- container: 'w-full sm:max-w-xs *:w-full',help: 'mt-0.5',},},diff --git a/app/components/setting/SettingField.vue b/app/components/setting/SettingField.vueindex b1fec8d3..3e89bed1 100644--- a/app/components/setting/SettingField.vue+++ b/app/components/setting/SettingField.vue@@ -15,16 +15,16 @@ const emit = defineEmits<{const getComponentName = (uiType: FieldUIType): string => {const componentMap: Record<FieldUIType, string> = {- 'input': 'UInput',- 'password': 'UInput',- 'url': 'UInput',- 'textarea': 'UTextarea',- 'select': 'USelectMenu',- 'radio': 'URadioGroup',- 'tabs': 'UTabs',- 'toggle': 'UToggle',- 'number': 'UInput',- 'custom': 'UInput', // 默认降级到 input+ input: 'UInput',+ password: 'UInput',+ url: 'UInput',+ textarea: 'UTextarea',+ select: 'USelectMenu',+ radio: 'URadioGroup',+ tabs: 'UTabs',+ toggle: 'UToggle',+ number: 'UInput',+ custom: 'UInput', // 默认降级到 input}return componentMap[uiType] || 'UInput'@@ -76,19 +76,25 @@ const getComponentProps = (): Record<string, any> => {propsMap.type = typebreakcase 'select':- propsMap.items = props.field.ui.options ? Array.from(props.field.ui.options) : []+ propsMap.items = props.field.ui.options+ ? Array.from(props.field.ui.options)+ : []propsMap['label-key'] = 'label'propsMap['value-key'] = 'value'breakcase 'radio':- propsMap.options = props.field.ui.options ? Array.from(props.field.ui.options) : []+ propsMap.options = props.field.ui.options+ ? Array.from(props.field.ui.options)+ : []breakcase 'tabs':- propsMap.items = props.field.ui.options ? Array.from(props.field.ui.options).map((opt: any) => ({- label: $t(opt.label) || opt.label,- value: opt.value,- icon: opt.icon,- })) : []+ propsMap.items = props.field.ui.options+ ? Array.from(props.field.ui.options).map((opt: any) => ({+ label: $t(opt.label) || opt.label,+ value: opt.value,+ icon: opt.icon,+ }))+ : []breakcase 'textarea':propsMap.rows = 3@@ -129,6 +135,9 @@ const descriptionKey = computed(() => {:description="$t(descriptionKey)":help="field.ui.help ? $t(field.ui.help) : undefined":required="field.ui.required"+ :ui="{+ container: 'w-full sm:max-w-sm *:w-full',+ }"><!-- 动态渲染不同的组件 --><componentdiff --git a/app/pages/dashboard/settings/storage.vue b/app/pages/dashboard/settings/storage.vueindex 811c6375..366c24de 100644--- a/app/pages/dashboard/settings/storage.vue+++ b/app/pages/dashboard/settings/storage.vue@@ -354,6 +354,9 @@ const onStorageDelete = async (storageId: number) => {name="storageConfigId"label="存储方案"required+ :ui="{+ container: 'w-full sm:max-w-sm *:w-full',+ }"><USelectMenuv-model="storageSettingsState.storageConfigId"