2023-07-27 07:31:52 +02:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2020-01-29 20:37:25 +01:00
|
|
|
<template>
|
2022-12-20 03:00:05 +01:00
|
|
|
<div :class="[$style.root, { [$style.inline]: inline, [$style.colored]: colored, [$style.mini]: mini, [$style.em]: em }]">
|
2022-05-28 17:15:32 +02:00
|
|
|
<div :class="$style.container">
|
|
|
|
<svg :class="[$style.spinner, $style.bg]" viewBox="0 0 168 168" xmlns="http://www.w3.org/2000/svg">
|
2022-05-19 10:21:08 +02:00
|
|
|
<g transform="matrix(1.125,0,0,1.125,12,12)">
|
|
|
|
<circle cx="64" cy="64" r="64" style="fill:none;stroke:currentColor;stroke-width:21.33px;"/>
|
2022-05-19 08:24:35 +02:00
|
|
|
</g>
|
|
|
|
</svg>
|
2023-04-04 02:38:34 +02:00
|
|
|
<svg :class="[$style.spinner, $style.fg, { [$style.static]: static }]" viewBox="0 0 168 168" xmlns="http://www.w3.org/2000/svg">
|
2022-05-19 10:21:08 +02:00
|
|
|
<g transform="matrix(1.125,0,0,1.125,12,12)">
|
|
|
|
<path d="M128,64C128,28.654 99.346,0 64,0C99.346,0 128,28.654 128,64Z" style="fill:none;stroke:currentColor;stroke-width:21.33px;"/>
|
2022-05-19 08:24:35 +02:00
|
|
|
</g>
|
|
|
|
</svg>
|
|
|
|
</div>
|
2020-01-29 20:37:25 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-01-15 23:47:28 +01:00
|
|
|
<script lang="ts" setup>
|
2022-07-14 16:32:00 +02:00
|
|
|
import { } from 'vue';
|
2020-01-29 20:37:25 +01:00
|
|
|
|
2022-01-15 23:47:28 +01:00
|
|
|
const props = withDefaults(defineProps<{
|
2023-04-04 02:38:34 +02:00
|
|
|
static?: boolean;
|
2022-01-15 23:47:28 +01:00
|
|
|
inline?: boolean;
|
|
|
|
colored?: boolean;
|
|
|
|
mini?: boolean;
|
2022-12-20 03:00:05 +01:00
|
|
|
em?: boolean;
|
2022-01-15 23:47:28 +01:00
|
|
|
}>(), {
|
2023-04-04 02:38:34 +02:00
|
|
|
static: false,
|
2022-01-15 23:47:28 +01:00
|
|
|
inline: false,
|
|
|
|
colored: true,
|
|
|
|
mini: false,
|
2022-12-20 03:00:05 +01:00
|
|
|
em: false,
|
2020-01-29 20:37:25 +01:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2022-05-28 17:15:32 +02:00
|
|
|
<style lang="scss" module>
|
2022-05-19 08:24:35 +02:00
|
|
|
@keyframes spinner {
|
2020-02-10 12:44:59 +01:00
|
|
|
0% {
|
|
|
|
transform: rotate(0deg);
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
transform: rotate(360deg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-28 17:15:32 +02:00
|
|
|
.root {
|
2020-01-29 20:37:25 +01:00
|
|
|
padding: 32px;
|
|
|
|
text-align: center;
|
2021-04-16 16:04:25 +02:00
|
|
|
cursor: wait;
|
|
|
|
|
2022-08-27 09:26:14 +02:00
|
|
|
--size: 38px;
|
2021-08-15 13:26:44 +02:00
|
|
|
|
2021-04-16 16:04:25 +02:00
|
|
|
&.colored {
|
2023-09-23 02:01:20 +02:00
|
|
|
color: #5f5f5f;
|
2021-04-16 16:04:25 +02:00
|
|
|
}
|
2020-01-29 20:37:25 +01:00
|
|
|
|
2020-02-11 18:52:37 +01:00
|
|
|
&.inline {
|
|
|
|
display: inline;
|
|
|
|
padding: 0;
|
2021-08-15 13:26:44 +02:00
|
|
|
--size: 32px;
|
|
|
|
}
|
2020-02-11 18:52:37 +01:00
|
|
|
|
2021-08-15 13:26:44 +02:00
|
|
|
&.mini {
|
|
|
|
padding: 16px;
|
|
|
|
--size: 32px;
|
2020-02-11 18:52:37 +01:00
|
|
|
}
|
2022-12-20 03:00:05 +01:00
|
|
|
|
|
|
|
&.em {
|
2022-12-20 03:06:39 +01:00
|
|
|
display: inline-block;
|
|
|
|
vertical-align: middle;
|
2022-12-20 03:00:05 +01:00
|
|
|
padding: 0;
|
|
|
|
--size: 1em;
|
|
|
|
}
|
2022-05-28 17:15:32 +02:00
|
|
|
}
|
2020-02-11 18:52:37 +01:00
|
|
|
|
2022-05-28 17:15:32 +02:00
|
|
|
.container {
|
|
|
|
position: relative;
|
|
|
|
width: var(--size);
|
|
|
|
height: var(--size);
|
|
|
|
margin: 0 auto;
|
|
|
|
}
|
2020-02-10 12:44:59 +01:00
|
|
|
|
2022-05-28 17:15:32 +02:00
|
|
|
.spinner {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: var(--size);
|
|
|
|
height: var(--size);
|
|
|
|
fill-rule: evenodd;
|
|
|
|
clip-rule: evenodd;
|
|
|
|
stroke-linecap: round;
|
|
|
|
stroke-linejoin: round;
|
|
|
|
stroke-miterlimit: 1.5;
|
|
|
|
}
|
2021-04-16 16:04:25 +02:00
|
|
|
|
2022-05-28 17:15:32 +02:00
|
|
|
.bg {
|
|
|
|
opacity: 0.275;
|
|
|
|
}
|
2021-04-16 16:04:25 +02:00
|
|
|
|
2022-05-28 17:15:32 +02:00
|
|
|
.fg {
|
|
|
|
animation: spinner 0.5s linear infinite;
|
2023-04-04 02:38:34 +02:00
|
|
|
|
|
|
|
&.static {
|
|
|
|
animation-play-state: paused;
|
|
|
|
}
|
2020-01-29 20:37:25 +01:00
|
|
|
}
|
|
|
|
</style>
|