refactor(frontend): use css modules

This commit is contained in:
syuilo 2023-05-14 10:21:56 +09:00
parent 89a3195dfd
commit 8c97c54cfa
40 changed files with 148 additions and 262 deletions

View file

@ -9,7 +9,7 @@
</I18n> </I18n>
</template> </template>
<MkSpacer :margin-min="20" :margin-max="28"> <MkSpacer :margin-min="20" :margin-max="28">
<div class="dpvffvvy _gaps_m"> <div class="_gaps_m" :class="$style.root">
<div class=""> <div class="">
<MkTextarea v-model="comment"> <MkTextarea v-model="comment">
<template #label>{{ i18n.ts.details }}</template> <template #label>{{ i18n.ts.details }}</template>
@ -60,8 +60,8 @@ function send() {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.dpvffvvy { .root {
--root-margin: 16px; --root-margin: 16px;
} }
</style> </style>

View file

@ -26,6 +26,3 @@ const props = withDefaults(defineProps<{
extractor: (item) => item, extractor: (item) => item,
}); });
</script> </script>
<style lang="scss" scoped>
</style>

View file

@ -1,5 +1,5 @@
<template> <template>
<div class="zhyxdalp"> <div>
<XValue :value="value" :collapsed="false"/> <XValue :value="value" :collapsed="false"/>
</div> </div>
</template> </template>
@ -12,9 +12,3 @@ const props = defineProps<{
value: Record<string, unknown>; value: Record<string, unknown>;
}>(); }>();
</script> </script>
<style lang="scss" scoped>
.zhyxdalp {
}
</style>

View file

@ -124,7 +124,3 @@ onMounted(async () => {
}); });
}); });
</script> </script>
<style lang="scss" scoped>
</style>

View file

