mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-30 18:24:03 +00:00
Replace body and header placeholder functions with translations
This commit is contained in:
parent
5d836cf05d
commit
2c85491ee0
2 changed files with 4 additions and 16 deletions
|
@ -307,4 +307,6 @@ export default {
|
||||||
steamApiKeyDescription: "For monitoring a Steam Game Server you need a Steam Web-API key. You can register your API key here: ",
|
steamApiKeyDescription: "For monitoring a Steam Game Server you need a Steam Web-API key. You can register your API key here: ",
|
||||||
"Current User": "Current User",
|
"Current User": "Current User",
|
||||||
recent: "Recent",
|
recent: "Recent",
|
||||||
|
headersPlaceholder: "Example:\n\{\n \"HeaderName\": \"HeaderValue\"\n}",
|
||||||
|
bodyPlaceholder: "Example:\n\{\n \"key\": \"value\"\n}",
|
||||||
};
|
};
|
||||||
|
|
|
@ -257,13 +257,13 @@
|
||||||
<!-- Body -->
|
<!-- Body -->
|
||||||
<div class="my-3">
|
<div class="my-3">
|
||||||
<label for="body" class="form-label">{{ $t("Body") }}</label>
|
<label for="body" class="form-label">{{ $t("Body") }}</label>
|
||||||
<textarea id="body" v-model="monitor.body" class="form-control" :placeholder="bodyPlaceholder"></textarea>
|
<textarea id="body" v-model="monitor.body" class="form-control" :placeholder="$t('bodyPlaceholder')"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Headers -->
|
<!-- Headers -->
|
||||||
<div class="my-3">
|
<div class="my-3">
|
||||||
<label for="headers" class="form-label">{{ $t("Headers") }}</label>
|
<label for="headers" class="form-label">{{ $t("Headers") }}</label>
|
||||||
<textarea id="headers" v-model="monitor.headers" class="form-control" :placeholder="headersPlaceholder"></textarea>
|
<textarea id="headers" v-model="monitor.headers" class="form-control" :placeholder="$t('headersPlaceholder')"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
@ -339,20 +339,6 @@ export default {
|
||||||
return this.$root.baseURL + "/api/push/" + this.monitor.pushToken + "?msg=OK&ping=";
|
return this.$root.baseURL + "/api/push/" + this.monitor.pushToken + "?msg=OK&ping=";
|
||||||
},
|
},
|
||||||
|
|
||||||
bodyPlaceholder() {
|
|
||||||
return `Example:
|
|
||||||
{
|
|
||||||
"key": "value"
|
|
||||||
}`;
|
|
||||||
},
|
|
||||||
|
|
||||||
headersPlaceholder() {
|
|
||||||
return `Example:
|
|
||||||
{
|
|
||||||
"HeaderName": "HeaderValue"
|
|
||||||
}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue