1
0
mirror of https://github.com/Lightcord/Lightcord.git synced 2025-04-12 00:55:40 +02:00

Syncing with latest BetterDiscord commit

This commit is contained in:
Jean Ouina 2020-05-27 20:19:48 +02:00
parent be2ae143c5
commit aa401d0a9f
3 changed files with 25 additions and 2 deletions

View File

@ -392,6 +392,13 @@ export default new class V2_SettingsPanel {
render() {return this.props.children;} render() {return this.props.children;}
} }
const originalRender = ContentList.prototype.render;
Object.defineProperty(ContentList.prototype, "render", {
enumerable: false,
configurable: false,
set: function() {console.warn("Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins");},
get: () => originalRender
});
const list = type === "plugins" ? Object.values(bdplugins) : Object.values(bdthemes); const list = type === "plugins" ? Object.values(bdplugins) : Object.values(bdthemes);
return BDV2.reactDom.render(BDV2.react.createElement(ContentList, {type, onChange: this.sideBarOnClick}, BDV2.react.createElement(CardList, {type, list})), this.root); return BDV2.reactDom.render(BDV2.react.createElement(ContentList, {type, onChange: this.sideBarOnClick}, BDV2.react.createElement(CardList, {type, list})), this.root);
} }

View File

@ -176,3 +176,11 @@ export default class CardList extends BDV2.reactComponent {
</Scroller>; </Scroller>;
} }
} }
const originalRender = CardList.prototype.render;
Object.defineProperty(CardList.prototype, "render", {
enumerable: false,
configurable: false,
set: function() {console.warn("Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins");},
get: () => originalRender
});

View File

@ -15,3 +15,11 @@ export default class BDErrorBoundary extends BDV2.reactComponent {
return this.props.children; return this.props.children;
} }
} }
const originalRender = BDErrorBoundary.prototype.render;
Object.defineProperty(BDErrorBoundary.prototype, "render", {
enumerable: false,
configurable: false,
set: function() {console.warn("Addon policy for plugins #5 https://github.com/rauenzi/BetterDiscordApp/wiki/Addon-Policies#plugins");},
get: () => originalRender
});