Skip to content

Commit

Permalink
revert: enhance(frontend): 投稿されてから時間が経過しているノートであることを視覚的に分かりやすく
Browse files Browse the repository at this point in the history
  • Loading branch information
kanarikanaru committed Nov 19, 2023
1 parent d1033f0 commit c48a747
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 19 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@

### Client
- Enhance: TLの返信表示オプションを記憶するように
- Enhance: 投稿されてから時間が経過しているノートであることを視覚的に分かりやすく

### Server
- Enhance: タイムライン取得時のパフォーマンスを向上
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/MkNoteDetailed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<footer>
<div :class="$style.noteFooterInfo">
<MkA :to="notePage(appearNote)">
<MkTime :time="appearNote.createdAt" mode="detail" colored/>
<MkTime :time="appearNote.createdAt" mode="detail"/>
</MkA>
</div>
<MkReactionsViewer ref="reactionsViewer" :note="appearNote"/>
Expand Down
7 changes: 2 additions & 5 deletions packages/frontend/src/components/MkNoteHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ SPDX-License-Identifier: AGPL-3.0-only
<img v-for="role in note.user.badgeRoles" :key="role.id" v-tooltip="role.name" :class="$style.badgeRole" :src="role.iconUrl"/>
</div>
<div :class="$style.info">
<div v-if="mock">
<MkTime :time="note.createdAt" colored/>
</div>
<MkA v-else :to="notePage(note)">
<MkTime :time="note.createdAt" colored/>
<MkA :to="notePage(note)">
<MkTime :time="note.createdAt"/>
</MkA>
<span v-if="note.visibility !== 'public'" style="margin-left: 0.5em;" :title="i18n.ts._visibility[note.visibility]">
<i v-if="note.visibility === 'home'" class="ti ti-home"></i>
Expand Down
13 changes: 1 addition & 12 deletions packages/frontend/src/components/global/MkTime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-->

<template>
<time :title="absolute" :class="{ [$style.old1]: colored && (ago > 60 * 60 * 24 * 90), [$style.old2]: colored && (ago > 60 * 60 * 24 * 180) }">
<time :title="absolute">
<template v-if="invalid">{{ i18n.ts._ago.invalid }}</template>
<template v-else-if="mode === 'relative'">{{ relative }}</template>
<template v-else-if="mode === 'absolute'">{{ absolute }}</template>
Expand All @@ -22,7 +22,6 @@ const props = withDefaults(defineProps<{
time: Date | string | number | null;
origin?: Date | null;
mode?: 'relative' | 'absolute' | 'detail';
colored?: boolean;
}>(), {
origin: isChromatic() ? new Date('2023-04-01T00:00:00Z') : null,
mode: 'relative',
Expand Down Expand Up @@ -83,13 +82,3 @@ if (!invalid && props.origin === null && (props.mode === 'relative' || props.mod
});
}
</script>

<style lang="scss" module>
.old1 {
color: var(--warn);
}

.old1.old2 {
color: var(--error);
}
</style>

0 comments on commit c48a747

Please sign in to comment.