diff --git a/src/views/manage/FileManageView.vue b/src/views/manage/FileManageView.vue index fb76d6c..4a74398 100644 --- a/src/views/manage/FileManageView.vue +++ b/src/views/manage/FileManageView.vue @@ -1409,16 +1409,20 @@
-

{{ item.label }}

-

- {{ item.value }} -

+

{{ item.label }}

+

+ {{ item.value }} +

+
@@ -2574,6 +2578,22 @@ onUnmounted(() => { background-color 300ms ease, border-color 300ms ease !important; } +.fcb-storage-hitbox:hover .fcb-storage-card { + transform: translateY(-2px) !important; + background: #f0f4f8 !important; + box-shadow: var(--fcb-card-shadow-hover) !important; +} + +.dark .fcb-storage-hitbox:hover .fcb-storage-card { + background: #2f414a !important; +} + +@media (prefers-reduced-motion: reduce), (hover: none) { + .fcb-storage-hitbox:hover .fcb-storage-card { + transform: none !important; + } +} + @media (prefers-reduced-motion: reduce) { .fcb-storage-card { transition-duration: 0.01ms !important; } } diff --git a/tests/uiSystem.test.mjs b/tests/uiSystem.test.mjs index 4ea124d..ff8a503 100644 --- a/tests/uiSystem.test.mjs +++ b/tests/uiSystem.test.mjs @@ -119,3 +119,12 @@ test('storage detail cards animate visual properties without transitioning grid assert.ok(!/\ball\b/.test(transition)) for(const property of ['transform','box-shadow','background-color','border-color'])assert.ok(transition.includes(property)) }) + +test('storage card hover uses a stationary wrapper and disables movement for touch or reduced motion', async () => { + const {descriptor}=parse(readFileSync('src/views/manage/FileManageView.vue','utf8')) + const content=descriptor.template.content + assert.match(content,/v-for="item in detailStorageItems"[\s\S]*?class="fcb-storage-hitbox"[\s\S]*?s.content).join('\n') + assert.match(css,/\.fcb-storage-hitbox:hover\s+\.fcb-storage-card[\s\S]*?translateY\(-2px\)/) + assert.match(css,/@media \(prefers-reduced-motion: reduce\), \(hover: none\)/) +})