diff --git a/packages/frontend-2/components/viewer/Controls.vue b/packages/frontend-2/components/viewer/Controls.vue index a263b1c58a..597d877fc8 100644 --- a/packages/frontend-2/components/viewer/Controls.vue +++ b/packages/frontend-2/components/viewer/Controls.vue @@ -147,7 +147,7 @@ : '-translate-x-[100%] opacity-0' } ${isEmbedEnabled ? 'mt-1.5' : 'mt-[4rem]'}`" > -
+
diff --git a/packages/frontend-2/components/viewer/GlobalFilterReset.vue b/packages/frontend-2/components/viewer/GlobalFilterReset.vue index 78485e7164..c76582e120 100644 --- a/packages/frontend-2/components/viewer/GlobalFilterReset.vue +++ b/packages/frontend-2/components/viewer/GlobalFilterReset.vue @@ -1,8 +1,7 @@ diff --git a/packages/frontend-2/lib/viewer/composables/setup/postSetup.ts b/packages/frontend-2/lib/viewer/composables/setup/postSetup.ts index ad929fb6b3..09eed9cc1a 100644 --- a/packages/frontend-2/lib/viewer/composables/setup/postSetup.ts +++ b/packages/frontend-2/lib/viewer/composables/setup/postSetup.ts @@ -51,6 +51,7 @@ import { CameraController } from '@speckle/viewer' import type { Reference } from '@apollo/client' import type { Modifier } from '@apollo/client/cache' import { useEmbed } from '~/lib/viewer/composables/setup/embed' +import { useMeasurementUtilities } from '~~/lib/viewer/composables/ui' function useViewerIsBusyEventHandler() { const state = useInjectedViewerState() @@ -724,6 +725,12 @@ function useViewerMeasurementIntegration() { viewer: { instance } } = useInjectedViewerState() + const { clearMeasurements } = useMeasurementUtilities() + + onBeforeUnmount(() => { + clearMeasurements() + }) + watch( () => measurement.enabled.value, (newVal, oldVal) => { diff --git a/packages/frontend-2/lib/viewer/composables/ui.ts b/packages/frontend-2/lib/viewer/composables/ui.ts index 1e8d65dfbf..307653454c 100644 --- a/packages/frontend-2/lib/viewer/composables/ui.ts +++ b/packages/frontend-2/lib/viewer/composables/ui.ts @@ -1,6 +1,6 @@ import { SpeckleViewer, timeoutAt } from '@speckle/shared' import type { TreeNode } from '@speckle/viewer' -import { CameraController } from '@speckle/viewer' +import { CameraController, MeasurementsExtension } from '@speckle/viewer' import type { MeasurementOptions, PropertyInfo } from '@speckle/viewer' import { until } from '@vueuse/shared' import { difference, isString, uniq } from 'lodash-es' @@ -357,10 +357,15 @@ export function useMeasurementUtilities() { } } + const clearMeasurements = () => { + state.viewer.instance.getExtension(MeasurementsExtension).clearMeasurements() + } + return { enableMeasurements, setMeasurementOptions, - removeMeasurement + removeMeasurement, + clearMeasurements } } diff --git a/packages/server/modules/core/services/ratelimiter.ts b/packages/server/modules/core/services/ratelimiter.ts index de381dd8af..cc98a2904f 100644 --- a/packages/server/modules/core/services/ratelimiter.ts +++ b/packages/server/modules/core/services/ratelimiter.ts @@ -29,12 +29,12 @@ export enum RateLimitAction { 'GET /objects/:streamId/:objectId' = 'GET /objects/:streamId/:objectId', 'GET /objects/:streamId/:objectId/single' = 'GET /objects/:streamId/:objectId/single', 'POST /graphql' = 'POST /graphql', - 'GET /auth/local/login' = 'GET /auth/local/login', + 'POST /auth/local/login' = 'POST /auth/local/login', 'GET /auth/azure' = 'GET /auth/azure', 'GET /auth/gh' = 'GET /auth/gh', 'GET /auth/goog' = 'GET /auth/goog', 'GET /auth/oidc' = 'GET /auth/oidc', - 'GET /auth/azure/callback' = 'GET /auth/azure/callback', + 'POST /auth/azure/callback' = 'POST /auth/azure/callback', 'GET /auth/gh/callback' = 'GET /auth/gh/callback', 'GET /auth/goog/callback' = 'GET /auth/goog/callback', 'GET /auth/oidc/callback' = 'GET /auth/oidc/callback' @@ -179,7 +179,7 @@ export const LIMITS: RateLimiterOptions = { duration: 1 * TIME.minute } }, - 'GET /auth/local/login': { + 'POST /auth/local/login': { regularOptions: { limitCount: getIntFromEnv('RATELIMIT_GET_AUTH', '4'), duration: 10 * TIME.minute @@ -229,7 +229,7 @@ export const LIMITS: RateLimiterOptions = { duration: 30 * TIME.minute } }, - 'GET /auth/azure/callback': { + 'POST /auth/azure/callback': { regularOptions: { limitCount: getIntFromEnv('RATELIMIT_GET_AUTH', '4'), duration: 10 * TIME.minute diff --git a/packages/ui-components/src/components/form/Radio.stories.ts b/packages/ui-components/src/components/form/Radio.stories.ts index 012ae95eeb..43cdabb90d 100644 --- a/packages/ui-components/src/components/form/Radio.stories.ts +++ b/packages/ui-components/src/components/form/Radio.stories.ts @@ -175,7 +175,8 @@ export const WithIcon: StoryObj = { args: { name: 'withIcon', label: 'Example radio with Icon', - icon: ArrowRightIcon + icon: ArrowRightIcon, + description: 'Example discription' } } diff --git a/packages/ui-components/src/components/form/Radio.vue b/packages/ui-components/src/components/form/Radio.vue index b199188d7e..02879cd988 100644 --- a/packages/ui-components/src/components/form/Radio.vue +++ b/packages/ui-components/src/components/form/Radio.vue @@ -1,7 +1,7 @@