Feature(custom): prevent click action if favorite picbed is already current default picbed

This commit is contained in:
Kuingsmile
2026-01-12 21:30:00 +08:00
parent e69ebd95ac
commit 163d4eeccb
2 changed files with 5 additions and 1 deletions

View File

@@ -97,7 +97,7 @@
{{ t('pages.upload.dragFileToHere') }} {{ t('pages.upload.dragFileToHere') }}
</h3> </h3>
<p class="upload-subtitle"> <p class="upload-subtitle">
{{ t('pages.upload.clickToUpload') }} {{ ' ' }}
</p> </p>
<div class="upload-formats"> <div class="upload-formats">
<span class="format-label">{{ t('pages.upload.uploadHint') }}</span> <span class="format-label">{{ t('pages.upload.uploadHint') }}</span>
@@ -971,6 +971,9 @@ function handleBadgeClick(picbedType: IFavoritePicbedItem) {
if (longPressedBadge.value === picbedType.id) { if (longPressedBadge.value === picbedType.id) {
return return
} }
if (isCurrentPicbed(picbedType)) {
return
}
switchToPicbed(picbedType) switchToPicbed(picbedType)
} }

View File

@@ -164,6 +164,7 @@ html, body {
.picbed-badge.is-active { .picbed-badge.is-active {
border-color: var(--color-accent); border-color: var(--color-accent);
border-width: 0.1rem;
font-weight: 600; font-weight: 600;
} }