From bc4aa67fee504451bfa80a5f72499532ee3b6544 Mon Sep 17 00:00:00 2001 From: Handle Date: Thu, 17 Jan 2019 22:48:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BE=9B=E4=BA=86=E5=87=A0=E4=B8=AA?= =?UTF-8?q?=E9=80=89=E9=A1=B9=E7=9A=84=E5=8F=AF=E8=A7=86=E5=8C=96=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configs.js | 3 +- index.js | 2 +- manager/iconfont.eot | Bin 5772 -> 6096 bytes manager/iconfont.ttf | Bin 5604 -> 5928 bytes manager/iconfont.woff | Bin 3856 -> 4068 bytes manager/index.html | 18 +++++- manager/manager.js | 48 +++++++++++++++ manager/style.css | 133 +++++++++++++++++++++++++++++------------ manager/style.scss | 134 ++++++++++++++++++++++++++++++------------ package.json | 2 +- 10 files changed, 263 insertions(+), 77 deletions(-) diff --git a/configs.js b/configs.js index 7a2554f..b1df250 100644 --- a/configs.js +++ b/configs.js @@ -34,7 +34,8 @@ const CONFIGS = { }, autoHideMenuBar: true, useContentSize: true, - icon: getIcon() + icon: getIcon(), + enableLargerThanScreen: true }, MANAGER_WINDOW_CONFIG: { width: 1280, // + 16, diff --git a/index.js b/index.js index 80aa197..4f15263 100644 --- a/index.js +++ b/index.js @@ -322,7 +322,7 @@ const windowControl = { 'file://' + path.join(toolInfo.filesDir, indexPage) ) case 'update-user-config': - userConfigs = require('configs-user.json') + userConfigs = require('./configs-user.json') break default: break diff --git a/manager/iconfont.eot b/manager/iconfont.eot index 8391fd8ebb5169b6677d843a78d047394e445db7..1c4609c5acd8b9a9b7dd816966710f05474a61a3 100644 GIT binary patch delta 896 zcmZ9KNlX)A6vzK>W;(S{rgUfrFbFMWu|)w{Ms^#*0TT}PBqp}?4dcoA^81#z{NI~z=F#cxI(fSg zI9a$L>(c6a(ab{d`F!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q^eT_<~zBukcUF43-sP+p44^Mb7LJFrE^&CQw({D4{0 zu5&-bLz}RmZjgbeJYg#A2(N{eU|6&S^P>BX!N}>=g6#299RwVtm}kL;L>;>~uxcaD z!ev+nhobt{Y;YUZJm4eN#0{!u`=SGc6%9+^pjX3Uhzc5(Mf6z128hNrY=!8BhD{N@ z)UZ9`V>k%nv_@StUeItj#LN79>ccq^vyehfOu1|H7~g~xJt8!R%sne(J+}w#RXHf% n%Rj){t~DdpX6la|!wX93HW%{ASiW2ul~aCU-X9A-rJwx=W#E5w diff --git a/manager/iconfont.woff b/manager/iconfont.woff index 68e7552270c1dbce850a3972c7136356acb7b2a7..a6dfd615a1184e3047830d287807c2e0a459609a 100644 GIT binary patch delta 3544 zcmV;}4JY!D9^@YscTYw}00961000l<01E&B000*#krYdR;Q#;vq8V}GLT7AwW&i*J zWB>pP-2ea%{AMl-I%s8KWB>pSL;wH)F#rGnHWTozD`;qCVE_OPcmMzZAOHXWBnRRH zmuPKtcmMzmm;e9(7ytkOL_`Mv|7>q#VE_OPumAu6Bme*aBp(hU_HAK!Z~y=e)Bpeg z9{>OVAORvO0IhCeZDjxe4fFs20Yv}+0&PB2{(W$7b94Xz4?F+>0H*)|0NY3wz89Vdo6#cbrX;-~xE` zB8{z?Sn~|v8NiHulMF~_BzXKXo5uVMZ(}~g5BDpS%oMVaN@_Vuf7$3(8$DQVOKYtg z2H>i?({8Hny?QeeZ~wp6_?nhipYVZ#f6sr|^&BtA@ygy7c*iHZLYm*X`%$78zo%(e zx{JVVN)_-WA$7nvg&YGvEq&lqaoGeu8M+O8VssbK0<;O}1KI^N13d(E1j_@TBwGgb z25SQvgzW>mgmnSRKUv9Dg#Z8mc$|e-eQX@X6`wbIyL-F0yLWrLw;P{*UwgR^`|N+a z^L@rP@ttjA8i<1vhY*6Aq@V;SH9`t12m*C0K0=HF2r3c+!A&b68YzSbC~7G-P$Hxx ze*mJX)Rso&ztUDvB| zvnZrNMg!9-)hcQ3Cu;;@jio3fY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y}1RqQgPf7sNNfBUIdzoiuI>z72-+ZwYw2JK` zE9YNdY_$hh4!+*tqw#+a$S1x!{mb*`iXdVI!DrbUmb`&@`D7XM*HzdX6-gEC({Wv= z*F#4(yvt_3X0%$)YYe~v3x5*pG&Jq8jth=+UER%n4S+@;UB)re9u{aQ7JQOw54OLk z!|w*%!bZvyM3HmQ<&L|Nx;^G`!H1YkUJaT$7DgI6(EcI|XOMr#;C&Lu>pa%k?~@pI zN(rpB1E_O0Ckfw3YJ!usvX3x@yz0C=2ZU}RumZusB85W~Xy|33o*3o8Rq1O*5H0CvL! zfq0x_VPIfj0bxccjSsW_|Bo&P04y^CMF0Q*002k61%wO?|G|6)02)*Q&$IIlO#y#F4uUWc zMLVdaq9`1Mg-3Ad&KsBtO=mEfMsWi4^cLOv7Ju>LuT18XZ5强制开启语音报番型
-
+
+ +
+

窗口

+ +

更新

+ +
+
服务器: 加载中 { ) }) /* 检查更新业务逻辑 End */ + +/* 设置项业务逻辑 Start */ +const getKeyText = key => { + const lang = { + window: '窗口', + isKioskModeOn: '使用原生全屏幕模式(Kiosk)', + update: '更新', + prerelease: '获取浏览版(Pre-release)', + chromium: '核心(需要重启软件)', + isHardwareAccelerationDisable: '关闭硬件加速(Hardware Acceleration)' + } + return lang[key] ? lang[key] : false +} +const userConfig = require('../configs-user.json') +const settingInner = document.getElementById('settingInner') +settingInner.innerHTML = '' +Object.entries(userConfig).forEach(([keyGroup, value]) => { + const groupName = getKeyText(keyGroup) + const h3 = document.createElement('h3') + h3.innerText = groupName + settingInner.append(h3) + Object.entries(value).forEach(([keyConfig, value], index) => { + const selectName = getKeyText(keyConfig) + const input = document.createElement('input') + input.type = 'checkbox' + const label = document.createElement('label') + input.id = 'config' + keyGroup + keyConfig + index + label.setAttribute('for', input.id) + label.innerText = selectName + input.checked = value + input.addEventListener('change', e => { + userConfig[keyGroup][keyConfig] = input.checked + }) + settingInner.append(input) + settingInner.append(label) + }) +}) +const saveConfigsBtn = document.getElementById('saveConfigs') +saveConfigsBtn.addEventListener('click', e => { + try { + fs.writeSync('../configs-user.json', JSON.stringify(userConfig)) + alert('保存成功') + } catch (error) { + alert('保存失败\n' + error) + } +}) + +/* 设置项业务逻辑 End */ diff --git a/manager/style.css b/manager/style.css index 58dec7f..9684b63 100644 --- a/manager/style.css +++ b/manager/style.css @@ -83,6 +83,41 @@ user-select: none; font-family: '思源黑体 CN', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } +*::-webkit-scrollbar { + width: 8px; +} +*::-webkit-scrollbar-button { + height: 0; + display: none; + background-color: transparent; +} +*::-webkit-scrollbar-track-piece { + background-color: transparent; + padding-right: 8px; +} +*::-webkit-scrollbar-thumb { + width: 8px; + border-radius: 4px; + min-height: 64px; + max-height: 128px; + height: auto; + background-color: rgba(0, 0, 0, 0); + -webkit-transition: background-color var(--animation-time) var(--ease-in-out); + transition: background-color var(--animation-time) var(--ease-in-out); +} +*:hover::-webkit-scrollbar-thumb { + background-color: rgba(0, 0, 0, 0.1); +} +*:hover::-webkit-scrollbar-thumb:hover { + background-color: rgba(0, 0, 0, 0.15); + -webkit-transition: background-color 0; + transition: background-color 0; +} +*:hover::-webkit-scrollbar-thumb:active { + background-color: rgba(0, 0, 0, 0.2); + -webkit-transition: background-color 0; + transition: background-color 0; +} button { outline: none !important; @@ -208,41 +243,6 @@ h1 { overflow-y: auto; padding-left: 102px; } -.main-context > section > div.info-cards::-webkit-scrollbar { - width: 8px; -} -.main-context > section > div.info-cards::-webkit-scrollbar-button { - height: 0; - display: none; - background-color: transparent; -} -.main-context > section > div.info-cards::-webkit-scrollbar-track-piece { - background-color: transparent; - padding-right: 8px; -} -.main-context > section > div.info-cards::-webkit-scrollbar-thumb { - width: 8px; - border-radius: 4px; - min-height: 64px; - max-height: 128px; - height: auto; - background-color: rgba(0, 0, 0, 0); - -webkit-transition: background-color var(--animation-time) var(--ease-in-out); - transition: background-color var(--animation-time) var(--ease-in-out); -} -.main-context > section > div.info-cards:hover::-webkit-scrollbar-thumb { - background-color: rgba(0, 0, 0, 0.1); -} -.main-context > section > div.info-cards:hover::-webkit-scrollbar-thumb:hover { - background-color: rgba(0, 0, 0, 0.15); - -webkit-transition: background-color 0; - transition: background-color 0; -} -.main-context > section > div.info-cards:hover::-webkit-scrollbar-thumb:active { - background-color: rgba(0, 0, 0, 0.2); - -webkit-transition: background-color 0; - transition: background-color 0; -} .main-context > section > div.info-cards > article { width: 400px; height: 144px; @@ -398,8 +398,67 @@ h1 { display: none; } .main-context > section[data-name='settingPage'] { - padding-left: 102px; - padding-top: 16px; + padding: 40px 0 20px 102px; +} +.main-context > section[data-name='settingPage'] > .save-btn { + left: 102px; +} +.main-context > section[data-name='settingPage'] > .save-btn::before { + content: ''; +} +.main-context > section[data-name='settingPage'] > .setting-innner { + height: 100%; + width: calc(100% - 16px); + overflow-y: auto; +} +.main-context > section[data-name='settingPage'] > .setting-innner > h3 { + cursor: default; +} +.main-context > section[data-name='settingPage'] > .setting-innner > input { + display: none; +} +.main-context > section[data-name='settingPage'] > .setting-innner > input[type='checkbox'] + label { + width: -webkit-max-content; + width: -moz-max-content; + width: max-content; + line-height: 20px; + font-size: 14px; + cursor: pointer; + outline: none !important; + display: block; + padding-left: 16px; +} +.main-context > section[data-name='settingPage'] > .setting-innner > input[type='checkbox'] + label::before { + content: ' '; + display: inline-block; + width: 32px; + height: 16px; + border-radius: 8px; + position: relative; + top: 3px; + right: 12px; + background-color: var(--switch-disable-color); + -webkit-transition: background-color var(--animation-time) var(--ease-in-out); + transition: background-color var(--animation-time) var(--ease-in-out); +} +.main-context > section[data-name='settingPage'] > .setting-innner > input[type='checkbox'] + label::after { + content: ' '; + display: block; + width: 12px; + height: 12px; + border-radius: 6px; + position: relative; + left: -10px; + bottom: 16px; + background-color: var(--switch-ball-color); + -webkit-transition: left var(--animation-time) var(--ease-in-out); + transition: left var(--animation-time) var(--ease-in-out); +} +.main-context > section[data-name='settingPage'] > .setting-innner > input[type='checkbox']:checked + label::before { + background-color: var(--switch-able-color); +} +.main-context > section[data-name='settingPage'] > .setting-innner > input[type='checkbox']:checked + label::after { + left: calc(-12px - 2px + 20px); } .main-context > .left-pannel { height: var(--main-height); diff --git a/manager/style.scss b/manager/style.scss index f5485c1..cd86c6b 100644 --- a/manager/style.scss +++ b/manager/style.scss @@ -89,6 +89,41 @@ font-weight: 400; user-select: none; font-family: '思源黑体 CN', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + + &::-webkit-scrollbar { + width: 8px; + } + &::-webkit-scrollbar-button { + height: 0; + display: none; + background-color: transparent; + } + &::-webkit-scrollbar-track-piece { + background-color: transparent; + padding-right: 8px; + } + &::-webkit-scrollbar-thumb { + width: 8px; + border-radius: 4px; + min-height: 64px; + max-height: 128px; + height: auto; + background-color: rgba(0, 0, 0, 0); + transition: background-color var(--animation-time) var(--ease-in-out); + } + &:hover { + &::-webkit-scrollbar-thumb { + background-color: rgba(0, 0, 0, 0.1); + } + &::-webkit-scrollbar-thumb:hover { + background-color: rgba(0, 0, 0, 0.15); + transition: background-color 0; + } + &::-webkit-scrollbar-thumb:active { + background-color: rgba(0, 0, 0, 0.2); + transition: background-color 0; + } + } } button { outline: none !important; @@ -211,40 +246,6 @@ h1 { top: 40px; overflow-y: auto; padding-left: 102px; - &::-webkit-scrollbar { - width: 8px; - } - &::-webkit-scrollbar-button { - height: 0; - display: none; - background-color: transparent; - } - &::-webkit-scrollbar-track-piece { - background-color: transparent; - padding-right: 8px; - } - &::-webkit-scrollbar-thumb { - width: 8px; - border-radius: 4px; - min-height: 64px; - max-height: 128px; - height: auto; - background-color: rgba(0, 0, 0, 0); - transition: background-color var(--animation-time) var(--ease-in-out); - } - &:hover { - &::-webkit-scrollbar-thumb { - background-color: rgba(0, 0, 0, 0.1); - } - &::-webkit-scrollbar-thumb:hover { - background-color: rgba(0, 0, 0, 0.15); - transition: background-color 0; - } - &::-webkit-scrollbar-thumb:active { - background-color: rgba(0, 0, 0, 0.2); - transition: background-color 0; - } - } & > article { width: 400px; @@ -403,8 +404,69 @@ h1 { } &[data-name='settingPage'] { - padding-left: 102px; - padding-top: 16px; + padding: 40px 0 20px 102px; + + & > .save-btn { + left: 102px; + &::before { + content: ''; + } + } + & > .setting-innner { + height: 100%; + width: calc(100% - 16px); + overflow-y: auto; + + & > h3 { + cursor: default; + } + & > input { + display: none; + } + & > input[type='checkbox'] + label { + width: max-content; + line-height: 20px; + font-size: 14px; + cursor: pointer; + outline: none !important; + display: block; + padding-left: 16px; + &::before { + content: ' '; + display: inline-block; + width: 32px; + height: 16px; + border-radius: 8px; + position: relative; + top: 3px; + right: 12px; + // bottom: 16px; + background-color: var(--switch-disable-color); + transition: background-color var(--animation-time) + var(--ease-in-out); + } + &::after { + content: ' '; + display: block; + width: 12px; + height: 12px; + border-radius: 6px; + position: relative; + left: -10px; + bottom: 16px; + background-color: var(--switch-ball-color); + transition: left var(--animation-time) var(--ease-in-out); + } + } + & > input[type='checkbox']:checked + label { + &::before { + background-color: var(--switch-able-color); + } + &::after { + left: calc(-12px - 2px + 20px); + } + } + } } } & > .left-pannel { diff --git a/package.json b/package.json index 017b399..8cdabef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "majsoul-plus-client", - "version": "1.6.0-alpha.1", + "version": "1.6.0-beta.1", "productName": "Majsoul Plus", "author": "MajsoulPlus Team", "description": "Majsoul Plus",