mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 23:03:51 +02:00
refactor auto change status dialog ui style
This commit is contained in:
@@ -5,20 +5,21 @@
|
||||
<DialogTitle>{{ t('view.settings.general.automation.auto_change_status') }}</DialogTitle>
|
||||
</DialogHeader>
|
||||
|
||||
<div class="grid gap-4">
|
||||
<FieldGroup class="gap-4">
|
||||
<SimpleSwitch
|
||||
:label="t('view.settings.general.automation.auto_change_status')"
|
||||
:value="autoStateChangeEnabled"
|
||||
:tooltip="t('view.settings.general.automation.auto_state_change_tooltip')"
|
||||
@change="setAutoStateChangeEnabled" />
|
||||
|
||||
<div>
|
||||
<span class="text-sm">{{ t('view.settings.general.automation.alone_status') }}</span>
|
||||
<Field>
|
||||
<FieldLabel>{{ t('view.settings.general.automation.alone_status') }}</FieldLabel>
|
||||
<FieldContent>
|
||||
<Select
|
||||
:model-value="autoStateChangeAloneStatus"
|
||||
:disabled="!autoStateChangeEnabled"
|
||||
@update:modelValue="setAutoStateChangeAloneStatus">
|
||||
<SelectTrigger style="margin-top: 8px" size="sm">
|
||||
<SelectTrigger size="sm">
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
@@ -38,7 +39,6 @@
|
||||
</Select>
|
||||
|
||||
<SimpleSwitch
|
||||
style="margin-top: 8px"
|
||||
:label="t('view.settings.general.automation.change_status_description')"
|
||||
:value="autoStateChangeAloneDescEnabled"
|
||||
:disabled="!autoStateChangeEnabled"
|
||||
@@ -49,18 +49,19 @@
|
||||
:disabled="!autoStateChangeEnabled"
|
||||
:maxlength="32"
|
||||
:placeholder="t('view.settings.general.automation.status_description_placeholder')"
|
||||
style="margin-top: 8px"
|
||||
size="sm"
|
||||
@update:modelValue="setAutoStateChangeAloneDesc" />
|
||||
</div>
|
||||
</FieldContent>
|
||||
</Field>
|
||||
|
||||
<div>
|
||||
<span class="text-sm">{{ t('view.settings.general.automation.company_status') }}</span>
|
||||
<Field>
|
||||
<FieldLabel>{{ t('view.settings.general.automation.company_status') }}</FieldLabel>
|
||||
<FieldContent>
|
||||
<Select
|
||||
:model-value="autoStateChangeCompanyStatus"
|
||||
:disabled="!autoStateChangeEnabled"
|
||||
@update:modelValue="setAutoStateChangeCompanyStatus">
|
||||
<SelectTrigger style="margin-top: 8px" size="sm">
|
||||
<SelectTrigger size="sm">
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
@@ -80,7 +81,6 @@
|
||||
</Select>
|
||||
|
||||
<SimpleSwitch
|
||||
style="margin-top: 8px"
|
||||
:label="t('view.settings.general.automation.change_status_description')"
|
||||
:value="autoStateChangeCompanyDescEnabled"
|
||||
:disabled="!autoStateChangeEnabled"
|
||||
@@ -91,37 +91,42 @@
|
||||
:disabled="!autoStateChangeEnabled"
|
||||
:maxlength="32"
|
||||
:placeholder="t('view.settings.general.automation.status_description_placeholder')"
|
||||
style="margin-top: 8px"
|
||||
size="sm"
|
||||
@update:modelValue="setAutoStateChangeCompanyDesc" />
|
||||
</div>
|
||||
</FieldContent>
|
||||
</Field>
|
||||
|
||||
<div>
|
||||
<span class="text-sm">{{ t('view.settings.general.automation.allowed_instance_types') }}</span>
|
||||
<Field>
|
||||
<FieldLabel>{{ t('view.settings.general.automation.allowed_instance_types') }}</FieldLabel>
|
||||
<FieldContent>
|
||||
<Select
|
||||
:model-value="autoStateChangeInstanceTypes"
|
||||
:disabled="!autoStateChangeEnabled"
|
||||
multiple
|
||||
@update:modelValue="setAutoStateChangeInstanceTypes">
|
||||
<SelectTrigger style="margin-top: 8px" size="sm">
|
||||
<SelectTrigger size="sm">
|
||||
<SelectValue
|
||||
:placeholder="t('view.settings.general.automation.instance_type_placeholder')" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem v-for="instanceType in instanceTypes" :key="instanceType" :value="instanceType">
|
||||
<SelectItem
|
||||
v-for="instanceType in instanceTypes"
|
||||
:key="instanceType"
|
||||
:value="instanceType">
|
||||
{{ instanceType }}
|
||||
</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
</FieldContent>
|
||||
</Field>
|
||||
|
||||
<div>
|
||||
<span class="text-sm">{{ t('view.settings.general.automation.alone_condition') }}</span>
|
||||
<Field>
|
||||
<FieldLabel>{{ t('view.settings.general.automation.alone_condition') }}</FieldLabel>
|
||||
<FieldContent>
|
||||
<RadioGroup
|
||||
:model-value="autoStateChangeNoFriends ? 'true' : 'false'"
|
||||
:disabled="!autoStateChangeEnabled"
|
||||
class="gap-2 flex"
|
||||
style="margin-top: 8px"
|
||||
@update:modelValue="handleAutoStateChangeNoFriendsRadio">
|
||||
<div class="flex items-center space-x-2">
|
||||
<RadioGroupItem id="autoStateChangeNoFriends-false" value="false" />
|
||||
@@ -136,26 +141,25 @@
|
||||
</label>
|
||||
</div>
|
||||
</RadioGroup>
|
||||
</div>
|
||||
</FieldContent>
|
||||
</Field>
|
||||
|
||||
<div>
|
||||
<span class="text-sm"
|
||||
>{{ t('view.settings.general.automation.auto_invite_request_accept') }}
|
||||
<Field>
|
||||
<FieldLabel>
|
||||
{{ t('view.settings.general.automation.auto_invite_request_accept') }}
|
||||
<TooltipWrapper
|
||||
side="top"
|
||||
style="margin-left: 5px"
|
||||
:content="t('view.settings.general.automation.auto_invite_request_accept_tooltip')">
|
||||
<Info class="inline-block" />
|
||||
</TooltipWrapper>
|
||||
</span>
|
||||
<br />
|
||||
</FieldLabel>
|
||||
<FieldContent>
|
||||
<ToggleGroup
|
||||
type="single"
|
||||
required
|
||||
variant="outline"
|
||||
size="sm"
|
||||
:model-value="autoAcceptInviteRequests"
|
||||
style="margin-top: 5px"
|
||||
@update:model-value="setAutoAcceptInviteRequests">
|
||||
<ToggleGroupItem value="Off">{{
|
||||
t('view.settings.general.automation.auto_invite_request_accept_off')
|
||||
@@ -167,8 +171,9 @@
|
||||
t('view.settings.general.automation.auto_invite_request_accept_selected_favs')
|
||||
}}</ToggleGroupItem>
|
||||
</ToggleGroup>
|
||||
</div>
|
||||
</div>
|
||||
</FieldContent>
|
||||
</Field>
|
||||
</FieldGroup>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
</template>
|
||||
@@ -176,6 +181,7 @@
|
||||
<script setup>
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog';
|
||||
import { Field, FieldContent, FieldGroup, FieldLabel } from '@/components/ui/field';
|
||||
import { RadioGroup, RadioGroupItem } from '@/components/ui/radio-group';
|
||||
import { ToggleGroup, ToggleGroupItem } from '@/components/ui/toggle-group';
|
||||
import { Info } from 'lucide-vue-next';
|
||||
|
||||
Reference in New Issue
Block a user