Update 0BDFDB.plugin.js
This commit is contained in:
parent
5ecf155575
commit
00115af7fd
|
@ -6578,7 +6578,7 @@ module.exports = (_ => {
|
|||
defaultProps: {
|
||||
foreground: ""
|
||||
},
|
||||
icon: `<svg name="Download" fill="%%color" aria-hidden="false" width="%%width" height="%%height" viewBox="0 0 24 24"><path class="%%foreground" 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>`
|
||||
icon: `<svg name="Download" fill="%%color" aria-hidden="false" width="%%width" height="%%height" viewBox="-2 -2 28 28"><path class="%%foreground" 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: {
|
||||
|
@ -7149,16 +7149,8 @@ module.exports = (_ => {
|
|||
let props = BDFDB.ObjectUtils.get(BDFDB.ReactUtils.getInstance(card), "return.stateNode.props");
|
||||
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);}
|
||||
})
|
||||
})));
|
||||
let controls = [];
|
||||
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, {
|
||||
|
@ -7167,6 +7159,14 @@ module.exports = (_ => {
|
|||
onClick: _ => {BDFDB.PluginUtils.openChangeLog(props.addon.plugin);}
|
||||
})
|
||||
})));
|
||||
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);}
|
||||
})
|
||||
})));
|
||||
for (let control of controls) checkbox.parentElement.insertBefore(control, checkbox.parentElement.firstElementChild);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue