From 030b90eb76480f73e490447a0222acf91e34c46e Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Sat, 19 Oct 2024 11:37:59 +0200 Subject: [PATCH 1/7] Update style for mobile responsive setup (#315) --- src/AliasVault.Admin/Main/App.razor | 2 +- src/AliasVault.Client/Auth/Pages/Setup/Setup.razor | 6 +++--- src/AliasVault.Client/wwwroot/css/app.css | 4 ++++ src/AliasVault.Client/wwwroot/index.template.html | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/AliasVault.Admin/Main/App.razor b/src/AliasVault.Admin/Main/App.razor index 960c1aa19..0ab53e4cd 100644 --- a/src/AliasVault.Admin/Main/App.razor +++ b/src/AliasVault.Admin/Main/App.razor @@ -4,7 +4,7 @@ - + diff --git a/src/AliasVault.Client/Auth/Pages/Setup/Setup.razor b/src/AliasVault.Client/Auth/Pages/Setup/Setup.razor index d5e86f532..2ad0382eb 100644 --- a/src/AliasVault.Client/Auth/Pages/Setup/Setup.razor +++ b/src/AliasVault.Client/Auth/Pages/Setup/Setup.razor @@ -5,8 +5,8 @@ @attribute [AllowAnonymous]
-
-
+
+
@@ -55,7 +55,7 @@ break; }
-
+
@if (_currentStep == SetupStep.Password && !string.IsNullOrWhiteSpace(_setupData.Password)) {
-
+
@if (_currentStep == SetupStep.Password && !string.IsNullOrWhiteSpace(_setupData.Password)) {
-
-
+
+

Password & Identity manager diff --git a/src/AliasVault.Client/Properties/launchSettings.json b/src/AliasVault.Client/Properties/launchSettings.json index 219ec72a3..5fa8f5583 100644 --- a/src/AliasVault.Client/Properties/launchSettings.json +++ b/src/AliasVault.Client/Properties/launchSettings.json @@ -34,7 +34,7 @@ "dotnetRunMessages": true, "launchBrowser": true, "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "applicationUrl": "https://0.0.0.0:7103;http://0.0.0.0:5067", + "applicationUrl": "https://0.0.0.0:7103", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } diff --git a/src/AliasVault.Client/wwwroot/css/tailwind.css b/src/AliasVault.Client/wwwroot/css/tailwind.css index dbb75af51..f55868ba1 100644 --- a/src/AliasVault.Client/wwwroot/css/tailwind.css +++ b/src/AliasVault.Client/wwwroot/css/tailwind.css @@ -1644,6 +1644,18 @@ video { padding-top: 2rem; } +.pb-10 { + padding-bottom: 2.5rem; +} + +.pb-20 { + padding-bottom: 5rem; +} + +.pb-28 { + padding-bottom: 7rem; +} + .text-left { text-align: left; } @@ -2638,6 +2650,10 @@ video { } @media (min-width: 768px) { + .md\:relative { + position: relative; + } + .md\:col-span-1 { grid-column: span 1 / span 1; } @@ -2686,6 +2702,10 @@ video { position: fixed; } + .lg\:relative { + position: relative; + } + .lg\:order-1 { order: 1; } @@ -2722,6 +2742,14 @@ video { margin-top: 0px; } + .lg\:mb-4 { + margin-bottom: 1rem; + } + + .lg\:mb-2 { + margin-bottom: 0.5rem; + } + .lg\:block { display: block; } @@ -2758,6 +2786,14 @@ video { flex-direction: row; } + .lg\:items-center { + align-items: center; + } + + .lg\:justify-center { + justify-content: center; + } + .lg\:gap-4 { gap: 1rem; } @@ -2783,10 +2819,36 @@ video { background-color: rgb(255 255 255 / var(--tw-bg-opacity)); } + .lg\:px-8 { + padding-left: 2rem; + padding-right: 2rem; + } + + .lg\:py-12 { + padding-top: 3rem; + padding-bottom: 3rem; + } + .lg\:pb-16 { padding-bottom: 4rem; } + .lg\:pb-0 { + padding-bottom: 0px; + } + + .lg\:pb-4 { + padding-bottom: 1rem; + } + + .lg\:pt-4 { + padding-top: 1rem; + } + + .lg\:pt-6 { + padding-top: 1.5rem; + } + .lg\:shadow-none { --tw-shadow: 0 0 #0000; --tw-shadow-colored: 0 0 #0000; From f6c9000bec185790dcbbb341875df2a13ecc1dc5 Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Mon, 21 Oct 2024 23:37:08 +0200 Subject: [PATCH 6/7] Fix uninstall script (#315) --- uninstall.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/uninstall.sh b/uninstall.sh index 963b978f1..ab5015768 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -48,9 +48,9 @@ print_logo() { stop_and_remove_containers() { printf "${CYAN}> Stopping and removing Docker containers...${NC}\n" if [ "$VERBOSE" = true ]; then - docker-compose down -v + docker compose down -v else - docker-compose down -v > /dev/null 2>&1 + docker compose down -v > /dev/null 2>&1 fi printf "${GREEN}> Docker containers stopped and removed.${NC}\n" } @@ -59,9 +59,9 @@ stop_and_remove_containers() { remove_docker_images() { printf "${CYAN}> Removing Docker images...${NC}\n" if [ "$VERBOSE" = true ]; then - docker-compose down --rmi all + docker compose down --rmi all else - docker-compose down --rmi all > /dev/null 2>&1 + docker compose down --rmi all > /dev/null 2>&1 fi printf "${GREEN}> Docker images removed.${NC}\n" } From 88e5142049bbf6322db274367b22e6779f2cd1b2 Mon Sep 17 00:00:00 2001 From: Leendert de Borst Date: Tue, 22 Oct 2024 21:18:26 +0200 Subject: [PATCH 7/7] Add scroll to top when switching between steps (#315) --- src/AliasVault.Client/Auth/Pages/Setup/Setup.razor | 5 ++++- src/AliasVault.Client/Services/JsInteropService.cs | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/AliasVault.Client/Auth/Pages/Setup/Setup.razor b/src/AliasVault.Client/Auth/Pages/Setup/Setup.razor index ec1e37f7c..d371cc9ac 100644 --- a/src/AliasVault.Client/Auth/Pages/Setup/Setup.razor +++ b/src/AliasVault.Client/Auth/Pages/Setup/Setup.razor @@ -135,7 +135,7 @@ /// /// Navigates to the next step in the setup process. /// - private void GoNext() + private async Task GoNext() { _currentStep = _currentStep switch { @@ -145,6 +145,9 @@ SetupStep.Password => SetupStep.Creating, _ => _currentStep }; + + await JsInteropService.ScrollToTop(); + StateHasChanged(); } /// diff --git a/src/AliasVault.Client/Services/JsInteropService.cs b/src/AliasVault.Client/Services/JsInteropService.cs index 272829a61..d32645134 100644 --- a/src/AliasVault.Client/Services/JsInteropService.cs +++ b/src/AliasVault.Client/Services/JsInteropService.cs @@ -228,6 +228,15 @@ public sealed class JsInteropService(IJSRuntime jsRuntime) } } + /// + /// Scrolls to the top of the page. + /// + /// Task. + public async Task ScrollToTop() + { + await jsRuntime.InvokeVoidAsync("window.scrollTo", 0, 0); + } + /// /// Represents the result of a WebAuthn get credential operation. ///