re-factor / cleanup

This commit is contained in:
2022-01-11 22:08:38 +00:00
parent e871708b20
commit e0be8a7cfe
251 changed files with 14680 additions and 15693 deletions

View File

@@ -1,5 +1,5 @@
<template>
<v-row v-if="this.formState.ready" v-resize="onResize">
<v-row v-if="formState.ready" v-resize="onResize">
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
<v-col cols="12">
<v-btn @click="refreshProfile">
@@ -22,6 +22,18 @@
<script>
const FORM_KEY = "ops-profile";
export default {
data() {
return {
cardHeight: 300,
formState: {
ready: false,
loading: false,
errorBoxMessage: null,
appError: null,
serverError: {}
}
};
},
async created() {
const vm = this;
try {
@@ -37,18 +49,6 @@ export default {
beforeDestroy() {
window.$gz.eventBus.$off("menu-click", clickHandler);
},
data() {
return {
cardHeight: 300,
formState: {
ready: false,
loading: false,
errorBoxMessage: null,
appError: null,
serverError: {}
}
};
},
methods: {
onResize() {
@@ -64,6 +64,8 @@ export default {
refreshProfile() {
const ifr = document.getElementById("profileFrame");
//trigger refresh? wtf?
// eslint-disable-next-line no-self-assign
ifr.src = ifr.src;
}
}
@@ -72,7 +74,7 @@ export default {
//////////////////////
//
//
function generateMenu(vm) {
function generateMenu() {
const menuOptions = {
isMain: true,
icon: "$ayiBinoculars",
@@ -109,15 +111,15 @@ function clickHandler(menuItem) {
/////////////////////////////////
//
//
async function initForm(vm) {
await fetchTranslatedText(vm);
async function initForm() {
await fetchTranslatedText();
}
//////////////////////////////////////////////////////////
//
// Ensures UI translated text is available
//
async function fetchTranslatedText(vm) {
async function fetchTranslatedText() {
await window.$gz.translation.cacheTranslations(["ServerProfiler"]);
}
</script>