Добавил анимацию как в MacOS
This commit is contained in:
@@ -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/>
|
||||||
@@ -20,7 +18,4 @@
|
|||||||
.cls-1 {
|
.cls-1 {
|
||||||
fill: none;
|
fill: none;
|
||||||
}
|
}
|
||||||
#Layer_2 {
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user