[setting] add webURI
This commit is contained in:
@@ -22,6 +22,7 @@ var defaultValueMap = map[string]string{
|
|||||||
"webCertFile": "",
|
"webCertFile": "",
|
||||||
"webKeyFile": "",
|
"webKeyFile": "",
|
||||||
"webPath": "/app/",
|
"webPath": "/app/",
|
||||||
|
"webURI": "",
|
||||||
"sessionMaxAge": "0",
|
"sessionMaxAge": "0",
|
||||||
"timeLocation": "Asia/Tehran",
|
"timeLocation": "Asia/Tehran",
|
||||||
"subListen": "",
|
"subListen": "",
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ export default {
|
|||||||
domain: "Domain",
|
domain: "Domain",
|
||||||
sslKey: "SSL Key Path",
|
sslKey: "SSL Key Path",
|
||||||
sslCert: "SSL Certificate Path",
|
sslCert: "SSL Certificate Path",
|
||||||
|
webUri: "Panel URI",
|
||||||
sessionAge: "Session Maximum Age",
|
sessionAge: "Session Maximum Age",
|
||||||
timeLoc: "Timezone Location",
|
timeLoc: "Timezone Location",
|
||||||
subEncode: "Enable Encoding",
|
subEncode: "Enable Encoding",
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ export default {
|
|||||||
domain: "دامنه",
|
domain: "دامنه",
|
||||||
sslKey: "مسیر فایل کلید",
|
sslKey: "مسیر فایل کلید",
|
||||||
sslCert: "مسیر فایل گواهی",
|
sslCert: "مسیر فایل گواهی",
|
||||||
|
webUri: "آدرس نهایی پنل",
|
||||||
sessionAge: "بیشینه زمان لاگین ماندن",
|
sessionAge: "بیشینه زمان لاگین ماندن",
|
||||||
timeLoc: "منطقه زمانی",
|
timeLoc: "منطقه زمانی",
|
||||||
subEncode: "رمزگذاری",
|
subEncode: "رمزگذاری",
|
||||||
|
|||||||
@@ -44,6 +44,9 @@
|
|||||||
<v-col cols="12" sm="6" md="4">
|
<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-text-field v-model="settings.webCertFile" :label="$t('setting.sslCert')" hide-details></v-text-field>
|
||||||
</v-col>
|
</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-col cols="12" sm="6" md="4">
|
||||||
<v-text-field
|
<v-text-field
|
||||||
type="number"
|
type="number"
|
||||||
@@ -147,6 +150,7 @@ const settings = ref({
|
|||||||
webCertFile: "",
|
webCertFile: "",
|
||||||
webKeyFile: "",
|
webKeyFile: "",
|
||||||
webPath: "/app/",
|
webPath: "/app/",
|
||||||
|
webURI: "",
|
||||||
sessionMaxAge: "0",
|
sessionMaxAge: "0",
|
||||||
timeLocation: "Asia/Tehran",
|
timeLocation: "Asia/Tehran",
|
||||||
subListen: "",
|
subListen: "",
|
||||||
@@ -196,8 +200,11 @@ const restartApp = async () => {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
const msg = await HttpUtils.post('api/restartApp',{})
|
const msg = await HttpUtils.post('api/restartApp',{})
|
||||||
if (msg.success) {
|
if (msg.success) {
|
||||||
const isTLS = settings.value.webCertFile !== "" || settings.value.webKeyFile !== ""
|
let url = settings.value.webURI
|
||||||
const url = buildURL(settings.value.webDomain,settings.value.webPort.toString(),isTLS, settings.value.webPath)
|
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)
|
await sleep(3000)
|
||||||
window.location.replace(url)
|
window.location.replace(url)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user