diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 30eb5cf6f..bafc1bb67 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -6,7 +6,7 @@ "recommendations": [ "dbaeumer.vscode-eslint", "esbenp.prettier-vscode", - "Vue.volar" + "Vue.official" ], // List of extensions recommended by VS Code that should not be recommended for users of this workspace. "unwantedRecommendations": [] diff --git a/launcher/package.json b/launcher/package.json index c00034b88..ae161ef35 100755 --- a/launcher/package.json +++ b/launcher/package.json @@ -97,4 +97,4 @@ "type": "git", "url": "git@github.com:stereum-dev/ethereum-node.git" } -} +} \ No newline at end of file diff --git a/launcher/public/img/icon/server-management-icons/write.png b/launcher/public/img/icon/server-management-icons/write.png new file mode 100755 index 000000000..782c40dbf Binary files /dev/null and b/launcher/public/img/icon/server-management-icons/write.png differ diff --git a/launcher/public/output.css b/launcher/public/output.css index a9903bab3..fb1d1f1f5 100755 --- a/launcher/public/output.css +++ b/launcher/public/output.css @@ -1,7 +1,7 @@ @import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@100;200;300;400;500;600;700;800;900&display=swap"); /* -! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com +! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com */ /* @@ -217,6 +217,8 @@ textarea { /* 1 */ line-height: inherit; /* 1 */ + letter-spacing: inherit; + /* 1 */ color: inherit; /* 1 */ margin: 0; @@ -240,9 +242,9 @@ select { */ button, -[type='button'], -[type='reset'], -[type='submit'] { +input:where([type='button']), +input:where([type='reset']), +input:where([type='submit']) { -webkit-appearance: button; /* 1 */ background-color: transparent; @@ -524,6 +526,10 @@ video { --tw-backdrop-opacity: ; --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; } ::-ms-backdrop{ @@ -574,6 +580,10 @@ video { --tw-backdrop-opacity: ; --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; } ::backdrop{ @@ -624,6 +634,10 @@ video { --tw-backdrop-opacity: ; --tw-backdrop-saturate: ; --tw-backdrop-sepia: ; + --tw-contain-size: ; + --tw-contain-layout: ; + --tw-contain-paint: ; + --tw-contain-style: ; } ::-webkit-scrollbar { @@ -965,10 +979,6 @@ video { top: 5rem; } -.top-5{ - top: 1.25rem; -} - .top-8{ top: 2rem; } @@ -981,10 +991,6 @@ video { top: 7rem; } -.-z-10{ - z-index: -10; -} - .z-0{ z-index: 0; } diff --git a/launcher/src/components/UI/server-management/MultiServerScreen.vue b/launcher/src/components/UI/server-management/MultiServerScreen.vue index 412a69af4..bf0e4eb7d 100644 --- a/launcher/src/components/UI/server-management/MultiServerScreen.vue +++ b/launcher/src/components/UI/server-management/MultiServerScreen.vue @@ -4,7 +4,10 @@ import ServerHeader from './components/ServerHeader.vue'; class="w-full h-full absolute inset-0 grid grid-cols-24 grid-rows-7 bg-[#336666] z-10 p-2 rounded-md divide-y-2 divide-gray-300" > @@ -28,7 +31,11 @@ import ServerHeader from './components/ServerHeader.vue'; @remove-handler="removeServerHandler" @close-window="closeWindow" /> - + @@ -53,7 +60,6 @@ const { login, remove, loadStoredConnections } = useServerLogin(); const router = useRouter(); const keyLocation = ref(""); let loginAbortController = new AbortController(); -console.log("Server Management Screen", loginAbortController); const serverBodyComponentKey = ref(0); watchEffect(() => { @@ -113,6 +119,8 @@ const loginHandler = async () => { serverStore.connectingProcess = true; serverStore.isServerAnimationActive = true; await ControlService.logout(); + serverStore.loginState = {}; + // serverStore.selectedServerToConnect await ControlService.stopShell(); await login(loginAbortController.signal); @@ -179,7 +187,9 @@ const serverHandler = (server) => { server.isSelected = true; } - serverStore.savedServers.savedConnections = [...serverStore.savedServers.savedConnections]; + serverStore.savedServers.savedConnections = [ + ...serverStore.savedServers.savedConnections, + ]; }; //Change password handling @@ -211,10 +221,17 @@ const removeServerHandler = async () => { serverStore.isRemoveProcessing = true; serverStore.savedServers.savedConnections = serverStore.savedServers.savedConnections.filter( (item) => - item.host !== serverStore.selectedServerToConnect?.host && item.name !== serverStore.selectedServerToConnect?.name + item.host !== serverStore.selectedServerToConnect?.host && + item.name !== serverStore.selectedServerToConnect?.name ); await remove(); + serverStore.selectedServerToConnect = null; + serverStore.loginState.hostName = ""; + serverStore.loginState.ip = ""; + serverStore.loginState.port = ""; + serverStore.loginState.username = ""; + serverStore.loginState.useAuth = false; serverStore.isRemoveProcessing = false; serverStore.isRemoveModalActive = false; serverBodyComponentKey.value++; @@ -229,7 +246,9 @@ const readSSHKeyFile = async () => { const confirmDelete = async (key) => { serverStore.sshKeys = serverStore.sshKeys.filter((item) => item !== key); try { - await ControlService.writeSSHKeyFile(serverStore.sshKeys.filter((item) => item !== key)); + await ControlService.writeSSHKeyFile( + serverStore.sshKeys.filter((item) => item !== key) + ); await readSSHKeyFile(); } catch (err) { console.log(err); diff --git a/launcher/src/components/UI/server-management/components/ServerBody.vue b/launcher/src/components/UI/server-management/components/ServerBody.vue index 959849306..ff243513e 100644 --- a/launcher/src/components/UI/server-management/components/ServerBody.vue +++ b/launcher/src/components/UI/server-management/components/ServerBody.vue @@ -6,7 +6,11 @@ class="col-start-14 col-span-full row-start-1 row-span-full p-1 grid grid-cols-12 grid-rows-12 bg-[#1b3231] rounded-md" > - + @@ -14,7 +18,11 @@
- +
@@ -32,17 +40,34 @@ import { useControlStore } from "@/store/theControl"; import { computed, onUnmounted, watch } from "vue"; import { useRoute } from "vue-router"; -const emit = defineEmits(["selectServer", "serverLogin", "changePassword", "fileUpload", "deleteKey", "quickLogin"]); +const emit = defineEmits([ + "selectServer", + "serverLogin", + "changePassword", + "fileUpload", + "deleteKey", + "quickLogin", +]); const serverStore = useServers(); const controlStore = useControlStore(); const route = useRoute(); -const isLoginActive = computed(() => route.path === "/login" || serverStore.isServerLoginActive); -const isSSHActive = computed(() => route.path !== "/login" && serverStore.isServerSSHActive); -const isDetailsActive = computed(() => route.path !== "/login" && serverStore.isServerDetailsActive); -const isUpdateActive = computed(() => route.path !== "/login" && serverStore.isServerUpdateActive); -const isSettingsActive = computed(() => route.path !== "/login" && serverStore.isServerSettingsActive); +const isLoginActive = computed( + () => route.path === "/login" || serverStore.isServerLoginActive +); +const isSSHActive = computed( + () => route.path !== "/login" && serverStore.isServerSSHActive +); +const isDetailsActive = computed( + () => route.path !== "/login" && serverStore.isServerDetailsActive +); +const isUpdateActive = computed( + () => route.path !== "/login" && serverStore.isServerUpdateActive +); +const isSettingsActive = computed( + () => route.path !== "/login" && serverStore.isServerSettingsActive +); watch( () => serverStore.selectedServerConnection, @@ -92,7 +117,11 @@ const selectServer = (server) => { }; const addNewServer = () => { + serverStore.savedServers.savedConnections.forEach((s) => { + if (s.isSelected) s.isSelected = false; + }); if (serverStore.connectExistingServer) { + serverStore.addNewServer = false; serverStore.connectExistingServer = false; serverStore.selectServerToConnect = null; } 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 b898546a8..2739ab903 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 @@ -1,5 +1,3 @@ -import { V2_MetaFunction } from "@remix-run/react"; import { computed, onMounted, watch, watchEffect, onUnmounted } from -'vue'; diff --git a/launcher/src/composables/useLogin.js b/launcher/src/composables/useLogin.js index c4197460d..88df7b10b 100644 --- a/launcher/src/composables/useLogin.js +++ b/launcher/src/composables/useLogin.js @@ -153,8 +153,8 @@ export const useServerLogin = () => { let savedConnections = storageSavedConnections.savedConnections || []; const server = serverStore.selectedServerToConnect; - serverStore.connections = serverStore.connections.filter((conn) => conn?.host !== server?.host); - savedConnections = savedConnections.filter((conn) => conn?.host !== server?.host); + serverStore.connections = serverStore.connections.filter((conn) => conn?.name !== server?.name); + savedConnections = savedConnections.filter((conn) => conn?.name !== server?.name); const updatedConfig = { ...storageSavedConnections,