From 4a4917e4edcec4b8c4cd77f599d5025a9fa361e3 Mon Sep 17 00:00:00 2001 From: _Bastler Date: Wed, 7 Dec 2022 21:29:32 +0100 Subject: [PATCH] fix mobile search, reorder menu --- ngsw-config.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- src/app/ui/main/main.ui.html | 24 ++++++++++++------------ src/app/ui/main/main.ui.ts | 10 ++++++---- 5 files changed, 22 insertions(+), 20 deletions(-) diff --git a/ngsw-config.json b/ngsw-config.json index 1af9f50..ace6c43 100644 --- a/ngsw-config.json +++ b/ngsw-config.json @@ -2,7 +2,7 @@ "$schema": "./node_modules/@angular/service-worker/config/schema.json", "index": "/index.html", "appData": { - "version": "1.5.1" + "version": "1.5.2" }, "assetGroups": [ { diff --git a/package-lock.json b/package-lock.json index e846cbd..e909770 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bstlboard", - "version": "1.5.1", + "version": "1.5.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bstlboard", - "version": "1.5.1", + "version": "1.5.2", "license": "AGPL3", "dependencies": { "@angular-material-components/datetime-picker": "^9.0.0", diff --git a/package.json b/package.json index 6962028..4c956ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bstlboard", - "version": "1.5.1", + "version": "1.5.2", "license": "AGPL3", "scripts": { "ng": "ng", diff --git a/src/app/ui/main/main.ui.html b/src/app/ui/main/main.ui.html index ffb987a..0b83150 100644 --- a/src/app/ui/main/main.ui.html +++ b/src/app/ui/main/main.ui.html @@ -45,10 +45,10 @@ - - - + + report @@ -58,12 +58,18 @@ feedback {{'moderation.comments' | i18n}} - - + + bookmarks {{'bookmarks' | i18n}} - + + + + + + help @@ -71,12 +77,6 @@ - - - - - diff --git a/src/app/ui/main/main.ui.ts b/src/app/ui/main/main.ui.ts index 4da22ef..22e66ec 100644 --- a/src/app/ui/main/main.ui.ts +++ b/src/app/ui/main/main.ui.ts @@ -27,11 +27,12 @@ export class UiMain { locales; authenticated: boolean = false; moderator: boolean = false; + searchFocus: boolean = false; touchThresh: number = 150; touchStartX: number; touchX: number; - + version = packageJson.version; constructor( @@ -105,13 +106,14 @@ export class UiMain { } search(text, event) { - if (text) { - this.router.navigate(["search"], { queryParams: { q: text } }); - } event.target.value = ''; + event.target.blur(); if (!this.isBiggerScreen()) { this.close(); } + if (text) { + this.router.navigate(["search"], { queryParams: { q: text } }); + } } toggleDarkTheme() {