diff --git a/frontend/src/components/ProviderIconGroup.vue b/frontend/src/components/ProviderIconGroup.vue index 0d7fb44b6..e254056a1 100644 --- a/frontend/src/components/ProviderIconGroup.vue +++ b/frontend/src/components/ProviderIconGroup.vue @@ -23,27 +23,12 @@ const providerIconComponent = computed(() => normalizedProvider.value : undefined) const authenticationIconComponent = computed(() => authenticationIcon(props.authenticationKind)) const showAuthenticationKind = computed(() => props.authenticationKind !== undefined) -const groupGapClass = computed(() => { - if (props.size === 'xs') - return 'gap-0.75' - return props.size === 'sm' - ? 'gap-1' - : 'gap-2' -}) -const iconContainerClass = computed(() => { - if (props.size === 'xs') - return 'size-4.5 rounded-md' - return props.size === 'sm' - ? 'size-5 rounded-md' - : 'size-7 rounded-lg' -}) -const iconClass = computed(() => { - if (props.size === 'xs') - return 'size-2.5' - return props.size === 'sm' - ? 'size-3' - : 'size-4' -}) +const sizeClasses = { + xs: { gap: 'gap-0.75', container: 'size-4.5 rounded-md', icon: 'size-2.5' }, + sm: { gap: 'gap-1', container: 'size-5 rounded-md', icon: 'size-3' }, + md: { gap: 'gap-2', container: 'size-7 rounded-lg', icon: 'size-4' }, +} +const classes = computed(() => sizeClasses[props.size]) const providerLabel = computed(() => formatProviderLabel(props.provider, t('common.providers.unknown'))) @@ -51,23 +36,23 @@ const authenticationLabel = computed(() => formatAuthenticationLabel(props.authe