summaryrefslogtreecommitdiff
path: root/packages/frontend/src/pages/note.vue
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-05-19 16:20:53 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-05-19 16:20:53 +0900
commit95470a40a7c2377d8cc8a2b923d9214ebc6f7f82 (patch)
tree3a954c3984f58b25f4f55b46a02937cb95303a99 /packages/frontend/src/pages/note.vue
parentrefactor(frontend): use css module (diff)
downloadmisskey-95470a40a7c2377d8cc8a2b923d9214ebc6f7f82.tar.gz
misskey-95470a40a7c2377d8cc8a2b923d9214ebc6f7f82.tar.bz2
misskey-95470a40a7c2377d8cc8a2b923d9214ebc6f7f82.zip
refactor
Diffstat (limited to 'packages/frontend/src/pages/note.vue')
-rw-r--r--packages/frontend/src/pages/note.vue72
1 files changed, 28 insertions, 44 deletions
diff --git a/packages/frontend/src/pages/note.vue b/packages/frontend/src/pages/note.vue
index d9baa1096a..c519cefbaf 100644
--- a/packages/frontend/src/pages/note.vue
+++ b/packages/frontend/src/pages/note.vue
@@ -1,33 +1,33 @@
<template>
<MkStickyContainer>
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
- <MkSpacer :content-max="800">
- <div class="fcuexfpr">
+ <MkSpacer :contentMax="800">
+ <div>
<Transition :name="defaultStore.state.animation ? 'fade' : ''" mode="out-in">
- <div v-if="note" class="note">
+ <div v-if="note">
<div v-if="showNext" class="_margin">
- <MkNotes class="" :pagination="nextPagination" :no-gap="true"/>
+ <MkNotes class="" :pagination="nextPagination" :noGap="true"/>
</div>
- <div class="main _margin">
- <MkButton v-if="!showNext && hasNext" class="load next" @click="showNext = true"><i class="ti ti-chevron-up"></i></MkButton>
- <div class="note _margin _gaps_s">
+ <div class="_margin">
+ <MkButton v-if="!showNext && hasNext" :class="$style.loadNext" @click="showNext = true"><i class="ti ti-chevron-up"></i></MkButton>
+ <div class="_margin _gaps_s">
<MkRemoteCaution v-if="note.user.host != null" :href="note.url ?? note.uri"/>
- <MkNoteDetailed :key="note.id" v-model:note="note" class="note"/>
+ <MkNoteDetailed :key="note.id" v-model:note="note" :class="$style.note"/>
</div>
- <div v-if="clips && clips.length > 0" class="clips _margin">
- <div class="title">{{ i18n.ts.clip }}</div>
+ <div v-if="clips && clips.length > 0" class="_margin">
+ <div style="font-weight: bold; padding: 12px;">{{ i18n.ts.clip }}</div>
<div class="_gaps">
<MkA v-for="item in clips" :key="item.id" :to="`/clips/${item.id}`">
<MkClipPreview :clip="item"/>
</MkA>
</div>
</div>
- <MkButton v-if="!showPrev && hasPrev" class="load prev" @click="showPrev = true"><i class="ti ti-chevron-down"></i></MkButton>
+ <MkButton v-if="!showPrev && hasPrev" :class="$style.loadPrev" @click="showPrev = true"><i class="ti ti-chevron-down"></i></MkButton>
</div>
<div v-if="showPrev" class="_margin">
- <MkNotes class="" :pagination="prevPagination" :no-gap="true"/>
+ <MkNotes class="" :pagination="prevPagination" :noGap="true"/>
</div>
</div>
<MkError v-else-if="error" @retry="fetchNote()"/>
@@ -137,7 +137,7 @@ definePageMetadata(computed(() => note ? {
} : null));
</script>
-<style lang="scss" scoped>
+<style lang="scss" module>
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.125s ease;
@@ -147,39 +147,23 @@ definePageMetadata(computed(() => note ? {
opacity: 0;
}
-.fcuexfpr {
- background: var(--bg);
-
- > .note {
- > .main {
- > .load {
- min-width: 0;
- margin: 0 auto;
- border-radius: 999px;
-
- &.next {
- margin-bottom: var(--margin);
- }
+.loadNext,
+.loadPrev {
+ min-width: 0;
+ margin: 0 auto;
+ border-radius: 999px;
+}
- &.prev {
- margin-top: var(--margin);
- }
- }
+.loadNext {
+ margin-bottom: var(--margin);
+}
- > .note {
- > .note {
- border-radius: var(--radius);
- background: var(--panel);
- }
- }
+.loadPrev {
+ margin-top: var(--margin);
+}
- > .clips {
- > .title {
- font-weight: bold;
- padding: 12px;
- }
- }
- }
- }
+.note {
+ border-radius: var(--radius);
+ background: var(--panel);
}
</style>