diff --git a/ui/locales/app.de.json b/ui/locales/app.de.json
index 8976af170..c5bd92bf6 100644
--- a/ui/locales/app.de.json
+++ b/ui/locales/app.de.json
@@ -1,4 +1,9 @@
{
+ "menu_layers": "Angezeigte Daten",
+ "menu_tools": "Werkzeuge",
+ "menu_share": "Teilen",
+ "menu_projects": "Projekte",
+ "menu_settings": "Einstellungen",
"app_cancel_btn_label": "Abbrechen",
"by": "von",
"cam_configuration_header": "Kamera-Einstellungen",
@@ -92,7 +97,7 @@
"dtd_zoom_to": "Heranzoomen",
"duplicate_to_project": "Zu Projekt duplizieren",
"edit_project": "Projekt bearbeiten",
- "header_search_placeholder": "Suche...",
+ "header_search_placeholder": "Suche nach...",
"lsb_cesium_toolbar_label": "Cesium-Toolbar",
"lsb_debug_tools": "Debugtools",
"lsb_settings": "Einstellungen",
diff --git a/ui/locales/app.en.json b/ui/locales/app.en.json
index e7a72090d..46f09e0bb 100644
--- a/ui/locales/app.en.json
+++ b/ui/locales/app.en.json
@@ -1,4 +1,9 @@
{
+ "menu_layers": "Angezeigte Daten",
+ "menu_tools": "Werkzeuge",
+ "menu_share": "Teilen",
+ "menu_projects": "Projekte",
+ "menu_settings": "Einstellungen",
"app_cancel_btn_label": "Cancel",
"by": "by",
"cam_configuration_header": "Camera configuration",
@@ -92,7 +97,7 @@
"dtd_zoom_to": "Zoom to",
"duplicate_to_project": "Duplicate to my projects",
"edit_project": "Edit project",
- "header_search_placeholder": "Search...",
+ "header_search_placeholder": "Search by...",
"lsb_cesium_toolbar_label": "Cesium Toolbar",
"lsb_debug_tools": "Debug tools",
"lsb_settings": "Settings",
diff --git a/ui/locales/app.fr.json b/ui/locales/app.fr.json
index 182704e46..b071d1f2d 100644
--- a/ui/locales/app.fr.json
+++ b/ui/locales/app.fr.json
@@ -1,4 +1,9 @@
{
+ "menu_layers": "Données Affichées",
+ "menu_tools": "Outils",
+ "menu_share": "Partager",
+ "menu_projects": "Projets",
+ "menu_settings": "Paramètres",
"app_cancel_btn_label": "Annuler",
"by": "de",
"cam_configuration_header": "Configuration de la caméra",
@@ -92,7 +97,7 @@
"dtd_zoom_to": "Zoom sur",
"duplicate_to_project": "Dupliquer comme projet",
"edit_project": "Editer projet",
- "header_search_placeholder": "Recherche...",
+ "header_search_placeholder": "Recherche par...",
"lsb_cesium_toolbar_label": "Cesium Toolbar",
"lsb_debug_tools": "Debug tools",
"lsb_settings": "Paramètres",
diff --git a/ui/locales/app.it.json b/ui/locales/app.it.json
index 5f6ef7bfc..ee58a5699 100644
--- a/ui/locales/app.it.json
+++ b/ui/locales/app.it.json
@@ -1,4 +1,9 @@
{
+ "menu_layers": "Dati Visualizzati",
+ "menu_tools": "Strumenti",
+ "menu_share": "Condividi",
+ "menu_projects": "Progetti",
+ "menu_settings": "Impostazioni",
"app_cancel_btn_label": "Cancellare",
"by": "di",
"cam_configuration_header": "Configurazione della camera",
@@ -92,7 +97,7 @@
"dtd_zoom_to": "Zoom su",
"duplicate_to_project": "Duplicare nei progetti",
"edit_project": "Editare progetto",
- "header_search_placeholder": "Ricercare...",
+ "header_search_placeholder": "Ricercare per...",
"lsb_cesium_toolbar_label": "Cesium Toolbar",
"lsb_debug_tools": "Debug tools",
"lsb_settings": "Impostazioni",
diff --git a/ui/src/components/search/search-input.ts b/ui/src/components/search/search-input.ts
index 4b243a2ea..05937a9aa 100644
--- a/ui/src/components/search/search-input.ts
+++ b/ui/src/components/search/search-input.ts
@@ -79,8 +79,8 @@ export class SearchInput extends LitElementI18n {
-
-
+
+
`;
protected updated(changedProperties: PropertyValues): void {
@@ -394,9 +394,9 @@ export class SearchInput extends LitElementI18n {
align-self: center;
flex: 2;
- --padding-h: 1rem;
- --padding-v: 1rem;
- --icon-size: 24px;
+ --padding-h: 12px;
+ --padding-v: 6px;
+ --icon-size: 20px;
}
:host {
@@ -410,9 +410,9 @@ export class SearchInput extends LitElementI18n {
@media (width >= 700px) {
:host {
position: relative;
- height: calc(var(--ngm-header-height) - var(--header-padding-v) * 2);
- min-width: 260px;
- max-width: 496px;
+ height: 56px;
+ width: 500px;
+ max-width: 500px;
}
}
@@ -432,10 +432,9 @@ export class SearchInput extends LitElementI18n {
@media (min-width: 700px) {
ga-search, :host(:not(.is-active)) ga-search {
display: flex;
- min-width: 260px;
- max-width: 496px;
+ width: 500px;
+ max-width: 500px;
z-index: auto;
- margin-left: 100px;
}
}
@@ -448,40 +447,23 @@ export class SearchInput extends LitElementI18n {
font-family: var(--font);
font-size: 1rem;
+ line-height: 24px;
+ letter-spacing: calc(1rem * 0.001);
flex: 1;
width: 100%;
height: 100%;
- padding: var(--padding-v) calc(var(--padding-v) * 2 + var(--icon-size)) var(--padding-v) var(--padding-h);
+ padding: var(--padding-v) var(--padding-h) var(--padding-v) calc(var(--padding-h) * 2 + var(--icon-size));
- border: 2px solid transparent;
- border-radius: 4px;
- }
-
- input:hover {
- background-color: var(--color-bg);
- }
-
- input:focus {
- background-color: var(--color-highlight);
- }
-
- input:focus, input:hover {
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
- border-color: transparent;
- border-bottom-color: var(--color-highlight--dark);
+ border: none;
+ border-bottom: 2px solid var(--color-main);
+ border-radius: 6px;
}
input::placeholder {
color: var(--color-bg-contrast);
}
- input:focus::placeholder {
- color: var(--color-bg-contrast--lighter);
- opacity: 1;
- }
-
input::-webkit-search-decoration,
input::-webkit-search-cancel-button,
input::-webkit-search-results-button,
@@ -504,8 +486,8 @@ export class SearchInput extends LitElementI18n {
text-align: left;
font-family: var(--font);
font-size: 1rem;
- line-height: 1.5rem;
- letter-spacing: 0.16px;
+ line-height: 24px;
+ letter-spacing: calc(1rem * 0.001);
}
ul > li {
@@ -545,45 +527,37 @@ export class SearchInput extends LitElementI18n {
}
/* icon */
-
- .icon {
+ ngm-icon {
width: var(--icon-size);
height: var(--icon-size);
- mask: var(--icon, none) no-repeat center;
- -webkit-mask: var(--icon, none) no-repeat center;
- background-color: var(--color-highlight--darker);
+ color: var(--color-bg-contrast);
position: absolute;
- right: var(--padding-h);
+ left: var(--padding-h);
top: 0;
bottom: 0;
margin: auto;
cursor: pointer;
}
- .icon.is-close {
- --icon: url('./images/i_close.svg');
+ ngm-icon[icon="close"] {
right: calc(var(--padding-h) + 54px)
}
- .icon.is-search {
- --icon: url('./images/icon_search.svg');
- }
-
- :host(.is-active) .icon.is-search {
+ :host(.is-active) ngm-icon[icon="search"] {
color: var(--color-highlight);
}
- ga-search:has(input:placeholder-shown) ~ .icon.is-close {
+ ga-search:has(input:placeholder-shown) ~ ngm-icon[icon="close"] {
display: none;
}
@media (min-width: 700px) {
- .icon.is-close {
- right: var(--padding-h);
+ ngm-icon[icon="close"] {
+ display: none;
}
- ga-search:has(input:not(:placeholder-shown)) ~ .icon.is-search {
+ ga-search:has(input:not(:placeholder-shown)) ~ ngm-icon[icon="search"] {
display: none;
}
}
diff --git a/ui/src/elements/ngm-auth.ts b/ui/src/elements/ngm-auth.ts
index d5726ac93..7e9eb5dad 100644
--- a/ui/src/elements/ngm-auth.ts
+++ b/ui/src/elements/ngm-auth.ts
@@ -1,13 +1,13 @@
-import {html} from 'lit';
+import {css, html} from 'lit';
import type {AuthUser} from '../authService';
import AuthService from '../authService';
import {LitElementI18n} from '../i18n.js';
import auth from '../store/auth';
-import {classMap} from 'lit/directives/class-map.js';
import {customElement, property, state} from 'lit/decorators.js';
import DashboardStore from '../store/dashboard';
import {consume} from '@lit/context';
import {authServiceContext} from '../context';
+import './shared/ngm-icon';
/**
* Authentication component
@@ -61,16 +61,28 @@ export class NgmAuth extends LitElementI18n {
this.authService.logout();
}
- render() {
- return html`
- `;
- }
+ readonly render = () => html`
+
+
+
+ `;
- createRenderRoot() {
- // no shadow dom
- return this;
- }
+ static readonly styles = css`
+ div {
+ color: var(--color-bg);
+ background-color: var(--color-main);
+ width: 36px;
+ height: 36px;
+ border-radius: 50%;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ cursor: pointer;
+ }
+
+ ngm-icon {
+ width: 20px;
+ height: 20px;
+ }
+ `;
}
diff --git a/ui/src/elements/ngm-cursor-information.ts b/ui/src/elements/ngm-cursor-information.ts
index ec909c66c..3419f6102 100644
--- a/ui/src/elements/ngm-cursor-information.ts
+++ b/ui/src/elements/ngm-cursor-information.ts
@@ -1,4 +1,4 @@
-import {html} from 'lit';
+import {css, html} from 'lit';
import i18next from 'i18next';
import {LitElementI18n} from '../i18n.js';
import type {Viewer} from 'cesium';
@@ -73,23 +73,62 @@ export class NgmCursorInformation extends LitElementI18n {
render() {
if (!this.coordinates || this.height === undefined) return '';
return html`
-
-
-
-
+
+
+
+
+
+
+
+ ${this.showTerrainHeight ? i18next.t('nav_terrain_height_label') : i18next.t('nav_object_height_label')}
-
-
- ${this.showTerrainHeight ? i18next.t('nav_terrain_height_label') : i18next.t('nav_object_height_label')}
-
-
- ${this.height !== undefined && this.integerFormat.format(this.height)} m
-
+
+ ${this.height !== undefined && this.integerFormat.format(this.height)} m
- `;
+
+ `;
}
- createRenderRoot() {
- return this;
- }
+
+ static readonly styles = css`
+ :host {
+ min-width: 0;
+ }
+
+ .ngm-nci-height,
+ .ngm-nci-position {
+ display: none;
+ }
+
+ @media (min-width: 1200px) {
+ :host .ngm-nci-value {
+ font-weight: 600;
+ min-width: 75px;
+ }
+
+ .ngm-nci-position {
+ display: unset;
+ width: 83px;
+ margin-right: 20px;
+ }
+
+ .ngm-nci-height {
+ display: flex;
+ flex-direction: column;
+ white-space: nowrap;
+ margin-right: 10px;
+ }
+
+ :host {
+ flex-wrap: wrap;
+ align-self: center;
+ color: #212529;
+ text-align: left;
+ font: normal normal normal 14px/20px Inter, sans-serif;
+ letter-spacing: 0;
+ min-width: 255px;
+ padding-right:48px
+ }
+ }
+ `;
}
diff --git a/ui/src/elements/ngm-side-bar.ts b/ui/src/elements/ngm-side-bar.ts
index 2358a7a63..56c36bf6e 100644
--- a/ui/src/elements/ngm-side-bar.ts
+++ b/ui/src/elements/ngm-side-bar.ts
@@ -4,6 +4,8 @@ import '../toolbox/ngm-toolbox';
import '../layers/ngm-layers';
import '../layers/ngm-layers-sort';
import './dashboard/ngm-dashboard';
+import './sidebar/ngm-menu-item';
+import './shared/ngm-icon';
import '../components/navigation/navigation-layer-panel';
import LayersActions from '../layers/LayersActions';
import {DEFAULT_LAYER_OPACITY, LayerType} from '../constants';
@@ -181,10 +183,20 @@ export class SideBar extends LitElementI18n {
});
const sliceOptions = getSliceParam();
- if (sliceOptions && sliceOptions.type && sliceOptions.slicePoints)
+ if (sliceOptions?.type && sliceOptions.slicePoints)
this.activePanel = 'tools';
}
+ private readonly renderMenuItem = (icon: string, title: string, panel: string) => html`
+
this.togglePanel(panel)}
+ >
+ `;
+
render() {
if (!this.queryManager) {
return '';
@@ -193,16 +205,17 @@ export class SideBar extends LitElementI18n {
this.queryManager.activeLayers = this.activeLayers
.filter(config => config.visible && !config.noQuery);
- const shareBtn = html`
-
this.togglePanel('share')}>
-
-
`;
- const settingsBtn = html`
-
this.togglePanel('settings')}>
-
-
`;
+
+ const layerBtn = this.renderMenuItem('layer', 'menu_layers', 'data');
+ const toolsBtn = this.renderMenuItem('tools', 'menu_tools', 'tools');
+ const projectsBtn = this.renderMenuItem('projects', 'menu_projects', 'dashboard');
+ const shareBtn = this.renderMenuItem('share', 'menu_share', 'share');
+ const settingsBtn = this.renderMenuItem('config', 'menu_settings', 'settings');
+ const mobileExpandBtn = html`
+
this.mobileShowAll = !this.mobileShowAll}
+ >`;
return html`
-