diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index da2103432..c368be0bb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,7 +33,7 @@ repos: - id: integrity-updater exclude: |- (?x)^( - ui/interfaces/desktop_alt\.html + ui/.*\.html )$ - repo: https://github.com/PyCQA/autoflake rev: v2.3.1 diff --git a/.secretsignore b/.secretsignore index c764736a3..fde2b7ce4 100644 --- a/.secretsignore +++ b/.secretsignore @@ -1,2 +1,2 @@ -/geoportal/interfaces/desktop_alt.html.mako -/ui/interfaces/desktop_alt.html +[secrets] +AIzaSyA3NVIy-HOYT0a0CkChA6nFwqEFqHYWBVk diff --git a/Dockerfile b/Dockerfile index 623f3329a..325552f34 100644 --- a/Dockerfile +++ b/Dockerfile @@ -98,16 +98,13 @@ COPY ui/package.json ui/package-lock.json ./ RUN npm install --ignore-scripts COPY ui/ ./ -#COPY ui/tsconfig.json vite.config.ts ./ -#COPY ui/interfaces/ ./interfaces/ -#COPY ui/src/ ./src/ -RUN ls -l && \ - ls -l src && \ - NODE_ENV=production npm run build +RUN NODE_ENV=production npm run build ############################################################################### FROM gmf_config AS config + COPY --from=webcomponent-build /app/dist/ /etc/geomapfish/static/custom/ -COPY --from=ui-build /app/dist/interfaces/* /etc/static-frontend/ -COPY --from=ui-build /app/dist/assets /etc/static-frontend/ + +COPY --from=ui-build /app/dist/* /etc/static-frontend/ +VOLUME /etc/static-frontend/ diff --git a/geoportal/vars.yaml b/geoportal/vars.yaml index 7d5fa45b2..a9675e3a5 100644 --- a/geoportal/vars.yaml +++ b/geoportal/vars.yaml @@ -42,14 +42,19 @@ vars: default: True - name: mobile - name: iframe_api + - name: iframe_api_renovated + type: custom + html: iframe_api.html - name: desktop_alt type: canvas layout: desktop - name: desktop_renovated type: custom + html: desktop.html - name: mobile_alt - name: mobile_renovated type: custom + html: mobile.html - name: oeedit interfaces_config: diff --git a/ui/README.md b/ui/README.md new file mode 100644 index 000000000..03783e98d --- /dev/null +++ b/ui/README.md @@ -0,0 +1,21 @@ +# The renovate interface + +The renovate interface is the desktop, mobile and iframe_api interfaces from ngeo that uses the ngeo directly (renovate). + +## Development + +The server application should be started previously, you can start it by running: + +```bash +cd ../ +./build +docker compose up -d +``` + +To start the development server, run: + +```bash +npm run dev +``` + +Open the application in your browser at [http://localhost:3002/static-frontend/desktop.html](http://localhost:3002/static-frontend/desktop.html), fir the desktop interface. diff --git a/ui/interfaces/desktop_alt.html b/ui/desktop.html similarity index 98% rename from ui/interfaces/desktop_alt.html rename to ui/desktop.html index a185aeba5..6fcdd2733 100644 --- a/ui/interfaces/desktop_alt.html +++ b/ui/desktop.html @@ -5,8 +5,8 @@ - - + +
@@ -388,7 +388,6 @@ url="mainCtrl.displaywindowUrl" width="mainCtrl.displaywindowWidth" > - @@ -497,6 +495,6 @@ referrerpolicy="no-referrer" src="https://maps.googleapis.com/maps/api/js?v=3&key=AIzaSyA3NVIy-HOYT0a0CkChA6nFwqEFqHYWBVk" > - + diff --git a/ui/public/background-layer-button.png b/ui/public/background-layer-button.png new file mode 100644 index 000000000..46767ce30 Binary files /dev/null and b/ui/public/background-layer-button.png differ diff --git a/ui/public/favicon.ico b/ui/public/favicon.ico new file mode 100644 index 000000000..2eb150037 Binary files /dev/null and b/ui/public/favicon.ico differ diff --git a/ui/interfaces/Controllerdesktop_alt.ts b/ui/src/interfaces/Controllerdesktop.ts similarity index 96% rename from ui/interfaces/Controllerdesktop_alt.ts rename to ui/src/interfaces/Controllerdesktop.ts index 64bf4410b..b50283d00 100644 --- a/ui/interfaces/Controllerdesktop_alt.ts +++ b/ui/src/interfaces/Controllerdesktop.ts @@ -29,7 +29,7 @@ // Various fixies // delete src/controllers/bootstrap.js webpack things and remove .vite/deps -import './desktop_alt.css'; +import './desktop.css'; import 'jquery'; import 'jquery-ui/dist/jquery-ui.js'; @@ -70,7 +70,7 @@ class Controller extends AbstractDesktopController { /** * @hidden */ -const geomapfishModule = angular.module('Appdesktop_alt', [ +const geomapfishModule = angular.module('Appdesktop', [ geomapfishBase.name, gmfControllersAbstractDesktopController.name, gmfImportModule.name, diff --git a/ui/src/interfaces/desktop.css b/ui/src/interfaces/desktop.css new file mode 100644 index 000000000..f2d9f37b3 --- /dev/null +++ b/ui/src/interfaces/desktop.css @@ -0,0 +1,63 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) Camptocamp SA + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +@import 'ngeo/controllers/desktop.css'; +@import 'mapillary-js'; + +html { + body { + padding: 0; + } +} +header { + .logo { + background-image: url('../image/logo.svg'); + span { + left: 18.5rem; + position: absolute; + bottom: 0.2rem; + } + span::before { + content: 'by Camptocamp'; + } + } +} + +.gmf-theme-selector li { + flex-direction: column; + span.gmf-text { + width: auto; + } +} +.gmf-theme-selector .gmf-thumb { + height: 3rem; +} + +.gmf-layertree-node .gmf-layertree-legend { + border: none; + background-color: transparent; +} + +.offset-info-icon { + position: absolute; +} diff --git a/ui/interfaces/geomapfishmodule.js b/ui/src/interfaces/geomapfishmodule.js similarity index 100% rename from ui/interfaces/geomapfishmodule.js rename to ui/src/interfaces/geomapfishmodule.js diff --git a/ui/vite.config.js b/ui/vite.config.js index 11a585b27..b5e20a2e1 100644 --- a/ui/vite.config.js +++ b/ui/vite.config.js @@ -9,10 +9,15 @@ export default defineConfig({ }, base: '/static-frontend/', build: { + lib: { + entry: '.', + name: 'gmf', + }, + publicDir: true, sourcemap: true, rollupOptions: { input: { - desktop_alt: path.resolve(__dirname, 'interfaces/desktop_alt.html'), + desktop: path.resolve(__dirname, 'desktop_renovated.html'), }, }, },