2018-10-11 10:21:26 +02:00
//META{"name":"ServerFolders"}*//
class ServerFolders {
initConstructor ( ) {
this . labels = { } ;
this . css = `
. serverfolders - modal . ui - icon - picker - icon {
position : relative ;
width : 70 px ;
height : 70 px ;
border : 4 px solid transparent ;
border - radius : 12 px ;
margin : 0 ;
}
. serverfolders - modal . ui - icon - picker - icon . ui - picker - inner {
margin : 5 px 5 px ;
width : 60 px ;
height : 60 px ;
background - repeat : no - repeat ;
background - clip : padding - box ;
background - position : 50 % ;
background - size : cover ;
border - radius : 12 px ;
}
. serverfolders - modal . ui - icon - picker - icon . selected $ { BDFDB . dotCN . hovercardbutton } {
display : none ! important ;
}
. serverfolders - modal . ui - icon - picker - icon $ { BDFDB . dotCN . hovercardbutton } {
position : absolute ;
top : - 10 px ;
right : - 10 px ;
}
. serverfolders - modal . ui - icon - picker - icon . preview . nopic . ui - picker - inner {
background - image : url ( data : image / png ; base64 , iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAz40lEQVR4Xu3d + 5 ed5X2m + ev77r1LEojz + SRUVRI6HjgZHwgHVUkC7La7nUzSjuOkVzrpnsYxMU5Pklkz8cTunqyZTK + JcRvb6SS9ZrqTtJ3E2I7tGINUEuAOjmGMpNIJnYU4GYzBMkIIae / 3 mcVCtazFWsGI2rvqeeu9Pv8Bix ++ t56991VMUZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkBVPQvvm3AJCmHyWISCRIpKOnH + Ky + x / keJIkPf / + Qc74N7vZ + z8PUaRGAKRI6WjRhBRc9sjdDoCc7FmyAqBBcAZwQYJZwEXAecBZwEygCSTgCHAAeA74PvB4wOMJngmKFyExMLqaqUuStGvpSiIRQTolwXkEs4CLgfOBs4HTgFZAJGgDLwI / BJ4BngD2A09D / AhSOTi6xgEwEXZfsYrO + afQePLATGA + 8E7 gGmAJcCFwGtDHT5eAl4HngX3AI8B3gYd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XENwJ / CxT0xeAW4EDE9mYKSb495qtBL8LvJdxyf8lADj7WNHwBEmSvtZ3bV2OP8AvAB + NlBoT + cuAYALsWTJMigJIHwD + FJhJV + T / EgA8ZzpYkt5SEr57z / 75 ex74F8A3KEsGN6 + l14oJiTVEEKQ5wP + awfH3JUCSPP65ORP434CLKYqpEQIKAGgm + CiwmDF1GwFLV / BmSJKFPy6o2fEf8zbgwwliIm5G0dvf + 68 kAcB1wAepnwA + NPYTwT1v / BIgST77Jy4c + 8 yfevrVgLcB7Fo8VN0BUBYJYEaC3wDOJAM5fBywd + HNvEaStHPxcAbP / tk4H7iVRCuiqOYA2Ll0BQEANwCryEAunYCy2Wbf / HdTd5K0c9EwRREc / + yP3kfwdgL2LVtVvQHQSImUUgv4ZeAUfsIRkOLsTusIjw / + U + pKknaMHf / XP / vrTOBDkSjKsqzeAEgRELEEWMHrOALSa8XAkw / S4Q + oG0navnCYRuMN / uWvd6dgXuVCQLuWDRMpAN4DnMs / ypeAx5aso04kacdVN9Fs8MaRH10C3JxirKJbkQEQKUiRTgduQT + lE1CfXwdI0oaB5TSOdoD46c / + ejdwcqpgB2AxsIhjZCdAkk6Z2YD0Jp / 9 dTlwWWU6AHuWrgQSwLuAU3mT / Djg + GKgJPk7f3E28I7XAklD + Q + ARAKiBbyDE + MImNrZYEkW / k78d / 56 RyIViaIyHYCzgPnIESAJLPy99Wd / LQ7i9KhQB + AS4ALeIkdAHCsG3kT1SbLwN45nf10MXFilDsDs8cd / 7 ASUzQ77FtxCbUmy8KfTgUuyHwDbrryBY2YBDcbNLwZ2mkcrNQIkacfiLhb + 1 FeJAdDXbhEJgPPpDkcAr42AJ2f / HLmTpB2vFv6K6O4X / nQ + wO4lQ / kOgACIBHAmXeUIeOWUA + RMknZesYpGg + 5 / 4 U9nEgkoMg8BpSiAmdSGxUBJ2jpviKJT9qbwp5llJ / LuACQgBQG06A2LgZmNAEl66OIbmTatsPDXO61GEBHV6AAkesNOQGYvAZJ01hlNC389lgpI +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Al5CxIElGfvwH2B9O9PEHiMmpTQ0DXATxx8A/ISvGgqbiS4Bk3jfDZ3/9dcBtCZ4dC/5MpIJJEimeJPER4G6y5HcC9i68iWqTLPyNtf2zO/66C7j9uONfjwEwODpClAUBj0XiVlJuI8BOAHB2anTYt+Bmqkiy8Jdx3ldfAm4Dnk7NkslSMEn6t9xLpALgsSC3EWA2eGwEdJpt9i+s0giQtCP3vK/H/zeBp1ORmPPIWiZLMMn2Ll5FihLg0gSfJ7iFHCgBfxmJjxE8N+PwDC7Y8XXyJmnHq4W/Ru7H3+NPJAY3jjCZggzsWbwSIuU3ApTguC8Gjq4hX5IeXTBMq+nx9/i
}
$ { BDFDB . dotCN . guild } . folder $ { BDFDB . dotCN . avataricon } {
background - clip : padding - box ;
background - position : 50 % ;
background - size : cover ! important ;
}
$ { BDFDB . dotCN . guild } . folder $ { BDFDB . dotCN . badge } . folder . count {
background : # 7289 DA ;
2018-12-07 19:43:19 +01:00
top : - 2 px ;
left : - 2 px ;
right : unset ;
2018-10-25 09:48:10 +02:00
bottom : unset ;
2018-10-11 10:21:26 +02:00
}
$ { BDFDB . dotCN . guild } . guilddragpreview {
position : absolute ;
opacity : 0.5 ;
width : 50 px ;
height : 50 px ;
z - index : 1000 ;
}
$ { BDFDB . dotCN . guild } . guilddragpreview $ { BDFDB . dotCN . badge } {
display : none ;
}
$ { BDFDB . dotCN . guild } . guilddragpreview $ { BDFDB . dotCN . avataricon } {
background - color : transparent ! important ;
overflow : hidden ;
}
2018-12-06 20:23:32 +01:00
$ { BDFDB . dotCN . guildswrapper } . foldercontent {
2018-10-11 10:21:26 +02:00
transition : width . 3 s linear ;
}
2018-12-06 20:23:32 +01:00
$ { BDFDB . dotCN . guildswrapper } . foldercontent . folderseparator {
2018-10-11 10:21:26 +02:00
margin - top : 10 px ;
}
$ { BDFDB . dotCN . guildswrapper } . foldercontent . foldercontentclosed {
width : 0 px ! important ;
} ` ;
this . serverContextEntryMarkup =
` <div class=" ${ BDFDB . disCN . contextmenuitemgroup } ">
< div class = "${BDFDB.disCN.contextmenuitem} serverfolders-item ${BDFDB.disCN.contextmenuitemsubmenu}" >
< span > REPLACE _servercontext _serverfolders _text < / s p a n >
< div class = "${BDFDB.disCN.contextmenuhint}" > < / d i v >
< / d i v >
< / d i v > ` ;
this . serverContextSubMenuMarkup =
` <div class=" ${ BDFDB . disCN . contextmenu } serverfolders-submenu">
< div class = "${BDFDB.disCN.contextmenuitemgroup}" >
< div class = "${BDFDB.disCN.contextmenuitem} createfolder-item" >
< span > REPLACE _serversubmenu _createfolder _text < / s p a n >
< div class = "${BDFDB.disCN.contextmenuhint}" > < / d i v >
< / d i v >
< div class = "${BDFDB.disCN.contextmenuitem} removefromfolder-item ${BDFDB.disCN.contextmenuitemdisabled}" >
< span > REPLACE _serversubmenu _removefromfolder _text < / s p a n >
< div class = "${BDFDB.disCN.contextmenuhint}" > < / d i v >
< / d i v >
< / d i v >
< / d i v > ` ;
this . folderContextMarkup =
` <div class=" ${ BDFDB . disCN . contextmenu } folderSettings">
< div class = "${BDFDB.disCN.contextmenuitemgroup}" >
< div class = "${BDFDB.disCN.contextmenuitem} unreadfolder-item ${BDFDB.disCN.contextmenuitemdisabled}" >
< span > REPLACE _foldercontext _unreadfolder _text < / s p a n >
< div class = "${BDFDB.disCN.contextmenuhint}" > < / d i v >
< / d i v >
< div class = "${BDFDB.disCN.contextmenuitem} autounreadfolder-item ${BDFDB.disCN.contextmenuitemtoggle}" >
< div class = "${BDFDB.disCN.contextmenulabel}" > REPLACE _foldercontext _autounreadfolder _text < / d i v >
< div class = "checkbox" >
< div class = "checkbox-inner" >
< input type = "checkbox" value = "on" >
< span > < / s p a n >
< / d i v >
< span > < / s p a n >
< / d i v >
< / d i v >
< div class = "${BDFDB.disCN.contextmenuitem} foldersettings-item" >
< span > REPLACE _foldercontext _foldersettings _text < / s p a n >
< div class = "${BDFDB.disCN.contextmenuhint}" > < / d i v >
< / d i v >
< div class = "${BDFDB.disCN.contextmenuitem} createfolder-item" >
< span > REPLACE _foldercontext _createfolder _text < / s p a n >
< div class = "${BDFDB.disCN.contextmenuhint}" > < / d i v >
< / d i v >
< div class = "${BDFDB.disCN.contextmenuitem} removefolder-item ${BDFDB.disCN.contextmenuitemdanger}" >
< span > REPLACE _foldercontext _removefolder _text < / s p a n >
< div class = "${BDFDB.disCN.contextmenuhint}" > < / d i v >
< / d i v >
< / d i v >
< / d i v > ` ;
this . folderContainerMarkup =
` <div class=" ${ BDFDB . disCN . guildswrapper } foldercontent foldercontentclosed">
< div class = "${BDFDB.disCNS.guildsscrollerwrap + BDFDB.disCN.scrollerwrapold}" >
< div class = "${BDFDB.disCNS.guilds + BDFDB.disCN.scrollerold}" > < / d i v >
< / d i v >
< / d i v > ` ;
this . folderIconMarkup =
` <div class=" ${ BDFDB . disCN . guild } folder">
< div draggable = "true" >
< div class = "${BDFDB.disCN.guildinner}" draggable = "false" style = "border-radius: 25px;" >
< a >
< div class = "${BDFDB.disCNS.avataricon + BDFDB.disCNS.guildicon + BDFDB.disCNS.avatariconsizelarge + BDFDB.disCN.avatariconinactive}" > < / d i v >
< / a >
< / d i v >
< / d i v >
< div class = "${BDFDB.disCNS.badgewrapper + BDFDB.disCN.badge} folder notifications" > < / d i v >
< div class = "${BDFDB.disCNS.badgewrapper + BDFDB.disCN.badge} folder count" > < / d i v >
< / d i v > ` ;
this . folderSettingsModalMarkup =
` <span class="serverfolders-modal DevilBro-modal">
< div class = "${BDFDB.disCN.backdrop}" > < / d i v >
< div class = "${BDFDB.disCN.modal}" >
< div class = "${BDFDB.disCN.modalinner}" >
< div class = "${BDFDB.disCNS.modalsub + BDFDB.disCN.modalsizemedium}" >
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCN.modalheader}" style = "flex: 0 0 auto;" >
< div class = "${BDFDB.disCN.flexchild}" style = "flex: 1 1 auto;" >
< h4 class = "${BDFDB.disCNS.h4 + BDFDB.disCNS.headertitle + BDFDB.disCNS.size16 + BDFDB.disCNS.height20 + BDFDB.disCNS.weightsemibold + BDFDB.disCNS.defaultcolor + BDFDB.disCNS.h4defaultmargin + BDFDB.disCN.marginreset}" > REPLACE _modal _header _text < / h 4 >
< div class = "${BDFDB.disCNS.modalguildname + BDFDB.disCNS.small + BDFDB.disCNS.size12 + BDFDB.disCNS.height16 + BDFDB.disCN.primary}" > < / d i v >
< / d i v >
< svg class = "${BDFDB.disCNS.modalclose + BDFDB.disCN.flexchild}" xmlns = "http://www.w3.org/2000/svg" width = "18" height = "18" viewBox = "0 0 12 12" >
< g fill = "none" fill - rule = "evenodd" >
< path d = "M0 0h12v12H0" > < / p a t h >
< path class = "fill" fill = "currentColor" d = "M9.5 3.205L8.795 2.5 6 5.295 3.205 2.5l-.705.705L5.295 6 2.5 8.795l.705.705L6 6.705 8.795 9.5l.705-.705L6.705 6" > < / p a t h >
< / g >
< / s v g >
< / d i v >
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCNS.marginbottom8 + BDFDB.disCN.modalsubinner}" style = "flex: 0 0 auto;" >
< div tab = "folder" class = "tab" > REPLACE _modal _tabheader1 _text < / d i v >
< div tab = "icon" class = "tab" > REPLACE _modal _tabheader2 _text < / d i v >
< div tab = "tooltip" class = "tab" > REPLACE _modal _tabheader3 _text < / d i v >
< div tab = "custom" class = "tab" > REPLACE _modal _tabheader4 _text < / d i v >
< / d i v >
< div class = "${BDFDB.disCNS.scrollerwrap + BDFDB.disCNS.modalcontent + BDFDB.disCNS.scrollerthemed + BDFDB.disCN.themeghosthairline}" >
< div class = "${BDFDB.disCNS.scroller + BDFDB.disCN.modalsubinner}" >
< div tab = "folder" class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.vertical + BDFDB.disCNS.directioncolumn + BDFDB.disCNS.justifystart + BDFDB.disCNS.alignstretch + BDFDB.disCNS.nowrap + BDFDB.disCN.marginbottom20} tab-content" style = "flex: 1 1 auto;" >
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCN.marginbottom8}" style = "flex: 1 1 auto;" >
< h3 class = "${BDFDB.disCNS.titledefault + BDFDB.disCNS.title + BDFDB.disCNS.marginreset + BDFDB.disCNS.weightmedium + BDFDB.disCNS.size16 + BDFDB.disCNS.height24 + BDFDB.disCN.flexchild}" style = "flex: 0 0 auto;" > REPLACE _modal _foldername _text < / h 3 >
< / d i v >
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCN.marginbottom8}" style = "flex: 1 1 auto;" >
< div class = "${BDFDB.disCNS.inputwrapper + BDFDB.disCNS.vertical + BDFDB.disCNS.flex + BDFDB.disCNS.directioncolumn + BDFDB.disCN.flexchild}" style = "flex: 1 1 auto;" > < input type = "text" class = "${BDFDB.disCNS.inputdefault + BDFDB.disCNS.input + BDFDB.disCN.size16}" id = "input-foldername" > < / d i v >
< / d i v >
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.vertical + BDFDB.disCNS.directioncolumn + BDFDB.disCNS.justifystart + BDFDB.disCNS.alignstart + BDFDB.disCN.nowrap}" style = "flex: 1 1 auto;" >
< h3 class = "${BDFDB.disCNS.titledefault + BDFDB.disCNS.title + BDFDB.disCNS.marginreset + BDFDB.disCNS.weightmedium + BDFDB.disCNS.size16 + BDFDB.disCNS.height24 + BDFDB.disCN.flexchild}" style = "flex: 0 0 auto;" > REPLACE _modal _iconpicker _text < / h 3 >
< / d i v >
2018-12-13 16:48:35 +01:00
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCN.marginbottom8} icons" style = "flex: 1 1 auto;" > < / d i v >
2018-10-11 10:21:26 +02:00
< / d i v >
< div tab = "icon" class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.vertical + BDFDB.disCNS.directioncolumn + BDFDB.disCNS.justifystart + BDFDB.disCNS.alignstretch + BDFDB.disCNS.nowrap + BDFDB.disCN.marginbottom20} tab-content" style = "flex: 1 1 auto;" >
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.vertical + BDFDB.disCNS.directioncolumn + BDFDB.disCNS.justifystart + BDFDB.disCNS.alignstart + BDFDB.disCN.nowrap}" style = "flex: 1 1 auto;" >
< h3 class = "${BDFDB.disCNS.titledefault + BDFDB.disCNS.title + BDFDB.disCNS.marginreset + BDFDB.disCNS.weightmedium + BDFDB.disCNS.size16 + BDFDB.disCNS.height24 + BDFDB.disCN.flexchild}" style = "flex: 0 0 auto;" > REPLACE _modal _colorpicker1 _text < / h 3 >
< / d i v >
2018-12-13 16:48:35 +01:00
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCN.marginbottom8} swatches" style = "flex: 1 1 auto;" > < / d i v >
2018-10-11 10:21:26 +02:00
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.vertical + BDFDB.disCNS.directioncolumn + BDFDB.disCNS.justifystart + BDFDB.disCNS.alignstart + BDFDB.disCN.nowrap}" style = "flex: 1 1 auto;" >
< h3 class = "${BDFDB.disCNS.titledefault + BDFDB.disCNS.title + BDFDB.disCNS.marginreset + BDFDB.disCNS.weightmedium + BDFDB.disCNS.size16 + BDFDB.disCNS.height24 + BDFDB.disCN.flexchild}" style = "flex: 0 0 auto;" > REPLACE _modal _colorpicker2 _text < / h 3 >
< / d i v >
2018-12-13 16:48:35 +01:00
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCN.marginbottom8} swatches" style = "flex: 1 1 auto;" > < / d i v >
2018-10-11 10:21:26 +02:00
< / d i v >
< div tab = "tooltip" class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.vertical + BDFDB.disCNS.directioncolumn + BDFDB.disCNS.justifystart + BDFDB.disCNS.alignstretch + BDFDB.disCNS.nowrap + BDFDB.disCN.marginbottom20} tab-content" style = "flex: 1 1 auto;" >
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.vertical + BDFDB.disCNS.directioncolumn + BDFDB.disCNS.justifystart + BDFDB.disCNS.alignstart + BDFDB.disCN.nowrap}" style = "flex: 1 1 auto;" >
< h3 class = "${BDFDB.disCNS.titledefault + BDFDB.disCNS.title + BDFDB.disCNS.marginreset + BDFDB.disCNS.weightmedium + BDFDB.disCNS.size16 + BDFDB.disCNS.height24 + BDFDB.disCN.flexchild}" style = "flex: 0 0 auto;" > REPLACE _modal _colorpicker3 _text < / h 3 >
< / d i v >
2018-12-13 16:48:35 +01:00
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCN.marginbottom8} swatches" style = "flex: 1 1 auto;" > < / d i v >
2018-10-11 10:21:26 +02:00
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.vertical + BDFDB.disCNS.directioncolumn + BDFDB.disCNS.justifystart + BDFDB.disCNS.alignstart + BDFDB.disCN.nowrap}" style = "flex: 1 1 auto;" >
< h3 class = "${BDFDB.disCNS.titledefault + BDFDB.disCNS.title + BDFDB.disCNS.marginreset + BDFDB.disCNS.weightmedium + BDFDB.disCNS.size16 + BDFDB.disCNS.height24 + BDFDB.disCN.flexchild}" style = "flex: 0 0 auto;" > REPLACE _modal _colorpicker4 _text < / h 3 >
< / d i v >
2018-12-13 16:48:35 +01:00
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCN.marginbottom8} swatches" style = "flex: 1 1 auto;" > < / d i v >
2018-10-11 10:21:26 +02:00
< / d i v >
< div tab = "custom" class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.vertical + BDFDB.disCNS.directioncolumn + BDFDB.disCNS.justifystart + BDFDB.disCNS.alignstretch + BDFDB.disCNS.nowrap + BDFDB.disCN.marginbottom20} tab-content" style = "flex: 1 1 auto;" >
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCN.marginbottom8}" style = "flex: 1 1 auto;" >
< h3 class = "${BDFDB.disCNS.titledefault + BDFDB.disCNS.title + BDFDB.disCNS.marginreset + BDFDB.disCNS.weightmedium + BDFDB.disCNS.size16 + BDFDB.disCNS.height24 + BDFDB.disCN.flexchild}" style = "flex: 0 0 auto;" > REPLACE _modal _customopen _text < / h 3 >
< / d i v >
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCN.marginbottom8}" style = "flex: 1 1 auto;" >
< div class = "${BDFDB.disCNS.inputwrapper + BDFDB.disCNS.vertical + BDFDB.disCNS.flex + BDFDB.disCNS.directioncolumn + BDFDB.disCN.flexchild}" style = "flex: 1 1 auto;" >
< input type = "text" option = "open" class = "${BDFDB.disCNS.inputdefault + BDFDB.disCNS.input + BDFDB.disCN.size16}" placeholder = "Url or Filepath" >
< / d i v >
< button type = "button" class = "${BDFDB.disCNS.flexchild + BDFDB.disCNS.button + BDFDB.disCNS.buttonlookfilled + BDFDB.disCNS.buttoncolorbrand + BDFDB.disCNS.buttonsizemedium + BDFDB.disCN.buttongrow} file-navigator" style = "flex: 0 0 auto;" >
< div class = "${BDFDB.disCN.buttoncontents}" > < / d i v >
< input type = "file" option = "open" accept = "image/*" style = "display:none!important;" >
< / b u t t o n >
< / d i v >
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCN.marginbottom8}" style = "flex: 1 1 auto;" >
< h3 class = "${BDFDB.disCNS.titledefault + BDFDB.disCNS.title + BDFDB.disCNS.marginreset + BDFDB.disCNS.weightmedium + BDFDB.disCNS.size16 + BDFDB.disCNS.height24 + BDFDB.disCN.flexchild}" style = "flex: 0 0 auto;" > REPLACE _modal _customclosed _text < / h 3 >
< / d i v >
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCN.marginbottom8}" style = "flex: 1 1 auto;" >
< div class = "${BDFDB.disCNS.inputwrapper + BDFDB.disCNS.vertical + BDFDB.disCNS.flex + BDFDB.disCNS.directioncolumn + BDFDB.disCN.flexchild}" style = "flex: 1 1 auto;" >
< input type = "text" option = "closed" class = "${BDFDB.disCNS.inputdefault + BDFDB.disCNS.input + BDFDB.disCN.size16}" placeholder = "Url or Filepath" >
< / d i v >
< button type = "button" class = "${BDFDB.disCNS.flexchild + BDFDB.disCNS.button + BDFDB.disCNS.buttonlookfilled + BDFDB.disCNS.buttoncolorbrand + BDFDB.disCNS.buttonsizemedium + BDFDB.disCN.buttongrow} file-navigator" style = "flex: 0 0 auto;" >
< div class = "${BDFDB.disCN.buttoncontents}" > < / d i v >
< input type = "file" option = "closed" accept = "image/*" style = "display:none!important;" >
< / b u t t o n >
< / d i v >
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.vertical + BDFDB.disCNS.directioncolumn + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCN.nowrap}" style = "flex: 1 1 auto;" >
< h3 class = "${BDFDB.disCNS.titledefault + BDFDB.disCNS.title + BDFDB.disCNS.marginreset + BDFDB.disCNS.weightmedium + BDFDB.disCNS.size16 + BDFDB.disCNS.height24 + BDFDB.disCN.flexchild}" style = "flex: 0 0 auto;" > REPLACE _modal _custompreview _text < / h 3 >
< / d i v >
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCN.marginbottom8}" style = "flex: 1 1 auto;" >
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifycenter + BDFDB.disCN.aligncenter + BDFDB.disCNS.nowrap}" style = "flex: 1 1 auto;" >
< div class = "ui-icon-picker-icon preview nopic open" >
< div class = "ui-picker-inner" > < / d i v >
< / d i v >
< div class = "ui-icon-picker-icon preview nopic closed" style = "margin-left: 25px; margin-right: 25px;" >
< div class = "ui-picker-inner" > < / d i v >
< / d i v >
< div class = "ui-icon-picker-icon preview nopic switching" >
< div class = "ui-picker-inner" > < / d i v >
< / d i v >
< / d i v >
< button type = "button" class = "${BDFDB.disCNS.flexchild + BDFDB.disCNS.button + BDFDB.disCNS.buttonlookfilled + BDFDB.disCNS.buttoncolorbrand + BDFDB.disCNS.buttonsizemedium + BDFDB.disCN.buttongrow} btn-add btn-addcustom" style = "flex: 0 0 auto;" >
< div class = "${BDFDB.disCN.buttoncontents}" > < / d i v >
< / b u t t o n >
< / d i v >
< / d i v >
< / d i v >
< / d i v >
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontalreverse + BDFDB.disCNS.horizontalreverse2 + BDFDB.disCNS.directionrowreverse + BDFDB.disCNS.justifystart + BDFDB.disCNS.alignstretch + BDFDB.disCNS.nowrap + BDFDB.disCN.modalfooter}" >
< button type = "button" class = "btn-save ${BDFDB.disCNS.button + BDFDB.disCNS.buttonlookfilled + BDFDB.disCNS.buttoncolorbrand + BDFDB.disCNS.buttonsizemedium + BDFDB.disCN.buttongrow}" >
< div class = "${BDFDB.disCN.buttoncontents}" > REPLACE _btn _save _text < / d i v >
< / b u t t o n >
< / d i v >
< / d i v >
< / d i v >
< / d i v >
< / s p a n > ` ;
this . folderIcons = [
{ "openicon" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYAAAA4TnrqAAAB2ElEQVR4Xu2Z4W6DMAwG4f0fmqloq0YJw0dIhLPb7y+qfT0Hr8yTf2ECczhpcBIWkEBYwgIEQFSzhAUIgKhmCQsQAFHNEhYgAKKaJSxAAETvMGsBn1eK3lFDZQmx4zWF1kL6rLCmlli3lamrBd4N6qeNq/VUYogdv1JcK1CPByasmFRrisJqbdWj7RLWAGaBFi5FqSSPHsNLBOAhDIwe6HVnwb4vx1H/KDxN02iw0ENOWGAjEJaw0B0WFiYc/P547yzwPYwI66j9nUiadW7Km5GwzmG91wthCStGAKRWqbqatSw5ng/zXL7bu8FKDKr/nSWs4NAnB9XXLGEFrXrFksPqt5QmB7XZGJo/DZPD2vBpCis5qN0eKqzXZr5fQosLezNYo1nV9N8dYYG3O8lhFSeuyRgmB3U4ccLaL9eHTG6HNapVTS745LD+lEeztmPYD9bIVt0+hsLaanr4I3pyUCFxbruzksMKcQiFfsk1qlkhDqHQGaz/YFVoTj8W3Bwv/sBP3uTdKTVr/Umd1fLoNOofhc/G8dFYysWh/lF4sJHEveMDhS8o01hW9Vt1OOHYVZUsLIBPWMICBEBUs4QFCICoZgkLEABRzRIWIACimiUsQABENQvA+gLIy3lMlnMoMQAAAABJRU5ErkJggg==" ,
"closedicon" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYAAAA4TnrqAAABkElEQVR4Xu3a6xKCIABEYXz/h7bpOl1M94CWMqffywRfK1I2FF+xwBAnDRaxQAnEEgsIgKjNEgsIgKjNEgsIgKjNEgsIgKjNEgsIgOgazRrB+01F15hD4xSy4S0TbUV6n2HLXLLVNqZqJ7g21H0ZtfNpZMiG10xuK6jdg4mVleqSolhbt2rX7RKrg2aBJVRFaUl2fRlWCcBBGIwO+NWeBdddHUfrR+FSSm9Y6CYnFjgRNGON43HKNgyTy40N4uBtV3iRORLU4wD3CRYbxEGxwPUql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QABErSyxgACIWlliAQEQtbLEAgIgamUBrB+JEUtMl61hQwAAAABJRU5ErkJggg==" ,
"closedicon" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYAAAA4TnrqAAABhUlEQVR4Xu3YwQqDMBBF0eT/P9oiVAji4l1rIh1u1w8zHifTaG/+YoEeJw02sUATiCUWEABRO0ssIACidpZYQABE7SyxgACI2lliAQEQtbPEAgIgeqezNnD9q+idNa+us7wOWvivBR43Tdc9Y71SBy36qSL3m6drH2BP1oDqoAW/VuhX6un112Ft24zarydi7/S5xpM1vnAcPD/ZIlDzO6sQVB2siVtv3KPx7oqD4zZc0VmLoOZ3Vjw6/yMYN0wcnPjX/TZpbBAHW2vrzglr+WKDOCgWe+Wws0DHiyVW/kLvzAKjSCyxwHARSywkAMLxKIqDHkrBfhVLrGmfaDzBg0Eolli+7oAeEEssIgCy8VkzDnrO8pzlOQtsQbHEggIgHs/tOOiAd8A7s8AWFEssKADi8dyOgw54B7wzC2zBaVj7hat9LSVjKP/wNTytKmAICrUgbO2ScaxbUiG8KbFCKLchgBJLLCgA4s4ssYAAiNpZYgEBELWzxAICIGpniQUEQNTOAlgf/fBATBZ555AAAAAASUVORK5CYII=" }
] ;
this . defaults = {
settings : {
closeOtherFolders : { value : false , description : "Close other Folders when opening a Folder." } ,
closeTheFolder : { value : false , description : "Close the Folder when selecting a Server." } ,
closeAllFolders : { value : false , description : "Close All Folders when selecting a Server." } ,
forceOpenFolder : { value : false , description : "Force a Folder to open when switching to a Server of that Folder." } ,
showCountBadge : { value : true , description : "Display Badge for Amount of Servers in a Folder." } ,
addSeparators : { value : true , description : "Adds separators between Servers of different Folders." }
}
} ;
}
getName ( ) { return "ServerFolders" ; }
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." ; }
2018-12-13 16:48:35 +01:00
getVersion ( ) { return "5.8.8" ; }
2018-10-11 10:21:26 +02:00
getAuthor ( ) { return "DevilBro" ; }
getSettingsPanel ( ) {
if ( ! this . started || typeof BDFDB !== "object" ) return ;
var settings = BDFDB . getAllData ( this , "settings" ) ;
var settingshtml = ` <div class=" ${ this . getName ( ) } -settings DevilBro-settings"><div class=" ${ BDFDB . disCNS . titledefault + BDFDB . disCNS . title + BDFDB . disCNS . size18 + BDFDB . disCNS . height24 + BDFDB . disCNS . weightnormal + BDFDB . disCN . marginbottom8 } "> ${ this . getName ( ) } </div><div class="DevilBro-settings-inner"> ` ;
for ( let key in settings ) {
settingshtml += ` <div class=" ${ BDFDB . disCNS . flex + BDFDB . disCNS . flex2 + BDFDB . disCNS . horizontal + BDFDB . disCNS . horizontal2 + BDFDB . disCNS . directionrow + BDFDB . disCNS . justifystart + BDFDB . disCNS . aligncenter + BDFDB . disCNS . nowrap + BDFDB . disCN . marginbottom8 } " style="flex: 1 1 auto;"><h3 class=" ${ BDFDB . disCNS . titledefault + BDFDB . disCNS . title + BDFDB . disCNS . marginreset + BDFDB . disCNS . weightmedium + BDFDB . disCNS . size16 + BDFDB . disCNS . height24 + BDFDB . disCN . flexchild } " style="flex: 1 1 auto;"> ${ this . defaults . settings [ key ] . description } </h3><div class=" ${ BDFDB . disCNS . flexchild + BDFDB . disCNS . switchenabled + BDFDB . disCNS . switch + BDFDB . disCNS . switchvalue + BDFDB . disCNS . switchsizedefault + BDFDB . disCNS . switchsize + BDFDB . disCN . switchthemedefault } " style="flex: 0 0 auto;"><input type="checkbox" value=" ${ key } " class=" ${ BDFDB . disCNS . switchinnerenabled + BDFDB . disCN . switchinner } " ${ settings [ key ] ? " checked" : "" } ></div></div> ` ;
}
settingshtml += ` <div class=" ${ BDFDB . disCNS . flex + BDFDB . disCNS . flex2 + BDFDB . disCNS . horizontal + BDFDB . disCNS . horizontal2 + BDFDB . disCNS . directionrow + BDFDB . disCNS . justifystart + BDFDB . disCNS . aligncenter + BDFDB . disCNS . nowrap + BDFDB . disCN . marginbottom8 } " style="flex: 0 0 auto;"><h3 class=" ${ BDFDB . disCNS . titledefault + BDFDB . disCNS . title + BDFDB . disCNS . marginreset + BDFDB . disCNS . weightmedium + BDFDB . disCNS . size16 + BDFDB . disCNS . height24 + BDFDB . disCN . flexchild } " style="flex: 1 1 auto;">Reset all Folders.</h3><button type="button" class=" ${ BDFDB . disCNS . flexchild + BDFDB . disCNS . button + BDFDB . disCNS . buttonlookfilled + BDFDB . disCNS . buttoncolorred + BDFDB . disCNS . buttonsizemedium + BDFDB . disCN . buttongrow } reset-button" style="flex: 0 0 auto;"><div class=" ${ BDFDB . disCN . buttoncontents } ">Reset</div></button></div> ` ;
settingshtml += ` <div class=" ${ BDFDB . disCNS . flex + BDFDB . disCNS . flex2 + BDFDB . disCNS . horizontal + BDFDB . disCNS . horizontal2 + BDFDB . disCNS . directionrow + BDFDB . disCNS . justifystart + BDFDB . disCNS . aligncenter + BDFDB . disCNS . nowrap + BDFDB . disCN . marginbottom8 } " style="flex: 0 0 auto;"><h3 class=" ${ BDFDB . disCNS . titledefault + BDFDB . disCNS . title + BDFDB . disCNS . marginreset + BDFDB . disCNS . weightmedium + BDFDB . disCNS . size16 + BDFDB . disCNS . height24 + BDFDB . disCN . flexchild } " style="flex: 1 1 auto;">Remove all custom Icons.</h3><button type="button" class=" ${ BDFDB . disCNS . flexchild + BDFDB . disCNS . button + BDFDB . disCNS . buttonlookfilled + BDFDB . disCNS . buttoncolorred + BDFDB . disCNS . buttonsizemedium + BDFDB . disCN . buttongrow } removecustom-button" style="flex: 0 0 auto;"><div class=" ${ BDFDB . disCN . buttoncontents } ">Remove</div></button></div> ` ;
settingshtml += ` </div></div> ` ;
var settingspanel = $ ( settingshtml ) [ 0 ] ;
BDFDB . initElements ( settingspanel ) ;
$ ( settingspanel )
. on ( "click" , BDFDB . dotCN . switchinner , ( ) => { this . updateSettings ( settingspanel ) ; } )
. on ( "click" , ".reset-button" , ( ) => { this . resetAll ( ) ; } )
. on ( "click" , ".removecustom-button" , ( ) => { this . removeAllIcons ( ) } ) ;
return settingspanel ;
}
//legacy
load ( ) { }
start ( ) {
var libraryScript = null ;
if ( typeof BDFDB !== "object" || typeof BDFDB . isLibraryOutdated !== "function" || BDFDB . isLibraryOutdated ( ) ) {
libraryScript = document . querySelector ( 'head script[src="https://mwittrien.github.io/BetterDiscordAddons/Plugins/BDFDB.js"]' ) ;
if ( libraryScript ) libraryScript . remove ( ) ;
libraryScript = document . createElement ( "script" ) ;
libraryScript . setAttribute ( "type" , "text/javascript" ) ;
libraryScript . setAttribute ( "src" , "https://mwittrien.github.io/BetterDiscordAddons/Plugins/BDFDB.js" ) ;
document . head . appendChild ( libraryScript ) ;
}
this . startTimeout = setTimeout ( ( ) => { this . initialize ( ) ; } , 30000 ) ;
if ( typeof BDFDB === "object" && typeof BDFDB . isLibraryOutdated === "function" ) this . initialize ( ) ;
else libraryScript . addEventListener ( "load" , ( ) => { this . initialize ( ) ; } ) ;
}
initialize ( ) {
if ( typeof BDFDB === "object" ) {
BDFDB . loadMessage ( this ) ;
2018-12-07 13:16:18 +01:00
this . DiscordConstants = BDFDB . WebModules . findByProperties ( [ "Permissions" , "ActivityTypes" , "StatusTypes" ] ) ;
this . Animations = BDFDB . WebModules . findByProperties ( [ "spring" ] ) ;
2018-10-11 10:21:26 +02:00
var observer = null ;
observer = new MutationObserver ( ( changes , _ ) => {
changes . forEach (
( change , i ) => {
var serverObj = this . getParentObject ( change . target , BDFDB . disCN . guild ) ;
var folderDiv = this . getFolderOfServer ( serverObj ) ;
if ( folderDiv ) {
this . updateCopyInFolderContent ( serverObj , folderDiv ) ;
this . updateFolderNotifications ( folderDiv ) ;
}
}
) ;
} ) ;
BDFDB . addObserver ( this , null , { name : "badgeObserver" , instance : observer , multi : true } , { characterData : true , subtree : true } ) ;
observer = new MutationObserver ( ( changes , _ ) => {
changes . forEach (
( change , i ) => {
if ( change . addedNodes ) {
change . addedNodes . forEach ( ( node ) => {
if ( node && node . nodeType == 1 && node . className . includes ( BDFDB . disCN . contextmenu ) ) {
this . onContextMenu ( node ) ;
}
} ) ;
}
}
) ;
} ) ;
BDFDB . addObserver ( this , BDFDB . dotCN . appmount , { name : "serverContextObserver" , instance : observer } , { childList : true } ) ;
observer = new MutationObserver ( ( changes , _ ) => {
changes . forEach (
( change , i ) => {
if ( change . type == "attributes" && change . attributeName == "class" ) {
var serverObj = this . getParentObject ( change . target , BDFDB . disCN . guild ) ;
var folderDiv = this . getFolderOfServer ( serverObj ) ;
if ( folderDiv ) {
this . updateCopyInFolderContent ( serverObj , folderDiv ) ;
this . updateFolderNotifications ( folderDiv ) ;
}
}
if ( change . addedNodes ) {
change . addedNodes . forEach ( ( node ) => {
var serverObj = this . getParentObject ( node , BDFDB . disCN . guild ) ;
var folderDiv = this . getFolderOfServer ( serverObj ) ;
if ( folderDiv ) {
this . updateCopyInFolderContent ( serverObj , folderDiv ) ;
this . updateFolderNotifications ( folderDiv ) ;
if ( node . tagName && node . classList . contains ( BDFDB . disCN . badge ) ) {
BDFDB . addObserver ( this , node , { name : "badgeObserver" , multi : true } , { characterData : true , subtree : true } ) ;
}
$ ( serverObj . div ) . attr ( "folder" , folderDiv . id ) . hide ( ) ;
}
} ) ;
}
if ( change . removedNodes ) {
change . removedNodes . forEach ( ( node ) => {
var isBadge = $ ( node ) . hasClass ( BDFDB . disCN . badge ) ;
var serverObj = this . getParentObject ( isBadge ? change . target : node , BDFDB . disCN . guild ) ;
var folderDiv = this . getFolderOfServer ( serverObj ) ;
if ( folderDiv ) {
if ( isBadge ) this . updateCopyInFolderContent ( serverObj , folderDiv ) ;
else $ ( ".foldercontent [guild='" + serverObj . id + "']" ) . remove ( ) ;
this . updateFolderNotifications ( folderDiv ) ;
}
} ) ;
}
}
) ;
} ) ;
BDFDB . addObserver ( this , BDFDB . dotCN . guilds , { name : "serverListObserver" , instance : observer } , { childList : true , attributes : true , subtree : true } ) ;
observer = new MutationObserver ( ( changes , _ ) => {
changes . forEach (
( change , i ) => {
if ( change . removedNodes ) {
change . removedNodes . forEach ( ( node ) => {
document . querySelectorAll ( ".folder" ) . forEach ( folderDiv => { this . updateFolderNotifications ( folderDiv ) ; } ) ;
} ) ;
}
}
) ;
} ) ;
BDFDB . addObserver ( this , BDFDB . dotCN . layers , { name : "settingsWindowObserver" , instance : observer } , { childList : true } ) ;
document . querySelectorAll ( BDFDB . dotCN . badge + ":not(.folder):not(.copy)" ) . forEach ( ( badge ) => {
BDFDB . addObserver ( this , badge , { name : "badgeObserver" , multi : true } , { characterData : true , subtree : true } ) ;
} ) ;
$ ( BDFDB . dotCN . guilds ) . on ( "click." + this . getName ( ) , BDFDB . dotCN . guildseparator + ":not(.folderseparator) ~ div" + BDFDB . dotCN . guild + ":not(.folder)" , ( ) => {
if ( BDFDB . getData ( "closeAllFolders" , this , "settings" ) ) {
document . querySelectorAll ( ".folder.open" ) . forEach ( openFolder => { this . openCloseFolder ( openFolder ) ; } ) ;
}
} ) ;
setTimeout ( ( ) => {
2018-12-06 20:23:32 +01:00
if ( ! document . querySelector ( BDFDB . dotCN . guildswrapper + ".foldercontent" ) ) $ ( this . folderContainerMarkup ) . insertAfter ( BDFDB . dotCN . guildswrapper ) ;
2018-10-11 10:21:26 +02:00
this . addDragListener ( ) ;
this . loadAllFolders ( ) ;
} , 5000 ) ;
}
else {
console . error ( this . getName ( ) + ": Fatal Error: Could not load BD functions!" ) ;
}
}
stop ( ) {
if ( typeof BDFDB === "object" ) {
2018-12-06 20:23:32 +01:00
$ ( BDFDB . dotCN . guildswrapper + ".foldercontent" ) . remove ( ) ;
2018-10-11 10:21:26 +02:00
this . resetAllElements ( ) ;
BDFDB . unloadMessage ( this ) ;
}
}
onSwitch ( ) {
if ( typeof BDFDB === "object" ) {
if ( BDFDB . getData ( "forceOpenFolder" , this , "settings" ) ) {
var serverObj = BDFDB . getSelectedServer ( ) ;
if ( ! serverObj ) return ;
var folderDiv = this . getFolderOfServer ( serverObj ) ;
if ( ! folderDiv || folderDiv . classList . contains ( "open" ) ) return ;
this . openCloseFolder ( folderDiv ) ;
}
}
}
// begin of own functions
updateSettings ( settingspanel ) {
var settings = { } ;
for ( var input of settingspanel . querySelectorAll ( BDFDB . dotCN . switchinner ) ) {
settings [ input . value ] = input . checked ;
}
BDFDB . saveAllData ( settings , this , "settings" ) ;
}
resetAll ( ) {
if ( confirm ( "Are you sure you want to delete all folders?" ) ) {
BDFDB . removeAllData ( this , "folders" ) ;
this . resetAllElements ( ) ;
}
}
removeAllIcons ( ) {
if ( confirm ( "Are you sure you want to remove all custom icons?" ) ) {
BDFDB . removeAllData ( this , "customicons" ) ;
}
}
resetAllElements ( ) {
$ ( BDFDB . dotCN . guild + ".folder" ) . remove ( ) ;
$ ( ".guilddragpreview" ) . remove ( ) ;
BDFDB . readServerList ( ) . forEach ( serverObj => $ ( serverObj . div ) . removeAttr ( "folder" ) . show ( ) ) ;
$ ( ".foldercontentopen, .foldercontentclosed" ) . removeClass ( "foldercontentopen" ) . removeClass ( "foldercontentclosed" ) ;
}
changeLanguageStrings ( ) {
this . serverContextEntryMarkup = this . serverContextEntryMarkup . replace ( "REPLACE_servercontext_serverfolders_text" , this . labels . servercontext _serverfolders _text ) ;
this . serverContextSubMenuMarkup = this . serverContextSubMenuMarkup . replace ( "REPLACE_serversubmenu_createfolder_text" , this . labels . serversubmenu _createfolder _text ) ;
this . serverContextSubMenuMarkup = this . serverContextSubMenuMarkup . replace ( "REPLACE_serversubmenu_removefromfolder_text" , this . labels . serversubmenu _removefromfolder _text ) ;
this . folderContextMarkup = this . folderContextMarkup . replace ( "REPLACE_foldercontext_unreadfolder_text" , this . labels . foldercontext _unreadfolder _text ) ;
this . folderContextMarkup = this . folderContextMarkup . replace ( "REPLACE_foldercontext_autounreadfolder_text" , this . labels . foldercontext _autounreadfolder _text ) ;
this . folderContextMarkup = this . folderContextMarkup . replace ( "REPLACE_foldercontext_foldersettings_text" , this . labels . foldercontext _foldersettings _text ) ;
this . folderContextMarkup = this . folderContextMarkup . replace ( "REPLACE_foldercontext_createfolder_text" , this . labels . serversubmenu _createfolder _text ) ;
this . folderContextMarkup = this . folderContextMarkup . replace ( "REPLACE_foldercontext_removefolder_text" , this . labels . foldercontext _removefolder _text ) ;
this . folderSettingsModalMarkup = this . folderSettingsModalMarkup . replace ( "REPLACE_modal_header_text" , this . labels . modal _header _text ) ;
this . folderSettingsModalMarkup = this . folderSettingsModalMarkup . replace ( "REPLACE_modal_foldername_text" , this . labels . modal _foldername _text ) ;
this . folderSettingsModalMarkup = this . folderSettingsModalMarkup . replace ( "REPLACE_modal_tabheader1_text" , this . labels . modal _tabheader1 _text ) ;
this . folderSettingsModalMarkup = this . folderSettingsModalMarkup . replace ( "REPLACE_modal_tabheader2_text" , this . labels . modal _tabheader2 _text ) ;
this . folderSettingsModalMarkup = this . folderSettingsModalMarkup . replace ( "REPLACE_modal_tabheader3_text" , this . labels . modal _tabheader3 _text ) ;
this . folderSettingsModalMarkup = this . folderSettingsModalMarkup . replace ( "REPLACE_modal_tabheader4_text" , this . labels . modal _tabheader4 _text ) ;
this . folderSettingsModalMarkup = this . folderSettingsModalMarkup . replace ( "REPLACE_modal_iconpicker_text" , this . labels . modal _iconpicker _text ) ;
this . folderSettingsModalMarkup = this . folderSettingsModalMarkup . replace ( "REPLACE_modal_colorpicker1_text" , this . labels . modal _colorpicker1 _text ) ;
this . folderSettingsModalMarkup = this . folderSettingsModalMarkup . replace ( "REPLACE_modal_colorpicker2_text" , this . labels . modal _colorpicker2 _text ) ;
this . folderSettingsModalMarkup = this . folderSettingsModalMarkup . replace ( "REPLACE_modal_colorpicker3_text" , this . labels . modal _colorpicker3 _text ) ;
this . folderSettingsModalMarkup = this . folderSettingsModalMarkup . replace ( "REPLACE_modal_colorpicker4_text" , this . labels . modal _colorpicker4 _text ) ;
this . folderSettingsModalMarkup = this . folderSettingsModalMarkup . replace ( "REPLACE_modal_customopen_text" , this . labels . modal _customopen _text ) ;
this . folderSettingsModalMarkup = this . folderSettingsModalMarkup . replace ( "REPLACE_modal_customclosed_text" , this . labels . modal _customclosed _text ) ;
this . folderSettingsModalMarkup = this . folderSettingsModalMarkup . replace ( "REPLACE_modal_custompreview_text" , this . labels . modal _custompreview _text ) ;
this . folderSettingsModalMarkup = this . folderSettingsModalMarkup . replace ( "REPLACE_btn_save_text" , this . labels . btn _save _text ) ;
}
onContextMenu ( context ) {
if ( ! context || ! context . tagName || ! context . parentElement || context . querySelector ( ".serverfolders-item" ) ) return ;
var info = BDFDB . getKeyInformation ( { "node" : context , "key" : "guild" } ) ;
if ( info && BDFDB . getKeyInformation ( { "node" : context , "key" : "displayName" , "value" : "GuildLeaveGroup" } ) ) {
$ ( context ) . append ( this . serverContextEntryMarkup )
. on ( "mouseenter." + this . getName ( ) , ".serverfolders-item" , ( e ) => {
this . createContextSubMenu ( info , e , context ) ;
} ) ;
BDFDB . updateContextPosition ( context ) ;
}
}
createContextSubMenu ( info , e , context ) {
var serverObj = BDFDB . getDivOfServer ( info . id ) ;
var serverContextSubMenu = $ ( this . serverContextSubMenuMarkup ) ;
serverContextSubMenu
. on ( "click." + this . getName ( ) , ".createfolder-item" , ( ) => {
$ ( context ) . hide ( ) ;
this . createNewFolder ( serverObj . div ) ;
} ) ;
var folderDiv = this . getFolderOfServer ( serverObj ) ;
if ( folderDiv ) {
serverContextSubMenu
. find ( ".removefromfolder-item" )
. removeClass ( BDFDB . disCN . contextmenuitemdisabled )
. on ( "click." + this . getName ( ) , ( ) => {
$ ( context ) . hide ( ) ;
this . removeServerFromFolder ( serverObj , folderDiv ) ;
} ) ;
}
BDFDB . appendSubMenu ( e . currentTarget , serverContextSubMenu ) ;
}
addDragListener ( ) {
$ ( BDFDB . dotCN . guilds )
. off ( "mousedown." + this . getName ( ) )
. on ( "mousedown." + this . getName ( ) , "div" + BDFDB . dotCN . guild + ":not(.folder):not(.copy)" , ( e ) => {
if ( BDFDB . pressedKeys . includes ( 17 ) ) {
e . stopPropagation ( ) ;
e . preventDefault ( ) ;
var serverObj = this . getParentObject ( e . target , BDFDB . disCN . guild ) ;
if ( serverObj && serverObj . div ) {
var guilddragpreview = serverObj . div . cloneNode ( true ) ;
$ ( guilddragpreview )
. appendTo ( BDFDB . dotCN . appmount )
. addClass ( "guilddragpreview" )
. offset ( { "left" : e . clientX + 5 , "top" : e . clientY + 5 } ) ;
$ ( document )
. off ( "mouseup." + this . getName ( ) ) . off ( "mousemove." + this . getName ( ) )
. on ( "mouseup." + this . getName ( ) , ( e2 ) => {
var folderDiv = this . getParentObject ( e2 . target , "folder" ) . div ;
if ( folderDiv ) this . addServerToFolder ( serverObj , folderDiv ) ;
$ ( document ) . off ( "mouseup." + this . getName ( ) ) . off ( "mousemove." + this . getName ( ) ) ;
guilddragpreview . remove ( ) ;
} )
. on ( "mousemove." + this . getName ( ) , ( e2 ) => {
$ ( guilddragpreview ) . offset ( { "left" : e2 . clientX + 5 , "top" : e2 . clientY + 5 } ) ;
} ) ;
}
}
} ) ;
}
addServerToFolder ( serverObj , folderDiv ) {
var data = BDFDB . loadData ( folderDiv . id , this , "folders" ) ;
if ( serverObj && data && ! data . servers . includes ( serverObj . id ) ) {
data . servers . push ( serverObj . id ) ;
BDFDB . saveData ( folderDiv . id , data , this , "folders" ) ;
$ ( serverObj . div ) . attr ( "folder" , folderDiv . id ) . hide ( ) ;
var message = this . labels . toast _addserver _text ?
this . labels . toast _addserver _text . replace ( "${servername}" , serverObj . name ) . replace ( "${foldername}" , data . folderName ? " " + data . folderName : "" ) : "" ;
BDFDB . showToast ( message , { type : "success" } ) ;
this . updateCopyInFolderContent ( serverObj , folderDiv ) ;
this . updateFolderNotifications ( folderDiv ) ;
}
}
removeServerFromFolder ( serverObj , folderDiv ) {
var data = BDFDB . loadData ( folderDiv . id , this , "folders" ) ;
if ( serverObj && data ) {
BDFDB . removeFromArray ( data . servers , serverObj . id ) ;
BDFDB . saveData ( folderDiv . id , data , this , "folders" ) ;
$ ( serverObj . div ) . removeAttr ( "folder" ) . show ( ) ;
var message = this . labels . toast _removeserver _text ?
this . labels . toast _removeserver _text . replace ( "${servername}" , serverObj . name ) . replace ( "${foldername}" , data . folderName ? " " + data . folderName : "" ) : "" ;
BDFDB . showToast ( message , { type : "danger" } ) ;
$ ( ".foldercontent [guild='" + serverObj . id + "']" ) . remove ( ) ;
this . updateFolderNotifications ( folderDiv ) ;
}
}
createNewFolder ( ankerDiv ) {
if ( ! ankerDiv ) return ;
var folderID = this . generateID ( "folder" , "folders" ) ;
var folderName = "" ;
var position = Array . from ( document . querySelectorAll ( "div" + BDFDB . dotCN . guildseparator + ":not(.folderseparator) ~ div" + BDFDB . dotCN . guild ) ) . indexOf ( ankerDiv ) ;
var iconID = 0 ;
2018-10-22 20:47:47 +02:00
var icons = Object . assign ( { } , this . folderIcons [ 0 ] ) ;
2018-10-11 10:21:26 +02:00
var autounread = false ;
var color1 = [ "0" , "0" , "0" ] ;
var color2 = [ "255" , "255" , "255" ] ;
var color3 = null ;
var color4 = null ;
var servers = [ ] ;
var folderDiv = this . createFolderDiv ( { folderID , folderName , position , iconID , icons , autounread , color1 , color2 , color3 , color4 , servers } ) ;
this . showFolderSettings ( folderDiv ) ;
this . updateFolderPositions ( ) ;
}
loadAllFolders ( ) {
var folders = BDFDB . loadAllData ( this , "folders" ) ;
var sortedFolders = [ ] ;
2018-12-06 20:23:32 +01:00
for ( var id in folders ) sortedFolders [ folders [ id ] . position ] = folders [ id ] ;
2018-10-11 10:21:26 +02:00
for ( var i = 0 ; i < sortedFolders . length ; i ++ ) {
var data = sortedFolders [ i ] ;
2018-12-06 20:23:32 +01:00
if ( data && ! document . querySelector ( ".folder#" + data . folderID ) ) {
this . readIncludedServerList ( this . createFolderDiv ( data ) ) . forEach ( ( serverObj ) => { $ ( serverObj . div ) . attr ( "folder" , data . folderID ) . hide ( ) ; } ) ;
2018-10-11 10:21:26 +02:00
}
}
}
createFolderDiv ( data ) {
var folderDiv = $ ( this . folderIconMarkup ) [ 0 ] ;
var serversandfolders = document . querySelectorAll ( "div" + BDFDB . dotCN . guildseparator + ":not(.folderseparator) ~ div" + BDFDB . dotCN . guild ) ;
$ ( folderDiv ) . insertBefore ( serversandfolders [ data . position > serversandfolders . length - 1 ? serversandfolders . length - 1 : data . position ] ) ;
var avatar = folderDiv . querySelector ( BDFDB . dotCN . avataricon ) ;
2018-12-07 13:16:18 +01:00
2018-10-11 10:21:26 +02:00
$ ( folderDiv )
. addClass ( "closed" )
. attr ( "id" , data . folderID )
. on ( "mouseenter" , ( ) => { this . createFolderToolTip ( folderDiv ) ; } )
. on ( "click" , ( ) => {
if ( BDFDB . getData ( "closeOtherFolders" , this , "settings" ) ) {
document . querySelectorAll ( ".folder.open" ) . forEach ( openFolder => {
if ( openFolder != folderDiv ) this . openCloseFolder ( openFolder ) ;
} ) ;
}
this . openCloseFolder ( folderDiv ) ;
} )
. on ( "contextmenu" , ( e ) => {
this . createFolderContextMenu ( folderDiv , e ) ;
} )
. on ( "mousedown." + this . getName ( ) , ( e ) => {
var mouseTimeout = null ;
var folderdragpreview = folderDiv . cloneNode ( true ) ;
var hoveredElement = null ;
var placeholder = $ ( ` <div class=" ${ BDFDB . disCNS . guild + BDFDB . disCN . guildplaceholder } folder folderplaceholder"></div> ` ) [ 0 ] ;
var guildswrap = document . querySelector ( BDFDB . dotCN . guilds ) ;
$ ( folderdragpreview )
. hide ( )
. appendTo ( BDFDB . dotCN . appmount )
. addClass ( "guilddragpreview" )
. offset ( { "left" : e . clientX + 5 , "top" : e . clientY + 5 } ) ;
$ ( document )
. off ( "mouseup." + this . getName ( ) )
. on ( "mouseup." + this . getName ( ) , ( e2 ) => {
clearTimeout ( mouseTimeout ) ;
placeholder . remove ( ) ;
folderdragpreview . remove ( ) ;
$ ( folderDiv ) . css ( "display" , "" ) ;
$ ( document ) . off ( "mouseup." + this . getName ( ) ) . off ( "mousemove." + this . getName ( ) ) ;
if ( hoveredElement ) {
guildswrap . insertBefore ( folderDiv , hoveredElement . nextSibling ) ;
this . updateFolderPositions ( folderDiv ) ;
}
} ) ;
mouseTimeout = setTimeout ( ( ) => {
$ ( document )
. off ( "mousemove." + this . getName ( ) )
. on ( "mousemove." + this . getName ( ) , ( e2 ) => {
placeholder . remove ( ) ;
$ ( folderDiv ) . hide ( ) ;
$ ( folderdragpreview )
. show ( )
. offset ( { "left" : e2 . clientX + 5 , "top" : e2 . clientY + 5 } ) ;
hoveredElement = this . getParentObject ( e2 . target , "folder" ) . div ;
if ( hoveredElement ) guildswrap . insertBefore ( placeholder , hoveredElement . nextSibling ) ;
else {
hoveredElement = this . getParentObject ( e2 . target , BDFDB . disCN . guild ) . div ;
if ( hoveredElement ) guildswrap . insertBefore ( placeholder , hoveredElement . nextSibling ) ;
}
} ) ;
} , 100 ) ;
} ) ;
$ ( avatar )
. css ( "background-image" , "url(\"" + data . icons . closedicon + "\")" ) ;
2018-12-07 13:16:18 +01:00
this . addHoverBehaviour ( folderDiv ) ;
2018-10-11 10:21:26 +02:00
BDFDB . saveData ( data . folderID , data , this , "folders" ) ;
this . updateFolderNotifications ( folderDiv ) ;
return folderDiv ;
}
generateID ( prefix , dataname ) {
var data = BDFDB . loadAllData ( this , dataname ) ;
var id = prefix + "_" + Math . round ( Math . random ( ) * 10000000000000000 ) ;
return data [ id ] ? this . generateID ( prefix , dataname ) : id ;
}
createFolderContextMenu ( folderDiv , e ) {
var folderID = folderDiv . id ;
var data = BDFDB . loadData ( folderID , this , "folders" ) ;
if ( data ) {
var folderContext = $ ( this . folderContextMarkup ) ;
folderContext
. on ( "click." + this . getName ( ) , ".autounreadfolder-item" , ( e2 ) => {
var checkbox = $ ( e2 . currentTarget ) . find ( "input" ) ;
var isChecked = checkbox . prop ( "checked" ) ;
checkbox . prop ( "checked" , ! isChecked )
data . autounread = ! isChecked ;
BDFDB . saveData ( folderID , data , this , "folders" ) ;
} )
. on ( "click." + this . getName ( ) , ".foldersettings-item" , ( ) => {
folderContext . remove ( ) ;
this . showFolderSettings ( folderDiv ) ;
} )
. on ( "click." + this . getName ( ) , ".createfolder-item" , ( ) => {
folderContext . remove ( ) ;
this . createNewFolder ( folderDiv ) ;
} )
. on ( "click." + this . getName ( ) , ".removefolder-item" , ( ) => {
folderContext . remove ( ) ;
this . removeFolder ( folderDiv ) ;
} )
. find ( ".autounreadfolder-item input" ) . prop ( "checked" , data . autounread ) ;
var unreadServers = BDFDB . readUnreadServerList ( this . readIncludedServerList ( folderDiv ) ) ;
if ( unreadServers . length > 0 ) {
folderContext
. find ( ".unreadfolder-item" )
. removeClass ( BDFDB . disCN . contextmenuitemdisabled )
. on ( "click." + this . getName ( ) , ( ) => {
folderContext . remove ( ) ;
BDFDB . clearReadNotifications ( unreadServers ) ;
} ) ;
}
BDFDB . appendContextMenu ( folderContext [ 0 ] , e ) ;
}
}
createFolderToolTip ( folderDiv ) {
var data = BDFDB . loadData ( folderDiv . id , this , "folders" ) ;
if ( data ) {
if ( data . folderName ) {
var bgColor = data . color3 ? BDFDB . color2RGB ( data . color3 ) : "" ;
var fontColor = data . color4 ? BDFDB . color2RGB ( data . color4 ) : "" ;
BDFDB . createTooltip ( data . folderName , folderDiv , { type : "right" , selector : "guild-folder-tooltip" , style : ` color: ${ fontColor } !important; background-color: ${ bgColor } !important; border-color: ${ bgColor } !important; ` } ) ;
}
}
}
createServerToolTip ( serverObj , target , e ) {
var data = BDFDB . loadData ( serverObj . id , "EditServers" , "servers" ) ;
var text = data ? ( data . name ? data . name : serverObj . name ) : serverObj . name ;
var bgColor = data ? ( data . color3 ? BDFDB . color2RGB ( data . color3 ) : "" ) : "" ;
var fontColor = data ? ( data . color4 ? BDFDB . color2RGB ( data . color4 ) : "" ) : "" ;
BDFDB . createTooltip ( text , target , { type : "right" , selector : "guild-custom-tooltip" , style : ` color: ${ fontColor } !important; background-color: ${ bgColor } !important; border-color: ${ bgColor } !important; ` } ) ;
}
showFolderSettings ( folderDiv ) {
var folderID = folderDiv . id ;
var data = BDFDB . loadData ( folderID , this , "folders" ) ;
if ( data ) {
var folderName = data . folderName ;
var position = data . position ;
var iconID = data . iconID ;
var icons = data . icons ;
var color1 = data . color1 ;
var color2 = data . color2 ;
var color3 = data . color3 ;
var color4 = data . color4 ;
var servers = data . servers ;
var folderSettingsModal = $ ( this . folderSettingsModalMarkup ) ;
folderSettingsModal . find ( BDFDB . dotCN . modalguildname ) . text ( folderName ? folderName : "" ) ;
folderSettingsModal . find ( "#input-foldername" ) . val ( folderName ) ;
folderSettingsModal . find ( "#input-foldername" ) . attr ( "placeholder" , folderName ) ;
2018-12-13 16:48:35 +01:00
this . setIcons ( folderSettingsModal , iconID ) ;
BDFDB . setColorSwatches ( folderSettingsModal , color1 ) ;
BDFDB . setColorSwatches ( folderSettingsModal , color2 ) ;
BDFDB . setColorSwatches ( folderSettingsModal , color3 ) ;
BDFDB . setColorSwatches ( folderSettingsModal , color4 ) ;
2018-10-11 10:21:26 +02:00
BDFDB . appendModal ( folderSettingsModal ) ;
folderSettingsModal
. on ( "change" , "input[type='file'][option]" , ( e ) => {
var file = e . currentTarget . files [ 0 ] ;
if ( file ) this . fetchCustomIcon ( folderSettingsModal [ 0 ] , e . currentTarget . getAttribute ( "option" ) ) ;
} )
. on ( "keyup" , "input[type='text'][option]" , ( e ) => {
if ( e . which == 13 ) this . fetchCustomIcon ( folderSettingsModal [ 0 ] , e . currentTarget . getAttribute ( "option" ) ) ;
} )
. on ( "click" , ".btn-addcustom" , ( e ) => {
this . saveCustomIcon ( folderSettingsModal [ 0 ] ) ;
} )
. on ( "click" , ".btn-save" , ( e ) => {
folderName = null ;
if ( folderSettingsModal . find ( "#input-foldername" ) . val ( ) ) {
if ( folderSettingsModal . find ( "#input-foldername" ) . val ( ) . trim ( ) . length > 0 ) {
folderName = folderSettingsModal . find ( "#input-foldername" ) . val ( ) . trim ( ) ;
}
}
iconID = folderSettingsModal . find ( ".ui-icon-picker-icon.selected" ) . attr ( "value" ) ;
2018-12-13 16:48:35 +01:00
color1 = BDFDB . getSwatchColor ( folderSettingsModal , 1 ) ;
color2 = BDFDB . getSwatchColor ( folderSettingsModal , 2 ) ;
color3 = BDFDB . getSwatchColor ( folderSettingsModal , 3 ) ;
color4 = BDFDB . getSwatchColor ( folderSettingsModal , 4 ) ;
2018-10-11 10:21:26 +02:00
if ( iconID != data . iconID || ! BDFDB . equals ( color1 , data . color1 ) || ! BDFDB . equals ( color2 , data . color2 ) ) {
var folderIcons = this . loadAllIcons ( ) ;
var isOpen = folderDiv . classList . contains ( "open" ) ;
if ( ! folderSettingsModal . find ( ".ui-icon-picker-icon.selected" ) . hasClass ( "custom" ) ) {
this . changeImgColor ( color1 , color2 , folderIcons [ iconID ] . openicon , ( openicon ) => {
icons . openicon = openicon ;
this . changeImgColor ( color1 , color2 , folderIcons [ iconID ] . closedicon , ( closedicon ) => {
icons . closedicon = closedicon ;
$ ( folderDiv ) . find ( BDFDB . dotCN . avataricon ) . css ( "background-image" , isOpen ? "url(\"" + icons . openicon + "\")" : "url(\"" + icons . closedicon + "\")" ) ;
BDFDB . saveData ( folderID , { folderID , folderName , position , iconID , icons , color1 , color2 , color3 , color4 , servers } , this , "folders" ) ;
} ) ;
} ) ;
}
else {
icons . openicon = folderIcons [ iconID ] . openicon ;
icons . closedicon = folderIcons [ iconID ] . closedicon ;
$ ( folderDiv ) . find ( BDFDB . dotCN . avataricon ) . css ( "background-image" , isOpen ? "url(\"" + icons . openicon + "\")" : "url(\"" + icons . closedicon + "\")" ) ;
BDFDB . saveData ( folderID , { folderID , folderName , position , iconID , icons , color1 , color2 , color3 , color4 , servers } , this , "folders" ) ;
}
}
else {
BDFDB . saveData ( folderID , { folderID , folderName , position , iconID , icons , color1 , color2 , color3 , color4 , servers } , this , "folders" ) ;
}
} ) ;
folderSettingsModal . find ( "#input-foldername" ) . focus ( ) ;
}
}
2018-10-22 20:47:47 +02:00
changeImgColor ( color1 , color2 , icon , callback ) {
color1 = BDFDB . color2COMP ( color1 ) ;
color2 = BDFDB . color2COMP ( color2 ) ;
if ( ! color1 || ! color2 || ! icon ) return ;
var img = new Image ( ) ;
img . src = icon ;
img . onload = ( ) => {
if ( icon . indexOf ( "data:image" ) == 0 && img . width < 200 && img . height < 200 ) {
var can = document . createElement ( "canvas" ) ;
can . width = img . width ;
can . height = img . height ;
var ctx = can . getContext ( "2d" ) ;
ctx . drawImage ( img , 0 , 0 ) ;
var imageData = ctx . getImageData ( 0 , 0 , img . width , img . height ) ;
var data = imageData . data ;
for ( var i = 0 ; i < data . length ; i += 4 ) {
if ( data [ i ] == 0 && data [ i + 1 ] == 0 && data [ i + 2 ] == 0 ) {
data [ i ] = color1 [ 0 ] ;
data [ i + 1 ] = color1 [ 1 ] ;
data [ i + 2 ] = color1 [ 2 ] ;
}
else if ( data [ i ] == 255 && data [ i + 1 ] == 255 && data [ i + 2 ] == 255 ) {
data [ i ] = color2 [ 0 ] ;
data [ i + 1 ] = color2 [ 1 ] ;
data [ i + 2 ] = color2 [ 2 ] ;
}
ctx . putImageData ( imageData , 0 , 0 ) ;
}
callback ( can . toDataURL ( "image/png" ) ) ;
}
else {
callback ( img . src ) ;
}
} ;
}
2018-12-13 16:48:35 +01:00
setIcons ( container , selection ) {
let wrapper = BDFDB . $ ( container ) . find ( ".icons:not('[iconsnr]')" ) . first ( ) ;
if ( ! wrapper . length ) return ;
wrapper . attr ( "iconsnr" , parseInt ( BDFDB . $ ( container ) . find ( ".icons[iconsnr]" ) . length + 1 ) ) . find ( ".ui-icon-picker-icon" ) . remove ( ) ;
2018-10-11 10:21:26 +02:00
2018-12-13 16:48:35 +01:00
let folderIcons = this . loadAllIcons ( ) ;
2018-10-11 10:21:26 +02:00
2018-12-13 16:48:35 +01:00
let icons =
` <div class=" ${ BDFDB . disCNS . flex + BDFDB . disCNS . flex2 + BDFDB . disCNS . horizontal + BDFDB . disCNS . horizontal2 + BDFDB . disCNS . directionrow + BDFDB . disCNS . justifystart + BDFDB . disCNS . alignstretch + BDFDB . disCNS . nowrap + BDFDB . disCN . margintop4 } " style="flex: 1 1 auto;">
2018-10-11 10:21:26 +02:00
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.alignstretch + BDFDB.disCN.wrap} ui-icon-picker-row" style = "flex: 1 1 auto; display: flex; flex-wrap: wrap; overflow: visible !important;" >
$ { Object . getOwnPropertyNames ( folderIcons ) . map ( id => ` <div class="ui-icon-picker-icon ${ folderIcons [ id ] . customID ? ' custom' : '' } " value=" ${ id } "><div class="ui-picker-inner" style="background-image: url( ${ folderIcons [ id ] . closedicon } );"></div> ${ folderIcons [ id ] . customID ? '<div value="' + id + '" class="' + BDFDB . disCN . hovercardbutton + '"></div>' : '' } </div> ` ) . join ( "" ) }
< / d i v >
< / d i v > ` ;
2018-12-13 16:48:35 +01:00
wrapper . append ( icons ) ;
2018-10-11 10:21:26 +02:00
if ( ! folderIcons [ selection ] ) {
selection = 0 ;
}
wrapper . find ( ` .ui-icon-picker-icon[value=" ${ selection } "] ` )
. addClass ( "selected" )
. css ( "background-color" , "grey" ) ;
wrapper
. off ( "click" ) . off ( "mouseenter" ) . off ( "mouseleave" )
. on ( "click" , ".ui-icon-picker-icon" , ( e ) => {
if ( e . target . classList . contains ( BDFDB . disCN . hovercardbutton ) ) return
wrapper . find ( ".ui-icon-picker-icon.selected" )
. removeClass ( "selected" )
. css ( "background-color" , "transparent" ) ;
$ ( e . currentTarget )
. addClass ( "selected" )
. css ( "background-color" , "grey" ) ;
} )
. on ( "click" , BDFDB . dotCN . hovercardbutton , ( e ) => {
BDFDB . removeData ( e . currentTarget . getAttribute ( "value" ) , this , "customicons" ) ;
e . currentTarget . parentElement . remove ( ) ;
BDFDB . showToast ( ` Custom Icon was deleted. ` , { type : "success" } ) ;
} )
. on ( "mouseenter" , ".ui-icon-picker-icon" , ( e ) => {
$ ( e . currentTarget ) . find ( ".ui-picker-inner" ) . css ( "background-image" , "url(" + folderIcons [ e . currentTarget . getAttribute ( "value" ) ] . openicon + ")" ) ;
} )
. on ( "mouseleave" , ".ui-icon-picker-icon" , ( e ) => {
$ ( e . currentTarget ) . find ( ".ui-picker-inner" ) . css ( "background-image" , "url(" + folderIcons [ e . currentTarget . getAttribute ( "value" ) ] . closedicon + ")" ) ;
} ) ;
}
loadAllIcons ( ) {
var icons = { } ;
this . folderIcons . forEach ( ( array , i ) => {
icons [ i ] = { "openicon" : array . openicon , "closedicon" : array . closedicon , "customID" : null } ;
} ) ;
Object . assign ( icons , BDFDB . loadAllData ( this , "customicons" ) ) ;
return icons ;
}
fetchCustomIcon ( modal , type ) {
var successFetchIcon ;
var url = modal . querySelector ( "input[type='text'][option='" + type + "']" ) . value ;
if ( url . indexOf ( "http" ) == 0 ) {
let request = require ( "request" ) ;
request ( url , ( error , response , result ) => {
if ( response ) {
var type = response . headers [ "content-type" ] ;
if ( type && type . indexOf ( "image" ) > - 1 ) {
successFetchIcon ( ) ;
return ;
}
}
BDFDB . showToast ( "Use a valid direct link to an image source. They usually end on something like .png, .jpg or .gif." , { type : "danger" } ) ;
} ) ;
}
else {
let fs = require ( "fs" )
if ( fs . existsSync ( url ) ) {
fs . readFile ( url , ( error , response ) => {
if ( ! error ) {
url = ` data:image/png;base64, ${ response . toString ( "base64" ) } ` ;
successFetchIcon ( ) ;
}
} ) ;
}
else {
BDFDB . showToast ( "Could not fetch file. Please make sure the file exists." , { type : "danger" } ) ;
}
}
successFetchIcon = ( ) => {
var iconpreview = modal . querySelector ( ".ui-icon-picker-icon.preview." + type ) ;
var iconpreviewinner = iconpreview . querySelector ( ".ui-picker-inner" ) ;
iconpreview . classList . remove ( "nopic" ) ;
iconpreview . url = url ;
iconpreviewinner . style . backgroundImage = "url(" + url + ")" ;
var iconpreviewopen = modal . querySelector ( ".ui-icon-picker-icon.preview.open" ) ;
var iconpreviewclosed = modal . querySelector ( ".ui-icon-picker-icon.preview.closed" ) ;
if ( ! iconpreviewopen . classList . contains ( "nopic" ) && ! iconpreviewclosed . classList . contains ( "nopic" ) ) {
var iconpreviewswitching = modal . querySelector ( ".ui-icon-picker-icon.preview.switching" ) ;
var iconpreviewopeninner = iconpreviewopen . querySelector ( ".ui-picker-inner" ) ;
var iconpreviewclosedinner = iconpreviewclosed . querySelector ( ".ui-picker-inner" ) ;
var iconpreviewswitchinginner = iconpreviewswitching . querySelector ( ".ui-picker-inner" ) ;
iconpreviewswitching . classList . remove ( "nopic" ) ;
iconpreviewswitchinginner . style . backgroundImage = iconpreviewopeninner . style . backgroundImage ;
var switching = true ;
iconpreviewswitching . switchInterval = setInterval ( ( ) => {
switching = ! switching ;
iconpreviewswitchinginner . style . backgroundImage = switching ? iconpreviewopeninner . style . backgroundImage : iconpreviewclosedinner . style . backgroundImage ;
} , 1000 ) ;
}
} ;
}
saveCustomIcon ( modal ) {
var iconpreviewopen = modal . querySelector ( ".ui-icon-picker-icon.preview.open" ) ;
var iconpreviewclosed = modal . querySelector ( ".ui-icon-picker-icon.preview.closed" ) ;
var iconpreviewswitching = modal . querySelector ( ".ui-icon-picker-icon.preview.switching" ) ;
if ( ! iconpreviewopen . classList . contains ( "nopic" ) && ! iconpreviewclosed . classList . contains ( "nopic" ) && ! iconpreviewswitching . classList . contains ( "nopic" ) ) {
var customID = this . generateID ( "customicon" , "customicons" ) ;
BDFDB . saveData ( customID , { "openicon" : iconpreviewopen . url , "closedicon" : iconpreviewclosed . url , customID } , this , "customicons" ) ;
modal . querySelectorAll ( "input[type='text'][option]" ) . forEach ( ( input ) => {
input . value = "" ;
} ) ;
var iconpreviewopeninner = iconpreviewopen . querySelector ( ".ui-picker-inner" ) ;
var iconpreviewclosedinner = iconpreviewclosed . querySelector ( ".ui-picker-inner" ) ;
var iconpreviewswitchinginner = iconpreviewswitching . querySelector ( ".ui-picker-inner" ) ;
iconpreviewopen . classList . add ( "nopic" ) ;
iconpreviewopeninner . style . backgroundImage = "" ;
iconpreviewclosed . classList . add ( "nopic" ) ;
iconpreviewclosedinner . style . backgroundImage = "" ;
iconpreviewswitching . classList . add ( "nopic" ) ;
iconpreviewswitchinginner . style . backgroundImage = "" ;
clearInterval ( iconpreviewswitching . switchInterval ) ;
BDFDB . showToast ( ` Custom Icon was added to selection. ` , { type : "success" } ) ;
2018-12-13 16:48:35 +01:00
this . setIcons ( modal , modal . querySelector ( ".ui-icon-picker-icon.selected" ) . getAttribute ( "value" ) ) ;
2018-10-11 10:21:26 +02:00
}
else {
BDFDB . showToast ( ` Add an image for the open and the closed icon. ` , { type : "danger" } ) ;
}
} ;
removeFolder ( folderDiv ) {
this . readIncludedServerList ( folderDiv ) . forEach ( ( serverObj ) => { $ ( serverObj . div ) . removeAttr ( "folder" ) . show ( ) ; } ) ;
BDFDB . removeData ( folderDiv . id , this , "folders" ) ;
this . closeFolderContent ( folderDiv ) ;
folderDiv . remove ( ) ;
this . updateFolderPositions ( ) ;
}
openCloseFolder ( folderDiv ) {
var data = BDFDB . loadData ( folderDiv . id , this , "folders" ) ;
if ( data ) {
var isOpen = folderDiv . classList . contains ( "open" ) ;
if ( ! isOpen ) {
var includedServers = this . readIncludedServerList ( folderDiv ) ;
if ( includedServers . length > 0 ) {
$ ( folderDiv )
. addClass ( "open" )
. removeClass ( "closed" ) ;
$ ( ".foldercontent.foldercontentclosed" ) . addClass ( "foldercontentopen" ) . removeClass ( "foldercontentclosed" ) ;
var containsguilds = document . querySelector ( ".foldercontent " + BDFDB . dotCN . guild ) ;
var settings = BDFDB . getAllData ( this , "settings" ) ;
setTimeout ( ( ) => {
if ( settings . addSeparators && containsguilds ) {
$ ( ` <div class=" ${ BDFDB . disCN . guildseparator } folderseparator" folder=" ${ folderDiv . id } "></div> ` ) . appendTo ( ".foldercontent " + BDFDB . dotCN . guilds ) ;
}
for ( var i = 0 ; i < includedServers . length ; i ++ ) {
this . updateCopyInFolderContent ( includedServers [ i ] , folderDiv ) ;
}
} , settings . closeOtherFolders && containsguilds ? 300 : 0 ) ;
}
else return ; // nothing to do when closed and empty
}
else {
this . closeFolderContent ( folderDiv ) ;
}
$ ( folderDiv ) . find ( BDFDB . dotCN . avataricon ) . css ( "background-image" , ! isOpen ? "url(\"" + data . icons . openicon + "\")" : "url(\"" + data . icons . closedicon + "\")" ) ;
}
}
closeFolderContent ( folderDiv ) {
$ ( folderDiv )
. removeClass ( "open" )
. addClass ( "closed" ) ;
let servers = $ ( ".foldercontent [folder='" + folderDiv . id + "']" ) ;
servers . removeAttr ( "folder" ) ;
var foldercontent = document . querySelector ( ".foldercontent" ) ;
if ( foldercontent && ! foldercontent . querySelector ( "[folder]" ) ) {
$ ( ".foldercontentopen" ) . removeClass ( "foldercontentopen" ) . addClass ( "foldercontentclosed" ) ;
setTimeout ( ( ) => {
var settings = BDFDB . getAllData ( this , "settings" ) ;
if ( settings . closeOtherFolders ) servers . remove ( ) ;
else if ( ! settings . closeOtherFolders && ! document . querySelector ( ".folder.open" ) ) servers . remove ( ) ;
} , 300 ) ;
}
else servers . remove ( ) ;
var firstchild = document . querySelector ( ".foldercontent " + BDFDB . dotCN . guilds ) . firstElementChild ;
if ( firstchild && firstchild . classList . contains ( "folderseparator" ) ) firstchild . remove ( ) ;
}
updateCopyInFolderContent ( serverObj , folderDiv ) {
if ( ! serverObj || ! serverObj . div ) return ;
var foldercontent = document . querySelector ( ".foldercontent " + BDFDB . dotCN . guilds ) ;
if ( foldercontent && folderDiv . classList . contains ( "open" ) ) {
var oldCopy = foldercontent . querySelector ( "[guild='" + serverObj . id + "']" ) ;
if ( oldCopy ) {
foldercontent . insertBefore ( this . createCopyOfServer ( serverObj , folderDiv ) , oldCopy ) ;
oldCopy . remove ( ) ;
}
else {
var sameFolderCopies = foldercontent . querySelectorAll ( "[folder='" + folderDiv . id + "']" ) ;
var insertNode = sameFolderCopies . length > 0 ? sameFolderCopies [ sameFolderCopies . length - 1 ] . nextSibling : null ;
foldercontent . insertBefore ( this . createCopyOfServer ( serverObj , folderDiv ) , insertNode ) ;
}
}
}
createCopyOfServer ( serverObj , folderDiv ) {
var serverDiv = serverObj . div ;
var foldercontent = document . querySelector ( ".foldercontent " + BDFDB . dotCN . guilds ) ;
var serverCopy = serverDiv . cloneNode ( true ) ;
$ ( serverCopy )
. attr ( "guild" , serverObj . id )
. addClass ( "copy" )
. css ( "display" , "" )
. on ( "mouseenter." + this . getName ( ) , ( e ) => { this . createServerToolTip ( serverObj , serverCopy , e ) ; } )
. on ( "click." + this . getName ( ) , ( e ) => {
e . preventDefault ( ) ;
if ( BDFDB . pressedKeys . includes ( 46 ) ) {
this . removeServerFromFolder ( serverObj , folderDiv ) ;
}
else {
var settings = BDFDB . getAllData ( this , "settings" ) ;
if ( settings . closeAllFolders ) {
document . querySelectorAll ( ".folder.open" ) . forEach ( openFolder => {
this . openCloseFolder ( openFolder ) ;
} ) ;
}
else if ( settings . closeTheFolder ) {
this . openCloseFolder ( folderDiv ) ;
}
serverDiv . querySelector ( "a" ) . click ( ) ;
}
} )
. on ( "contextmenu." + this . getName ( ) , ( e ) => {
var handleContextMenu = BDFDB . getKeyInformation ( { "node" : serverDiv . firstElementChild , "key" : "handleContextMenu" } ) ;
if ( handleContextMenu ) {
var data = {
preventDefault : a => a ,
stopPropagation : a => a ,
pageX : e . pageX ,
pageY : e . pageY ,
} ;
handleContextMenu ( data ) ;
}
} )
. on ( "mousedown." + this . getName ( ) , ( e ) => {
var mouseTimeout = null ;
var guilddragpreview = serverDiv . cloneNode ( true ) ;
var hoveredCopy = null ;
var placeholder = $ ( ` <div class=" ${ BDFDB . disCNS . guild + BDFDB . disCN . guildplaceholder } copy copyplaceholder"></div> ` ) [ 0 ] ;
$ ( guilddragpreview )
. appendTo ( BDFDB . dotCN . appmount )
. addClass ( "guilddragpreview" )
. offset ( { "left" : e . clientX + 5 , "top" : e . clientY + 5 } ) ;
$ ( document )
. off ( "mouseup." + this . getName ( ) )
. on ( "mouseup." + this . getName ( ) , ( e2 ) => {
clearTimeout ( mouseTimeout ) ;
placeholder . remove ( ) ;
guilddragpreview . remove ( ) ;
$ ( serverCopy ) . css ( "display" , "" ) ;
var newFolderDiv = this . getParentObject ( e2 . target , "folder" ) . div ;
if ( newFolderDiv && newFolderDiv != folderDiv ) {
this . removeServerFromFolder ( serverObj , folderDiv ) ;
this . addServerToFolder ( serverObj , newFolderDiv ) ;
}
else {
if ( hoveredCopy ) {
foldercontent . insertBefore ( serverCopy , hoveredCopy . nextSibling ) ;
this . updateServerPositions ( folderDiv ) ;
}
}
$ ( document ) . off ( "mouseup." + this . getName ( ) ) . off ( "mousemove." + this . getName ( ) ) ;
} ) ;
mouseTimeout = setTimeout ( ( ) => {
$ ( document )
. off ( "mousemove." + this . getName ( ) )
. on ( "mousemove." + this . getName ( ) , ( e2 ) => {
placeholder . remove ( ) ;
$ ( serverCopy ) . hide ( ) ;
$ ( guilddragpreview )
. show ( )
. offset ( { "left" : e2 . clientX + 5 , "top" : e2 . clientY + 5 } ) ;
if ( foldercontent . contains ( e2 . target ) ) {
hoveredCopy = e2 . target . classList && e2 . target . classList . contains ( "folderseparator" ) ? e2 . target : this . getParentObject ( e2 . target , "copy" ) . div ;
if ( hoveredCopy && hoveredCopy . getAttribute ( "folder" ) == folderDiv . id ) {
foldercontent . insertBefore ( placeholder , hoveredCopy . nextSibling ) ;
}
else hoveredCopy = null ;
}
} ) ;
} , 100 ) ;
2018-12-07 14:17:43 +01:00
} ) ;
let copyinner = serverCopy . querySelector ( BDFDB . dotCN . guildinner ) ;
let isselected = serverCopy . classList . contains ( BDFDB . disCN . guildselected ) ;
let hasicon = ! serverCopy . querySelector ( BDFDB . dotCN . guildicon ) . classList . contains ( BDFDB . disCN . avatarnoicon ) ;
copyinner . style . setProperty ( "border-radius" , isselected ? "15px" : "25px" ) ;
copyinner . style . setProperty ( "background-color" , hasicon ? null : BDFDB . color2RGB ( this . DiscordConstants . Colors [ isselected ? "BRAND_PURPLE" : "CHANNELS_GREY" ] ) ) ;
2018-12-07 13:16:18 +01:00
this . addHoverBehaviour ( serverCopy ) ;
2018-10-11 10:21:26 +02:00
return serverCopy ;
}
2018-12-07 13:16:18 +01:00
addHoverBehaviour ( div ) {
/* based on stuff from Zerebos */
let divinner = div . querySelector ( BDFDB . dotCN . guildinner ) ;
let divicon = div . querySelector ( BDFDB . dotCN . guildicon ) ;
let backgroundColor = new this . Animations . Value ( 0 ) ;
backgroundColor
. interpolate ( {
inputRange : [ 0 , 1 ] ,
outputRange : [ this . DiscordConstants . Colors . CHANNELS _GREY , this . DiscordConstants . Colors . BRAND _PURPLE ]
} )
. addListener ( ( value ) => {
if ( divicon . classList . contains ( BDFDB . disCN . avatarnoicon ) ) {
let comp = BDFDB . color2COMP ( value . value . replace ( "a" , "" ) ) ;
divinner . style . setProperty ( "background-color" , ` rgb( ${ comp [ 0 ] } , ${ comp [ 1 ] } , ${ comp [ 2 ] } ) ` ) ;
}
} ) ;
let borderRadius = new this . Animations . Value ( 0 ) ;
borderRadius
. interpolate ( {
inputRange : [ 0 , 1 ] ,
outputRange : [ 25 , 15 ]
} )
. addListener ( ( value ) => {
divinner . style . setProperty ( "border-radius" , ` ${ value . value } px ` ) ;
} ) ;
let animate = ( v ) => {
this . Animations . parallel ( [
this . Animations . timing ( backgroundColor , { toValue : v , duration : 200 } ) ,
this . Animations . spring ( borderRadius , { toValue : v , friction : 3 } )
] ) . start ( ) ;
} ;
$ ( div )
2018-12-07 14:17:43 +01:00
. on ( "mouseenter" , ( ) => { animate ( 1 ) ; } )
. on ( "mouseleave" , ( ) => { if ( ! div . classList . contains ( BDFDB . disCN . guildselected ) ) animate ( 0 ) ; } ) ;
2018-12-07 13:16:18 +01:00
}
2018-10-11 10:21:26 +02:00
updateFolderPositions ( ) {
var serverAndFolders = document . querySelectorAll ( "div" + BDFDB . dotCN . guildseparator + ":not(.folderseparator) ~ div" + BDFDB . dotCN . guild ) ;
for ( let i = 0 ; i < serverAndFolders . length ; i ++ ) {
var folderDiv = this . getParentObject ( serverAndFolders [ i ] , "folder" ) . div ;
if ( folderDiv ) {
var folderID = folderDiv . id ;
var data = BDFDB . loadData ( folderID , this , "folders" ) ;
if ( data ) {
data . position = i ;
BDFDB . saveData ( folderID , data , this , "folders" ) ;
}
}
}
}
updateServerPositions ( folderDiv ) {
var data = BDFDB . loadData ( folderDiv . id , this , "folders" ) ;
if ( data ) {
var serversInData = data . servers ;
var serversInFolder = Array . from ( document . querySelectorAll ( ".foldercontent .copy[folder='" + folderDiv . id + "']" ) ) . map ( server => { return server . getAttribute ( "guild" ) ; } ) ;
for ( var i = 0 ; i < serversInFolder . length ; i ++ ) {
BDFDB . removeFromArray ( serversInData , serversInFolder [ i ] ) ;
}
data . servers = serversInFolder . concat ( serversInData ) ;
BDFDB . saveData ( folderDiv . id , data , this , "folders" ) ;
}
}
updateFolderNotifications ( folderDiv ) {
var data = BDFDB . loadData ( folderDiv . id , this , "folders" ) ;
if ( data ) {
var includedServers = this . readIncludedServerList ( folderDiv ) ;
var unreadServers = BDFDB . readUnreadServerList ( includedServers ) ;
if ( unreadServers . length > 0 && data . autounread ) {
BDFDB . clearReadNotifications ( unreadServers ) ;
}
else {
var badgeAmount = 0 ;
var audioEnabled = false ;
var videoEnabled = false ;
includedServers . forEach ( ( serverObj ) => {
let badge = serverObj . div . querySelector ( BDFDB . dotCN . badge ) ;
if ( badge ) badgeAmount += parseInt ( badge . innerText ) ;
if ( serverObj . div . classList . contains ( BDFDB . disCN . guildaudio ) ) audioEnabled = true ;
if ( serverObj . div . classList . contains ( BDFDB . disCN . guildvideo ) ) videoEnabled = true ;
} ) ;
$ ( folderDiv )
. toggleClass ( BDFDB . disCN . guildunread , unreadServers . length > 0 )
. toggleClass ( BDFDB . disCN . guildaudio , audioEnabled )
. toggleClass ( BDFDB . disCN . guildvideo , videoEnabled ) ;
$ ( folderDiv )
. find ( ".folder" + BDFDB . dotCN . badge + ".notifications" )
. toggle ( badgeAmount > 0 )
. text ( badgeAmount ) ;
$ ( folderDiv )
. find ( ".folder" + BDFDB . dotCN . badge + ".count" )
. toggle ( includedServers . length > 0 && BDFDB . getData ( "showCountBadge" , this , "settings" ) )
. text ( includedServers . length ) ;
if ( folderDiv . classList . contains ( "open" ) && ! document . querySelector ( ".foldercontent [folder='" + folderDiv . id + "']" ) ) this . openCloseFolder ( folderDiv ) ;
}
}
}
getParentObject ( div , type ) {
if ( ! div ) return { div : null } ;
if ( document . querySelector ( BDFDB . dotCN . dms ) && document . querySelector ( BDFDB . dotCN . dms ) . contains ( div ) ) return { div : null } ;
if ( div . tagName && div . querySelector ( BDFDB . dotCN . guildserror ) ) return { div : null } ;
if ( div . classList && div . classList . length > 0 && ( div . classList . contains ( BDFDB . disCN . guilds ) || div . classList . contains ( "guilddragpreview" ) ) ) return { div : null } ;
if ( div . classList && div . classList . length > 0 && div . classList . contains ( BDFDB . disCN . guild ) && div . classList . contains ( type ) && div . querySelector ( BDFDB . dotCN . avataricon ) ) {
if ( type == BDFDB . disCN . guild ) {
var info = BDFDB . getKeyInformation ( { "node" : div , "key" : "guild" } ) ;
if ( info ) return Object . assign ( { } , info , { div : div , data : info } ) ;
}
else {
return { div } ;
}
}
return this . getParentObject ( div . parentElement , type ) ;
}
getFolderOfServer ( serverObj ) {
if ( ! serverObj ) return ;
var folders = BDFDB . loadAllData ( this , "folders" ) ;
for ( var id in folders ) {
var serverIDs = folders [ id ] . servers ;
for ( var i = 0 ; serverIDs . length > i ; i ++ ) {
if ( serverIDs [ i ] == serverObj . id ) return document . querySelector ( "#" + folders [ id ] . folderID ) ;
}
}
return null ;
}
readIncludedServerList ( folderDiv ) {
var data = BDFDB . loadData ( folderDiv . id , this , "folders" ) ;
var includedServers = [ ] ;
if ( data ) {
var serverIDs = data . servers ;
for ( var i = 0 ; serverIDs . length > i ; i ++ ) {
var serverObj = BDFDB . getDivOfServer ( serverIDs [ i ] ) ;
if ( serverObj && serverObj . div ) includedServers . push ( serverObj ) ;
}
}
return includedServers ;
}
setLabelsByLanguage ( ) {
switch ( BDFDB . getDiscordLanguage ( ) . id ) {
case "hr" : //croatian
return {
toast _addserver _text : "${servername} je dodan u mapu${foldername}." ,
toast _removeserver _text : "${servername} je uklonjena iz mape${foldername}." ,
servercontext _serverfolders _text : "Poslužitelj mapu" ,
serversubmenu _createfolder _text : "Izradi mapu" ,
serversubmenu _removefromfolder _text : "Ukloni poslužitelj iz mape" ,
foldercontext _unreadfolder _text : "Označi sve kao pročitano" ,
foldercontext _autounreadfolder _text : "Auto: Označite kao pročitano" ,
foldercontext _foldersettings _text : "Postavke map" ,
foldercontext _removefolder _text : "Izbriši mapu" ,
modal _header _text : "Postavke mapa" ,
modal _foldername _text : "Naziv mape" ,
modal _tabheader1 _text : "Mape" ,
modal _tabheader2 _text : "Boja mape" ,
modal _tabheader3 _text : "Boja tooltip" ,
modal _tabheader4 _text : "Prilagođeni ikona" ,
modal _iconpicker _text : "Odabir mape" ,
modal _colorpicker1 _text : "Boja primarne mape" ,
modal _colorpicker2 _text : "Boja sekundarne mape" ,
modal _colorpicker3 _text : "Boja tooltip" ,
modal _colorpicker4 _text : "Boja fonta" ,
modal _customopen _text : "Otvori ikona" ,
modal _customclosed _text : "Zatvorena ikona" ,
modal _custompreview _text : "Pregled ikona" ,
btn _cancel _text : "Prekid" ,
btn _save _text : "Uštedjeti"
} ;
case "da" : //danish
return {
toast _addserver _text : "${servername} er blevet tilføjet til mappe${foldername}." ,
toast _removeserver _text : "${servername} er blevet fjernet fra mappen${foldername}." ,
servercontext _serverfolders _text : "Servermapper" ,
serversubmenu _createfolder _text : "Opret mappe" ,
serversubmenu _removefromfolder _text : "Fjern server fra mappe" ,
foldercontext _unreadfolder _text : "Markér alle som læst" ,
foldercontext _autounreadfolder _text : "Auto: Markér som læst" ,
foldercontext _foldersettings _text : "Mappeindstillinger" ,
foldercontext _removefolder _text : "Slet mappe" ,
modal _header _text : "Mappindstillinger" ,
modal _foldername _text : "Mappenavn" ,
modal _tabheader1 _text : "Mappe" ,
modal _tabheader2 _text : "Mappefarve" ,
modal _tabheader3 _text : "Tooltipfarve" ,
modal _tabheader4 _text : "Brugerdefinerede ikoner" ,
modal _iconpicker _text : "Mappevalg" ,
modal _colorpicker1 _text : "Primær mappefarve" ,
modal _colorpicker2 _text : "Sekundær mappefarve" ,
modal _colorpicker3 _text : "Tooltipfarve" ,
modal _colorpicker4 _text : "Skriftfarve" ,
modal _customopen _text : "Åbn ikon" ,
modal _customclosed _text : "Lukket ikon" ,
modal _custompreview _text : "Ikon forhåndsvisning" ,
btn _cancel _text : "Afbryde" ,
btn _save _text : "Spare"
} ;
case "de" : //german
return {
toast _addserver _text : "${servername} wurde dem Ordner${foldername} hinzugefügt." ,
toast _removeserver _text : "${servername} wurde aus dem Ordner${foldername} entfernt." ,
servercontext _serverfolders _text : "Serverordner" ,
serversubmenu _createfolder _text : "Ordner erzeugen" ,
serversubmenu _removefromfolder _text : "Server aus Ordner entfernen" ,
foldercontext _unreadfolder _text : "Alle als gelesen markieren" ,
foldercontext _autounreadfolder _text : "Auto: Als gelesen markieren" ,
foldercontext _foldersettings _text : "Ordnereinstellungen" ,
foldercontext _removefolder _text : "Ordner löschen" ,
modal _header _text : "Ordnereinstellungen" ,
modal _foldername _text : "Ordnername" ,
modal _tabheader1 _text : "Ordner" ,
modal _tabheader2 _text : "Ordnerfarbe" ,
modal _tabheader3 _text : "Tooltipfarbe" ,
modal _tabheader4 _text : "Eigene Icons" ,
modal _iconpicker _text : "Ordnerauswahl" ,
modal _colorpicker1 _text : "Primäre Ordnerfarbe" ,
modal _colorpicker2 _text : "Sekundäre Ordnerfarbe" ,
modal _colorpicker3 _text : "Tooltipfarbe" ,
modal _colorpicker4 _text : "Schriftfarbe" ,
modal _customopen _text : "Geöffnetes Icon" ,
modal _customclosed _text : "Geschlossenes Icon" ,
modal _custompreview _text : "Iconvorschau" ,
btn _cancel _text : "Abbrechen" ,
btn _save _text : "Speichern"
} ;
case "es" : //spanish
return {
toast _addserver _text : "${servername} ha sido agregado a la carpeta${foldername}." ,
toast _removeserver _text : "${servername} ha sido eliminado de la carpeta${foldername}." ,
servercontext _serverfolders _text : "Carpetas de servidor" ,
serversubmenu _createfolder _text : "Crear carpeta" ,
serversubmenu _removefromfolder _text : "Eliminar servidor de la carpeta" ,
foldercontext _unreadfolder _text : "Marcar todo como leido" ,
foldercontext _autounreadfolder _text : "Auto: Marcar como leído" ,
foldercontext _foldersettings _text : "Ajustes de carpeta" ,
foldercontext _removefolder _text : "Eliminar carpeta" ,
modal _header _text : "Ajustes de carpeta" ,
modal _foldername _text : "Nombre de la carpeta" ,
modal _tabheader1 _text : "Carpeta" ,
modal _tabheader2 _text : "Color de carpeta" ,
modal _tabheader3 _text : "Color de tooltip" ,
modal _tabheader4 _text : "Iconos personalizados" ,
modal _iconpicker _text : "Selección de carpeta" ,
modal _colorpicker1 _text : "Color primaria de carpeta" ,
modal _colorpicker2 _text : "Color secundario de la carpeta" ,
modal _colorpicker3 _text : "Color de tooltip" ,
modal _colorpicker4 _text : "Color de fuente" ,
modal _customopen _text : "Ícono abierto" ,
modal _customclosed _text : "Icono cerrado" ,
modal _custompreview _text : "Vista previa del icono" ,
btn _cancel _text : "Cancelar" ,
btn _save _text : "Guardar"
} ;
case "fr" : //french
return {
toast _addserver _text : "${servername} a été ajouté au dossier${foldername}." ,
toast _removeserver _text : "${servername} a été supprimé du dossier${foldername}." ,
servercontext _serverfolders _text : "Dossiers du serveur" ,
serversubmenu _createfolder _text : "Créer le dossier" ,
serversubmenu _removefromfolder _text : "Supprimer le serveur du dossier" ,
foldercontext _unreadfolder _text : "Tout marquer comme lu" ,
foldercontext _autounreadfolder _text : "Auto: Marquer comme lu" ,
foldercontext _foldersettings _text : "Paramètres du dossier" ,
foldercontext _removefolder _text : "Supprimer le dossier" ,
modal _header _text : "Paramètres du dossier" ,
modal _foldername _text : "Nom de dossier" ,
modal _tabheader1 _text : "Dossier" ,
modal _tabheader2 _text : "Couleur du dossier" ,
modal _tabheader3 _text : "Couleur de tooltip" ,
modal _tabheader4 _text : "Icônes personnalisées" ,
modal _iconpicker _text : "Choix du dossier" ,
modal _colorpicker1 _text : "Couleur primaire du dossier" ,
modal _colorpicker2 _text : "Couleur secondaire du dossier" ,
modal _colorpicker3 _text : "Couleur de tooltip" ,
modal _colorpicker4 _text : "Couleur de la police" ,
modal _customopen _text : "Icône ouverte" ,
modal _customclosed _text : "Icône fermée" ,
modal _custompreview _text : "Aperçu de l'icône" ,
btn _cancel _text : "Abandonner" ,
btn _save _text : "Enregistrer"
} ;
case "it" : //italian
return {
toast _addserver _text : "${servername} è stato aggiunto alla cartella${foldername}." ,
toast _removeserver _text : "${servername} è stato rimosso dalla cartella${foldername}." ,
servercontext _serverfolders _text : "Cartelle del server" ,
serversubmenu _createfolder _text : "Creare una cartella" ,
serversubmenu _removefromfolder _text : "Rimuovere il server dalla cartella" ,
foldercontext _unreadfolder _text : "Segna tutti come letti" ,
foldercontext _autounreadfolder _text : "Auto: Contrassegna come letto" ,
foldercontext _foldersettings _text : "Impostazioni cartella" ,
foldercontext _removefolder _text : "Elimina cartella" ,
modal _header _text : "Impostazioni cartella" ,
modal _foldername _text : "Nome della cartella" ,
modal _tabheader1 _text : "Cartella" ,
modal _tabheader2 _text : "Colore della cartella" ,
modal _tabheader3 _text : "Colore della tooltip" ,
modal _tabheader4 _text : "Icone personalizzate" ,
modal _iconpicker _text : "Selezione della cartella" ,
modal _colorpicker1 _text : "Colore primaria della cartella" ,
modal _colorpicker2 _text : "Colore secondaria della cartella" ,
modal _colorpicker3 _text : "Colore della tooltip" ,
modal _colorpicker4 _text : "Colore del carattere" ,
modal _customopen _text : "Icona aperta" ,
modal _customclosed _text : "Icona chiusa" ,
modal _custompreview _text : "Icona anteprima" ,
btn _cancel _text : "Cancellare" ,
btn _save _text : "Salvare"
} ;
case "nl" : //dutch
return {
toast _addserver _text : "${servername} is toegevoegd aan de map${foldername}." ,
toast _removeserver _text : "${servername} is verwijderd uit de map${foldername}." ,
servercontext _serverfolders _text : "Servermappen" ,
serversubmenu _createfolder _text : "Map aanmaken" ,
serversubmenu _removefromfolder _text : "Server uit map verwijderen" ,
foldercontext _unreadfolder _text : "Alles als gelezen markeren" ,
foldercontext _autounreadfolder _text : "Auto: Markeren als gelezen" ,
foldercontext _foldersettings _text : "Mapinstellingen" ,
foldercontext _removefolder _text : "Verwijder map" ,
modal _header _text : "Mapinstellingen" ,
modal _foldername _text : "Mapnaam" ,
modal _tabheader1 _text : "Map" ,
modal _tabheader2 _text : "Mapkleur" ,
modal _tabheader3 _text : "Tooltipkleur" ,
modal _tabheader4 _text : "Aangepaste keuze" ,
modal _iconpicker _text : "Map keuze" ,
modal _colorpicker1 _text : "Primaire mapkleur" ,
modal _colorpicker2 _text : "Tweede mapkleur" ,
modal _colorpicker3 _text : "Tooltipkleur" ,
modal _colorpicker4 _text : "Doopvontkleur" ,
modal _customopen _text : "Geopende keuze" ,
modal _customclosed _text : "Gesloten keuze" ,
modal _custompreview _text : "Voorbeeld van keuze" ,
btn _cancel _text : "Afbreken" ,
btn _save _text : "Opslaan"
} ;
case "no" : //norwegian
return {
toast _addserver _text : "${servername} er lagt til i mappe${foldername}." ,
toast _removeserver _text : "${servername} er fjernet fra mappen${foldername}." ,
servercontext _serverfolders _text : "Servermapper" ,
serversubmenu _createfolder _text : "Lag mappe" ,
serversubmenu _removefromfolder _text : "Fjern server fra mappe" ,
foldercontext _unreadfolder _text : "Marker alle som lest" ,
foldercontext _autounreadfolder _text : "Auto: Merk som les" ,
foldercontext _foldersettings _text : "Mappinnstillinger" ,
foldercontext _removefolder _text : "Slett mappe" ,
modal _header _text : "Mappinnstillinger" ,
modal _foldername _text : "Mappenavn" ,
modal _tabheader1 _text : "Mappe" ,
modal _tabheader2 _text : "Mappefarge" ,
modal _tabheader3 _text : "Tooltipfarge" ,
modal _tabheader4 _text : "Tilpassede ikoner" ,
modal _iconpicker _text : "Mappevalg" ,
modal _colorpicker1 _text : "Primær mappefarge" ,
modal _colorpicker2 _text : "Sekundær mappefarge" ,
modal _colorpicker3 _text : "Tooltipfarge" ,
modal _colorpicker4 _text : "Skriftfarge" ,
modal _customopen _text : "Åpnet ikon" ,
modal _customclosed _text : "Lukket ikon" ,
modal _custompreview _text : "Ikon forhåndsvisning" ,
btn _cancel _text : "Avbryte" ,
btn _save _text : "Lagre"
} ;
case "pl" : //polish
return {
toast _addserver _text : "${servername} został dodany do folderu${foldername}." ,
toast _removeserver _text : "${servername} został usunięty z folderu${foldername}." ,
servercontext _serverfolders _text : "Foldery serwera" ,
serversubmenu _createfolder _text : "Utwórz folder" ,
serversubmenu _removefromfolder _text : "Usuń serwer z folderu" ,
foldercontext _unreadfolder _text : "Oznacz wszystkie jako przeczytane" ,
foldercontext _autounreadfolder _text : "Auto: Oznacz jako przeczytane" ,
foldercontext _foldersettings _text : "Ustawienia folderu" ,
foldercontext _removefolder _text : "Usuń folder" ,
modal _header _text : "Ustawienia folderu" ,
modal _foldername _text : "Nazwa folderu" ,
modal _tabheader1 _text : "Folder" ,
modal _tabheader2 _text : "Kolor folderu" ,
modal _tabheader3 _text : "Kolor podpowiedzi" ,
modal _tabheader4 _text : "Niestandardowe ikony" ,
modal _iconpicker _text : "Wybór folderu" ,
modal _colorpicker1 _text : "Podstawowy kolor folderu" ,
modal _colorpicker2 _text : "Drugorzędny kolor folderu" ,
modal _colorpicker3 _text : "Kolor podpowiedzi" ,
modal _colorpicker4 _text : "Kolor czcionki" ,
modal _customopen _text : "Otwarta ikona" ,
modal _customclosed _text : "Zamknięta ikona" ,
modal _custompreview _text : "Podgląd ikony" ,
btn _cancel _text : "Anuluj" ,
btn _save _text : "Zapisz"
} ;
case "pt-BR" : //portuguese (brazil)
return {
toast _addserver _text : "${servername} foi adicionado à pasta${foldername}." ,
toast _removeserver _text : "${servername} foi removido da pasta${foldername}." ,
servercontext _serverfolders _text : "Pastas de servidores" ,
serversubmenu _createfolder _text : "Criar pasta" ,
serversubmenu _removefromfolder _text : "Remover servidor da pasta" ,
foldercontext _unreadfolder _text : "Marcar tudo como lido" ,
foldercontext _autounreadfolder _text : "Auto: Marcar como lido" ,
foldercontext _foldersettings _text : "Configurações da pasta" ,
foldercontext _removefolder _text : "Excluir pasta" ,
modal _header _text : "Configurações da pasta" ,
modal _foldername _text : "Nome da pasta" ,
modal _tabheader1 _text : "Pasta" ,
modal _tabheader2 _text : "Cor da pasta" ,
modal _tabheader3 _text : "Cor da tooltip" ,
modal _tabheader4 _text : "Ícones personalizados" ,
modal _iconpicker _text : "Escolha da pasta" ,
modal _colorpicker1 _text : "Cor primária da pasta" ,
modal _colorpicker2 _text : "Cor secundária da pasta" ,
modal _colorpicker3 _text : "Cor da tooltip" ,
modal _colorpicker4 _text : "Cor da fonte" ,
modal _customopen _text : "Ícone aberto" ,
modal _customclosed _text : "Ícone fechado" ,
modal _custompreview _text : "Pré-visualização de ícones" ,
btn _cancel _text : "Cancelar" ,
btn _save _text : "Salvar"
} ;
case "fi" : //finnish
return {
toast _addserver _text : "${servername} on lisätty kansioon${foldername}." ,
toast _removeserver _text : "${servername} on poistettu kansioon${foldername}." ,
servercontext _serverfolders _text : "Palvelinkansiot" ,
serversubmenu _createfolder _text : "Luo kansio" ,
serversubmenu _removefromfolder _text : "Poista palvelin kansioista" ,
foldercontext _unreadfolder _text : "Merkitse kaikki luetuksi" ,
foldercontext _autounreadfolder _text : "Auto: merkitse luettavaksi" ,
foldercontext _foldersettings _text : "Kansion kansio" ,
foldercontext _removefolder _text : "Poista kansio" ,
modal _header _text : "Kansion kansio" ,
modal _foldername _text : "Kansion nimi" ,
modal _tabheader1 _text : "Kansio" ,
modal _tabheader2 _text : "Kansionväri" ,
modal _tabheader3 _text : "Tooltipväri" ,
modal _tabheader4 _text : "Mukautetut kuvakkeet" ,
modal _iconpicker _text : "Kansion valinta" ,
modal _colorpicker1 _text : "Ensisijainen kansionväri" ,
modal _colorpicker2 _text : "Toissijainen kansionväri" ,
modal _colorpicker3 _text : "Tooltipväri" ,
modal _colorpicker4 _text : "Fontinväri" ,
modal _customopen _text : "Avattu kuvake" ,
modal _customclosed _text : "Suljettu kuvake" ,
modal _custompreview _text : "Kuvakkeen esikatselu" ,
btn _cancel _text : "Peruuttaa" ,
btn _save _text : "Tallentaa"
} ;
case "sv" : //swedish
return {
toast _addserver _text : "${servername} har lagts till i mapp${foldername}." ,
toast _removeserver _text : "${servername} har tagits bort från mappen${foldername}." ,
servercontext _serverfolders _text : "Servermappar" ,
serversubmenu _createfolder _text : "Skapa mapp" ,
serversubmenu _removefromfolder _text : "Ta bort servern från mappen" ,
foldercontext _unreadfolder _text : "Markera allt som läst" ,
foldercontext _autounreadfolder _text : "Auto: Markera som Läs" ,
foldercontext _foldersettings _text : "Mappinställningar" ,
foldercontext _removefolder _text : "Ta bort mapp" ,
modal _header _text : "Mappinställningar" ,
modal _foldername _text : "Mappnamn" ,
modal _tabheader1 _text : "Mapp" ,
modal _tabheader2 _text : "Mappfärg" ,
modal _tabheader3 _text : "Tooltipfärg" ,
modal _tabheader4 _text : "Anpassade ikoner" ,
modal _iconpicker _text : "Mappval" ,
modal _colorpicker1 _text : "Primär mappfärg" ,
modal _colorpicker2 _text : "Sekundär mappfärg" ,
modal _colorpicker3 _text : "Tooltipfärg" ,
modal _colorpicker4 _text : "Fontfärg" ,
modal _customopen _text : "Öppnad ikon" ,
modal _customclosed _text : "Closed Icon" ,
modal _custompreview _text : "Ikon förhandsvisning" ,
btn _cancel _text : "Avbryta" ,
btn _save _text : "Spara"
} ;
case "tr" : //turkish
return {
toast _addserver _text : "${servername} klasörü${foldername} eklendi." ,
toast _removeserver _text : "${servername} klasörü${foldername} kaldı rı ldı " ,
servercontext _serverfolders _text : "Sunucu klasörleri" ,
serversubmenu _createfolder _text : "Klasör oluşturun" ,
serversubmenu _removefromfolder _text : "Sunucuyu klasörden kaldı r" ,
foldercontext _unreadfolder _text : "Tümünü Oku olarak işaretle" ,
foldercontext _autounreadfolder _text : "Oto: Okundu Olarak İşaretle" ,
foldercontext _foldersettings _text : "Klasör Ayarları " ,
foldercontext _removefolder _text : "Klasörü sil" ,
modal _header _text : "Klasör Ayarları " ,
modal _foldername _text : "Klasör adı " ,
modal _tabheader1 _text : "Klasör" ,
modal _tabheader2 _text : "Klasör rengi" ,
modal _tabheader3 _text : "Tooltip rengi" ,
modal _tabheader4 _text : "Özel simgeler" ,
modal _iconpicker _text : "Klasör seçimi" ,
modal _colorpicker1 _text : "Birincil klasör rengi" ,
modal _colorpicker2 _text : "İkincil klasör rengi" ,
modal _colorpicker3 _text : "Tooltip rengi" ,
modal _colorpicker4 _text : "Yazı rengi" ,
modal _customopen _text : "Açı lmı ş simge" ,
modal _customclosed _text : "Kapalı simge" ,
modal _custompreview _text : "Simge önizleme" ,
btn _cancel _text : "Iptal" ,
btn _save _text : "Kayı t"
} ;
case "cs" : //czech
return {
toast _addserver _text : "${servername} byl přidán do složky${foldername}." ,
toast _removeserver _text : "${servername} byl odstraněn ze složky${foldername}." ,
servercontext _serverfolders _text : "Složky serveru" ,
serversubmenu _createfolder _text : "Vytvořit složky" ,
serversubmenu _removefromfolder _text : "Odstranit server ze složky" ,
foldercontext _unreadfolder _text : "Označit vše jako přečtené" ,
foldercontext _autounreadfolder _text : "Auto: Označit jako přečtené" ,
foldercontext _foldersettings _text : "Nastavení složky" ,
foldercontext _removefolder _text : "Smazat složky" ,
modal _header _text : "Nastavení složky" ,
modal _foldername _text : "Název složky" ,
modal _tabheader1 _text : "Složky" ,
modal _tabheader2 _text : "Barva složky" ,
modal _tabheader3 _text : "Barva tooltip" ,
modal _tabheader4 _text : "Vlastní ikony" ,
modal _iconpicker _text : "Volba složky" ,
modal _colorpicker1 _text : "Primární barva složky" ,
modal _colorpicker2 _text : "Sekundární barva složky" ,
modal _colorpicker3 _text : "Barva tooltip" ,
modal _colorpicker4 _text : "Barva fontu" ,
modal _customopen _text : "Otevřená ikona" ,
modal _customclosed _text : "Uzavřená ikona" ,
modal _custompreview _text : "Náhled ikony" ,
btn _cancel _text : "Zrušení" ,
btn _save _text : "Uložit"
} ;
case "bg" : //bulgarian
return {
toast _addserver _text : "${servername} е добавен към папката${foldername}." ,
toast _removeserver _text : "${servername} е премахнат от папката${foldername}." ,
servercontext _serverfolders _text : "Сървърни папки" ,
serversubmenu _createfolder _text : "Създай папка" ,
serversubmenu _removefromfolder _text : "Премахване на сървър от папка" ,
foldercontext _unreadfolder _text : "Маркирай всички като прочетени" ,
foldercontext _autounreadfolder _text : "Авто: Маркиране като четене" ,
foldercontext _foldersettings _text : "Настройки папка" ,
foldercontext _removefolder _text : "Изтриване на папка" ,
modal _header _text : "Настройки папка" ,
modal _foldername _text : "Име на папка" ,
modal _tabheader1 _text : "Папка" ,
modal _tabheader2 _text : "Цвят на папка" ,
modal _tabheader3 _text : "Цвят на подсказка" ,
modal _tabheader4 _text : "Персонализирани икони" ,
modal _iconpicker _text : "Избор на папки" ,
modal _colorpicker1 _text : "Цвят основнен на папка" ,
modal _colorpicker2 _text : "цвят вторичен на папка" ,
modal _colorpicker3 _text : "Цвят на подсказка" ,
modal _colorpicker4 _text : "Цвят на шрифта" ,
modal _customopen _text : "Отворена икона" ,
modal _customclosed _text : "Затворена икона" ,
modal _custompreview _text : "Икона Преглед" ,
btn _cancel _text : "Зъбести" ,
btn _save _text : "Cпа с ява не "
} ;
case "ru" : //russian
return {
toast _addserver _text : "${servername} добавлен в папку${foldername}." ,
toast _removeserver _text : "${servername} был удален из папки${foldername}." ,
servercontext _serverfolders _text : "Папки сервера" ,
serversubmenu _createfolder _text : "Создать папки" ,
serversubmenu _removefromfolder _text : "Удаление сервера из папки" ,
foldercontext _unreadfolder _text : "Отметить все как прочитанное" ,
foldercontext _autounreadfolder _text : "Авто: Отметить как прочитанное" ,
foldercontext _foldersettings _text : "Настройки папки" ,
foldercontext _removefolder _text : "Удалить папки" ,
modal _header _text : "Настройки папки" ,
modal _foldername _text : "Имя папки" ,
modal _tabheader1 _text : "Папка" ,
modal _tabheader2 _text : "Цвет папки" ,
modal _tabheader3 _text : "Цвет подсказка" ,
modal _tabheader4 _text : "Пользовательские значки" ,
modal _iconpicker _text : "Выбор папки" ,
modal _colorpicker1 _text : "Цвет основной папки" ,
modal _colorpicker2 _text : "Цвет вторичной папки" ,
modal _colorpicker3 _text : "Цвет подсказка" ,
modal _colorpicker4 _text : "Цвет шрифта" ,
modal _customopen _text : "Открытая иконка" ,
modal _customclosed _text : "Закрытая иконка" ,
modal _custompreview _text : "Иконка Просмотр" ,
btn _cancel _text : "Отмена" ,
btn _save _text : "Cпа с ти"
} ;
case "uk" : //ukrainian
return {
toast _addserver _text : "${servername} було додано до папки${foldername}." ,
toast _removeserver _text : "${servername} був вилучений з папки${foldername}." ,
servercontext _serverfolders _text : "Папки сервера" ,
serversubmenu _createfolder _text : "Створити папки" ,
serversubmenu _removefromfolder _text : "Видалити сервер із папки" ,
foldercontext _unreadfolder _text : "Позначити як прочитане" ,
foldercontext _autounreadfolder _text : "Авто: Позначити як прочитане" ,
foldercontext _foldersettings _text : "Параметри папки" ,
foldercontext _removefolder _text : "Видалити папки" ,
modal _header _text : "Параметри папки" ,
modal _foldername _text : "Ім'я папки" ,
modal _tabheader1 _text : "Папки" ,
modal _tabheader2 _text : "Колір папки" ,
modal _tabheader3 _text : "Колір підказка" ,
modal _tabheader4 _text : "Користувальницькі іконки" ,
modal _iconpicker _text : "Вибір папки" ,
modal _colorpicker1 _text : "Колір основної папки" ,
modal _colorpicker2 _text : "Колір вторинного папки" ,
modal _colorpicker3 _text : "Колір підказка" ,
modal _colorpicker4 _text : "Колір шрифту" ,
modal _customopen _text : "Відкрита ікона" ,
modal _customclosed _text : "Закрита ікона" ,
modal _custompreview _text : "Піктограма попереднього перегляду" ,
btn _cancel _text : "Скасувати" ,
btn _save _text : "Зберегти"
} ;
case "ja" : //japanese
return {
toast _addserver _text : "${servername} がフォルダ${foldername} に追加されました。" ,
toast _removeserver _text : "${servername} がフォルダ${foldername} から削除されました。" ,
servercontext _serverfolders _text : "サーバーフォルダ" ,
serversubmenu _createfolder _text : "フォルダーを作る" ,
serversubmenu _removefromfolder _text : "フォルダからサーバーを削除する" ,
foldercontext _unreadfolder _text : "すべてを読むようにマークする" ,
foldercontext _autounreadfolder _text : "自動: 読み取りとしてマークする" ,
foldercontext _foldersettings _text : "フォルダ設定" ,
foldercontext _removefolder _text : "フォルダを削除する" ,
modal _header _text : "フォルダ設定" ,
modal _foldername _text : "フォルダ名" ,
modal _tabheader1 _text : "フォルダ" ,
modal _tabheader2 _text : "フォルダの色" ,
modal _tabheader3 _text : "ツールチップの色" ,
modal _tabheader4 _text : "カスタムアイコン" ,
modal _iconpicker _text : "フォルダの選択" ,
modal _colorpicker1 _text : "プライマリフォルダの色" ,
modal _colorpicker2 _text : "セカンダリフォルダの色" ,
modal _colorpicker3 _text : "ツールチップの色" ,
modal _colorpicker4 _text : "フォントの色" ,
modal _customopen _text : "開いたアイコン" ,
modal _customclosed _text : "クローズドアイコン" ,
modal _custompreview _text : "アイコンのプレビュー" ,
btn _cancel _text : "キャンセル" ,
btn _save _text : "セーブ"
} ;
case "zh-TW" : //chinese (traditional)
return {
toast _addserver _text : "${servername} 已被添加到文件夾${foldername}." ,
toast _removeserver _text : "${servername} 已從文件夾${foldername} 中刪除." ,
servercontext _serverfolders _text : "服務器文件夾" ,
serversubmenu _createfolder _text : "創建文件夾" ,
serversubmenu _removefromfolder _text : "從服務器中刪除服務器" ,
foldercontext _unreadfolder _text : "標記為已讀" ,
foldercontext _autounreadfolder _text : "自動: 標記為已讀" ,
foldercontext _foldersettings _text : "文件夾設置" ,
foldercontext _removefolder _text : "刪除文件夾" ,
modal _header _text : "文件夾設置" ,
modal _foldername _text : "文件夾名稱" ,
modal _tabheader1 _text : "夾" ,
modal _tabheader2 _text : "文件夾顏色" ,
modal _tabheader3 _text : "工具提示顏色" ,
modal _tabheader4 _text : "自定義圖標" ,
modal _iconpicker _text : "文件夾選擇" ,
modal _colorpicker1 _text : "主文件夾顏色" ,
modal _colorpicker2 _text : "輔助文件夾顏色" ,
modal _colorpicker3 _text : "工具提示顏色" ,
modal _colorpicker4 _text : "字體顏色" ,
modal _customopen _text : "打開的圖標" ,
modal _customclosed _text : "封閉的圖標" ,
modal _custompreview _text : "圖標預覽" ,
btn _cancel _text : "取消" ,
btn _save _text : "保存"
} ;
case "ko" : //korean
return {
toast _addserver _text : "${servername} 가 폴더${foldername} 에 추가되었습니다." ,
toast _removeserver _text : "${servername} 가 폴더${foldername} 에서 제거되었습니다." ,
servercontext _serverfolders _text : "서버 폴더" ,
serversubmenu _createfolder _text : "폴더 만들기" ,
serversubmenu _removefromfolder _text : "폴더에서 서버 제거" ,
foldercontext _unreadfolder _text : "모두 읽은 상태로 표시" ,
foldercontext _autounreadfolder _text : "자동: 읽은 상태로 표시" ,
foldercontext _foldersettings _text : "폴더 설정" ,
foldercontext _removefolder _text : "폴더 삭제" ,
modal _header _text : "폴더 설정" ,
modal _foldername _text : "폴더 이름" ,
modal _tabheader1 _text : "폴더" ,
modal _tabheader2 _text : "폴더 색" ,
modal _tabheader3 _text : "툴팁 색깔" ,
modal _tabheader4 _text : "사용자 정의 아이콘" ,
modal _iconpicker _text : "폴더 선택" ,
modal _colorpicker1 _text : "기본 폴더 색" ,
modal _colorpicker2 _text : "보조 폴더 색" ,
modal _colorpicker3 _text : "툴팁 색깔" ,
modal _colorpicker4 _text : "글꼴 색깔" ,
modal _customopen _text : "열린 아이콘" ,
modal _customclosed _text : "닫힌 아이콘" ,
modal _custompreview _text : "아이콘 미리보기" ,
btn _cancel _text : "취소" ,
btn _save _text : "저장"
} ;
default : //default: english
return {
toast _addserver _text : "${servername} has been added to the folder${foldername}." ,
toast _removeserver _text : "${servername} has been removed from the folder${foldername}." ,
servercontext _serverfolders _text : "Serverfolders" ,
serversubmenu _createfolder _text : "Create Folder" ,
serversubmenu _removefromfolder _text : "Remove Server From Folder" ,
foldercontext _unreadfolder _text : "Mark All As Read" ,
foldercontext _autounreadfolder _text : "Auto: Mark As Read" ,
foldercontext _foldersettings _text : "Foldersettings" ,
foldercontext _removefolder _text : "Delete Folder" ,
modal _header _text : "Foldersettings" ,
modal _foldername _text : "Foldername" ,
modal _tabheader1 _text : "Folder" ,
modal _tabheader2 _text : "Foldercolor" ,
modal _tabheader3 _text : "Tooltipcolor" ,
modal _tabheader4 _text : "Custom Icons" ,
modal _iconpicker _text : "Folderchoice" ,
modal _colorpicker1 _text : "Primary Foldercolor" ,
modal _colorpicker2 _text : "Secondary Foldercolor" ,
modal _colorpicker3 _text : "Tooltipcolor" ,
modal _colorpicker4 _text : "Fontcolor" ,
modal _customopen _text : "Open Icon" ,
modal _customclosed _text : "Closed Icon" ,
modal _custompreview _text : "Iconpreview" ,
btn _cancel _text : "Cancel" ,
btn _save _text : "Save"
} ;
}
}
2018-10-26 12:33:17 +02:00
}