mirror of
https://github.com/NohamR/lanyard-profile-readme.git
synced 2026-05-26 04:17:19 +00:00
add hideBadges param
This commit is contained in:
@@ -14,6 +14,7 @@ type Parameters = {
|
|||||||
hideDiscrim?: string;
|
hideDiscrim?: string;
|
||||||
hideStatus?: string;
|
hideStatus?: string;
|
||||||
hideTimestamp?: string;
|
hideTimestamp?: string;
|
||||||
|
hideBadges?: string;
|
||||||
borderRadius?: string;
|
borderRadius?: string;
|
||||||
idleMessage?: string;
|
idleMessage?: string;
|
||||||
};
|
};
|
||||||
@@ -52,6 +53,7 @@ const renderCard = async (body: LanyardTypes.Root, params: Parameters): Promise<
|
|||||||
discrim = "show",
|
discrim = "show",
|
||||||
hideStatus = "false",
|
hideStatus = "false",
|
||||||
hideTimestamp = "false",
|
hideTimestamp = "false",
|
||||||
|
hideBadges = "false",
|
||||||
borderRadius = "10px",
|
borderRadius = "10px",
|
||||||
idleMessage = "I'm not currently doing anything!";
|
idleMessage = "I'm not currently doing anything!";
|
||||||
|
|
||||||
@@ -60,6 +62,7 @@ const renderCard = async (body: LanyardTypes.Root, params: Parameters): Promise<
|
|||||||
if (params.animated === "false") avatarExtension = "webp";
|
if (params.animated === "false") avatarExtension = "webp";
|
||||||
if (params.hideStatus === "true") hideStatus = "true";
|
if (params.hideStatus === "true") hideStatus = "true";
|
||||||
if (params.hideTimestamp === "true") hideTimestamp = "true";
|
if (params.hideTimestamp === "true") hideTimestamp = "true";
|
||||||
|
if (params.hideBadges === "true") hideBadges = "true";
|
||||||
if (params.hideDiscrim === "true") discrim = "hide";
|
if (params.hideDiscrim === "true") discrim = "hide";
|
||||||
if (params.theme === "light") {
|
if (params.theme === "light") {
|
||||||
backgroundColor = "#eee";
|
backgroundColor = "#eee";
|
||||||
@@ -200,7 +203,7 @@ const renderCard = async (body: LanyardTypes.Root, params: Parameters): Promise<
|
|||||||
}
|
}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
${flags
|
${hideBadges == "true" ? '' : flags
|
||||||
.map(
|
.map(
|
||||||
v => `
|
v => `
|
||||||
<img src="data:image/png;base64,${Badges[v]}" style="
|
<img src="data:image/png;base64,${Badges[v]}" style="
|
||||||
|
|||||||
Reference in New Issue
Block a user