Fix panel positions

This commit is contained in:
the1812 2019-11-12 21:05:48 +08:00
parent 3202c0f49b
commit 334fbfda43
13 changed files with 27 additions and 21 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
min/about.min.css vendored
View File

@ -1 +1 @@
.bilibili-evolved-about{height:100%;width:450px;background:#fff;color:#000;position:fixed;top:0;left:0;z-index:100000;transform:translateX(-101%);transition:.3s cubic-bezier(0,.86,.58,1);display:flex;flex-direction:column;box-shadow:4px 0 16px 0 #0000}body.dark .bilibili-evolved-about{background:#222;color:#eee}.bilibili-evolved-about.opened{transform:translateX(0);box-shadow:4px 0 16px 0 #0005}.about-header{padding:32px;display:flex;align-items:center;justify-content:flex-start}.about-header i{margin-right:8px;display:flex}.about-title{font-size:16pt}.about-content{padding:16px 36px 0;margin-bottom:36px;display:flex;flex-direction:column;overflow:auto}.about-content .name{font-size:24pt;display:none;align-items:center}.about-content .name svg{width:100%}body.dark .about-content .name.dark,body:not(.dark) .about-content .name.light{display:flex}.about-content .version{font-size:10pt;font-weight:700;opacity:.6;margin-top:6px;margin-bottom:6px;align-self:center}.about-content .love{font-size:10pt;margin-bottom:24px;align-self:center}.about-content .love a{color:inherit!important}.about-content section{font-size:10pt;margin-top:16px}.about-content section .title{display:flex;justify-content:center;text-transform:uppercase;font-weight:700;font-size:13pt;letter-spacing:3px;margin:8px 0 16px}.about-content section .supporter,.about-content section a{color:var(--theme-color)!important;margin-right:8px;display:inline-flex}.about-content section .supporter{user-select:none}.about-content section .supporter:not(:last-child)::after,.about-content section a:not(:last-child)::after{content:","}@keyframes spinner{to{transform:translate(-50%,-50%) rotate(360deg)}}.about-content section.participants .fetching{margin-right:8px;position:relative;display:inline-flex}.about-content section.participants .fetching::before{content:"Loading..."}
.bilibili-evolved-about{height:100%;width:450px;background:#fff;color:#000;position:fixed;top:0;left:0;z-index:100000;transform:translateX(-101%);transition:.3s cubic-bezier(0,.86,.58,1);display:flex;flex-direction:column;box-shadow:4px 0 16px 0 #0000}.gui-settings-dock-right .bilibili-evolved-about{right:0;left:unset;transform:translateX(101%)}body.dark .bilibili-evolved-about{background:#222;color:#eee}.bilibili-evolved-about.opened,.gui-settings-dock-right .bilibili-evolved-about.opened{transform:translateX(0);box-shadow:4px 0 16px 0 #0005}.about-header{padding:32px;display:flex;align-items:center;justify-content:flex-start}.about-header i{margin-right:8px;display:flex}.about-title{font-size:16pt}.about-content{padding:16px 36px 0;margin-bottom:36px;display:flex;flex-direction:column;overflow:auto}.about-content .name{font-size:24pt;display:none;align-items:center}.about-content .name svg{width:100%}body.dark .about-content .name.dark,body:not(.dark) .about-content .name.light{display:flex}.about-content .version{font-size:10pt;font-weight:700;opacity:.6;margin-top:6px;margin-bottom:6px;align-self:center}.about-content .love{font-size:10pt;margin-bottom:24px;align-self:center}.about-content .love a{color:inherit!important}.about-content section{font-size:10pt;margin-top:16px}.about-content section .title{display:flex;justify-content:center;text-transform:uppercase;font-weight:700;font-size:13pt;letter-spacing:3px;margin:8px 0 16px}.about-content section .supporter,.about-content section a{color:var(--theme-color)!important;margin-right:8px;display:inline-flex}.about-content section .supporter{user-select:none}.about-content section .supporter:not(:last-child)::after,.about-content section a:not(:last-child)::after{content:","}@keyframes spinner{to{transform:translate(-50%,-50%) rotate(360deg)}}.about-content section.participants .fetching{margin-right:8px;position:relative;display:inline-flex}.about-content section.participants .fetching::before{content:"Loading..."}

View File

@ -1,5 +1,5 @@
{
"about.min.css": "A43C276DD6D36012DF6604E5247642922F1B550DEBE8C63C9E2EF2DD29C0A947",
"about.min.css": "ADA956EC9D9333A72F820DBD140B3D691ECD1EACD6D9C974927B3CE9F118663A",
"about.min.html": "E44CC2091973A839E5A533B397EF8C78DD573DAB9AF0C4D19E63748DCB9450DB",
"about.min.js": "D370F647A4845E0704666BE88104E89738231A63AA1FCAB272898072E4665DE4",
"activity-apis.min.js": "459D26DB0BB447FEFE6F1842541A119E67C63573A800E56AD7FEC71D20087CEF",
@ -70,9 +70,9 @@
"full-page-title.min.js": "5399D56E21336A2A4473F75167755EA3DE7B0146A9285D2B8FB201E44972B921",
"full-tweets-title.min.css": "13A0CF1C96F374CED3FA59A532E28B4B620D7A4C374385A363F32AD1A7656764",
"full-tweets-title.min.js": "DD57BB732ABEF7739CA84AEFF97E86F8984FCC4A8A75B957213622350B2A7C37",
"gui-settings.min.css": "DEC04253DEC3FB1771713BC5DADD1A663ACCA0C7EE1CEBD52BB6FC85D318DBBF",
"gui-settings.min.css": "5E8B45124CFC7C4AE69C90E7462A918C59DC90EB5DB3B1AFA90010D96813D1EF",
"gui-settings.min.html": "7FE13B0ECDC414B8AD0668F4B4D752F95A586A540337443A2D222D2B711F4CC9",
"gui-settings.min.js": "6868F7F72B3993D899A24B51A773DE1DBEB657638322C2FE28E4FAF1841A2A48",
"gui-settings.min.js": "F16F00703C27B37A75255444D3C255222857FD8D5061598D80174B56F2F1EC6A",
"haruna-scale.min.js": "D046864416831B101582DD87E602AE21309FDE2DB64A8F24D57B6ADBE67E6D7B",
"hide-bangumi-reviews.min.js": "7265C0CE994FDA926355A9A4F9B207E7E68E749D47332F3C537EF93E97927A23",
"hide-bangumi-sponsors.min.js": "C862B67D5FC1DDC46412F5595A0B900A58F7A6D6E55A2464B6525DCB4D935FE7",

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(()=>{return(e,t)=>{const{ThemeColors:n}=t.import("theme-colors");const{SettingsSearch:i}=t.import("settings-search");const{Validator:s}=t.import("text-validate");let o=[];let c=[];let a=[];function r(e){let t=e.nextElementSibling;const n=[];while(t!==null&&!t.classList.contains("category")){n.push(t);t=t.nextElementSibling}return n}function l(){a.forEach(t=>t.value=e[t.getAttribute("key")]);c.forEach(t=>t.checked=e[t.getAttribute("key")])}function d(){document.querySelector(".gui-settings-mask").addEventListener("click",()=>{document.querySelectorAll(".gui-settings-widgets-box,.gui-settings-box,.gui-settings-mask,.bilibili-evolved-about").forEach(e=>e.classList.remove("opened"))});a.forEach(t=>{t.setAttribute("placeholder",e[t.getAttribute("key")])});document.querySelectorAll(".gui-settings-content ul li.category").forEach(e=>{e.addEventListener("click",e=>{const t=document.querySelector(".gui-settings-search");if(t.value!==""){t.value="";raiseEvent(t,"input")}e.currentTarget.classList.toggle("folded");r(e.currentTarget).forEach(e=>e.classList.toggle("folded"))})});document.querySelectorAll(".gui-settings-dropdown>input").forEach(e=>{e.addEventListener("click",e=>{e.currentTarget.parentElement.classList.toggle("opened")})})}function u(){c.forEach(t=>{t.addEventListener("change",()=>{const n=t.getAttribute("key");const i=t.checked;e[n]=i})});a.forEach(t=>{t.addEventListener("change",()=>{const n=t.getAttribute("key");const i=s.getValidator(n).validate(t.value);e[n]=i;t.value=i})})}function g(){const e=o.map(e=>[e.getAttribute("dependencies").split(" ").map(e=>o.find(t=>t.getAttribute("key")===e)),e]);const t=e=>e.nodeName.toUpperCase()==="LI"?e:t(e.parentElement);e.forEach(([e,n])=>{if(e[0]===undefined){return}const i=()=>{if(e.every(e=>e.checked)){t(n).classList.remove("disabled")}else{t(n).classList.add("disabled")}};e.forEach(e=>e.addEventListener("change",i));i()})}function f(){if(typeof offlineData!=="undefined"){}}function m(){if(window.devicePixelRatio===1){o.find(e=>e.getAttribute("key")==="harunaScale").disabled=true;o.find(e=>e.getAttribute("key")==="imageResolution").disabled=true;e.harunaScale=false;e.imageResolution=false}}function p(){for(const[e,t]of Object.entries(Resource.displayNames)){const n=o.find(t=>t.getAttribute("key")===e);if(!n){continue}switch(n.type){case"checkbox":n.nextElementSibling.nextElementSibling.innerHTML=t;break;case"text":const e=n.parentElement;if(e.classList.contains("gui-settings-textbox-container")){n.previousElementSibling.innerHTML=t}else if(e.classList.contains("gui-settings-dropdown")){e.previousElementSibling.innerHTML=t}break;default:break}}}(async()=>{t.applyStyle("guiSettingsStyle");t.applyImportantStyle("iconsStyle");document.body.classList.add("round-corner");const s=document.body&&unsafeWindow.parent.window!==unsafeWindow;if(s){document.querySelector(".gui-settings-icon-panel").style.display="none"}if(e.guiSettingsDockSide==="右侧"){document.body.classList.add("gui-settings-dock-right")}const r=t.data.guiSettingsHtml.text;document.body.insertAdjacentHTML("beforeend",r);const{style:y}=await t.importAsync("mdi");if(!y){document.body.insertAdjacentHTML("afterbegin",`<link rel="stylesheet" href="//cdn.materialdesignicons.com/3.6.95/css/materialdesignicons.min.css">`)}const b=document.querySelector(".widgets-container");const h=b.querySelector(".empty-tip");Observer.childList(b,()=>{if(b.childElementCount<=1){h.classList.add("show")}else{h.classList.remove("show")}});const E=document.querySelectorAll(".gui-settings-widgets-box,.gui-settings-box");const S=document.querySelector(".gui-settings-icon-panel");S.addEventListener("mouseover",async()=>{const{loadTooltip:e}=await t.importAsync("settings-tooltip.loader");await e();await t.applyDropdownOptions();t.applyWidgets();raiseEvent(S,"be:load");const s=dq(".bilibili-evolved-about");if(s){raiseEvent(s,"be:about-load")}(new n).setupDom();E.forEach(e=>e.classList.add("loaded"));o=[...document.querySelectorAll("input[key]")];c=o.filter(e=>e.type==="checkbox");a=o.filter(e=>e.type==="text"&&!e.parentElement.classList.contains("gui-settings-dropdown"));d();f();l();g();u();m();p();addSettingsListener("guiSettingsDockSide",e=>{document.body.classList[e==="右侧"?"add":"remove"]("gui-settings-dock-right")});new i},{once:true})})()}})();
(()=>{return(e,t)=>{const{ThemeColors:n}=t.import("theme-colors");const{SettingsSearch:i}=t.import("settings-search");const{Validator:s}=t.import("text-validate");let o=[];let c=[];let a=[];function l(e){let t=e.nextElementSibling;const n=[];while(t!==null&&!t.classList.contains("category")){n.push(t);t=t.nextElementSibling}return n}function r(){a.forEach(t=>t.value=e[t.getAttribute("key")]);c.forEach(t=>t.checked=e[t.getAttribute("key")])}function d(){document.querySelector(".gui-settings-mask").addEventListener("click",()=>{document.querySelectorAll(".gui-settings-widgets-box,.gui-settings-box,.gui-settings-mask,.bilibili-evolved-about").forEach(e=>e.classList.remove("opened"))});a.forEach(t=>{t.setAttribute("placeholder",e[t.getAttribute("key")])});document.querySelectorAll(".gui-settings-content ul li.category").forEach(e=>{e.addEventListener("click",e=>{const t=document.querySelector(".gui-settings-search");if(t.value!==""){t.value="";raiseEvent(t,"input")}e.currentTarget.classList.toggle("folded");l(e.currentTarget).forEach(e=>e.classList.toggle("folded"))})});document.querySelectorAll(".gui-settings-dropdown>input").forEach(e=>{e.addEventListener("click",e=>{e.currentTarget.parentElement.classList.toggle("opened")})})}function u(){c.forEach(t=>{t.addEventListener("change",()=>{const n=t.getAttribute("key");const i=t.checked;e[n]=i})});a.forEach(t=>{t.addEventListener("change",()=>{const n=t.getAttribute("key");const i=s.getValidator(n).validate(t.value);e[n]=i;t.value=i})})}function g(){const e=o.map(e=>[e.getAttribute("dependencies").split(" ").map(e=>o.find(t=>t.getAttribute("key")===e)),e]);const t=e=>e.nodeName.toUpperCase()==="LI"?e:t(e.parentElement);e.forEach(([e,n])=>{if(e[0]===undefined){return}const i=()=>{if(e.every(e=>e.checked)){t(n).classList.remove("disabled")}else{t(n).classList.add("disabled")}};e.forEach(e=>e.addEventListener("change",i));i()})}function f(){if(typeof offlineData!=="undefined"){}}function m(){if(window.devicePixelRatio===1){o.find(e=>e.getAttribute("key")==="harunaScale").disabled=true;o.find(e=>e.getAttribute("key")==="imageResolution").disabled=true;e.harunaScale=false;e.imageResolution=false}}function p(){for(const[e,t]of Object.entries(Resource.displayNames)){const n=o.find(t=>t.getAttribute("key")===e);if(!n){continue}switch(n.type){case"checkbox":n.nextElementSibling.nextElementSibling.innerHTML=t;break;case"text":const e=n.parentElement;if(e.classList.contains("gui-settings-textbox-container")){n.previousElementSibling.innerHTML=t}else if(e.classList.contains("gui-settings-dropdown")){e.previousElementSibling.innerHTML=t}break;default:break}}}(async()=>{t.applyStyle("guiSettingsStyle");t.applyImportantStyle("iconsStyle");document.body.classList.add("round-corner");const s=document.body&&unsafeWindow.parent.window!==unsafeWindow;if(s){document.querySelector(".gui-settings-icon-panel").style.display="none"}if(e.guiSettingsDockSide==="右侧"){document.body.classList.add("gui-settings-dock-right")}const l=t.data.guiSettingsHtml.text;document.body.insertAdjacentHTML("beforeend",l);const{style:y}=await t.importAsync("mdi");if(!y){document.body.insertAdjacentHTML("afterbegin",`<link rel="stylesheet" href="//cdn.materialdesignicons.com/3.6.95/css/materialdesignicons.min.css">`)}const b=document.querySelector(".widgets-container");const h=b.querySelector(".empty-tip");Observer.childList(b,()=>{if(b.childElementCount<=1){h.classList.add("show")}else{h.classList.remove("show")}});const E=document.querySelectorAll(".gui-settings-widgets-box,.gui-settings-box");const S=document.querySelector(".gui-settings-icon-panel");S.addEventListener("mouseover",async()=>{const{loadTooltip:e}=await t.importAsync("settings-tooltip.loader");await e();await t.applyDropdownOptions();t.applyWidgets();raiseEvent(S,"be:load");const s=dq(".bilibili-evolved-about");if(s){raiseEvent(s,"be:about-load")}(new n).setupDom();E.forEach(e=>e.classList.add("loaded"));o=[...document.querySelectorAll("input[key]")];c=o.filter(e=>e.type==="checkbox");a=o.filter(e=>e.type==="text"&&!e.parentElement.classList.contains("gui-settings-dropdown"));d();f();r();g();u();m();p();addSettingsListener("guiSettingsDockSide",e=>{document.body.classList.toggle("gui-settings-dock-right",e==="右侧")});new i},{once:true})})()}})();

View File

@ -13,10 +13,16 @@
flex-direction: column;
box-shadow: 4px 0px 16px 0px #0000;
}
.gui-settings-dock-right .bilibili-evolved-about {
right: 0;
left: unset;
transform: translateX(101%);
}
body.dark .bilibili-evolved-about {
background: #222;
color: #eee;
}
.gui-settings-dock-right .bilibili-evolved-about.opened,
.bilibili-evolved-about.opened {
transform: translateX(0);
box-shadow: 4px 0px 16px 0px #0005;

View File

@ -15,7 +15,7 @@
.gui-settings-widgets-box {
right: 0;
left: unset;
transform: translateX(100%);
transform: translateX(101%);
&.opened {
transform: translateX(0);
}

View File

@ -178,7 +178,7 @@ function setDisplayNames () {
checkCompatibility()
setDisplayNames()
addSettingsListener('guiSettingsDockSide', value => {
document.body.classList[value === '右侧' ? 'add' : 'remove']('gui-settings-dock-right')
document.body.classList.toggle('gui-settings-dock-right', value === '右侧')
})
new SettingsSearch()
}, { once: true })

View File

@ -470,7 +470,7 @@ li.category.folded i.icon-arrow {
position: fixed;
top: 0;
left: 0;
z-index: 100000;
z-index: 100001;
transform: translateX(-101%);
transition: all 0.3s cubic-bezier(0, 0.86, 0.58, 1);
display: none;