Vue.component("http-web-root-box", { props: ["v-root-config", "v-is-location"], data: function () { let rootConfig = this.vRootConfig if (rootConfig == null) { rootConfig = { isPrior: false, isOn: true, dir: "", indexes: [], stripPrefix: "", decodePath: false, isBreak: false } } if (rootConfig.indexes == null) { rootConfig.indexes = [] } return { rootConfig: rootConfig, advancedVisible: false } }, methods: { changeAdvancedVisible: function (v) { this.advancedVisible = v }, addIndex: function () { let that = this teaweb.popup("/servers/server/settings/web/createIndex", { height: "10em", callback: function (resp) { that.rootConfig.indexes.push(resp.data.index) } }) }, removeIndex: function (i) { this.rootConfig.indexes.$remove(i) }, isOn: function () { return (!this.vIsLocation || this.rootConfig.isPrior) && this.rootConfig.isOn } }, template: `
` })