upd: pointer on clickToOpen-able parts of notes

This commit is contained in:
ShittyKopper 2023-10-30 08:30:37 +03:00
parent 4af8bbb5c0
commit a796c8663b
7 changed files with 17 additions and 6 deletions

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-->
<template>
<div ref="root">
<div ref="root" :class="$style.root">
<XBanner v-for="media in mediaList.filter(media => !previewable(media))" :key="media.id" :media="media"/>
<div v-if="mediaList.filter(media => previewable(media)).length > 0" :class="$style.container">
<div
@ -260,6 +260,10 @@ const previewable = (file: Misskey.entities.DriveFile): boolean => {
</script>
<style lang="scss" module>
.root {
cursor: auto; /* not clickToOpen-able */
}
.container {
position: relative;
width: 100%;

View file

@ -49,7 +49,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<article v-else :class="$style.article" @contextmenu.stop="onContextmenu">
<div v-if="appearNote.channel" :class="$style.colorBar" :style="{ background: appearNote.channel.color }"></div>
<MkAvatar :class="$style.avatar" :user="appearNote.user" link preview/>
<div :class="$style.main" @click="defaultStore.state.clickToOpen ? noteclick(appearNote.id) : undefined">
<div :class="[$style.main, { [$style.clickToOpen]: defaultStore.state.clickToOpen }]" @click="defaultStore.state.clickToOpen ? noteclick(appearNote.id) : undefined">
<MkNoteHeader :note="appearNote" :mini="true" v-on:click.stop/>
<MkInstanceTicker v-if="showTicker" :instance="appearNote.user.instance"/>
<div style="container-type: inline-size;">
@ -852,7 +852,6 @@ function readPromo() {
}
.cw {
cursor: default;
display: block;
margin: 0;
padding: 0;
@ -1096,4 +1095,8 @@ function readPromo() {
padding: 0 6px;
opacity: .8;
}
.clickToOpen {
cursor: pointer;
}
</style>

View file

@ -56,6 +56,7 @@ async function menuVersions(viaKeyboard = false): Promise<void> {
display: flex;
align-items: baseline;
white-space: nowrap;
cursor: auto; /* not clickToOpen-able */
}
.name {

View file

@ -73,7 +73,6 @@ watch(() => props.expandAllCws, (expandAllCws) => {
}
.cw {
cursor: default;
display: block;
margin: 0;
padding: 0;

View file

@ -478,7 +478,6 @@ if (props.detail) {
}
.cw {
cursor: default;
display: block;
margin: 0;
padding: 0;

View file

@ -86,6 +86,7 @@ watch([() => props.note.reactions, () => props.maxNumber], ([newSource, maxNumbe
.root {
margin: 4px -2px 0 -2px;
cursor: auto; /* not clickToOpen-able */
&:empty {
display: none;

View file

@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template>
<div :class="[$style.root, { [$style.collapsed]: collapsed }]">
<div @click="defaultStore.state.clickToOpen ? noteclick(note.id) : undefined">
<div :class="{ [$style.clickToOpen]: defaultStore.state.clickToOpen }" @click="defaultStore.state.clickToOpen ? noteclick(note.id) : undefined">
<span v-if="note.isHidden" style="opacity: 0.5">({{ i18n.ts.private }})</span>
<span v-if="note.deletedAt" style="opacity: 0.5">({{ i18n.ts.deleted }})</span>
<MkA v-if="note.replyId" :class="$style.reply" :to="`/notes/${note.replyId}`" v-on:click.stop><i class="ph-arrow-bend-left-up ph-bold pg-lg"></i></MkA>
@ -134,4 +134,8 @@ const collapsed = $ref(isLong);
border-radius: var(--radius-ellipse);
box-shadow: 0 2px 6px rgb(0 0 0 / 20%);
}
.clickToOpen {
cursor: pointer;
}
</style>