Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
merge: ui tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Marie authored Nov 1, 2023
2 parents fb3a2be + 6ee6ed6 commit a8e4616
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 8 deletions.
2 changes: 2 additions & 0 deletions packages/frontend/src/components/MkDateSeparatedList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ export default defineComponent({
}

.date-separated-list-nogap {
border-radius: var(--radius);

> * {
margin: 0 !important;
border: none;
Expand Down
6 changes: 5 additions & 1 deletion packages/frontend/src/components/MkMediaList.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>
<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
Expand Down Expand Up @@ -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%;
Expand Down
7 changes: 5 additions & 2 deletions packages/frontend/src/components/MkNote.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;">
Expand Down Expand Up @@ -852,7 +852,6 @@ function readPromo() {
}

.cw {
cursor: default;
display: block;
margin: 0;
padding: 0;
Expand Down Expand Up @@ -1096,4 +1095,8 @@ function readPromo() {
padding: 0 6px;
opacity: .8;
}

.clickToOpen {
cursor: pointer;
}
</style>
1 change: 1 addition & 0 deletions packages/frontend/src/components/MkNoteHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion packages/frontend/src/components/MkNoteSimple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ watch(() => props.expandAllCws, (expandAllCws) => {
}

.cw {
cursor: default;
display: block;
margin: 0;
padding: 0;
Expand Down
1 change: 0 additions & 1 deletion packages/frontend/src/components/MkNoteSub.vue
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,6 @@ if (props.detail) {
}

.cw {
cursor: default;
display: block;
margin: 0;
padding: 0;
Expand Down
2 changes: 2 additions & 0 deletions packages/frontend/src/components/MkNotes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ defineExpose({
<style lang="scss" module>
.root {
&.noGap {
border-radius: var(--radius);

> .notes {
background: color-mix(in srgb, var(--panel) 65%, transparent);
}
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/src/components/MkReactionsViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 5 additions & 1 deletion packages/frontend/src/components/MkSubNoteContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
2 changes: 1 addition & 1 deletion packages/frontend/src/components/global/MkAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ watch(() => props.user.avatarBlurhash, () => {
left: 0;
right: 0;
top: 0;
border-radius: var(--radius-full);
border-radius: 100%;
z-index: 1;
overflow: clip;
object-fit: cover;
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/user/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ onUnmounted(() => {
z-index: 2;
width: 120px;
height: 120px;
box-shadow: 1px 1px 3px rgba(#000, 0.2);
filter: drop-shadow(1px 1px 3px rgba(#000, 0.2));
}

> .roles {
Expand Down

0 comments on commit a8e4616

Please sign in to comment.