Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2020-10-19 13:52:29 +02:00
parent e6a7ff6ed8
commit 262d189ce1
1 changed files with 16 additions and 0 deletions

View File

@ -560,6 +560,7 @@ module.exports = (_ => {
return callback(2);
}
else if (BDFDB.NumberUtils.compareVersions(newVersion[0], window.PluginUpdates.plugins[url].version)) {
window.PluginUpdates.plugins[url].outdated = true;
BDFDB.PluginUtils.showUpdateNotice(pluginName, url);
return callback(1);
}
@ -6573,6 +6574,12 @@ module.exports = (_ => {
CROWN: {
icon: `<svg name="Crown" aria-hidden="false" width="%%width" height="%%height" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.6572 5.42868C13.8879 5.29002 14.1806 5.30402 14.3973 5.46468C14.6133 5.62602 14.7119 5.90068 14.6473 6.16202L13.3139 11.4954C13.2393 11.7927 12.9726 12.0007 12.6666 12.0007H3.33325C3.02725 12.0007 2.76058 11.792 2.68592 11.4954L1.35258 6.16202C1.28792 5.90068 1.38658 5.62602 1.60258 5.46468C1.81992 5.30468 2.11192 5.29068 2.34325 5.42868L5.13192 7.10202L7.44592 3.63068C7.46173 3.60697 7.48377 3.5913 7.50588 3.57559C7.5192 3.56612 7.53255 3.55663 7.54458 3.54535L6.90258 2.90268C6.77325 2.77335 6.77325 2.56068 6.90258 2.43135L7.76458 1.56935C7.89392 1.44002 8.10658 1.44002 8.23592 1.56935L9.09792 2.43135C9.22725 2.56068 9.22725 2.77335 9.09792 2.90268L8.45592 3.54535C8.46794 3.55686 8.48154 3.56651 8.49516 3.57618C8.51703 3.5917 8.53897 3.60727 8.55458 3.63068L10.8686 7.10202L13.6572 5.42868ZM2.66667 12.6673H13.3333V14.0007H2.66667V12.6673Z" fill="%%color" aria-hidden="true"></path></svg>`
},
DOWNLOAD: {
defaultProps: {
foreground: ""
},
icon: `<svg name="Download" aria-hidden="false" width="%%width" height="%%height" viewBox="0 0 24 24"><path class="%%foreground" fill="%%color" fill-rule="evenodd" clip-rule="evenodd" d="M16.293 9.293L17.707 10.707L12 16.414L6.29297 10.707L7.70697 9.293L11 12.586V2H13V12.586L16.293 9.293ZM18 20V18H20V20C20 21.102 19.104 22 18 22H6C4.896 22 4 21.102 4 20V18H6V20H18Z" aria-hidden="true"></path></svg>`
},
DROPPER: {
defaultProps: {
width: 16,
@ -7143,6 +7150,15 @@ module.exports = (_ => {
if (props && !props.hasCustomControls && props.addon && props.addon.plugin && (props.addon.plugin == libraryInstance || props.addon.plugin.name && props.addon.plugin.name && PluginStores.loaded[props.addon.plugin.name] && PluginStores.loaded[props.addon.plugin.name] == props.addon.plugin)) {
props.hasCustomControls = true;
let controls = [];
let url = props.addon.plugin.rawUrl ||`https://mwittrien.github.io/BetterDiscordAddons/Plugins/${props.addon.plugin.name}/${props.addon.plugin.name}.plugin.js`;
if (window.PluginUpdates && window.PluginUpdates.plugins && window.PluginUpdates.plugins[url] && window.PluginUpdates.plugins[url].outdated) controls.push(InternalBDFDB.createCustomControl(BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.TooltipContainer, {
text: BDFDB.LanguageUtils.LanguageStrings.UPDATE_MANUALLY,
children: BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.SvgIcon, {
className: BDFDB.disCN._repoicon,
name: InternalComponents.LibraryComponents.SvgIcon.Names.DOWNLOAD,
onClick: _ => {BDFDB.PluginUtils.downloadUpdate(props.addon.plugin.name, url);}
})
})));
if (props.addon.plugin.changeLog) controls.push(InternalBDFDB.createCustomControl(BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.TooltipContainer, {
text: BDFDB.LanguageUtils.LanguageStrings.CHANGE_LOG,
children: BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.SvgIcon, {