mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
refactor: ♻️ Port all buttons to new UI library
This commit is contained in:
parent
13faf840dd
commit
091615b04e
20 changed files with 120 additions and 155 deletions
|
|
@ -42,13 +42,13 @@
|
|||
<div class="grid md:grid-cols-2 md:[&:has(>:last-child:nth-child(1))]:grid-cols-1 gap-4 w-full">
|
||||
<a v-for="provider of ssoConfig.providers" :key="provider.id"
|
||||
:href="issuerRedirectUrl(provider.id)">
|
||||
<ButtonSecondary class="flex flex-row w-full items-center justify-center gap-3">
|
||||
<Button theme="secondary" class="flex flex-row w-full items-center justify-center gap-3">
|
||||
<img crossorigin="anonymous" :src="provider.icon" :alt="`${provider.name}'s logo'`"
|
||||
class="w-6 h-6" />
|
||||
<div class="flex flex-col gap-0 justify-center">
|
||||
<h3 class="font-bold">{{ provider.name }}</h3>
|
||||
</div>
|
||||
</ButtonSecondary>
|
||||
</Button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
here, please close this page.
|
||||
</p>
|
||||
|
||||
<ButtonPrimary type="submit" class="w-full">Sign in</ButtonPrimary>
|
||||
<Button theme="primary" type="submit" class="w-full">Sign in</Button>
|
||||
</VeeForm>
|
||||
</div>
|
||||
<div v-else class="mx-auto max-w-md">
|
||||
|
|
@ -100,14 +100,13 @@
|
|||
import { LysandClient } from "@lysand-org/client";
|
||||
import { toTypedSchema } from "@vee-validate/zod";
|
||||
import { z } from "zod";
|
||||
import ButtonPrimary from "~/components/buttons/button-primary.vue";
|
||||
import ButtonSecondary from "~/components/buttons/button-secondary.vue";
|
||||
import FieldError from "~/components/inputs/field-error.vue";
|
||||
import Field from "~/components/inputs/field.vue";
|
||||
import LabelAndError from "~/components/inputs/label-and-error.vue";
|
||||
import Label from "~/components/inputs/label.vue";
|
||||
import PasswordInput from "~/components/inputs/password-input.vue";
|
||||
import TextInput from "~/components/inputs/text-input.vue";
|
||||
import Button from "~/packages/ui/components/buttons/button.vue";
|
||||
|
||||
const schema = toTypedSchema(
|
||||
z.object({
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@
|
|||
</div>
|
||||
|
||||
<div class="flex flex-col gap-3">
|
||||
<ButtonPrimary type="submit">Authorize</ButtonPrimary>
|
||||
<Button theme="primary" type="submit">Authorize</Button>
|
||||
<NuxtLink href="/" class="w-full">
|
||||
<ButtonSecondary class="w-full">Cancel</ButtonSecondary>
|
||||
<Button theme="secondary" class="w-full">Cancel</Button>
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -83,8 +83,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import ButtonPrimary from "~/components/buttons/button-primary.vue";
|
||||
import ButtonSecondary from "~/components/buttons/button-secondary.vue";
|
||||
import Button from "~/packages/ui/components/buttons/button.vue";
|
||||
|
||||
const url = useRequestURL();
|
||||
const params = useUrlSearchParams();
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
password. Make sure to put it in a password manager.
|
||||
</p>
|
||||
|
||||
<ButtonPrimary type="submit" class="w-full">Reset</ButtonPrimary>
|
||||
<Button theme="primary" type="submit" class="w-full">Reset</Button>
|
||||
</VeeForm>
|
||||
</div>
|
||||
<div v-else-if="params.success">
|
||||
|
|
@ -69,12 +69,12 @@
|
|||
<script setup lang="ts">
|
||||
import { toTypedSchema } from "@vee-validate/zod";
|
||||
import { z } from "zod";
|
||||
import ButtonPrimary from "~/components/buttons/button-primary.vue";
|
||||
import FieldError from "~/components/inputs/field-error.vue";
|
||||
import Field from "~/components/inputs/field.vue";
|
||||
import LabelAndError from "~/components/inputs/label-and-error.vue";
|
||||
import Label from "~/components/inputs/label.vue";
|
||||
import PasswordInput from "~/components/inputs/password-input.vue";
|
||||
import Button from "~/packages/ui/components/buttons/button.vue";
|
||||
|
||||
const identity = useCurrentIdentity();
|
||||
identity.value = null;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
<Collapsible.Root>
|
||||
<Collapsible.Trigger class="w-full">
|
||||
<ButtonSecondary type="button" class="w-full">View Terms of Service</ButtonSecondary>
|
||||
<Button theme="secondary" class="w-full">View Terms of Service</Button>
|
||||
</Collapsible.Trigger>
|
||||
<Collapsible.Content
|
||||
class="prose prose-invert prose-sm p-4 ring-1 ring-white/10 bg-dark-700 rounded mt-3">
|
||||
|
|
@ -84,8 +84,8 @@
|
|||
cannot see your password.
|
||||
</p>
|
||||
|
||||
<ButtonPrimary type="submit" class="w-full" :disabled="isLoading">{{ isLoading ? "Registering..." :
|
||||
"Register" }}</ButtonPrimary>
|
||||
<Button theme="primary" type="submit" class="w-full" :disabled="isLoading">{{ isLoading ? "Registering..." :
|
||||
"Register" }}</Button>
|
||||
</VeeForm>
|
||||
</div>
|
||||
<div v-else>
|
||||
|
|
@ -104,8 +104,6 @@ import { Collapsible } from "@ark-ui/vue";
|
|||
import type { ResponseError } from "@lysand-org/client";
|
||||
import { toTypedSchema } from "@vee-validate/zod";
|
||||
import { z } from "zod";
|
||||
import ButtonPrimary from "~/components/buttons/button-primary.vue";
|
||||
import ButtonSecondary from "~/components/buttons/button-secondary.vue";
|
||||
import CheckboxInput from "~/components/inputs/checkbox-input.vue";
|
||||
import FieldError from "~/components/inputs/field-error.vue";
|
||||
import Field from "~/components/inputs/field.vue";
|
||||
|
|
@ -113,6 +111,7 @@ import LabelAndError from "~/components/inputs/label-and-error.vue";
|
|||
import Label from "~/components/inputs/label.vue";
|
||||
import PasswordInput from "~/components/inputs/password-input.vue";
|
||||
import TextInput from "~/components/inputs/text-input.vue";
|
||||
import Button from "~/packages/ui/components/buttons/button.vue";
|
||||
|
||||
const schema = toTypedSchema(
|
||||
z
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue