feat: add SSO workspace, named shares and Debian release tooling
This commit is contained in:
1 parent
833d908884
commit
87bc33e675
106 files changed
+4160
-5637
No files matched your search
@@ -4,18 +4,17 @@ import Login from "@/views/Login.vue";
|
||||
import Layout from "@/views/Layout.vue";
|
||||
import Files from "@/views/Files.vue";
|
||||
import Share from "@/views/Share.vue";
|
||||
import Users from "@/views/settings/Users.vue";
|
||||
import User from "@/views/settings/User.vue";
|
||||
import Settings from "@/views/Settings.vue";
|
||||
import GlobalSettings from "@/views/settings/Global.vue";
|
||||
import ProfileSettings from "@/views/settings/Profile.vue";
|
||||
import Shares from "@/views/settings/Shares.vue";
|
||||
const Users = () => import("@/views/settings/Users.vue");
|
||||
const User = () => import("@/views/settings/User.vue");
|
||||
const Settings = () => import("@/views/Settings.vue");
|
||||
const GlobalSettings = () => import("@/views/settings/Global.vue");
|
||||
const ProfileSettings = () => import("@/views/settings/Profile.vue");
|
||||
const Shares = () => import("@/views/settings/Shares.vue");
|
||||
import Errors from "@/views/Errors.vue";
|
||||
import { useAuthStore } from "@/stores/auth";
|
||||
import { baseURL, name } from "@/utils/constants";
|
||||
import i18n from "@/i18n";
|
||||
import { recaptcha, loginPage } from "@/utils/constants";
|
||||
import { login, validateLogin } from "@/utils/auth";
|
||||
import { validateLogin } from "@/utils/auth";
|
||||
|
||||
const titles = {
|
||||
Login: "sidebar.login",
|
||||
@@ -39,7 +38,8 @@ const routes = [
|
||||
component: Login,
|
||||
},
|
||||
{
|
||||
path: "/share",
|
||||
path: "/s",
|
||||
alias: "/share",
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
@@ -154,25 +154,7 @@ const routes = [
|
||||
];
|
||||
|
||||
async function initAuth() {
|
||||
if (loginPage) {
|
||||
await validateLogin();
|
||||
} else {
|
||||
await login("", "", "");
|
||||
}
|
||||
|
||||
if (recaptcha) {
|
||||
await new Promise<void>((resolve) => {
|
||||
const check = () => {
|
||||
if (typeof window.grecaptcha === "undefined") {
|
||||
setTimeout(check, 100);
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
};
|
||||
|
||||
check();
|
||||
});
|
||||
}
|
||||
await validateLogin();
|
||||
}
|
||||
|
||||
const router = createRouter({
|
||||
@@ -181,9 +163,6 @@ const router = createRouter({
|
||||
});
|
||||
|
||||
router.beforeResolve(async (to, from) => {
|
||||
const title = i18n.global.t(titles[to.name as keyof typeof titles]);
|
||||
document.title = title + " - " + name;
|
||||
|
||||
const authStore = useAuthStore();
|
||||
|
||||
// this will only be null on first route
|
||||
@@ -195,6 +174,9 @@ router.beforeResolve(async (to, from) => {
|
||||
}
|
||||
}
|
||||
|
||||
const title = i18n.global.t(titles[to.name as keyof typeof titles]);
|
||||
document.title = title + " - " + name;
|
||||
|
||||
if (to.path.endsWith("/login") && authStore.isLoggedIn) {
|
||||
return { path: "/files/" };
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user