Update RepoPlugins

This commit is contained in:
Mirco Wittrien 2018-12-23 15:35:53 +01:00
parent 2e2269fe91
commit 6e6d6be81a
2 changed files with 165 additions and 212 deletions

View File

@ -46,16 +46,30 @@ class PluginRepo {
<span class="bda-header-title">
<span class="bda-name"></span> v<span class="bda-version"></span> by <span class="bda-author"></span>
</span>
<svg class="favIcon" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20px" height="20px"><path fill="none" stroke="black" d="M 19.542, 9.092 c 0.393 -0.383, 0.532 -0.946, 0.362 -1.468 c -0.17 -0.523 -0.613 -0.896 -1.157 -0.975 l -4.837 -0.703 c -0.206 -0.03 -0.384 -0.159 -0.476 -0.346 L 11.273, 1.217 c -0.243 -0.492 -0.736 -0.798 -1.285 -0.798 c -0.549, 0 -1.042, 0.306 -1.284, 0.798 L 6.541, 5.6 c -0.092, 0.187 -0.27, 0.316 -0.476, 0.346 L 1.228, 6.649 c -0.544, 0.079 -0.987, 0.452 -1.157, 0.975 c -0.17, 0.523 -0.031, 1.085, 0.362, 1.468 l 3.5, 3.411 c 0.149, 0.146, 0.218, 0.355, 0.182, 0.56 L 3.29, 17.88 c -0.073, 0.424, 0.038, 0.836, 0.312, 1.162 c 0.426, 0.507, 1.171, 0.661, 1.766, 0.348 l 4.326 -2.274 c 0.181 -0.095, 0.408 -0.094, 0.589, 0 l 4.326, 2.274 c 0.21, 0.111, 0.435, 0.167, 0.666, 0.167 c 0.423, 0, 0.824 -0.188, 1.099 -0.515 c 0.275 -0.325, 0.386 -0.738, 0.312 -1.162 l -0.826 -4.817 c -0.035 -0.205, 0.033 -0.414, 0.182 -0.56 L 19.542, 9.092 z"/></svg>
<svg class="gitIcon" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20px" height="20px"><g fill="white"><path d="M 7.19, 16.027 c -0.139, 0.026 -0.199, 0.091 -0.182, 0.195 c 0.017, 0.104, 0.095, 0.138, 0.234, 0.104 c 0.139 -0.035, 0.199 -0.095, 0.182 -0.182 C 7.406, 16.049, 7.328, 16.01, 7.19, 16.027 z"/><path d="M 6.45, 16.131 c -0.138, 0 -0.208, 0.047 -0.208, 0.143 c 0, 0.112, 0.074, 0.16, 0.221, 0.143 c 0.138, 0, 0.208 -0.048, 0.208 -0.143 C 6.671, 16.162, 6.597, 16.114, 6.45, 16.131 z"/><path d="M 5.438, 16.092 c -0.035, 0.095, 0.022, 0.16, 0.169, 0.195 c 0.13, 0.052, 0.212, 0.026, 0.247 -0.078 c 0.026 -0.095 -0.03 -0.164 -0.169 -0.208 C 5.554, 15.967, 5.472, 15.996, 5.438, 16.092 z"/><path d="M 18.837, 1.097 C 18.106, 0.366, 17.226, 0, 16.196, 0 H 3.738 C 2.708, 0, 1.828, 0.366, 1.097, 1.097 C 0.366, 1.828, 0, 2.708, 0, 3.738 v 12.459 c 0, 1.03, 0.366, 1.91, 1.097, 2.641 c 0.731, 0.731, 1.612, 1.097, 2.641, 1.097 h 2.907 c 0.19, 0, 0.333 -0.007, 0.428 -0.019 c 0.095 -0.013, 0.19 -0.069, 0.285 -0.169 c 0.095 -0.099, 0.143 -0.244, 0.143 -0.435 c 0 -0.026 -0.002 -0.32 -0.007 -0.883 c -0.004 -0.562 -0.007 -1.008 -0.007 -1.337 l -0.298, 0.052 c -0.19, 0.035 -0.43, 0.05 -0.72, 0.045 c -0.29 -0.004 -0.59 -0.035 -0.902 -0.091 c -0.312 -0.056 -0.601 -0.186 -0.87 -0.389 c -0.268 -0.203 -0.458 -0.469 -0.571 -0.798 l -0.13 -0.299 c -0.086 -0.199 -0.223 -0.419 -0.409 -0.662 c -0.186 -0.242 -0.374 -0.407 -0.564 -0.493 l -0.091 -0.065 c -0.06 -0.043 -0.117 -0.095 -0.169 -0.156 c -0.052 -0.061 -0.091 -0.121 -0.117 -0.182 c -0.026 -0.061 -0.004 -0.11, 0.065 -0.149 c 0.069 -0.039, 0.195 -0.058, 0.376 -0.058 l 0.259, 0.039 c 0.173, 0.035, 0.387, 0.138, 0.642, 0.311 c 0.255, 0.173, 0.465, 0.398, 0.629, 0.675 c 0.199, 0.355, 0.439, 0.625, 0.72, 0.811 c 0.281, 0.186, 0.565, 0.279, 0.85, 0.279 s 0.532 -0.022, 0.74 -0.065 c 0.208 -0.043, 0.402 -0.108, 0.584 -0.195 c 0.078 -0.58, 0.29 -1.025, 0.636 -1.337 c -0.493 -0.052 -0.936 -0.13 -1.33 -0.234 c -0.394 -0.104 -0.8 -0.272 -1.22 -0.506 c -0.42 -0.234 -0.768 -0.523 -1.045 -0.87 c -0.277 -0.346 -0.504 -0.8 -0.681 -1.363 c -0.177 -0.562 -0.266 -1.211 -0.266 -1.947 c 0 -1.047, 0.342 -1.938, 1.025 -2.673 c -0.32 -0.787 -0.29 -1.67, 0.091 -2.647 c 0.251 -0.078, 0.623 -0.019, 1.116, 0.175 c 0.493, 0.195, 0.854, 0.361, 1.084, 0.5 c 0.229, 0.138, 0.413, 0.255, 0.552, 0.35 c 0.805 -0.225, 1.635 -0.337, 2.492 -0.337 c 0.856, 0, 1.687, 0.112, 2.492, 0.337 l 0.493 -0.311 c 0.338 -0.208, 0.735 -0.398, 1.194 -0.571 c 0.459 -0.173, 0.809 -0.221, 1.051 -0.143 c 0.389, 0.978, 0.424, 1.86, 0.104, 2.647 c 0.683, 0.735, 1.025, 1.627, 1.025, 2.673 c 0, 0.735 -0.089, 1.387 -0.266, 1.953 c -0.177, 0.567 -0.406, 1.021 -0.688, 1.363 c -0.281, 0.342 -0.632, 0.629 -1.051, 0.863 c -0.42, 0.234 -0.826, 0.402 -1.22, 0.506 c -0.394, 0.104 -0.837, 0.182 -1.33, 0.234 c 0.45, 0.389, 0.675, 1.003, 0.675, 1.843 v 3.102 c 0, 0.147, 0.021, 0.266, 0.065, 0.357 c 0.044, 0.091, 0.113, 0.153, 0.208, 0.188 c 0.096, 0.035, 0.18, 0.056, 0.253, 0.065 c 0.074, 0.009, 0.18, 0.013, 0.318, 0.013 h 2.907 c 1.029, 0, 1.91 -0.366, 2.641 -1.097 c 0.731 -0.731, 1.097 -1.612, 1.097 -2.641 V 3.738 C 19.933, 2.708, 19.568, 1.827, 18.837, 1.097 z"/><path d="M 3.945, 14.509 c -0.06, 0.043 -0.052, 0.112, 0.026, 0.208 c 0.087, 0.086, 0.156, 0.1, 0.208, 0.039 c 0.061 -0.043, 0.052 -0.112 -0.026 -0.208 C 4.066, 14.47, 3.997, 14.457, 3.945, 14.509 z"/><path d="M 3.517, 14.184 c -0.026, 0.061, 0.004, 0.113, 0.091, 0.156 c 0.069, 0.043, 0.126, 0.035, 0.169 -0.026 c 0.026 -0.061 -0.004 -0.113 -0.091 -0.156 C 3.599, 14.132, 3.543, 14.141, 3.517, 14.184 z"/><path d="M 4.348, 15.015 c -0.078, 0.043 -0.078, 0.121, 0, 0.234 c 0.078, 0.113, 0.151, 0.143, 0.221, 0.091 c 0.078 -0.061, 0.078 -0.143, 0 -0.247 C 4.499, 14.981, 4.425, 14.954, 4.348, 15.015 z"/><path d="M 4.802, 15.599 c -0.078, 0.069 -0.061, 0.151, 0.052, 0.247 c 0.104, 0.104, 0.19, 0.117, 0.259, 0.039 c 0.069 -0.069, 0.052 -0.151 -0.052 -0.246 C 4.958, 15.534, 4.871, 15.521, 4.802, 15.599 z"/></g></svg>
<div tabindex="0" class="${BDFDB.disCNS.giffavoritebutton + BDFDB.disCN.giffavoritecolor}" role="button" style="width: 20px; height: 20px;">
<svg class="${BDFDB.disCNS.giffavoriteicon}" name="Favorite" viewBox="3 3 18 18" width="20" height="20"></svg>
</div>
<svg class="gitIcon" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20px" height="20px" fill="currentColor">
<path d="M 7.19, 16.027 c -0.139, 0.026 -0.199, 0.091 -0.182, 0.195 c 0.017, 0.104, 0.095, 0.138, 0.234, 0.104 c 0.139 -0.035, 0.199 -0.095, 0.182 -0.182 C 7.406, 16.049, 7.328, 16.01, 7.19, 16.027 z"></path>
<path d="M 6.45, 16.131 c -0.138, 0 -0.208, 0.047 -0.208, 0.143 c 0, 0.112, 0.074, 0.16, 0.221, 0.143 c 0.138, 0, 0.208 -0.048, 0.208 -0.143 C 6.671, 16.162, 6.597, 16.114, 6.45, 16.131 z"></path>
<path d="M 5.438, 16.092 c -0.035, 0.095, 0.022, 0.16, 0.169, 0.195 c 0.13, 0.052, 0.212, 0.026, 0.247 -0.078 c 0.026 -0.095 -0.03 -0.164 -0.169 -0.208 C 5.554, 15.967, 5.472, 15.996, 5.438, 16.092 z"></path>
<path d="M 18.837, 1.097 C 18.106, 0.366, 17.226, 0, 16.196, 0 H 3.738 C 2.708, 0, 1.828, 0.366, 1.097, 1.097 C 0.366, 1.828, 0, 2.708, 0, 3.738 v 12.459 c 0, 1.03, 0.366, 1.91, 1.097, 2.641 c 0.731, 0.731, 1.612, 1.097, 2.641, 1.097 h 2.907 c 0.19, 0, 0.333 -0.007, 0.428 -0.019 c 0.095 -0.013, 0.19 -0.069, 0.285 -0.169 c 0.095 -0.099, 0.143 -0.244, 0.143 -0.435 c 0 -0.026 -0.002 -0.32 -0.007 -0.883 c -0.004 -0.562 -0.007 -1.008 -0.007 -1.337 l -0.298, 0.052 c -0.19, 0.035 -0.43, 0.05 -0.72, 0.045 c -0.29 -0.004 -0.59 -0.035 -0.902 -0.091 c -0.312 -0.056 -0.601 -0.186 -0.87 -0.389 c -0.268 -0.203 -0.458 -0.469 -0.571 -0.798 l -0.13 -0.299 c -0.086 -0.199 -0.223 -0.419 -0.409 -0.662 c -0.186 -0.242 -0.374 -0.407 -0.564 -0.493 l -0.091 -0.065 c -0.06 -0.043 -0.117 -0.095 -0.169 -0.156 c -0.052 -0.061 -0.091 -0.121 -0.117 -0.182 c -0.026 -0.061 -0.004 -0.11, 0.065 -0.149 c 0.069 -0.039, 0.195 -0.058, 0.376 -0.058 l 0.259, 0.039 c 0.173, 0.035, 0.387, 0.138, 0.642, 0.311 c 0.255, 0.173, 0.465, 0.398, 0.629, 0.675 c 0.199, 0.355, 0.439, 0.625, 0.72, 0.811 c 0.281, 0.186, 0.565, 0.279, 0.85, 0.279 s 0.532 -0.022, 0.74 -0.065 c 0.208 -0.043, 0.402 -0.108, 0.584 -0.195 c 0.078 -0.58, 0.29 -1.025, 0.636 -1.337 c -0.493 -0.052 -0.936 -0.13 -1.33 -0.234 c -0.394 -0.104 -0.8 -0.272 -1.22 -0.506 c -0.42 -0.234 -0.768 -0.523 -1.045 -0.87 c -0.277 -0.346 -0.504 -0.8 -0.681 -1.363 c -0.177 -0.562 -0.266 -1.211 -0.266 -1.947 c 0 -1.047, 0.342 -1.938, 1.025 -2.673 c -0.32 -0.787 -0.29 -1.67, 0.091 -2.647 c 0.251 -0.078, 0.623 -0.019, 1.116, 0.175 c 0.493, 0.195, 0.854, 0.361, 1.084, 0.5 c 0.229, 0.138, 0.413, 0.255, 0.552, 0.35 c 0.805 -0.225, 1.635 -0.337, 2.492 -0.337 c 0.856, 0, 1.687, 0.112, 2.492, 0.337 l 0.493 -0.311 c 0.338 -0.208, 0.735 -0.398, 1.194 -0.571 c 0.459 -0.173, 0.809 -0.221, 1.051 -0.143 c 0.389, 0.978, 0.424, 1.86, 0.104, 2.647 c 0.683, 0.735, 1.025, 1.627, 1.025, 2.673 c 0, 0.735 -0.089, 1.387 -0.266, 1.953 c -0.177, 0.567 -0.406, 1.021 -0.688, 1.363 c -0.281, 0.342 -0.632, 0.629 -1.051, 0.863 c -0.42, 0.234 -0.826, 0.402 -1.22, 0.506 c -0.394, 0.104 -0.837, 0.182 -1.33, 0.234 c 0.45, 0.389, 0.675, 1.003, 0.675, 1.843 v 3.102 c 0, 0.147, 0.021, 0.266, 0.065, 0.357 c 0.044, 0.091, 0.113, 0.153, 0.208, 0.188 c 0.096, 0.035, 0.18, 0.056, 0.253, 0.065 c 0.074, 0.009, 0.18, 0.013, 0.318, 0.013 h 2.907 c 1.029, 0, 1.91 -0.366, 2.641 -1.097 c 0.731 -0.731, 1.097 -1.612, 1.097 -2.641 V 3.738 C 19.933, 2.708, 19.568, 1.827, 18.837, 1.097 z"></path>
<path d="M 3.945, 14.509 c -0.06, 0.043 -0.052, 0.112, 0.026, 0.208 c 0.087, 0.086, 0.156, 0.1, 0.208, 0.039 c 0.061 -0.043, 0.052 -0.112 -0.026 -0.208 C 4.066, 14.47, 3.997, 14.457, 3.945, 14.509 z"></path>
<path d="M 3.517, 14.184 c -0.026, 0.061, 0.004, 0.113, 0.091, 0.156 c 0.069, 0.043, 0.126, 0.035, 0.169 -0.026 c 0.026 -0.061 -0.004 -0.113 -0.091 -0.156 C 3.599, 14.132, 3.543, 14.141, 3.517, 14.184 z"></path>
<path d="M 4.348, 15.015 c -0.078, 0.043 -0.078, 0.121, 0, 0.234 c 0.078, 0.113, 0.151, 0.143, 0.221, 0.091 c 0.078 -0.061, 0.078 -0.143, 0 -0.247 C 4.499, 14.981, 4.425, 14.954, 4.348, 15.015 z"></path>
<path d="M 4.802, 15.599 c -0.078, 0.069 -0.061, 0.151, 0.052, 0.247 c 0.104, 0.104, 0.19, 0.117, 0.259, 0.039 c 0.069 -0.069, 0.052 -0.151 -0.052 -0.246 C 4.958, 15.534, 4.871, 15.521, 4.802, 15.599 z"></path>
</svg>
</div>
<div class="bda-description-wrap ${BDFDB.disCN.scrollerwrap}">
<div class="bda-description ${BDFDB.disCN.scroller}" style="display: block;"></div>
</div>
<div class="bda-footer">
<span class="bda-links"></span>
<svg class="trashIcon" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20px" height="20px"><g fill="white"><path d="M 18.012, 0.648 H 12.98 C 12.944, 0.284, 12.637, 0, 12.264, 0 H 8.136 c -0.373, 0 -0.68, 0.284 -0.716, 0.648 H 2.389 c -0.398, 0 -0.72, 0.322 -0.72, 0.72 v 1.368 c 0, 0.398, 0.322, 0.72, 0.72, 0.72 h 15.623 c 0.398, 0, 0.72 -0.322, 0.72 -0.72 V 1.368 C 18.731, 0.97, 18.409, 0.648, 18.012, 0.648 z"/><path d="M 3.178, 4.839 v 14.841 c 0, 0.397, 0.322, 0.72, 0.72, 0.72 h 12.604 c 0.398, 0, 0.72 -0.322, 0.72 -0.72 V 4.839 H 3.178 z M 8.449, 15.978 c 0, 0.438 -0.355, 0.794 -0.794, 0.794 c -0.438, 0 -0.794 -0.355 -0.794 -0.794 V 8.109 c 0 -0.438, 0.355 -0.794, 0.794 -0.794 c 0.438, 0, 0.794, 0.355, 0.794, 0.794 V 15.978 z M 13.538, 15.978 c 0, 0.438 -0.355, 0.794 -0.794, 0.794 s -0.794 -0.355 -0.794 -0.794 V 8.109 c 0 -0.438, 0.355 -0.794, 0.794 -0.794 c 0.438, 0, 0.794, 0.355, 0.794, 0.794 V 15.978 z"/></g></svg>
<button class="btn-download bda-settings-button">Download</button>
<svg class="trashIcon" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20px" height="20px" fill="currentColor">
<path d="M 18.012, 0.648 H 12.98 C 12.944, 0.284, 12.637, 0, 12.264, 0 H 8.136 c -0.373, 0 -0.68, 0.284 -0.716, 0.648 H 2.389 c -0.398, 0 -0.72, 0.322 -0.72, 0.72 v 1.368 c 0, 0.398, 0.322, 0.72, 0.72, 0.72 h 15.623 c 0.398, 0, 0.72 -0.322, 0.72 -0.72 V 1.368 C 18.731, 0.97, 18.409, 0.648, 18.012, 0.648 z"></path>
<path d="M 3.178, 4.839 v 14.841 c 0, 0.397, 0.322, 0.72, 0.72, 0.72 h 12.604 c 0.398, 0, 0.72 -0.322, 0.72 -0.72 V 4.839 H 3.178 z M 8.449, 15.978 c 0, 0.438 -0.355, 0.794 -0.794, 0.794 c -0.438, 0 -0.794 -0.355 -0.794 -0.794 V 8.109 c 0 -0.438, 0.355 -0.794, 0.794 -0.794 c 0.438, 0, 0.794, 0.355, 0.794, 0.794 V 15.978 z M 13.538, 15.978 c 0, 0.438 -0.355, 0.794 -0.794, 0.794 s -0.794 -0.355 -0.794 -0.794 V 8.109 c 0 -0.438, 0.355 -0.794, 0.794 -0.794 c 0.438, 0, 0.794, 0.355, 0.794, 0.794 V 15.978 z"></path>
</svg>
<button class="btn-download bda-settings-button" style="margin-left: 0 !important;">Download</button>
</div>
</li>`;
@ -64,7 +78,7 @@ class PluginRepo {
<div class="${BDFDB.disCN.backdrop}"></div>
<div class="${BDFDB.disCN.modal}">
<div class="${BDFDB.disCN.modalinner}">
<div class="${BDFDB.disCNS.modalsub + BDFDB.disCN.modalsizelarge}">
<div class="${BDFDB.disCN.modalsub}">
<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; padding: 20px 20px 0 20px;">
<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} pluginAmount">Plugin Repository</h4>
@ -103,7 +117,7 @@ class PluginRepo {
</div>
</div>
<div tab="plugins" class="${BDFDB.disCNS.scrollerwrap + BDFDB.disCNS.modalcontent + BDFDB.disCNS.scrollerthemed + BDFDB.disCN.themeghosthairline} tab-content">
<div class="${BDFDB.disCNS.scroller + BDFDB.disCNS.modalsubinner + BDFDB.disCN.standardsidebarview}">
<div class="${BDFDB.disCNS.scroller + BDFDB.disCN.modalsubinner}">
<ul class="${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.vertical + BDFDB.disCNS.directioncolumn + BDFDB.disCNS.justifystart + BDFDB.disCNS.alignstretch + BDFDB.disCN.nowrap} bda-slist plugins" style="flex: 1 1 auto;"></ul>
</div>
</div>
@ -178,60 +192,39 @@ class PluginRepo {
}
.pluginrepo-modal ${BDFDB.dotCN.modalinner} {
min-height: 100%;
min-width: 800px;
width: 50%;
}
.pluginrepo-modal .pluginEntry {
.pluginrepo-modal .pluginEntry,
.pluginrepo-modal .pluginEntry .bda-header {
overflow: visible !important;
}
.pluginrepo-modal .pluginEntry .gitIcon,
.pluginrepo-modal .pluginEntry .favIcon,
.pluginrepo-modal .pluginEntry ${BDFDB.dotCN.giffavoritebutton},
.pluginrepo-modal .pluginEntry .trashIcon {
margin-right: 5px;
cursor: pointer;
position: relative !important;
transform: none !important;
opacity: 1 !important;
margin-right: 5px !important;
cursor: pointer !important;
}
.pluginrepo-modal .pluginEntry .gitIcon,
.pluginrepo-modal .pluginEntry ${BDFDB.dotCN.giffavoritebutton}:not(${BDFDB.dotCN.giffavoriteselected}),
.pluginrepo-modal .pluginEntry .trashIcon {
color: #4f545c !important;
}
${BDFDB.dotCN.themedark} .pluginrepo-modal .pluginEntry .gitIcon,
${BDFDB.dotCN.themedark} .pluginrepo-modal .pluginEntry ${BDFDB.dotCN.giffavoritebutton}:not(${BDFDB.dotCN.giffavoriteselected}),
${BDFDB.dotCN.themedark} .pluginrepo-modal .pluginEntry .trashIcon {
color: #fff !important;
}
.pluginrepo-modal .pluginEntry .trashIcon,
.pluginrepo-modal .pluginEntry .favIcon {
margin-left: auto;
}
.pluginrepo-modal .pluginEntry .btn-download {
margin-left: 0 !important;
}
.pluginrepo-modal .pluginEntry .favIcon path {
stroke: yellow;
fill: none;
}
.pluginrepo-modal .pluginEntry .favIcon.favorized path {
stroke: yellow;
fill: yellow;
}
.pluginrepo-modal .pluginEntry.downloadable .trashIcon {
display: none;
}
.pluginrepo-modal .pluginEntry.downloadable .btn-download {
background-color: rgb(114, 137, 218) !important;
.pluginrepo-modal .pluginEntry ${BDFDB.dotCN.giffavoritebutton} {
margin-left: auto !important;
}
.pluginrepo-modal .pluginEntry.outdated .btn-download {
background-color: rgb(240, 71, 71) !important;
margin-left: 0 !important;
}
.pluginrepo-modal .pluginEntry.updated .btn-download {
background-color: rgb(67, 181, 129) !important;
margin-left: 0 !important;
}
.pluginrepo-trashicon-tooltip{
z-index: 3500!important;
}
.pluginrepo-modal .pluginEntry.jiiks .bda-right {
flex: 1 1 auto;
}
.pluginrepo-modal .pluginEntry.jiiks .bda-header,
.pluginrepo-modal .pluginEntry.jiiks .bda-footer {
display: flex;
align-items: center;
margin: 0 !important;
}
.pluginrepo-modal .pluginEntry.jiiks .bda-footer {
margin-top: 33% !important;
.pluginrepo-modal .pluginEntry.downloadable .trashIcon {
opacity: 0 !important;
pointer-events: none !important;
}`;
}
@ -239,7 +232,7 @@ class PluginRepo {
getDescription () {return "Allows you to look at all plugins from the plugin repo and download them on the fly. Repo button is in the plugins settings.";}
getVersion () {return "1.6.3";}
getVersion () {return "1.6.4";}
getAuthor () {return "DevilBro";}
@ -361,7 +354,7 @@ class PluginRepo {
clearInterval(this.updateInterval);
clearTimeout(this.loading.timeout);
$("webview[webview-pluginrepo], .pluginrepo-modal, .bd-pluginrepobutton, .pluginrepo-loadingicon").remove();
$("webview[webview-pluginrepo], .pluginrepo-modal, .pluginrepo-notice, .bd-pluginrepobutton, .pluginrepo-loadingicon").remove();
$(BDFDB.dotCN.app + " > .repo-loadingwrapper:empty").remove();
BDFDB.unloadMessage(this);
@ -473,7 +466,7 @@ class PluginRepo {
var pluginRepoModal = $(this.pluginRepoModalMarkup);
pluginRepoModal.updateModal = true;
pluginRepoModal.enableSearch = false;
var hiddenSettings = BDFDB.loadAllData(this, "hidden");
var hiddenSettings = Object.assign({},BDFDB.loadAllData(this, "hidden"));
pluginRepoModal.find("#input-hideupdated").prop("checked", hiddenSettings.updated || showOnlyOutdated);
pluginRepoModal.find("#input-hideoutdated").prop("checked", hiddenSettings.outdated && !showOnlyOutdated);
pluginRepoModal.find("#input-hidedownloadable").prop("checked", hiddenSettings.downloadable || showOnlyOutdated);
@ -489,9 +482,7 @@ class PluginRepo {
pluginRepoModal.searchTimeout = setTimeout(() => {this.addPluginEntries(pluginRepoModal);},1000);
})
.on("change." + this.getName(), ".hide-checkbox", (e) => {
var hideButton = $(e.currentTarget);
hiddenSettings[hideButton.val()] = hideButton.prop("checked");
BDFDB.saveAllData(hiddenSettings, this, "hidden");
BDFDB.saveData(e.currentTarget.value, e.currentTarget.checked, this, "hidden");
})
.on("change." + this.getName(), "#input-rnmstart", (e) => {
BDFDB.saveData("RNMstart", $(e.currentTarget).prop("checked"), this, "settings");
@ -503,7 +494,11 @@ class PluginRepo {
this.openSortPopout(e, this.orderPopoutMarkup, pluginRepoModal);
})
.on("click." + this.getName(), ".tab[tab=plugins]:not(.selected)", (e) => {
this.addPluginEntries(pluginRepoModal);
var newHiddenSettings = BDFDB.loadAllData(this, "hidden");
if (!BDFDB.equals(newHiddenSettings, hiddenSettings)) {
hiddenSettings = Object.assign({},newHiddenSettings);
this.addPluginEntries(pluginRepoModal);
}
});
this.createPluginEntries(pluginRepoModal);
@ -550,30 +545,14 @@ class PluginRepo {
let div = $(this.pluginEntryMarkup);
var installedPlugin = window.bdplugins[plugin.getName] ? window.bdplugins[plugin.getName].plugin : null;
if (installedPlugin && installedPlugin.getAuthor().toUpperCase() == plugin.getAuthor.toUpperCase()) {
if (installedPlugin.getVersion() != plugin.getVersion) {
plugin.getState = 1;
div.addClass("outdated")
.find(".btn-download").text("Outdated");
}
else {
plugin.getState = 0;
div.addClass("updated")
.find(".btn-download").text("Updated");
}
plugin.getState = installedPlugin.getVersion() != plugin.getVersion ? 1 : 0;
}
else {
plugin.getState = 2;
div.addClass("downloadable")
.find(".btn-download").text("Download");
}
if (favorites[url]) {
plugin.getFav = 0;
div.find(".favIcon")[0].classList.add("favorized");
}
else {
plugin.getFav = 1;
div.find(".favIcon")[0].classList.remove("favorized");
}
this.setEntryDivState(div, plugin.getState);
plugin.getFav = !!favorites[url] ? 0 : 1;
div.find(BDFDB.dotCN.giffavoritebutton).toggleClass(BDFDB.disCN.giffavoriteselected, !!favorites[url]);
modal.entries.push({
div: div,
@ -619,16 +598,11 @@ class PluginRepo {
div.find(".bda-author").html(values[2]);
div.find(".bda-description").html(values[3]);
div
.on("click." + this.getName(), ".favIcon", (e) => {
e.currentTarget.classList.toggle("favorized");
if (e.currentTarget.classList.contains("favorized")) {
entry.fav = 0;
BDFDB.saveData(entry.url, true, this, "favorites");
}
else {
entry.fav = 1;
BDFDB.removeData(entry.url, this, "favorites");
}
.on("click." + this.getName(), BDFDB.dotCN.giffavoritebutton, (e) => {
let favorize = entry.fav == 1;
entry.fav = favorize ? 0 : 1;
if (favorize) BDFDB.saveData(entry.url, true, this, "favorites");
else BDFDB.removeData(entry.url, this, "favorites");
})
.on("click." + this.getName(), ".gitIcon", (e) => {
var giturl = null;
@ -640,27 +614,23 @@ class PluginRepo {
else if (entry.url.indexOf("https://gist.githubusercontent.com/") == 0) {
giturl = entry.url.replace("//gist.githubusercontent", "//gist.github").split("/raw/")[0];
}
if (giturl) {
window.open(giturl, "_blank");
}
if (giturl) window.open(giturl, "_blank");
})
.on("click." + this.getName(), ".trashIcon", () => {
if (div.hasClass("outdated") || div.hasClass("updated")) {
entry.state = 2;
div.removeClass("outdated").removeClass("updated").addClass("downloadable")
.find(".btn-download").text("Download");
this.setEntryDivState(div, entry.state);
this.deletePluginFile(entry);
if (!BDFDB.isRestartNoMoreEnabled()) this.stopPlugin(entry);
}
})
.on("click." + this.getName(), ".btn-download", () => {
entry.state = 0;
div.removeClass("downloadable").removeClass("outdated").addClass("updated")
.find(".btn-download").text("Updated");
this.setEntryDivState(div, entry.state);
this.downloadPlugin(entry);
if (modal.find("#input-rnmstart").prop("checked")) setTimeout(() => {this.startPlugin(entry);},3000);
})
.on("mouseenter." + this.getName(), ".favIcon", (e) => {
.on("mouseenter." + this.getName(), BDFDB.dotCN.giffavoritebutton, (e) => {
BDFDB.createTooltip("Favorize", e.currentTarget, {type:"top",selector:"pluginrepo-favicon-tooltip"});
})
.on("mouseenter." + this.getName(), ".gitIcon", (e) => {
@ -674,6 +644,16 @@ class PluginRepo {
});
}
setEntryDivState (div, state) {
div
.toggleClass("downloadable", state > 1)
.toggleClass("outdated", state == 1)
.toggleClass("updated", state < 1)
.find(".btn-download")
.text(state < 1 ? "Updated" : (state > 1 ? "Download" : "Outdated"))
.get(0).style.setProperty("background-color", "rgb(" + (state < 1 ? "67,181,129" : (state > 1 ? "114,137,218" : "241,71,71")) + ")", "important");
}
loadPlugins () {
var getPluginInfo, createWebview, runInWebview;
var webview, webviewrunning = false, webviewqueue = [], outdated = 0, i = 0;
@ -731,7 +711,7 @@ class PluginRepo {
let wrongUrls = [];
for (let url of this.foundPlugins) if (url && !this.loadedPlugins[url] && !wrongUrls.includes(url)) wrongUrls.push(url);
if (wrongUrls.length > 0) {
var bar = BDFDB.createNotificationsBar(`PluginRepo: ${wrongUrls.length} Plugin${wrongUrls.length > 1 ? "s" : ""} could not be loaded.`, {type:"danger",btn:"List"});
var bar = BDFDB.createNotificationsBar(`PluginRepo: ${wrongUrls.length} Plugin${wrongUrls.length > 1 ? "s" : ""} could not be loaded.`, {type:"danger",btn:"List",selector:"pluginrepo-notice"});
$(bar).on("click." + this.getName(), BDFDB.dotCN.noticebutton, (e) => {
var toast = BDFDB.showToast(wrongUrls.join("\n"),{type:"error"});
toast.style.overflow = "hidden";

View File

@ -51,8 +51,19 @@ class ThemeRepo {
<span class="bda-header-title">
<span class="bda-name"></span> v<span class="bda-version"></span> by <span class="bda-author"></span>
</span>
<svg class="favIcon" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20px" height="20px"><path fill="none" stroke="black" d="M 19.542, 9.092 c 0.393 -0.383, 0.532 -0.946, 0.362 -1.468 c -0.17 -0.523 -0.613 -0.896 -1.157 -0.975 l -4.837 -0.703 c -0.206 -0.03 -0.384 -0.159 -0.476 -0.346 L 11.273, 1.217 c -0.243 -0.492 -0.736 -0.798 -1.285 -0.798 c -0.549, 0 -1.042, 0.306 -1.284, 0.798 L 6.541, 5.6 c -0.092, 0.187 -0.27, 0.316 -0.476, 0.346 L 1.228, 6.649 c -0.544, 0.079 -0.987, 0.452 -1.157, 0.975 c -0.17, 0.523 -0.031, 1.085, 0.362, 1.468 l 3.5, 3.411 c 0.149, 0.146, 0.218, 0.355, 0.182, 0.56 L 3.29, 17.88 c -0.073, 0.424, 0.038, 0.836, 0.312, 1.162 c 0.426, 0.507, 1.171, 0.661, 1.766, 0.348 l 4.326 -2.274 c 0.181 -0.095, 0.408 -0.094, 0.589, 0 l 4.326, 2.274 c 0.21, 0.111, 0.435, 0.167, 0.666, 0.167 c 0.423, 0, 0.824 -0.188, 1.099 -0.515 c 0.275 -0.325, 0.386 -0.738, 0.312 -1.162 l -0.826 -4.817 c -0.035 -0.205, 0.033 -0.414, 0.182 -0.56 L 19.542, 9.092 z"/></svg>
<svg class="gitIcon" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20px" height="20px"><g fill="white"><path d="M 7.19, 16.027 c -0.139, 0.026 -0.199, 0.091 -0.182, 0.195 c 0.017, 0.104, 0.095, 0.138, 0.234, 0.104 c 0.139 -0.035, 0.199 -0.095, 0.182 -0.182 C 7.406, 16.049, 7.328, 16.01, 7.19, 16.027 z"/><path d="M 6.45, 16.131 c -0.138, 0 -0.208, 0.047 -0.208, 0.143 c 0, 0.112, 0.074, 0.16, 0.221, 0.143 c 0.138, 0, 0.208 -0.048, 0.208 -0.143 C 6.671, 16.162, 6.597, 16.114, 6.45, 16.131 z"/><path d="M 5.438, 16.092 c -0.035, 0.095, 0.022, 0.16, 0.169, 0.195 c 0.13, 0.052, 0.212, 0.026, 0.247 -0.078 c 0.026 -0.095 -0.03 -0.164 -0.169 -0.208 C 5.554, 15.967, 5.472, 15.996, 5.438, 16.092 z"/><path d="M 18.837, 1.097 C 18.106, 0.366, 17.226, 0, 16.196, 0 H 3.738 C 2.708, 0, 1.828, 0.366, 1.097, 1.097 C 0.366, 1.828, 0, 2.708, 0, 3.738 v 12.459 c 0, 1.03, 0.366, 1.91, 1.097, 2.641 c 0.731, 0.731, 1.612, 1.097, 2.641, 1.097 h 2.907 c 0.19, 0, 0.333 -0.007, 0.428 -0.019 c 0.095 -0.013, 0.19 -0.069, 0.285 -0.169 c 0.095 -0.099, 0.143 -0.244, 0.143 -0.435 c 0 -0.026 -0.002 -0.32 -0.007 -0.883 c -0.004 -0.562 -0.007 -1.008 -0.007 -1.337 l -0.298, 0.052 c -0.19, 0.035 -0.43, 0.05 -0.72, 0.045 c -0.29 -0.004 -0.59 -0.035 -0.902 -0.091 c -0.312 -0.056 -0.601 -0.186 -0.87 -0.389 c -0.268 -0.203 -0.458 -0.469 -0.571 -0.798 l -0.13 -0.299 c -0.086 -0.199 -0.223 -0.419 -0.409 -0.662 c -0.186 -0.242 -0.374 -0.407 -0.564 -0.493 l -0.091 -0.065 c -0.06 -0.043 -0.117 -0.095 -0.169 -0.156 c -0.052 -0.061 -0.091 -0.121 -0.117 -0.182 c -0.026 -0.061 -0.004 -0.11, 0.065 -0.149 c 0.069 -0.039, 0.195 -0.058, 0.376 -0.058 l 0.259, 0.039 c 0.173, 0.035, 0.387, 0.138, 0.642, 0.311 c 0.255, 0.173, 0.465, 0.398, 0.629, 0.675 c 0.199, 0.355, 0.439, 0.625, 0.72, 0.811 c 0.281, 0.186, 0.565, 0.279, 0.85, 0.279 s 0.532 -0.022, 0.74 -0.065 c 0.208 -0.043, 0.402 -0.108, 0.584 -0.195 c 0.078 -0.58, 0.29 -1.025, 0.636 -1.337 c -0.493 -0.052 -0.936 -0.13 -1.33 -0.234 c -0.394 -0.104 -0.8 -0.272 -1.22 -0.506 c -0.42 -0.234 -0.768 -0.523 -1.045 -0.87 c -0.277 -0.346 -0.504 -0.8 -0.681 -1.363 c -0.177 -0.562 -0.266 -1.211 -0.266 -1.947 c 0 -1.047, 0.342 -1.938, 1.025 -2.673 c -0.32 -0.787 -0.29 -1.67, 0.091 -2.647 c 0.251 -0.078, 0.623 -0.019, 1.116, 0.175 c 0.493, 0.195, 0.854, 0.361, 1.084, 0.5 c 0.229, 0.138, 0.413, 0.255, 0.552, 0.35 c 0.805 -0.225, 1.635 -0.337, 2.492 -0.337 c 0.856, 0, 1.687, 0.112, 2.492, 0.337 l 0.493 -0.311 c 0.338 -0.208, 0.735 -0.398, 1.194 -0.571 c 0.459 -0.173, 0.809 -0.221, 1.051 -0.143 c 0.389, 0.978, 0.424, 1.86, 0.104, 2.647 c 0.683, 0.735, 1.025, 1.627, 1.025, 2.673 c 0, 0.735 -0.089, 1.387 -0.266, 1.953 c -0.177, 0.567 -0.406, 1.021 -0.688, 1.363 c -0.281, 0.342 -0.632, 0.629 -1.051, 0.863 c -0.42, 0.234 -0.826, 0.402 -1.22, 0.506 c -0.394, 0.104 -0.837, 0.182 -1.33, 0.234 c 0.45, 0.389, 0.675, 1.003, 0.675, 1.843 v 3.102 c 0, 0.147, 0.021, 0.266, 0.065, 0.357 c 0.044, 0.091, 0.113, 0.153, 0.208, 0.188 c 0.096, 0.035, 0.18, 0.056, 0.253, 0.065 c 0.074, 0.009, 0.18, 0.013, 0.318, 0.013 h 2.907 c 1.029, 0, 1.91 -0.366, 2.641 -1.097 c 0.731 -0.731, 1.097 -1.612, 1.097 -2.641 V 3.738 C 19.933, 2.708, 19.568, 1.827, 18.837, 1.097 z"/><path d="M 3.945, 14.509 c -0.06, 0.043 -0.052, 0.112, 0.026, 0.208 c 0.087, 0.086, 0.156, 0.1, 0.208, 0.039 c 0.061 -0.043, 0.052 -0.112 -0.026 -0.208 C 4.066, 14.47, 3.997, 14.457, 3.945, 14.509 z"/><path d="M 3.517, 14.184 c -0.026, 0.061, 0.004, 0.113, 0.091, 0.156 c 0.069, 0.043, 0.126, 0.035, 0.169 -0.026 c 0.026 -0.061 -0.004 -0.113 -0.091 -0.156 C 3.599, 14.132, 3.543, 14.141, 3.517, 14.184 z"/><path d="M 4.348, 15.015 c -0.078, 0.043 -0.078, 0.121, 0, 0.234 c 0.078, 0.113, 0.151, 0.143, 0.221, 0.091 c 0.078 -0.061, 0.078 -0.143, 0 -0.247 C 4.499, 14.981, 4.425, 14.954, 4.348, 15.015 z"/><path d="M 4.802, 15.599 c -0.078, 0.069 -0.061, 0.151, 0.052, 0.247 c 0.104, 0.104, 0.19, 0.117, 0.259, 0.039 c 0.069 -0.069, 0.052 -0.151 -0.052 -0.246 C 4.958, 15.534, 4.871, 15.521, 4.802, 15.599 z"/></g></svg>
<div tabindex="0" class="${BDFDB.disCNS.giffavoritebutton + BDFDB.disCN.giffavoritecolor}" role="button" style="width: 20px; height: 20px;">
<svg class="${BDFDB.disCNS.giffavoriteicon}" name="Favorite" viewBox="3 3 18 18" width="20" height="20"></svg>
</div>
<svg class="gitIcon" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20px" height="20px" fill="currentColor">
<path d="M 7.19, 16.027 c -0.139, 0.026 -0.199, 0.091 -0.182, 0.195 c 0.017, 0.104, 0.095, 0.138, 0.234, 0.104 c 0.139 -0.035, 0.199 -0.095, 0.182 -0.182 C 7.406, 16.049, 7.328, 16.01, 7.19, 16.027 z"></path>
<path d="M 6.45, 16.131 c -0.138, 0 -0.208, 0.047 -0.208, 0.143 c 0, 0.112, 0.074, 0.16, 0.221, 0.143 c 0.138, 0, 0.208 -0.048, 0.208 -0.143 C 6.671, 16.162, 6.597, 16.114, 6.45, 16.131 z"></path>
<path d="M 5.438, 16.092 c -0.035, 0.095, 0.022, 0.16, 0.169, 0.195 c 0.13, 0.052, 0.212, 0.026, 0.247 -0.078 c 0.026 -0.095 -0.03 -0.164 -0.169 -0.208 C 5.554, 15.967, 5.472, 15.996, 5.438, 16.092 z"></path>
<path d="M 18.837, 1.097 C 18.106, 0.366, 17.226, 0, 16.196, 0 H 3.738 C 2.708, 0, 1.828, 0.366, 1.097, 1.097 C 0.366, 1.828, 0, 2.708, 0, 3.738 v 12.459 c 0, 1.03, 0.366, 1.91, 1.097, 2.641 c 0.731, 0.731, 1.612, 1.097, 2.641, 1.097 h 2.907 c 0.19, 0, 0.333 -0.007, 0.428 -0.019 c 0.095 -0.013, 0.19 -0.069, 0.285 -0.169 c 0.095 -0.099, 0.143 -0.244, 0.143 -0.435 c 0 -0.026 -0.002 -0.32 -0.007 -0.883 c -0.004 -0.562 -0.007 -1.008 -0.007 -1.337 l -0.298, 0.052 c -0.19, 0.035 -0.43, 0.05 -0.72, 0.045 c -0.29 -0.004 -0.59 -0.035 -0.902 -0.091 c -0.312 -0.056 -0.601 -0.186 -0.87 -0.389 c -0.268 -0.203 -0.458 -0.469 -0.571 -0.798 l -0.13 -0.299 c -0.086 -0.199 -0.223 -0.419 -0.409 -0.662 c -0.186 -0.242 -0.374 -0.407 -0.564 -0.493 l -0.091 -0.065 c -0.06 -0.043 -0.117 -0.095 -0.169 -0.156 c -0.052 -0.061 -0.091 -0.121 -0.117 -0.182 c -0.026 -0.061 -0.004 -0.11, 0.065 -0.149 c 0.069 -0.039, 0.195 -0.058, 0.376 -0.058 l 0.259, 0.039 c 0.173, 0.035, 0.387, 0.138, 0.642, 0.311 c 0.255, 0.173, 0.465, 0.398, 0.629, 0.675 c 0.199, 0.355, 0.439, 0.625, 0.72, 0.811 c 0.281, 0.186, 0.565, 0.279, 0.85, 0.279 s 0.532 -0.022, 0.74 -0.065 c 0.208 -0.043, 0.402 -0.108, 0.584 -0.195 c 0.078 -0.58, 0.29 -1.025, 0.636 -1.337 c -0.493 -0.052 -0.936 -0.13 -1.33 -0.234 c -0.394 -0.104 -0.8 -0.272 -1.22 -0.506 c -0.42 -0.234 -0.768 -0.523 -1.045 -0.87 c -0.277 -0.346 -0.504 -0.8 -0.681 -1.363 c -0.177 -0.562 -0.266 -1.211 -0.266 -1.947 c 0 -1.047, 0.342 -1.938, 1.025 -2.673 c -0.32 -0.787 -0.29 -1.67, 0.091 -2.647 c 0.251 -0.078, 0.623 -0.019, 1.116, 0.175 c 0.493, 0.195, 0.854, 0.361, 1.084, 0.5 c 0.229, 0.138, 0.413, 0.255, 0.552, 0.35 c 0.805 -0.225, 1.635 -0.337, 2.492 -0.337 c 0.856, 0, 1.687, 0.112, 2.492, 0.337 l 0.493 -0.311 c 0.338 -0.208, 0.735 -0.398, 1.194 -0.571 c 0.459 -0.173, 0.809 -0.221, 1.051 -0.143 c 0.389, 0.978, 0.424, 1.86, 0.104, 2.647 c 0.683, 0.735, 1.025, 1.627, 1.025, 2.673 c 0, 0.735 -0.089, 1.387 -0.266, 1.953 c -0.177, 0.567 -0.406, 1.021 -0.688, 1.363 c -0.281, 0.342 -0.632, 0.629 -1.051, 0.863 c -0.42, 0.234 -0.826, 0.402 -1.22, 0.506 c -0.394, 0.104 -0.837, 0.182 -1.33, 0.234 c 0.45, 0.389, 0.675, 1.003, 0.675, 1.843 v 3.102 c 0, 0.147, 0.021, 0.266, 0.065, 0.357 c 0.044, 0.091, 0.113, 0.153, 0.208, 0.188 c 0.096, 0.035, 0.18, 0.056, 0.253, 0.065 c 0.074, 0.009, 0.18, 0.013, 0.318, 0.013 h 2.907 c 1.029, 0, 1.91 -0.366, 2.641 -1.097 c 0.731 -0.731, 1.097 -1.612, 1.097 -2.641 V 3.738 C 19.933, 2.708, 19.568, 1.827, 18.837, 1.097 z"></path>
<path d="M 3.945, 14.509 c -0.06, 0.043 -0.052, 0.112, 0.026, 0.208 c 0.087, 0.086, 0.156, 0.1, 0.208, 0.039 c 0.061 -0.043, 0.052 -0.112 -0.026 -0.208 C 4.066, 14.47, 3.997, 14.457, 3.945, 14.509 z"></path>
<path d="M 3.517, 14.184 c -0.026, 0.061, 0.004, 0.113, 0.091, 0.156 c 0.069, 0.043, 0.126, 0.035, 0.169 -0.026 c 0.026 -0.061 -0.004 -0.113 -0.091 -0.156 C 3.599, 14.132, 3.543, 14.141, 3.517, 14.184 z"></path>
<path d="M 4.348, 15.015 c -0.078, 0.043 -0.078, 0.121, 0, 0.234 c 0.078, 0.113, 0.151, 0.143, 0.221, 0.091 c 0.078 -0.061, 0.078 -0.143, 0 -0.247 C 4.499, 14.981, 4.425, 14.954, 4.348, 15.015 z"></path>
<path d="M 4.802, 15.599 c -0.078, 0.069 -0.061, 0.151, 0.052, 0.247 c 0.104, 0.104, 0.19, 0.117, 0.259, 0.039 c 0.069 -0.069, 0.052 -0.151 -0.052 -0.246 C 4.958, 15.534, 4.871, 15.521, 4.802, 15.599 z"></path>
</svg>
<div class="${BDFDB.disCNS.flexchild + BDFDB.disCNS.switchenabled + BDFDB.disCNS.switch + BDFDB.disCNS.switchvalue + BDFDB.disCNS.switchsizedefault + BDFDB.disCNS.switchsize + BDFDB.disCN.switchthemedefault} previewCheckboxWrapper" style="flex: 0 0 auto;">
<input type="checkbox" class="${BDFDB.disCNS.switchinnerenabled + BDFDB.disCN.switchinner} previewCheckbox">
</div>
@ -62,8 +73,11 @@ class ThemeRepo {
</div>
<div class="bda-footer">
<span class="bda-links"></span>
<svg class="trashIcon" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20px" height="20px"><g fill="white"><path d="M 18.012, 0.648 H 12.98 C 12.944, 0.284, 12.637, 0, 12.264, 0 H 8.136 c -0.373, 0 -0.68, 0.284 -0.716, 0.648 H 2.389 c -0.398, 0 -0.72, 0.322 -0.72, 0.72 v 1.368 c 0, 0.398, 0.322, 0.72, 0.72, 0.72 h 15.623 c 0.398, 0, 0.72 -0.322, 0.72 -0.72 V 1.368 C 18.731, 0.97, 18.409, 0.648, 18.012, 0.648 z"/><path d="M 3.178, 4.839 v 14.841 c 0, 0.397, 0.322, 0.72, 0.72, 0.72 h 12.604 c 0.398, 0, 0.72 -0.322, 0.72 -0.72 V 4.839 H 3.178 z M 8.449, 15.978 c 0, 0.438 -0.355, 0.794 -0.794, 0.794 c -0.438, 0 -0.794 -0.355 -0.794 -0.794 V 8.109 c 0 -0.438, 0.355 -0.794, 0.794 -0.794 c 0.438, 0, 0.794, 0.355, 0.794, 0.794 V 15.978 z M 13.538, 15.978 c 0, 0.438 -0.355, 0.794 -0.794, 0.794 s -0.794 -0.355 -0.794 -0.794 V 8.109 c 0 -0.438, 0.355 -0.794, 0.794 -0.794 c 0.438, 0, 0.794, 0.355, 0.794, 0.794 V 15.978 z"/></g></svg>
<button class="btn-download bda-settings-button">Download</button>
<svg class="trashIcon" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20px" height="20px" fill="currentColor">
<path d="M 18.012, 0.648 H 12.98 C 12.944, 0.284, 12.637, 0, 12.264, 0 H 8.136 c -0.373, 0 -0.68, 0.284 -0.716, 0.648 H 2.389 c -0.398, 0 -0.72, 0.322 -0.72, 0.72 v 1.368 c 0, 0.398, 0.322, 0.72, 0.72, 0.72 h 15.623 c 0.398, 0, 0.72 -0.322, 0.72 -0.72 V 1.368 C 18.731, 0.97, 18.409, 0.648, 18.012, 0.648 z"></path>
<path d="M 3.178, 4.839 v 14.841 c 0, 0.397, 0.322, 0.72, 0.72, 0.72 h 12.604 c 0.398, 0, 0.72 -0.322, 0.72 -0.72 V 4.839 H 3.178 z M 8.449, 15.978 c 0, 0.438 -0.355, 0.794 -0.794, 0.794 c -0.438, 0 -0.794 -0.355 -0.794 -0.794 V 8.109 c 0 -0.438, 0.355 -0.794, 0.794 -0.794 c 0.438, 0, 0.794, 0.355, 0.794, 0.794 V 15.978 z M 13.538, 15.978 c 0, 0.438 -0.355, 0.794 -0.794, 0.794 s -0.794 -0.355 -0.794 -0.794 V 8.109 c 0 -0.438, 0.355 -0.794, 0.794 -0.794 c 0.438, 0, 0.794, 0.355, 0.794, 0.794 V 15.978 z"></path>
</svg>
<button class="btn-download bda-settings-button" style="margin-left: 0 !important;">Download</button>
</div>
</li>`;
@ -72,7 +86,7 @@ class ThemeRepo {
<div class="${BDFDB.disCN.backdrop}"></div>
<div class="${BDFDB.disCN.modal}">
<div class="${BDFDB.disCN.modalinner}">
<div class="${BDFDB.disCNS.modalsub + BDFDB.disCN.modalsizelarge}">
<div class="${BDFDB.disCN.modalsub}">
<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; padding: 20px 20px 0 20px;">
<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} themeAmount">Theme Repository</h4>
@ -111,7 +125,7 @@ class ThemeRepo {
</div>
</div>
<div tab="themes" class="${BDFDB.disCNS.scrollerwrap + BDFDB.disCNS.modalcontent + BDFDB.disCNS.scrollerthemed + BDFDB.disCN.themeghosthairline} tab-content">
<div class="${BDFDB.disCNS.scroller + BDFDB.disCNS.modalsubinner + BDFDB.disCN.standardsidebarview}">
<div class="${BDFDB.disCNS.scroller + BDFDB.disCN.modalsubinner}">
<ul class="${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.vertical + BDFDB.disCNS.directioncolumn + BDFDB.disCNS.justifystart + BDFDB.disCNS.alignstretch + BDFDB.disCN.nowrap} bda-slist themes" style="flex: 1 1 auto;"></ul>
</div>
</div>
@ -212,78 +226,51 @@ class ThemeRepo {
width: 100vw !important;
height: 100vh !important;
position: absolute !important;
z-index: 3400 !important;
z-index: 999 !important;
}
.discordPreview ~ ${BDFDB.dotCN.appmount} {
position: absolute !important;
top: 0 !important;
}
.themerepo-sort-popout,
.themerepo-order-popout,
.themerepo-favicon-tooltip,
.themerepo-giticon-tooltip {
z-index: 3600 !important;
}
.themerepo-modal {
position: relative !important;
z-index: 3500 !important;
.discordPreview ~ ${BDFDB.dotCNS.appmount + BDFDB.dotCN.app} {
opacity: 0 !important;
visibility: hidden !important;
}
.themerepo-modal ${BDFDB.dotCN.modalinner} {
min-height: 100%;
min-width: 800px;
width: 50%;
}
.themerepo-modal .themeEntry {
.themerepo-modal .themeEntry,
.themerepo-modal .themeEntry .bda-header {
overflow: visible !important;
}
.themerepo-modal .themeEntry .gitIcon,
.themerepo-modal .themeEntry .favIcon,
.themerepo-modal .themeEntry ${BDFDB.dotCN.giffavoritebutton},
.themerepo-modal .themeEntry .trashIcon {
margin-right: 5px;
cursor: pointer;
position: relative !important;
transform: none !important;
opacity: 1 !important;
margin-right: 5px !important;
cursor: pointer !important;
}
.themerepo-modal .themeEntry .gitIcon,
.themerepo-modal .themeEntry ${BDFDB.dotCN.giffavoritebutton}:not(${BDFDB.dotCN.giffavoriteselected}),
.themerepo-modal .themeEntry .trashIcon {
color: #4f545c !important;
}
${BDFDB.dotCN.themedark} .themerepo-modal .themeEntry .gitIcon,
${BDFDB.dotCN.themedark} .themerepo-modal .themeEntry ${BDFDB.dotCN.giffavoritebutton}:not(${BDFDB.dotCN.giffavoriteselected}),
${BDFDB.dotCN.themedark} .themerepo-modal .themeEntry .trashIcon {
color: #fff !important;
}
.themerepo-modal .themeEntry .trashIcon,
.themerepo-modal .themeEntry .favIcon {
margin-left: auto;
}
.themerepo-modal .themeEntry .favIcon path {
stroke: yellow;
fill: none;
}
.themerepo-modal .themeEntry .favIcon.favorized path {
stroke: yellow;
fill: yellow;
}
.themerepo-modal .themeEntry.downloadable .trashIcon {
display: none;
}
.themerepo-modal .themeEntry.downloadable .btn-download {
background-color: rgb(114, 137, 218) !important;
.themerepo-modal .themeEntry ${BDFDB.dotCN.giffavoritebutton} {
margin-left: auto !important;
}
.themerepo-modal .themeEntry.outdated .btn-download {
background-color: rgb(240, 71, 71) !important;
margin-left: 0 !important;
}
.themerepo-modal .themeEntry.updated .btn-download {
background-color: rgb(67, 181, 129) !important;
margin-left: 0 !important;
}
.themerepo-trashicon-tooltip{
z-index: 3500!important;
}
.themerepo-modal .themeEntry.jiiks .bda-right {
flex: 1 1 auto;
}
.themerepo-modal .themeEntry.jiiks .bda-header,
.themerepo-modal .themeEntry.jiiks .bda-footer {
display: flex;
align-items: center;
margin: 0 !important;
}
.themerepo-modal .themeEntry.jiiks .bda-footer {
margin-top: 33% !important;
}
.themerepo-modal .themeEntry.jiiks .previewCheckboxWrapper {
margin-right: 5px;
.themerepo-modal .themeEntry.downloadable .trashIcon {
opacity: 0 !important;
pointer-events: none !important;
}`;
}
@ -291,7 +278,7 @@ class ThemeRepo {
getDescription () {return "Allows you to preview all themes from the theme repo and download them on the fly. Repo button is in the theme settings.";}
getVersion () {return "1.5.9";}
getVersion () {return "1.6.4";}
getAuthor () {return "DevilBro";}
@ -416,7 +403,7 @@ class ThemeRepo {
clearInterval(this.updateInterval);
clearTimeout(this.loading.timeout);
$(".discordPreview, .themerepo-modal, .bd-themerepobutton, .themerepo-loadingicon").remove();
$(".discordPreview, .themerepo-modal, .themerepo-notice, .bd-themerepobutton, .themerepo-loadingicon").remove();
$(BDFDB.dotCN.app + " > .repo-loadingwrapper:empty").remove();
BDFDB.unloadMessage(this);
@ -526,7 +513,7 @@ class ThemeRepo {
var themeRepoModal = $(this.themeRepoModalMarkup);
themeRepoModal.updateModal = true;
themeRepoModal.enableSearch = false;
var hiddenSettings = BDFDB.loadAllData(this, "hidden");
var hiddenSettings = Object.assign({},BDFDB.loadAllData(this, "hidden"));
themeRepoModal.find("#input-darklight").prop("checked", lightTheme);
themeRepoModal.find("#input-customcss").prop("checked", false);
themeRepoModal.find("#input-themefixer").prop("checked", false);
@ -570,15 +557,17 @@ class ThemeRepo {
this.createThemeFile("ThemeFixer.theme.css", `//META{"name":"ThemeFixer","description":"ThemeFixerCSS for transparent themes","author":"DevilBro","version":"1.0.1"}*//\n\n` + this.themeFixerCSS);
})
.on("change." + this.getName(), ".hide-checkbox", (e) => {
var hideButton = $(e.currentTarget);
hiddenSettings[hideButton.val()] = hideButton.prop("checked");
BDFDB.saveAllData(hiddenSettings, this, "hidden");
BDFDB.saveData(e.currentTarget.value, e.currentTarget.checked, this, "hidden");
})
.on("change." + this.getName(), "#input-rnmstart", (e) => {
BDFDB.saveData("RNMstart", $(e.currentTarget).prop("checked"), this, "settings");
BDFDB.saveData("RNMstart", e.currentTarget.checked, this, "settings");
})
.on("click." + this.getName(), ".tab[tab=themes]:not(.selected)", (e) => {
this.addThemeEntries(themeRepoModal, frame);
var newHiddenSettings = BDFDB.loadAllData(this, "hidden");
if (!BDFDB.equals(newHiddenSettings, hiddenSettings)) {
hiddenSettings = Object.assign({},newHiddenSettings);
this.addThemeEntries(themeRepoModal, frame);
}
});
$(document).off("keyup." + this.getName())
@ -658,34 +647,17 @@ class ThemeRepo {
for (let url in this.loadedThemes) {
let theme = this.loadedThemes[url];
let div = $(this.themeEntryMarkup);
var installedTheme = window.bdthemes[this.loadedThemes[url].name];
if (installedTheme && installedTheme.author.toUpperCase() == theme.author.toUpperCase()) {
if (installedTheme.version != theme.version) {
theme.state = 1;
div.addClass("outdated")
.find(".btn-download").text("Outdated");
}
else {
theme.state = 0;
div.addClass("updated")
.find(".btn-download").text("Updated");
}
theme.state = installedTheme.version != theme.version ? 1 : 0;
}
else {
theme.state = 2;
div.addClass("downloadable")
.find(".btn-download").text("Download");
}
if (favorites[url]) {
theme.fav = 0;
div.find(".favIcon")[0].classList.add("favorized");
}
else {
theme.fav = 1;
div.find(".favIcon")[0].classList.remove("favorized");
}
this.setEntryDivState(div, theme.state);
theme.fav = !!favorites[url] ? 0 : 1;
div.find(BDFDB.dotCN.giffavoritebutton).toggleClass(BDFDB.disCN.giffavoriteselected, !!favorites[url]);
modal.entries.push({
div: div,
url: theme.url,
@ -740,16 +712,11 @@ class ThemeRepo {
});
frame.contentWindow.postMessage({origin:"ThemeRepo",reason:"NewTheme",checked:$(e.target).prop("checked"),css:entry.css},"*");
})
.on("click." + this.getName(), ".favIcon", (e) => {
e.currentTarget.classList.toggle("favorized");
if (e.currentTarget.classList.contains("favorized")) {
entry.fav = 0;
BDFDB.saveData(entry.url, true, this, "favorites");
}
else {
entry.fav = 1;
BDFDB.removeData(entry.url, this, "favorites");
}
.on("click." + this.getName(), BDFDB.dotCN.giffavoritebutton, (e) => {
let favorize = entry.fav == 1;
entry.fav = favorize ? 0 : 1;
if (favorize) BDFDB.saveData(entry.url, true, this, "favorites");
else BDFDB.removeData(entry.url, this, "favorites");
})
.on("click." + this.getName(), ".gitIcon", (e) => {
var giturl = null;
@ -761,20 +728,23 @@ class ThemeRepo {
else if (entry.url.indexOf("https://gist.githubusercontent.com/") == 0) {
giturl = entry.url.replace("//gist.githubusercontent", "//gist.github").split("/raw/")[0];
}
if (giturl) {
window.open(giturl, "_blank");
}
if (giturl) window.open(giturl, "_blank");
})
.on("click." + this.getName(), ".trashIcon", () => {
if (div.hasClass("outdated") || div.hasClass("updated")) {
entry.state = 2;
div.removeClass("outdated").removeClass("updated").addClass("downloadable")
.find(".btn-download").text("Download");
this.setEntryDivState(div, entry.state);
this.deleteThemeFile(entry);
if (!BDFDB.isRestartNoMoreEnabled()) this.removeTheme(entry);
}
})
.on("mouseenter." + this.getName(), ".favIcon", (e) => {
.on("click." + this.getName(), ".btn-download", () => {
entry.state = 0;
this.setEntryDivState(div, entry.state);
this.downloadTheme(entry);
if (modal.find("#input-rnmstart").prop("checked")) setTimeout(() => {this.applyTheme(entry);},3000);
})
.on("mouseenter." + this.getName(), BDFDB.dotCN.giffavoritebutton, (e) => {
BDFDB.createTooltip("Favorize", e.currentTarget, {type:"top",selector:"themerepo-favicon-tooltip"});
})
.on("mouseenter." + this.getName(), ".gitIcon", (e) => {
@ -782,19 +752,22 @@ class ThemeRepo {
})
.on("mouseenter." + this.getName(), ".trashIcon", (e) => {
BDFDB.createTooltip("Delete Themefile", e.currentTarget, {type:"top",selector:"themerepo-trashicon-tooltip"});
})
.on("click." + this.getName(), ".btn-download", () => {
entry.state = 0;
this.downloadTheme(entry);
div.removeClass("downloadable").removeClass("outdated").addClass("updated")
.find(".btn-download").text("Updated");
if (modal.find("#input-rnmstart").prop("checked")) setTimeout(() => {this.applyTheme(entry);},3000);
});
container.append(div);
});
}
setEntryDivState (div, state) {
div
.toggleClass("downloadable", state > 1)
.toggleClass("outdated", state == 1)
.toggleClass("updated", state < 1)
.find(".btn-download")
.text(state < 1 ? "Updated" : (state > 1 ? "Download" : "Outdated"))
.get(0).style.setProperty("background-color", "rgb(" + (state < 1 ? "67,181,129" : (state > 1 ? "114,137,218" : "241,71,71")) + ")", "important");
}
loadThemes () {
var getThemeInfo, outdated = 0, i = 0;
var tags = ["name","description","author","version"];
@ -844,7 +817,7 @@ class ThemeRepo {
let wrongUrls = [];
for (let url of this.foundThemes) if (url && !this.loadedThemes[url] && !wrongUrls.includes(url)) wrongUrls.push(url);
if (wrongUrls.length > 0) {
var bar = BDFDB.createNotificationsBar(`ThemeRepo: ${wrongUrls.length} Theme${wrongUrls.length > 1 ? "s" : ""} could not be loaded.`, {type:"danger",btn:"List"});
var bar = BDFDB.createNotificationsBar(`ThemeRepo: ${wrongUrls.length} Theme${wrongUrls.length > 1 ? "s" : ""} could not be loaded.`, {type:"danger",btn:"List",selector:"themerepo-notice"});
$(bar).on("click." + this.getName(), BDFDB.dotCN.noticebutton, (e) => {
var toast = BDFDB.showToast(wrongUrls.join("\n"),{type:"error"});
toast.style.overflow = "hidden";