STR v2.1.1 fix layering issue

This commit is contained in:
_Lighty_ 2020-05-20 14:03:14 +02:00
parent 7762bcf5b3
commit 1fa29886ed
2 changed files with 47 additions and 65 deletions

View File

@ -1,4 +1,8 @@
# [SaveToRedux](https://1lighty.github.io/BetterDiscordStuff/?plugin=SaveToRedux "SaveToRedux") Changelog # [SaveToRedux](https://1lighty.github.io/BetterDiscordStuff/?plugin=SaveToRedux "SaveToRedux") Changelog
### 2.1.1
- Fixed sub context menu layering issue.
![image](https://i.imgur.com/jY5lcoA.png)
### 2.1.0 ### 2.1.0
- Fixed plugin after the new context menu changes. If you notice any bugs, [join my support server](https://discord.gg/NYvWdN5) - Fixed plugin after the new context menu changes. If you notice any bugs, [join my support server](https://discord.gg/NYvWdN5)
- Fixed incorrect slashes used on Windows. - Fixed incorrect slashes used on Windows.

View File

@ -41,7 +41,7 @@ var SaveToRedux = (() => {
twitter_username: '' twitter_username: ''
} }
], ],
version: '2.1.0', version: '2.1.1',
description: 'Allows you to save images, videos, profile icons, server icons, reactions, emotes and custom status emotes to any folder quickly, as well as install plugins from direct links.', description: 'Allows you to save images, videos, profile icons, server icons, reactions, emotes and custom status emotes to any folder quickly, as well as install plugins from direct links.',
github: 'https://github.com/1Lighty', github: 'https://github.com/1Lighty',
github_raw: 'https://raw.githubusercontent.com/1Lighty/BetterDiscordPlugins/master/Plugins/SaveToRedux/SaveToRedux.plugin.js' github_raw: 'https://raw.githubusercontent.com/1Lighty/BetterDiscordPlugins/master/Plugins/SaveToRedux/SaveToRedux.plugin.js'
@ -50,7 +50,7 @@ var SaveToRedux = (() => {
{ {
title: 'fixed', title: 'fixed',
type: 'fixed', type: 'fixed',
items: ['Fixed plugin after the new context menu changes. If you notice any bugs, [join my support server](https://discord.gg/NYvWdN5)', 'Fixed incorrect slashes used on Windows.'] items: ['Fixed sub context menu layering issue.\n![image](https://i.imgur.com/jY5lcoA.png)']
} }
], ],
defaultConfig: [ defaultConfig: [
@ -330,6 +330,9 @@ var SaveToRedux = (() => {
.ST-randomize > .${XenoLib.getSingleClass('lookBlank contents')} { .ST-randomize > .${XenoLib.getSingleClass('lookBlank contents')} {
margin: 0; margin: 0;
} }
#user-context-str + .${XenoLib.getSingleClass('layerContainer layer')} {
z-index: 1;
}
` `
); );
this.lastUsedFolder = -1; this.lastUsedFolder = -1;
@ -1281,10 +1284,10 @@ var SaveToRedux = (() => {
return b || XenoLibOutdated ? ((a += 'XenoLib '), (c || ZeresPluginLibraryOutdated) && (a += 'and ZeresPluginLibrary ')) : (c || ZeresPluginLibraryOutdated) && (a += 'ZeresPluginLibrary '), (a += `required for ${this.name} ${d ? 'are' : 'is'} ${b || c ? 'missing' : ''}${XenoLibOutdated || ZeresPluginLibraryOutdated ? (b || c ? ' and/or outdated' : 'outdated') : ''}.`), a; return b || XenoLibOutdated ? ((a += 'XenoLib '), (c || ZeresPluginLibraryOutdated) && (a += 'and ZeresPluginLibrary ')) : (c || ZeresPluginLibraryOutdated) && (a += 'ZeresPluginLibrary '), (a += `required for ${this.name} ${d ? 'are' : 'is'} ${b || c ? 'missing' : ''}${XenoLibOutdated || ZeresPluginLibraryOutdated ? (b || c ? ' and/or outdated' : 'outdated') : ''}.`), a;
})(), })(),
g = BdApi.findModuleByProps('push', 'update', 'pop', 'popWithKey'), g = BdApi.findModuleByProps('push', 'update', 'pop', 'popWithKey'),
h = BdApi.findModuleByDisplayName('Text'), h = BdApi.findModuleByProps('Sizes', 'Weights'),
i = BdApi.findModule(a => a.defaultProps && a.key && 'confirm-modal' === a.key()), i = BdApi.findModule(a => a.defaultProps && a.key && 'confirm-modal' === a.key()),
j = () => BdApi.alert(e, BdApi.React.createElement('span', {}, BdApi.React.createElement('div', {}, f), `Due to a slight mishap however, you'll have to download the libraries yourself. This is not intentional, something went wrong, errors are in console.`, c || ZeresPluginLibraryOutdated ? BdApi.React.createElement('div', {}, BdApi.React.createElement('a', { href: 'https://betterdiscord.net/ghdl?id=2252', target: '_blank' }, 'Click here to download ZeresPluginLibrary')) : null, b || XenoLibOutdated ? BdApi.React.createElement('div', {}, BdApi.React.createElement('a', { href: 'https://betterdiscord.net/ghdl?id=3169', target: '_blank' }, 'Click here to download XenoLib')) : null)); j = () => BdApi.alert(e, BdApi.React.createElement('span', {}, BdApi.React.createElement('div', {}, f), `Due to a slight mishap however, you'll have to download the libraries yourself.`, c || ZeresPluginLibraryOutdated ? BdApi.React.createElement('div', {}, BdApi.React.createElement('a', { href: 'https://betterdiscord.net/ghdl?id=2252', target: '_blank' }, 'Click here to download ZeresPluginLibrary')) : null, b || XenoLibOutdated ? BdApi.React.createElement('div', {}, BdApi.React.createElement('a', { href: 'https://betterdiscord.net/ghdl?id=3169', target: '_blank' }, 'Click here to download XenoLib')) : null));
if (!g || !i || !h) return console.error(`Missing components:${(g ? '' : ' ModalStack') + (i ? '' : ' ConfirmationModalComponent') + (h ? '' : 'TextElement')}`), j(); if (!g || !i || !h) return j();
class k extends BdApi.React.PureComponent { class k extends BdApi.React.PureComponent {
constructor(a) { constructor(a) {
super(a), (this.state = { hasError: !1 }); super(a), (this.state = { hasError: !1 });
@ -1301,67 +1304,42 @@ var SaveToRedux = (() => {
this.props.onConfirm(); this.props.onConfirm();
} }
} }
let m = !1, let m = !1;
n = !1; const n = g.push(
const o = g.push( a =>
a => { BdApi.React.createElement(
if (n) return null; k,
try { {
return BdApi.React.createElement( label: 'missing dependency modal',
k, onError: () => {
{ g.popWithKey(n), j();
label: 'missing dependency modal', }
onError: () => { },
g.popWithKey(o), j(); BdApi.React.createElement(
} l,
}, Object.assign(
BdApi.React.createElement( {
l, header: e,
Object.assign( children: [BdApi.React.createElement(h, { color: h.Colors.PRIMARY, children: [`${f} Please click Download Now to download ${d ? 'them' : 'it'}.`] })],
{ red: !1,
header: e, confirmText: 'Download Now',
children: [BdApi.React.createElement(h, { size: h.Sizes.SIZE_16, children: [`${f} Please click Download Now to download ${d ? 'them' : 'it'}.`] })], cancelText: 'Cancel',
red: !1, onConfirm: () => {
confirmText: 'Download Now', if (m) return;
cancelText: 'Cancel', m = !0;
onConfirm: () => { const a = require('request'),
if (m) return; b = require('fs'),
m = !0; c = require('path'),
const a = require('request'), d = () => {
b = require('fs'), (global.XenoLib && !XenoLibOutdated) || a('https://raw.githubusercontent.com/1Lighty/BetterDiscordPlugins/master/Plugins/1XenoLib.plugin.js', (a, d, e) => (a || 200 !== d.statusCode ? (g.popWithKey(n), j()) : void b.writeFile(c.join(BdApi.Plugins.folder, '1XenoLib.plugin.js'), e, () => {})));
c = require('path'), };
d = BdApi.Plugins && BdApi.Plugins.folder ? BdApi.Plugins.folder : window.ContentManager.pluginsFolder, !global.ZeresPluginLibrary || ZeresPluginLibraryOutdated ? a('https://raw.githubusercontent.com/rauenzi/BDPluginLibrary/master/release/0PluginLibrary.plugin.js', (a, e, f) => (a || 200 !== e.statusCode ? (g.popWithKey(n), j()) : void (b.writeFile(c.join(BdApi.Plugins.folder, '0PluginLibrary.plugin.js'), f, () => {}), d()))) : d();
e = () => { }
(global.XenoLib && !XenoLibOutdated) || },
a('https://raw.githubusercontent.com/1Lighty/BetterDiscordPlugins/master/Plugins/1XenoLib.plugin.js', (a, e, f) => { a
try {
if (a || 200 !== e.statusCode) return g.popWithKey(o), j();
b.writeFile(c.join(d, '1XenoLib.plugin.js'), f, () => {});
} catch (a) {
console.error('Fatal error downloading XenoLib', a), g.popWithKey(o), j();
}
});
};
!global.ZeresPluginLibrary || ZeresPluginLibraryOutdated
? a('https://raw.githubusercontent.com/rauenzi/BDPluginLibrary/master/release/0PluginLibrary.plugin.js', (a, f, h) => {
try {
if (a || 200 !== f.statusCode) return g.popWithKey(o), j();
b.writeFile(c.join(d, '0PluginLibrary.plugin.js'), h, () => {}), e();
} catch (a) {
console.error('Fatal error downloading ZeresPluginLibrary', a), g.popWithKey(o), j();
}
})
: e();
}
},
a
)
) )
); )
} catch (a) { ),
return console.error('There has been an error constructing the modal', a), (n = !0), g.popWithKey(o), j(), null;
}
},
void 0, void 0,
`${this.name}_DEP_MODAL` `${this.name}_DEP_MODAL`
); );