This commit is contained in:
2019-05-23 21:58:48 +00:00
parent 35942e8ee2
commit 6741722864
2 changed files with 39 additions and 31 deletions

View File

@@ -19,5 +19,6 @@ export default {
height: window.screen.height, height: window.screen.height,
devicePixelRatio: window.devicePixelRatio, devicePixelRatio: window.devicePixelRatio,
pixelDepth: window.screen.pixelDepth pixelDepth: window.screen.pixelDepth
} },
clientLog: store.state.logArray
}; };

View File

@@ -118,7 +118,7 @@
</template> </template>
<script> <script>
/* Xeslint-disable */ /* xeslint-disable */
import aboutInfo from "../api/aboutinfo"; import aboutInfo from "../api/aboutinfo";
///////////////////////////// /////////////////////////////
@@ -133,9 +133,15 @@ function clickHandler(menuItem) {
switch (m.key) { switch (m.key) {
case "copysupportinfo": case "copysupportinfo":
//put the support info on the clipboard: //put the support info on the clipboard:
var element = document.getElementById('aboutinfocard'); var element = document.getElementById("aboutinfocard");
var text = element.innerText || element.textContent; var text = element.innerText || element.textContent;
navigator.clipboard.writeText(text);
var logText = "";
this.$_.forEach(aboutInfo.clientLog, function appendLogItem(value) {
logText += value + "\n";
});
navigator.clipboard.writeText(text + "\nCLIENT LOG\n" + logText);
break; break;
default: default:
m.vm.$gzevent.$emit( m.vm.$gzevent.$emit(
@@ -170,28 +176,23 @@ export default {
"User", "User",
"Browser" "Browser"
]) ])
.then(() => (vm.formState.ready = true)) .then(function() {
.catch(err => {
vm.formState.ready = true; vm.formState.ready = true;
vm.$gzHandleFormError(err);
}); vm.$gzevent.$emit("menu-change", {
},
created() {
var vm = this;
this.$gzevent.$emit("menu-change", {
isMain: false, isMain: false,
icon: "fa-info-circle", icon: "fa-info-circle",
title: this.$gzlocale.get("HelpAboutAyaNova"), title: vm.$gzlocale.get("HelpAboutAyaNova"),
menuItems: [ menuItems: [
{ {
title: this.$gzlocale.get("Copy"), title: vm.$gzlocale.get("Copy"),
icon: "copy", icon: "copy",
surface: true, surface: true,
key: "about:copysupportinfo", key: "about:copysupportinfo",
vm: vm vm: vm
}, },
{ {
title: this.$gzlocale.get("Log"), title: vm.$gzlocale.get("Log"),
icon: "glasses", icon: "glasses",
surface: true, surface: true,
key: "app:nav:log", key: "app:nav:log",
@@ -199,8 +200,14 @@ export default {
} }
] ]
}); });
this.$gzevent.$on("menu-click", clickHandler); vm.$gzevent.$on("menu-click", clickHandler);
})
.catch(err => {
vm.formState.ready = true;
vm.$gzHandleFormError(err);
});
},
created() {
this.clientInfo = aboutInfo; this.clientInfo = aboutInfo;
this.$gzapi this.$gzapi
.get("ServerInfo") .get("ServerInfo")