Merge branch 'develop' into fix/more-accessibility
This commit is contained in:
commit
4a9e442abb
@ -95,7 +95,7 @@ If you have access to a server that supports one of the sources below, I recomme
|
|||||||
|
|
||||||
### 🏗️ Build dependencies
|
### 🏗️ 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
|
- 🦬 C/C++ compiler & build tools
|
||||||
- `build-essential` on Debian/Ubuntu Linux
|
- `build-essential` on Debian/Ubuntu Linux
|
||||||
- `base-devel` on Arch Linux
|
- `base-devel` on Arch Linux
|
||||||
|
@ -572,6 +572,7 @@ defineExpose({
|
|||||||
font-size: 1.05em;
|
font-size: 1.05em;
|
||||||
overflow: clip;
|
overflow: clip;
|
||||||
contain: content;
|
contain: content;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
|
||||||
// これらの指定はパフォーマンス向上には有効だが、ノートの高さは一定でないため、
|
// これらの指定はパフォーマンス向上には有効だが、ノートの高さは一定でないため、
|
||||||
// 下の方までスクロールすると上のノートの高さがここで決め打ちされたものに変化し、表示しているノートの位置が変わってしまう
|
// 下の方までスクロールすると上のノートの高さがここで決め打ちされたものに変化し、表示しているノートの位置が変わってしまう
|
||||||
@ -820,6 +821,10 @@ defineExpose({
|
|||||||
color: var(--fgHighlighted);
|
color: var(--fgHighlighted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
> i {
|
||||||
|
display: inline !important;
|
||||||
|
}
|
||||||
|
|
||||||
> .count {
|
> .count {
|
||||||
display: inline;
|
display: inline;
|
||||||
margin: 0 0 0 8px;
|
margin: 0 0 0 8px;
|
||||||
|
@ -506,6 +506,10 @@ function noteClick(e) {
|
|||||||
color: var(--fgHighlighted);
|
color: var(--fgHighlighted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
> i {
|
||||||
|
display: inline !important;
|
||||||
|
}
|
||||||
|
|
||||||
> .count {
|
> .count {
|
||||||
display: inline;
|
display: inline;
|
||||||
margin: 0 0 0 8px;
|
margin: 0 0 0 8px;
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
ref="buttonRef"
|
ref="buttonRef"
|
||||||
v-tooltip.noDelay.bottom="i18n.ts.renote"
|
v-tooltip.noDelay.bottom="i18n.ts.renote"
|
||||||
class="button _button canRenote"
|
class="button _button canRenote"
|
||||||
|
:class="{ renoted: hasRenotedBefore }"
|
||||||
@click="renote(false, $event)"
|
@click="renote(false, $event)"
|
||||||
>
|
>
|
||||||
<i class="ph-repeat ph-bold ph-lg"></i>
|
<i class="ph-repeat ph-bold ph-lg"></i>
|
||||||
@ -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();
|
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<MenuItem> = [];
|
let buttonActions: Array<MenuItem> = [];
|
||||||
|
|
||||||
if (props.note.visibility === "public") {
|
if (props.note.visibility === "public") {
|
||||||
@ -88,6 +90,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => {
|
|||||||
renoteId: props.note.id,
|
renoteId: props.note.id,
|
||||||
visibility: "public",
|
visibility: "public",
|
||||||
});
|
});
|
||||||
|
hasRenotedBefore = true;
|
||||||
const el =
|
const el =
|
||||||
ev &&
|
ev &&
|
||||||
((ev.currentTarget ?? ev.target) as
|
((ev.currentTarget ?? ev.target) as
|
||||||
@ -114,6 +117,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => {
|
|||||||
renoteId: props.note.id,
|
renoteId: props.note.id,
|
||||||
visibility: "home",
|
visibility: "home",
|
||||||
});
|
});
|
||||||
|
hasRenotedBefore = true;
|
||||||
const el =
|
const el =
|
||||||
ev &&
|
ev &&
|
||||||
((ev.currentTarget ?? ev.target) as
|
((ev.currentTarget ?? ev.target) as
|
||||||
@ -141,6 +145,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => {
|
|||||||
visibility: "specified",
|
visibility: "specified",
|
||||||
visibleUserIds: props.note.visibleUserIds,
|
visibleUserIds: props.note.visibleUserIds,
|
||||||
});
|
});
|
||||||
|
hasRenotedBefore = true;
|
||||||
const el =
|
const el =
|
||||||
ev &&
|
ev &&
|
||||||
((ev.currentTarget ?? ev.target) as
|
((ev.currentTarget ?? ev.target) as
|
||||||
@ -165,6 +170,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => {
|
|||||||
renoteId: props.note.id,
|
renoteId: props.note.id,
|
||||||
visibility: "followers",
|
visibility: "followers",
|
||||||
});
|
});
|
||||||
|
hasRenotedBefore = true;
|
||||||
const el =
|
const el =
|
||||||
ev &&
|
ev &&
|
||||||
((ev.currentTarget ?? ev.target) as
|
((ev.currentTarget ?? ev.target) as
|
||||||
@ -202,6 +208,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => {
|
|||||||
localOnly: true,
|
localOnly: true,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
hasRenotedBefore = true;
|
||||||
const el =
|
const el =
|
||||||
ev &&
|
ev &&
|
||||||
((ev.currentTarget ?? ev.target) as
|
((ev.currentTarget ?? ev.target) as
|
||||||
@ -240,6 +247,7 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => {
|
|||||||
os.api("notes/unrenote", {
|
os.api("notes/unrenote", {
|
||||||
noteId: props.note.id,
|
noteId: props.note.id,
|
||||||
});
|
});
|
||||||
|
hasRenotedBefore = false;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -253,7 +261,9 @@ const renote = async (viaKeyboard = false, ev?: MouseEvent) => {
|
|||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
&.renoted {
|
&.renoted {
|
||||||
background: var(--accent);
|
color: var(--accent) !important;
|
||||||
|
opacity: 1 !important;
|
||||||
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -36,9 +36,7 @@
|
|||||||
v-if="metadata.avatar"
|
v-if="metadata.avatar"
|
||||||
class="avatar"
|
class="avatar"
|
||||||
:user="metadata.avatar"
|
:user="metadata.avatar"
|
||||||
:disable-preview="true"
|
|
||||||
:show-indicator="true"
|
:show-indicator="true"
|
||||||
disableLink
|
|
||||||
/>
|
/>
|
||||||
<i
|
<i
|
||||||
v-else-if="metadata.icon && !narrow"
|
v-else-if="metadata.icon && !narrow"
|
||||||
@ -427,7 +425,6 @@ onUnmounted(() => {
|
|||||||
height: $size;
|
height: $size;
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
margin: 0 8px;
|
margin: 0 8px;
|
||||||
pointer-events: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
> .icon {
|
> .icon {
|
||||||
|
Loading…
Reference in New Issue
Block a user