some restructure and lint
This commit is contained in:
parent
2bdeb4cf58
commit
309ffc07c5
|
@ -854,7 +854,8 @@ body .ace_closeButton:active {
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bd-pfbtn {
|
.bd-pfbtn,
|
||||||
|
.bd-title-button {
|
||||||
background: #7289da;
|
background: #7289da;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
|
728
js/main.js
728
js/main.js
|
@ -956,14 +956,11 @@ const bdEmoteSettingIDs = {
|
||||||
}
|
}
|
||||||
|
|
||||||
async initialize() {
|
async initialize() {
|
||||||
super.initialize();
|
super.initialize(); // Disable emote module for now because it's annoying and slow
|
||||||
return;
|
// await this.getBlacklist();
|
||||||
await this.getBlacklist();
|
// await this.loadEmoteData(EmoteInfo);
|
||||||
await this.loadEmoteData(data__WEBPACK_IMPORTED_MODULE_1__["EmoteInfo"]);
|
// while (!this.MessageContentComponent) await new Promise(resolve => setTimeout(resolve, 100));
|
||||||
|
// this.patchMessageContent();
|
||||||
while (!this.MessageContentComponent) await new Promise(resolve => setTimeout(resolve, 100));
|
|
||||||
|
|
||||||
this.patchMessageContent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
disabled() {
|
disabled() {
|
||||||
|
@ -1358,8 +1355,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
get button() {
|
get button() {
|
||||||
const btn = $("<div/>", {
|
const btn = $("<div/>", {
|
||||||
"class": modules__WEBPACK_IMPORTED_MODULE_2__["BDV2"].guildClasses.listItem,
|
"class": modules__WEBPACK_IMPORTED_MODULE_2__["BDV2"].guildClasses.listItem,
|
||||||
"id": "bd-pub-li",
|
"id": "bd-pub-li"
|
||||||
"style": data__WEBPACK_IMPORTED_MODULE_1__["SettingsCookie"]["bda-gs-1"] ? "" : "display: none;"
|
|
||||||
}).append($("<div/>", {
|
}).append($("<div/>", {
|
||||||
"class": "wrapper-25eVIn " + modules__WEBPACK_IMPORTED_MODULE_2__["BDV2"].guildClasses.circleButtonMask,
|
"class": "wrapper-25eVIn " + modules__WEBPACK_IMPORTED_MODULE_2__["BDV2"].guildClasses.circleButtonMask,
|
||||||
"text": "public",
|
"text": "public",
|
||||||
|
@ -2652,7 +2648,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony import */ var data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! data */ "./src/data/data.js");
|
/* harmony import */ var data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! data */ "./src/data/data.js");
|
||||||
/* harmony import */ var _pluginmanager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pluginmanager */ "./src/modules/pluginmanager.js");
|
/* harmony import */ var _pluginmanager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pluginmanager */ "./src/modules/pluginmanager.js");
|
||||||
/* harmony import */ var _thememanager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./thememanager */ "./src/modules/thememanager.js");
|
/* harmony import */ var _thememanager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./thememanager */ "./src/modules/thememanager.js");
|
||||||
/* harmony import */ var _settingspanel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./settingspanel */ "./src/modules/settingspanel.js");
|
/* harmony import */ var _settingsmanager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./settingsmanager */ "./src/modules/settingsmanager.js");
|
||||||
/* harmony import */ var builtins__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! builtins */ "./src/builtins/builtins.js");
|
/* harmony import */ var builtins__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! builtins */ "./src/builtins/builtins.js");
|
||||||
/* harmony import */ var ui__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ui */ "./src/ui/ui.js");
|
/* harmony import */ var ui__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ui */ "./src/ui/ui.js");
|
||||||
|
|
||||||
|
@ -2688,7 +2684,7 @@ Core.prototype.init = async function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
_utilities__WEBPACK_IMPORTED_MODULE_1__["default"].log("Startup", "Initializing Settings");
|
_utilities__WEBPACK_IMPORTED_MODULE_1__["default"].log("Startup", "Initializing Settings");
|
||||||
_settingspanel__WEBPACK_IMPORTED_MODULE_5__["default"].initialize();
|
_settingsmanager__WEBPACK_IMPORTED_MODULE_5__["default"].initialize();
|
||||||
_utilities__WEBPACK_IMPORTED_MODULE_1__["default"].log("Startup", "Initializing EmoteModule"); // window.emotePromise = EmoteModule.init().then(() => {
|
_utilities__WEBPACK_IMPORTED_MODULE_1__["default"].log("Startup", "Initializing EmoteModule"); // window.emotePromise = EmoteModule.init().then(() => {
|
||||||
// EmoteModule.initialized = true;
|
// EmoteModule.initialized = true;
|
||||||
// Utilities.log("Startup", "Initializing QuickEmoteMenu");
|
// Utilities.log("Startup", "Initializing QuickEmoteMenu");
|
||||||
|
@ -2700,7 +2696,7 @@ Core.prototype.init = async function () {
|
||||||
await this.checkForGuilds();
|
await this.checkForGuilds();
|
||||||
_bdv2__WEBPACK_IMPORTED_MODULE_0__["default"].initialize();
|
_bdv2__WEBPACK_IMPORTED_MODULE_0__["default"].initialize();
|
||||||
_utilities__WEBPACK_IMPORTED_MODULE_1__["default"].log("Startup", "Updating Settings");
|
_utilities__WEBPACK_IMPORTED_MODULE_1__["default"].log("Startup", "Updating Settings");
|
||||||
_settingspanel__WEBPACK_IMPORTED_MODULE_5__["default"].initializeSettings();
|
_settingsmanager__WEBPACK_IMPORTED_MODULE_5__["default"].initializeSettings();
|
||||||
|
|
||||||
for (const module in builtins__WEBPACK_IMPORTED_MODULE_6__) builtins__WEBPACK_IMPORTED_MODULE_6__[module].initialize();
|
for (const module in builtins__WEBPACK_IMPORTED_MODULE_6__) builtins__WEBPACK_IMPORTED_MODULE_6__[module].initialize();
|
||||||
|
|
||||||
|
@ -3544,10 +3540,10 @@ PluginModule.prototype.rawObserver = function (e) {
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/modules/settingspanel.js":
|
/***/ "./src/modules/settingsmanager.js":
|
||||||
/*!**************************************!*\
|
/*!****************************************!*\
|
||||||
!*** ./src/modules/settingspanel.js ***!
|
!*** ./src/modules/settingsmanager.js ***!
|
||||||
\**************************************/
|
\****************************************/
|
||||||
/*! exports provided: default */
|
/*! exports provided: default */
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
|
@ -3573,7 +3569,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
//WebpackModules.getModule(m => m.getSection && m.getProps && !m.getGuildId && !m.getChannel)
|
//WebpackModules.getModule(m => m.getSection && m.getProps && !m.getGuildId && !m.getChannel)
|
||||||
//WebpackModules.getByProps("getGuildId", "getSection")
|
//WebpackModules.getByProps("getGuildId", "getSection")
|
||||||
|
|
||||||
/* harmony default export */ __webpack_exports__["default"] = (new class SettingsPanel {
|
/* harmony default export */ __webpack_exports__["default"] = (new class SettingsManager {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.renderer = new ui__WEBPACK_IMPORTED_MODULE_6__["SettingsPanel"]({
|
this.renderer = new ui__WEBPACK_IMPORTED_MODULE_6__["SettingsPanel"]({
|
||||||
onChange: this.updateSettings.bind(this)
|
onChange: this.updateSettings.bind(this)
|
||||||
|
@ -3590,17 +3586,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
if (savedSettings[setting] !== undefined) data__WEBPACK_IMPORTED_MODULE_0__["SettingsCookie"][setting] = savedSettings[setting];
|
if (savedSettings[setting] !== undefined) data__WEBPACK_IMPORTED_MODULE_0__["SettingsCookie"][setting] = savedSettings[setting];
|
||||||
}
|
}
|
||||||
|
|
||||||
this.saveSettings(); // console.log("PATCHING");
|
this.saveSettings();
|
||||||
// Utilities.monkeyPatch(WebpackModules.getByProps("getUserSettingsSections").default.prototype, "render", {after: (data) => {
|
|
||||||
// data.returnValue.type;
|
|
||||||
// }});
|
|
||||||
// Patcher.after(temp2.prototype, "generateSections", (t,a,r) => {
|
|
||||||
// r.push({section: "DIVIDER"});
|
|
||||||
// r.push({section: "HEADER", label: "My Section"});
|
|
||||||
// r.push({color: "#ffffff", label: "My Tab", onClick: function() {console.log("CLICK");}, section: "My Section"});
|
|
||||||
// r.push({color: "#cccccc", label: "My Tab2", onClick: function() {console.log("CLICK2");}, section: "My Section"});
|
|
||||||
// })
|
|
||||||
|
|
||||||
this.patchSections();
|
this.patchSections();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3610,6 +3596,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
_utilities__WEBPACK_IMPORTED_MODULE_7__["default"].monkeyPatch(UserSettings.prototype, "generateSections", {
|
_utilities__WEBPACK_IMPORTED_MODULE_7__["default"].monkeyPatch(UserSettings.prototype, "generateSections", {
|
||||||
after: data => {
|
after: data => {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
/* eslint-disable-line no-console */
|
||||||
|
|
||||||
data.returnValue.splice(23, 0, {
|
data.returnValue.splice(23, 0, {
|
||||||
section: "DIVIDER"
|
section: "DIVIDER"
|
||||||
});
|
});
|
||||||
|
@ -3870,6 +3858,7 @@ ThemeModule.prototype.saveThemeData = function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Utilities; });
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Utilities; });
|
||||||
|
/* eslint-disable no-console */
|
||||||
class Utilities {
|
class Utilities {
|
||||||
/** Document/window width */
|
/** Document/window width */
|
||||||
static get screenWidth() {
|
static get screenWidth() {
|
||||||
|
@ -5130,95 +5119,6 @@ class V2C_XSvg extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Component {
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/ui/layer.js":
|
|
||||||
/*!*************************!*\
|
|
||||||
!*** ./src/ui/layer.js ***!
|
|
||||||
\*************************/
|
|
||||||
/*! exports provided: default */
|
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return V2C_Layer; });
|
|
||||||
/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! modules */ "./src/modules/modules.js");
|
|
||||||
|
|
||||||
class V2C_Layer extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
$(window).on(`keyup.${this.props.id}`, e => {
|
|
||||||
if (e.which === 27) {
|
|
||||||
modules__WEBPACK_IMPORTED_MODULE_0__["ReactDOM"].unmountComponentAtNode(this.refs.root.parentNode);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$(`#${this.props.id}`).animate({
|
|
||||||
opacity: 1
|
|
||||||
}, {
|
|
||||||
step: function (now) {
|
|
||||||
$(this).css("transform", `scale(${1.1 - 0.1 * now}) translateZ(0px)`);
|
|
||||||
},
|
|
||||||
duration: 200,
|
|
||||||
done: () => {
|
|
||||||
$(`#${this.props.id}`).css("opacity", "").css("transform", "");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillUnmount() {
|
|
||||||
$(window).off(`keyup.${this.props.id}`);
|
|
||||||
$(`#${this.props.id}`).animate({
|
|
||||||
opacity: 0
|
|
||||||
}, {
|
|
||||||
step: function (now) {
|
|
||||||
$(this).css("transform", `scale(${1.1 - 0.1 * now}) translateZ(0px)`);
|
|
||||||
},
|
|
||||||
duration: 200,
|
|
||||||
done: () => {
|
|
||||||
$(`#${this.props.rootId}`).remove();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$("[class*=\"layer-\"]").removeClass("publicServersOpen").animate({
|
|
||||||
opacity: 1
|
|
||||||
}, {
|
|
||||||
step: function (now) {
|
|
||||||
$(this).css("transform", `scale(${0.07 * now + 0.93}) translateZ(0px)`);
|
|
||||||
},
|
|
||||||
duration: 200,
|
|
||||||
done: () => {
|
|
||||||
$("[class*=\"layer-\"]").css("opacity", "").css("transform", "");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillMount() {
|
|
||||||
$("[class*=\"layer-\"]").addClass("publicServersOpen").animate({
|
|
||||||
opacity: 0
|
|
||||||
}, {
|
|
||||||
step: function (now) {
|
|
||||||
$(this).css("transform", `scale(${0.07 * now + 0.93}) translateZ(0px)`);
|
|
||||||
},
|
|
||||||
duration: 200
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
|
||||||
className: "layer bd-layer layer-3QrUeG",
|
|
||||||
id: this.props.id,
|
|
||||||
ref: "root",
|
|
||||||
style: {
|
|
||||||
opacity: 0,
|
|
||||||
transform: "scale(1.1) translateZ(0px)"
|
|
||||||
}
|
|
||||||
}, this.props.children);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "./src/ui/modals.js":
|
/***/ "./src/ui/modals.js":
|
||||||
/*!**************************!*\
|
/*!**************************!*\
|
||||||
!*** ./src/ui/modals.js ***!
|
!*** ./src/ui/modals.js ***!
|
||||||
|
@ -5542,6 +5442,142 @@ class V2C_ServerCard extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Compo
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/ui/publicservers/exitbutton.js":
|
||||||
|
/*!********************************************!*\
|
||||||
|
!*** ./src/ui/publicservers/exitbutton.js ***!
|
||||||
|
\********************************************/
|
||||||
|
/*! exports provided: default */
|
||||||
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return V2C_Tools; });
|
||||||
|
/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! modules */ "./src/modules/modules.js");
|
||||||
|
/* harmony import */ var _icons_close__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../icons/close */ "./src/ui/icons/close.js");
|
||||||
|
|
||||||
|
|
||||||
|
class V2C_Tools extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.onClick = this.onClick.bind(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
||||||
|
className: "tools-container toolsContainer-1edPuj"
|
||||||
|
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
||||||
|
className: "tools tools-3-3s-N"
|
||||||
|
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
||||||
|
className: "container-1sFeqf"
|
||||||
|
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
||||||
|
className: "btn-close closeButton-1tv5uR",
|
||||||
|
onClick: this.onClick
|
||||||
|
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement(_icons_close__WEBPACK_IMPORTED_MODULE_1__["default"], null)), modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
||||||
|
className: "esc-text keybind-KpFkfr"
|
||||||
|
}, "ESC"))));
|
||||||
|
}
|
||||||
|
|
||||||
|
onClick() {
|
||||||
|
if (this.props.onClick) {
|
||||||
|
this.props.onClick();
|
||||||
|
}
|
||||||
|
|
||||||
|
$(".closeButton-1tv5uR").first().click();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/ui/publicservers/layer.js":
|
||||||
|
/*!***************************************!*\
|
||||||
|
!*** ./src/ui/publicservers/layer.js ***!
|
||||||
|
\***************************************/
|
||||||
|
/*! exports provided: default */
|
||||||
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return V2C_Layer; });
|
||||||
|
/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! modules */ "./src/modules/modules.js");
|
||||||
|
|
||||||
|
class V2C_Layer extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
$(window).on(`keyup.${this.props.id}`, e => {
|
||||||
|
if (e.which === 27) {
|
||||||
|
modules__WEBPACK_IMPORTED_MODULE_0__["ReactDOM"].unmountComponentAtNode(this.refs.root.parentNode);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$(`#${this.props.id}`).animate({
|
||||||
|
opacity: 1
|
||||||
|
}, {
|
||||||
|
step: function (now) {
|
||||||
|
$(this).css("transform", `scale(${1.1 - 0.1 * now}) translateZ(0px)`);
|
||||||
|
},
|
||||||
|
duration: 200,
|
||||||
|
done: () => {
|
||||||
|
$(`#${this.props.id}`).css("opacity", "").css("transform", "");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
$(window).off(`keyup.${this.props.id}`);
|
||||||
|
$(`#${this.props.id}`).animate({
|
||||||
|
opacity: 0
|
||||||
|
}, {
|
||||||
|
step: function (now) {
|
||||||
|
$(this).css("transform", `scale(${1.1 - 0.1 * now}) translateZ(0px)`);
|
||||||
|
},
|
||||||
|
duration: 200,
|
||||||
|
done: () => {
|
||||||
|
$(`#${this.props.rootId}`).remove();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$("[class*=\"layer-\"]").removeClass("publicServersOpen").animate({
|
||||||
|
opacity: 1
|
||||||
|
}, {
|
||||||
|
step: function (now) {
|
||||||
|
$(this).css("transform", `scale(${0.07 * now + 0.93}) translateZ(0px)`);
|
||||||
|
},
|
||||||
|
duration: 200,
|
||||||
|
done: () => {
|
||||||
|
$("[class*=\"layer-\"]").css("opacity", "").css("transform", "");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillMount() {
|
||||||
|
$("[class*=\"layer-\"]").addClass("publicServersOpen").animate({
|
||||||
|
opacity: 0
|
||||||
|
}, {
|
||||||
|
step: function (now) {
|
||||||
|
$(this).css("transform", `scale(${0.07 * now + 0.93}) translateZ(0px)`);
|
||||||
|
},
|
||||||
|
duration: 200
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
||||||
|
className: "layer bd-layer layer-3QrUeG",
|
||||||
|
id: this.props.id,
|
||||||
|
ref: "root",
|
||||||
|
style: {
|
||||||
|
opacity: 0,
|
||||||
|
transform: "scale(1.1) translateZ(0px)"
|
||||||
|
}
|
||||||
|
}, this.props.children);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/ui/publicservers/menu.js":
|
/***/ "./src/ui/publicservers/menu.js":
|
||||||
/*!**************************************!*\
|
/*!**************************************!*\
|
||||||
!*** ./src/ui/publicservers/menu.js ***!
|
!*** ./src/ui/publicservers/menu.js ***!
|
||||||
|
@ -5553,10 +5589,10 @@ class V2C_ServerCard extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Compo
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return V2C_PublicServers; });
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return V2C_PublicServers; });
|
||||||
/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! modules */ "./src/modules/modules.js");
|
/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! modules */ "./src/modules/modules.js");
|
||||||
/* harmony import */ var _sidebarview__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../sidebarview */ "./src/ui/sidebarview.js");
|
/* harmony import */ var _sidebarview__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sidebarview */ "./src/ui/publicservers/sidebarview.js");
|
||||||
/* harmony import */ var _settings_exitbutton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../settings/exitbutton */ "./src/ui/settings/exitbutton.js");
|
/* harmony import */ var _exitbutton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./exitbutton */ "./src/ui/publicservers/exitbutton.js");
|
||||||
/* harmony import */ var _settings_tabbar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../settings/tabbar */ "./src/ui/settings/tabbar.js");
|
/* harmony import */ var _tabbar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tabbar */ "./src/ui/publicservers/tabbar.js");
|
||||||
/* harmony import */ var _settings_title__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../settings/title */ "./src/ui/settings/title.js");
|
/* harmony import */ var _settings_title__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../settings/title */ "./src/ui/settings/title.jsx");
|
||||||
/* harmony import */ var _card__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./card */ "./src/ui/publicservers/card.js");
|
/* harmony import */ var _card__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./card */ "./src/ui/publicservers/card.js");
|
||||||
|
|
||||||
|
|
||||||
|
@ -5811,7 +5847,7 @@ class V2C_PublicServers extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Co
|
||||||
component: this.content
|
component: this.content
|
||||||
},
|
},
|
||||||
tools: {
|
tools: {
|
||||||
component: modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement(_settings_exitbutton__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
component: modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement(_exitbutton__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
||||||
key: "pt",
|
key: "pt",
|
||||||
ref: "tools",
|
ref: "tools",
|
||||||
onClick: this.close
|
onClick: this.close
|
||||||
|
@ -5831,17 +5867,17 @@ class V2C_PublicServers extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Co
|
||||||
style: {
|
style: {
|
||||||
fontSize: "16px"
|
fontSize: "16px"
|
||||||
}
|
}
|
||||||
}, "Public Servers"), modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement(_settings_tabbar__WEBPACK_IMPORTED_MODULE_3__["default"].Separator, null), this.searchInput, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement(_settings_tabbar__WEBPACK_IMPORTED_MODULE_3__["default"].Separator, null), modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement(_settings_tabbar__WEBPACK_IMPORTED_MODULE_3__["default"].Header, {
|
}, "Public Servers"), modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement(_tabbar__WEBPACK_IMPORTED_MODULE_3__["default"].Separator, null), this.searchInput, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement(_tabbar__WEBPACK_IMPORTED_MODULE_3__["default"].Separator, null), modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement(_tabbar__WEBPACK_IMPORTED_MODULE_3__["default"].Header, {
|
||||||
text: "Categories"
|
text: "Categories"
|
||||||
}), this.categoryButtons.map((value, index) => {
|
}), this.categoryButtons.map((value, index) => {
|
||||||
return modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement(_settings_tabbar__WEBPACK_IMPORTED_MODULE_3__["default"].Item, {
|
return modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement(_tabbar__WEBPACK_IMPORTED_MODULE_3__["default"].Item, {
|
||||||
id: index,
|
id: index,
|
||||||
onClick: this.changeCategory,
|
onClick: this.changeCategory,
|
||||||
key: index,
|
key: index,
|
||||||
text: value,
|
text: value,
|
||||||
selected: this.state.selectedCategory === index
|
selected: this.state.selectedCategory === index
|
||||||
});
|
});
|
||||||
}), modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement(_settings_tabbar__WEBPACK_IMPORTED_MODULE_3__["default"].Separator, null), this.footer, this.connection));
|
}), modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement(_tabbar__WEBPACK_IMPORTED_MODULE_3__["default"].Separator, null), this.footer, this.connection));
|
||||||
}
|
}
|
||||||
|
|
||||||
get searchInput() {
|
get searchInput() {
|
||||||
|
@ -5984,7 +6020,7 @@ class V2C_PublicServers extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Co
|
||||||
connection
|
connection
|
||||||
} = self.state;
|
} = self.state;
|
||||||
if (connection.state !== 2) return modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("span", null);
|
if (connection.state !== 2) return modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("span", null);
|
||||||
return modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("span", null, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement(_settings_tabbar__WEBPACK_IMPORTED_MODULE_3__["default"].Separator, null), modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("span", {
|
return modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("span", null, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement(_tabbar__WEBPACK_IMPORTED_MODULE_3__["default"].Separator, null), modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("span", {
|
||||||
style: {
|
style: {
|
||||||
color: "#b9bbbe",
|
color: "#b9bbbe",
|
||||||
fontSize: "10px",
|
fontSize: "10px",
|
||||||
|
@ -6026,7 +6062,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony import */ var _card__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./card */ "./src/ui/publicservers/card.js");
|
/* harmony import */ var _card__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./card */ "./src/ui/publicservers/card.js");
|
||||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Card", function() { return _card__WEBPACK_IMPORTED_MODULE_1__["default"]; });
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Card", function() { return _card__WEBPACK_IMPORTED_MODULE_1__["default"]; });
|
||||||
|
|
||||||
/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../layer */ "./src/ui/layer.js");
|
/* harmony import */ var _layer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./layer */ "./src/ui/publicservers/layer.js");
|
||||||
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Layer", function() { return _layer__WEBPACK_IMPORTED_MODULE_2__["default"]; });
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Layer", function() { return _layer__WEBPACK_IMPORTED_MODULE_2__["default"]; });
|
||||||
|
|
||||||
|
|
||||||
|
@ -6036,10 +6072,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/ui/scroller.js":
|
/***/ "./src/ui/publicservers/scroller.js":
|
||||||
/*!****************************!*\
|
/*!******************************************!*\
|
||||||
!*** ./src/ui/scroller.js ***!
|
!*** ./src/ui/publicservers/scroller.js ***!
|
||||||
\****************************/
|
\******************************************/
|
||||||
/*! exports provided: default */
|
/*! exports provided: default */
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
|
@ -6085,6 +6121,144 @@ class V2C_Scroller extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Compone
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/ui/publicservers/sidebarview.js":
|
||||||
|
/*!*********************************************!*\
|
||||||
|
!*** ./src/ui/publicservers/sidebarview.js ***!
|
||||||
|
\*********************************************/
|
||||||
|
/*! exports provided: default */
|
||||||
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return V2C_SidebarView; });
|
||||||
|
/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! modules */ "./src/modules/modules.js");
|
||||||
|
/* harmony import */ var _scroller__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scroller */ "./src/ui/publicservers/scroller.js");
|
||||||
|
|
||||||
|
|
||||||
|
class V2C_SidebarView extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const {
|
||||||
|
sidebar,
|
||||||
|
content,
|
||||||
|
tools
|
||||||
|
} = this.props.children;
|
||||||
|
return modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
||||||
|
className: "standardSidebarView-3F1I7i ui-standard-sidebar-view"
|
||||||
|
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
||||||
|
className: "sidebarRegion-VFTUkN sidebar-region"
|
||||||
|
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement(_scroller__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
||||||
|
key: "sidebarScroller",
|
||||||
|
ref: "sidebarScroller",
|
||||||
|
sidebar: true,
|
||||||
|
fade: sidebar.fade || true,
|
||||||
|
dark: sidebar.dark || true,
|
||||||
|
children: sidebar.component
|
||||||
|
})), modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
||||||
|
className: "contentRegion-3nDuYy content-region"
|
||||||
|
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
||||||
|
className: "contentTransitionWrap-3hqOEW content-transition-wrap"
|
||||||
|
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
||||||
|
className: "scrollerWrap-2lJEkd firefoxFixScrollFlex-cnI2ix contentRegionScrollerWrap-3YZXdm content-region-scroller-wrap scrollerThemed-2oenus themeGhost-28MSn0 scrollerTrack-1ZIpsv"
|
||||||
|
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
||||||
|
className: "scroller-2FKFPG firefoxFixScrollFlex-cnI2ix contentRegionScroller-26nc1e content-region-scroller scroller",
|
||||||
|
ref: "contentScroller"
|
||||||
|
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
||||||
|
className: "contentColumn-2hrIYH contentColumnDefault-1VQkGM content-column default"
|
||||||
|
}, content.component), tools.component)))));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "./src/ui/publicservers/tabbar.js":
|
||||||
|
/*!****************************************!*\
|
||||||
|
!*** ./src/ui/publicservers/tabbar.js ***!
|
||||||
|
\****************************************/
|
||||||
|
/*! exports provided: default */
|
||||||
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
__webpack_require__.r(__webpack_exports__);
|
||||||
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return V2Cs_TabBar; });
|
||||||
|
/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! modules */ "./src/modules/modules.js");
|
||||||
|
|
||||||
|
|
||||||
|
class V2C_TabBarItem extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.setInitialState();
|
||||||
|
this.onClick = this.onClick.bind(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
setInitialState() {
|
||||||
|
this.state = {
|
||||||
|
selected: this.props.selected || false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
||||||
|
className: `ui-tab-bar-item${this.props.selected ? " selected" : ""}`,
|
||||||
|
onClick: this.onClick
|
||||||
|
}, this.props.text);
|
||||||
|
}
|
||||||
|
|
||||||
|
onClick() {
|
||||||
|
if (this.props.onClick) {
|
||||||
|
this.props.onClick(this.props.id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class V2C_TabBarSeparator extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
||||||
|
className: "ui-tab-bar-separator margin-top-8 margin-bottom-8"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class V2C_TabBarHeader extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
||||||
|
className: "ui-tab-bar-header"
|
||||||
|
}, this.props.text);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class V2Cs_TabBar {
|
||||||
|
static get Item() {
|
||||||
|
return V2C_TabBarItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
static get Header() {
|
||||||
|
return V2C_TabBarHeader;
|
||||||
|
}
|
||||||
|
|
||||||
|
static get Separator() {
|
||||||
|
return V2C_TabBarSeparator;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/ui/settings/divider.jsx":
|
/***/ "./src/ui/settings/divider.jsx":
|
||||||
/*!*************************************!*\
|
/*!*************************************!*\
|
||||||
!*** ./src/ui/settings/divider.jsx ***!
|
!*** ./src/ui/settings/divider.jsx ***!
|
||||||
|
@ -6108,53 +6282,6 @@ class Divider extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Component {
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/ui/settings/exitbutton.js":
|
|
||||||
/*!***************************************!*\
|
|
||||||
!*** ./src/ui/settings/exitbutton.js ***!
|
|
||||||
\***************************************/
|
|
||||||
/*! exports provided: default */
|
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return V2C_Tools; });
|
|
||||||
/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! modules */ "./src/modules/modules.js");
|
|
||||||
/* harmony import */ var _icons_close__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../icons/close */ "./src/ui/icons/close.js");
|
|
||||||
|
|
||||||
|
|
||||||
class V2C_Tools extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.onClick = this.onClick.bind(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
|
||||||
className: "tools-container toolsContainer-1edPuj"
|
|
||||||
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
|
||||||
className: "tools tools-3-3s-N"
|
|
||||||
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
|
||||||
className: "container-1sFeqf"
|
|
||||||
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
|
||||||
className: "btn-close closeButton-1tv5uR",
|
|
||||||
onClick: this.onClick
|
|
||||||
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement(_icons_close__WEBPACK_IMPORTED_MODULE_1__["default"], null)), modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
|
||||||
className: "esc-text keybind-KpFkfr"
|
|
||||||
}, "ESC"))));
|
|
||||||
}
|
|
||||||
|
|
||||||
onClick() {
|
|
||||||
if (this.props.onClick) {
|
|
||||||
this.props.onClick();
|
|
||||||
}
|
|
||||||
|
|
||||||
$(".closeButton-1tv5uR").first().click();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "./src/ui/settings/group.jsx":
|
/***/ "./src/ui/settings/group.jsx":
|
||||||
/*!***********************************!*\
|
/*!***********************************!*\
|
||||||
!*** ./src/ui/settings/group.jsx ***!
|
!*** ./src/ui/settings/group.jsx ***!
|
||||||
|
@ -6167,9 +6294,9 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Group; });
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Group; });
|
||||||
/* harmony import */ var data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! data */ "./src/data/data.js");
|
/* harmony import */ var data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! data */ "./src/data/data.js");
|
||||||
/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! modules */ "./src/modules/modules.js");
|
/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! modules */ "./src/modules/modules.js");
|
||||||
/* harmony import */ var _title__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./title */ "./src/ui/settings/title.js");
|
/* harmony import */ var _title__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./title */ "./src/ui/settings/title.jsx");
|
||||||
/* harmony import */ var _divider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./divider */ "./src/ui/settings/divider.jsx");
|
/* harmony import */ var _divider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./divider */ "./src/ui/settings/divider.jsx");
|
||||||
/* harmony import */ var _switch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./switch */ "./src/ui/settings/switch.js");
|
/* harmony import */ var _switch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./switch */ "./src/ui/settings/switch.jsx");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -6193,6 +6320,7 @@ class Group extends modules__WEBPACK_IMPORTED_MODULE_1__["React"].Component {
|
||||||
this.state = {
|
this.state = {
|
||||||
collapsed: this.props.collapsible && this.props.collapsed
|
collapsed: this.props.collapsible && this.props.collapsed
|
||||||
};
|
};
|
||||||
|
this.onChange = this.onChange.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleCollapse() {
|
toggleCollapse() {
|
||||||
|
@ -6204,6 +6332,13 @@ class Group extends modules__WEBPACK_IMPORTED_MODULE_1__["React"].Component {
|
||||||
}, () => setTimeout(() => container.style.setProperty("height", ""), timeout));
|
}, () => setTimeout(() => container.style.setProperty("height", ""), timeout));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onChange(id, value) {
|
||||||
|
if (!this.props.onChange) return;
|
||||||
|
if (this.props.id) return this.props.onChange(this.props.id, id, value);
|
||||||
|
this.props.onChange(id, value);
|
||||||
|
this.forceUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
settings
|
settings
|
||||||
|
@ -6221,16 +6356,16 @@ class Group extends modules__WEBPACK_IMPORTED_MODULE_1__["React"].Component {
|
||||||
className: "bd-settings-container",
|
className: "bd-settings-container",
|
||||||
ref: this.container
|
ref: this.container
|
||||||
}, settings.map(setting => {
|
}, settings.map(setting => {
|
||||||
return modules__WEBPACK_IMPORTED_MODULE_1__["React"].createElement(_switch__WEBPACK_IMPORTED_MODULE_4__["default"], {
|
const item = modules__WEBPACK_IMPORTED_MODULE_1__["React"].createElement(_switch__WEBPACK_IMPORTED_MODULE_4__["default"], {
|
||||||
id: setting.id,
|
id: setting.id,
|
||||||
key: setting.id,
|
key: setting.id,
|
||||||
name: setting.text,
|
name: setting.text,
|
||||||
note: setting.info,
|
note: setting.info,
|
||||||
checked: data__WEBPACK_IMPORTED_MODULE_0__["SettingsCookie"][setting.id],
|
checked: data__WEBPACK_IMPORTED_MODULE_0__["SettingsCookie"][setting.id],
|
||||||
onChange: (id, checked) => {
|
onChange: this.onChange
|
||||||
this.props.onChange(id, checked);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
const shouldHide = setting.shouldHide ? setting.shouldHide() : false;
|
||||||
|
if (!shouldHide) return item;
|
||||||
})), this.props.showDivider && modules__WEBPACK_IMPORTED_MODULE_1__["React"].createElement(_divider__WEBPACK_IMPORTED_MODULE_3__["default"], null));
|
})), this.props.showDivider && modules__WEBPACK_IMPORTED_MODULE_1__["React"].createElement(_divider__WEBPACK_IMPORTED_MODULE_3__["default"], null));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6252,6 +6387,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! modules */ "./src/modules/modules.js");
|
/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! modules */ "./src/modules/modules.js");
|
||||||
/* harmony import */ var _settings_group__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../settings/group */ "./src/ui/settings/group.jsx");
|
/* harmony import */ var _settings_group__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../settings/group */ "./src/ui/settings/group.jsx");
|
||||||
/* harmony import */ var _ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ui */ "./src/ui/ui.js");
|
/* harmony import */ var _ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ui */ "./src/ui/ui.js");
|
||||||
|
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! crypto */ "crypto");
|
||||||
|
/* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(crypto__WEBPACK_IMPORTED_MODULE_4__);
|
||||||
|
|
||||||
// import Sidebar from "./sidebar";
|
// import Sidebar from "./sidebar";
|
||||||
// import Scroller from "../scroller";
|
// import Scroller from "../scroller";
|
||||||
|
@ -6268,7 +6405,14 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class V2_SettingsPanel {
|
class V2_SettingsPanel {
|
||||||
|
constructor({
|
||||||
|
onChange
|
||||||
|
}) {
|
||||||
|
this.onChange = onChange;
|
||||||
|
}
|
||||||
|
|
||||||
get coreSettings() {
|
get coreSettings() {
|
||||||
const settings = this.getSettings("core");
|
const settings = this.getSettings("core");
|
||||||
const categories = [...new Set(settings.map(s => s.category))];
|
const categories = [...new Set(settings.map(s => s.category))];
|
||||||
|
@ -6278,7 +6422,6 @@ class V2_SettingsPanel {
|
||||||
settings: settings.filter(s => s.category == c)
|
settings: settings.filter(s => s.category == c)
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
console.log(sections);
|
|
||||||
return sections;
|
return sections;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6309,6 +6452,8 @@ class V2_SettingsPanel {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
console.log(section);
|
||||||
|
if (section.settings.find(s => s.text == "Hide Channels")) section.settings.find(s => s.text == "Hide Channels").shouldHide = () => !data__WEBPACK_IMPORTED_MODULE_0__["SettingsCookie"]["bda-gs-2"];
|
||||||
return modules__WEBPACK_IMPORTED_MODULE_1__["React"].createElement(_settings_group__WEBPACK_IMPORTED_MODULE_2__["default"], Object.assign({}, section, {
|
return modules__WEBPACK_IMPORTED_MODULE_1__["React"].createElement(_settings_group__WEBPACK_IMPORTED_MODULE_2__["default"], Object.assign({}, section, {
|
||||||
onChange: this.onChange,
|
onChange: this.onChange,
|
||||||
collapsible: true,
|
collapsible: true,
|
||||||
|
@ -6406,10 +6551,10 @@ class V2_SettingsPanel {
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/ui/settings/switch.js":
|
/***/ "./src/ui/settings/switch.jsx":
|
||||||
/*!***********************************!*\
|
/*!************************************!*\
|
||||||
!*** ./src/ui/settings/switch.js ***!
|
!*** ./src/ui/settings/switch.jsx ***!
|
||||||
\***********************************/
|
\************************************/
|
||||||
/*! exports provided: default */
|
/*! exports provided: default */
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
|
@ -6430,7 +6575,6 @@ const divider = "divider-3573oO dividerDefault-3rvLe-";
|
||||||
class Switch extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Component {
|
class Switch extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
console.log(props);
|
|
||||||
this.state = {
|
this.state = {
|
||||||
checked: this.props.checked
|
checked: this.props.checked
|
||||||
};
|
};
|
||||||
|
@ -6485,146 +6629,17 @@ class Switch extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Component {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // export default class V2C_Switch extends React.Component {
|
}
|
||||||
// constructor(props) {
|
|
||||||
// super(props);
|
|
||||||
// this.setInitialState();
|
|
||||||
// this.onChange = this.onChange.bind(this);
|
|
||||||
// }
|
|
||||||
// setInitialState() {
|
|
||||||
// this.state = {
|
|
||||||
// checked: this.props.checked
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
// render() {
|
|
||||||
// const {text, info} = this.props.data;
|
|
||||||
// const {checked} = this.state;
|
|
||||||
// return React.createElement(
|
|
||||||
// "div",
|
|
||||||
// {className: `ui-flex flex-vertical flex-justify-start flex-align-stretch flex-nowrap ui-switch-item ${flexContainer}`},
|
|
||||||
// React.createElement(
|
|
||||||
// "div",
|
|
||||||
// {className: `ui-flex flex-horizontal flex-justify-start flex-align-stretch flex-nowrap ${flexWrap}`},
|
|
||||||
// React.createElement(
|
|
||||||
// "h3",
|
|
||||||
// {className: `ui-form-title h3 margin-reset margin-reset ui-flex-child ${title} ${flexChild}`},
|
|
||||||
// text
|
|
||||||
// ),
|
|
||||||
// React.createElement(
|
|
||||||
// "div",
|
|
||||||
// {className: `ui-switch-wrapper ui-flex-child ${checked ? switchWrapperChecked : switchWrapper}`, style: {flex: "0 0 auto"}},
|
|
||||||
// React.createElement("input", {className: `ui-switch-checkbox ${switchClass}`, type: "checkbox", checked: checked, onChange: e => this.onChange(e)}),
|
|
||||||
// React.createElement("div", {className: `ui-switch ${checked ? "checked" : ""}`})
|
|
||||||
// )
|
|
||||||
// ),
|
|
||||||
// React.createElement(
|
|
||||||
// "div",
|
|
||||||
// {className: `ui-form-text style-description margin-top-4 ${description}`, style: {flex: "1 1 auto"}},
|
|
||||||
// info
|
|
||||||
// )
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// onChange() {
|
|
||||||
// this.props.onChange(this.props.id, !this.state.checked);
|
|
||||||
// this.setState({
|
|
||||||
// checked: !this.state.checked
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/ui/settings/tabbar.js":
|
/***/ "./src/ui/settings/title.jsx":
|
||||||
/*!***********************************!*\
|
/*!***********************************!*\
|
||||||
!*** ./src/ui/settings/tabbar.js ***!
|
!*** ./src/ui/settings/title.jsx ***!
|
||||||
\***********************************/
|
\***********************************/
|
||||||
/*! exports provided: default */
|
/*! exports provided: default */
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return V2Cs_TabBar; });
|
|
||||||
/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! modules */ "./src/modules/modules.js");
|
|
||||||
|
|
||||||
|
|
||||||
class V2C_TabBarItem extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.setInitialState();
|
|
||||||
this.onClick = this.onClick.bind(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
setInitialState() {
|
|
||||||
this.state = {
|
|
||||||
selected: this.props.selected || false
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
|
||||||
className: `ui-tab-bar-item${this.props.selected ? " selected" : ""}`,
|
|
||||||
onClick: this.onClick
|
|
||||||
}, this.props.text);
|
|
||||||
}
|
|
||||||
|
|
||||||
onClick() {
|
|
||||||
if (this.props.onClick) {
|
|
||||||
this.props.onClick(this.props.id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
class V2C_TabBarSeparator extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
|
||||||
className: "ui-tab-bar-separator margin-top-8 margin-bottom-8"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
class V2C_TabBarHeader extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
|
||||||
className: "ui-tab-bar-header"
|
|
||||||
}, this.props.text);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
class V2Cs_TabBar {
|
|
||||||
static get Item() {
|
|
||||||
return V2C_TabBarItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
static get Header() {
|
|
||||||
return V2C_TabBarHeader;
|
|
||||||
}
|
|
||||||
|
|
||||||
static get Separator() {
|
|
||||||
return V2C_TabBarSeparator;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "./src/ui/settings/title.js":
|
|
||||||
/*!**********************************!*\
|
|
||||||
!*** ./src/ui/settings/title.js ***!
|
|
||||||
\**********************************/
|
|
||||||
/*! exports provided: default */
|
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return SettingsTitle; });
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return SettingsTitle; });
|
||||||
|
@ -6645,7 +6660,7 @@ class SettingsTitle extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Compon
|
||||||
this.props.onClick && this.props.onClick();
|
this.props.onClick && this.props.onClick();
|
||||||
}
|
}
|
||||||
}, this.props.text, this.props.button && modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("button", {
|
}, this.props.text, this.props.button && modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("button", {
|
||||||
className: "bd-pfbtn",
|
className: "bd-title-button",
|
||||||
onClick: this.props.button.onClick
|
onClick: this.props.button.onClick
|
||||||
}, this.props.button.title));
|
}, this.props.button.title));
|
||||||
}
|
}
|
||||||
|
@ -6654,60 +6669,6 @@ class SettingsTitle extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Compon
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "./src/ui/sidebarview.js":
|
|
||||||
/*!*******************************!*\
|
|
||||||
!*** ./src/ui/sidebarview.js ***!
|
|
||||||
\*******************************/
|
|
||||||
/*! exports provided: default */
|
|
||||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return V2C_SidebarView; });
|
|
||||||
/* harmony import */ var modules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! modules */ "./src/modules/modules.js");
|
|
||||||
/* harmony import */ var _scroller__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scroller */ "./src/ui/scroller.js");
|
|
||||||
|
|
||||||
|
|
||||||
class V2C_SidebarView extends modules__WEBPACK_IMPORTED_MODULE_0__["React"].Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
sidebar,
|
|
||||||
content,
|
|
||||||
tools
|
|
||||||
} = this.props.children;
|
|
||||||
return modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
|
||||||
className: "standardSidebarView-3F1I7i ui-standard-sidebar-view"
|
|
||||||
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
|
||||||
className: "sidebarRegion-VFTUkN sidebar-region"
|
|
||||||
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement(_scroller__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
||||||
key: "sidebarScroller",
|
|
||||||
ref: "sidebarScroller",
|
|
||||||
sidebar: true,
|
|
||||||
fade: sidebar.fade || true,
|
|
||||||
dark: sidebar.dark || true,
|
|
||||||
children: sidebar.component
|
|
||||||
})), modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
|
||||||
className: "contentRegion-3nDuYy content-region"
|
|
||||||
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
|
||||||
className: "contentTransitionWrap-3hqOEW content-transition-wrap"
|
|
||||||
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
|
||||||
className: "scrollerWrap-2lJEkd firefoxFixScrollFlex-cnI2ix contentRegionScrollerWrap-3YZXdm content-region-scroller-wrap scrollerThemed-2oenus themeGhost-28MSn0 scrollerTrack-1ZIpsv"
|
|
||||||
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
|
||||||
className: "scroller-2FKFPG firefoxFixScrollFlex-cnI2ix contentRegionScroller-26nc1e content-region-scroller scroller",
|
|
||||||
ref: "contentScroller"
|
|
||||||
}, modules__WEBPACK_IMPORTED_MODULE_0__["React"].createElement("div", {
|
|
||||||
className: "contentColumn-2hrIYH contentColumnDefault-1VQkGM content-column default"
|
|
||||||
}, content.component), tools.component)))));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ "./src/ui/toasts.js":
|
/***/ "./src/ui/toasts.js":
|
||||||
/*!**************************!*\
|
/*!**************************!*\
|
||||||
!*** ./src/ui/toasts.js ***!
|
!*** ./src/ui/toasts.js ***!
|
||||||
|
@ -6851,6 +6812,17 @@ __webpack_require__.r(__webpack_exports__);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "crypto":
|
||||||
|
/*!*************************!*\
|
||||||
|
!*** external "crypto" ***!
|
||||||
|
\*************************/
|
||||||
|
/*! no static exports found */
|
||||||
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
|
module.exports = require("crypto");
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "electron":
|
/***/ "electron":
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import Builtin, {onSettingChange} from "../structs/builtin";
|
import Builtin from "../structs/builtin";
|
||||||
|
|
||||||
import {Config, SettingsCookie, Emotes, EmoteBlacklist, EmoteInfo, EmoteModifiers, EmoteOverrides, State} from "data";
|
import {Config, SettingsCookie, Emotes, EmoteBlacklist, EmoteInfo, EmoteModifiers, EmoteOverrides, State} from "data";
|
||||||
import {Utilities, WebpackModules, DataStore, DiscordModules, Events} from "modules";
|
import {Utilities, WebpackModules, DataStore, DiscordModules, Events} from "modules";
|
||||||
|
@ -23,12 +23,12 @@ export default new class EmoteModule extends Builtin {
|
||||||
|
|
||||||
async initialize() {
|
async initialize() {
|
||||||
super.initialize();
|
super.initialize();
|
||||||
return;
|
// Disable emote module for now because it's annoying and slow
|
||||||
await this.getBlacklist();
|
// await this.getBlacklist();
|
||||||
await this.loadEmoteData(EmoteInfo);
|
// await this.loadEmoteData(EmoteInfo);
|
||||||
|
|
||||||
while (!this.MessageContentComponent) await new Promise(resolve => setTimeout(resolve, 100));
|
// while (!this.MessageContentComponent) await new Promise(resolve => setTimeout(resolve, 100));
|
||||||
this.patchMessageContent();
|
// this.patchMessageContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
disabled() {
|
disabled() {
|
||||||
|
|
|
@ -54,8 +54,7 @@ export default new class PublicServers extends Builtin {
|
||||||
get button() {
|
get button() {
|
||||||
const btn = $("<div/>", {
|
const btn = $("<div/>", {
|
||||||
"class": BDV2.guildClasses.listItem,
|
"class": BDV2.guildClasses.listItem,
|
||||||
"id": "bd-pub-li",
|
"id": "bd-pub-li"
|
||||||
"style": SettingsCookie["bda-gs-1"] ? "" : "display: none;"
|
|
||||||
}).append($("<div/>", {
|
}).append($("<div/>", {
|
||||||
"class": "wrapper-25eVIn " + BDV2.guildClasses.circleButtonMask,
|
"class": "wrapper-25eVIn " + BDV2.guildClasses.circleButtonMask,
|
||||||
"text": "public",
|
"text": "public",
|
||||||
|
|
|
@ -10,6 +10,6 @@ import Emotes from "./emotes/emotes";
|
||||||
import EmoteBlacklist from "./emotes/blacklist";
|
import EmoteBlacklist from "./emotes/blacklist";
|
||||||
import EmoteInfo from "./emotes/info";
|
import EmoteInfo from "./emotes/info";
|
||||||
import EmoteModifiers from "./emotes/modifiers";
|
import EmoteModifiers from "./emotes/modifiers";
|
||||||
import EmoteOverrides from "./emotes/overrides"
|
import EmoteOverrides from "./emotes/overrides";
|
||||||
|
|
||||||
export {State, SettingsInfo, SettingsCookie, Config, PluginCookie, ThemeCookie, Themes, Plugins, Emotes, EmoteBlacklist, EmoteInfo, EmoteModifiers, EmoteOverrides};
|
export {State, SettingsInfo, SettingsCookie, Config, PluginCookie, ThemeCookie, Themes, Plugins, Emotes, EmoteBlacklist, EmoteInfo, EmoteModifiers, EmoteOverrides};
|
|
@ -0,0 +1,76 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"type": "category",
|
||||||
|
"id": "modules",
|
||||||
|
"name": "Modules",
|
||||||
|
"collapsible": true,
|
||||||
|
"settings": [
|
||||||
|
{
|
||||||
|
"type": "switch",
|
||||||
|
"id": "publicServers",
|
||||||
|
"name": "Public Servers",
|
||||||
|
"note": "Display public servers button",
|
||||||
|
"value": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "switch",
|
||||||
|
"id": "voiceDisconnect",
|
||||||
|
"name": "Voice Disconnect",
|
||||||
|
"note": "Disconnect from voice server when closing Discord",
|
||||||
|
"value": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "switch",
|
||||||
|
"id": "24hour",
|
||||||
|
"name": "24 Hour Timestamps",
|
||||||
|
"note": "Hides channels when in minimal mode",
|
||||||
|
"value": true,
|
||||||
|
"depends": "minimalMode"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "switch",
|
||||||
|
"id": "classNormalizer",
|
||||||
|
"name": "Normalize Classes",
|
||||||
|
"note": "Adds stable classes to elements to help themes. (e.g. adds .da-channels to .channels-Ie2l6A)",
|
||||||
|
"value": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "category",
|
||||||
|
"id": "appearance",
|
||||||
|
"name": "Appearance",
|
||||||
|
"collapsible": true,
|
||||||
|
"settings": [
|
||||||
|
{
|
||||||
|
"type": "switch",
|
||||||
|
"id": "minimalMode",
|
||||||
|
"name": "Minimal Mode",
|
||||||
|
"note": "Hide elements and reduce the size of elements.",
|
||||||
|
"value": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "switch",
|
||||||
|
"id": "hideChannels",
|
||||||
|
"name": "Hide Channels",
|
||||||
|
"note": "Hides channels when in minimal mode",
|
||||||
|
"value": true,
|
||||||
|
"enableWith": "minimalMode"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "switch",
|
||||||
|
"id": "darkMode",
|
||||||
|
"name": "Dark Mode",
|
||||||
|
"note": "Make certain elements dark by default",
|
||||||
|
"value": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "switch",
|
||||||
|
"id": "coloredText",
|
||||||
|
"name": "Colored Text",
|
||||||
|
"note": "Make text colour the same as role color",
|
||||||
|
"value": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
|
@ -1,4 +1,3 @@
|
||||||
import {SettingsInfo} from "data";
|
|
||||||
import WebpackModules, {DiscordModules} from "./webpackmodules";
|
import WebpackModules, {DiscordModules} from "./webpackmodules";
|
||||||
import Utilities from "./utilities";
|
import Utilities from "./utilities";
|
||||||
import BDLogo from "../ui/icons/bdlogo";
|
import BDLogo from "../ui/icons/bdlogo";
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import BDV2 from "./bdv2";
|
import BDV2 from "./bdv2";
|
||||||
import Utilities from "./utilities";
|
import Utilities from "./utilities";
|
||||||
import {Config, SettingsCookie} from "data";
|
import {Config} from "data";
|
||||||
// import EmoteModule from "./emotes";
|
// import EmoteModule from "./emotes";
|
||||||
// import QuickEmoteMenu from "../builtins/emotemenu";
|
// import QuickEmoteMenu from "../builtins/emotemenu";
|
||||||
import PluginManager from "./pluginmanager";
|
import PluginManager from "./pluginmanager";
|
||||||
import ThemeManager from "./thememanager";
|
import ThemeManager from "./thememanager";
|
||||||
import SettingsPanel from "./settingspanel";
|
import SettingsPanel from "./settingsmanager";
|
||||||
import * as Builtins from "builtins";
|
import * as Builtins from "builtins";
|
||||||
import {Modals} from "ui";
|
import {Modals} from "ui";
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import {SettingsCookie, PluginCookie, Plugins} from "data";
|
import {PluginCookie, Plugins} from "data";
|
||||||
import ContentManager from "./contentmanager";
|
import ContentManager from "./contentmanager";
|
||||||
import Utilities from "./utilities";
|
import Utilities from "./utilities";
|
||||||
import Emitter from "./emitter";
|
import Emitter from "./emitter";
|
||||||
|
|
|
@ -13,7 +13,7 @@ import {Toasts} from "ui";
|
||||||
//WebpackModules.getModule(m => m.getSection && m.getProps && !m.getGuildId && !m.getChannel)
|
//WebpackModules.getModule(m => m.getSection && m.getProps && !m.getGuildId && !m.getChannel)
|
||||||
//WebpackModules.getByProps("getGuildId", "getSection")
|
//WebpackModules.getByProps("getGuildId", "getSection")
|
||||||
|
|
||||||
export default new class SettingsPanel {
|
export default new class SettingsManager {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.renderer = new SettingsRenderer({onChange: this.updateSettings.bind(this)});
|
this.renderer = new SettingsRenderer({onChange: this.updateSettings.bind(this)});
|
||||||
|
@ -28,25 +28,13 @@ export default new class SettingsPanel {
|
||||||
if (savedSettings[setting] !== undefined) SettingsCookie[setting] = savedSettings[setting];
|
if (savedSettings[setting] !== undefined) SettingsCookie[setting] = savedSettings[setting];
|
||||||
}
|
}
|
||||||
this.saveSettings();
|
this.saveSettings();
|
||||||
// console.log("PATCHING");
|
|
||||||
// Utilities.monkeyPatch(WebpackModules.getByProps("getUserSettingsSections").default.prototype, "render", {after: (data) => {
|
|
||||||
// data.returnValue.type;
|
|
||||||
// }});
|
|
||||||
|
|
||||||
// Patcher.after(temp2.prototype, "generateSections", (t,a,r) => {
|
|
||||||
// r.push({section: "DIVIDER"});
|
|
||||||
// r.push({section: "HEADER", label: "My Section"});
|
|
||||||
// r.push({color: "#ffffff", label: "My Tab", onClick: function() {console.log("CLICK");}, section: "My Section"});
|
|
||||||
// r.push({color: "#cccccc", label: "My Tab2", onClick: function() {console.log("CLICK2");}, section: "My Section"});
|
|
||||||
|
|
||||||
// })
|
|
||||||
this.patchSections();
|
this.patchSections();
|
||||||
}
|
}
|
||||||
|
|
||||||
async patchSections() {
|
async patchSections() {
|
||||||
const UserSettings = await this.getUserSettings(); // data.returnValue.type;
|
const UserSettings = await this.getUserSettings(); // data.returnValue.type;
|
||||||
Utilities.monkeyPatch(UserSettings.prototype, "generateSections", {after: (data) => {
|
Utilities.monkeyPatch(UserSettings.prototype, "generateSections", {after: (data) => {
|
||||||
console.log(data);
|
console.log(data); /* eslint-disable-line no-console */
|
||||||
data.returnValue.splice(23, 0, {section: "DIVIDER"});
|
data.returnValue.splice(23, 0, {section: "DIVIDER"});
|
||||||
data.returnValue.splice(24, 0, {section: "HEADER", label: "BandagedBD"});
|
data.returnValue.splice(24, 0, {section: "HEADER", label: "BandagedBD"});
|
||||||
data.returnValue.splice(25, 0, {section: "BBD Settings", label: "Settings", element: () => this.renderer.core2});
|
data.returnValue.splice(25, 0, {section: "BBD Settings", label: "Settings", element: () => this.renderer.core2});
|
|
@ -1,4 +1,4 @@
|
||||||
import {SettingsCookie, ThemeCookie, Themes} from "data";
|
import {ThemeCookie, Themes} from "data";
|
||||||
import ContentManager from "./contentmanager";
|
import ContentManager from "./contentmanager";
|
||||||
import Utilities from "./utilities";
|
import Utilities from "./utilities";
|
||||||
import Emitter from "./emitter";
|
import Emitter from "./emitter";
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* eslint-disable no-console */
|
||||||
|
|
||||||
export default class Utilities {
|
export default class Utilities {
|
||||||
/** Document/window width */
|
/** Document/window width */
|
||||||
static get screenWidth() { return Math.max(document.documentElement.clientWidth, window.innerWidth || 0); }
|
static get screenWidth() { return Math.max(document.documentElement.clientWidth, window.innerWidth || 0); }
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
import {React} from "modules";
|
|
||||||
|
|
||||||
export default class V2C_List extends React.Component {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return <ul className={this.props.className}>{this.props.children}</ul>;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
import {React, ReactDOM, WebpackModules} from "modules";
|
import {React, ReactDOM, WebpackModules} from "modules";
|
||||||
import SidebarView from "../sidebarview";
|
import SidebarView from "./sidebarview";
|
||||||
import Tools from "../settings/exitbutton";
|
import Tools from "./exitbutton";
|
||||||
import TabBar from "../settings/tabbar";
|
import TabBar from "./tabbar";
|
||||||
import SettingsTitle from "../settings/title";
|
import SettingsTitle from "../settings/title";
|
||||||
import ServerCard from "./card";
|
import ServerCard from "./card";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import Menu from "./menu";
|
import Menu from "./menu";
|
||||||
import Card from "./card";
|
import Card from "./card";
|
||||||
import Layer from "../layer";
|
import Layer from "./layer";
|
||||||
|
|
||||||
export {Menu, Card, Layer};
|
export {Menu, Card, Layer};
|
|
@ -22,6 +22,8 @@ export default class Group extends React.Component {
|
||||||
this.state = {
|
this.state = {
|
||||||
collapsed: this.props.collapsible && this.props.collapsed
|
collapsed: this.props.collapsible && this.props.collapsed
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.onChange = this.onChange.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleCollapse() {
|
toggleCollapse() {
|
||||||
|
@ -31,6 +33,13 @@ export default class Group extends React.Component {
|
||||||
this.setState({collapsed: !this.state.collapsed}, () => setTimeout(() => container.style.setProperty("height", ""), timeout));
|
this.setState({collapsed: !this.state.collapsed}, () => setTimeout(() => container.style.setProperty("height", ""), timeout));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onChange(id, value) {
|
||||||
|
if (!this.props.onChange) return;
|
||||||
|
if (this.props.id) return this.props.onChange(this.props.id, id, value);
|
||||||
|
this.props.onChange(id, value);
|
||||||
|
this.forceUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {settings} = this.props;
|
const {settings} = this.props;
|
||||||
const collapseClass = this.props.collapsible ? `collapsible ${this.state.collapsed && "collapsed"}` : "";
|
const collapseClass = this.props.collapsible ? `collapsible ${this.state.collapsed && "collapsed"}` : "";
|
||||||
|
@ -40,9 +49,9 @@ export default class Group extends React.Component {
|
||||||
<Title text={this.props.title} collapsible={this.props.collapsible} onClick={() => this.toggleCollapse()} button={this.props.button} />
|
<Title text={this.props.title} collapsible={this.props.collapsible} onClick={() => this.toggleCollapse()} button={this.props.button} />
|
||||||
<div className="bd-settings-container" ref={this.container}>
|
<div className="bd-settings-container" ref={this.container}>
|
||||||
{settings.map((setting) => {
|
{settings.map((setting) => {
|
||||||
return <Switch id={setting.id} key={setting.id} name={setting.text} note={setting.info} checked={SettingsCookie[setting.id]} onChange={(id, checked) => {
|
const item = <Switch id={setting.id} key={setting.id} name={setting.text} note={setting.info} checked={SettingsCookie[setting.id]} onChange={this.onChange} />;
|
||||||
this.props.onChange(id, checked);
|
const shouldHide = setting.shouldHide ? setting.shouldHide() : false;
|
||||||
}} />;
|
if (!shouldHide) return item;
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
{this.props.showDivider && <Divider />}
|
{this.props.showDivider && <Divider />}
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
import {React} from "modules";
|
|
||||||
import SettingsGroup from "./group";
|
|
||||||
|
|
||||||
export default class V2C_SectionedSettingsPanel extends React.Component {
|
|
||||||
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return React.createElement(
|
|
||||||
"div", {className: "contentColumn-2hrIYH contentColumnDefault-1VQkGM content-column default"},
|
|
||||||
this.props.sections.map(section => {
|
|
||||||
return React.createElement(SettingsGroup, Object.assign({}, section, {onChange: this.props.onChange}));
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,4 +1,4 @@
|
||||||
import {SettingsInfo, Config/*, SettingsCookie, Plugins, Themes*/} from "data";
|
import {SettingsInfo, Config, SettingsCookie/*, Plugins, Themes*/} from "data";
|
||||||
import {React/*, ReactDOM, Utilities, ContentManager, Events, PluginManager, ThemeManager*/} from "modules";
|
import {React/*, ReactDOM, Utilities, ContentManager, Events, PluginManager, ThemeManager*/} from "modules";
|
||||||
// import Sidebar from "./sidebar";
|
// import Sidebar from "./sidebar";
|
||||||
// import Scroller from "../scroller";
|
// import Scroller from "../scroller";
|
||||||
|
@ -15,14 +15,18 @@ import {React/*, ReactDOM, Utilities, ContentManager, Events, PluginManager, The
|
||||||
// import SettingsGroup from "../settings/settingsgroup";
|
// import SettingsGroup from "../settings/settingsgroup";
|
||||||
import SettingsGroup2 from "../settings/group";
|
import SettingsGroup2 from "../settings/group";
|
||||||
import {Toasts} from "../ui";
|
import {Toasts} from "../ui";
|
||||||
|
import { sign } from "crypto";
|
||||||
|
|
||||||
export default class V2_SettingsPanel {
|
export default class V2_SettingsPanel {
|
||||||
|
|
||||||
|
constructor({onChange}) {
|
||||||
|
this.onChange = onChange;
|
||||||
|
}
|
||||||
|
|
||||||
get coreSettings() {
|
get coreSettings() {
|
||||||
const settings = this.getSettings("core");
|
const settings = this.getSettings("core");
|
||||||
const categories = [...new Set(settings.map(s => s.category))];
|
const categories = [...new Set(settings.map(s => s.category))];
|
||||||
const sections = categories.map(c => {return {title: c, settings: settings.filter(s => s.category == c)};});
|
const sections = categories.map(c => {return {title: c, settings: settings.filter(s => s.category == c)};});
|
||||||
console.log(sections);
|
|
||||||
return sections;
|
return sections;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,6 +48,8 @@ export default class V2_SettingsPanel {
|
||||||
get core2() {
|
get core2() {
|
||||||
return this.coreSettings.map((section, i) => {
|
return this.coreSettings.map((section, i) => {
|
||||||
if (i == 0) section.button = {title: "Call to Action!", onClick: () => {Toasts.success("You did it!", {forceShow: true});}};
|
if (i == 0) section.button = {title: "Call to Action!", onClick: () => {Toasts.success("You did it!", {forceShow: true});}};
|
||||||
|
console.log(section);
|
||||||
|
if (section.settings.find(s => s.text == "Hide Channels")) section.settings.find(s => s.text == "Hide Channels").shouldHide = () => !SettingsCookie["bda-gs-2"];
|
||||||
return React.createElement(SettingsGroup2, Object.assign({}, section, {onChange: this.onChange, collapsible: true, collapsed: i > 1}));
|
return React.createElement(SettingsGroup2, Object.assign({}, section, {onChange: this.onChange, collapsible: true, collapsed: i > 1}));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ const divider = "divider-3573oO dividerDefault-3rvLe-";
|
||||||
export default class Switch extends React.Component {
|
export default class Switch extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
console.log(props);
|
|
||||||
this.state = {
|
this.state = {
|
||||||
checked: this.props.checked
|
checked: this.props.checked
|
||||||
};
|
};
|
||||||
|
@ -40,55 +40,4 @@ export default class Switch extends React.Component {
|
||||||
<div className={divider} />
|
<div className={divider} />
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// export default class V2C_Switch extends React.Component {
|
|
||||||
|
|
||||||
// constructor(props) {
|
|
||||||
// super(props);
|
|
||||||
// this.setInitialState();
|
|
||||||
// this.onChange = this.onChange.bind(this);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// setInitialState() {
|
|
||||||
// this.state = {
|
|
||||||
// checked: this.props.checked
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
|
|
||||||
// render() {
|
|
||||||
// const {text, info} = this.props.data;
|
|
||||||
// const {checked} = this.state;
|
|
||||||
// return React.createElement(
|
|
||||||
// "div",
|
|
||||||
// {className: `ui-flex flex-vertical flex-justify-start flex-align-stretch flex-nowrap ui-switch-item ${flexContainer}`},
|
|
||||||
// React.createElement(
|
|
||||||
// "div",
|
|
||||||
// {className: `ui-flex flex-horizontal flex-justify-start flex-align-stretch flex-nowrap ${flexWrap}`},
|
|
||||||
// React.createElement(
|
|
||||||
// "h3",
|
|
||||||
// {className: `ui-form-title h3 margin-reset margin-reset ui-flex-child ${title} ${flexChild}`},
|
|
||||||
// text
|
|
||||||
// ),
|
|
||||||
// React.createElement(
|
|
||||||
// "div",
|
|
||||||
// {className: `ui-switch-wrapper ui-flex-child ${checked ? switchWrapperChecked : switchWrapper}`, style: {flex: "0 0 auto"}},
|
|
||||||
// React.createElement("input", {className: `ui-switch-checkbox ${switchClass}`, type: "checkbox", checked: checked, onChange: e => this.onChange(e)}),
|
|
||||||
// React.createElement("div", {className: `ui-switch ${checked ? "checked" : ""}`})
|
|
||||||
// )
|
|
||||||
// ),
|
|
||||||
// React.createElement(
|
|
||||||
// "div",
|
|
||||||
// {className: `ui-form-text style-description margin-top-4 ${description}`, style: {flex: "1 1 auto"}},
|
|
||||||
// info
|
|
||||||
// )
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
// onChange() {
|
|
||||||
// this.props.onChange(this.props.id, !this.state.checked);
|
|
||||||
// this.setState({
|
|
||||||
// checked: !this.state.checked
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
|
@ -9,11 +9,9 @@ export default class SettingsTitle extends React.Component {
|
||||||
//h2-2gWE-o title-3sZWYQ size16-14cGz5 height20-mO2eIN weightSemiBold-NJexzi da-h2 da-title da-size16 da-height20 da-weightSemiBold defaultColor-1_ajX0 da-defaultColor marginTop60-3PGbtK da-marginTop60 marginBottom20-32qID7 da-marginBottom20
|
//h2-2gWE-o title-3sZWYQ size16-14cGz5 height20-mO2eIN weightSemiBold-NJexzi da-h2 da-title da-size16 da-height20 da-weightSemiBold defaultColor-1_ajX0 da-defaultColor marginTop60-3PGbtK da-marginTop60 marginBottom20-32qID7 da-marginBottom20
|
||||||
render() {
|
render() {
|
||||||
const titleClass = this.props.className ? `${className} ${this.props.className}` : className;
|
const titleClass = this.props.className ? `${className} ${this.props.className}` : className;
|
||||||
return React.createElement(
|
return <h2 className={titleClass} onClick={() => {this.props.onClick && this.props.onClick();}}>
|
||||||
"h2",
|
{this.props.text}
|
||||||
{className: titleClass, onClick: () => {this.props.onClick && this.props.onClick();}},
|
{this.props.button && <button className="bd-title-button" onClick={this.props.button.onClick}>{this.props.button.title}</button>}
|
||||||
this.props.text,
|
</h2>;
|
||||||
this.props.button && React.createElement("button", {className: "bd-pfbtn", onClick: this.props.button.onClick}, this.props.button.title)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue