diff --git a/app/app.config.ts b/app/app.config.ts new file mode 100644 index 000000000..ee10151b8 --- /dev/null +++ b/app/app.config.ts @@ -0,0 +1,28 @@ +import type { ChromeTheme } from "@ogw_front/composables/chrome_theme"; +import type { SceneColors } from "@ogw_front/utils/default_styles"; + +declare module "nuxt/schema" { + interface AppConfigInput { + ogwFront?: { + chromeTheme?: ChromeTheme; + orientationOverlay?: boolean; + // Colors ({ red, green, blue, alpha }) of a new or reset scene, see plugins/scene_colors.ts + sceneColors?: SceneColors; + }; + } +} + +// Apps extending this layer override these values in their own app.config.ts. +// oxlint-disable-next-line import/no-default-export +export default defineAppConfig({ + ogwFront: { + // Vuetify theme forced on the floating chrome (GlassCard panels, loading screen...). + // "inherit" makes it follow the app's current theme instead. + chromeTheme: "dark", + // Draw the orientation marker (axes or compass) as a front overlay instead of the viewer's VTK + // Marker, which is then hidden (see composables/orientation_overlay.ts). + orientationOverlay: false, + // Colors of a new or reset scene, the OpenGeodeWeb ones when not set (see utils/default_styles) + sceneColors: {}, + }, +}); diff --git a/app/assets/css/main.css b/app/assets/css/main.css index bea0d27ed..7e1cccabc 100644 --- a/app/assets/css/main.css +++ b/app/assets/css/main.css @@ -22,3 +22,14 @@ font-size: 1rem !important; line-height: 1.5rem !important; } + +/* Turns an icon on itself (loading states), as the MDI mdi-spin did */ +.ogw-spin { + animation: ogw-spin 2s infinite linear; +} + +@keyframes ogw-spin { + to { + transform: rotate(360deg); + } +} diff --git a/app/assets/viewer_svgs/camera-bookmark.svg b/app/assets/viewer_svgs/camera-bookmark.svg deleted file mode 100644 index 3717138e7..000000000 --- a/app/assets/viewer_svgs/camera-bookmark.svg +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - diff --git a/app/components/ActionButton.vue b/app/components/ActionButton.vue index 5ca60b5a2..4f161537f 100644 --- a/app/components/ActionButton.vue +++ b/app/components/ActionButton.vue @@ -41,7 +41,7 @@ const emit = defineEmits(); icon @click="emit('click', $event)" > - {{ + {{ icon }} (); :src="icon" :height="iconSize" :width="iconSize" - class="d-flex justify-center align-center" + class="d-flex justify-center align-center ogw-svg-icon" /> + + diff --git a/app/components/CameraManager.vue b/app/components/CameraManager.vue index bd37cd146..cf694c72f 100644 --- a/app/components/CameraManager.vue +++ b/app/components/CameraManager.vue @@ -54,7 +54,6 @@ const show = computed({ - mdi-play + ph-play Restore @@ -83,10 +83,10 @@ async function saveRename(): void { icon variant="text" size="x-small" - color="grey-darken-1" + class="text-medium-emphasis" @click="startEditing(position)" > - mdi-pencil + ph-pencil-simple Rename - mdi-delete + ph-trash Delete -
- mdi-camera-off +
+ ph-camera-slash No saved positions yet.
diff --git a/app/components/CameraOrientation.vue b/app/components/CameraOrientation.vue index 6da6f70f4..3b5a8a3c3 100644 --- a/app/components/CameraOrientation.vue +++ b/app/components/CameraOrientation.vue @@ -193,7 +193,11 @@ watch(hoveredFace, (newFace, oldFace) => { class="pa-0 overflow-hidden position-relative" style=" height: 220px; - background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05), transparent 70%); + background: radial-gradient( + circle at center, + rgba(var(--v-theme-on-surface), 0.05), + transparent 70% + ); " > @@ -204,10 +208,11 @@ watch(hoveredFace, (newFace, oldFace) => { y1="50%" :x2="orientation.position.left" :y2="orientation.position.top" - :stroke="hoveredFace === orientation.face ? 'white' : 'rgba(255,255,255,0.1)'" + stroke="currentColor" + :stroke-opacity="hoveredFace === orientation.face ? 1 : 0.1" :stroke-width="hoveredFace === orientation.face ? 2 : 1" class="transition-all" - style="filter: drop-shadow(0 0 3px white)" + style="filter: drop-shadow(0 0 3px currentColor)" /> @@ -272,15 +277,15 @@ watch(hoveredFace, (newFace, oldFace) => { diff --git a/app/components/ClippingPlaneCard.vue b/app/components/ClippingPlaneCard.vue index f1c59cb2f..b4728a1db 100644 --- a/app/components/ClippingPlaneCard.vue +++ b/app/components/ClippingPlaneCard.vue @@ -40,7 +40,7 @@ const emit = defineEmits(); (); :max="1" :step="0.05" :color="getPlaneCssColor(index)" - track-color="grey-lighten-2" density="compact" hide-details /> @@ -104,7 +103,7 @@ const emit = defineEmits(); size="x-small" variant="text" color="primary" - prepend-icon="mdi-swap-horizontal" + prepend-icon="ph-arrows-left-right" class="text-none text-caption px-1" @click="emit('flipNormal')" > diff --git a/app/components/ClippingPlanes.vue b/app/components/ClippingPlanes.vue index 805ac0836..68bc621a7 100644 --- a/app/components/ClippingPlanes.vue +++ b/app/components/ClippingPlanes.vue @@ -288,7 +288,7 @@ onBeforeUnmount(cleanupLocalWidget); size="x-small" variant="tonal" color="primary" - icon="mdi-plus" + icon="ph-plus" @click="addSlice" /> @@ -314,7 +314,7 @@ onBeforeUnmount(cleanupLocalWidget); size="x-small" variant="tonal" color="primary" - icon="mdi-plus" + icon="ph-plus" @click="addPlane" /> diff --git a/app/components/CrsSelector.vue b/app/components/CrsSelector.vue index 63ae0943a..c895a4a1f 100644 --- a/app/components/CrsSelector.vue +++ b/app/components/CrsSelector.vue @@ -73,8 +73,8 @@ onMounted(async () => { (); - +

Mandatory files:

@@ -268,7 +268,7 @@ await missing_files();
- +

Additional files:

diff --git a/app/components/ObjectSelector.vue b/app/components/ObjectSelector.vue index 65e37c50e..906c13c30 100644 --- a/app/components/ObjectSelector.vue +++ b/app/components/ObjectSelector.vue @@ -210,7 +210,7 @@ await getAllowedGeodeObjects();
- +

Not supported, will be skipped:

{{ filename }} diff --git a/app/components/PackagesVersions.vue b/app/components/PackagesVersions.vue index 31dbffe56..767a3904a 100644 --- a/app/components/PackagesVersions.vue +++ b/app/components/PackagesVersions.vue @@ -49,9 +49,7 @@ await get_packages_versions();
diff --git a/app/components/ProjectCrs.vue b/app/components/ProjectCrs.vue index 8538766c1..9591e8b17 100644 --- a/app/components/ProjectCrs.vue +++ b/app/components/ProjectCrs.vue @@ -17,7 +17,7 @@ const label = computed(() => class="project-crs text-none" size="small" variant="tonal" - prepend-icon="mdi-earth" + prepend-icon="ph-globe-hemisphere-west" :disabled="!crsStore.crsEditEnabled" v-tooltip="formatCrs(crsStore.projectCrs)" @click="crsStore.requestProjectCrsEdit()" diff --git a/app/components/Screenshot.vue b/app/components/Screenshot.vue index ce213d636..3543f0862 100644 --- a/app/components/Screenshot.vue +++ b/app/components/Screenshot.vue @@ -10,8 +10,10 @@ import viewer_schemas, { import ToolPanel from "@ogw_front/components/ToolPanel.vue"; import fileDownload from "js-file-download"; import { useClipboardItems } from "@vueuse/core"; +import { useDataStyleStore } from "@ogw_front/stores/data_style"; import { useFeedbackStore } from "@ogw_front/stores/feedback"; import { useViewerStore } from "@ogw_front/stores/viewer"; +import { withViewerMarker } from "@ogw_front/composables/orientation_overlay"; const DEFAULT_PANEL_WIDTH = 260; const EXTENSION_SELECT_WIDTH = 80; @@ -68,6 +70,7 @@ async function deliverScreenshot(blob: Blob | Uint8Array, current_filename: stri async function takeSceneScreenshot(current_filename: string): Promise { const viewerStore = useViewerStore(); + const dataStyleStore = useDataStyleStore(); const schema = viewer_schemas.opengeodeweb_viewer.viewer.take_screenshot; const params = { filename: current_filename, @@ -75,16 +78,23 @@ async function takeSceneScreenshot(current_filename: string): Promise { include_background: include_background.value, ...screenshot_size.value, }; - await viewerStore.request( - { - schema, - params, - }, - { - // `blob` is the image file content, received as binary (Uint8Array) through wslink - response_function: async ({ blob }) => { - await deliverScreenshot(blob, current_filename); - }, + // The front orientation overlay is not part of the viewer image: the viewer draws its marker for the capture + await withViewerMarker( + dataStyleStore.sceneStyle.orientation_widget, + (args) => viewerStore.request(args), + async () => { + await viewerStore.request( + { + schema, + params, + }, + { + // `blob` is the image file content, received as binary (Uint8Array) through wslink + response_function: async ({ blob }) => { + await deliverScreenshot(blob, current_filename); + }, + }, + ); }, ); } @@ -202,7 +212,7 @@ function handleClose(): void { > @@ -286,7 +296,7 @@ function handleClose(): void { /> px - +
@@ -321,7 +331,6 @@ function handleClose(): void { Screenshot diff --git a/app/components/SearchBar.vue b/app/components/SearchBar.vue index 27c475f0d..0a7ce2c3b 100644 --- a/app/components/SearchBar.vue +++ b/app/components/SearchBar.vue @@ -17,14 +17,12 @@ const emit = defineEmits();