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