wip
This commit is contained in:
parent
5c44e5ba59
commit
5a8cd627ef
|
@ -33,7 +33,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<MkLoading v-if="ctx.uploading" :em="true"/>
|
<MkSystemIcon v-if="ctx.uploading" type="waiting" style="width: 40px;"/>
|
||||||
<MkSystemIcon v-else-if="ctx.uploaded" type="success" style="width: 40px;"/>
|
<MkSystemIcon v-else-if="ctx.uploaded" type="success" style="width: 40px;"/>
|
||||||
<MkSystemIcon v-else-if="ctx.uploadFailed" type="error" style="width: 40px;"/>
|
<MkSystemIcon v-else-if="ctx.uploadFailed" type="error" style="width: 40px;"/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -321,6 +321,12 @@ onMounted(() => {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@container (max-width: 500px) {
|
||||||
|
.itemBody {
|
||||||
|
font-size: 90%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.itemInfo {
|
.itemInfo {
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
|
|
|
@ -28,13 +28,17 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<path d="M96,63L63,96" style="--l:47;--duration:0.3s;--delay:0.2s;" :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]"/>
|
<circle cx="80" cy="80" r="56" style="--l:350;" :class="[$style.line, $style.animCircle]"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
<svg v-else-if="type === 'waiting'" :class="[$style.icon, $style.waiting]" viewBox="0 0 160 160">
|
||||||
|
<circle cx="80" cy="80" r="56" style="--l:350;" :class="[$style.line, $style.animCircleWaiting]"/>
|
||||||
|
<circle cx="80" cy="80" r="56" style="opacity: 0.25;" :class="[$style.line]"/>
|
||||||
|
</svg>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from 'vue';
|
import {} from 'vue';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
type: 'info' | 'question' | 'success' | 'warn' | 'error';
|
type: 'info' | 'question' | 'success' | 'warn' | 'error' | 'waiting';
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -62,6 +66,10 @@ const props = defineProps<{
|
||||||
&.error {
|
&.error {
|
||||||
color: var(--MI_THEME-error);
|
color: var(--MI_THEME-error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.waiting {
|
||||||
|
color: var(--MI_THEME-accent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.line {
|
.line {
|
||||||
|
@ -87,6 +95,13 @@ const props = defineProps<{
|
||||||
transform: rotate(-90deg);
|
transform: rotate(-90deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.animCircleWaiting {
|
||||||
|
stroke-dasharray: var(--l);
|
||||||
|
stroke-dashoffset: calc(var(--l) / 1.5);
|
||||||
|
animation: waiting 0.75s linear infinite;
|
||||||
|
transform-origin: center;
|
||||||
|
}
|
||||||
|
|
||||||
.animFade {
|
.animFade {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
animation: fade-in var(--duration, 0.5s) cubic-bezier(0,0,.25,1) 1 forwards;
|
animation: fade-in var(--duration, 0.5s) cubic-bezier(0,0,.25,1) 1 forwards;
|
||||||
|
@ -104,6 +119,15 @@ const props = defineProps<{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes waiting {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes fade-in {
|
@keyframes fade-in {
|
||||||
0% {
|
0% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
|
@ -23,6 +23,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkSystemIcon v-if="iconType === 'success'" type="success" style="width: 150px;"/>
|
<MkSystemIcon v-if="iconType === 'success'" type="success" style="width: 150px;"/>
|
||||||
<MkSystemIcon v-if="iconType === 'warn'" type="warn" style="width: 150px;"/>
|
<MkSystemIcon v-if="iconType === 'warn'" type="warn" style="width: 150px;"/>
|
||||||
<MkSystemIcon v-if="iconType === 'error'" type="error" style="width: 150px;"/>
|
<MkSystemIcon v-if="iconType === 'error'" type="error" style="width: 150px;"/>
|
||||||
|
<MkSystemIcon v-if="iconType === 'waiting'" type="waiting" style="width: 150px;"/>
|
||||||
<MkSelect
|
<MkSelect
|
||||||
v-model="iconType" :items="[
|
v-model="iconType" :items="[
|
||||||
{ label: 'info', value: 'info' },
|
{ label: 'info', value: 'info' },
|
||||||
|
@ -30,6 +31,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
{ label: 'success', value: 'success' },
|
{ label: 'success', value: 'success' },
|
||||||
{ label: 'warn', value: 'warn' },
|
{ label: 'warn', value: 'warn' },
|
||||||
{ label: 'error', value: 'error' },
|
{ label: 'error', value: 'error' },
|
||||||
|
{ label: 'waiting', value: 'waiting' },
|
||||||
]"
|
]"
|
||||||
></MkSelect>
|
></MkSelect>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue