fix(frontend): align settings route query types with vue-router
parent
d492566d52
commit
0733141251
|
|
@ -2,7 +2,7 @@ import { INTEGRATION_TABS, type IntegrationTab } from './integrations'
|
|||
|
||||
export const INTEGRATION_SECTION_PREFIX = 'integration-'
|
||||
|
||||
type QueryValue = string | number | boolean | null | undefined | Array<string | number | boolean | null>
|
||||
type QueryValue = string | number | null | undefined | Array<string | number | null>
|
||||
export type SettingsRouteQuery = Record<string, QueryValue>
|
||||
|
||||
export function integrationSectionKey(tab: IntegrationTab): string {
|
||||
|
|
|
|||
|
|
@ -214,6 +214,7 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, computed, watch, onMounted, onUnmounted } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import type { LocationQueryRaw } from 'vue-router'
|
||||
import { useUIStore } from '@/stores/ui'
|
||||
import { useAuthStore } from '@/stores/auth'
|
||||
import { useDeploymentCapabilitiesStore } from '@/stores/deploymentCapabilities'
|
||||
|
|
@ -312,7 +313,7 @@ const syncSettingsRoute = (sectionKey: string) => {
|
|||
if (settingsQueryUnchanged(route.query, query)) return
|
||||
void router.replace({
|
||||
path: '/platform/settings',
|
||||
query,
|
||||
query: query as LocationQueryRaw,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue