fix: persist interceptor state for logged out user (#4060)

* fix: persist interceptor state for loged out user

* refactor: update interceptor section in settings page

* chore: update settings page interceptor section UI

* chore: minoir ui and code refactor
This commit is contained in:
Nivedin
2024-06-03 14:28:58 +05:30
committed by GitHub
parent b7a3ae231b
commit 5c214a8da0
5 changed files with 66 additions and 116 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div class="flex flex-col space-y-2">
<div class="flex flex-col px-4 pt-2">
<div v-if="isTooltipComponent" class="flex flex-col px-4 pt-2">
<h2 class="inline-flex pb-1 font-semibold text-secondaryDark">
{{ t("settings.interceptor") }}
</h2>
@@ -19,6 +19,9 @@
:value="interceptor.interceptorID"
:label="unref(interceptor.name(t))"
:selected="interceptorSelection === interceptor.interceptorID"
:class="{
'!px-0 hover:bg-transparent': !isTooltipComponent,
}"
@change="interceptorSelection = interceptor.interceptorID"
/>
@@ -39,6 +42,15 @@ import { InterceptorService } from "~/services/interceptor.service"
const t = useI18n()
withDefaults(
defineProps<{
isTooltipComponent?: boolean
}>(),
{
isTooltipComponent: true,
}
)
const interceptorService = useService(InterceptorService)
const interceptorSelection =