For 0.2.8 and fixed settings import
This commit is contained in:
parent
9b4f2bac09
commit
6d16dea9ac
Binary file not shown.
After Width: | Height: | Size: 170 KiB |
|
@ -144,6 +144,7 @@
|
|||
<None Include="Resources\bd_logo_large_nobg.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="BetterDiscord-icon.ico" />
|
||||
<Content Include="Resources\BetterDiscord-icon.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
|
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.2.6.0")]
|
||||
[assembly: AssemblyFileVersion("0.2.6.0")]
|
||||
[assembly: AssemblyVersion("0.2.8.0")]
|
||||
[assembly: AssemblyFileVersion("0.2.8.0")]
|
||||
|
|
132
css/main.css
132
css/main.css
|
@ -1202,6 +1202,138 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
#bd-pane .tab-bar.TOP {
|
||||
margin-bottom:0;
|
||||
}
|
||||
|
||||
#bd-settings-pane {
|
||||
margin-top:18px;
|
||||
}
|
||||
|
||||
.bda-slist-top {
|
||||
height:25px;
|
||||
flex-grow:1;
|
||||
}
|
||||
|
||||
.bda-slist-top > .btn {
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
font-size: 13px;
|
||||
padding: 6px;
|
||||
padding-top: 0;
|
||||
margin-left:5px !important;
|
||||
float:right;
|
||||
}
|
||||
|
||||
.bda-slist li {
|
||||
background:#F3F3F3;
|
||||
padding:5px;
|
||||
border-bottom:1px solid #ADADAD;
|
||||
min-height:116px;
|
||||
max-height:116px;
|
||||
}
|
||||
|
||||
.bda-slist li:nth-child(odd) {
|
||||
background:#F3F3F3;
|
||||
border-top:1px solid #FFF;
|
||||
}
|
||||
|
||||
.bda-slist .bda-name {
|
||||
color:#87909C;
|
||||
font-weight:700;
|
||||
font-size:12px;
|
||||
}
|
||||
|
||||
.bda-slist .bda-description {
|
||||
margin-top:5px;
|
||||
color:#4E4E4E;
|
||||
width:400px;
|
||||
overflow-y:scroll;
|
||||
min-height:90px;
|
||||
max-height:90px;
|
||||
border-top:1px solid #DADADA;
|
||||
padding-top:5px;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.bda-slist .scroller::-webkit-scrollbar-track-piece,
|
||||
.bda-slist .scroller::-webkit-scrollbar-thumb {
|
||||
border-radius:0 !important;
|
||||
border-color:transparent;
|
||||
}
|
||||
|
||||
.bda-slist .bda-left {
|
||||
width:400px;
|
||||
display:inline-block;
|
||||
}
|
||||
|
||||
.bda-slist .bda-right {
|
||||
display:inline-block;
|
||||
float:right;
|
||||
}
|
||||
|
||||
.bda-slist .checkbox {
|
||||
margin-left:18px;
|
||||
}
|
||||
|
||||
.bda-slist .checkbox:before {
|
||||
content: "Enabled";
|
||||
color:#87909C;
|
||||
margin-right:5px;
|
||||
font-weight:600;
|
||||
}
|
||||
|
||||
.bda-slist .bda-right .btn {
|
||||
height: 30px;
|
||||
width:100px;
|
||||
line-height: 12px;
|
||||
margin-left:0;
|
||||
text-align:center;
|
||||
display:block;
|
||||
}
|
||||
|
||||
.bda-slist .bda-right .bda-plugin-reload {
|
||||
margin-top:35px;
|
||||
}
|
||||
|
||||
.bda-slist .bda-right .bda-plugin-settings {
|
||||
margin-top:5px;
|
||||
}
|
||||
|
||||
#bd-themes-pane .bda-plugin-reload {
|
||||
margin-top:70px;
|
||||
}
|
||||
|
||||
.chat .title-wrap, .guild-header header {
|
||||
background: rgba(25, 62, 90, 0.91) !important;
|
||||
}
|
||||
|
||||
.guilds-wrapper:before {
|
||||
background: rgba(25, 62, 90, 0.91) !important;
|
||||
min-height:48px !important;
|
||||
width:60px;
|
||||
content: " ";
|
||||
display:block;
|
||||
}
|
||||
|
||||
.guilds-wrapper ul {
|
||||
padding-top:5px;
|
||||
}
|
||||
|
||||
.bda-backdrop {
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
right:0;
|
||||
bottom:0;
|
||||
z-index:1000;
|
||||
background:rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.bd-settings {
|
||||
max-width:516px;
|
||||
}
|
||||
|
||||
.bda-dark #bda-qem-favourite-container, .bda-dark #bda-qem-twitch-container {
|
||||
background-color: #353535;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
61
js/main.js
61
js/main.js
|
@ -1477,7 +1477,7 @@ SettingsPanel.prototype.construct = function () {
|
|||
</div>\
|
||||
<div class="tab-bar-item bd-tab" id="bd-themes-tab" onclick=\'settingsPanel.changeTab("bd-themes-tab");\'>Themes\
|
||||
</div>\
|
||||
<div class="bda-slist-top" style="position:absolute; right:15px;">\
|
||||
<div class="bda-slist-top">\
|
||||
<button class="btn btn-primary" onclick="utils.exportSettings(); return false;">Export</button>\
|
||||
<button class="btn btn-primary" onclick="utils.importSettings(); return false;">Import</button>\
|
||||
</div>\
|
||||
|
@ -1594,7 +1594,7 @@ SettingsPanel.prototype.construct = function () {
|
|||
<div class="bda-right">\
|
||||
<div class="checkbox" onclick="pluginModule.handlePlugin(this);">\
|
||||
<div class="checkbox-inner">\
|
||||
<input id="'+plugin.getName()+'" type="checkbox" '+(pluginCookie[plugin.getName()] ? "checked" : "")+'>\
|
||||
<input id="'+plugin.getName().replace(" ", "__")+'" type="checkbox" '+(pluginCookie[plugin.getName()] ? "checked" : "")+'>\
|
||||
<span></span>\
|
||||
</div>\
|
||||
<span></span>\
|
||||
|
@ -1637,9 +1637,9 @@ SettingsPanel.prototype.construct = function () {
|
|||
</div>\
|
||||
</div>\
|
||||
<div class="bda-right">\
|
||||
<div class="checkbox" onclick="pluginModule.handlePlugin(this);">\
|
||||
<div class="checkbox" onclick="themeModule.handleTheme(this);">\
|
||||
<div class="checkbox-inner">\
|
||||
<input id="'+this["name"]+'" type="checkbox" '+(themeCookie[this["name"]] ? "checked" : "")+'>\
|
||||
<input id="ti'+this["name"]+'" type="checkbox" '+(themeCookie[this["name"]] ? "checked" : "")+'>\
|
||||
<span></span>\
|
||||
</div>\
|
||||
<span></span>\
|
||||
|
@ -1812,12 +1812,61 @@ Utils.prototype.importSettings = function() {
|
|||
}
|
||||
localStorage["bdcustomcss"] = obj.customCss;
|
||||
var ccss = atob(localStorage.getItem("bdcustomcss"));
|
||||
if (!customCssInitialized) {
|
||||
customCssEditor.init();
|
||||
customCssInitialized = true;
|
||||
}
|
||||
customCssEditor.applyCustomCss(ccss, settingsCookie["bda-css-0"], false);
|
||||
customCssEditor.editor.setValue(ccss);
|
||||
}catch(err) {
|
||||
mainCore.alert("Invalid Data", err);
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
$.each(obj.plugins, function(plugin) {
|
||||
var enabled = obj.plugins[plugin];
|
||||
if(bdplugins.hasOwnProperty(plugin)) {
|
||||
pluginCookie[plugin] = enabled;
|
||||
var cb = $("#"+plugin.replace(" ", "__"));
|
||||
if(cb.is(":checked") && !enabled) {
|
||||
bdplugins[plugin]["plugin"].stop();
|
||||
cb.prop("checked", false);
|
||||
}
|
||||
if(!cb.is(":checked") && enabled) {
|
||||
bdplugins[plugin]["plugin"].start();
|
||||
cb.prop("checked", true);
|
||||
}
|
||||
}
|
||||
});
|
||||
pluginModule.savePluginData();
|
||||
}catch(err) {
|
||||
mainCore.alert("Failed to load plugin data", err);
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
themeCookie = obj.themes;
|
||||
$.each(themeCookie, function(theme) {
|
||||
var enabled = themeCookie[theme];
|
||||
var id = "#ti" + theme;
|
||||
if(bdthemes.hasOwnProperty(theme)) {
|
||||
if($(id).is(":checked") && !enabled) {
|
||||
$(id).prop("checked", false);
|
||||
$("#"+theme).remove();
|
||||
}
|
||||
if(!$(id).is(":checked") && enabled) {
|
||||
$(id).prop("checked", true);
|
||||
$("head").append('<style id="' + theme + '">' + unescape(bdthemes[theme]["css"]) + '</style>');
|
||||
}
|
||||
}
|
||||
});
|
||||
themeModule.saveThemeData();
|
||||
}catch(err) {
|
||||
mainCore.alert("Failed to load theme data", err);
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
@ -1826,7 +1875,7 @@ Utils.prototype.exportSettings = function() {
|
|||
var obj = {
|
||||
settings: settingsCookie,
|
||||
customCss: localStorage["bdcustomcss"],
|
||||
plugins: bdplugins,
|
||||
plugins: pluginCookie,
|
||||
themes: themeCookie,
|
||||
favEmotes: window.localStorage["bdfavemotes"]
|
||||
};
|
||||
|
@ -1928,7 +1977,7 @@ PluginModule.prototype.handlePlugin = function (checkbox) {
|
|||
|
||||
var cb = $(checkbox).children().find('input[type="checkbox"]');
|
||||
var enabled = !cb.is(":checked");
|
||||
var id = cb.attr("id");
|
||||
var id = cb.attr("id").replace("__", " ");
|
||||
cb.prop("checked", enabled);
|
||||
|
||||
if (enabled) {
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue