//META{"name":"ServerFolders","website":"https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/ServerFolders","source":"https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ServerFolders/ServerFolders.plugin.js"}*// class ServerFolders { getName () {return "ServerFolders";} getVersion () {return "6.1.3";} getAuthor () {return "DevilBro";} getDescription () {return "Adds the feature to create folders to organize your servers. Right click a server > 'Serverfolders' > 'Create Server' to create a server. To add servers to a folder hold 'Ctrl' and drag the server onto the folder, this will add the server to the folderlist and hide it in the serverlist. To open a folder click the folder. A folder can only be opened when it has at least one server in it. To remove a server from a folder, open the folder and either right click the server > 'Serverfolders' > 'Remove Server from Folder' or hold 'Del' and click the server in the folderlist.";} initConstructor () { this.changelog = { "improved":[["UnreadCountBadges","Added support for the UnreadCountBadges plugin by Metalloriff, when you have the plugin enabled, the sum of all unread messages of the servers in a folder will be displayed on the folder"]] }; this.labels = {}; this.patchModules = { "Guilds":["componentDidMount","componentWillUnmount"], "Guild":["componentDidMount","componentWillUnmount"], "StandardSidebarView":"componentWillUnmount" }; this.css = ` .${this.name}-modal .ui-icon-picker-icon { position: relative; width: 70px; height: 70px; border: 4px solid transparent; border-radius: 12px; margin: 0; } .${this.name}-modal .ui-icon-picker-icon .ui-picker-inner { margin: 5px 5px; width: 60px; height: 60px; background-repeat: no-repeat; background-clip: padding-box; background-position: 50%; background-size: cover; border-radius: 12px; } .${this.name}-modal .ui-icon-picker-icon.selected ${BDFDB.dotCN.hovercardbutton} { display: none !important; } .${this.name}-modal .ui-icon-picker-icon ${BDFDB.dotCN.hovercardbutton} { position: absolute; top: -10px; right: -10px; } .${this.name}-modal .ui-icon-picker-icon.preview.nopic .ui-picker-inner { background-image: url('data:image/svg+xml; utf8, '); } ${BDFDB.dotCN.guild}.folder ${BDFDB.dotCN.avataricon} { background-clip: padding-box !important; background-position: center !important; background-size: cover !important; } ${BDFDB.dotCN.guild}.folder ${BDFDB.dotCN.badge}.folder.count { background: #7289DA; top: -2px; left: -2px; right: unset; bottom: unset; } ${BDFDB.dotCN.guild}.serverfolders-dragpreview { pointer-events: none !important; position: absolute !important; opacity: 0.5 !important; z-index: 10000 !important; } ${BDFDB.dotCN.guild}.serverfolders-dragpreview, ${BDFDB.dotCN.guild}.serverfolders-dragpreview ${BDFDB.dotCN.guildinner}, ${BDFDB.dotCN.guild}.serverfolders-dragpreview ${BDFDB.dotCN.guildinner} a, ${BDFDB.dotCN.guild}.serverfolders-dragpreview ${BDFDB.dotCNS.guildinner + BDFDB.dotCN.guildicon} { border-radius: 50% !important; width: 50px !important; height: 50px !important; } ${BDFDB.dotCN.guild}.serverfolders-dragpreview:before, ${BDFDB.dotCN.guild}.serverfolders-dragpreview:after, ${BDFDB.dotCN.guild}.serverfolders-dragpreview ${BDFDB.dotCN.badge} { display: none !important; } ${BDFDB.dotCN.guild}.serverfolders-dragpreview ${BDFDB.dotCN.avataricon} { background-color: transparent !important; overflow: hidden !important; } ${BDFDB.dotCN.guildswrapper}.foldercontent { transition: width .3s linear !important; } ${BDFDB.dotCN.guildswrapper}.foldercontent .folderseparator { margin-top: 10px; } ${BDFDB.dotCN.guildswrapper}.foldercontent.foldercontentclosed { width: 0px !important; }`; this.serverContextEntryMarkup = `
`; this.serverContextSubMenuMarkup = ` `; this.serverContextSubFolderMenuMarkup = ` `; this.folderContextMarkup = ` `; this.folderContentMarkup = `