summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAcid Chicken (硫酸鶏) <root@acid-chicken.com>2023-04-01 16:31:55 +0900
committerAcid Chicken (硫酸鶏) <root@acid-chicken.com>2023-04-01 16:31:55 +0900
commit0960d61ce2aec659328fe3fede01cd8fbff9370e (patch)
tree1e0fd52c331b10ae36335f6daf3b4f853334f37b
parentbuild(#10336): finalize (diff)
downloadmisskey-0960d61ce2aec659328fe3fede01cd8fbff9370e.tar.gz
misskey-0960d61ce2aec659328fe3fede01cd8fbff9370e.tar.bz2
misskey-0960d61ce2aec659328fe3fede01cd8fbff9370e.zip
chore: add static option to `MkLoading`
-rw-r--r--packages/frontend/src/components/global/MkLoading.stories.impl.ts1
-rw-r--r--packages/frontend/src/components/global/MkLoading.vue8
2 files changed, 8 insertions, 1 deletions
diff --git a/packages/frontend/src/components/global/MkLoading.stories.impl.ts b/packages/frontend/src/components/global/MkLoading.stories.impl.ts
index dd22f92451..d240e6566e 100644
--- a/packages/frontend/src/components/global/MkLoading.stories.impl.ts
+++ b/packages/frontend/src/components/global/MkLoading.stories.impl.ts
@@ -23,6 +23,7 @@ export const Default = {
};
},
args: {
+ static: true,
},
parameters: {
layout: 'centered',
diff --git a/packages/frontend/src/components/global/MkLoading.vue b/packages/frontend/src/components/global/MkLoading.vue
index 64e12e3b44..4311f9fe8a 100644
--- a/packages/frontend/src/components/global/MkLoading.vue
+++ b/packages/frontend/src/components/global/MkLoading.vue
@@ -6,7 +6,7 @@
<circle cx="64" cy="64" r="64" style="fill:none;stroke:currentColor;stroke-width:21.33px;"/>
</g>
</svg>
- <svg :class="[$style.spinner, $style.fg]" viewBox="0 0 168 168" xmlns="http://www.w3.org/2000/svg">
+ <svg :class="[$style.spinner, $style.fg, { [$style.static]: static }]" viewBox="0 0 168 168" xmlns="http://www.w3.org/2000/svg">
<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;"/>
</g>
@@ -19,11 +19,13 @@
import { } from 'vue';
const props = withDefaults(defineProps<{
+ static?: boolean;
inline?: boolean;
colored?: boolean;
mini?: boolean;
em?: boolean;
}>(), {
+ static: false,
inline: false,
colored: true,
mini: false,
@@ -97,5 +99,9 @@ const props = withDefaults(defineProps<{
.fg {
animation: spinner 0.5s linear infinite;
+
+ &.static {
+ animation-play-state: paused;
+ }
}
</style>