mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
stylecheck
This commit is contained in:
15
menu.js
15
menu.js
@ -148,7 +148,7 @@ const mainMenuTemplate = (win) => [
|
||||
type: "checkbox",
|
||||
checked: !!config.get("options.proxy"),
|
||||
click: (item) => {
|
||||
setProxy(item);
|
||||
setProxy(item, win);
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -311,29 +311,24 @@ module.exports.setApplicationMenu = (win) => {
|
||||
|
||||
const iconPath = path.join(__dirname, "assets", "youtube-music-tray.png");
|
||||
const example = `Example: "socks5://127.0.0.1:9999"`;
|
||||
function setProxy(item) {
|
||||
function setProxy(item, win) {
|
||||
let options = {
|
||||
title: 'Set Proxy',
|
||||
label: 'Enter Proxy Address (leave empty to disable)',
|
||||
label: 'Enter Proxy Address: (leave empty to disable)',
|
||||
value: config.get("options.proxy") || example,
|
||||
inputAttrs: {
|
||||
type: 'text'
|
||||
},
|
||||
type: 'input',
|
||||
alwaysOnTop: true,
|
||||
icon: iconPath,
|
||||
customStylesheet: path.join(__dirname, "prompt", "darkPrompt.css"),
|
||||
};
|
||||
if (config.plugins.isEnabled("in-app-menu")) {
|
||||
Object.assign(options, {
|
||||
frame: false,
|
||||
customScript: path.join(__dirname, "prompt", "customTitlebar.js"),
|
||||
enableRemoteModule: true,
|
||||
height: 200,
|
||||
width: 450,
|
||||
})
|
||||
}
|
||||
prompt(options)
|
||||
};
|
||||
prompt(options, win)
|
||||
.then((input) => {
|
||||
if (input !== null && input !== example) {
|
||||
config.set("options.proxy", input);
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
body {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
background-image: linear-gradient(315deg, #200000 0%, #13253a 74%);
|
||||
@ -12,8 +11,8 @@ body {
|
||||
#container {
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
|
||||
backdrop-filter: blur( 10.0px );
|
||||
-webkit-backdrop-filter: blur( 10.0px );
|
||||
backdrop-filter: blur(10px);
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
border-radius: 10px;
|
||||
border: 1px solid rgba(80, 0, 0, 0.4);
|
||||
overflow: hidden;
|
||||
@ -34,14 +33,13 @@ body {
|
||||
border: 1px solid rgb(85, 85, 85);
|
||||
}
|
||||
|
||||
#ok:hover, #cancel:hover {
|
||||
#ok:hover,
|
||||
#cancel:hover {
|
||||
outline: rgba(60, 0, 0, 0.4) solid 2px;
|
||||
/*
|
||||
border: 1px solid rgba(60, 0, 0, 0.4);
|
||||
*/
|
||||
}
|
||||
|
||||
#ok, #cancel {
|
||||
#ok,
|
||||
#cancel {
|
||||
background-color: rgb(0, 0, 0);
|
||||
color: whitesmoke;
|
||||
}
|
||||
@ -1,5 +1,7 @@
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
||||
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial,
|
||||
sans-serif;
|
||||
line-height: 1.5em;
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
@ -21,14 +23,14 @@ body {
|
||||
|
||||
#form {
|
||||
width: 100%;
|
||||
padding-top: .5em;
|
||||
padding-top: 0.5em;
|
||||
}
|
||||
|
||||
#label {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
margin-bottom: .8em;
|
||||
padding: 0 .5em;
|
||||
margin-bottom: 0.8em;
|
||||
padding: 0 0.5em;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@ -38,7 +40,7 @@ body {
|
||||
border-radius: 2px;
|
||||
background: #fff;
|
||||
width: 90%;
|
||||
padding: .4em .5em;
|
||||
padding: 0.4em 0.5em;
|
||||
border: 1px solid black;
|
||||
min-height: 2em;
|
||||
margin: 0 0 1.2em;
|
||||
@ -54,25 +56,25 @@ select#data {
|
||||
|
||||
#buttons {
|
||||
text-align: right;
|
||||
padding: 0 .5em 0 0;
|
||||
padding: 0 0.5em 0 0;
|
||||
}
|
||||
|
||||
#buttons > button,
|
||||
#buttons > input[type=submit] {
|
||||
#buttons > input[type="submit"] {
|
||||
border-radius: 2px;
|
||||
border: 0;
|
||||
margin: 0 0 0 .5em;
|
||||
font-size: .8em;
|
||||
margin: 0 0 0 0.5em;
|
||||
font-size: 0.8em;
|
||||
line-height: 1em;
|
||||
padding: .6em 1em
|
||||
padding: 0.6em 1em;
|
||||
}
|
||||
|
||||
#ok {
|
||||
background-color: #3879D9;
|
||||
background-color: #3879d9;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#cancel {
|
||||
background-color: #DDD;
|
||||
background-color: #ddd;
|
||||
color: black;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user