stuff
This commit is contained in:
parent
2b13bca6b9
commit
0c47800f8d
|
@ -2507,14 +2507,14 @@ module.exports = (_ => {
|
|||
let activity = BDFDB.UserUtils.getActivity(id);
|
||||
return activity && activity.type == BDFDB.DiscordConstants.ActivityTypes.STREAMING ? "streaming" : LibraryModules.StatusMetaUtils.getStatus(id);
|
||||
};
|
||||
BDFDB.UserUtils.getStatusColor = function (status) {
|
||||
BDFDB.UserUtils.getStatusColor = function (status, useColor) {
|
||||
status = typeof status == "string" ? status.toLowerCase() : null;
|
||||
switch (status) {
|
||||
case "online": return BDFDB.DiscordConstants.Colors.STATUS_GREEN;
|
||||
case "mobile": return BDFDB.DiscordConstants.Colors.STATUS_GREEN;
|
||||
case "idle": return BDFDB.DiscordConstants.Colors.STATUS_YELLOW;
|
||||
case "dnd": return BDFDB.DiscordConstants.Colors.STATUS_RED;
|
||||
case "playing": return BDFDB.DiscordConstants.Colors.BRAND;
|
||||
case "playing": return useColor ? BDFDB.DiscordConstants.Colors.BRAND : "var(--bdfdb-blurple)";
|
||||
case "listening": return BDFDB.DiscordConstants.Colors.SPOTIFY;
|
||||
case "streaming": return BDFDB.DiscordConstants.Colors.TWITCH;
|
||||
default: return BDFDB.DiscordConstants.Colors.STATUS_GREY;
|
||||
|
@ -5977,7 +5977,7 @@ module.exports = (_ => {
|
|||
},
|
||||
children: this.props.items.map(item => BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Badges.TextBadge, {
|
||||
className: BDFDB.disCN.inputlistitem,
|
||||
color: BDFDB.DiscordConstants.Colors.BRAND,
|
||||
color: "var(--bdfdb-blurple)",
|
||||
style: {borderRadius: "3px"},
|
||||
text: [
|
||||
item,
|
||||
|
|
|
@ -2,10 +2,6 @@
|
|||
|
||||
:root {
|
||||
--bdfdb-blurple: rgb(114, 137, 218);
|
||||
--bdfdb-red: rgb(240, 71, 71);
|
||||
--bdfdb-yellow: rgb(250, 166, 26);
|
||||
--bdfdb-green: rgb(67, 181, 129);
|
||||
--bdfdb-grey: rgb(116, 127, 141);
|
||||
}
|
||||
|
||||
#pluginNotice[class=" "], #pluginNotice[class=""] {
|
||||
|
|
|
@ -235,7 +235,7 @@ module.exports = (_ => {
|
|||
if (e.instance.props.folderId) {
|
||||
this.removeTooltip(e.returnvalue);
|
||||
this.removeMask(e.returnvalue);
|
||||
let folderColor = BDFDB.ColorUtils.convert(e.instance.props.folderColor, "HEX") || BDFDB.DiscordConstants.Colors.BRAND;
|
||||
let folderColor = BDFDB.ColorUtils.convert(e.instance.props.folderColor, "HEX") || "var(--bdfdb-blurple)";
|
||||
let folderSize = Math.round(amounts.serverElementHeight * 0.6);
|
||||
this.addElementName(e.returnvalue, e.instance.props.folderName || BDFDB.LanguageUtils.LanguageStrings.SERVER_FOLDER_PLACEHOLDER, {
|
||||
wrap: true,
|
||||
|
|
|
@ -201,7 +201,7 @@ module.exports = (_ => {
|
|||
"Click on an Icon to toggle",
|
||||
BDFDB.ReactUtils.createElement("span", {
|
||||
className: BDFDB.disCN._friendnotificationstypelabel,
|
||||
style: {backgroundColor: BDFDB.DiscordConstants.Colors.BRAND},
|
||||
style: {backgroundColor: "var(--bdfdb-blurple)"},
|
||||
children: "Toast"
|
||||
}),
|
||||
"Notifications for that User: "
|
||||
|
|
|
@ -116,7 +116,7 @@ module.exports = (_ => {
|
|||
DESC: "descending"
|
||||
};
|
||||
|
||||
const pluginRepoIcon = `<svg width="34" height="31" viewBox="0 0 400 382"><path d="M0.000 183.023 L 0.000 366.046 46.377 366.046 L 92.754 366.046 92.754 312.629 L 92.754 259.213 127.223 259.213 C 174.433 259.213,187.432 257.146,210.766 245.926 C 311.105 197.681,301.344 41.358,195.859 7.193 C 173.603 -0.015,173.838 0.000,80.846 0.000 L 0.000 0.000 0.000 183.023 M157.615 88.195 C 193.007 97.413,198.827 152.678,166.407 171.674 C 158.993 176.019,155.494 176.398,122.807 176.398 L 92.754 176.398 92.754 131.677 L 92.754 86.957 122.807 86.957 C 146.807 86.957,153.819 87.206,157.615 88.195" stroke="none" fill="#7289da" fill-rule="evenodd"></path><path d="M226.647 3.824 C 258.085 21.580,282.721 54.248,291.095 89.281 C 292.183 93.834,293.041 95.659,294.560 96.655 C 310.880 107.348,312.400 140.701,297.286 156.464 C 293.685 160.221,293.134 161.348,291.162 169.006 C 282.026 204.468,259.916 235.185,230.701 253.002 C 229.548 253.705,235.510 262.261,270.237 309.731 L 311.131 365.631 355.565 365.846 L 400.000 366.060 400.000 348.309 L 400.000 330.557 364.338 285.630 L 328.676 240.703 333.494 238.892 C 373.356 223.907,395.248 189.691,399.313 136.020 C 404.504 67.495,372.510 19.710,311.375 4.675 C 294.592 0.548,287.694 -0.000,252.482 0.000 L 219.876 0.000 226.647 3.824 M202.899 265.964 C 183.869 272.635,168.536 274.960,139.752 275.540 L 116.770 276.003 116.770 321.024 L 116.770 366.046 163.975 366.046 L 211.180 366.046 211.180 314.700 C 211.180 286.460,210.901 263.386,210.559 263.425 C 210.217 263.464,206.770 264.607,202.899 265.964" stroke="none" fill="#72767d" fill-rule="evenodd"></path></svg>`;
|
||||
const pluginRepoIcon = `<svg width="34" height="31" viewBox="0 0 400 382"><path d="M0.000 183.023 L 0.000 366.046 46.377 366.046 L 92.754 366.046 92.754 312.629 L 92.754 259.213 127.223 259.213 C 174.433 259.213,187.432 257.146,210.766 245.926 C 311.105 197.681,301.344 41.358,195.859 7.193 C 173.603 -0.015,173.838 0.000,80.846 0.000 L 0.000 0.000 0.000 183.023 M157.615 88.195 C 193.007 97.413,198.827 152.678,166.407 171.674 C 158.993 176.019,155.494 176.398,122.807 176.398 L 92.754 176.398 92.754 131.677 L 92.754 86.957 122.807 86.957 C 146.807 86.957,153.819 87.206,157.615 88.195" stroke="none" fill="COLOR_1" fill-rule="evenodd"></path><path d="M226.647 3.824 C 258.085 21.580,282.721 54.248,291.095 89.281 C 292.183 93.834,293.041 95.659,294.560 96.655 C 310.880 107.348,312.400 140.701,297.286 156.464 C 293.685 160.221,293.134 161.348,291.162 169.006 C 282.026 204.468,259.916 235.185,230.701 253.002 C 229.548 253.705,235.510 262.261,270.237 309.731 L 311.131 365.631 355.565 365.846 L 400.000 366.060 400.000 348.309 L 400.000 330.557 364.338 285.630 L 328.676 240.703 333.494 238.892 C 373.356 223.907,395.248 189.691,399.313 136.020 C 404.504 67.495,372.510 19.710,311.375 4.675 C 294.592 0.548,287.694 -0.000,252.482 0.000 L 219.876 0.000 226.647 3.824 M202.899 265.964 C 183.869 272.635,168.536 274.960,139.752 275.540 L 116.770 276.003 116.770 321.024 L 116.770 366.046 163.975 366.046 L 211.180 366.046 211.180 314.700 C 211.180 286.460,210.901 263.386,210.559 263.425 C 210.217 263.464,206.770 264.607,202.899 265.964" stroke="none" fill="COLOR_2" fill-rule="evenodd"></path></svg>`;
|
||||
|
||||
const RepoListComponent = class PluginList extends BdApi.React.Component {
|
||||
componentDidMount() {
|
||||
|
@ -722,7 +722,7 @@ module.exports = (_ => {
|
|||
}
|
||||
}, 1200000), amount: loading.amount+1};
|
||||
|
||||
let loadingIcon = BDFDB.DOMUtils.create(pluginRepoIcon);
|
||||
let loadingIcon = BDFDB.DOMUtils.create(pluginRepoIcon.replace(/COLOR_1/gi, "#7289da").replace(/COLOR_2/gi, "#72767d"));
|
||||
BDFDB.DOMUtils.addClass(loadingIcon, "pluginrepo-loadingicon");
|
||||
loadingIcon.addEventListener("mouseenter", _ => {
|
||||
BDFDB.TooltipUtils.create(loadingIcon, this.getLoadingTooltipText(), {
|
||||
|
@ -757,9 +757,9 @@ module.exports = (_ => {
|
|||
if (oldBarButton) oldBarButton.click();
|
||||
let bar = BDFDB.NotificationUtils.notice(`${outdated} of your Plugins ${outdated == 1 ? "is" : "are"} outdated. Check: `, {
|
||||
type: "danger",
|
||||
btn: "PluginRepo",
|
||||
btn: "PluginRepo",#7289da #72767d
|
||||
selector: "pluginrepo-notice pluginrepo-outdate-notice",
|
||||
customicon: pluginRepoIcon.replace(/#7289da/gi, "#FFF").replace(/#72767d/gi, "#B9BBBE")
|
||||
customicon: pluginRepoIcon.replace(/COLOR_1/gi, "#fff").replace(/COLOR_2/gi, "#b9bbbe")
|
||||
});
|
||||
bar.querySelector(BDFDB.dotCN.noticebutton).addEventListener("click", _ => {
|
||||
showOnlyOutdated = true;
|
||||
|
@ -776,7 +776,7 @@ module.exports = (_ => {
|
|||
type: "success",
|
||||
btn: "PluginRepo",
|
||||
selector: "pluginrepo-notice pluginrepo-newentries-notice",
|
||||
customicon: pluginRepoIcon.replace(/#7289da/gi, "#FFF").replace(/#72767d/gi, "#B9BBBE")
|
||||
customicon: pluginRepoIcon.replace(/COLOR_1/gi, "#fff").replace(/COLOR_2/gi, "#b9bbbe")
|
||||
});
|
||||
bar.querySelector(BDFDB.dotCN.noticebutton).addEventListener("click", _ => {
|
||||
forcedSort = "NEW";
|
||||
|
@ -794,7 +794,7 @@ module.exports = (_ => {
|
|||
type: "danger",
|
||||
btn: "List",
|
||||
selector: "pluginrepo-notice pluginrepo-fail-notice",
|
||||
customicon: pluginRepoIcon.replace(/#7289da/gi, "#FFF").replace(/#72767d/gi, "#B9BBBE")
|
||||
customicon: pluginRepoIcon.replace(/COLOR_1/gi, "#fff").replace(/COLOR_2/gi, "#b9bbbe")
|
||||
});
|
||||
bar.querySelector(BDFDB.dotCN.noticebutton).addEventListener("click", e => {
|
||||
let toast = BDFDB.NotificationUtils.toast(wrongUrls.join("\n"), {type: "error"});
|
||||
|
|
|
@ -725,7 +725,7 @@ module.exports = (_ => {
|
|||
children[index].props.upperLeftBadgeWidth = BDFDB.LibraryComponents.Badges.getBadgeWidthForValue(e.instance.props.guildIds.length);
|
||||
children[index].props.upperLeftBadge = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Badges.NumberBadge, {
|
||||
count: e.instance.props.guildIds.length,
|
||||
style: {backgroundColor: BDFDB.DiscordConstants.Colors.BRAND}
|
||||
style: {backgroundColor: "var(--bdfdb-blurple)"}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -242,7 +242,7 @@ module.exports = (_ => {
|
|||
className: BDFDB.disCN.guildfoldericonwrapperexpanded,
|
||||
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, {
|
||||
name: BDFDB.LibraryComponents.SvgIcon.Names.FOLDER,
|
||||
color: BDFDB.ColorUtils.convert(folder.folderColor, "RGB") || BDFDB.DiscordConstants.Colors.BRAND
|
||||
color: BDFDB.ColorUtils.convert(folder.folderColor, "RGB") || "var(--bdfdb-blurple)"
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -116,7 +116,7 @@ module.exports = (_ => {
|
|||
DESC: "descending"
|
||||
};
|
||||
|
||||
const themeRepoIcon = `<svg width="36" height="31" viewBox="20 0 400 332"><path d="M0.000 39.479 L 0.000 78.957 43.575 78.957 L 87.151 78.957 87.151 204.097 L 87.151 329.236 129.609 329.236 L 172.067 329.236 172.067 204.097 L 172.067 78.957 215.642 78.957 L 259.218 78.957 259.218 39.479 L 259.218 0.000 129.609 0.000 L 0.000 0.000 0.000 39.479" stroke="none" fill="#7289da" fill-rule="evenodd"></path><path d="M274.115 38.624 L 274.115 77.248 280.261 77.734 C 309.962 80.083,325.986 106.575,313.378 132.486 C 305.279 149.131,295.114 152.700,255.800 152.700 L 230.168 152.700 230.168 123.277 L 230.168 93.855 208.566 93.855 L 186.965 93.855 186.965 211.546 L 186.965 329.236 208.566 329.236 L 230.168 329.236 230.168 277.068 L 230.168 224.899 237.268 225.113 L 244.368 225.326 282.215 277.095 L 320.062 328.864 360.031 329.057 L 400.000 329.249 400.000 313.283 L 400.000 297.317 367.924 256.908 L 335.848 216.499 340.182 214.869 C 376.035 201.391,395.726 170.616,399.382 122.342 C 405.008 48.071,360.214 0.000,285.379 0.000 L 274.115 0.000 274.115 38.624" stroke="none" fill="#72767d" fill-rule="evenodd"></path></svg>`;
|
||||
const themeRepoIcon = `<svg width="36" height="31" viewBox="20 0 400 332"><path d="M0.000 39.479 L 0.000 78.957 43.575 78.957 L 87.151 78.957 87.151 204.097 L 87.151 329.236 129.609 329.236 L 172.067 329.236 172.067 204.097 L 172.067 78.957 215.642 78.957 L 259.218 78.957 259.218 39.479 L 259.218 0.000 129.609 0.000 L 0.000 0.000 0.000 39.479" stroke="none" fill="COLOR_1" fill-rule="evenodd"></path><path d="M274.115 38.624 L 274.115 77.248 280.261 77.734 C 309.962 80.083,325.986 106.575,313.378 132.486 C 305.279 149.131,295.114 152.700,255.800 152.700 L 230.168 152.700 230.168 123.277 L 230.168 93.855 208.566 93.855 L 186.965 93.855 186.965 211.546 L 186.965 329.236 208.566 329.236 L 230.168 329.236 230.168 277.068 L 230.168 224.899 237.268 225.113 L 244.368 225.326 282.215 277.095 L 320.062 328.864 360.031 329.057 L 400.000 329.249 400.000 313.283 L 400.000 297.317 367.924 256.908 L 335.848 216.499 340.182 214.869 C 376.035 201.391,395.726 170.616,399.382 122.342 C 405.008 48.071,360.214 0.000,285.379 0.000 L 274.115 0.000 274.115 38.624" stroke="none" fill="COLOR_2" fill-rule="evenodd"></path></svg>`;
|
||||
|
||||
const RepoListComponent = class ThemeList extends BdApi.React.Component {
|
||||
componentDidMount() {
|
||||
|
@ -1038,7 +1038,7 @@ module.exports = (_ => {
|
|||
}
|
||||
}, 1200000), amount: loading.amount+1};
|
||||
|
||||
let loadingIcon = BDFDB.DOMUtils.create(themeRepoIcon);
|
||||
let loadingIcon = BDFDB.DOMUtils.create(themeRepoIcon.replace(/COLOR_1/gi, "#7289da").replace(/COLOR_2/gi, "#72767d"));
|
||||
BDFDB.DOMUtils.addClass(loadingIcon, "themerepo-loadingicon");
|
||||
loadingIcon.addEventListener("mouseenter", _ => {
|
||||
BDFDB.TooltipUtils.create(loadingIcon, this.getLoadingTooltipText(), {
|
||||
|
@ -1069,7 +1069,7 @@ module.exports = (_ => {
|
|||
type: "danger",
|
||||
btn: "ThemeRepo",
|
||||
selector: "themerepo-notice themerepo-outdate-notice",
|
||||
customicon: themeRepoIcon.replace(/#7289da/gi, "#FFF").replace(/#72767d/gi, "#B9BBBE")
|
||||
customicon: themeRepoIcon.replace(/COLOR_1/gi, "#fff").replace(/COLOR_2/gi, "#b9bbbe")
|
||||
});
|
||||
bar.querySelector(BDFDB.dotCN.noticebutton).addEventListener("click", _ => {
|
||||
showOnlyOutdated = true;
|
||||
|
@ -1086,7 +1086,7 @@ module.exports = (_ => {
|
|||
type: "success",
|
||||
btn: "ThemeRepo",
|
||||
selector: "themerepo-notice themerepo-newentries-notice",
|
||||
customicon: themeRepoIcon.replace(/#7289da/gi, "#FFF").replace(/#72767d/gi, "#B9BBBE")
|
||||
customicon: themeRepoIcon.replace(/COLOR_1/gi, "#fff").replace(/COLOR_2/gi, "#b9bbbe")
|
||||
});
|
||||
bar.querySelector(BDFDB.dotCN.noticebutton).addEventListener("click", _ => {
|
||||
forcedSort = "NEW";
|
||||
|
@ -1104,7 +1104,7 @@ module.exports = (_ => {
|
|||
type: "danger",
|
||||
btn: "List",
|
||||
selector: "themerepo-notice themerepo-fail-notice",
|
||||
customicon: themeRepoIcon.replace(/#7289da/gi, "#FFF").replace(/#72767d/gi, "#B9BBBE")
|
||||
customicon: themeRepoIcon.replace(/COLOR_1/gi, "#fff").replace(/COLOR_2/gi, "#b9bbbe")
|
||||
});
|
||||
bar.querySelector(BDFDB.dotCN.noticebutton).addEventListener("click", e => {
|
||||
let toast = BDFDB.NotificationUtils.toast(wrongUrls.join("\n"), {type: "error"});
|
||||
|
|
Loading…
Reference in New Issue