@ -1,7 +1,7 @@
<template> <template>
<div class="vswabwbm" :style="{ zIndex, top: `${y - 64}px`, left: `${x - 64}px` }"> <div :class="$style.root" :style="{ zIndex, top: `${y - 64}px`, left: `${x - 64}px` }">
<svg width="128" height="128" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"> <svg width="128" height="128" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
<circle fill="none" cx="64" cy="64"> <circle fill="none" cx="64" cy="64" style="stroke: var(--accent);">
<animate <animate
attributeName="r" attributeName="r"
begin="0s" dur="0.5s" begin="0s" dur="0.5s"
@ -22,7 +22,7 @@
/> />
</circle> </circle>
<g fill="none" fill-rule="evenodd"> <g fill="none" fill-rule="evenodd">
<circle v-for="(particle, i) in particles" :key="i" :fill="particle.color"> <circle v-for="(particle, i) in particles" :key="i" :fill="particle.color" style="stroke: var(--accent);">
<animate <animate
attributeName="r" attributeName="r"
begin="0s" dur="0.8s" begin="0s" dur="0.8s"
@ -100,17 +100,11 @@ onMounted(() => {
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.vswabwbm { .root {
pointer-events: none; pointer-events: none;
position: fixed; position: fixed;
width: 128px; width: 128px;
height: 128px; height: 128px;
> svg {
> circle {
stroke: var(--accent);
}
}
} }
</style> </style>

View file

@ -1,7 +1,7 @@
<template> <template>
<form class="eppvobhk" :class="{ signing, totpLogin }" @submit.prevent="onSubmit"> <form :class="{ signing, totpLogin }" @submit.prevent="onSubmit">
<div class="auth _gaps_m"> <div class="_gaps_m">
<div v-show="withAvatar" class="avatar" :style="{ backgroundImage: user ? `url('${ user.avatarUrl }')` : null, marginBottom: message ? '1.5em' : null }"></div> <div v-show="withAvatar" :class="$style.avatar" :style="{ backgroundImage: user ? `url('${ user.avatarUrl }')` : null, marginBottom: message ? '1.5em' : null }"></div>
<MkInfo v-if="message"> <MkInfo v-if="message">
{{ message }} {{ message }}
</MkInfo> </MkInfo>
@ -236,10 +236,8 @@ function resetPassword() {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.eppvobhk { .avatar {
> .auth {
> .avatar {
margin: 0 auto 0 auto; margin: 0 auto 0 auto;
width: 64px; width: 64px;
height: 64px; height: 64px;
@ -247,7 +245,5 @@ function resetPassword() {
background-position: center; background-position: center;
background-size: cover; background-size: cover;
border-radius: 100%; border-radius: 100%;
}
}
} }
</style> </style>

View file

@ -1,5 +1,5 @@
<template> <template>
<div class="fgmtyycl" :style="{ zIndex, top: top + 'px', left: left + 'px' }"> <div :class="$style.root" :style="{ zIndex, top: top + 'px', left: left + 'px' }">
<Transition :name="defaultStore.state.animation ? '_transition_zoom' : ''" @after-leave="emit('closed')"> <Transition :name="defaultStore.state.animation ? '_transition_zoom' : ''" @after-leave="emit('closed')">
<MkUrlPreview v-if="showing" class="_popup _shadow" :url="url"/> <MkUrlPreview v-if="showing" class="_popup _shadow" :url="url"/>
</Transition> </Transition>
@ -36,8 +36,8 @@ onMounted(() => {
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.fgmtyycl { .root {
position: absolute; position: absolute;
width: 500px; width: 500px;
max-width: calc(90vw - 12px); max-width: calc(90vw - 12px);

View file

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<MkButton class="kudkigyw" :primary="block.primary" @click="click()">{{ hpml.interpolate(block.text) }}</MkButton> <MkButton :class="$style.button" :primary="block.primary" @click="click()">{{ hpml.interpolate(block.text) }}</MkButton>
</div> </div>
</template> </template>
@ -56,8 +56,8 @@ export default defineComponent({
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.kudkigyw { .button {
display: inline-block; display: inline-block;
min-width: 200px; min-width: 200px;
max-width: 450px; max-width: 450px;

View file

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<MkButton class="llumlmnx" @click="click()">{{ hpml.interpolate(block.text) }}</MkButton> <MkButton :class="$style.button" @click="click()">{{ hpml.interpolate(block.text) }}</MkButton>
</div> </div>
</template> </template>
@ -41,8 +41,8 @@ export default defineComponent({
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.llumlmnx { .button {
display: inline-block; display: inline-block;
min-width: 300px; min-width: 300px;
max-width: 450px; max-width: 450px;

View file

@ -1,5 +1,5 @@
<template> <template>
<div class="voxdxuby"> <div style="margin: 1em 0;">
<MkNote v-if="note && !block.detailed" :key="note.id + ':normal'" v-model:note="note"/> <MkNote v-if="note && !block.detailed" :key="note.id + ':normal'" v-model:note="note"/>
<MkNoteDetailed v-if="note && block.detailed" :key="note.id + ':detail'" v-model:note="note"/> <MkNoteDetailed v-if="note && block.detailed" :key="note.id + ':detail'" v-model:note="note"/>
</div> </div>
@ -39,9 +39,3 @@ export default defineComponent({
}, },
}); });
</script> </script>
<style lang="scss" scoped>
.voxdxuby {
margin: 1em 0;
}
</style>

View file

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<MkInput class="kudkigyw" :model-value="value" type="number" @update:model-value="updateValue($event)"> <MkInput :class="$style.input" :model-value="value" type="number" @update:model-value="updateValue($event)">
<template #label>{{ hpml.interpolate(block.text) }}</template> <template #label>{{ hpml.interpolate(block.text) }}</template>
</MkInput> </MkInput>
</div> </div>
@ -44,8 +44,8 @@ export default defineComponent({
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.kudkigyw { .input {
display: inline-block; display: inline-block;
min-width: 300px; min-width: 300px;
max-width: 450px; max-width: 450px;

View file

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<MkInput class="kudkigyw" :model-value="value" type="text" @update:model-value="updateValue($event)"> <MkInput :class="$style.input" :model-value="value" type="text" @update:model-value="updateValue($event)">
<template #label>{{ hpml.interpolate(block.text) }}</template> <template #label>{{ hpml.interpolate(block.text) }}</template>
</MkInput> </MkInput>
</div> </div>
@ -44,8 +44,8 @@ export default defineComponent({
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.kudkigyw { .input {
display: inline-block; display: inline-block;
min-width: 300px; min-width: 300px;
max-width: 450px; max-width: 450px;

View file

@ -2,7 +2,7 @@
<MkStickyContainer> <MkStickyContainer>
<template #header><XHeader :actions="headerActions" :tabs="headerTabs"/></template> <template #header><XHeader :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :content-max="900"> <MkSpacer :content-max="900">
<div class="lcixvhis"> <div>
<div class="reports"> <div class="reports">
<div class=""> <div class="">
<div class="inputs" style="display: flex;"> <div class="inputs" style="display: flex;">
@ -87,9 +87,3 @@ definePageMetadata({
icon: 'ti ti-exclamation-circle', icon: 'ti ti-exclamation-circle',
}); });
</script> </script>
<style lang="scss" scoped>
.lcixvhis {
margin: var(--margin);
}
</style>

View file

@ -2,7 +2,7 @@
<MkStickyContainer> <MkStickyContainer>
<template #header><XHeader :actions="headerActions" :tabs="headerTabs"/></template> <template #header><XHeader :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :content-max="900"> <MkSpacer :content-max="900">
<div class="ztgjmzrw _gaps_m"> <div class="_gaps_m">
<section v-for="announcement in announcements" class=""> <section v-for="announcement in announcements" class="">
<div class="_panel _gaps_m" style="padding: 24px;"> <div class="_panel _gaps_m" style="padding: 24px;">
<MkInput v-model="announcement.title"> <MkInput v-model="announcement.title">
@ -113,9 +113,3 @@ definePageMetadata({
icon: 'ti ti-speakerphone', icon: 'ti ti-speakerphone',
}); });
</script> </script>
<style lang="scss" scoped>
.ztgjmzrw {
margin: var(--margin);
}
</style>

View file

@ -3,7 +3,7 @@
<MkStickyContainer> <MkStickyContainer>
<template #header><XHeader :actions="headerActions"/></template> <template #header><XHeader :actions="headerActions"/></template>
<MkSpacer :content-max="900"> <MkSpacer :content-max="900">
<div class="xrmjdkdw"> <div>
<div> <div>
<div class="inputs" style="display: flex; gap: var(--margin); flex-wrap: wrap;"> <div class="inputs" style="display: flex; gap: var(--margin); flex-wrap: wrap;">
<MkSelect v-model="origin" style="margin: 0; flex: 1;"> <MkSelect v-model="origin" style="margin: 0; flex: 1;">
@ -109,9 +109,3 @@ definePageMetadata(computed(() => ({
icon: 'ti ti-cloud', icon: 'ti ti-cloud',
}))); })));
</script> </script>
<style lang="scss" scoped>
.xrmjdkdw {
margin: var(--margin);
}
</style>

View file

@ -67,7 +67,3 @@ onMounted(() => {
}); });
}); });
</script> </script>
<style lang="scss" scoped>
</style>

View file

@ -132,7 +132,3 @@ defineExpose({
pushData, pushData,
}); });
</script> </script>
<style lang="scss" scoped>
</style>

View file

@ -1,6 +1,6 @@
<template> <template>
<MkSpacer :content-max="1000"> <MkSpacer :content-max="1000">
<div ref="rootEl" class="edbbcaef"> <div ref="rootEl" :class="$style.root">
<MkFoldableSection class="item"> <MkFoldableSection class="item">
<template #header>Stats</template> <template #header>Stats</template>
<XStats/> <XStats/>
@ -176,8 +176,8 @@ definePageMetadata({
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.edbbcaef { .root {
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
grid-gap: 16px; grid-gap: 16px;

View file

@ -132,7 +132,3 @@ defineExpose({
pushData, pushData,
}); });
</script> </script>
<style lang="scss" scoped>
</style>

View file

@ -10,8 +10,8 @@
<template #header>:{{ emoji.name }}:</template> <template #header>:{{ emoji.name }}:</template>
<MkSpacer :margin-min="20" :margin-max="28"> <MkSpacer :margin-min="20" :margin-max="28">
<div class="yigymqpb _gaps_m"> <div class="_gaps_m">
<img :src="`/emoji/${emoji.name}.webp`" class="img"/> <img :src="`/emoji/${emoji.name}.webp`" :class="$style.img"/>
<MkInput v-model="name"> <MkInput v-model="name">
<template #label>{{ i18n.ts.name }}</template> <template #label>{{ i18n.ts.name }}</template>
</MkInput> </MkInput>
@ -99,12 +99,10 @@ async function del() {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.yigymqpb { .img {
> .img {
display: block; display: block;
height: 64px; height: 64px;
margin: 0 auto; margin: 0 auto;
}
} }
</style> </style>

View file

@ -442,7 +442,3 @@ definePageMetadata(computed(() => flash ? {
title: i18n.ts._play.new, title: i18n.ts._play.new,
})); }));
</script> </script>
<style lang="scss" scoped>
</style>

View file

@ -7,7 +7,7 @@
<MkFoldableSection class="_margin"> <MkFoldableSection class="_margin">
<template #header><i class="ti ti-clock"></i>{{ i18n.ts.recentPosts }}</template> <template #header><i class="ti ti-clock"></i>{{ i18n.ts.recentPosts }}</template>
<MkPagination v-slot="{items}" :pagination="recentPostsPagination" :disable-auto-load="true"> <MkPagination v-slot="{items}" :pagination="recentPostsPagination" :disable-auto-load="true">
<div class="vfpdbgtk"> <div :class="$style.items">
<MkGalleryPostPreview v-for="post in items" :key="post.id" :post="post" class="post"/> <MkGalleryPostPreview v-for="post in items" :key="post.id" :post="post" class="post"/>
</div> </div>
</MkPagination> </MkPagination>
@ -15,7 +15,7 @@
<MkFoldableSection class="_margin"> <MkFoldableSection class="_margin">
<template #header><i class="ti ti-comet"></i>{{ i18n.ts.popularPosts }}</template> <template #header><i class="ti ti-comet"></i>{{ i18n.ts.popularPosts }}</template>
<MkPagination v-slot="{items}" :pagination="popularPostsPagination" :disable-auto-load="true"> <MkPagination v-slot="{items}" :pagination="popularPostsPagination" :disable-auto-load="true">
<div class="vfpdbgtk"> <div :class="$style.items">
<MkGalleryPostPreview v-for="post in items" :key="post.id" :post="post" class="post"/> <MkGalleryPostPreview v-for="post in items" :key="post.id" :post="post" class="post"/>
</div> </div>
</MkPagination> </MkPagination>
@ -23,7 +23,7 @@
</div> </div>
<div v-else-if="tab === 'liked'"> <div v-else-if="tab === 'liked'">
<MkPagination v-slot="{items}" :pagination="likedPostsPagination"> <MkPagination v-slot="{items}" :pagination="likedPostsPagination">
<div class="vfpdbgtk"> <div :class="$style.items">
<MkGalleryPostPreview v-for="like in items" :key="like.id" :post="like.post" class="post"/> <MkGalleryPostPreview v-for="like in items" :key="like.id" :post="like.post" class="post"/>
</div> </div>
</MkPagination> </MkPagination>
@ -31,7 +31,7 @@
<div v-else-if="tab === 'my'"> <div v-else-if="tab === 'my'">
<MkA to="/gallery/new" class="_link" style="margin: 16px;"><i class="ti ti-plus"></i> {{ i18n.ts.postToGallery }}</MkA> <MkA to="/gallery/new" class="_link" style="margin: 16px;"><i class="ti ti-plus"></i> {{ i18n.ts.postToGallery }}</MkA>
<MkPagination v-slot="{items}" :pagination="myPostsPagination"> <MkPagination v-slot="{items}" :pagination="myPostsPagination">
<div class="vfpdbgtk"> <div :class="$style.items">
<MkGalleryPostPreview v-for="post in items" :key="post.id" :post="post" class="post"/> <MkGalleryPostPreview v-for="post in items" :key="post.id" :post="post" class="post"/>
</div> </div>
</MkPagination> </MkPagination>
@ -119,15 +119,11 @@ definePageMetadata({
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.vfpdbgtk { .items {
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
grid-gap: 12px; grid-gap: 12px;
margin: 0 var(--margin); margin: 0 var(--margin);
> .post {
}
} }
</style> </style>

View file

@ -38,7 +38,3 @@ definePageMetadata({
icon: 'ti ti-antenna', icon: 'ti ti-antenna',
}); });
</script> </script>
<style lang="scss" scoped>
</style>

View file

@ -36,7 +36,3 @@ definePageMetadata({
icon: 'ti ti-antenna', icon: 'ti ti-antenna',
}); });
</script> </script>
<style lang="scss" scoped>
</style>

View file

@ -1,6 +1,6 @@
<template> <template>
<MkSpacer :content-max="700"> <MkSpacer :content-max="700">
<div class="shaynizk"> <div>
<div class="_gaps_m"> <div class="_gaps_m">
<MkInput v-model="name"> <MkInput v-model="name">
<template #label>{{ i18n.ts.name }}</template> <template #label>{{ i18n.ts.name }}</template>
@ -33,7 +33,7 @@
<MkSwitch v-model="withFile">{{ i18n.ts.withFileAntenna }}</MkSwitch> <MkSwitch v-model="withFile">{{ i18n.ts.withFileAntenna }}</MkSwitch>
<MkSwitch v-model="notify">{{ i18n.ts.notifyAntenna }}</MkSwitch> <MkSwitch v-model="notify">{{ i18n.ts.notifyAntenna }}</MkSwitch>
</div> </div>
<div class="actions"> <div :class="$style.actions">
<MkButton inline primary @click="saveAntenna()"><i class="ti ti-device-floppy"></i> {{ i18n.ts.save }}</MkButton> <MkButton inline primary @click="saveAntenna()"><i class="ti ti-device-floppy"></i> {{ i18n.ts.save }}</MkButton>
<MkButton v-if="antenna.id != null" inline danger @click="deleteAntenna()"><i class="ti ti-trash"></i> {{ i18n.ts.delete }}</MkButton> <MkButton v-if="antenna.id != null" inline danger @click="deleteAntenna()"><i class="ti ti-trash"></i> {{ i18n.ts.delete }}</MkButton>
</div> </div>
@ -128,12 +128,10 @@ function addUser() {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.shaynizk { .actions {
> .actions {
margin-top: 16px; margin-top: 16px;
padding: 24px 0; padding: 24px 0;
border-top: solid 0.5px var(--divider); border-top: solid 0.5px var(--divider);
}
} }
</style> </style>

View file

@ -8,8 +8,8 @@
</button> </button>
</template> </template>
<section class="oyyftmcf"> <section>
<MkDriveFileThumbnail v-if="file" class="preview" :file="file" fit="contain" @click="choose()"/> <MkDriveFileThumbnail v-if="file" style="height: 150px;" :file="file" fit="contain" @click="choose()"/>
</section> </section>
</XContainer> </XContainer>
</template> </template>
@ -54,11 +54,3 @@ onMounted(async () => {
} }
}); });
</script> </script>
<style lang="scss" scoped>
.oyyftmcf {
> .preview {
height: 150px;
}
}
</style>

View file

@ -3,8 +3,8 @@
<XContainer :draggable="true" @remove="() => $emit('remove')"> <XContainer :draggable="true" @remove="() => $emit('remove')">
<template #header><i class="ti ti-align-left"></i> {{ i18n.ts._pages.blocks.text }}</template> <template #header><i class="ti ti-align-left"></i> {{ i18n.ts._pages.blocks.text }}</template>
<section class="vckmsadr"> <section>
<textarea v-model="text"></textarea> <textarea v-model="text" :class="$style.textarea"></textarea>
</section> </section>
</XContainer> </XContainer>
</template> </template>
@ -33,9 +33,8 @@ watch($$(text), () => {
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.vckmsadr { .textarea {
> textarea {
display: block; display: block;
-webkit-appearance: none; -webkit-appearance: none;
-moz-appearance: none; -moz-appearance: none;
@ -50,6 +49,5 @@ watch($$(text), () => {
color: var(--fg); color: var(--fg);
font-size: 14px; font-size: 14px;
box-sizing: border-box; box-sizing: border-box;
}
} }
</style> </style>

View file

@ -1,5 +1,5 @@
<template> <template>
<div class="graojtoi"> <div>
<MkSample/> <MkSample/>
</div> </div>
</template> </template>
@ -19,9 +19,3 @@ definePageMetadata(computed(() => ({
icon: 'ti ti-eye', icon: 'ti ti-eye',
}))); })));
</script> </script>
<style lang="scss" scoped>
.graojtoi {
padding: var(--margin);
}
</style>

