summaryrefslogtreecommitdiff
path: root/packages/frontend/src/widgets
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-05-14 10:21:56 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-05-14 10:21:56 +0900
commit8c97c54cfacd201e480dffb73db3fd0124532edb (patch)
tree676460f2318867865237f3ce11defd23afe72228 /packages/frontend/src/widgets
parent:art: (diff)
downloadsharkey-8c97c54cfacd201e480dffb73db3fd0124532edb.tar.gz
sharkey-8c97c54cfacd201e480dffb73db3fd0124532edb.tar.bz2
sharkey-8c97c54cfacd201e480dffb73db3fd0124532edb.zip
refactor(frontend): use css modules
Diffstat (limited to 'packages/frontend/src/widgets')
-rw-r--r--packages/frontend/src/widgets/WidgetActivity.chart.vue18
-rw-r--r--packages/frontend/src/widgets/WidgetAichan.vue6
-rw-r--r--packages/frontend/src/widgets/WidgetButton.vue5
3 files changed, 14 insertions, 15 deletions
diff --git a/packages/frontend/src/widgets/WidgetActivity.chart.vue b/packages/frontend/src/widgets/WidgetActivity.chart.vue
index b61e419f94..cc4df65dd2 100644
--- a/packages/frontend/src/widgets/WidgetActivity.chart.vue
+++ b/packages/frontend/src/widgets/WidgetActivity.chart.vue
@@ -1,26 +1,30 @@
<template>
-<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`" @mousedown.prevent="onMousedown">
+<svg :viewBox="`0 0 ${ viewBoxX } ${ viewBoxY }`" :class="$style.root" @mousedown.prevent="onMousedown">
<polyline
:points="pointsNote"
fill="none"
stroke-width="1"
- stroke="#41ddde"/>
+ stroke="#41ddde"
+ />
<polyline
:points="pointsReply"
fill="none"
stroke-width="1"
- stroke="#f7796c"/>
+ stroke="#f7796c"
+ />
<polyline
:points="pointsRenote"
fill="none"
stroke-width="1"
- stroke="#a1de41"/>
+ stroke="#a1de41"
+ />
<polyline
:points="pointsTotal"
fill="none"
stroke-width="1"
stroke="#555"
- stroke-dasharray="2 2"/>
+ stroke-dasharray="2 2"
+ />
</svg>
</template>
@@ -81,8 +85,8 @@ function render() {
}
</script>
-<style lang="scss" scoped>
-svg {
+<style lang="scss" module>
+.root {
display: block;
padding: 16px;
width: 100%;
diff --git a/packages/frontend/src/widgets/WidgetAichan.vue b/packages/frontend/src/widgets/WidgetAichan.vue
index 37326ee981..0c485441d2 100644
--- a/packages/frontend/src/widgets/WidgetAichan.vue
+++ b/packages/frontend/src/widgets/WidgetAichan.vue
@@ -1,6 +1,6 @@
<template>
<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>
</template>
@@ -64,8 +64,8 @@ defineExpose<WidgetComponentExpose>({
});
</script>
-<style lang="scss" scoped>
-.dedjhjmo {
+<style lang="scss" module>
+.root {
width: 100%;
height: 350px;
border: none;
diff --git a/packages/frontend/src/widgets/WidgetButton.vue b/packages/frontend/src/widgets/WidgetButton.vue
index 9eee9680db..98260caeef 100644
--- a/packages/frontend/src/widgets/WidgetButton.vue
+++ b/packages/frontend/src/widgets/WidgetButton.vue
@@ -101,8 +101,3 @@ defineExpose<WidgetComponentExpose>({
id: props.widget ? props.widget.id : null,
});
</script>
-
-<style lang="scss" scoped>
-.mkw-button {
-}
-</style>