Добавил анимацию как в MacOS

This commit is contained in:
Ilia Miheev
2026-06-06 00:52:14 +03:00
parent 7eb973ee99
commit 9f599a564e
2 changed files with 37 additions and 18 deletions
+2 -7
View File
@@ -1,5 +1,3 @@
<script setup>
</script>
<template> <template>
<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> <svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
<title/> <title/>
@@ -17,10 +15,7 @@
</template> </template>
<style scoped> <style scoped>
.cls-1{ .cls-1 {
fill:none; fill: none;
}
#Layer_2 {
color: black;
} }
</style> </style>
+31 -7
View File
@@ -351,25 +351,33 @@ function onContextMenu(e, item) {
<div class="actions"> <div class="actions">
<n-tooltip trigger="hover"> <n-tooltip trigger="hover">
<template #trigger> <template #trigger>
<span class="toolbar-item">
<Save @click="saveResult" /> <Save @click="saveResult" />
</span>
</template> </template>
Сохранить Сохранить
</n-tooltip> </n-tooltip>
<n-tooltip trigger="hover"> <n-tooltip trigger="hover">
<template #trigger> <template #trigger>
<span class="toolbar-item">
<Trash @click="cleanResult" /> <Trash @click="cleanResult" />
</span>
</template> </template>
Удалить Удалить
</n-tooltip> </n-tooltip>
<n-tooltip trigger="hover"> <n-tooltip trigger="hover">
<template #trigger> <template #trigger>
<span class="toolbar-item">
<Back @click="cancel" /> <Back @click="cancel" />
</span>
</template> </template>
Отменить Отменить
</n-tooltip> </n-tooltip>
<n-tooltip trigger="hover"> <n-tooltip trigger="hover">
<template #trigger> <template #trigger>
<span class="toolbar-item">
<Preview @click="openPreview" /> <Preview @click="openPreview" />
</span>
</template> </template>
Превью Превью
</n-tooltip> </n-tooltip>
@@ -458,6 +466,7 @@ function onContextMenu(e, item) {
position: fixed; position: fixed;
bottom: 10px; bottom: 10px;
display: flex; display: flex;
align-items: flex-end;
gap: 10px; gap: 10px;
padding: 10px 20px; padding: 10px 20px;
border-radius: 10px; border-radius: 10px;
@@ -470,18 +479,33 @@ function onContextMenu(e, item) {
border: 2px solid rgba(255, 255, 255, 0.18); border: 2px solid rgba(255, 255, 255, 0.18);
} }
.actions svg { .toolbar-item {
width: var(--sizeActions); display: inline-flex;
height: var(--sizeActions); align-items: center;
transition: color 0.4s; justify-content: center;
cursor: pointer;
} }
.actions svg:hover { .toolbar-item svg {
width: var(--sizeActions);
height: var(--sizeActions);
transition:
transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
color 0.25s ease;
transform-origin: center bottom;
will-change: transform;
}
.toolbar-item:hover svg {
transform: scale(1.22) translateY(-6px);
color: rgba(20, 104, 140, 0.89); color: rgba(20, 104, 140, 0.89);
} }
.actions svg:active { .toolbar-item:active svg {
transition: color 0s; transition:
transform 0.12s ease,
color 0s;
transform: scale(1.08) translateY(-2px);
color: #23aae3e2; color: #23aae3e2;
} }