summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkSubNoteContent.vue
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-01-14 15:05:23 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-01-14 15:05:23 +0900
commitab1124abba80bcd2c2c3882a4fd55d1463850827 (patch)
treeaad3fbc1f5ce63a94c124dedc35dcc02bcbbd48f /packages/frontend/src/components/MkSubNoteContent.vue
parentrefactor(client): use css modules (diff)
downloadsharkey-ab1124abba80bcd2c2c3882a4fd55d1463850827.tar.gz
sharkey-ab1124abba80bcd2c2c3882a4fd55d1463850827.tar.bz2
sharkey-ab1124abba80bcd2c2c3882a4fd55d1463850827.zip
refactor(client): use css modules
Diffstat (limited to 'packages/frontend/src/components/MkSubNoteContent.vue')
-rw-r--r--packages/frontend/src/components/MkSubNoteContent.vue48
1 files changed, 25 insertions, 23 deletions
diff --git a/packages/frontend/src/components/MkSubNoteContent.vue b/packages/frontend/src/components/MkSubNoteContent.vue
index 79eb9ccf45..482a43f474 100644
--- a/packages/frontend/src/components/MkSubNoteContent.vue
+++ b/packages/frontend/src/components/MkSubNoteContent.vue
@@ -1,11 +1,11 @@
<template>
-<div class="wrmlmaau" :class="{ collapsed }">
- <div class="body">
+<div :class="[$style.root, { [$style.collapsed]: collapsed }]">
+ <div :class="$style.body">
<span v-if="note.isHidden" style="opacity: 0.5">({{ i18n.ts.private }})</span>
<span v-if="note.deletedAt" style="opacity: 0.5">({{ i18n.ts.deleted }})</span>
- <MkA v-if="note.replyId" class="reply" :to="`/notes/${note.replyId}`"><i class="ti ti-arrow-back-up"></i></MkA>
+ <MkA v-if="note.replyId" :class="$style.reply" :to="`/notes/${note.replyId}`"><i class="ti ti-arrow-back-up"></i></MkA>
<Mfm v-if="note.text" v-once :text="note.text" :author="note.user" :i="$i"/>
- <MkA v-if="note.renoteId" class="rp" :to="`/notes/${note.renoteId}`">RN: ...</MkA>
+ <MkA v-if="note.renoteId" :class="$style.rp" :to="`/notes/${note.renoteId}`">RN: ...</MkA>
</div>
<details v-if="note.files.length > 0">
<summary>({{ $t('withNFiles', { n: note.files.length }) }})</summary>
@@ -15,8 +15,8 @@
<summary>{{ i18n.ts.poll }}</summary>
<MkPoll :note="note"/>
</details>
- <button v-if="collapsed" class="fade _button" @click="collapsed = false">
- <span>{{ i18n.ts.showMore }}</span>
+ <button v-if="collapsed" :class="$style.fade" class="_button" @click="collapsed = false">
+ <span :class="$style.fadeLabel">{{ i18n.ts.showMore }}</span>
</button>
</div>
</template>
@@ -39,23 +39,10 @@ const collapsed = $ref(
));
</script>
-<style lang="scss" scoped>
-.wrmlmaau {
+<style lang="scss" module>
+.root {
overflow-wrap: break-word;
- > .body {
- > .reply {
- margin-right: 6px;
- color: var(--accent);
- }
-
- > .rp {
- margin-left: 4px;
- font-style: oblique;
- color: var(--renote);
- }
- }
-
&.collapsed {
position: relative;
max-height: 9em;
@@ -70,7 +57,7 @@ const collapsed = $ref(
height: 64px;
background: linear-gradient(0deg, var(--panel), var(--X15));
- > span {
+ > .fadeLabel {
display: inline-block;
background: var(--panel);
padding: 6px 10px;
@@ -80,11 +67,26 @@ const collapsed = $ref(
}
&:hover {
- > span {
+ > .fadeLabel {
background: var(--panelHighlight);
}
}
}
}
}
+
+.body {
+
+}
+
+.reply {
+ margin-right: 6px;
+ color: var(--accent);
+}
+
+.rp {
+ margin-left: 4px;
+ font-style: oblique;
+ color: var(--renote);
+}
</style>