feat(web): support context path deployments

This commit is contained in:
t8y2 committed 2026-06-29 09:14:37 +08:00
1 parent 45a60819ca
commit d01ffb0d55
18 files changed
+248 -43

No files matched your search

@@ -5,6 +5,7 @@ import { Button } from "@/components/ui/button";
import PasswordInput from "@/components/ui/PasswordInput.vue";
import { Lock, Loader2, ShieldCheck } from "@lucide/vue";
import AppLogo from "@/components/icons/AppLogo.vue";
import { apiUrl } from "@/lib/webPath";
const props = withDefaults(
defineProps<{
@@ -30,7 +31,7 @@ async function submit() {
loading.value = true;
error.value = "";
try {
const url = props.setupMode ? "/api/auth/setup" : "/api/auth/login";
const url = apiUrl(props.setupMode ? "/api/auth/setup" : "/api/auth/login");
const res = await fetch(url, {
method: "POST",
headers: { "Content-Type": "application/json" },
@@ -80,6 +80,7 @@ import { useSavedSqlStore } from "@/stores/savedSqlStore";
import { currentLocale, setLocale, type Locale } from "@/i18n";
import { LOCALE_OPTIONS } from "@/lib/localeOptions";
import { DEFAULT_WEB_DAV_AUTO_UPLOAD_INTERVAL_MINUTES, DEFAULT_WEB_DAV_REMOTE_PATH, normalizedWebDavAutoUploadInterval, writeWebDavAutoUploadFields } from "@/lib/webdavAutoUploadConfig";
import { apiUrl } from "@/lib/webPath";
const { t } = useI18n();
const settingsStore = useSettingsStore();
@@ -1386,7 +1387,7 @@ async function changePassword() {
changingPassword.value = true;
passwordMessage.value = "";
try {
const res = await fetch("/api/auth/change-password", {
const res = await fetch(apiUrl("/api/auth/change-password"), {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ old_password: oldPassword.value, new_password: newPassword.value }),