STR v2.1.4
This commit is contained in:
parent
20274dada4
commit
2c0fcf8e07
|
@ -1,4 +1,7 @@
|
|||
# [SaveToRedux](https://1lighty.github.io/BetterDiscordStuff/?plugin=SaveToRedux "SaveToRedux") Changelog
|
||||
### 2.1.4
|
||||
- Fixed some options not doing anything
|
||||
|
||||
### 2.1.3
|
||||
- Fixed startup error on canary
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ var SaveToRedux = (() => {
|
|||
twitter_username: ''
|
||||
}
|
||||
],
|
||||
version: '2.1.3',
|
||||
version: '2.1.4',
|
||||
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_raw: 'https://raw.githubusercontent.com/1Lighty/BetterDiscordPlugins/master/Plugins/SaveToRedux/SaveToRedux.plugin.js'
|
||||
|
@ -50,7 +50,7 @@ var SaveToRedux = (() => {
|
|||
{
|
||||
title: 'fixed',
|
||||
type: 'fixed',
|
||||
items: ['Fixed startup error on canary']
|
||||
items: ['Fixed some options not doing anything']
|
||||
}
|
||||
],
|
||||
defaultConfig: [
|
||||
|
@ -103,10 +103,36 @@ var SaveToRedux = (() => {
|
|||
|
||||
/* Build */
|
||||
const buildPlugin = ([Plugin, Api]) => {
|
||||
const { Settings, Modals, Utilities, WebpackModules, DiscordModules, DiscordClasses, ReactComponents, DiscordAPI, Logger, PluginUpdater, PluginUtilities, ReactTools } = Api;
|
||||
const { React, ContextMenuActions, GuildStore, DiscordConstants, Dispatcher, SwitchRow, EmojiUtils, EmojiStore, RadioGroup, EmojiInfo, ModalStack } = DiscordModules;
|
||||
const { Settings, Utilities, WebpackModules, DiscordModules, DiscordClasses, ReactComponents, DiscordAPI, Logger, PluginUpdater, PluginUtilities, ReactTools } = Api;
|
||||
const { React, ContextMenuActions, GuildStore, DiscordConstants, Dispatcher, SwitchRow, EmojiUtils, EmojiStore, RadioGroup, EmojiInfo } = DiscordModules;
|
||||
const Patcher = XenoLib.createSmartPatcher(Api.Patcher);
|
||||
|
||||
const ConfirmModal = ZeresPluginLibrary.WebpackModules.getByDisplayName('ConfirmModal');
|
||||
const ConfirmationModal = props => {
|
||||
try {
|
||||
const ret = ConfirmModal(props);
|
||||
if (props.size) ret.props.size = props.size;
|
||||
return ret;
|
||||
} catch(err) {
|
||||
if (props.onCancel) props.onCancel();
|
||||
else props.onClose();
|
||||
return null;
|
||||
}
|
||||
};
|
||||
const ModalStack = ZeresPluginLibrary.WebpackModules.getByProps('openModal', 'hasModalOpen');
|
||||
|
||||
const Markdown = WebpackModules.getByDisplayName('Markdown');
|
||||
|
||||
const Modals = {
|
||||
showModal(title, content, options) {
|
||||
return ModalStack.openModal(e => React.createElement(ConfirmationModal, Object.assign({title, children: content, cancelText: 'Cancel'}, e, options)));
|
||||
},
|
||||
showConfirmationModal(title, content, options) {
|
||||
return this.showModal(title, React.createElement(Markdown, null, content), options);
|
||||
},
|
||||
ModalSizes: (WebpackModules.getByProps('ModalSize') || {}).ModalSize
|
||||
}
|
||||
|
||||
const TextComponent = WebpackModules.getByDisplayName('Text');
|
||||
const getEmojiURL = Utilities.getNestedProp(WebpackModules.getByProps('getEmojiURL'), 'getEmojiURL');
|
||||
const showAlertModal = Utilities.getNestedProp(
|
||||
|
@ -330,7 +356,7 @@ var SaveToRedux = (() => {
|
|||
.ST-randomize > .${XenoLib.getSingleClass('lookBlank contents')} {
|
||||
margin: 0;
|
||||
}
|
||||
#user-context-str + .${XenoLib.getSingleClass('layerContainer layer')} {
|
||||
div[id$="-str"] + .${XenoLib.getSingleClass('layerContainer layer')} {
|
||||
z-index: 1;
|
||||
}
|
||||
`
|
||||
|
@ -1072,7 +1098,8 @@ var SaveToRedux = (() => {
|
|||
{
|
||||
confirmText: 'Create',
|
||||
onConfirm: saveFolder,
|
||||
size: XenoLib.joinClassNames(Modals.ModalSizes.MEDIUM, 'ST-modal')
|
||||
size: Modals.ModalSizes.MEDIUM,
|
||||
className: 'ST-modal'
|
||||
}
|
||||
);
|
||||
},
|
||||
|
@ -1127,7 +1154,8 @@ var SaveToRedux = (() => {
|
|||
{
|
||||
confirmText: 'Create',
|
||||
onConfirm: saveFolder,
|
||||
size: XenoLib.joinClassNames(Modals.ModalSizes.MEDIUM, 'ST-modal')
|
||||
size: Modals.ModalSizes.MEDIUM,
|
||||
className: 'ST-modal'
|
||||
}
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue