mirror of
https://github.com/wg-easy/wg-easy.git
synced 2026-08-27 04:16:58 +00:00
fix: improve buttons (#2666)
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Edge / Build Docker (push) Waiting to run
Edge / Build Docker-1 (push) Waiting to run
Edge / Merge & Deploy Docker (push) Blocked by required conditions
Edge / Build & Deploy Docs (push) Blocked by required conditions
Lint / Check Docs (push) Waiting to run
Lint / Lint (push) Blocked by required conditions
Lint / Lint-1 (push) Blocked by required conditions
Lint / Lint-2 (push) Blocked by required conditions
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Edge / Build Docker (push) Waiting to run
Edge / Build Docker-1 (push) Waiting to run
Edge / Merge & Deploy Docker (push) Blocked by required conditions
Edge / Build & Deploy Docs (push) Blocked by required conditions
Lint / Check Docs (push) Waiting to run
Lint / Lint (push) Blocked by required conditions
Lint / Lint-1 (push) Blocked by required conditions
Lint / Lint-2 (push) Blocked by required conditions
improve buttons Co-authored-by: anhhna <anhhna@gmail.com>
This commit is contained in:
parent
e9252be45c
commit
09cf208933
4 changed files with 31 additions and 20 deletions
|
|
@ -2,7 +2,7 @@
|
|||
<input
|
||||
:value="label"
|
||||
:type="type ?? 'button'"
|
||||
class="col-span-2 rounded-lg border-2 border-red-800 bg-red-800 py-2 text-white hover:border-red-600 hover:bg-red-600 focus:border-red-800 focus:outline-0 focus:ring-0"
|
||||
class="col-span-2 rounded-lg border-2 border-red-800 bg-red-800 px-4 py-2 text-white hover:border-red-600 hover:bg-red-600 focus:border-red-800 focus:outline-0 focus:ring-0"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,32 @@
|
|||
<template>
|
||||
<BaseFormSecondaryButton
|
||||
as="input"
|
||||
:value="label"
|
||||
:type="type ?? 'button'"
|
||||
class="col-span-2 py-2"
|
||||
/>
|
||||
:as="as"
|
||||
:value="isInput ? label : undefined"
|
||||
:type="isInput ? type : undefined"
|
||||
class="col-span-2 px-4 py-2"
|
||||
>
|
||||
<template v-if="!isInput">
|
||||
{{ label }}
|
||||
</template>
|
||||
</BaseFormSecondaryButton>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { InputTypeHTMLAttribute } from 'vue';
|
||||
|
||||
defineProps<{
|
||||
label: string;
|
||||
type?: InputTypeHTMLAttribute;
|
||||
}>();
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
label: string;
|
||||
type?: InputTypeHTMLAttribute;
|
||||
as?: string;
|
||||
}>(),
|
||||
{
|
||||
type: 'button',
|
||||
as: 'input',
|
||||
}
|
||||
);
|
||||
|
||||
const isInput = computed(() => {
|
||||
return props.as === 'input';
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -145,8 +145,8 @@
|
|||
>
|
||||
<FormSecondaryActionField
|
||||
:label="$t('admin.interface.changeCidr')"
|
||||
class="w-full"
|
||||
tabindex="-1"
|
||||
class="inline-block w-full"
|
||||
as="span"
|
||||
/>
|
||||
</AdminCidrDialog>
|
||||
<AdminRestartInterfaceDialog
|
||||
|
|
@ -155,8 +155,8 @@
|
|||
>
|
||||
<FormSecondaryActionField
|
||||
:label="$t('admin.interface.restart')"
|
||||
class="w-full"
|
||||
tabindex="-1"
|
||||
class="inline-block w-full"
|
||||
as="span"
|
||||
/>
|
||||
</AdminRestartInterfaceDialog>
|
||||
</FormGroup>
|
||||
|
|
|
|||
|
|
@ -188,9 +188,7 @@
|
|||
>
|
||||
<FormSecondaryActionField
|
||||
:label="$t('client.delete')"
|
||||
class="w-full"
|
||||
type="button"
|
||||
tabindex="-1"
|
||||
class="inline-block w-full"
|
||||
as="span"
|
||||
/>
|
||||
</ClientsDeleteDialog>
|
||||
|
|
@ -200,9 +198,7 @@
|
|||
>
|
||||
<FormSecondaryActionField
|
||||
:label="$t('client.viewConfig')"
|
||||
class="w-full"
|
||||
type="button"
|
||||
tabindex="-1"
|
||||
class="inline-block w-full"
|
||||
as="span"
|
||||
/>
|
||||
</ClientsConfigDialog>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue