mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 11:39:16 +01:00
refactor: ♻️ Replace megalodon with @lysand-org/client
This commit is contained in:
parent
5c528e8d03
commit
0bd3237965
41 changed files with 147 additions and 170 deletions
|
|
@ -20,7 +20,7 @@ definePageMeta({
|
|||
|
||||
const element = ref<HTMLElement | null>(null);
|
||||
const route = useRoute();
|
||||
const client = useMegalodon();
|
||||
const client = useClient();
|
||||
const uuid = route.params.uuid as string;
|
||||
|
||||
const note = useNote(client, uuid);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ definePageMeta({
|
|||
});
|
||||
|
||||
const route = useRoute();
|
||||
const client = useMegalodon(undefined, true);
|
||||
const client = useClient(undefined, true);
|
||||
const username = (route.params.username as string).replace("@", "");
|
||||
|
||||
const accounts = useAccountSearch(client, username);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,4 @@
|
|||
definePageMeta({
|
||||
layout: "app",
|
||||
});
|
||||
|
||||
const me = useMe();
|
||||
</script>
|
||||
|
|
@ -27,7 +27,6 @@
|
|||
<script setup lang="ts">
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
const url = useRequestURL();
|
||||
const query = useRoute().query;
|
||||
|
||||
const code = query.code;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
</VeeErrorMessage>
|
||||
</VeeField>
|
||||
|
||||
<VeeField name="reason" as="div" v-slot="{ errors, field }" validate-on-change>
|
||||
<VeeField name="reason" as="div" v-slot="{ errors }" validate-on-change>
|
||||
<label for="reason" class="block text-sm font-medium leading-6 text-gray-50">Why do you want to
|
||||
join?</label>
|
||||
<div class="mt-2">
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
class="rounded disabled:hover:cursor-wait mr-1 align-middle mb-0.5 text-pink-700 !ring-0 !outline-none"
|
||||
required />
|
||||
<span class="text-sm text-gray-100">I agree to the terms and conditions of this server <a
|
||||
class="underline font-bold" target="_blank" :href="instance.uri">available here</a></span>
|
||||
class="underline font-bold" target="_blank" :href="'#'">available here</a></span>
|
||||
<VeeErrorMessage name="tos" as="p" class="mt-2 text-sm text-red-600" v-slot="{ message }">
|
||||
{{ message }}
|
||||
</VeeErrorMessage>
|
||||
|
|
@ -88,6 +88,7 @@ import { toTypedSchema } from "@vee-validate/zod";
|
|||
import type { AxiosError } from "axios";
|
||||
import { z } from "zod";
|
||||
import LoginInput from "../../components/LoginInput.vue";
|
||||
// TODO: Add instance TOS link
|
||||
|
||||
const schema = toTypedSchema(
|
||||
z
|
||||
|
|
@ -114,7 +115,7 @@ const schema = toTypedSchema(
|
|||
}),
|
||||
);
|
||||
|
||||
const client = useMegalodon();
|
||||
const client = useClient();
|
||||
const instance = useInstance();
|
||||
|
||||
const errors = ref<{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue