stuff
This commit is contained in:
parent
dd33d60633
commit
fb6fbd0dd7
|
@ -2,7 +2,7 @@
|
|||
* @name BDFDB
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 3.0.0
|
||||
* @version 3.0.1
|
||||
* @description Required Library for DevilBro's Plugins
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -5881,7 +5881,7 @@ module.exports = (_ => {
|
|||
onChange: e => {
|
||||
let file = e.currentTarget.files[0];
|
||||
if (this.refInput && file && (!filter.length || filter.some(n => file.type.indexOf(n) == 0))) {
|
||||
this.refInput.props.value = this.props.searchFolders ? file.path.split(file.name).slice(0, -1).join(file.name) : `${this.props.mode == "url" ? "url('" : ""}${(this.props.useFilePath) ? file.path : `data:${file.type};base64,${Internal.LibraryRequires.fs.readFileSync(file.path).toString("base64")}`}${this.props.mode ? "')" : ""}`;
|
||||
this.refInput.props.value = this.props.searchFolders ? file.path.split(file.name).slice(0, -1).join(file.name) : `${this.props.mode == "url" ? "url('" : ""}${(this.props.useFilePath) ? file.path : `data:${file.type};base64,${Buffer.from(Internal.LibraryRequires.fs.readFileSync(file.path, "")).toString("base64")}`}${this.props.mode ? "')" : ""}`;
|
||||
BDFDB.ReactUtils.forceUpdate(this.refInput);
|
||||
this.refInput.handleChange(this.refInput.props.value);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @name ServerFolders
|
||||
* @author DevilBro
|
||||
* @authorId 278543574059057154
|
||||
* @version 7.0.4
|
||||
* @version 7.0.5
|
||||
* @description Changes Discord's Folders, Servers open in a new Container, also adds extra Features to more easily organize, customize and manage your Folders
|
||||
* @invite Jx3TjNS
|
||||
* @donate https://www.paypal.me/MircoWittrien
|
||||
|
@ -301,9 +301,9 @@ module.exports = (_ => {
|
|||
BDFDB.TimeUtils.clear(this._previewInterval);
|
||||
}
|
||||
checkImage(base64OrUrl, callback) {
|
||||
if (base64OrUrl.indexOf("https://") == 0 || base64OrUrl.indexOf("http://") == 0) BDFDB.LibraryRequires.request(base64OrUrl.trim(), {encoding: null}, (error, response, body) => {
|
||||
if (base64OrUrl.indexOf("https://") == 0 || base64OrUrl.indexOf("http://") == 0) BDFDB.LibraryRequires.request(base64OrUrl.trim(), {agentOptions: {rejectUnauthorized: false}, headers: {"Content-Type": "application/json"}}, (error, response, body) => {
|
||||
if (response && response.headers["content-type"] && response.headers["content-type"].indexOf("image") != -1 && response.headers["content-type"] != "image/gif") {
|
||||
this.resizeImage("data:" + response.headers["content-type"] + ";base64," + (new Buffer(body).toString("base64")), callback);
|
||||
this.resizeImage("data:" + response.headers["content-type"] + ";base64," + Buffer.from(body).toString("base64"), callback);
|
||||
}
|
||||
else callback(base64OrUrl);
|
||||
});
|
||||
|
@ -635,10 +635,6 @@ module.exports = (_ => {
|
|||
})
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
onGuildFolderContextMenu (e) {
|
||||
if (document.querySelector(BDFDB.dotCN.modalwrapper)) return;
|
||||
if (e.instance.props.target && e.instance.props.folderId) {
|
||||
let folder = BDFDB.LibraryModules.SortedGuildUtils.getGuildFolderById(e.instance.props.folderId);
|
||||
let data = this.getFolderConfig(e.instance.props.folderId);
|
||||
|
@ -1092,11 +1088,10 @@ module.exports = (_ => {
|
|||
className: BDFDB.disCNS.margintop4 + BDFDB.disCN.marginbottom4
|
||||
}),
|
||||
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ListRow, {
|
||||
prefix: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.GuildComponents.Guild, {
|
||||
prefix: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.GuildIconComponents.Icon, {
|
||||
className: BDFDB.disCN.listavatar,
|
||||
guild: guild,
|
||||
menu: false,
|
||||
tooltip: false
|
||||
size: BDFDB.LibraryComponents.GuildIconComponents.Icon.Sizes.MEDIUM
|
||||
}),
|
||||
label: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextScroller, {
|
||||
children: guild.name
|
||||
|
|
Loading…
Reference in New Issue