Commit aac4cf62 authored by Johannes Zellner's avatar Johannes Zellner

Save and close the settings

parent 19d136e5
......@@ -21,7 +21,7 @@
<header>
<h1><span class="hidden-xs-only">Cloudron OpenVPN</span></h1>
<el-button id="openSettingsButton" v-show="user && user.isAdmin" @click="openSettings()" icon="el-icon-setting">Settings</el-button>
<el-button id="openSettingsButton" v-show="user && user.isAdmin && view !== 'settings'" @click="openSettings()" icon="el-icon-setting">Settings</el-button>
<el-button id="logoutButton" v-show="user" @click="logout()">Logout</el-button>
</header>
......@@ -54,6 +54,7 @@
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSettingsSave()">Save</el-button>
<el-button @click="onSettingsClose()">Close</el-button>
</el-form-item>
</el-form>
</div>
......
......@@ -222,11 +222,16 @@
if (error) return console.error(error)
this.refreshSettings()
this.view = VIEWS.DEVICES
this.$message.success('Settings saved')
})
},
onSettingsClose () {
this.view = VIEWS.DEVICES
},
openSettings () {
this.view = VIEWS.SETTINGS
this.refreshSettings()
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment