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
|
|
@ -20,14 +20,14 @@
|
|||
<!-- Spoiler text is it's specified -->
|
||||
<span v-if="note?.spoiler_text" class="mt-2 break-all">{{ note.spoiler_text
|
||||
}}</span>
|
||||
<ButtonSecondary @click="collapsed = false" class="mt-4">Show content</ButtonSecondary>
|
||||
<Button theme="secondary" @click="collapsed = false" class="mt-4">Show content</Button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Status } from "@lysand-org/client/types";
|
||||
import ButtonSecondary from "~/components/buttons/button-secondary.vue";
|
||||
import Skeleton from "~/components/skeleton/Skeleton.vue";
|
||||
import Button from "~/packages/ui/components/buttons/button.vue";
|
||||
import Attachment from "./attachment.vue";
|
||||
import Note from "./note.vue";
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,12 @@
|
|||
</div>
|
||||
<div v-if="notification?.type === 'follow_request' && relationship?.requested_by"
|
||||
class="w-full grid grid-cols-2 gap-4 p-2 ">
|
||||
<ButtonPrimary :loading="isWorkingOnFollowRequest" @click="acceptFollowRequest"><span>Accept</span>
|
||||
</ButtonPrimary>
|
||||
<ButtonSecondary :loading="isWorkingOnFollowRequest" @click="rejectFollowRequest"><span>Reject</span>
|
||||
</ButtonSecondary>
|
||||
<Button theme="primary" :loading="isWorkingOnFollowRequest"
|
||||
@click="acceptFollowRequest"><span>Accept</span>
|
||||
</Button>
|
||||
<Button theme="secondary" :loading="isWorkingOnFollowRequest"
|
||||
@click="rejectFollowRequest"><span>Reject</span>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -30,9 +32,8 @@
|
|||
<script lang="ts" setup>
|
||||
import type { Notification } from "@lysand-org/client/types";
|
||||
import Avatar from "~/components/avatars/avatar.vue";
|
||||
import ButtonPrimary from "~/components/buttons/button-primary.vue";
|
||||
import ButtonSecondary from "~/components/buttons/button-secondary.vue";
|
||||
import Skeleton from "~/components/skeleton/Skeleton.vue";
|
||||
import Button from "~/packages/ui/components/buttons/button.vue";
|
||||
import Note from "../notes/note.vue";
|
||||
import SmallCard from "../users/SmallCard.vue";
|
||||
|
||||
|
|
|
|||
|
|
@ -7,20 +7,20 @@
|
|||
<Avatar :src="account?.avatar" :alt="`${account?.acct}'s avatar'`"
|
||||
class="h-32 w-32 -mt-[4.5rem] z-10 shrink-0 rounded ring-2 ring-dark-800" />
|
||||
|
||||
<ButtonSecondary v-if="account && account?.id === identity?.account?.id">Edit Profile
|
||||
</ButtonSecondary>
|
||||
<ButtonSecondary :loading="isLoading" @click="follow()"
|
||||
<Button theme="secondary" v-if="account && account?.id === identity?.account?.id">Edit Profile
|
||||
</Button>
|
||||
<Button theme="secondary" :loading="isLoading" @click="follow()"
|
||||
v-if="account && account?.id !== identity?.account?.id && relationship && !relationship.following && !relationship.requested">
|
||||
<span>Follow</span>
|
||||
</ButtonSecondary>
|
||||
<ButtonSecondary :loading="isLoading" @click="unfollow()"
|
||||
</Button>
|
||||
<Button theme="secondary" :loading="isLoading" @click="unfollow()"
|
||||
v-if="account && account?.id !== identity?.account?.id && relationship && relationship.following">
|
||||
<span>Unfollow</span>
|
||||
</ButtonSecondary>
|
||||
<ButtonSecondary :loading="isLoading" :disabled="true"
|
||||
</Button>
|
||||
<Button theme="secondary" :loading="isLoading" :disabled="true"
|
||||
v-if="account && account?.id !== identity?.account?.id && relationship && !relationship.following && relationship.requested">
|
||||
<span>Requested</span>
|
||||
</ButtonSecondary>
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div class="mt-2 px-4">
|
||||
|
|
@ -100,8 +100,8 @@
|
|||
<script lang="ts" setup>
|
||||
import type { Account } from "@lysand-org/client/types";
|
||||
import Avatar from "~/components/avatars/avatar.vue";
|
||||
import ButtonSecondary from "~/components/buttons/button-secondary.vue";
|
||||
import Skeleton from "~/components/skeleton/Skeleton.vue";
|
||||
import Button from "~/packages/ui/components/buttons/button.vue";
|
||||
import Badge from "./Badge.vue";
|
||||
|
||||
const props = defineProps<{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue