add warning to showOnRemote
This commit is contained in:
parent
7715f36a99
commit
e5ffb857d8
6 changed files with 41 additions and 11 deletions
|
|
@ -79,7 +79,7 @@ Detailed view of a note in the Sharkey style. Used when opening a note onto its
|
|||
<span v-if="appearNote.updatedAt" ref="menuVersionsButton" style="margin-left: 0.5em;" title="Edited" @mousedown="menuVersions()"><i class="ph-pencil-simple ph-bold ph-lg"></i></span>
|
||||
<span v-if="appearNote.localOnly" style="margin-left: 0.5em;" :title="i18n.ts._visibility['disableFederation']"><i class="ti ti-rocket-off"></i></span>
|
||||
</div>
|
||||
<SkInstanceTicker v-if="showTicker" :host="appearNote.user.host" :instance="appearNote.user.instance"/>
|
||||
<SkInstanceTicker v-if="showTicker" style="cursor: pointer;" :host="appearNote.user.host" :instance="appearNote.user.instance" @click.stop="showOnRemote(props.note)"/>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
|
@ -290,6 +290,7 @@ import SkNoteTranslation from '@/components/SkNoteTranslation.vue';
|
|||
import { getSelfNoteIds } from '@/utility/get-self-note-ids.js';
|
||||
import SkUrlPreviewGroup from '@/components/SkUrlPreviewGroup.vue';
|
||||
import MkNoteSub from '@/components/MkNoteSub.vue';
|
||||
import { showOnRemote } from '@/utility/show-on-remote.js';
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
note: Misskey.entities.Note;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ Header for a note in the Sharkey style, displaying info such as username and cre
|
|||
<span v-if="note.channel" style="margin-left: 0.5em;" :title="note.channel.name"><i class="ph-television ph-bold ph-lg"></i></span>
|
||||
</div>
|
||||
<div :class="$style.info">
|
||||
<SkInstanceTicker v-if="showTicker" style="cursor: pointer;" :instance="note.user.instance" :host="note.user.host" @click.stop="showOnRemote()"/>
|
||||
<SkInstanceTicker v-if="showTicker" style="cursor: pointer;" :instance="note.user.instance" :host="note.user.host" @click.stop="showOnRemote(props.note)"/>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
|
@ -56,7 +56,7 @@ Header for a note in the Sharkey style, displaying info such as username and cre
|
|||
<div v-if="note.user.badgeRoles" :class="$style.badgeRoles">
|
||||
<img v-for="(role, i) in note.user.badgeRoles" :key="i" v-tooltip="role.name" :class="$style.badgeRole" :src="role.iconUrl ?? ''"/>
|
||||
</div>
|
||||
<SkInstanceTicker v-if="showTicker && !isMobile && prefer.s.showTickerOnReplies" style="cursor: pointer; max-height: 5px; top: 3px; position: relative; margin-top: 0 !important;" :instance="note.user.instance" :host="note.user.host" @click.stop="showOnRemote()"/>
|
||||
<SkInstanceTicker v-if="showTicker && !isMobile && prefer.s.showTickerOnReplies" style="cursor: pointer; max-height: 5px; top: 3px; position: relative; margin-top: 0 !important;" :instance="note.user.instance" :host="note.user.host" @click.stop="showOnRemote(props.note)"/>
|
||||
<div :class="$style.classicInfo">
|
||||
<div v-if="mock">
|
||||
<MkTime :time="note.createdAt" colored/>
|
||||
|
|
@ -89,6 +89,7 @@ import { prefer } from '@/preferences';
|
|||
import { useRouter } from '@/router';
|
||||
import { deviceKind } from '@/utility/device-kind';
|
||||
import SkInstanceTicker from '@/components/SkInstanceTicker.vue';
|
||||
import { showOnRemote } from '@/utility/show-on-remote.js';
|
||||
|
||||
const props = defineProps<{
|
||||
note: Misskey.entities.Note;
|
||||
|
|
@ -107,11 +108,6 @@ async function menuVersions(): Promise<void> {
|
|||
popupMenu(menu, menuVersionsButton.value).then(focus).finally(cleanup);
|
||||
}
|
||||
|
||||
function showOnRemote() {
|
||||
if (props.note.url ?? props.note.uri === undefined) router.push(notePage(props.note));
|
||||
else window.open(props.note.url ?? props.note.uri);
|
||||
}
|
||||
|
||||
const mock = inject(DI.mock, false);
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue