mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-10-30 03:00:40 +00:00
Merge d12d5f94eb
into 79a26180af
This commit is contained in:
commit
2c7dc294ad
2 changed files with 7 additions and 5 deletions
|
@ -288,6 +288,7 @@ module.exports.statusPageSocketHandler = (socket) => {
|
||||||
ok: true,
|
ok: true,
|
||||||
msg: "successAdded",
|
msg: "successAdded",
|
||||||
msgi18n: true,
|
msgi18n: true,
|
||||||
|
slug: slug
|
||||||
});
|
});
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
@ -16,14 +16,11 @@
|
||||||
<label for="slug" class="form-label">{{ $t("Slug") }}</label>
|
<label for="slug" class="form-label">{{ $t("Slug") }}</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span id="basic-addon3" class="input-group-text">/status/</span>
|
<span id="basic-addon3" class="input-group-text">/status/</span>
|
||||||
<input id="slug" v-model="slug" type="text" class="form-control" required data-testid="slug-input">
|
<input id="slug" v-model="slug" type="text" class="form-control" autocapitalize="none" required data-testid="slug-input">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-text">
|
<div class="form-text">
|
||||||
<ul>
|
<ul>
|
||||||
<li>{{ $t("Accept characters:") }} <mark>a-z</mark> <mark>0-9</mark> <mark>-</mark></li>
|
<li>{{ $t("Accept characters:") }} <mark>a-z</mark> <mark>0-9</mark> <mark>-</mark></li>
|
||||||
<i18n-t tag="li" keypath="startOrEndWithOnly">
|
|
||||||
<mark>a-z</mark> <mark>0-9</mark>
|
|
||||||
</i18n-t>
|
|
||||||
<li>{{ $t("No consecutive dashes") }} <mark>--</mark></li>
|
<li>{{ $t("No consecutive dashes") }} <mark>--</mark></li>
|
||||||
<i18n-t tag="li" keypath="statusPageSpecialSlugDesc">
|
<i18n-t tag="li" keypath="statusPageSpecialSlugDesc">
|
||||||
<mark class="me-1">default</mark>
|
<mark class="me-1">default</mark>
|
||||||
|
@ -65,7 +62,7 @@ export default {
|
||||||
this.processing = false;
|
this.processing = false;
|
||||||
|
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
location.href = "/status/" + this.slug + "?edit";
|
location.href = "/status/" + res.slug + "?edit";
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (res.msg.includes("UNIQUE constraint")) {
|
if (res.msg.includes("UNIQUE constraint")) {
|
||||||
|
@ -85,4 +82,8 @@ export default {
|
||||||
.shadow-box {
|
.shadow-box {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#slug {
|
||||||
|
text-transform: lowercase;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in a new issue