stuff
This commit is contained in:
parent
21c0005599
commit
71873ffe21
|
@ -14,12 +14,12 @@ module.exports = (_ => {
|
||||||
"info": {
|
"info": {
|
||||||
"name": "PluginRepo",
|
"name": "PluginRepo",
|
||||||
"author": "DevilBro",
|
"author": "DevilBro",
|
||||||
"version": "2.1.1",
|
"version": "2.1.2",
|
||||||
"description": "Allow you to look at all plugins from the plugin repo and download them on the fly"
|
"description": "Allow you to look at all plugins from the plugin repo and download them on the fly"
|
||||||
},
|
},
|
||||||
"changeLog": {
|
"changeLog": {
|
||||||
"fixed": {
|
"fixed": {
|
||||||
"New Meta": "Fixed some issues with the meta parsing"
|
"New Settings Order": "Fixed for new settings order"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -657,12 +657,11 @@ module.exports = (_ => {
|
||||||
processSettingsView (e) {
|
processSettingsView (e) {
|
||||||
if (BDFDB.ArrayUtils.is(e.instance.props.sections) && e.instance.props.sections[0] && e.instance.props.sections[0].label == BDFDB.LanguageUtils.LanguageStrings.USER_SETTINGS) {
|
if (BDFDB.ArrayUtils.is(e.instance.props.sections) && e.instance.props.sections[0] && e.instance.props.sections[0].label == BDFDB.LanguageUtils.LanguageStrings.USER_SETTINGS) {
|
||||||
e.instance.props.sections = e.instance.props.sections.filter(n => n.section != "pluginrepo");
|
e.instance.props.sections = e.instance.props.sections.filter(n => n.section != "pluginrepo");
|
||||||
let oldSettings = !e.instance.props.sections.find(n => n.section == "plugins");
|
let index = e.instance.props.sections.indexOf(e.instance.props.sections.find(n => n.section == "themes") || e.instance.props.sections.find(n => n.section == BDFDB.DiscordConstants.UserSettingsSections.DEVELOPER_OPTIONS));
|
||||||
let index = e.instance.props.sections.indexOf(e.instance.props.sections.find(oldSettings ? n => n.section == BDFDB.DiscordConstants.UserSettingsSections.DEVELOPER_OPTIONS : n => n.section == BDFDB.DiscordConstants.UserSettingsSections.CHANGE_LOG || n.section == "changelog"));
|
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
e.instance.props.sections.splice(oldSettings ? index + 1 : index - 1, 0, {
|
e.instance.props.sections.splice(index + 1, 0, {
|
||||||
label: "Plugin Repo",
|
|
||||||
section: "pluginrepo",
|
section: "pluginrepo",
|
||||||
|
label: "Plugin Repo",
|
||||||
element: _ => {
|
element: _ => {
|
||||||
let options = Object.assign({}, modalSettings);
|
let options = Object.assign({}, modalSettings);
|
||||||
options.updated = options.updated && !showOnlyOutdated;
|
options.updated = options.updated && !showOnlyOutdated;
|
||||||
|
@ -675,7 +674,7 @@ module.exports = (_ => {
|
||||||
return BDFDB.ReactUtils.createElement(RepoListComponent, options, true);
|
return BDFDB.ReactUtils.createElement(RepoListComponent, options, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (oldSettings) e.instance.props.sections.splice(index + 1, 0, {section: "DIVIDER"});
|
if (!e.instance.props.sections.find(n => n.section == "plugins")) e.instance.props.sections.splice(index + 1, 0, {section: "DIVIDER"});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,12 +14,12 @@ module.exports = (_ => {
|
||||||
"info": {
|
"info": {
|
||||||
"name": "ThemeRepo",
|
"name": "ThemeRepo",
|
||||||
"author": "DevilBro",
|
"author": "DevilBro",
|
||||||
"version": "2.1.1",
|
"version": "2.1.2",
|
||||||
"description": "Allow you to preview all themes from the theme repo and download them on the fly"
|
"description": "Allow you to preview all themes from the theme repo and download them on the fly"
|
||||||
},
|
},
|
||||||
"changeLog": {
|
"changeLog": {
|
||||||
"fixed": {
|
"fixed": {
|
||||||
"New React Structure": "Fixed for new internal react structure"
|
"New Settings Order": "Fixed for new settings order"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -950,13 +950,11 @@ module.exports = (_ => {
|
||||||
processSettingsView (e) {
|
processSettingsView (e) {
|
||||||
if (BDFDB.ArrayUtils.is(e.instance.props.sections) && e.instance.props.sections[0] && e.instance.props.sections[0].label == BDFDB.LanguageUtils.LanguageStrings.USER_SETTINGS) {
|
if (BDFDB.ArrayUtils.is(e.instance.props.sections) && e.instance.props.sections[0] && e.instance.props.sections[0].label == BDFDB.LanguageUtils.LanguageStrings.USER_SETTINGS) {
|
||||||
e.instance.props.sections = e.instance.props.sections.filter(n => n.section != "themerepo");
|
e.instance.props.sections = e.instance.props.sections.filter(n => n.section != "themerepo");
|
||||||
let oldSettings = !e.instance.props.sections.find(n => n.section == "themes");
|
let index = e.instance.props.sections.indexOf(e.instance.props.sections.find(n => n.section == "pluginrepo") || e.instance.props.sections.find(n => n.section == "themes") || e.instance.props.sections.find(n => n.section == BDFDB.DiscordConstants.UserSettingsSections.DEVELOPER_OPTIONS));
|
||||||
let isPRinjected = oldSettings && e.instance.props.sections.find(n => n.section == "pluginrepo");
|
|
||||||
let index = e.instance.props.sections.indexOf(e.instance.props.sections.find(oldSettings ? (isPRinjected ? n => n.section == "pluginrepo" : n => n.section == BDFDB.DiscordConstants.UserSettingsSections.DEVELOPER_OPTIONS) : n => n.section == BDFDB.DiscordConstants.UserSettingsSections.CHANGE_LOG || n.section == "changelog"));
|
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
e.instance.props.sections.splice(oldSettings ? index + 1 : index - 1, 0, {
|
e.instance.props.sections.splice(index + 1, 0, {
|
||||||
label: "Theme Repo",
|
|
||||||
section: "themerepo",
|
section: "themerepo",
|
||||||
|
label: "Theme Repo",
|
||||||
element: _ => {
|
element: _ => {
|
||||||
let options = Object.assign({}, modalSettings);
|
let options = Object.assign({}, modalSettings);
|
||||||
options.updated = options.updated && !showOnlyOutdated;
|
options.updated = options.updated && !showOnlyOutdated;
|
||||||
|
@ -973,7 +971,7 @@ module.exports = (_ => {
|
||||||
return BDFDB.ReactUtils.createElement(RepoListComponent, options);
|
return BDFDB.ReactUtils.createElement(RepoListComponent, options);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (oldSettings && !isPRinjected) e.instance.props.sections.splice(index + 1, 0, {section: "DIVIDER"});
|
if (!e.instance.props.sections.find(n => n.section == "plugins" || n.section == "pluginrepo")) e.instance.props.sections.splice(index + 1, 0, {section: "DIVIDER"});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue