[setting] add webURI

This commit is contained in:
Alireza Ahmadi
2024-02-29 23:27:32 +01:00
parent 4a3917ea5d
commit e404342e2c
4 changed files with 12 additions and 2 deletions
+1
View File
@@ -100,6 +100,7 @@ export default {
domain: "Domain",
sslKey: "SSL Key Path",
sslCert: "SSL Certificate Path",
webUri: "Panel URI",
sessionAge: "Session Maximum Age",
timeLoc: "Timezone Location",
subEncode: "Enable Encoding",
+1
View File
@@ -100,6 +100,7 @@ export default {
domain: "دامنه",
sslKey: "مسیر فایل کلید",
sslCert: "مسیر فایل گواهی",
webUri: "آدرس نهایی پنل",
sessionAge: "بیشینه زمان لاگین ماندن",
timeLoc: "منطقه زمانی",
subEncode: "رمزگذاری",
+9 -2
View File
@@ -44,6 +44,9 @@
<v-col cols="12" sm="6" md="4">
<v-text-field v-model="settings.webCertFile" :label="$t('setting.sslCert')" hide-details></v-text-field>
</v-col>
<v-col cols="12" sm="6" md="4">
<v-text-field v-model="settings.webURI" :label="$t('setting.webUri')" hide-details></v-text-field>
</v-col>
<v-col cols="12" sm="6" md="4">
<v-text-field
type="number"
@@ -147,6 +150,7 @@ const settings = ref({
webCertFile: "",
webKeyFile: "",
webPath: "/app/",
webURI: "",
sessionMaxAge: "0",
timeLocation: "Asia/Tehran",
subListen: "",
@@ -196,8 +200,11 @@ const restartApp = async () => {
loading.value = true
const msg = await HttpUtils.post('api/restartApp',{})
if (msg.success) {
const isTLS = settings.value.webCertFile !== "" || settings.value.webKeyFile !== ""
const url = buildURL(settings.value.webDomain,settings.value.webPort.toString(),isTLS, settings.value.webPath)
let url = settings.value.webURI
if (url !== "") {
const isTLS = settings.value.webCertFile !== "" || settings.value.webKeyFile !== ""
url = buildURL(settings.value.webDomain,settings.value.webPort.toString(),isTLS, settings.value.webPath)
}
await sleep(3000)
window.location.replace(url)
}