mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-10-30 03:00:40 +00:00
[Status Page] Add ?edit
This commit is contained in:
parent
27bfae67af
commit
00738edbe7
2 changed files with 11 additions and 9 deletions
|
@ -15,13 +15,14 @@
|
||||||
No status pages
|
No status pages
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<router-link v-for="statusPage in $root.statusPageList" :key="statusPage.slug" :to="'/status/' + statusPage.slug" class="item">
|
<!-- use <a> instead of <router-link>, because the heartbeat won't load. -->
|
||||||
|
<a v-for="statusPage in $root.statusPageList" :key="statusPage.slug" :href="'/status/' + statusPage.slug" class="item">
|
||||||
<img :src="icon(statusPage.icon)" alt class="logo me-2" />
|
<img :src="icon(statusPage.icon)" alt class="logo me-2" />
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div class="title">{{ statusPage.title }}</div>
|
<div class="title">{{ statusPage.title }}</div>
|
||||||
<div class="slug">/status/{{ statusPage.slug }}</div>
|
<div class="slug">/status/{{ statusPage.slug }}</div>
|
||||||
</div>
|
</div>
|
||||||
</router-link>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
<div v-else class="d-flex align-items-center justify-content-center my-3 spinner">
|
<div v-else class="d-flex align-items-center justify-content-center my-3 spinner">
|
||||||
<font-awesome-icon icon="spinner" size="2x" spin />
|
<font-awesome-icon icon="spinner" size="2x" spin />
|
||||||
|
|
|
@ -460,6 +460,12 @@ export default {
|
||||||
feedInterval = setInterval(() => {
|
feedInterval = setInterval(() => {
|
||||||
this.updateHeartbeatList();
|
this.updateHeartbeatList();
|
||||||
}, (300 + 10) * 1000);
|
}, (300 + 10) * 1000);
|
||||||
|
|
||||||
|
// Go to edit page if ?edit present
|
||||||
|
// null means ?edit present, but no value
|
||||||
|
if (this.$route.query.edit || this.$route.query.edit === null) {
|
||||||
|
this.edit();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
@ -516,12 +522,7 @@ export default {
|
||||||
console.log(time);
|
console.log(time);
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// If the slug was changed, go to the new slug
|
location.href = "/status/" + this.config.slug;
|
||||||
if (this.slug !== this.config.slug) {
|
|
||||||
location.href = "/status/" + this.config.slug;
|
|
||||||
} else {
|
|
||||||
location.reload();
|
|
||||||
}
|
|
||||||
}, time);
|
}, time);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -548,7 +549,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
discard() {
|
discard() {
|
||||||
location.reload();
|
location.href = "/status/" + this.slug;
|
||||||
},
|
},
|
||||||
|
|
||||||
changeTagsVisibility(show) {
|
changeTagsVisibility(show) {
|
||||||
|
|
Loading…
Reference in a new issue