summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-05-07 13:41:51 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-05-07 13:41:51 +0900
commit86996d956328de2f1d60b4dfddc363691df64193 (patch)
tree82282531a5f800a9558af8d451e73fb6e4b5680f /packages/frontend/src/components
parent[skip ci] Update CHANGELOG.md (prepend template) (diff)
downloadmisskey-86996d956328de2f1d60b4dfddc363691df64193.tar.gz
misskey-86996d956328de2f1d60b4dfddc363691df64193.tar.bz2
misskey-86996d956328de2f1d60b4dfddc363691df64193.zip
🎨
Diffstat (limited to 'packages/frontend/src/components')
-rw-r--r--packages/frontend/src/components/global/MkSystemIcon.vue67
1 files changed, 47 insertions, 20 deletions
diff --git a/packages/frontend/src/components/global/MkSystemIcon.vue b/packages/frontend/src/components/global/MkSystemIcon.vue
index 3285d5a940..66592da9c8 100644
--- a/packages/frontend/src/components/global/MkSystemIcon.vue
+++ b/packages/frontend/src/components/global/MkSystemIcon.vue
@@ -5,28 +5,28 @@ SPDX-License-Identifier: AGPL-3.0-only
<template>
<svg v-if="type === 'info'" :class="[$style.icon, $style.info]" viewBox="0 0 160 160">
- <path d="M80,108L80,72" style="--l:37;" :class="[$style.line, $style.anim]"/>
- <path d="M80,52L80,52" :class="[$style.line, $style.fade]"/>
- <circle cx="80" cy="80" r="56" style="--l:350;" :class="[$style.line, $style.anim]"/>
+ <path d="M80,108L80,72" style="--l:37;" :class="[$style.line, $style.animLine]"/>
+ <path d="M80,52L80,52" :class="[$style.line, $style.animFade]"/>
+ <circle cx="80" cy="80" r="56" style="--l:350;" :class="[$style.line, $style.animCircle]"/>
</svg>
<svg v-else-if="type === 'question'" :class="[$style.icon, $style.question]" viewBox="0 0 160 160">
- <path d="M80,92L79.991,84C88.799,83.98 96,76.962 96,68C96,59.038 88.953,52 79.991,52C71.03,52 64,59.038 64,68" style="--l:85;" :class="[$style.line, $style.anim]"/>
- <path d="M80,108L80,108" :class="[$style.line, $style.fade]"/>
- <circle cx="80" cy="80" r="56" style="--l:350;" :class="[$style.line, $style.anim]"/>
+ <path d="M80,92L79.991,84C88.799,83.98 96,76.962 96,68C96,59.038 88.953,52 79.991,52C71.03,52 64,59.038 64,68" style="--l:85;" :class="[$style.line, $style.animLine]"/>
+ <path d="M80,108L80,108" :class="[$style.line, $style.animFade]"/>
+ <circle cx="80" cy="80" r="56" style="--l:350;" :class="[$style.line, $style.animCircle]"/>
</svg>
<svg v-else-if="type === 'success'" :class="[$style.icon, $style.success]" viewBox="0 0 160 160">
- <path d="M62,80L74,92L98,68" style="--l:50;" :class="[$style.line, $style.anim]"/>
- <circle cx="80" cy="80" r="56" style="--l:350;" :class="[$style.line, $style.anim]"/>
+ <path d="M62,80L74,92L98,68" style="--l:50;" :class="[$style.line, $style.animLine]"/>
+ <circle cx="80" cy="80" r="56" style="--l:350;" :class="[$style.line, $style.animCircleSuccess]"/>
</svg>
<svg v-else-if="type === 'warn'" :class="[$style.icon, $style.warn]" viewBox="0 0 160 160">
- <path d="M80,64L80,88" style="--l:27;" :class="[$style.line, $style.anim]"/>
- <path d="M80,108L80,108" :class="[$style.line, $style.fade]"/>
- <path d="M92,28L144,116C148.709,124.65 144.083,135.82 136,136L24,136C15.917,135.82 11.291,124.65 16,116L68,28C73.498,19.945 86.771,19.945 92,28Z" style="--l:390;" :class="[$style.line, $style.anim]"/>
+ <path d="M80,64L80,88" style="--l:27;" :class="[$style.line, $style.animLine]"/>
+ <path d="M80,108L80,108" :class="[$style.line, $style.animFade]"/>
+ <path d="M92,28L144,116C148.709,124.65 144.083,135.82 136,136L24,136C15.917,135.82 11.291,124.65 16,116L68,28C73.498,19.945 86.771,19.945 92,28Z" style="--l:395;" :class="[$style.line, $style.animLine]"/>
</svg>
<svg v-else-if="type === 'error'" :class="[$style.icon, $style.error]" viewBox="0 0 160 160">
- <path d="M63,63L96,96" style="--l:47;--duration:0.3s;" :class="[$style.line, $style.anim]"/>
- <path d="M96,63L63,96" style="--l:47;--duration:0.3s;--delay:0.2s;" :class="[$style.line, $style.anim]"/>
- <circle cx="80" cy="80" r="56" style="--l:350;" :class="[$style.line, $style.anim]"/>
+ <path d="M63,63L96,96" style="--l:47;--duration:0.3s;" :class="[$style.line, $style.animLine]"/>
+ <path d="M96,63L63,96" style="--l:47;--duration:0.3s;--delay:0.2s;" :class="[$style.line, $style.animLine]"/>
+ <circle cx="80" cy="80" r="56" style="--l:350;" :class="[$style.line, $style.animCircle]"/>
</svg>
</template>
@@ -68,33 +68,60 @@ const props = defineProps<{
fill: none;
stroke: currentColor;
stroke-width: 8px;
+ shape-rendering: geometricPrecision;
}
-.fill {
- fill: currentColor;
+.animLine {
+ stroke-dasharray: var(--l);
+ stroke-dashoffset: var(--l);
+ animation: line var(--duration, 0.5s) cubic-bezier(0,0,.25,1) 1 forwards;
+ animation-delay: var(--delay, 0s);
}
-.anim {
+.animCircle {
stroke-dasharray: var(--l);
stroke-dashoffset: var(--l);
- animation: line-animation var(--duration, 0.5s) cubic-bezier(0,0,.25,1) 1 forwards;
+ animation: line var(--duration, 0.5s) cubic-bezier(0,0,.25,1) 1 forwards;
animation-delay: var(--delay, 0s);
+ transform-origin: center;
+ transform: rotate(-90deg);
}
-.fade {
+.animCircleSuccess {
+ stroke-dasharray: var(--l);
+ stroke-dashoffset: var(--l);
+ animation: circleSuccess var(--duration, 0.5s) cubic-bezier(0,0,.25,1) 1 forwards;
+ animation-delay: var(--delay, 0s);
+ transform-origin: center;
+}
+
+.animFade {
opacity: 0;
animation: fade-in var(--duration, 0.5s) cubic-bezier(0,0,.25,1) 1 forwards;
animation-delay: var(--delay, 0s);
}
-@keyframes line-animation {
+@keyframes line {
+ 0% {
+ stroke-dashoffset: var(--l);
+ opacity: 0;
+ }
+ 100% {
+ stroke-dashoffset: 0;
+ opacity: 1;
+ }
+}
+
+@keyframes circleSuccess {
0% {
stroke-dashoffset: var(--l);
opacity: 0;
+ transform: rotate(-90deg);
}
100% {
stroke-dashoffset: 0;
opacity: 1;
+ transform: rotate(90deg);
}
}