|
|
@ -1,155 +1,159 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<h1 class="mb-3">
|
|
|
|
<transition name="slide-fade" appear>
|
|
|
|
Settings
|
|
|
|
<div>
|
|
|
|
</h1>
|
|
|
|
<h1 v-show="show" class="mb-3">
|
|
|
|
|
|
|
|
Settings
|
|
|
|
<div class="shadow-box">
|
|
|
|
</h1>
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="shadow-box">
|
|
|
|
<h2 class="mb-2">General</h2>
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
<form class="mb-3" @submit.prevent="saveGeneral">
|
|
|
|
<h2 class="mb-2">General</h2>
|
|
|
|
<div class="mb-3">
|
|
|
|
|
|
|
|
<label for="timezone" class="form-label">Theme</label>
|
|
|
|
<form class="mb-3" @submit.prevent="saveGeneral">
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
<div>
|
|
|
|
<label for="timezone" class="form-label">Theme</label>
|
|
|
|
<div class="btn-group" role="group" aria-label="Basic checkbox toggle button group">
|
|
|
|
|
|
|
|
<input id="btncheck1" v-model="$root.userTheme" type="radio" class="btn-check" name="theme" autocomplete="off" value="light">
|
|
|
|
|
|
|
|
<label class="btn btn-outline-primary" for="btncheck1">Light</label>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<input id="btncheck2" v-model="$root.userTheme" type="radio" class="btn-check" name="theme" autocomplete="off" value="dark">
|
|
|
|
|
|
|
|
<label class="btn btn-outline-primary" for="btncheck2">Dark</label>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<input id="btncheck3" v-model="$root.userTheme" type="radio" class="btn-check" name="theme" autocomplete="off" value="auto">
|
|
|
|
|
|
|
|
<label class="btn btn-outline-primary" for="btncheck3">Auto</label>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
<div>
|
|
|
|
<label class="form-label">Theme - Heartbeat Bar</label>
|
|
|
|
<div class="btn-group" role="group" aria-label="Basic checkbox toggle button group">
|
|
|
|
<div>
|
|
|
|
<input id="btncheck1" v-model="$root.userTheme" type="radio" class="btn-check" name="theme" autocomplete="off" value="light">
|
|
|
|
<div class="btn-group" role="group" aria-label="Basic checkbox toggle button group">
|
|
|
|
<label class="btn btn-outline-primary" for="btncheck1">Light</label>
|
|
|
|
<input id="btncheck4" v-model="$root.userHeartbeatBar" type="radio" class="btn-check" name="heartbeatBarTheme" autocomplete="off" value="normal">
|
|
|
|
|
|
|
|
<label class="btn btn-outline-primary" for="btncheck4">Normal</label>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<input id="btncheck5" v-model="$root.userHeartbeatBar" type="radio" class="btn-check" name="heartbeatBarTheme" autocomplete="off" value="bottom">
|
|
|
|
<input id="btncheck2" v-model="$root.userTheme" type="radio" class="btn-check" name="theme" autocomplete="off" value="dark">
|
|
|
|
<label class="btn btn-outline-primary" for="btncheck5">Bottom</label>
|
|
|
|
<label class="btn btn-outline-primary" for="btncheck2">Dark</label>
|
|
|
|
|
|
|
|
|
|
|
|
<input id="btncheck6" v-model="$root.userHeartbeatBar" type="radio" class="btn-check" name="heartbeatBarTheme" autocomplete="off" value="none">
|
|
|
|
<input id="btncheck3" v-model="$root.userTheme" type="radio" class="btn-check" name="theme" autocomplete="off" value="auto">
|
|
|
|
<label class="btn btn-outline-primary" for="btncheck6">None</label>
|
|
|
|
<label class="btn btn-outline-primary" for="btncheck3">Auto</label>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
|
|
|
<label for="timezone" class="form-label">Timezone</label>
|
|
|
|
|
|
|
|
<select id="timezone" v-model="$root.userTimezone" class="form-select">
|
|
|
|
|
|
|
|
<option value="auto">
|
|
|
|
|
|
|
|
Auto: {{ guessTimezone }}
|
|
|
|
|
|
|
|
</option>
|
|
|
|
|
|
|
|
<option v-for="(timezone, index) in timezoneList" :key="index" :value="timezone.value">
|
|
|
|
|
|
|
|
{{ timezone.name }}
|
|
|
|
|
|
|
|
</option>
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
|
|
|
<label class="form-label">Search Engine Visibility</label>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="form-check">
|
|
|
|
|
|
|
|
<input id="searchEngineIndexYes" v-model="settings.searchEngineIndex" class="form-check-input" type="radio" name="flexRadioDefault" :value="true" required>
|
|
|
|
|
|
|
|
<label class="form-check-label" for="searchEngineIndexYes">
|
|
|
|
|
|
|
|
Allow indexing
|
|
|
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-check">
|
|
|
|
|
|
|
|
<input id="searchEngineIndexNo" v-model="settings.searchEngineIndex" class="form-check-input" type="radio" name="flexRadioDefault" :value="false" required>
|
|
|
|
|
|
|
|
<label class="form-check-label" for="searchEngineIndexNo">
|
|
|
|
|
|
|
|
Discourage search engines from indexing site
|
|
|
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<button class="btn btn-primary" type="submit">
|
|
|
|
|
|
|
|
Save
|
|
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template v-if="loaded">
|
|
|
|
|
|
|
|
<template v-if="! settings.disableAuth">
|
|
|
|
|
|
|
|
<h2 class="mt-5 mb-2">Change Password</h2>
|
|
|
|
|
|
|
|
<form class="mb-3" @submit.prevent="savePassword">
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
<div class="mb-3">
|
|
|
|
<label for="current-password" class="form-label">Current Password</label>
|
|
|
|
<label class="form-label">Theme - Heartbeat Bar</label>
|
|
|
|
<input id="current-password" v-model="password.currentPassword" type="password" class="form-control" required>
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<div class="btn-group" role="group" aria-label="Basic checkbox toggle button group">
|
|
|
|
|
|
|
|
<input id="btncheck4" v-model="$root.userHeartbeatBar" type="radio" class="btn-check" name="heartbeatBarTheme" autocomplete="off" value="normal">
|
|
|
|
|
|
|
|
<label class="btn btn-outline-primary" for="btncheck4">Normal</label>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<input id="btncheck5" v-model="$root.userHeartbeatBar" type="radio" class="btn-check" name="heartbeatBarTheme" autocomplete="off" value="bottom">
|
|
|
|
|
|
|
|
<label class="btn btn-outline-primary" for="btncheck5">Bottom</label>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<input id="btncheck6" v-model="$root.userHeartbeatBar" type="radio" class="btn-check" name="heartbeatBarTheme" autocomplete="off" value="none">
|
|
|
|
|
|
|
|
<label class="btn btn-outline-primary" for="btncheck6">None</label>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
<div class="mb-3">
|
|
|
|
<label for="new-password" class="form-label">New Password</label>
|
|
|
|
<label for="timezone" class="form-label">Timezone</label>
|
|
|
|
<input id="new-password" v-model="password.newPassword" type="password" class="form-control" required>
|
|
|
|
<select id="timezone" v-model="$root.userTimezone" class="form-select">
|
|
|
|
|
|
|
|
<option value="auto">
|
|
|
|
|
|
|
|
Auto: {{ guessTimezone }}
|
|
|
|
|
|
|
|
</option>
|
|
|
|
|
|
|
|
<option v-for="(timezone, index) in timezoneList" :key="index" :value="timezone.value">
|
|
|
|
|
|
|
|
{{ timezone.name }}
|
|
|
|
|
|
|
|
</option>
|
|
|
|
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
<div class="mb-3">
|
|
|
|
<label for="repeat-new-password" class="form-label">Repeat New Password</label>
|
|
|
|
<label class="form-label">Search Engine Visibility</label>
|
|
|
|
<input id="repeat-new-password" v-model="password.repeatNewPassword" type="password" class="form-control" :class="{ 'is-invalid' : invalidPassword }" required>
|
|
|
|
|
|
|
|
<div class="invalid-feedback">
|
|
|
|
<div class="form-check">
|
|
|
|
The repeat password does not match.
|
|
|
|
<input id="searchEngineIndexYes" v-model="settings.searchEngineIndex" class="form-check-input" type="radio" name="flexRadioDefault" :value="true" required>
|
|
|
|
|
|
|
|
<label class="form-check-label" for="searchEngineIndexYes">
|
|
|
|
|
|
|
|
Allow indexing
|
|
|
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-check">
|
|
|
|
|
|
|
|
<input id="searchEngineIndexNo" v-model="settings.searchEngineIndex" class="form-check-input" type="radio" name="flexRadioDefault" :value="false" required>
|
|
|
|
|
|
|
|
<label class="form-check-label" for="searchEngineIndexNo">
|
|
|
|
|
|
|
|
Discourage search engines from indexing site
|
|
|
|
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<button class="btn btn-primary" type="submit">
|
|
|
|
<button class="btn btn-primary" type="submit">
|
|
|
|
Update Password
|
|
|
|
Save
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="mt-5 mb-2">Advanced</h2>
|
|
|
|
<template v-if="loaded">
|
|
|
|
|
|
|
|
<template v-if="! settings.disableAuth">
|
|
|
|
|
|
|
|
<h2 class="mt-5 mb-2">Change Password</h2>
|
|
|
|
|
|
|
|
<form class="mb-3" @submit.prevent="savePassword">
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
|
|
|
<label for="current-password" class="form-label">Current Password</label>
|
|
|
|
|
|
|
|
<input id="current-password" v-model="password.currentPassword" type="password" class="form-control" required>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
|
|
|
<label for="new-password" class="form-label">New Password</label>
|
|
|
|
|
|
|
|
<input id="new-password" v-model="password.newPassword" type="password" class="form-control" required>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
|
|
|
<label for="repeat-new-password" class="form-label">Repeat New Password</label>
|
|
|
|
|
|
|
|
<input id="repeat-new-password" v-model="password.repeatNewPassword" type="password" class="form-control" :class="{ 'is-invalid' : invalidPassword }" required>
|
|
|
|
|
|
|
|
<div class="invalid-feedback">
|
|
|
|
|
|
|
|
The repeat password does not match.
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<button class="btn btn-primary" type="submit">
|
|
|
|
|
|
|
|
Update Password
|
|
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="mt-5 mb-2">Advanced</h2>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="mb-3">
|
|
|
|
<div class="mb-3">
|
|
|
|
<button v-if="settings.disableAuth" class="btn btn-outline-primary me-1" @click="enableAuth">Enable Auth</button>
|
|
|
|
<button v-if="settings.disableAuth" class="btn btn-outline-primary me-1" @click="enableAuth">Enable Auth</button>
|
|
|
|
<button v-if="! settings.disableAuth" class="btn btn-primary me-1" @click="confirmDisableAuth">Disable Auth</button>
|
|
|
|
<button v-if="! settings.disableAuth" class="btn btn-primary me-1" @click="confirmDisableAuth">Disable Auth</button>
|
|
|
|
<button v-if="! settings.disableAuth" class="btn btn-danger me-1" @click="$root.logout">Logout</button>
|
|
|
|
<button v-if="! settings.disableAuth" class="btn btn-danger me-1" @click="$root.logout">Logout</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="notification-list col-md-6">
|
|
|
|
<div class="notification-list col-md-6">
|
|
|
|
<div v-if="$root.isMobile" class="mt-3" />
|
|
|
|
<div v-if="$root.isMobile" class="mt-3" />
|
|
|
|
|
|
|
|
|
|
|
|
<h2>Notifications</h2>
|
|
|
|
<h2>Notifications</h2>
|
|
|
|
<p v-if="$root.notificationList.length === 0">
|
|
|
|
<p v-if="$root.notificationList.length === 0">
|
|
|
|
Not available, please setup.
|
|
|
|
Not available, please setup.
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<p v-else>
|
|
|
|
<p v-else>
|
|
|
|
Please assign a notification to monitor(s) to get it to work.
|
|
|
|
Please assign a notification to monitor(s) to get it to work.
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
<ul class="list-group mb-3" style="border-radius: 1rem;">
|
|
|
|
<ul class="list-group mb-3" style="border-radius: 1rem;">
|
|
|
|
<li v-for="(notification, index) in $root.notificationList" :key="index" class="list-group-item">
|
|
|
|
<li v-for="(notification, index) in $root.notificationList" :key="index" class="list-group-item">
|
|
|
|
{{ notification.name }}<br>
|
|
|
|
{{ notification.name }}<br>
|
|
|
|
<a href="#" @click="$refs.notificationDialog.show(notification.id)">Edit</a>
|
|
|
|
<a href="#" @click="$refs.notificationDialog.show(notification.id)">Edit</a>
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
<button class="btn btn-primary me-2" type="button" @click="$refs.notificationDialog.show()">
|
|
|
|
<button class="btn btn-primary me-2" type="button" @click="$refs.notificationDialog.show()">
|
|
|
|
Setup Notification
|
|
|
|
Setup Notification
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<NotificationDialog ref="notificationDialog" />
|
|
|
|
<NotificationDialog ref="notificationDialog" />
|
|
|
|
|
|
|
|
|
|
|
|
<Confirm ref="confirmDisableAuth" btn-style="btn-danger" yes-text="I understand, please disable" no-text="Leave" @yes="disableAuth">
|
|
|
|
<Confirm ref="confirmDisableAuth" btn-style="btn-danger" yes-text="I understand, please disable" no-text="Leave" @yes="disableAuth">
|
|
|
|
<p>Are you sure want to <strong>disable auth</strong>?</p>
|
|
|
|
<p>Are you sure want to <strong>disable auth</strong>?</p>
|
|
|
|
<p>It is for <strong>someone who have 3rd-party auth</strong> in front of Uptime Kuma such as Cloudflare Access.</p>
|
|
|
|
<p>It is for <strong>someone who have 3rd-party auth</strong> in front of Uptime Kuma such as Cloudflare Access.</p>
|
|
|
|
<p>Please use it carefully.</p>
|
|
|
|
<p>Please use it carefully.</p>
|
|
|
|
</Confirm>
|
|
|
|
</Confirm>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</transition>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
@ -174,7 +178,7 @@ export default {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
timezoneList: timezoneList(),
|
|
|
|
timezoneList: timezoneList(),
|
|
|
|
guessTimezone: dayjs.tz.guess(),
|
|
|
|
guessTimezone: dayjs.tz.guess(),
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
invalidPassword: false,
|
|
|
|
invalidPassword: false,
|
|
|
|
password: {
|
|
|
|
password: {
|
|
|
|
currentPassword: "",
|
|
|
|
currentPassword: "",
|
|
|
|