mirror of
https://github.com/Grasscutters/GrassClipper.git
synced 2024-11-22 15:37:48 +00:00
add settings icon
This commit is contained in:
parent
bfc151e52a
commit
fa4092c664
10
resources/icons/cog.svg
Normal file
10
resources/icons/cog.svg
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="256" height="256" viewBox="0 0 256 256" xml:space="preserve">
|
||||||
|
<desc>Created with Fabric.js 1.7.22</desc>
|
||||||
|
<defs>
|
||||||
|
</defs>
|
||||||
|
<g transform="translate(128 128) scale(0.72 0.72)" style="">
|
||||||
|
<g style="stroke: none; stroke-width: 0; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: none; fill-rule: nonzero; opacity: 1;" transform="translate(-175.05 -175.05) scale(3.89 3.89)" >
|
||||||
|
<path d="M 88.568 54.357 L 88.568 54.357 c -8.337 -3.453 -8.337 -15.262 0 -18.715 h 0 c 1.183 -0.49 1.745 -1.847 1.255 -3.03 l -4.369 -10.547 c -0.49 -1.183 -1.847 -1.745 -3.03 -1.255 h 0 c -8.337 3.453 -16.687 -4.897 -13.233 -13.233 v 0 c 0.49 -1.183 -0.072 -2.54 -1.255 -3.03 L 57.388 0.177 c -1.183 -0.49 -2.54 0.072 -3.03 1.255 c -3.453 8.337 -15.262 8.337 -18.715 0 c -0.49 -1.183 -1.847 -1.745 -3.03 -1.255 L 22.065 4.546 c -1.183 0.49 -1.745 1.847 -1.255 3.03 c 3.453 8.337 -4.897 16.687 -13.234 13.234 c -1.183 -0.49 -2.54 0.072 -3.03 1.255 L 0.177 32.612 c -0.49 1.183 0.072 2.54 1.255 3.03 l 0 0 c 8.337 3.453 8.337 15.262 0 18.715 l 0 0 c -1.183 0.49 -1.745 1.847 -1.255 3.03 l 4.369 10.547 c 0.49 1.183 1.847 1.745 3.03 1.255 l 0 0 c 8.337 -3.453 16.687 4.897 13.233 13.234 v 0 c -0.49 1.183 0.072 2.54 1.255 3.03 l 10.547 4.369 c 1.183 0.49 2.54 -0.072 3.03 -1.255 v 0 c 3.453 -8.337 15.262 -8.337 18.715 0 v 0 c 0.49 1.183 1.847 1.745 3.03 1.255 l 10.547 -4.369 c 1.183 -0.49 1.745 -1.847 1.255 -3.03 v 0 c -3.453 -8.337 4.897 -16.687 13.234 -13.233 c 1.183 0.49 2.54 -0.072 3.03 -1.255 l 4.369 -10.547 C 90.313 56.204 89.751 54.848 88.568 54.357 z M 45 64.052 c -10.522 0 -19.052 -8.53 -19.052 -19.052 c 0 -10.522 8.53 -19.052 19.052 -19.052 S 64.052 34.478 64.052 45 C 64.052 55.522 55.522 64.052 45 64.052 z" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(0,0,0); fill-rule: nonzero; opacity: 1;" transform=" matrix(1 0 0 1 0 0) " stroke-linecap="round" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
@ -13,6 +13,9 @@
|
|||||||
GrassClipper
|
GrassClipper
|
||||||
<span id="version">0.3.0</span>
|
<span id="version">0.3.0</span>
|
||||||
</span>
|
</span>
|
||||||
|
<div id="settingsBtn" onclick="openSettings()">
|
||||||
|
<img src="icons/cog.svg" />
|
||||||
|
</div>
|
||||||
<div id="minBtn" onclick="minimizeWin()">
|
<div id="minBtn" onclick="minimizeWin()">
|
||||||
<img src="icons/min.svg" alt="Minimize" />
|
<img src="icons/min.svg" alt="Minimize" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -55,18 +55,17 @@ async function getFavIps() {
|
|||||||
* @returns {Promise<string>}
|
* @returns {Promise<string>}
|
||||||
*/
|
*/
|
||||||
async function getCfg() {
|
async function getCfg() {
|
||||||
|
const defaultConf = {
|
||||||
|
genshinImpactFolder: '',
|
||||||
|
lastConnect: '',
|
||||||
|
enableKillswitch: false
|
||||||
|
}
|
||||||
const cfgStr = await Neutralino.storage.getData('config').catch(e => {
|
const cfgStr = await Neutralino.storage.getData('config').catch(e => {
|
||||||
// The data isn't set, so this is our first time opening
|
// The data isn't set, so this is our first time opening
|
||||||
Neutralino.storage.setData('config', JSON.stringify({
|
Neutralino.storage.setData('config', JSON.stringify(defaultConf))
|
||||||
genshinImpactFolder: '',
|
|
||||||
lastConnect: ''
|
|
||||||
}))
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const config = cfgStr ? JSON.parse(cfgStr) : {
|
const config = cfgStr ? JSON.parse(cfgStr) : defaultConf
|
||||||
genshinImpactFolder: '',
|
|
||||||
lastConnect: ''
|
|
||||||
}
|
|
||||||
|
|
||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
|
@ -99,9 +99,9 @@ body {
|
|||||||
filter: invert(100%) sepia(0%) saturate(7500%) hue-rotate(142deg) brightness(107%) contrast(101%);
|
filter: invert(100%) sepia(0%) saturate(7500%) hue-rotate(142deg) brightness(107%) contrast(101%);
|
||||||
}
|
}
|
||||||
|
|
||||||
#minBtn {
|
#titleSection {
|
||||||
/* Move all components to the right since this is the first button */
|
/* Move all components to the right since this is the first button */
|
||||||
margin-left: auto !important;
|
margin-right: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.playBtn:hover, .smolBtn:hover {
|
.playBtn:hover, .smolBtn:hover {
|
||||||
|
Loading…
Reference in New Issue
Block a user