mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
refactor: ♻️ Use new Versia branding everywhere
This commit is contained in:
parent
b734d8ad67
commit
cc54e95e92
|
|
@ -19,11 +19,11 @@ FROM oven/bun:1.1.24-alpine AS final
|
|||
COPY --from=builder /app/.output/ /app
|
||||
|
||||
LABEL org.opencontainers.image.authors="Gaspard Wierzbinski (https://cpluspatch.com)"
|
||||
LABEL org.opencontainers.image.source="https://github.com/lysand-org/frontend"
|
||||
LABEL org.opencontainers.image.vendor="Lysand Org"
|
||||
LABEL org.opencontainers.image.source="https://github.com/versia-pub/frontend"
|
||||
LABEL org.opencontainers.image.vendor="Versia"
|
||||
LABEL org.opencontainers.image.licenses="AGPL-3.0"
|
||||
LABEL org.opencontainers.image.title="Lysand-FE"
|
||||
LABEL org.opencontainers.image.description="Frontend for the Lysand Project"
|
||||
LABEL org.opencontainers.image.title="Versia-FE"
|
||||
LABEL org.opencontainers.image.description="Frontend for the Versia Server Project"
|
||||
|
||||
WORKDIR /app
|
||||
CMD ["bun", "run", "server/index.mjs"]
|
||||
24
README.md
24
README.md
|
|
@ -1,10 +1,10 @@
|
|||
<p align="center">
|
||||
<a href="https://lysand.org"><img src="https://cdn.lysand.org/logo-long-dark.webp" alt="Lysand Logo" height="110"></a>
|
||||
<a href="https://versia.pub"><img src="https://cdn.versia.pub/branding/logo-dark.svg" alt="Versia Logo" height="110"></a>
|
||||
</p>
|
||||
|
||||
<center><h1><code>lysand-fe</code></h1></center>
|
||||
<center><h1><code>versia-fe</code></h1></center>
|
||||
|
||||
**Lysand-FE** is a beautiful, fast and responsive front-end for the Lysand project.
|
||||
**Versia-FE** is a beautiful, fast and responsive front-end for the Versia Server project.
|
||||
|
||||
## Features
|
||||
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
- [x] Following
|
||||
- [x] Multiple accounts
|
||||
- [x] Custom Emojis
|
||||
- [x] Lysand Permissions support
|
||||
- [x] Versia Server Permissions support
|
||||
- [x] Note editing
|
||||
- [x] Alt text support everywhere
|
||||
- [x] Media uploads
|
||||
|
|
@ -55,31 +55,31 @@ Benchmarks are due to be conducted soon™.
|
|||
|
||||
## Installation
|
||||
|
||||
Lysand-FE is included in the provided `docker-compose` file during [Lysand Server installation](https://github.com/lysand-org/lysand/blob/main/docs/installation.md).
|
||||
Versia-FE is included in the provided `docker-compose` file during [Versia Server installation](https://github.com/versia-pub/server/blob/main/docs/installation.md).
|
||||
|
||||
To have Lysand-FE and Lysand Server running on the same domain, edit the Lysand Server configuration to point to the Lysand-FE container's address (`frontend` category inside config).
|
||||
To have Versia-FE and Versia Server running on the same domain, edit the Versia Server configuration to point to the Versia-FE container's address (`frontend` category inside config).
|
||||
|
||||
### Manual Installation
|
||||
|
||||
Here are the steps to install Lysand-FE manually:
|
||||
Here are the steps to install Versia-FE manually:
|
||||
|
||||
#### Docker/Podman
|
||||
|
||||
```yaml
|
||||
services:
|
||||
fe:
|
||||
image: ghcr.io/lysand-org/frontend:main
|
||||
container_name: lysand-fe
|
||||
image: ghcr.io/versia-pub/frontend:main
|
||||
container_name: versia-fe
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- lysand-net
|
||||
- versia-net
|
||||
environment:
|
||||
NUXT_PUBLIC_API_HOST: https://yourserver.com
|
||||
# For Tor users, set the following environment variable in addition to the above
|
||||
# NUXT_PUBLIC_ONION_API_HOST: http://youronionserver.onion
|
||||
```
|
||||
|
||||
Then, the frontend will be available at `http://localhost:3000` inside the container. To link it to a Lysand Server, set the `NUXT_PUBLIC_API_HOST` environment variable to the server's URL.
|
||||
Then, the frontend will be available at `http://localhost:3000` inside the container. To link it to a Versia Server, set the `NUXT_PUBLIC_API_HOST` environment variable to the server's URL.
|
||||
|
||||
## License
|
||||
|
||||
|
|
@ -94,4 +94,4 @@ This project is licensed under the AGPL 3.0 - see the [LICENSE](LICENSE) file fo
|
|||
|
||||
### People
|
||||
|
||||
- [**April John**](https://github.com/cutestnekoaqua): Creator and maintainer of the Lysand Server ActivityPub bridge.
|
||||
- [**April John**](https://github.com/cutestnekoaqua): Creator and maintainer of the Versia Server ActivityPub bridge.
|
||||
4
app.vue
4
app.vue
|
|
@ -30,7 +30,7 @@ const customCss = useSetting(SettingIds.CustomCSS);
|
|||
|
||||
useSeoMeta({
|
||||
titleTemplate: (titleChunk) => {
|
||||
return titleChunk ? `${titleChunk} · Lysand` : "Lysand";
|
||||
return titleChunk ? `${titleChunk} · Versia` : "Versia";
|
||||
},
|
||||
title: computed(() => instance.value?.title ?? ""),
|
||||
ogImage: computed(() => instance.value?.banner.url),
|
||||
|
|
@ -41,7 +41,7 @@ useSeoMeta({
|
|||
twitterImage: computed(() => instance.value?.banner.url),
|
||||
description: computed(() => convert(description.value?.content ?? "")),
|
||||
ogDescription: computed(() => convert(description.value?.content ?? "")),
|
||||
ogSiteName: "Lysand",
|
||||
ogSiteName: "Versia",
|
||||
colorScheme: "dark",
|
||||
themeColor: "#f9a8d4",
|
||||
});
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Instance, Status } from "@lysand-org/client/types";
|
||||
import type { Instance, Status } from "@versia/client/types";
|
||||
import { nanoid } from "nanoid";
|
||||
import ButtonBase from "~/packages/ui/components/buttons/button.vue";
|
||||
import { OverlayScrollbarsComponent } from "#imports";
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Emoji } from "@lysand-org/client/types";
|
||||
import type { Emoji } from "@versia/client/types";
|
||||
import { distance } from "fastest-levenshtein";
|
||||
import Avatar from "../avatars/avatar.vue";
|
||||
import AutocompleteSuggestbox from "./autocomplete-suggestbox.vue";
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Account } from "@lysand-org/client/types";
|
||||
import type { Account } from "@versia/client/types";
|
||||
import { distance } from "fastest-levenshtein";
|
||||
import Avatar from "../avatars/avatar.vue";
|
||||
import AutocompleteSuggestbox from "./autocomplete-suggestbox.vue";
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<p class="mt-6 text-base leading-7 text-gray-400" v-html="error.message"></p>
|
||||
<div class="mt-10 grid grid-cols-2 gap-x-6 mx-auto max-w-md">
|
||||
<Button theme="primary" class="w-full" @click="back">Go back</Button>
|
||||
<a href="https://github.com/lysand-org/frontend/issues" target="_blank">
|
||||
<a href="https://github.com/versia-pub/frontend/issues" target="_blank">
|
||||
<Button theme="secondary" class="w-full">Report an issue</Button>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { ResponseError } from "@lysand-org/client";
|
||||
import type { ResponseError } from "@versia/client";
|
||||
import Button from "~/packages/ui/components/buttons/button.vue";
|
||||
import Avatar from "../avatars/avatar.vue";
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { ResponseError } from "@lysand-org/client";
|
||||
import type { ResponseError } from "@versia/client";
|
||||
import Button from "~/packages/ui/components/buttons/button.vue";
|
||||
import Avatar from "../avatars/avatar.vue";
|
||||
import RichTextboxInput from "../inputs/rich-textbox-input.vue";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
aria-label="Navigation" role="complementary">
|
||||
<NuxtLink href="/">
|
||||
<img crossorigin="anonymous" class="size-11 rounded ring-1 ring-white/10 hover:scale-105 duration-200"
|
||||
:src="instance?.thumbnail.url ?? '/logo.webp'" alt="Logo of your instance" />
|
||||
:src="instance?.thumbnail.url ?? 'https://cdn.versia.pub/branding/icon.svg'"
|
||||
alt="Logo of your instance" />
|
||||
</NuxtLink>
|
||||
|
||||
<div class="flex flex-col gap-3">
|
||||
|
|
@ -148,7 +149,7 @@ const compose = () => {
|
|||
const signIn = async () => {
|
||||
loadingAuth.value = true;
|
||||
|
||||
const output = await client.value.createApp("Lysand", {
|
||||
const output = await client.value.createApp("Versia", {
|
||||
scopes: ["read", "write", "follow", "push"],
|
||||
redirect_uris: new URL("/", useRequestURL().origin).toString(),
|
||||
website: useBaseUrl().value,
|
||||
|
|
@ -195,7 +196,7 @@ const signOut = async (id?: string) => {
|
|||
return;
|
||||
}
|
||||
|
||||
// Don't do anything on error, as Lysand doesn't implement the revoke endpoint yet
|
||||
// Don't do anything on error, as Versia Server doesn't implement the revoke endpoint yet
|
||||
await client.value
|
||||
?.revokeToken(
|
||||
appData.value.client_id,
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { Dialog } from "@ark-ui/vue";
|
||||
import type { Attachment } from "@lysand-org/client/types";
|
||||
import type { Attachment } from "@versia/client/types";
|
||||
|
||||
const lightbox = ref(false);
|
||||
const attachment = ref<Attachment | null>(null);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { Popover } from "@ark-ui/vue";
|
||||
import type { Attachment } from "@lysand-org/client/types";
|
||||
import type { Attachment } from "@versia/client/types";
|
||||
|
||||
const props = defineProps<{
|
||||
attachment: Attachment;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Status } from "@lysand-org/client/types";
|
||||
import type { Status } from "@versia/client/types";
|
||||
import Avatar from "~/components/avatars/avatar.vue";
|
||||
import Skeleton from "~/components/skeleton/Skeleton.vue";
|
||||
import UserCard from "~/components/social-elements/users/UserCard.vue";
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Account } from "@lysand-org/client/types";
|
||||
import type { Account } from "@versia/client/types";
|
||||
|
||||
defineProps<{
|
||||
account: Account;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Status } from "@lysand-org/client/types";
|
||||
import type { Status } from "@versia/client/types";
|
||||
import Skeleton from "~/components/skeleton/Skeleton.vue";
|
||||
import Button from "~/packages/ui/components/buttons/button.vue";
|
||||
import Attachment from "./attachment.vue";
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { Menu } from "@ark-ui/vue";
|
||||
import { RolePermission, type Status } from "@lysand-org/client/types";
|
||||
import { RolePermission, type Status } from "@versia/client/types";
|
||||
import Avatar from "~/components/avatars/avatar.vue";
|
||||
import ButtonDropdown from "~/components/buttons/button-dropdown.vue";
|
||||
import AdaptiveDropdown from "~/components/dropdowns/AdaptiveDropdown.vue";
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Notification } from "@lysand-org/client/types";
|
||||
import type { Notification } from "@versia/client/types";
|
||||
import Avatar from "~/components/avatars/avatar.vue";
|
||||
import Skeleton from "~/components/skeleton/Skeleton.vue";
|
||||
import Button from "~/packages/ui/components/buttons/button.vue";
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
<div class="flex flex-row flex-wrap gap-4 mt-4" v-if="isDeveloper || visibleRoles.length > 0">
|
||||
<Badge v-for="role of visibleRoles" :key="role.id" :name="role.name" :description="role.description"
|
||||
:img="role.icon" />
|
||||
<Badge v-if="isDeveloper" name="Lysand Developer" description="This user is a Lysand developer."
|
||||
<Badge v-if="isDeveloper" name="Versia Developer" description="This user is a Versia developer."
|
||||
:verified="true" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Account } from "@lysand-org/client/types";
|
||||
import type { Account } from "@versia/client/types";
|
||||
import Avatar from "~/components/avatars/avatar.vue";
|
||||
import Skeleton from "~/components/skeleton/Skeleton.vue";
|
||||
import Button from "~/packages/ui/components/buttons/button.vue";
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ import {
|
|||
type Account,
|
||||
type Relationship,
|
||||
RolePermission,
|
||||
} from "@lysand-org/client/types";
|
||||
} from "@versia/client/types";
|
||||
import ButtonDropdown from "~/components/buttons/button-dropdown.vue";
|
||||
import AdaptiveDropdown from "~/components/dropdowns/AdaptiveDropdown.vue";
|
||||
import Button from "~/packages/ui/components/buttons/button.vue";
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Account } from "@lysand-org/client/types";
|
||||
import type { Account } from "@versia/client/types";
|
||||
import Avatar from "~/components/avatars/avatar.vue";
|
||||
import Skeleton from "~/components/skeleton/Skeleton.vue";
|
||||
import { NuxtLink } from "#components";
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@
|
|||
<div class="flex flex-row flex-wrap gap-4 mt-4" v-if="isDeveloper || visibleRoles.length > 0">
|
||||
<Badge v-for="role of visibleRoles" :key="role.id" :name="role.name"
|
||||
:description="role.description" :img="role.icon" />
|
||||
<Badge v-if="isDeveloper" name="Lysand Developer"
|
||||
description="This user is a Lysand developer." :verified="true" />
|
||||
<Badge v-if="isDeveloper" name="Versia Developer"
|
||||
description="This user is a Versia developer." :verified="true" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { HoverCard } from "@ark-ui/vue";
|
||||
import type { Account } from "@lysand-org/client/types";
|
||||
import type { Account } from "@versia/client/types";
|
||||
import Avatar from "~/components/avatars/avatar.vue";
|
||||
import { SettingIds } from "~/settings";
|
||||
import Badge from "./Badge.vue";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Status } from "@lysand-org/client/types";
|
||||
import type { Status } from "@versia/client/types";
|
||||
import Timeline from "./timeline.vue";
|
||||
|
||||
const props = defineProps<{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Status } from "@lysand-org/client/types";
|
||||
import type { Status } from "@versia/client/types";
|
||||
import { useHomeTimeline } from "~/composables/HomeTimeline";
|
||||
import Timeline from "./timeline.vue";
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Status } from "@lysand-org/client/types";
|
||||
import type { Status } from "@versia/client/types";
|
||||
import { useLocalTimeline } from "~/composables/LocalTimeline";
|
||||
import Timeline from "./timeline.vue";
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Notification } from "@lysand-org/client/types";
|
||||
import type { Notification } from "@versia/client/types";
|
||||
import { useNotificationTimeline } from "~/composables/NotificationTimeline";
|
||||
import Timeline from "./timeline.vue";
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Status } from "@lysand-org/client/types";
|
||||
import type { Status } from "@versia/client/types";
|
||||
import { usePublicTimeline } from "~/composables/PublicTimeline";
|
||||
import Timeline from "./timeline.vue";
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Notification, Status } from "@lysand-org/client/types";
|
||||
import type { Notification, Status } from "@versia/client/types";
|
||||
import { computed } from "vue";
|
||||
import NoteItem from "../social-elements/notes/note.vue";
|
||||
import NotificationItem from "../social-elements/notifications/notif.vue";
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
const root = useParentElement(useParentElement());
|
||||
// Store and keep y to restore it on page change
|
||||
const route = useRoute();
|
||||
const yStored = useLocalStorage("lysand:scroll", {
|
||||
const yStored = useLocalStorage("versia:scroll", {
|
||||
[route.fullPath]: 0,
|
||||
});
|
||||
const { y } = useScroll(root);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import type { Notification, Status } from "@lysand-org/client/types";
|
||||
import type { Notification, Status } from "@versia/client/types";
|
||||
import { useIntersectionObserver } from "@vueuse/core";
|
||||
import { onMounted, watch } from "vue";
|
||||
import Button from "~/packages/ui/components/buttons/button.vue";
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import type { LysandClient } from "@lysand-org/client";
|
||||
import type { Account } from "@lysand-org/client/types";
|
||||
import type { Client } from "@versia/client";
|
||||
import type { Account } from "@versia/client/types";
|
||||
|
||||
export const useAccount = (
|
||||
client: MaybeRef<LysandClient | null>,
|
||||
client: MaybeRef<Client | null>,
|
||||
accountId: MaybeRef<string | null>,
|
||||
) => {
|
||||
if (!client) {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import type { LysandClient } from "@lysand-org/client";
|
||||
import type { Account } from "@lysand-org/client/types";
|
||||
import type { Client } from "@versia/client";
|
||||
import type { Account } from "@versia/client/types";
|
||||
|
||||
export const useAccountSearch = (
|
||||
client: MaybeRef<LysandClient | null>,
|
||||
client: MaybeRef<Client | null>,
|
||||
q: string,
|
||||
): Ref<Account[] | null> => {
|
||||
const output = ref(null as Account[] | null);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import type { LysandClient } from "@lysand-org/client";
|
||||
import type { Status } from "@lysand-org/client/types";
|
||||
import type { Client } from "@versia/client";
|
||||
import type { Status } from "@versia/client/types";
|
||||
import { type TimelineOptions, useTimeline } from "./Timeline";
|
||||
|
||||
export function useAccountTimeline(
|
||||
client: LysandClient,
|
||||
client: Client,
|
||||
accountId: string,
|
||||
options: Partial<TimelineOptions<Status>> = {},
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import type { ApplicationData } from "@lysand-org/client/types";
|
||||
import type { ApplicationData } from "@versia/client/types";
|
||||
import { StorageSerializers } from "@vueuse/core";
|
||||
|
||||
export const useAppData = () => {
|
||||
return useLocalStorage<ApplicationData | null>("lysand:app_data", null, {
|
||||
return useLocalStorage<ApplicationData | null>("versia:app_data", null, {
|
||||
serializer: StorageSerializers.object,
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import type { LysandClient } from "@lysand-org/client";
|
||||
import type { RolePermission } from "@lysand-org/client/types";
|
||||
import type { Client } from "@versia/client";
|
||||
import type { RolePermission } from "@versia/client/types";
|
||||
|
||||
export const useCacheRefresh = (client: MaybeRef<LysandClient | null>) => {
|
||||
export const useCacheRefresh = (client: MaybeRef<Client | null>) => {
|
||||
if (import.meta.server) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import { LysandClient, type Token } from "@lysand-org/client";
|
||||
import { Client, type Token } from "@versia/client";
|
||||
|
||||
export const useClient = (
|
||||
customToken: MaybeRef<Token | null> = null,
|
||||
): Ref<LysandClient> => {
|
||||
): Ref<Client> => {
|
||||
return computed(
|
||||
() =>
|
||||
new LysandClient(
|
||||
new Client(
|
||||
new URL(useBaseUrl().value),
|
||||
toValue(customToken)?.access_token ??
|
||||
identity.value?.tokens.access_token ??
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import type { createToaster } from "@ark-ui/vue";
|
||||
import type { Account, Attachment, Status } from "@lysand-org/client/types";
|
||||
import type { Account, Attachment, Status } from "@versia/client/types";
|
||||
import mitt from "mitt";
|
||||
import type { Identity } from "./Identities";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
import type { LysandClient } from "@lysand-org/client";
|
||||
import type { Client } from "@versia/client";
|
||||
|
||||
type ExtendedDescription = {
|
||||
updated_at: string;
|
||||
content: string;
|
||||
};
|
||||
|
||||
export const useExtendedDescription = (
|
||||
client: MaybeRef<LysandClient | null>,
|
||||
) => {
|
||||
export const useExtendedDescription = (client: MaybeRef<Client | null>) => {
|
||||
if (!ref(client).value) {
|
||||
return ref(null as ExtendedDescription | null);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import type { LysandClient } from "@lysand-org/client";
|
||||
import type { Status } from "@lysand-org/client/types";
|
||||
import type { Client } from "@versia/client";
|
||||
import type { Status } from "@versia/client/types";
|
||||
import { type TimelineOptions, useTimeline } from "./Timeline";
|
||||
|
||||
export function useHomeTimeline(
|
||||
client: LysandClient,
|
||||
client: Client,
|
||||
options: Partial<TimelineOptions<Status>> = {},
|
||||
) {
|
||||
return useTimeline(client, {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import type { Token } from "@lysand-org/client";
|
||||
import type { Token } from "@versia/client";
|
||||
import type {
|
||||
Account,
|
||||
Emoji,
|
||||
Instance,
|
||||
RolePermission,
|
||||
} from "@lysand-org/client/types";
|
||||
} from "@versia/client/types";
|
||||
import { StorageSerializers, useLocalStorage } from "@vueuse/core";
|
||||
import { ref, watch } from "vue";
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ export interface Identity {
|
|||
* @returns A reactive reference to an array of identities.
|
||||
*/
|
||||
function useIdentities(): Ref<Identity[]> {
|
||||
return useLocalStorage<Identity[]>("lysand:identities", [], {
|
||||
return useLocalStorage<Identity[]>("versia:identities", [], {
|
||||
serializer: StorageSerializers.object,
|
||||
});
|
||||
}
|
||||
|
|
@ -33,7 +33,7 @@ function useIdentities(): Ref<Identity[]> {
|
|||
export const identities = useIdentities();
|
||||
|
||||
const currentId = useLocalStorage<string | null>(
|
||||
"lysand:identities:current",
|
||||
"versia:identities:current",
|
||||
null,
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import type { LysandClient } from "@lysand-org/client";
|
||||
import type { ExtendedDescription, Instance } from "@lysand-org/client/types";
|
||||
import type { Client } from "@versia/client";
|
||||
import type { ExtendedDescription, Instance } from "@versia/client/types";
|
||||
|
||||
export const useInstance = () => {
|
||||
return computed(() => identity.value?.instance);
|
||||
};
|
||||
|
||||
export const useInstanceFromClient = (client: MaybeRef<LysandClient>) => {
|
||||
export const useInstanceFromClient = (client: MaybeRef<Client>) => {
|
||||
if (!client) {
|
||||
return ref(null as Instance | null);
|
||||
}
|
||||
|
|
@ -23,7 +23,7 @@ export const useInstanceFromClient = (client: MaybeRef<LysandClient>) => {
|
|||
return output;
|
||||
};
|
||||
|
||||
export const useTos = (client: MaybeRef<LysandClient>) => {
|
||||
export const useTos = (client: MaybeRef<Client>) => {
|
||||
if (!client) {
|
||||
return ref(null as ExtendedDescription | null);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { LysandClient } from "@lysand-org/client";
|
||||
import type { Client } from "@versia/client";
|
||||
|
||||
type SSOProvider = {
|
||||
id: string;
|
||||
|
|
@ -6,7 +6,7 @@ type SSOProvider = {
|
|||
icon: string;
|
||||
};
|
||||
|
||||
export const useLinkedSSO = (client: MaybeRef<LysandClient>) => {
|
||||
export const useLinkedSSO = (client: MaybeRef<Client>) => {
|
||||
if (!client) {
|
||||
return ref([] as SSOProvider[]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import type { LysandClient } from "@lysand-org/client";
|
||||
import type { Status } from "@lysand-org/client/types";
|
||||
import type { Client } from "@versia/client";
|
||||
import type { Status } from "@versia/client/types";
|
||||
import { type TimelineOptions, useTimeline } from "./Timeline";
|
||||
|
||||
export function useLocalTimeline(
|
||||
client: LysandClient,
|
||||
client: Client,
|
||||
options: Partial<TimelineOptions<Status>> = {},
|
||||
) {
|
||||
return useTimeline(client, {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
import type { LysandClient } from "@lysand-org/client";
|
||||
import type { Status } from "@lysand-org/client/types";
|
||||
import type { Client } from "@versia/client";
|
||||
import type { Status } from "@versia/client/types";
|
||||
|
||||
export const useNote = (
|
||||
client: MaybeRef<LysandClient | null>,
|
||||
noteId: string,
|
||||
) => {
|
||||
export const useNote = (client: MaybeRef<Client | null>, noteId: string) => {
|
||||
if (!ref(client).value) {
|
||||
return ref(null as Status | null);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import type { LysandClient } from "@lysand-org/client";
|
||||
import type { Context } from "@lysand-org/client/types";
|
||||
import type { Client } from "@versia/client";
|
||||
import type { Context } from "@versia/client/types";
|
||||
|
||||
export const useNoteContext = (
|
||||
client: MaybeRef<LysandClient | null>,
|
||||
client: MaybeRef<Client | null>,
|
||||
noteId: MaybeRef<string | null>,
|
||||
) => {
|
||||
if (!ref(client).value) {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import type { LysandClient } from "@lysand-org/client";
|
||||
import type { Status } from "@lysand-org/client/types";
|
||||
import type { Client } from "@versia/client";
|
||||
import type { Status } from "@versia/client/types";
|
||||
import { SettingIds, type Settings } from "~/settings";
|
||||
|
||||
export const useNoteData = (
|
||||
noteProp: MaybeRef<Status | undefined>,
|
||||
client: Ref<LysandClient>,
|
||||
client: Ref<Client>,
|
||||
settings: MaybeRef<Settings>,
|
||||
) => {
|
||||
const isReply = computed(() => !!toValue(noteProp)?.in_reply_to_id);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import type { LysandClient } from "@lysand-org/client";
|
||||
import type { Notification } from "@lysand-org/client/types";
|
||||
import type { Client } from "@versia/client";
|
||||
import type { Notification } from "@versia/client/types";
|
||||
import { type TimelineOptions, useTimeline } from "./Timeline";
|
||||
|
||||
export function useNotificationTimeline(
|
||||
client: LysandClient,
|
||||
client: Client,
|
||||
options: Partial<TimelineOptions<Notification>> = {},
|
||||
) {
|
||||
return useTimeline(client, {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { Account, Emoji } from "@lysand-org/client/types";
|
||||
import type { Account, Emoji } from "@versia/client/types";
|
||||
import { renderToString } from "vue/server-renderer";
|
||||
import { SettingIds, type Settings } from "~/settings";
|
||||
import MentionComponent from "../components/social-elements/notes/mention.vue";
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import type { LysandClient } from "@lysand-org/client";
|
||||
import type { Status } from "@lysand-org/client/types";
|
||||
import type { Client } from "@versia/client";
|
||||
import type { Status } from "@versia/client/types";
|
||||
import { type TimelineOptions, useTimeline } from "./Timeline";
|
||||
|
||||
export function usePublicTimeline(
|
||||
client: LysandClient,
|
||||
client: Client,
|
||||
options: Partial<TimelineOptions<Status>> = {},
|
||||
) {
|
||||
return useTimeline(client, {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import type { LysandClient } from "@lysand-org/client";
|
||||
import type { Relationship } from "@lysand-org/client/types";
|
||||
import type { Client } from "@versia/client";
|
||||
import type { Relationship } from "@versia/client/types";
|
||||
|
||||
export const useRelationship = (
|
||||
client: MaybeRef<LysandClient | null>,
|
||||
client: MaybeRef<Client | null>,
|
||||
accountId: MaybeRef<string | null>,
|
||||
) => {
|
||||
const relationship = ref(null as Relationship | null);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import type { LysandClient } from "@lysand-org/client";
|
||||
import type { Account, Mention } from "@lysand-org/client/types";
|
||||
import type { Client } from "@versia/client";
|
||||
import type { Account, Mention } from "@versia/client/types";
|
||||
|
||||
export const useResolveMentions = (
|
||||
mentions: Ref<Mention[]>,
|
||||
client: LysandClient | null,
|
||||
client: Client | null,
|
||||
): Ref<Account[]> => {
|
||||
if (!client) {
|
||||
return ref([]);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { Instance } from "@lysand-org/client/types";
|
||||
import type { Instance } from "@versia/client/types";
|
||||
|
||||
export const useSSOConfig = (): Ref<Instance["sso"] | null> => {
|
||||
const instance = useInstance();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { StorageSerializers } from "@vueuse/core";
|
||||
import {
|
||||
type Setting,
|
||||
type SettingIds,
|
||||
type Settings,
|
||||
mergeSettings,
|
||||
|
|
@ -8,7 +7,7 @@ import {
|
|||
} from "~/settings";
|
||||
|
||||
const useSettings = () => {
|
||||
return useLocalStorage<Settings>("lysand:settings", settingsJson, {
|
||||
return useLocalStorage<Settings>("versia:settings", settingsJson, {
|
||||
serializer: {
|
||||
read(raw) {
|
||||
const json = StorageSerializers.object.read(raw);
|
||||
|
|
|
|||
|
|
@ -1,18 +1,15 @@
|
|||
import type { LysandClient, Output } from "@lysand-org/client";
|
||||
import type { Notification, Status } from "@lysand-org/client/types";
|
||||
import type { Client, Output } from "@versia/client";
|
||||
import type { Notification, Status } from "@versia/client/types";
|
||||
import { useIntervalFn } from "@vueuse/core";
|
||||
|
||||
export interface TimelineOptions<T> {
|
||||
fetchFunction: (
|
||||
client: LysandClient,
|
||||
options: object,
|
||||
) => Promise<Output<T[]>>;
|
||||
fetchFunction: (client: Client, options: object) => Promise<Output<T[]>>;
|
||||
updateInterval?: number;
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
export function useTimeline<T extends Status | Notification>(
|
||||
client: LysandClient,
|
||||
client: Client,
|
||||
options: TimelineOptions<T>,
|
||||
) {
|
||||
const items = ref<T[]>([]) as Ref<T[]>;
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ export default defineNuxtConfig({
|
|||
compatibilityDate: "2024-07-21",
|
||||
pwa: {
|
||||
manifest: {
|
||||
name: "Lysand",
|
||||
short_name: "Lysand",
|
||||
description: "Frontend for the Lysand social network",
|
||||
name: "Versia",
|
||||
short_name: "Versia",
|
||||
description: "Frontend for the Versia social network",
|
||||
theme_color: "#f9a8d4",
|
||||
background_color: "#131313",
|
||||
display: "standalone",
|
||||
|
|
@ -270,7 +270,7 @@ export default defineNuxtConfig({
|
|||
public: {
|
||||
language: "en-US",
|
||||
titleSeparator: "·",
|
||||
siteName: "Lysand",
|
||||
siteName: "Versia",
|
||||
trailingSlash: true,
|
||||
apiHost: "https://social.lysand.org",
|
||||
onionApiHost: undefined,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "lysand-fe",
|
||||
"name": "versia-fe",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "AGPL-3.0",
|
||||
|
|
@ -17,11 +17,11 @@
|
|||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/lysand-org/frontend.git"
|
||||
"url": "git+https://github.com/versia-pub/frontend.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxt dev --https --https.cert config/lysand-fe.localhost.pem --https.key config/lysand-fe.localhost-key.pem --host lysand-fe.localhost",
|
||||
"dev": "nuxt dev --https --https.cert config/versia-fe.localhost.pem --https.key config/versia-fe.localhost-key.pem --host versia-fe.localhost",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare",
|
||||
|
|
@ -30,11 +30,11 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@ark-ui/vue": "3.6.0",
|
||||
"@lysand-org/client": "^0.2.5",
|
||||
"@nuxt/fonts": "^0.7.2",
|
||||
"@tailwindcss/typography": "^0.5.14",
|
||||
"@vee-validate/nuxt": "^4.13.2",
|
||||
"@vee-validate/zod": "^4.13.2",
|
||||
"@versia/client": "^0.1.0-rc.0",
|
||||
"@vite-pwa/nuxt": "^0.10.0",
|
||||
"@vueuse/core": "^11.0.1",
|
||||
"@vueuse/nuxt": "^11.0.1",
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@
|
|||
"readme": "README.md",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/lysand-org/frontend.git",
|
||||
"url": "https://github.com/versia-pub/frontend.git",
|
||||
"directory": "packages/ui"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/lysand-org/frontend/issues"
|
||||
"url": "https://github.com/versia-pub/frontend/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { Account } from "@lysand-org/client/types";
|
||||
import type { Account } from "@versia/client/types";
|
||||
import ErrorBoundary from "~/components/errors/ErrorBoundary.vue";
|
||||
import AccountProfile from "~/components/social-elements/users/Account.vue";
|
||||
import AccountTimeline from "~/components/timelines/account.vue";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<template>
|
||||
<div class="px-4 py-20 prose prose-invert mx-auto max-w-md">
|
||||
<h2>Where is the mobile app?</h2>
|
||||
<p>Lysand is compatible with the Mastodon API, meaning it can be used with any Mastodon-compatible client. This
|
||||
<p>Versia Server is compatible with the Mastodon API, meaning it can be used with any Mastodon-compatible
|
||||
client. This
|
||||
includes the official Mastodon app, as well as many third-party clients.</p>
|
||||
<h2>Recommended Clients</h2>
|
||||
<ul class="w-full flex flex-col gap-3 mt-4 not-prose">
|
||||
|
|
@ -27,7 +28,7 @@
|
|||
</ul>
|
||||
|
||||
<p>
|
||||
Found a problem? Report it on <a href="https://github.com/lysand-org/lysand/issues/new/choose"
|
||||
Found a problem? Report it on <a href="https://github.com/versia-pub/server/issues/new/choose"
|
||||
target="_blank" class="underline text-primary-700">the issue tracker</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="flex min-h-screen relative flex-col gap-10 justify-center py-12 px-8">
|
||||
<img crossorigin="anonymous" src="https://cdn.lysand.org/logo.webp" alt="Lysand logo"
|
||||
<img crossorigin="anonymous" src="https://cdn.versia.pub/branding/icon.svg" alt="Versia logo"
|
||||
class="mx-auto hidden md:inline-block h-20 ring-1 ring-white/20 rounded" />
|
||||
<div v-if="validUrlParameters" class="mx-auto w-full max-w-md">
|
||||
<VeeForm class="flex flex-col gap-y-6" method="POST" :validation-schema="schema"
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
</p>
|
||||
|
||||
<p class="mt-6 text-lg leading-8 text-gray-300">
|
||||
Found a problem? Report it on <a href="https://github.com/lysand-org/lysand/issues/new/choose"
|
||||
Found a problem? Report it on <a href="https://github.com/versia-pub/server/issues/new/choose"
|
||||
target="_blank" class="underline text-primary-700">the issue tracker</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { LysandClient } from "@lysand-org/client";
|
||||
import { Client } from "@versia/client";
|
||||
import { toTypedSchema } from "@vee-validate/zod";
|
||||
import { z } from "zod";
|
||||
import FieldError from "~/components/inputs/field-error.vue";
|
||||
|
|
@ -125,7 +125,7 @@ const validUrlParameters =
|
|||
params.scope;
|
||||
|
||||
const instance = useInstanceFromClient(
|
||||
new LysandClient(new URL(useBaseUrl().value)),
|
||||
new Client(new URL(useBaseUrl().value)),
|
||||
);
|
||||
|
||||
const ssoConfig = computed(() => instance.value?.sso);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
</p>
|
||||
|
||||
<p class="mt-6 text-lg leading-8 text-gray-300">
|
||||
Found a problem? Report it on <a href="https://github.com/lysand-org/lysand/issues/new/choose"
|
||||
Found a problem? Report it on <a href="https://github.com/versia-pub/server/issues/new/choose"
|
||||
target="_blank" class="underline text-primary-700">the issue tracker</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
</p>
|
||||
|
||||
<p class="mt-6 text-lg leading-8 text-gray-300">
|
||||
Found a problem? Report it on <a href="https://github.com/lysand-org/lysand/issues/new/choose"
|
||||
Found a problem? Report it on <a href="https://github.com/versia-pub/server/issues/new/choose"
|
||||
target="_blank" class="underline text-primary-700">the issue tracker</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="flex min-h-screen relative flex-col gap-10 justify-center py-12 px-8">
|
||||
<img crossorigin="anonymous" src="https://cdn.lysand.org/logo.webp" alt="Lysand logo"
|
||||
<img crossorigin="anonymous" src="https://cdn.versia.pub/branding/icon.svg" alt="Versia logo"
|
||||
class="mx-auto hidden md:inline-block h-20 ring-1 ring-white/20 rounded" />
|
||||
<div v-if="validUrlParameters" class="mx-auto w-full max-w-md">
|
||||
<VeeForm class="flex flex-col gap-y-6" method="POST" :validation-schema="schema" action="/api/auth/reset">
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
</p>
|
||||
|
||||
<p class="mt-6 text-lg leading-8 text-gray-300">
|
||||
Found a problem? Report it on <a href="https://github.com/lysand-org/lysand/issues/new/choose"
|
||||
Found a problem? Report it on <a href="https://github.com/versia-pub/server/issues/new/choose"
|
||||
target="_blank" class="underline text-primary-700">the issue tracker</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="flex min-h-screen flex-col justify-center px-6 py-12 gap-10 lg:px-8 relative">
|
||||
<img crossorigin="anonymous" src="https://cdn.lysand.org/logo.webp" alt="Lysand logo"
|
||||
<img crossorigin="anonymous" src="https://cdn.versia.pub/branding/icon.svg" alt="Versia logo"
|
||||
class="mx-auto hidden md:inline-block h-20" />
|
||||
<div v-if="true" class="mx-auto w-full max-w-md">
|
||||
<div v-if="Object.keys(errors).length > 0"
|
||||
|
|
@ -102,7 +102,7 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { Collapsible } from "@ark-ui/vue";
|
||||
import type { ResponseError } from "@lysand-org/client";
|
||||
import type { ResponseError } from "@versia/client";
|
||||
import { toTypedSchema } from "@vee-validate/zod";
|
||||
import { z } from "zod";
|
||||
import CheckboxInput from "~/components/inputs/checkbox-input.vue";
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 4.8 KiB |
BIN
public/logo.webp
BIN
public/logo.webp
Binary file not shown.
|
Before Width: | Height: | Size: 5.3 KiB |
|
|
@ -1,15 +1,15 @@
|
|||
const art = `
|
||||
|
||||
██╗ ██╗ ██╗███████╗ █████╗ ███╗ ██╗██████╗
|
||||
██║ ╚██╗ ██╔╝██╔════╝██╔══██╗████╗ ██║██╔══██╗
|
||||
██║ ╚████╔╝ ███████╗███████║██╔██╗ ██║██║ ██║
|
||||
██║ ╚██╔╝ ╚════██║██╔══██║██║╚██╗██║██║ ██║
|
||||
███████╗██║ ███████║██║ ██║██║ ╚████║██████╔╝
|
||||
╚══════╝╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═════╝
|
||||
██╗ ██╗███████╗██████╗ ███████╗██╗ █████╗
|
||||
██║ ██║██╔════╝██╔══██╗██╔════╝██║██╔══██╗
|
||||
██║ ██║█████╗ ██████╔╝███████╗██║███████║
|
||||
╚██╗ ██╔╝██╔══╝ ██╔══██╗╚════██║██║██╔══██║
|
||||
╚████╔╝ ███████╗██║ ██║███████║██║██║ ██║
|
||||
╚═══╝ ╚══════╝╚═╝ ╚═╝╚══════╝╚═╝╚═╝ ╚═╝
|
||||
|
||||
* Hello from the Lysand development team!
|
||||
* Hello from the Versia development team!
|
||||
* If you are seeing this, we may need your help!
|
||||
* Join development at https://github.com/lysand-org
|
||||
* Join development at https://github.com/versia-pub
|
||||
*
|
||||
* With ❤️ from us:
|
||||
* - @jessew@social.lysand.org
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import type { ApplicationData } from "@lysand-org/client/types";
|
||||
import type { ApplicationData } from "@versia/client/types";
|
||||
import { nanoid } from "nanoid";
|
||||
|
||||
export const signInWithCode = (code: string, appData: ApplicationData) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue