Styling and debug view
This commit is contained in:
parent
f6a3fb65da
commit
d95592acc9
|
@ -35,6 +35,7 @@ export default new class extends Module {
|
||||||
this.reloadNotif = this.reloadNotif.bind(this);
|
this.reloadNotif = this.reloadNotif.bind(this);
|
||||||
this.startUpdate = this.startUpdate.bind(this);
|
this.startUpdate = this.startUpdate.bind(this);
|
||||||
this.setUpdateStatus = this.setUpdateStatus.bind(this);
|
this.setUpdateStatus = this.setUpdateStatus.bind(this);
|
||||||
|
this.testUi = this.testUi.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
restartNotif() {
|
restartNotif() {
|
||||||
|
@ -91,6 +92,7 @@ export default new class extends Module {
|
||||||
});
|
});
|
||||||
|
|
||||||
ipc.on('updater-updatesAvailable', (_, updates) => {
|
ipc.on('updater-updatesAvailable', (_, updates) => {
|
||||||
|
console.log(updates);
|
||||||
if (this.state.updating) return; // If for some reason we get more updates when we're already updating
|
if (this.state.updating) return; // If for some reason we get more updates when we're already updating
|
||||||
updates.bd = updates.bd.map(update => {
|
updates.bd = updates.bd.map(update => {
|
||||||
update.text = `${update.id.charAt(0).toUpperCase()}${update.id.slice(1)}`;
|
update.text = `${update.id.charAt(0).toUpperCase()}${update.id.slice(1)}`;
|
||||||
|
@ -178,4 +180,11 @@ export default new class extends Module {
|
||||||
this.send('updater-startUpdate', updates);
|
this.send('updater-startUpdate', updates);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
testUi(updates) {
|
||||||
|
this.setState({
|
||||||
|
updates,
|
||||||
|
updatesAvailable: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
.bd-contentColumn .bd-devview {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 33% 33% 33%;
|
||||||
|
|
||||||
|
.bd-button {
|
||||||
|
font-size: 10px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
}
|
|
@ -10,3 +10,4 @@
|
||||||
@import './kvp';
|
@import './kvp';
|
||||||
@import './collection';
|
@import './collection';
|
||||||
@import './e2ee';
|
@import './e2ee';
|
||||||
|
@import './devview';
|
||||||
|
|
|
@ -3,4 +3,22 @@
|
||||||
margin: 0 0 10px;
|
margin: 0 0 10px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bd-settingSwitch {
|
||||||
|
.bd-spinner7 {
|
||||||
|
height: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bd-updaterStatus {
|
||||||
|
text-align: right;
|
||||||
|
|
||||||
|
&.bd-err {
|
||||||
|
color: $colerr;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.bd-ok {
|
||||||
|
color: $colok;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
import SettingsWrapper from './SettingsWrapper.vue';
|
import SettingsWrapper from './SettingsWrapper.vue';
|
||||||
import { FormButton } from '../common';
|
import { FormButton } from '../common';
|
||||||
import { Globals, Events } from 'modules';
|
import { Globals, Events, Updater } from 'modules';
|
||||||
import { ClientIPC } from 'common';
|
import { ClientIPC } from 'common';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -42,7 +42,63 @@
|
||||||
console.log(Globals);
|
console.log(Globals);
|
||||||
},
|
},
|
||||||
testUpdateUi() {
|
testUpdateUi() {
|
||||||
Events.emit('update-check-start');
|
Updater.testUi({
|
||||||
|
'bd': [
|
||||||
|
{
|
||||||
|
'id': 'update',
|
||||||
|
'version': '3.0.0',
|
||||||
|
'currentVersion': '2.0.0',
|
||||||
|
'text': 'Update test',
|
||||||
|
'hint': 'Current: 2.0.0 | Latest: 3.0.0',
|
||||||
|
'status': {
|
||||||
|
'update': true,
|
||||||
|
'updating': false,
|
||||||
|
'updated': false,
|
||||||
|
'error': null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'id': 'updating',
|
||||||
|
'version': '3.0.0',
|
||||||
|
'currentVersion': '2.0.0',
|
||||||
|
'text': 'Updating test',
|
||||||
|
'hint': 'Current: 2.0.0 | Latest: 3.0.0',
|
||||||
|
'status': {
|
||||||
|
'update': true,
|
||||||
|
'updating': true,
|
||||||
|
'updated': false,
|
||||||
|
'error': null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'id': 'updated',
|
||||||
|
'version': '3.0.0',
|
||||||
|
'currentVersion': '2.0.0',
|
||||||
|
'text': 'Updated test',
|
||||||
|
'hint': 'Current: 2.0.0 | Latest: 3.0.0',
|
||||||
|
'status': {
|
||||||
|
'update': true,
|
||||||
|
'updating': true,
|
||||||
|
'updated': true,
|
||||||
|
'error': null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'id': 'error',
|
||||||
|
'version': '3.0.0',
|
||||||
|
'currentVersion': '2.0.0',
|
||||||
|
'text': 'Error test',
|
||||||
|
'hint': 'Current: 2.0.0 | Latest: 3.0.0',
|
||||||
|
'status': {
|
||||||
|
'update': true,
|
||||||
|
'updating': true,
|
||||||
|
'updated': false,
|
||||||
|
'error': 'Failed to update.'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'haveUpdates': true
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
<div class="bd-settingSwitch">
|
<div class="bd-settingSwitch">
|
||||||
<div class="bd-title">
|
<div class="bd-title">
|
||||||
<h3>{{item.text}}</h3>
|
<h3>{{item.text}}</h3>
|
||||||
<h3 class="bd-updaterStatus" v-if="item.status.error">Update Failed!</h3>
|
<h3 class="bd-updaterStatus bd-err" v-if="item.status.error">Update Failed!</h3>
|
||||||
<h3 class="bd-updaterStatus" v-else-if="item.status.updated">Done</h3>
|
<h3 class="bd-updaterStatus bd-ok" v-else-if="item.status.updated">Done</h3>
|
||||||
<div class="bd-spinner7" v-else-if="item.status.updating" />
|
<div class="bd-spinner7" v-else-if="item.status.updating" />
|
||||||
<h3 class="bd-updaterStatus" v-else>Unknown</h3>
|
<h3 class="bd-updaterStatus" v-else>Unknown</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue