kopia lustrzana https://codeberg.org/nmkj/audon
add static link
rodzic
17e07d28a1
commit
b21aa42aaa
|
@ -5,10 +5,14 @@ audon.localhost {
|
|||
path /app/* /api/* /storage/* /u/*
|
||||
}
|
||||
handle @backend {
|
||||
reverse_proxy devcontainer:8100
|
||||
reverse_proxy devcontainer:8100 {
|
||||
flush_interval -1
|
||||
}
|
||||
}
|
||||
handle {
|
||||
reverse_proxy devcontainer:5173
|
||||
reverse_proxy devcontainer:5173 {
|
||||
flush_interval -1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
# Go workspace file
|
||||
go.work
|
||||
__debug_bin
|
||||
|
||||
### Node ###
|
||||
# Logs
|
||||
|
|
|
@ -25,6 +25,9 @@ editRoom: "Room Edit"
|
|||
comingFuture: "Coming with future update!"
|
||||
processing: "Processing now...<br />Keep this window open!"
|
||||
lostWarning: "Unsaved data will be lost if you leave the page, are you sure?"
|
||||
staticLink:
|
||||
title: "Your Static Link"
|
||||
hint: "Other can join to your room via this link while you're hosting."
|
||||
form:
|
||||
title: "Title"
|
||||
titleRequired: "Room title required"
|
||||
|
@ -46,7 +49,7 @@ roomReady:
|
|||
header: "Your room is ready!"
|
||||
message: "Your room \"{title}\" is now ready. Share the following URL with other participants."
|
||||
errors:
|
||||
offline: "This user is offline now."
|
||||
offline: "This user is not hosting now."
|
||||
invalidAddress: "Invalid address"
|
||||
serverNotFound: "Instance not found"
|
||||
notFound: "{value} not found"
|
||||
|
|
|
@ -25,6 +25,9 @@ editRoom: "部屋の編集"
|
|||
comingFuture: "今後のアップデートで追加予定"
|
||||
processing: "処理中です。<br />画面を閉じないでください。"
|
||||
lostWarning: "この画面を閉じると保存前の内容が失われます。構いませんか?"
|
||||
staticLink:
|
||||
title: "固定リンク"
|
||||
hint: "プロフィール欄などに固定しておくと、あなたが部屋をホストしたとき他の人はこのリンクを使って参加できます。"
|
||||
form:
|
||||
title: "タイトル"
|
||||
titleRequired: "部屋の名前を入力してください"
|
||||
|
@ -46,7 +49,7 @@ roomReady:
|
|||
header: "お部屋の用意ができました!"
|
||||
message: "{title} を作りました。参加者に以下の URL を共有してください。"
|
||||
errors:
|
||||
offline: "このユーザーは現在オフラインです。"
|
||||
offline: "このユーザーは現在ホスト中ではありません。"
|
||||
invalidAddress: "アドレスが有効ではありません"
|
||||
serverNotFound: "サーバーが見つかりません"
|
||||
notFound: "{value} が見つかりません"
|
||||
|
|
|
@ -2,7 +2,6 @@ import { createRouter, createWebHistory } from "vue-router";
|
|||
import LoginView from "../views/LoginView.vue";
|
||||
import RoomView from "../views/RoomView.vue";
|
||||
import ErrorView from "../views/ErrorView.vue";
|
||||
import axios from "axios";
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
|
@ -49,27 +48,6 @@ const router = createRouter({
|
|||
},
|
||||
component: RoomView,
|
||||
},
|
||||
{
|
||||
path: "/u/:webfinger",
|
||||
name: "currentHosting",
|
||||
meta: {
|
||||
noauth: true,
|
||||
},
|
||||
redirect: async (to) => {
|
||||
try {
|
||||
const resp = await axios.get(`/u/${to.params.webfinger}`);
|
||||
if (resp.status === 302) {
|
||||
return {
|
||||
name: "room",
|
||||
params: { id: resp.headers.location },
|
||||
};
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
return { name: "notfound" };
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
|
|
|
@ -24,6 +24,13 @@ export const useMastodonStore = defineStore("mastodon", {
|
|||
}
|
||||
return "";
|
||||
},
|
||||
myStaticLink() {
|
||||
if (this.oauth.audon?.webfinger) {
|
||||
const url = new URL(location.href);
|
||||
return `${url.origin}/u/@${this.oauth.audon.webfinger}`;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async fetchToken() {
|
||||
|
|
|
@ -2,10 +2,12 @@
|
|||
import { useMastodonStore } from "../stores/mastodon";
|
||||
import axios from "axios";
|
||||
import { some } from "lodash-es";
|
||||
import { mdiLinkVariant } from "@mdi/js";
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
return {
|
||||
mdiLinkVariant,
|
||||
donStore: useMastodonStore(),
|
||||
};
|
||||
},
|
||||
|
@ -49,7 +51,7 @@ export default {
|
|||
{{ $t("logout") }}
|
||||
</v-btn>
|
||||
</div>
|
||||
<div class="text-center my-10">
|
||||
<div class="text-center my-8">
|
||||
<v-avatar class="rounded" size="100">
|
||||
<v-img
|
||||
:src="donStore.userinfo?.avatar"
|
||||
|
@ -80,5 +82,15 @@ export default {
|
|||
>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<div class="d-flex justify-center mt-6">
|
||||
<v-alert :icon="mdiLinkVariant" :title="$t('staticLink.title')">
|
||||
<div class="my-1">
|
||||
<h4 style="word-break: break-all">
|
||||
<a :href="donStore.myStaticLink" @click.prevent="">{{ donStore.myStaticLink }}</a>
|
||||
</h4>
|
||||
</div>
|
||||
<p>{{ $t("staticLink.hint") }}</p>
|
||||
</v-alert>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
|
Ładowanie…
Reference in New Issue