{
//Methods
+//Server Management Login Handler
+
+const loginHandler = async () => {
+ if (router.currentRoute.value.path === "/login") {
+ await login();
+ } else {
+ await ControlService.logout();
+ await login();
+ }
+};
+
//Server Management Tab Picker
const tabPicker = (tab) => {
serverStore.setActiveTab(tab);
};
-//Load stored connections
-
-const loadStoredConnections = async () => {
- const savedConnections = await ControlService.readConfig();
- serverStore.selectedServerConnection = savedConnections.savedConnections.find(
- (item) => item.host === controlStore.ipAddress
- );
-};
-
//Click handling on a server in the saved servers list
const serverHandler = (server) => {
serverStore.tabs.forEach((tab) => {
@@ -145,6 +148,7 @@ const closeWindow = () => {
const closeErrorDialog = () => {
serverStore.errorMsgExists = false;
+ serverStore.connectingProcess = false;
};
const removeServerHandler = async () => {
diff --git a/launcher/src/components/UI/server-management/components/ServerBody.vue b/launcher/src/components/UI/server-management/components/ServerBody.vue
index 82cbd754f..a1217bfe9 100644
--- a/launcher/src/components/UI/server-management/components/ServerBody.vue
+++ b/launcher/src/components/UI/server-management/components/ServerBody.vue
@@ -5,7 +5,7 @@
-
+
@@ -27,7 +27,7 @@ import SshPanel from "./ssh-management/SshPanel.vue";
import ControlService from "@/store/ControlService";
import { useServers } from "@/store/servers";
import { useControlStore } from "@/store/theControl";
-import { computed } from "vue";
+import { computed, watch } from "vue";
import { useRoute } from "vue-router";
const emit = defineEmits(["selectServer", "serverLogin", "changePassword", "fileUpload", "deleteKey"]);
@@ -41,15 +41,15 @@ const isSSHActive = computed(() => route.path !== "/login" && serverStore.isServ
const isDetailsActive = computed(() => route.path !== "/login" && serverStore.isServerDetailsActive);
const isUpdateActive = computed(() => route.path !== "/login" && serverStore.isServerUpdateActive);
-// watch(
-// () => serverStore.selectedServerConnection,
-// async (newVal) => {
-// if (newVal) {
-// serverStore.isServerLoginActive = false;
-// serverStore.isServerManagementActive = true;
-// }
-// }
-// );
+watch(
+ () => serverStore.selectedServerConnection,
+ async (newVal) => {
+ if (newVal) {
+ serverStore.isServerLoginActive = false;
+ serverStore.isServerManagementActive = true;
+ }
+ }
+);
//Methods
@@ -86,6 +86,8 @@ const addNewServer = () => {
}
serverStore.addNewServer = true;
serverStore.isServerLoginActive = true;
+ serverStore.isServerDetailsActive = false;
+ serverStore.setActiveTab("login");
serverStore.isServerManagementActive = false;
};
@@ -100,4 +102,8 @@ const fileUpload = (file) => {
const deleteKey = (key) => {
emit("deleteKey", key);
};
+
+const serverLogin = () => {
+ emit("serverLogin");
+};
diff --git a/launcher/src/components/UI/server-management/components/login-form/LoginForm.vue b/launcher/src/components/UI/server-management/components/login-form/LoginForm.vue
index efcd66f0b..d2840fe6c 100644
--- a/launcher/src/components/UI/server-management/components/login-form/LoginForm.vue
+++ b/launcher/src/components/UI/server-management/components/login-form/LoginForm.vue
@@ -248,14 +248,15 @@ import { V2_MetaFunction } from "@remix-run/react"; import { computed, onMounted
diff --git a/launcher/src/components/UI/welcome-page/WelcomeScreen.vue b/launcher/src/components/UI/welcome-page/WelcomeScreen.vue
index b426a0aa2..e20e8adc5 100644
--- a/launcher/src/components/UI/welcome-page/WelcomeScreen.vue
+++ b/launcher/src/components/UI/welcome-page/WelcomeScreen.vue
@@ -4,7 +4,7 @@
-
+