Merge branch 'dev'
This commit is contained in:
commit
06932b7b09
1 changed files with 4 additions and 5 deletions
|
|
@ -30,11 +30,10 @@ function lurk(id: string) {
|
|||
.catch(() => { throw new Error("Guild is not lurkable"); });
|
||||
}
|
||||
|
||||
|
||||
export default definePlugin({
|
||||
name: "BetterInvites",
|
||||
description: "See invites expiration date, view inviter profile and preview discoverable servers before joining by clicking their name",
|
||||
authors: [EquicordDevs.iamme],
|
||||
authors: [EquicordDevs.iamme, EquicordDevs.thororen],
|
||||
patches: [
|
||||
{
|
||||
find: ".hideDetailsButtonContainer,",
|
||||
|
|
@ -68,6 +67,7 @@ export default definePlugin({
|
|||
},
|
||||
],
|
||||
RenderTip(expires_at: string) {
|
||||
if (!expires_at) return null;
|
||||
const timestamp = <>{Parser.parse(`<t:${Math.round(new Date(expires_at).getTime() / 1000)}:R>`)}</>;
|
||||
const tooltipText = (
|
||||
<>
|
||||
|
|
@ -75,7 +75,6 @@ export default definePlugin({
|
|||
</>
|
||||
);
|
||||
|
||||
|
||||
return (
|
||||
<Tooltip text={tooltipText}>
|
||||
{({ onMouseEnter, onMouseLeave }) => (
|
||||
|
|
@ -91,8 +90,8 @@ export default definePlugin({
|
|||
);
|
||||
},
|
||||
Header(inviter: User | undefined, guildName: string) {
|
||||
const currentUserId = UserStore.getCurrentUser().id;
|
||||
if (!inviter || currentUserId === inviter.id) return null;
|
||||
const userId = UserStore.getCurrentUser().id;
|
||||
if (!inviter || userId === inviter.id) return null;
|
||||
return (
|
||||
<div className="vc-bi-header-inner">
|
||||
<img
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue