Lightcord settings category + changelog

This commit is contained in:
Jean Ouina 2020-06-11 17:42:43 +02:00
parent 7f557ca857
commit 259cbf26d1
7 changed files with 168 additions and 40 deletions

View File

@ -2,7 +2,7 @@
BandagedBD from Lightcord is a fork from the original BandagedBD (https://github.com/rauenzi/BetterDiscordApp).
If a bug happens on the lightcord version, please report on Lightcord repo. If it applies as well on BandagedBD, please report it too on https://github.com/rauenzi/BetterDiscordApp/issues.
Lightcord does not own the code at https://github.com/rauenzi/BetterDiscordApp. It only owns the modifications here.
Lightcord does not own the code at https://github.com/rauenzi/BetterDiscordApp. It only owns the modifications that were added here.
# BandagedBD [![Patreon][patreon-badge]][patreon-link] [![Paypal][paypal-badge]][paypal-link]
[patreon-badge]: https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.herokuapp.com%2FZerebos&style=flat-square

File diff suppressed because one or more lines are too long

View File

@ -1,18 +1,52 @@
import { remote } from "electron";
import BDV2 from "./modules/v2";
import WebpackModules from "./modules/webpackModules";
// var settingsPanel, voiceMode, pluginModule, themeModule, dMode, publicServersModule, mainCore, BDV2;
export const minimumDiscordVersion = "0.0.306";
export const currentDiscordVersion = (window.DiscordNative && window.DiscordNative.remoteApp && window.DiscordNative.remoteApp.getVersion && window.DiscordNative.remoteApp.getVersion()) || "0.0.306";
export const minSupportedVersion = "0.3.0";
export const bbdVersion = "0.3.4";
export const LCChanelog = {
description: "Lightcord's changelog",
changes: [
{
title: "What's New?",
items: [
"Lightcord is now available !",
"We removed emotes. That's sad for people who were actually using it, but it was leading to more loading time and some basic words were emote."
]
}
],
image: "https://i.imgur.com/sfNhqwP.png",
title: "Lightcord",
subtitle: "v"+remote.getGlobal("BuildInfo").version,
footer: (function(){
const TextElement = WebpackModules.findByDisplayName("Text");
const ModalStack = WebpackModules.findByProps("push", "update", "pop", "popWithKey");
if(!TextElement || !ModalStack)return null
const Anchor = WebpackModules.find(m => m.displayName == "Anchor");
const AnchorClasses = WebpackModules.findByProps("anchorUnderlineOnHover") || {anchor: "anchor-3Z-8Bb", anchorUnderlineOnHover: "anchorUnderlineOnHover-2ESHQB"};
const joinSupportServer = (click) => {
click.preventDefault();
click.stopPropagation();
ModalStack.pop();
BDV2.joinLC();
};
const supportLink = Anchor ? BDV2.React.createElement(Anchor, {onClick: joinSupportServer}, "Join our Discord Server.") : BDV2.React.createElement("a", {className: `${AnchorClasses.anchor} ${AnchorClasses.anchorUnderlineOnHover}`, onClick: joinSupportServer}, "Join our Discord Server.");
return BDV2.React.createElement(TextElement, {size: TextElement.Sizes.SMALL, color: TextElement.Colors.STANDARD}, "Need support? ", supportLink);
})()
}
export const bbdChangelog = {
description: "Lightcord Edition.",
description: "BBD's changelog.",
changes: [
{
title: "What's New?",
items: [
"**Lightcord** is now using BandagedBD. That means all plugins you were using can be used too !",
"**Window Transparency** changes were made to more compatible with external window managers and addons like Glasscord.",
"Initialization sequence has once again been changed slightly to hopefully improve loading times.",
"We removed emotes. That's sad for people who were actually using it, but it was leading to more loading time and some basic words were emote."
"Initialization sequence has once again been changed slightly to hopefully improve loading times."
]
},
{

View File

@ -1,4 +1,4 @@
import {bbdChangelog} from "../0globals";
import {bbdChangelog, LCChanelog} from "../0globals";
import Utils from "./utils";
import BDV2 from "./v2";
import DOM from "./domtools";
@ -9,15 +9,13 @@ import TooltipWrap from "../ui/tooltipWrap";
export default class V2_SettingsPanel_Sidebar {
constructor(onClick) {
constructor(onClick, onClickLightcord) {
this.onClick = onClick;
this.onClickLightcord = onClickLightcord
}
get items() {
return [{
text: "Lightcord Settings",
id: "lightcord"
}, {
text: "BetterDiscord Settings",
id: "core"
}, {
@ -29,27 +27,41 @@ export default class V2_SettingsPanel_Sidebar {
}, {
text: "Custom CSS",
id: "customcss"
}, {
text: "RichPresence",
id: "status"
}, /*{
text: "Message Logger",
id: "msglog"
}, */{
text: "Account Info",
id: "accountinfo"
}];
}
get LCitems(){
return [
{
text: "Lightcord Settings",
id: "lightcord"
}, {
text: "RichPresence",
id: "status"
}, {
text: "Account Info",
id: "accountinfo"
}
]
}
get component() {
//<TooltipWrap color="black" side="top" text={title}>
const changelogButton = BDV2.react.createElement(TooltipWrap, {color: "black", side: "top", text: "Changelog"},
const changelogButton = BDV2.react.createElement(TooltipWrap, {color: "black", side: "top", text: "BBD's Changelog"},
BDV2.react.createElement("div", {className: "bd-changelog-button", onClick: () => {Utils.showChangelogModal(bbdChangelog);}},
BDV2.react.createElement(History, {className: "bd-icon", size: "16px"})
)
);
return BDV2.react.createElement("span", null, BDV2.react.createElement(SideBar, {onClick: this.onClick, headerText: "Bandaged BD", headerButton: changelogButton, items: this.items}));
const changelogButtonLC = BDV2.react.createElement(TooltipWrap, {color: "black", side: "top", text: "Lightcord's Changelog"},
BDV2.react.createElement("div", {className: "bd-changelog-button", onClick: () => {Utils.showChangelogModal(LCChanelog);}},
BDV2.react.createElement(History, {className: "bd-icon", size: "16px"})
)
);
return [
BDV2.react.createElement("span", null, BDV2.react.createElement(SideBar, {onClick: this.onClick, headerText: "Lightcord", headerButton: changelogButtonLC, items: this.LCitems})),
BDV2.react.createElement("span", null, BDV2.react.createElement(SideBar, {onClick: this.onClick, headerText: "Bandaged BD", headerButton: changelogButton, items: this.items}))
]
}
get root() {

View File

@ -370,7 +370,14 @@ export default class Utils {
const MarkdownParser = WebpackModules.findByProps("defaultRules", "parse");
if (!Changelog || !ModalStack || !ChangelogClasses || !TextElement || !FlexChild || !Titles || !MarkdownParser) return;
const {image = "https://repository-images.githubusercontent.com/105473537/957b5480-7c26-11e9-8401-50fa820cbae5", description = "", changes = [], title = "BandagedBD", subtitle = `v${bbdVersion}`, footer} = options;
const {
image = "https://repository-images.githubusercontent.com/105473537/957b5480-7c26-11e9-8401-50fa820cbae5",
description = "",
changes = [],
title = "BandagedBD",
subtitle = `v${bbdVersion}`,
footer
} = options;
const ce = BDV2.React.createElement;
const changelogItems = [ce("img", {src: image})];
if (description) changelogItems.push(ce("p", null, MarkdownParser.parse(description)));

View File

@ -82,6 +82,9 @@ export default new class V2 {
joinBD2() {this.InviteActions.acceptInviteAndTransitionToInviteChannel("2HScm8j");}
leaveBD2() {this.GuildActions.leaveGuild("280806472928198656");}
joinLC() {this.InviteActions.acceptInviteAndTransitionToInviteChannel("cxfA2dT");}
leaveLC() {this.GuildActions.leaveGuild("705908350218666117");}
/**
* @type {typeof React}
*/

BIN
assets/logo-wide.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB