refactor: ♻️ Replace megalodon with @lysand-org/client

This commit is contained in:
Jesse Wierzbinski 2024-06-07 13:09:15 -10:00
parent 5c528e8d03
commit 0bd3237965
No known key found for this signature in database
41 changed files with 147 additions and 170 deletions

View file

@ -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);

View file

@ -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);

View file

@ -11,6 +11,4 @@
definePageMeta({
layout: "app",
});
const me = useMe();
</script>

View file

@ -27,7 +27,6 @@
<script setup lang="ts">
import { useRoute } from "vue-router";
const url = useRequestURL();
const query = useRoute().query;
const code = query.code;

View file

@ -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<{