mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-24 16:26:44 -06:00
enhance: click to switch timestamp
This commit is contained in:
parent
e481c2ae96
commit
11f6dc9991
1 changed files with 12 additions and 3 deletions
|
@ -26,8 +26,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<div v-if="mock">
|
<div v-if="mock">
|
||||||
<MkTime :time="note.createdAt" colored/>
|
<MkTime :time="note.createdAt" colored/>
|
||||||
</div>
|
</div>
|
||||||
<MkA v-else :to="notePage(note)">
|
<MkA v-else @click="toggleDetail()">
|
||||||
<MkTime :time="note.createdAt" colored/>
|
<MkTime
|
||||||
|
:time="isDetail ? note.createdAt : note.createdAt"
|
||||||
|
:mode="isDetail ? 'detail' : undefined"
|
||||||
|
colored
|
||||||
|
/>
|
||||||
</MkA>
|
</MkA>
|
||||||
<span v-if="note.visibility !== 'public'" style="margin-left: 0.5em;" :title="i18n.ts._visibility[note.visibility]">
|
<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>
|
<i v-if="note.visibility === 'home'" class="ti ti-home"></i>
|
||||||
|
@ -42,13 +46,18 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { inject } from 'vue';
|
import { inject, ref } from 'vue';
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { notePage } from '@/filters/note.js';
|
import { notePage } from '@/filters/note.js';
|
||||||
import { userPage } from '@/filters/user.js';
|
import { userPage } from '@/filters/user.js';
|
||||||
import { defaultStore } from '@/store.js';
|
import { defaultStore } from '@/store.js';
|
||||||
|
|
||||||
|
const isDetail = ref(false);
|
||||||
|
const toggleDetail = () => {
|
||||||
|
isDetail.value = !isDetail.value;
|
||||||
|
};
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
note: Misskey.entities.Note;
|
note: Misskey.entities.Note;
|
||||||
}>();
|
}>();
|
||||||
|
|
Loading…
Reference in a new issue