This commit is contained in:
Paolo Possanzini
2018-02-14 11:04:03 +01:00
parent aa8dab6d58
commit 6dc633f53a
2 changed files with 20 additions and 21 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+19 -20
View File
@@ -80,14 +80,13 @@ export default {
this.$forceUpdate();
});
let _this = this;
Factory.Get(LoginService)
.getUserInfo()
.then(() => {
if (!_this.isAuthenticated)
_this.$nextTick(() => ModalHelper.ShowModal(Login));
});
if (!_this.isAuthenticated)
_this.$nextTick(() => ModalHelper.ShowModal(Login));
});
this.$store.watch(
s => s.currentUser,
@@ -96,16 +95,14 @@ export default {
}
);
this.hub = new Hub();
window.addEventListener('keyup', function(event) {
// If down arrow was pressed...
if (event.keyCode == 27) {
Factory.Get(MessageService).publishToChannel("esc_pressed");
}
});
window.addEventListener("keyup", function(event) {
// If down arrow was pressed...
if (event.keyCode == 27) {
Factory.Get(MessageService).publishToChannel("esc_pressed");
}
});
},
computed: {
isAuthenticated: function() {
@@ -117,19 +114,21 @@ export default {
isMainViewLiftedUp: function() {
return this.$store.state.isMainViewLiftedUp;
},
isFanuc :function (){
isFanuc: function() {
return this.$store.state.machineInfo.isFanuc;
},
isSiemens :function (){
isSiemens: function() {
return this.$store.state.machineInfo.isSiemens;
},
isOsai :function (){
isOsai: function() {
return this.$store.state.machineInfo.isOsai;
},
isDemo :function (){
return !this.$store.state.machineInfo.isOsai &&
!this.$store.state.machineInfo.isSiemens &&
!this.$store.state.machineInfo.isFanuc;
isDemo: function() {
return (
!this.$store.state.machineInfo.isOsai &&
!this.$store.state.machineInfo.isSiemens &&
!this.$store.state.machineInfo.isFanuc
);
}
},
watch: {
@@ -182,7 +181,7 @@ export default {
Factory.Get(MessageService).publishToChannel("HMI-stop-drag", 600);
},
toggleMainView(direction) {
if (!direction || direction == "down"|| direction == "none")
if (!direction || direction == "down" || direction == "none")
appModelActions.MainViewToggle(this.$store);
else {
this.applyViewPosition(-window.innerHeight + 84);