refactor(client): use css modules

This commit is contained in:
syuilo 2023-01-14 11:18:12 +09:00
parent 2bedc084a3
commit 91105845d8
4 changed files with 19 additions and 25 deletions

View File

@ -65,6 +65,3 @@ defineExpose({
}); });
*/ */
</script> </script>
<style lang="scss" scoped>
</style>

View File

@ -53,6 +53,3 @@ const menu = [{
action: setList, action: setList,
}]; }];
</script> </script>
<style lang="scss" scoped>
</style>

View File

@ -8,12 +8,12 @@
<span style="margin-left: 8px;">{{ column.name }}</span> <span style="margin-left: 8px;">{{ column.name }}</span>
</template> </template>
<div v-if="disabled" class="iwaalbte"> <div v-if="disabled" :class="$style.disabled">
<p> <p :class="$style.disabledTitle">
<i class="ti ti-minus-circle"></i> <i class="ti ti-minus-circle"></i>
{{ $t('disabled-timeline.title') }} {{ $t('disabled-timeline.title') }}
</p> </p>
<p class="desc">{{ $t('disabled-timeline.description') }}</p> <p :class="$style.disabledDescription">{{ $t('disabled-timeline.description') }}</p>
</div> </div>
<XTimeline v-else-if="column.tl" ref="timeline" :key="column.tl" :src="column.tl" @after="() => emit('loaded')"/> <XTimeline v-else-if="column.tl" ref="timeline" :key="column.tl" :src="column.tl" @after="() => emit('loaded')"/>
</XColumn> </XColumn>
@ -80,16 +80,16 @@ const menu = [{
}]; }];
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.iwaalbte { .disabled {
text-align: center; text-align: center;
}
> p { .disabledTitle {
margin: 16px; margin: 16px;
}
&.desc { .disabledDescription {
font-size: 14px; font-size: 90%;
}
}
} }
</style> </style>

View File

@ -2,8 +2,8 @@
<XColumn :menu="menu" :naked="true" :column="column" :is-stacked="isStacked" @parent-focus="$event => emit('parent-focus', $event)"> <XColumn :menu="menu" :naked="true" :column="column" :is-stacked="isStacked" @parent-focus="$event => emit('parent-focus', $event)">
<template #header><i class="ti ti-apps" style="margin-right: 8px;"></i>{{ column.name }}</template> <template #header><i class="ti ti-apps" style="margin-right: 8px;"></i>{{ column.name }}</template>
<div class="wtdtxvec"> <div :class="$style.root">
<div v-if="!(column.widgets && column.widgets.length > 0) && !edit" class="intro">{{ i18n.ts._deck.widgetsIntroduction }}</div> <div v-if="!(column.widgets && column.widgets.length > 0) && !edit" :class="$style.intro">{{ i18n.ts._deck.widgetsIntroduction }}</div>
<XWidgets :edit="edit" :widgets="column.widgets ?? []" @add-widget="addWidget" @remove-widget="removeWidget" @update-widget="updateWidget" @update-widgets="updateWidgets" @exit="edit = false"/> <XWidgets :edit="edit" :widgets="column.widgets ?? []" @add-widget="addWidget" @remove-widget="removeWidget" @update-widget="updateWidget" @update-widgets="updateWidgets" @exit="edit = false"/>
</div> </div>
</XColumn> </XColumn>
@ -54,16 +54,16 @@ const menu = [{
}]; }];
</script> </script>
<style lang="scss" scoped> <style lang="scss" module>
.wtdtxvec { .root {
--margin: 8px; --margin: 8px;
--panelBorder: none; --panelBorder: none;
padding: 0 var(--margin); padding: 0 var(--margin);
}
> .intro { .intro {
padding: 16px; padding: 16px;
text-align: center; text-align: center;
}
} }
</style> </style>