Feat: InstanceTicker를 클릭해 노트를 자세히 볼 수 있음

This commit is contained in:
NoriDev 2023-12-01 17:27:54 +09:00
parent 93cc3a2311
commit 5fde0c9186
2 changed files with 11 additions and 1 deletions

View file

@ -46,6 +46,8 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGE
### Client
- Feat: 데이터 절약 모드로 코드 하이라이트 로드를 줄일 수 있음 (misskey-dev/misskey#12526)
- Feat: InstanceTicker를 클릭해 노트를 자세히 볼 수 있음
- 리모트에서 수신된 노트인 경우, '리모트에서 보기'로 작동함
- Enhance: 사운드 설정을 기본값으로 복원하거나 저장할 때 확실하게 표시함
- Enhance: 리모트 서버와 동일한 이모지가 존재하지 않는 경우 '이모지 복사'를 비활성화함
- Enhance: 아이콘 장식을 바로 업로드 하거나 드라이브에서 불러올 수 있음 ([Secineralyr/misskey.dream@e358212d](https://github.com/Secineralyr/misskey.dream/commit/e358212da93256749e31d9e0ca9dd2ed37fd548e), [Secineralyr/misskey.dream@52592fea](https://github.com/Secineralyr/misskey.dream/commit/52592fea52684497ba7e07f173aac2b1083afcb1))

View file

@ -43,7 +43,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkTime :time="note.createdAt" :mode="defaultStore.state.enableAbsoluteTime ? 'absolute' : 'relative'" colored/>
</MkA>
</div>
<div :style="$style.info"><MkInstanceTicker v-if="showTicker" :instance="note.user.instance"/></div>
<div :style="$style.info"><MkInstanceTicker v-if="showTicker" :instance="note.user.instance" @click.stop="showOnRemote"/></div>
</div>
</header>
</template>
@ -56,6 +56,7 @@ import { notePage } from '@/filters/note.js';
import { userPage } from '@/filters/user.js';
import { defaultStore } from '@/store.js';
import { deepClone } from '@/scripts/clone.js';
import { useRouter } from '@/router.js';
import MkInstanceTicker from '@/components/MkInstanceTicker.vue';
const props = defineProps<{
@ -66,6 +67,13 @@ const mock = inject<boolean>('mock', false);
let note = $ref(deepClone(props.note));
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && note.user.instance);
const router = useRouter();
function showOnRemote() {
if (props.note.url ?? props.note.uri === undefined) router.push(notePage(note));
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
else window.open(props.note.url ?? props.note.uri);
}
</script>
<style lang="scss" module>