mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-06 20:42:57 +08:00
✨ Feature(custom): add advanced animation
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -134,14 +134,19 @@
|
||||
border-radius: 50%;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
|
||||
transition: all 0.3s ease;
|
||||
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
|
||||
box-shadow:
|
||||
0 2px 6px rgb(0 0 0 / 20%),
|
||||
0 1px 2px rgb(0 0 0 / 10%);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
content: '';
|
||||
}
|
||||
|
||||
.switch-input:checked + .switch-slider {
|
||||
background: var(--color-accent);
|
||||
box-shadow:
|
||||
inset 0 1px 3px rgb(0 0 0 / 10%),
|
||||
0 2px 8px rgb(64 158 255 / 30%);
|
||||
}
|
||||
|
||||
.switch-input:checked + .switch-slider::before {
|
||||
|
||||
@@ -253,8 +253,9 @@
|
||||
border-radius: 0.75rem;
|
||||
width: 3rem;
|
||||
height: 1.5rem;
|
||||
background: var(--color-border);
|
||||
background: linear-gradient(180deg, #d0d3d9 0%, #c0c4cc 100%);
|
||||
transition: var(--transition-fast);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
@@ -265,13 +266,16 @@
|
||||
border-radius: 50%;
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
background: white;
|
||||
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
|
||||
box-shadow: var(--shadow-sm);
|
||||
transition: var(--transition-fast);
|
||||
}
|
||||
|
||||
.switch-input:checked + .switch-slider {
|
||||
background: var(--color-accent);
|
||||
box-shadow:
|
||||
inset 0 1px 3px rgb(0 0 0 / 10%),
|
||||
0 2px 8px rgb(64 158 255 / 30%);
|
||||
}
|
||||
|
||||
.switch-input:checked + .switch-slider .switch-button {
|
||||
|
||||
@@ -99,54 +99,56 @@
|
||||
</div>
|
||||
|
||||
<!-- PicBed Switch Dialog -->
|
||||
<div v-if="picBedSwitchDialogVisible" class="dialog-overlay" @click="picBedSwitchDialogVisible = false">
|
||||
<div class="dialog-container" @click.stop>
|
||||
<div class="dialog-header">
|
||||
<h3 class="dialog-title">
|
||||
{{ t('pages.manage.main.switchPicBed') }}
|
||||
</h3>
|
||||
<button class="dialog-close" @click="picBedSwitchDialogVisible = false">
|
||||
<XIcon class="close-icon" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="dialog-content">
|
||||
<div class="choice-cos">
|
||||
<!-- Back to main card -->
|
||||
<div class="picbed-card main-card" @click="switchPicBed('main')">
|
||||
<div class="card-icon">
|
||||
<HomeIcon class="main-icon" />
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="card-title main-title">
|
||||
{{ $t('pages.manage.main.backToHome') }}
|
||||
<transition name="modal">
|
||||
<div v-if="picBedSwitchDialogVisible" class="dialog-overlay" @click="picBedSwitchDialogVisible = false">
|
||||
<div class="dialog-container" @click.stop>
|
||||
<div class="dialog-header">
|
||||
<h3 class="dialog-title">
|
||||
{{ t('pages.manage.main.switchPicBed') }}
|
||||
</h3>
|
||||
<button class="dialog-close" @click="picBedSwitchDialogVisible = false">
|
||||
<XIcon class="close-icon" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="dialog-content">
|
||||
<div class="choice-cos">
|
||||
<!-- Back to main card -->
|
||||
<div class="picbed-card main-card" @click="switchPicBed('main')">
|
||||
<div class="card-icon">
|
||||
<HomeIcon class="main-icon" />
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="card-title main-title">
|
||||
{{ $t('pages.manage.main.backToHome') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- PicBed cards -->
|
||||
<div
|
||||
v-for="(config, alias) in allPicBedConfigure"
|
||||
:key="String(alias)"
|
||||
class="picbed-card"
|
||||
:class="{ active: String(alias) === currentAlias }"
|
||||
@click="switchPicBed(String(alias))"
|
||||
>
|
||||
<div class="card-icon">
|
||||
<img :src="`./assets/${config.picBedName}.webp`" class="picbed-icon" />
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="card-title">
|
||||
{{ config.alias }}
|
||||
<!-- PicBed cards -->
|
||||
<div
|
||||
v-for="(config, alias) in allPicBedConfigure"
|
||||
:key="String(alias)"
|
||||
class="picbed-card"
|
||||
:class="{ active: String(alias) === currentAlias }"
|
||||
@click="switchPicBed(String(alias))"
|
||||
>
|
||||
<div class="card-icon">
|
||||
<img :src="`./assets/${config.picBedName}.webp`" class="picbed-icon" />
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="card-title">
|
||||
{{ config.alias }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="String(alias) === currentAlias" class="check-icon">
|
||||
<CheckIcon />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="String(alias) === currentAlias" class="check-icon">
|
||||
<CheckIcon />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
<!-- New Bucket Drawer -->
|
||||
<div v-if="nweBucketDrawerVisible" class="drawer-overlay" @click="nweBucketDrawerVisible = false">
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
|
||||
.custom-domain-input:focus {
|
||||
border-color: var(--color-accent);
|
||||
background: white;
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 3px var(--color-accent-soft);
|
||||
}
|
||||
@@ -155,7 +156,7 @@
|
||||
padding: 0.5rem;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 500;
|
||||
color: var(--color-accent);
|
||||
color: var(--color-text-primary);
|
||||
background: var(--color-background-secondary);
|
||||
transition: var(--transition-fast);
|
||||
gap: 0.25rem;
|
||||
@@ -209,13 +210,14 @@
|
||||
width: 200px;
|
||||
font-size: 0.875rem;
|
||||
color: var(--color-text-primary);
|
||||
background: var(--color-surface-elevated);
|
||||
background: var(--color-background-tertiary);
|
||||
transition: var(--transition-fast);
|
||||
}
|
||||
|
||||
.search-input:focus {
|
||||
border-color: var(--color-accent);
|
||||
outline: none;
|
||||
background: white;
|
||||
box-shadow: 0 0 0 3px var(--color-accent-soft);
|
||||
}
|
||||
|
||||
@@ -608,7 +610,7 @@
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 0.75rem 1rem;
|
||||
width: 100%;
|
||||
background: var(--color-surface);
|
||||
background: var(--color-background-secondary);
|
||||
transition: var(--transition-medium);
|
||||
gap: 0.75rem;
|
||||
cursor: pointer;
|
||||
@@ -706,7 +708,7 @@
|
||||
/* Ensure dropdown is never clipped */
|
||||
max-height: 300px;
|
||||
white-space: nowrap;
|
||||
background: var(--color-surface);
|
||||
background: var(--color-background-tertiary);
|
||||
box-shadow: var(--shadow-lg);
|
||||
transform-origin: top right;
|
||||
animation: dropdown-appear 0.15s ease-out;
|
||||
@@ -793,7 +795,7 @@
|
||||
border-radius: var(--radius-lg);
|
||||
max-width: 90vw;
|
||||
max-height: 90vh;
|
||||
background: var(--color-surface);
|
||||
background: var(--color-background-tertiary);
|
||||
box-shadow: var(--shadow-xl);
|
||||
flex-direction: column;
|
||||
}
|
||||
@@ -869,12 +871,13 @@
|
||||
width: 100%;
|
||||
font-size: 0.875rem;
|
||||
color: var(--color-text-primary);
|
||||
background: var(--color-surface-elevated);
|
||||
background: var(--color-background-tertiary);
|
||||
transition: var(--transition-fast);
|
||||
}
|
||||
|
||||
.form-input:focus {
|
||||
border-color: var(--color-accent);
|
||||
background: white;
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 3px var(--color-accent-soft);
|
||||
}
|
||||
@@ -926,8 +929,9 @@
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: 24px;
|
||||
background-color: var(--color-border);
|
||||
transition: 0.3s;
|
||||
background: linear-gradient(180deg, #d0d3d9 0%, #c0c4cc 100%);
|
||||
box-shadow: inset 0 1px 3px rgb(0 0 0 / 15%);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -938,13 +942,19 @@
|
||||
border-radius: 50%;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-color: white;
|
||||
transition: 0.3s;
|
||||
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
|
||||
box-shadow:
|
||||
0 2px 6px rgb(0 0 0 / 20%),
|
||||
0 1px 2px rgb(0 0 0 / 10%);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
content: "";
|
||||
}
|
||||
|
||||
input:checked + .switch-slider {
|
||||
background-color: var(--color-accent);
|
||||
background: var(--color-accent);
|
||||
box-shadow:
|
||||
inset 0 1px 3px rgb(0 0 0 / 10%),
|
||||
0 2px 8px rgb(64 158 255 / 30%);
|
||||
}
|
||||
|
||||
input:checked + .switch-slider::before {
|
||||
@@ -971,7 +981,7 @@ input:checked + .switch-slider::before {
|
||||
width: 60%;
|
||||
max-width: 800px;
|
||||
height: 100%;
|
||||
background: var(--color-background-secondary);
|
||||
background: var(--color-background-tertiary);
|
||||
box-shadow: var(--shadow-xl);
|
||||
transition: transform 0.3s ease-out;
|
||||
flex-direction: column;
|
||||
@@ -1010,7 +1020,7 @@ input:checked + .switch-slider::before {
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 3rem 2rem;
|
||||
text-align: center;
|
||||
background: var(--color-surface-elevated);
|
||||
background: var(--color-surface);
|
||||
transition: var(--transition-medium);
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -1018,7 +1028,7 @@ input:checked + .switch-slider::before {
|
||||
.upload-area:hover,
|
||||
.upload-area.dragover {
|
||||
border-color: var(--color-accent);
|
||||
background: var(--color-accent-soft);
|
||||
background: var(--color-surface-elevated);
|
||||
}
|
||||
|
||||
.upload-area-text {
|
||||
@@ -1154,7 +1164,7 @@ input:checked + .switch-slider::before {
|
||||
font-size: 0.75rem;
|
||||
text-align: center;
|
||||
color: var(--color-text-primary);
|
||||
background: var(--color-surface-elevated);
|
||||
background: var(--color-background-tertiary);
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
box-shadow: var(--shadow-md);
|
||||
@@ -1456,7 +1466,7 @@ input:checked + .switch-slider::before {
|
||||
padding: 0.75rem;
|
||||
border: 1px solid var(--color-border-secondary);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--color-surface-elevated);
|
||||
background: var(--color-background-secondary);
|
||||
transition: var(--transition-fast);
|
||||
}
|
||||
|
||||
|
||||
@@ -436,7 +436,7 @@
|
||||
border-radius: 50%;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
color: var(--color-text-tertiary);
|
||||
color: var(--color-text-primary);
|
||||
background: var(--color-background-secondary);
|
||||
transition: var(--transition-fast);
|
||||
cursor: help;
|
||||
@@ -455,7 +455,7 @@
|
||||
width: 100%;
|
||||
font-size: 0.875rem;
|
||||
color: var(--color-text-primary);
|
||||
background: var(--color-background-primary);
|
||||
background: var(--color-background-tertiary);
|
||||
transition: var(--transition-fast);
|
||||
}
|
||||
|
||||
@@ -489,9 +489,10 @@
|
||||
.switch-slider {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: 24px;
|
||||
background-color: var(--color-border);
|
||||
transition: var(--transition-fast);
|
||||
border-radius: 14px;
|
||||
background: linear-gradient(180deg, #d0d3d9 0%, #c0c4cc 100%);
|
||||
box-shadow: inset 0 1px 3px rgb(0 0 0 / 15%);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -502,13 +503,19 @@
|
||||
border-radius: 50%;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-color: white;
|
||||
transition: var(--transition-fast);
|
||||
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
|
||||
box-shadow:
|
||||
0 2px 6px rgb(0 0 0 / 20%),
|
||||
0 1px 2px rgb(0 0 0 / 10%);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
content: "";
|
||||
}
|
||||
|
||||
input:checked + .switch-slider {
|
||||
background-color: var(--color-success);
|
||||
background: var(--color-accent);
|
||||
box-shadow:
|
||||
inset 0 1px 3px rgb(0 0 0 / 10%),
|
||||
0 2px 8px rgb(64 158 255 / 30%);
|
||||
}
|
||||
|
||||
input:checked + .switch-slider::before {
|
||||
@@ -567,13 +574,13 @@ input:checked + .switch-slider::before {
|
||||
font-size: 0.875rem;
|
||||
text-align: left;
|
||||
color: var(--color-text-primary);
|
||||
background: none;
|
||||
background: var(--color-background-tertiary);
|
||||
transition: var(--transition-fast);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dropdown-item:hover {
|
||||
background: var(--color-background-secondary);
|
||||
background: var(--color-accent);
|
||||
}
|
||||
|
||||
/* Config Table Section */
|
||||
|
||||
@@ -333,7 +333,7 @@ html, body {
|
||||
width: 85vw;
|
||||
max-width: 90vw;
|
||||
max-height: 85vh;
|
||||
background: var(--color-background-secondary);
|
||||
background: var(--color-background-tertiary);
|
||||
box-shadow: var(--shadow-xl);
|
||||
scrollbar-width: none;
|
||||
}
|
||||
@@ -480,10 +480,12 @@ html, body {
|
||||
|
||||
.drawer-container {
|
||||
overflow-y: auto;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-2xl);
|
||||
width: 400px;
|
||||
max-width: 90vw;
|
||||
height: 100vh;
|
||||
background: var(--color-background-secondary);
|
||||
height: calc(100vh - 32px);
|
||||
background: var(--color-background-tertiary);
|
||||
box-shadow: var(--shadow-xl);
|
||||
}
|
||||
|
||||
@@ -570,14 +572,15 @@ html, body {
|
||||
padding: 0.75rem;
|
||||
width: 100%;
|
||||
font-size: 0.875rem;
|
||||
color: var(--color-text-primary);
|
||||
background: var(--color-surface-elevated);
|
||||
color: var(--color-text-secondary);
|
||||
background: var(--color-surface);
|
||||
transition: var(--transition-fast);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.form-input:focus {
|
||||
border-color: var(--color-accent);
|
||||
background: white;
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 2px rgb(0 122 255 / 20%);
|
||||
}
|
||||
@@ -614,7 +617,7 @@ html, body {
|
||||
width: 100%;
|
||||
font-size: 0.875rem;
|
||||
color: var(--color-text-primary);
|
||||
background: var(--color-surface-elevated);
|
||||
background: var(--color-background-tertiary);
|
||||
transition: var(--transition-fast);
|
||||
appearance: none;
|
||||
cursor: pointer;
|
||||
|
||||
@@ -206,7 +206,6 @@ html, body, #app
|
||||
background: transparent
|
||||
#mini-page
|
||||
background: #409EFF;
|
||||
border-radius: 32px;
|
||||
overflow: hidden;
|
||||
color #FFF
|
||||
height 100vh
|
||||
|
||||
@@ -2181,7 +2181,11 @@ async function loadThemes() {
|
||||
IRPCActionType.THEME_RESOLVE_THEMES,
|
||||
)
|
||||
if (themes && themes.length > 0) {
|
||||
themeList.value = themes
|
||||
themeList.value = themes.sort((a, b) => {
|
||||
if (a.key === 'default.css') return -1
|
||||
if (b.key === 'default.css') return 1
|
||||
return a.label.localeCompare(b.label)
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to load themes:', error)
|
||||
@@ -2235,13 +2239,13 @@ async function handleThemeChange(theme: string) {
|
||||
|
||||
async function initData() {
|
||||
const config = (await getConfig<IConfig>()) || ({} as IConfig)
|
||||
isDisableGPU.value = (await getConfig<boolean>(configPaths.settings.isDisableGPU)) || false
|
||||
const settings = config.settings || {}
|
||||
const picBed = config.picBed
|
||||
isDisableGPU.value = settings.isDisableGPU || false
|
||||
showPicBedList.value = picBedG.value.filter(item => item.visible).map(item => item.name)
|
||||
galleryPicBedFilterList.value = settings.galleryPicBedFilter || []
|
||||
currentTheme.value = settings.theme || 'default.css'
|
||||
await loadThemes()
|
||||
loadThemes()
|
||||
formKeys.forEach(key => {
|
||||
;(formOfSetting.value as any)[key] = settings[key] ?? formOfSetting.value[key]
|
||||
})
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
<!-- Config Modal -->
|
||||
<transition name="modal">
|
||||
<div v-if="dialogVisible" class="modal-overlay" @click="dialogVisible = false">
|
||||
<div v-if="dialogVisible" class="modal-overlay" :class="advancedAnimation" @click="dialogVisible = false">
|
||||
<div class="modal-container" @click.stop>
|
||||
<div class="modal-header">
|
||||
<h2 class="modal-title">
|
||||
@@ -248,6 +248,7 @@ const dialogVisible = ref(false)
|
||||
const pluginNameList = ref<string[]>([])
|
||||
const loading = ref(true)
|
||||
const needReload = ref(false)
|
||||
const enableAdvancedAnimation = ref(false)
|
||||
const latestVersionMap = reactive<Record<string, string>>({})
|
||||
const $configForm = useTemplateRef('$configForm')
|
||||
const strictSearch = useStorage('plugin-strict-search', true)
|
||||
@@ -257,6 +258,14 @@ function setSrc(e: Event) {
|
||||
target.src = import.meta.env.BASE_URL + 'roundLogo.png'
|
||||
}
|
||||
|
||||
async function initConf() {
|
||||
enableAdvancedAnimation.value = (await getConfig<boolean>(configPaths.settings.isCustomMiniIcon)) || false
|
||||
}
|
||||
|
||||
const advancedAnimation = computed(() => ({
|
||||
advancedAnimation: enableAdvancedAnimation.value,
|
||||
}))
|
||||
|
||||
const npmSearchText = computed(() => {
|
||||
return searchText.value.match('picgo-plugin-')
|
||||
? searchText.value
|
||||
@@ -558,6 +567,7 @@ onBeforeMount(async () => {
|
||||
window.electron.ipcRendererOn(PICGO_TOGGLE_PLUGIN, picgoTogglePluginHandler)
|
||||
getPluginList()
|
||||
getSearchResult = debounce(_getSearchResult, 50)
|
||||
initConf()
|
||||
needReload.value = (await getConfig<boolean>(configPaths.needReload)) || false
|
||||
})
|
||||
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
@import url('./common/advancedAnimation.css');
|
||||
|
||||
/* Global scrolling behavior */
|
||||
html, body {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.header-icon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
/* Custom Scrollbar Styles */
|
||||
.gallery-content::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
@@ -150,8 +158,9 @@ html, body {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: 24px;
|
||||
background-color: var(--color-border);
|
||||
transition: 0.3s;
|
||||
background: linear-gradient(180deg, #d0d3d9 0%, #c0c4cc 100%);
|
||||
box-shadow: inset 0 1px 3px rgb(0 0 0 / 15%);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -162,13 +171,19 @@ html, body {
|
||||
border-radius: 50%;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background-color: white;
|
||||
transition: 0.3s;
|
||||
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
|
||||
box-shadow:
|
||||
0 2px 6px rgb(0 0 0 / 20%),
|
||||
0 1px 2px rgb(0 0 0 / 10%);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
content: "";
|
||||
}
|
||||
|
||||
input:checked + .switch-slider {
|
||||
background-color: var(--color-accent);
|
||||
background: var(--color-accent);
|
||||
box-shadow:
|
||||
inset 0 1px 3px rgb(0 0 0 / 10%),
|
||||
0 2px 8px rgb(64 158 255 / 30%);
|
||||
}
|
||||
|
||||
input:checked + .switch-slider::before {
|
||||
@@ -1507,13 +1522,6 @@ input:checked + .switch-slider::before {
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
.advancedAnimation {
|
||||
backdrop-filter: blur(5px) saturate(180%);
|
||||
background: rgb(255 255 255 / 20%);
|
||||
border: 1px solid rgb(255 255 255 / 30%);
|
||||
box-shadow: 0 8px 32px rgb(0 0 0 / 10%);
|
||||
}
|
||||
|
||||
.placeholder-item:hover {
|
||||
background: rgb(var(--color-accent-rgb), 0.08);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
@import url('./common/modal.css');
|
||||
@import url('./common/advancedAnimation.css');
|
||||
|
||||
/* Page Container */
|
||||
.picbeds-page {
|
||||
position: relative;
|
||||
@@ -552,15 +555,6 @@
|
||||
left: 0;
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
.modal-overlay {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.modal-header,
|
||||
.modal-content {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (width >= 1024px) {
|
||||
@@ -575,88 +569,3 @@
|
||||
outline: 1px solid var(--color-accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
|
||||
/* Modal */
|
||||
.modal-overlay {
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
overflow-y: auto;
|
||||
padding: 2rem;
|
||||
background: rgb(0 0 0 / 50%);
|
||||
inset: 0;
|
||||
}
|
||||
|
||||
.modal-container {
|
||||
overflow: hidden;
|
||||
margin: auto;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-2xl);
|
||||
width: 90vw;
|
||||
max-width: 90vw;
|
||||
height: 85vh;
|
||||
max-height: 85vh;
|
||||
background: var(--color-surface);
|
||||
box-shadow: var(--shadow-xl);
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid var(--color-border-secondary);
|
||||
padding: 0.95rem 1rem;
|
||||
}
|
||||
|
||||
.modal-title {
|
||||
margin: 0;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.modal-subtitle {
|
||||
margin: 0;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.modal-close {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 50%;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
color: var(--color-text-secondary);
|
||||
background: var(--color-surface-elevated);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.modal-close:hover {
|
||||
border-color: var(--color-danger);
|
||||
color: var(--color-danger);
|
||||
background: var(--color-surface);
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
overflow-y: auto;
|
||||
padding: 0.2rem;
|
||||
max-height: calc(90vh - 120px);
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
}
|
||||
|
||||
.modal-content::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.modal-close:focus-visible {
|
||||
outline: 2px solid var(--color-accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
@import url('./common/advancedAnimation.css');
|
||||
/* stylelint-disable selector-pseudo-class-no-unknown */
|
||||
.piclist-settings {
|
||||
overflow-y: auto;
|
||||
@@ -187,8 +188,9 @@
|
||||
border-radius: 12px;
|
||||
width: 44px;
|
||||
height: 24px;
|
||||
background: var(--color-border);
|
||||
transition: background-color 0.3s;
|
||||
background: linear-gradient(180deg, #d0d3d9 0%, #c0c4cc 100%);
|
||||
box-shadow: inset 0 1px 3px rgb(0 0 0 / 15%);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
@@ -199,13 +201,19 @@
|
||||
border-radius: 50%;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: white;
|
||||
transition: transform 0.3s;
|
||||
background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
|
||||
box-shadow:
|
||||
0 2px 6px rgb(0 0 0 / 20%),
|
||||
0 1px 2px rgb(0 0 0 / 10%);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
content: '';
|
||||
}
|
||||
|
||||
.switch-input:checked + .switch-slider {
|
||||
background: var(--color-accent);
|
||||
box-shadow:
|
||||
inset 0 1px 3px rgb(0 0 0 / 10%),
|
||||
0 2px 8px rgb(64 158 255 / 30%);
|
||||
}
|
||||
|
||||
.switch-input:checked + .switch-slider::before {
|
||||
@@ -2667,10 +2675,3 @@ small {
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.advancedAnimation {
|
||||
backdrop-filter: blur(5px) saturate(180%);
|
||||
background: rgb(255 255 255 / 20%);
|
||||
border: 1px solid rgb(255 255 255 / 30%);
|
||||
box-shadow: 0 8px 32px rgb(0 0 0 / 10%);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@import url('./common/advancedAnimation.css');
|
||||
|
||||
/* Global scrolling behavior */
|
||||
html, body {
|
||||
overflow-x: hidden;
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
@import url('./common/modal.css');
|
||||
@import url('./common/advancedAnimation.css');
|
||||
|
||||
/* Global scrolling behavior */
|
||||
html, body {
|
||||
overflow-x: hidden;
|
||||
@@ -692,111 +695,6 @@ html, body {
|
||||
border-bottom-right-radius: calc(var(--radius-md) - 1px);
|
||||
}
|
||||
|
||||
/* Modal - Base Styles (Used by ImageProcess Dialog) */
|
||||
.modal-overlay {
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
overflow-y: auto;
|
||||
padding: 2rem;
|
||||
background: rgb(0 0 0 / 50%);
|
||||
inset: 0;
|
||||
animation: fade-in 0.2s ease-out;
|
||||
}
|
||||
|
||||
@keyframes fade-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-container {
|
||||
overflow: hidden;
|
||||
margin: auto;
|
||||
border: 1px solid var(--color-border-secondary);
|
||||
border-radius: var(--radius-2xl);
|
||||
width: 90vw;
|
||||
max-width: 90vw;
|
||||
height: 85vh;
|
||||
max-height: 85vh;
|
||||
background: var(--color-background-tertiary);
|
||||
box-shadow: var(--shadow-xl);
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid var(--color-border-secondary);
|
||||
padding: 1rem 1.25rem;
|
||||
background: var(--color-background-secondary);
|
||||
}
|
||||
|
||||
.modal-title {
|
||||
margin: 0;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.modal-subtitle {
|
||||
margin: 0.25rem 0 0;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
.modal-close {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 50%;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
color: var(--color-text-secondary);
|
||||
background: var(--color-surface-elevated);
|
||||
cursor: pointer;
|
||||
transition: all var(--transition-fast);
|
||||
}
|
||||
|
||||
.modal-close:hover {
|
||||
border-color: var(--color-danger);
|
||||
color: white;
|
||||
background: var(--color-danger);
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
overflow-y: auto;
|
||||
max-height: calc(90vh - 90px);
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
}
|
||||
|
||||
.modal-content::-webkit-scrollbar {
|
||||
width: 0.5rem;
|
||||
}
|
||||
|
||||
.modal-content::-webkit-scrollbar-track {
|
||||
background: var(--color-surface);
|
||||
}
|
||||
|
||||
.modal-content::-webkit-scrollbar-thumb {
|
||||
background: var(--color-border-secondary);
|
||||
border-radius: var(--radius-full);
|
||||
}
|
||||
|
||||
.modal-content::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--color-text-tertiary);
|
||||
}
|
||||
|
||||
/* Transitions */
|
||||
.progress-enter-active,
|
||||
.progress-leave-active {
|
||||
@@ -860,15 +758,6 @@ html, body {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
|
||||
}
|
||||
|
||||
.modal-overlay {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.modal-header,
|
||||
.modal-content {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (width <= 480px) {
|
||||
@@ -931,8 +820,7 @@ html, body {
|
||||
.action-button:focus-visible,
|
||||
.quick-action-button:focus-visible,
|
||||
.format-button:focus-visible,
|
||||
.toggle-button:focus-visible,
|
||||
.modal-close:focus-visible {
|
||||
.toggle-button:focus-visible {
|
||||
outline: 2px solid var(--color-accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
@@ -2363,10 +2251,3 @@ html, body {
|
||||
.icon-btn:hover {
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.advancedAnimation {
|
||||
backdrop-filter: blur(5px) saturate(180%);
|
||||
background: rgb(255 255 255 / 20%);
|
||||
border: 1px solid rgb(255 255 255 / 30%);
|
||||
box-shadow: 0 8px 32px rgb(0 0 0 / 10%);
|
||||
}
|
||||
|
||||
6
src/renderer/pages/css/common/advancedAnimation.css
Normal file
6
src/renderer/pages/css/common/advancedAnimation.css
Normal file
@@ -0,0 +1,6 @@
|
||||
.advancedAnimation {
|
||||
backdrop-filter: blur(5px) saturate(180%);
|
||||
background: rgb(255 255 255 / 20%);
|
||||
border: 1px solid rgb(255 255 255 / 30%);
|
||||
box-shadow: 0 8px 32px rgb(0 0 0 / 10%);
|
||||
}
|
||||
111
src/renderer/pages/css/common/modal.css
Normal file
111
src/renderer/pages/css/common/modal.css
Normal file
@@ -0,0 +1,111 @@
|
||||
|
||||
|
||||
/* Modal - Base Styles (Used by ImageProcess Dialog) */
|
||||
.modal-overlay {
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
overflow-y: auto;
|
||||
padding: 2rem;
|
||||
background: rgb(0 0 0 / 50%);
|
||||
inset: 0;
|
||||
}
|
||||
|
||||
.modal-container {
|
||||
overflow: hidden;
|
||||
margin: auto;
|
||||
border: 1px solid var(--color-border-secondary);
|
||||
border-radius: var(--radius-2xl);
|
||||
width: 90vw;
|
||||
max-width: 90vw;
|
||||
height: 85vh;
|
||||
max-height: 85vh;
|
||||
background: var(--color-background-tertiary);
|
||||
box-shadow: var(--shadow-xl);
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid var(--color-border-secondary);
|
||||
padding: 1rem 1.25rem;
|
||||
background: var(--color-background-secondary);
|
||||
}
|
||||
|
||||
.modal-title {
|
||||
margin: 0;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.modal-subtitle {
|
||||
margin: 0.25rem 0 0;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
.modal-close {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 50%;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
color: var(--color-text-secondary);
|
||||
background: var(--color-surface-elevated);
|
||||
cursor: pointer;
|
||||
transition: all var(--transition-fast);
|
||||
}
|
||||
|
||||
.modal-close:hover {
|
||||
border-color: var(--color-danger);
|
||||
color: white;
|
||||
background: var(--color-danger);
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
overflow-y: auto;
|
||||
max-height: calc(90vh - 90px);
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
}
|
||||
|
||||
.modal-content::-webkit-scrollbar {
|
||||
width: 0.5rem;
|
||||
}
|
||||
|
||||
.modal-content::-webkit-scrollbar-track {
|
||||
background: var(--color-surface);
|
||||
}
|
||||
|
||||
.modal-content::-webkit-scrollbar-thumb {
|
||||
background: var(--color-border-secondary);
|
||||
border-radius: var(--radius-full);
|
||||
}
|
||||
|
||||
.modal-content::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--color-text-tertiary);
|
||||
}
|
||||
|
||||
@media (width <= 768px) {
|
||||
.modal-overlay {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.modal-header,
|
||||
.modal-content {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-close:focus-visible {
|
||||
outline: 2px solid var(--color-accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
@@ -119,7 +119,7 @@
|
||||
</Transition>
|
||||
|
||||
<transition name="modal">
|
||||
<div v-if="imageProcessDialogVisible" class="modal-overlay" @click.stop>
|
||||
<div v-if="imageProcessDialogVisible" class="modal-overlay" :class="advancedAnimation" @click.stop>
|
||||
<div class="modal-container" @click.stop>
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">
|
||||
@@ -157,7 +157,7 @@ import {
|
||||
XIcon,
|
||||
} from 'lucide-vue-next'
|
||||
import { v4 as uuid } from 'uuid'
|
||||
import { onBeforeMount, ref, useTemplateRef } from 'vue'
|
||||
import { computed, onBeforeMount, ref, useTemplateRef } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
|
||||
@@ -180,6 +180,7 @@ const picBedName = ref('')
|
||||
const loading = ref(false)
|
||||
const dropdownVisible = ref(false)
|
||||
const imageProcessDialogVisible = ref(false)
|
||||
const enableAdvancedAnimation = ref(false)
|
||||
const $route = useRoute()
|
||||
const $router = useRouter()
|
||||
const $configForm = useTemplateRef('$configForm')
|
||||
@@ -188,9 +189,18 @@ const currentPicbedType = $route.params.type as string
|
||||
|
||||
type.value = $route.params.type as string
|
||||
|
||||
async function initConf() {
|
||||
enableAdvancedAnimation.value = (await getConfig<boolean>(configPaths.settings.isCustomMiniIcon)) || false
|
||||
}
|
||||
|
||||
const advancedAnimation = computed(() => ({
|
||||
advancedAnimation: enableAdvancedAnimation.value,
|
||||
}))
|
||||
|
||||
onBeforeMount(async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
initConf()
|
||||
await getPicBeds()
|
||||
await getPicBedConfigList()
|
||||
} finally {
|
||||
@@ -331,4 +341,4 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped src="./Picbeds.css"></style>
|
||||
<style scoped src="../css/Picbeds.css"></style>
|
||||
|
||||
Reference in New Issue
Block a user