View file

@ -93,6 +93,3 @@ definePageMetadata({
icon: 'ti ti-adjustments', icon: 'ti ti-adjustments',
}); });
</script> </script>
<style lang="scss" scoped>
</style>

View file

@ -118,6 +118,3 @@ definePageMetadata({
icon: 'ti ti-adjustments', icon: 'ti ti-adjustments',
}); });
</script> </script>
<style lang="scss" scoped>
</style>

View file

@ -68,6 +68,3 @@ definePageMetadata({
icon: 'ti ti-adjustments', icon: 'ti ti-adjustments',
}); });
</script> </script>
<style lang="scss" scoped>
</style>

View file

@ -53,7 +53,3 @@ definePageMetadata({
icon: 'ti ti-lock', icon: 'ti ti-lock',
}); });
</script> </script>
<style lang="scss" scoped>
</style>

View file

@ -94,7 +94,3 @@ definePageMetadata({
icon: 'ti ti-plug', icon: 'ti ti-plug',
}); });
</script> </script>
<style lang="scss" scoped>
</style>

View file

@ -1,11 +1,11 @@
<template> <template>
<div class="_gaps_m"> <div class="_gaps_m">
<div class="llvierxe" :style="{ backgroundImage: $i.bannerUrl ? `url(${ $i.bannerUrl })` : null }"> <div :class="$style.avatarAndBanner" :style="{ backgroundImage: $i.bannerUrl ? `url(${ $i.bannerUrl })` : null }">
<div class="avatar"> <div :class="$style.avatarContainer">
<MkAvatar class="avatar" :user="$i" @click="changeAvatar"/> <MkAvatar :class="$style.avatar" :user="$i" @click="changeAvatar"/>
<MkButton primary rounded class="avatarEdit" @click="changeAvatar">{{ i18n.ts._profile.changeAvatar }}</MkButton> <MkButton primary rounded :class="$style.avatarEdit" @click="changeAvatar">{{ i18n.ts._profile.changeAvatar }}</MkButton>
</div> </div>
<MkButton primary rounded class="bannerEdit" @click="changeBanner">{{ i18n.ts._profile.changeBanner }}</MkButton> <MkButton primary rounded :class="$style.bannerEdit" @click="changeBanner">{{ i18n.ts._profile.changeBanner }}</MkButton>
</div> </div>
<MkInput v-model="profile.name" :max="30" manual-save> <MkInput v-model="profile.name" :max="30" manual-save>
@ -248,36 +248,39 @@ definePageMetadata({
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.llvierxe { .avatarAndBanner {
position: relative; position: relative;
background-size: cover; background-size: cover;
background-position: center; background-position: center;
border: solid 1px var(--divider); border: solid 1px var(--divider);
border-radius: 10px; border-radius: 10px;
overflow: clip; overflow: clip;
}
> .avatar { .avatarContainer {
display: inline-block; display: inline-block;
text-align: center; text-align: center;
padding: 16px; padding: 16px;
}
> .avatar { .avatar {
display: inline-block; display: inline-block;
width: 72px; width: 72px;
height: 72px; height: 72px;
margin: 0 auto 16px auto; margin: 0 auto 16px auto;
} }
}
> .bannerEdit { .avatarEdit {
}
.bannerEdit {
position: absolute; position: absolute;
top: 16px; top: 16px;
right: 16px; right: 16px;
}
} }
</style>
<style lang="scss" module>
.metadataRoot { .metadataRoot {
container-type: inline-size; container-type: inline-size;
} }

View file

@ -3,15 +3,15 @@
<FromSlot> <FromSlot>
<template #label>{{ i18n.ts.reactionSettingDescription }}</template> <template #label>{{ i18n.ts.reactionSettingDescription }}</template>
<div v-panel style="border-radius: 6px;"> <div v-panel style="border-radius: 6px;">
<Sortable v-model="reactions" class="zoaiodol" :item-key="item => item" :animation="150" :delay="100" :delay-on-touch-only="true"> <Sortable v-model="reactions" :class="$style.reactions" :item-key="item => item" :animation="150" :delay="100" :delay-on-touch-only="true">
<template #item="{element}"> <template #item="{element}">
<button class="_button item" @click="remove(element, $event)"> <button class="_button" :class="$style.reactionsItem" @click="remove(element, $event)">
<MkCustomEmoji v-if="element[0] === ':'" :name="element" :normal="true"/> <MkCustomEmoji v-if="element[0] === ':'" :name="element" :normal="true"/>
<MkEmoji v-else :emoji="element" :normal="true"/> <MkEmoji v-else :emoji="element" :normal="true"/>
</button> </button>
</template> </template>
<template #footer> <template #footer>
<button class="_button add" @click="chooseEmoji"><i class="ti ti-plus"></i></button> <button class="_button" :class="$style.reactionsAdd" @click="chooseEmoji"><i class="ti ti-plus"></i></button>
</template> </template>
</Sortable> </Sortable>
</div> </div>
@ -135,20 +135,20 @@ definePageMetadata({
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.zoaiodol { .reactions {
padding: 12px; padding: 12px;
font-size: 1.1em; font-size: 1.1em;
}
> .item { .reactionsItem {
display: inline-block; display: inline-block;
padding: 8px; padding: 8px;
cursor: move; cursor: move;
} }
> .add { .reactionsAdd {
display: inline-block; display: inline-block;
padding: 8px; padding: 8px;
}
} }
</style> </style>

View file

@ -16,7 +16,7 @@
class="_panel" class="_panel"
@posted="state = 'posted'" @posted="state = 'posted'"
/> />
<MkButton v-else-if="state === 'posted'" primary class="close" @click="close()">{{ i18n.ts.close }}</MkButton> <MkButton v-else-if="state === 'posted'" primary :class="$style.close" @click="close()">{{ i18n.ts.close }}</MkButton>
</MkSpacer> </MkSpacer>
</MkStickyContainer> </MkStickyContainer>
</template> </template>
@ -162,7 +162,7 @@ definePageMetadata({
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.close { .close {
margin: 16px auto; margin: 16px auto;
} }

View file

@ -35,7 +35,3 @@ definePageMetadata({
icon: 'ti ti-user', icon: 'ti ti-user',
}); });
</script> </script>
<style lang="scss" scoped>
</style>

View file

@ -1,26 +1,30 @@
<template> <template>
<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`" @mousedown.prevent="onMousedown"> <svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`" :class="$style.root" @mousedown.prevent="onMousedown">
<polyline <polyline
:points="pointsNote" :points="pointsNote"
fill="none" fill="none"
stroke-width="1" stroke-width="1"
stroke="#41ddde"/> stroke="#41ddde"
/>
<polyline <polyline
:points="pointsReply" :points="pointsReply"
fill="none" fill="none"
stroke-width="1" stroke-width="1"
stroke="#f7796c"/> stroke="#f7796c"
/>
<polyline <polyline
:points="pointsRenote" :points="pointsRenote"
fill="none" fill="none"
stroke-width="1" stroke-width="1"
stroke="#a1de41"/> stroke="#a1de41"
/>
<polyline <polyline
:points="pointsTotal" :points="pointsTotal"
fill="none" fill="none"
stroke-width="1" stroke-width="1"
stroke="#555" stroke="#555"
stroke-dasharray="2 2"/> stroke-dasharray="2 2"
/>
</svg> </svg>
</template> </template>
@ -81,8 +85,8 @@ function render() {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
svg { .root {
display: block; display: block;
padding: 16px; padding: 16px;
width: 100%; width: 100%;

View file

@ -1,6 +1,6 @@
<template> <template>
<MkContainer :naked="widgetProps.transparent" :show-header="false" data-cy-mkw-aichan class="mkw-aichan"> <MkContainer :naked="widgetProps.transparent" :show-header="false" data-cy-mkw-aichan class="mkw-aichan">
<iframe ref="live2d" class="dedjhjmo" src="https://misskey-dev.github.io/mascot-web/?scale=1.5&y=1.1&eyeY=100" @click="touched"></iframe> <iframe ref="live2d" :class="$style.root" src="https://misskey-dev.github.io/mascot-web/?scale=1.5&y=1.1&eyeY=100" @click="touched"></iframe>
</MkContainer> </MkContainer>
</template> </template>
@ -64,8 +64,8 @@ defineExpose<WidgetComponentExpose>({
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.dedjhjmo { .root {
width: 100%; width: 100%;
height: 350px; height: 350px;
border: none; border: none;

View file

@ -101,8 +101,3 @@ defineExpose<WidgetComponentExpose>({
id: props.widget ? props.widget.id : null, id: props.widget ? props.widget.id : null,
}); });
</script> </script>
<style lang="scss" scoped>
.mkw-button {
}
</style>