cambios visuales

This commit is contained in:
Guillermo Bonet 2022-07-21 13:35:10 +02:00
parent a4993c6b6a
commit fcfe88b178
5 changed files with 46 additions and 59 deletions

BIN
src/branch.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 936 B

View File

@ -4,7 +4,7 @@ var Conf = {
,dsName: 'verdnatura'
,dsPath: 'HKCU\\Software\\ODBC\\ODBC.INI\\verdnatura'
,regPath: 'HKCU\\Software\\Verdnatura\\vn-access'
,remoteUrl: 'https://verdnatura.es/vn-access'
,remoteUrl: 'https://cdn.verdnatura.es/vn-access'
,dbHost: 'db.verdnatura.es'
,defaultModule: 'tpv'
,defaultLocale: 'es'
@ -49,7 +49,7 @@ var App = {
init: function() {
var width = 420;
var height = 500;
var height = 525;
window.resizeTo(width, height);
window.moveTo((screen.width - width) / 2, (screen.height - height) / 2);
@ -143,16 +143,16 @@ var App = {
if (!branch) branch = defaultBranch;
this.$('branchDiv').value = branch;
if (this.$("branch").value == "master") {
this.$("branch").style.backgroundColor = "#a52727";
this.$("branchState").style.backgroundColor = "#a52727";
this.$("branch").style.backgroundColor = "#c20000";
this.$("optionsLogo").style.backgroundColor = "#c20000";
}
if (this.$("branch").value == "test") {
this.$("branch").style.backgroundColor = "#31a527";
this.$("branchState").style.backgroundColor = "#31a527";
this.$("optionsLogo").style.backgroundColor = "#31a527";
}
if (this.$("branch").value == "dev") {
this.$("branch").style.backgroundColor = "#a59827";
this.$("branchState").style.backgroundColor = "#a59827";
this.$("optionsLogo").style.backgroundColor = "#a59827";
}
},
@ -194,24 +194,28 @@ var App = {
onShowOptionsClick: function() {
if (this.$("branchDiv").style.visibility == "hidden") {
this.$("branchDiv").style.visibility = "visible";}
else {
this.$("branchDiv").style.visibility = "visible";
this.$("optionsLogo").style.borderRadius = "25px 0px 0px 25px";
this.$("optionsLogo").style.paddingRight = ".45em";
} else {
this.$("branchDiv").style.visibility = "hidden";
this.$("optionsLogo").style.borderRadius = "100%";
this.$("optionsLogo").style.paddingRight = ".2em";
}
},
onChangeBranchClick: function() {
if (this.$("branch").value == "master") {
this.$("branch").style.backgroundColor = "#a52727";
this.$("branchState").style.backgroundColor = "#a52727";
this.$("branch").style.backgroundColor = "#c20000";
this.$("optionsLogo").style.backgroundColor = "#c20000";
}
if (this.$("branch").value == "test") {
this.$("branch").style.backgroundColor = "#31a527";
this.$("branchState").style.backgroundColor = "#31a527";
this.$("optionsLogo").style.backgroundColor = "#31a527";
}
if (this.$("branch").value == "dev") {
this.$("branch").style.backgroundColor = "#a59827";
this.$("branchState").style.backgroundColor = "#a59827";
this.$("optionsLogo").style.backgroundColor = "#a59827";
}
},
@ -276,15 +280,13 @@ var App = {
this.regWrite(Conf.dsPath, 'PWD', password);
var version = this.fetchVersion();
if (version !== null) {
this.disableUi(true, _('Updating'));
var remoteFile = version
? '.archive/'+ this.module +'/'+ branch +'/'+ version +'.7z'
? '.archive/'+ this.module +'/'+ version +'.7z'
: this.module +'.7z?'+ new Date().getTime();
remoteFile = Conf.remoteUrl +'/'+ remoteFile;
var request = new ActiveXObject('MSXML2.XMLHTTP');
var request = new ActiveXObject("Microsoft.XMLHTTP");
request.open('GET', remoteFile, true);
request.onreadystatechange = function() {
App.onRequestReady(request);
@ -299,7 +301,7 @@ var App = {
/**
* Gets information about the version to download.
*
* cmdle
* @return {Number|Boolean} Version number, %false if cannot
* fetch or %null if local is up-to-date
*/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 717 B

View File

@ -17,7 +17,6 @@ a {
margin: 0 auto;
margin-bottom: 2.5em;
width: 80%;
-webkit-user-drag: none;
}
button,
input,
@ -25,9 +24,12 @@ select {
font-size: 1em;
}
select {
background-color: #000000;
background-color: black;
color: white;
}
option::selection {
background-color: white;
}
#fields {
max-width: 11em;
margin: 0 auto;
@ -61,7 +63,7 @@ input[type='password'] {
}
input[type='text']:focus,
input[type='password']:focus {
border-bottom: 1px solid #000000;
border-bottom: 1px solid black;
}
input[type='text']::selection,
input[type='password']::selection {
@ -92,7 +94,7 @@ input[type='password']::selection {
text-decoration-color: #44f;
}
button {
color: white;
color: #FFF;
background-color: #f7931e;
padding: .7em;
padding-right: 2.5em;
@ -103,48 +105,33 @@ button {
button:hover {
background-color: #db821b;
cursor: pointer;
transition: background-color 1s;
}
/* Options */
/* Branch */
#options {
#branchOptions {
text-align: left;
margin-top: .8em;
margin-top: 1.55em;
}
#optionsLogo {
filter: alpha(opacity=30);
cursor: pointer;
}
#optionsLogo:hover {
filter: alpha(opacity=45);
}
#optionsLogo:active {
scale: 1em;
padding: .2em;
}
#branchDiv {
text-align: center;
margin-top: -2em;
margin-left: .05em;
margin-left: 2em;
font-size: 1em;
}
#branch {
padding-left: 1em;
padding-top: .25em;
padding-bottom: .2em;
padding-right: .2em;
border-radius: 10px 5px 5px 10px;
padding-top: .465em;
padding-bottom: .46em;
padding-right: .46em;
border-radius: 0px 5px 5px 0px;
border: none;
}
#branchState {
background-color: #000000;
margin-top: -1.625em;
margin-left: 93%;
border-radius: 100%;
width: 1.5em;
height: 1.5em;
cursor: pointer;
margin-top: -.435em;
margin-left: .4em;
}
/* Message */
@ -153,7 +140,7 @@ button:hover {
z-index: 2;
position: absolute;
top: 2em;
left: 50%;
left: 49.2%;
width: 16em;
padding: .5em;
margin-left: -8.25em;
@ -167,14 +154,15 @@ button:hover {
border-radius: 25px;
}
#message.error {
border-color: #000000;
border-color: black;
background-color: #a52727;
color: #ffffff;
color: white;
}
#message.notice {
border-color: rgb(0, 0, 0);
border-color: black;
background-color: #2773a5;
color: #ffffff;
color: white;
;
}
/* Spinner */

View File

@ -64,14 +64,14 @@
Limpiar caché
</a>
</div>
<div id="options">
<div id="branchOptions">
<img
id="optionsLogo"
src="options.png"
src="branch.png"
onclick="App.onShowOptionsClick()"
style="border-radius: 100%; padding-right: .2em;"
alt="Options"/>
<div id="branchDiv" style="visibility: hidden;">
<label for="branch">Branch:</label>
<select id="branch" onclick="App.onChangeBranchClick()">
<option>master</option>
<option>test</option>
@ -79,9 +79,6 @@
</select>
</div>
</div>
<div id="branchState">
<br/>
</div>
<div id="background">
</div>
<div id="spinner">