mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-30 05:03:08 +02:00
fix: tooltips missing
This commit is contained in:
parent
7c480424a6
commit
5e166101e3
1 changed files with 53 additions and 14 deletions
|
@ -288,7 +288,45 @@ if (props.mock) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($i && !props.mock) {
|
if (!props.mock) {
|
||||||
|
useTooltip(renoteButton, async (showing) => {
|
||||||
|
const renotes = await os.api('notes/renotes', {
|
||||||
|
noteId: appearNote.id,
|
||||||
|
limit: 11,
|
||||||
|
});
|
||||||
|
|
||||||
|
const users = renotes.map(x => x.user);
|
||||||
|
|
||||||
|
if (users.length < 1) return;
|
||||||
|
|
||||||
|
os.popup(MkUsersTooltip, {
|
||||||
|
showing,
|
||||||
|
users,
|
||||||
|
count: appearNote.renoteCount,
|
||||||
|
targetElement: renoteButton.value,
|
||||||
|
}, {}, 'closed');
|
||||||
|
});
|
||||||
|
|
||||||
|
useTooltip(quoteButton, async (showing) => {
|
||||||
|
const renotes = await os.api('notes/renotes', {
|
||||||
|
noteId: appearNote.id,
|
||||||
|
limit: 11,
|
||||||
|
quote: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const users = renotes.map(x => x.user);
|
||||||
|
|
||||||
|
if (users.length < 1) return;
|
||||||
|
|
||||||
|
os.popup(MkUsersTooltip, {
|
||||||
|
showing,
|
||||||
|
users,
|
||||||
|
count: appearNote.renoteCount,
|
||||||
|
targetElement: quoteButton.value,
|
||||||
|
}, {}, 'closed');
|
||||||
|
});
|
||||||
|
|
||||||
|
if ($i) {
|
||||||
os.api("notes/renotes", {
|
os.api("notes/renotes", {
|
||||||
noteId: appearNote.id,
|
noteId: appearNote.id,
|
||||||
userId: $i.id,
|
userId: $i.id,
|
||||||
|
@ -306,6 +344,7 @@ if ($i && !props.mock) {
|
||||||
quoted.value = res.length > 0;
|
quoted.value = res.length > 0;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
type Visibility = 'public' | 'home' | 'followers' | 'specified';
|
type Visibility = 'public' | 'home' | 'followers' | 'specified';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue