fix: 统一图库图标间距与提示

统一四个图库操作图标的间距,为布局按钮补充悬浮说明,并在移动端禁用全部 Popover。
This commit is contained in:
GouJ
2026-09-08 14:16:48 +08:00
committed by GitHub
parent e912eada04
commit 3c6b1600b4
4 changed files with 124 additions and 95 deletions
+8 -1
View File
@@ -186,9 +186,13 @@ describe('全站平面主题', () => {
const source = readFileSync('src/features/subject-images/SubjectImagesPage.vue', 'utf8')
expect(source).not.toContain('class="toolbar-summary"')
expect(source).toMatch(/<WorkspaceTools\s+triggerless/)
expect(source.match(/<NPopover trigger="hover" placement="top">/g)).toHaveLength(2)
expect(source.match(/<NPopover trigger="hover" placement="top" :disabled="isMobile">/g)).toHaveLength(4)
expect(source).toMatch(/aria-label="网格布局"/)
expect(source).toMatch(/aria-label="瀑布流布局"/)
expect(source).toMatch(/aria-label="刷新图库"/)
expect(source).toMatch(/data-workspace-tools\s+aria-label="批量生图"/)
expect(source).not.toContain('title="网格布局"')
expect(source).not.toContain('title="瀑布流布局"')
expect(css).toMatch(
/\.form-image-filter-region\s*\{[^}]*padding:\s*12px;[^}]*--app-field:\s*var\(--app-surface\);[^}]*--app-field-hover:\s*var\(--app-surface\);[^}]*background:\s*color-mix\(in srgb, var\(--app-subtle\) 96%, white\);/
)
@@ -209,6 +213,9 @@ describe('全站平面主题', () => {
expect(css).toMatch(
/\.gallery-layout-switch \.layout-option-button:not\(\.layout-option-active\)\s*\{[^}]*background:\s*var\(--app-control-hover\);/
)
expect(css).toMatch(
/\.gallery-layout-switch\s*\{[^}]*display:\s*flex;[^}]*align-items:\s*center;[^}]*gap:\s*8px;/
)
})
it('单图标按钮以当前控件高度为边长,尺寸与内容按钮互不影响', () => {