mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-06 20:42:57 +08:00
🐛 Fix(custom): fix an issue setting copy format will result ui collapse
This commit is contained in:
@@ -157,8 +157,8 @@
|
|||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="radio-group">
|
<div class="radio-group">
|
||||||
<label v-for="item in pasteFormatList" :key="item" class="radio-option">
|
<label v-for="item in pasteFormatList" :key="`format-${item}`" class="radio-option">
|
||||||
<input v-model="form.pasteFormat" type="radio" :value="item" class="radio-input" />
|
<input v-model="form.pasteFormat" type="radio" :value="item" class="radio-input" :name="'paste-format'" />
|
||||||
<span class="radio-custom" />
|
<span class="radio-custom" />
|
||||||
<span class="radio-text">
|
<span class="radio-text">
|
||||||
{{ t(`pages.manage.setting.copyFormat.${item}`) }}
|
{{ t(`pages.manage.setting.copyFormat.${item}`) }}
|
||||||
@@ -216,7 +216,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { FolderIcon, Trash2Icon } from 'lucide-vue-next'
|
import { FolderIcon, Trash2Icon } from 'lucide-vue-next'
|
||||||
import { onBeforeMount, ref, watch } from 'vue'
|
import { nextTick, onBeforeMount, ref, watch } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
import useConfirm from '@/hooks/useConfirm'
|
import useConfirm from '@/hooks/useConfirm'
|
||||||
@@ -261,7 +261,10 @@ const pasteFormatList = ['markdown', 'markdown-with-link', 'rawurl', 'html', 'bb
|
|||||||
settingsKeys.forEach(key => {
|
settingsKeys.forEach(key => {
|
||||||
watch(
|
watch(
|
||||||
() => form.value[key],
|
() => form.value[key],
|
||||||
newValue => saveConfig({ [`settings.${key}`]: newValue }),
|
newValue => {
|
||||||
|
saveConfig({ [`settings.${key}`]: newValue })
|
||||||
|
},
|
||||||
|
{ flush: 'post' },
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -337,6 +340,7 @@ async function initData() {
|
|||||||
settingsKeys.forEach(key => {
|
settingsKeys.forEach(key => {
|
||||||
form.value[key] = config.settings[key] ?? form.value[key]
|
form.value[key] = config.settings[key] ?? form.value[key]
|
||||||
})
|
})
|
||||||
|
await nextTick() // 确保DOM更新完成
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleDownloadDirClick() {
|
async function handleDownloadDirClick() {
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/* Container */
|
/* Container */
|
||||||
.manage-setting-container {
|
.manage-setting-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
overflow-y: auto;
|
overflow-y: scroll;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 100vh;
|
height: 100%;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
/* Card Base */
|
/* Card Base */
|
||||||
.setting-card {
|
.setting-card {
|
||||||
overflow: hidden;
|
|
||||||
border: 1px solid var(--color-border-secondary);
|
border: 1px solid var(--color-border-secondary);
|
||||||
border-radius: var(--radius-xl);
|
border-radius: var(--radius-xl);
|
||||||
background: var(--color-surface);
|
background: var(--color-surface);
|
||||||
@@ -144,11 +143,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Setting sections with reduced spacing */
|
/* Setting sections with reduced spacing */
|
||||||
.setting-section {
|
|
||||||
display: flex;
|
|
||||||
gap: 0.5rem;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.setting-section + .setting-section {
|
.setting-section + .setting-section {
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
@@ -157,11 +152,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Form Groups */
|
/* Form Groups */
|
||||||
.form-group {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-label-wrapper {
|
.form-label-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -276,9 +266,12 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
|
width: 100%;
|
||||||
|
min-height: fit-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
.radio-option {
|
.radio-option {
|
||||||
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border: 1px solid var(--color-border);
|
border: 1px solid var(--color-border);
|
||||||
@@ -288,6 +281,8 @@
|
|||||||
transition: var(--transition-fast);
|
transition: var(--transition-fast);
|
||||||
gap: 0.75rem;
|
gap: 0.75rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
min-height: 2.5rem;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.radio-option:hover {
|
.radio-option:hover {
|
||||||
@@ -297,8 +292,13 @@
|
|||||||
|
|
||||||
.radio-input {
|
.radio-input {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 1.25rem;
|
||||||
|
height: 1.25rem;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.radio-custom {
|
.radio-custom {
|
||||||
@@ -333,12 +333,6 @@
|
|||||||
transform: translate(-50%, -50%) scale(1);
|
transform: translate(-50%, -50%) scale(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.radio-text {
|
|
||||||
font-size: 0.875rem;
|
|
||||||
color: var(--color-text-primary);
|
|
||||||
line-height: 1.4;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Input Groups */
|
/* Input Groups */
|
||||||
.input-group {
|
.input-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -357,6 +351,8 @@
|
|||||||
padding: 0.75rem 1rem;
|
padding: 0.75rem 1rem;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
width: 10%;
|
||||||
|
min-width: 80px;
|
||||||
color: white;
|
color: white;
|
||||||
background: var(--color-accent);
|
background: var(--color-accent);
|
||||||
transition: var(--transition-fast);
|
transition: var(--transition-fast);
|
||||||
@@ -470,6 +466,35 @@
|
|||||||
background: var(--color-surface-elevated);
|
background: var(--color-surface-elevated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.setting-section {
|
||||||
|
display: flex;
|
||||||
|
gap: 0.5rem;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: fit-content;
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-group {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.5rem;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radio-text {
|
||||||
|
font-size: 0.875rem;
|
||||||
|
color: var(--color-text-primary);
|
||||||
|
line-height: 1.4;
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.setting-card.content-card {
|
||||||
|
min-height: fit-content;
|
||||||
|
contain: layout style;
|
||||||
|
}
|
||||||
|
|
||||||
/* Responsive Design */
|
/* Responsive Design */
|
||||||
@media (width <= 768px) {
|
@media (width <= 768px) {
|
||||||
.manage-setting-container {
|
.manage-setting-container {
|
||||||
|
|||||||
Reference in New Issue
Block a user