From 9c424ee04186a2602f011f2edf3d6701e2191b7e Mon Sep 17 00:00:00 2001 From: Freeplay Date: Sat, 3 Jun 2023 10:47:41 -0400 Subject: [PATCH 1/5] Fix blue highlight on post tap --- packages/client/src/components/MkNote.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/client/src/components/MkNote.vue b/packages/client/src/components/MkNote.vue index 7eca22a73..bf05f01a3 100644 --- a/packages/client/src/components/MkNote.vue +++ b/packages/client/src/components/MkNote.vue @@ -570,6 +570,7 @@ defineExpose({ font-size: 1.05em; overflow: clip; contain: content; + -webkit-tap-highlight-color: transparent; // これらの指定はパフォーマンス向上には有効だが、ノートの高さは一定でないため、 // 下の方までスクロールすると上のノートの高さがここで決め打ちされたものに変化し、表示しているノートの位置が変わってしまう From 3749f92cc8a348d4c25e41c8ff5a85c234403773 Mon Sep 17 00:00:00 2001 From: Kainoa Kanter Date: Sat, 3 Jun 2023 16:00:46 +0000 Subject: [PATCH 2/5] =?UTF-8?q?docs:=20=F0=9F=93=9D=20rust=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f4d7c4150..f2913b914 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ If you have access to a server that supports one of the sources below, I recomme ### 🏗️ Build dependencies -- 🦀 [Rust toolchain](https://www.rust-lang.org/) +- 🦀 At least [Rust](https://www.rust-lang.org/) v1.65.0 - 🦬 C/C++ compiler & build tools - `build-essential` on Debian/Ubuntu Linux - `base-devel` on Arch Linux From 47a38969eb71b4e2bb2285ef6fae2306014145f9 Mon Sep 17 00:00:00 2001 From: Freeplay Date: Sat, 3 Jun 2023 12:57:51 -0400 Subject: [PATCH 3/5] Highlight boost button if boosted! --- packages/client/src/components/MkNote.vue | 4 +++ packages/client/src/components/MkNoteSub.vue | 4 +++ .../client/src/components/MkRenoteButton.vue | 29 ++++++++++++------- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/packages/client/src/components/MkNote.vue b/packages/client/src/components/MkNote.vue index 58078200c..00758e7e4 100644 --- a/packages/client/src/components/MkNote.vue +++ b/packages/client/src/components/MkNote.vue @@ -821,6 +821,10 @@ defineExpose({ color: var(--fgHighlighted); } + > i { + display: inline !important; + } + > .count { display: inline; margin: 0 0 0 8px; diff --git a/packages/client/src/components/MkNoteSub.vue b/packages/client/src/components/MkNoteSub.vue index c26af1668..c006ebaff 100644 --- a/packages/client/src/components/MkNoteSub.vue +++ b/packages/client/src/components/MkNoteSub.vue @@ -506,6 +506,10 @@ function noteClick(e) { color: var(--fgHighlighted); } + > i { + display: inline !important; + } + > .count { display: inline; margin: 0 0 0 8px; diff --git a/packages/client/src/components/MkRenoteButton.vue b/packages/client/src/components/MkRenoteButton.vue index 4a8e329d0..b0fda56de 100644 --- a/packages/client/src/components/MkRenoteButton.vue +++ b/packages/client/src/components/MkRenoteButton.vue @@ -4,6 +4,7 @@ ref="buttonRef" v-tooltip.noDelay.bottom="i18n.ts.renote" class="button _button canRenote" + :class="{ renoted: hasRenotedBefore }" @click="renote(false, $event)" > @@ -64,17 +65,18 @@ useTooltip(buttonRef, async (showing) => { ); }); -const renote = async (viaKeyboard = false, ev?: MouseEvent) => { +let hasRenotedBefore = $ref(false); +os.api("notes/renotes", { + noteId: props.note.id, + userId: $i.id, + limit: 1, +}).then((res) => { + hasRenotedBefore = res.length > 0; +}); + +const renote = (viaKeyboard = false, ev?: MouseEvent) => { pleaseLogin(); - const renotes = await os.api("notes/renotes", { - noteId: props.note.id, - userId: $i.id, - limit: 1, - }); - - const hasRenotedBefore = renotes.length > 0; - let buttonActions: Array = []; if (props.note.visibility === "public") { @@ -88,6 +90,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => { renoteId: props.note.id, visibility: "public", }); + hasRenotedBefore = true; const el = ev && ((ev.currentTarget ?? ev.target) as @@ -114,6 +117,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => { renoteId: props.note.id, visibility: "home", }); + hasRenotedBefore = true; const el = ev && ((ev.currentTarget ?? ev.target) as @@ -141,6 +145,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => { visibility: "specified", visibleUserIds: props.note.visibleUserIds, }); + hasRenotedBefore = true; const el = ev && ((ev.currentTarget ?? ev.target) as @@ -165,6 +170,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => { renoteId: props.note.id, visibility: "followers", }); + hasRenotedBefore = true; const el = ev && ((ev.currentTarget ?? ev.target) as @@ -202,6 +208,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => { localOnly: true, } ); + hasRenotedBefore = true; const el = ev && ((ev.currentTarget ?? ev.target) as @@ -240,6 +247,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => { os.api("notes/unrenote", { noteId: props.note.id, }); + hasRenotedBefore = false; }, }); } @@ -253,7 +261,8 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => { cursor: default; } &.renoted { - background: var(--accent); + color: var(--accent) !important; + opacity: 1 !important; } } From 28780772cb83d39e911ba8fe5259b912a802ca15 Mon Sep 17 00:00:00 2001 From: Freeplay Date: Sat, 3 Jun 2023 13:43:08 -0400 Subject: [PATCH 4/5] tweak --- packages/client/src/components/MkRenoteButton.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/client/src/components/MkRenoteButton.vue b/packages/client/src/components/MkRenoteButton.vue index b0fda56de..6be8881c2 100644 --- a/packages/client/src/components/MkRenoteButton.vue +++ b/packages/client/src/components/MkRenoteButton.vue @@ -263,6 +263,7 @@ const renote = (viaKeyboard = false, ev?: MouseEvent) => { &.renoted { color: var(--accent) !important; opacity: 1 !important; + font-weight: 700; } } From 15b30231ebf71adfc27191e3f3c14ed9de97dba0 Mon Sep 17 00:00:00 2001 From: Freeplay Date: Sat, 3 Jun 2023 22:15:38 -0400 Subject: [PATCH 5/5] Allow clicking pfp in header of note page --- packages/client/src/components/global/MkPageHeader.vue | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/client/src/components/global/MkPageHeader.vue b/packages/client/src/components/global/MkPageHeader.vue index a000b16bc..f5dcf33c7 100644 --- a/packages/client/src/components/global/MkPageHeader.vue +++ b/packages/client/src/components/global/MkPageHeader.vue @@ -36,9 +36,7 @@ v-if="metadata.avatar" class="avatar" :user="metadata.avatar" - :disable-preview="true" :show-indicator="true" - disableLink /> { height: $size; vertical-align: bottom; margin: 0 8px; - pointer-events: none; } > .icon {