Merge branch 'louislam:master' into master

This commit is contained in:
Ioma Taani 2021-11-10 12:13:29 +01:00 committed by GitHub
commit c71d84f1ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 58 additions and 45 deletions

View file

@ -1,7 +1,7 @@
name: 🚀 Feature Request
description: "Submit a proposal for a new feature"
#title: "[Feature] "
labels: [enhancement]
labels: [feature-request]
body:
- type: checkboxes
id: no-duplicate-issues

View file

@ -1,6 +1,6 @@
{
"name": "uptime-kuma",
"version": "1.10.1",
"version": "1.10.2",
"license": "MIT",
"repository": {
"type": "git",
@ -30,13 +30,13 @@
"build-docker": "npm run build-docker-debian && npm run build-docker-alpine",
"build-docker-alpine-base": "docker buildx build -f docker/alpine-base.dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:base-alpine . --push",
"build-docker-debian-base": "docker buildx build -f docker/debian-base.dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:base-debian . --push",
"build-docker-alpine": "docker buildx build -f docker/dockerfile-alpine --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:alpine -t louislam/uptime-kuma:1-alpine -t louislam/uptime-kuma:1.10.1-alpine --target release . --push",
"build-docker-debian": "docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma -t louislam/uptime-kuma:1 -t louislam/uptime-kuma:1.10.1 -t louislam/uptime-kuma:debian -t louislam/uptime-kuma:1-debian -t louislam/uptime-kuma:1.10.1-debian --target release . --push",
"build-docker-alpine": "docker buildx build -f docker/dockerfile-alpine --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:alpine -t louislam/uptime-kuma:1-alpine -t louislam/uptime-kuma:1.10.2-alpine --target release . --push",
"build-docker-debian": "docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma -t louislam/uptime-kuma:1 -t louislam/uptime-kuma:1.10.2 -t louislam/uptime-kuma:debian -t louislam/uptime-kuma:1-debian -t louislam/uptime-kuma:1.10.2-debian --target release . --push",
"build-docker-nightly": "docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly --target nightly . --push",
"build-docker-nightly-alpine": "docker buildx build -f docker/dockerfile-alpine --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:nightly-alpine --target nightly . --push",
"build-docker-nightly-amd64": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:nightly-amd64 --target nightly . --push --progress plain",
"upload-artifacts": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:upload-artifact --build-arg GITHUB_TOKEN --target upload-artifact . --progress plain",
"setup": "git checkout 1.10.1 && npm ci --production && npm run download-dist",
"setup": "git checkout 1.10.2 && npm ci --production && npm run download-dist",
"download-dist": "node extra/download-dist.js",
"update-version": "node extra/update-version.js",
"mark-as-nightly": "node extra/mark-as-nightly.js",

View file

@ -116,7 +116,7 @@ export default {
"Repeat Password": "Herhaal wachtwoord",
Export: "Exporteren",
Import: "Importeren",
respTime: "resp. tijd (ms)",
respTime: "reactietijd (ms)",
notAvailableShort: "N.v.t.",
"Default enabled": "Default enabled",
"Apply on all existing monitors": "Pas toe op alle bestaande monitors",
@ -138,48 +138,48 @@ export default {
"Two Factor Authentication": "Two Factor Authenticatie",
Active: "Actief",
Inactive: "Inactief",
"Also apply to existing monitors": "Also apply to existing monitors",
"Also apply to existing monitors": "Voeg ook toe aan bestaande monitors",
Token: "Token",
"Show URI": "Toon URI",
"Clear all statistics": "Wis alle statistieken",
retryCheckEverySecond: "Retry every {0} seconds.",
importHandleDescription: "Choose 'Skip existing' if you want to skip every monitor or notification with the same name. 'Overwrite' will delete every existing monitor and notification.",
confirmImportMsg: "Are you sure to import the backup? Please make sure you've selected the right import option.",
retryCheckEverySecond: "Probeer elke {0} seconden.",
importHandleDescription: "Kies 'Sla bestaande over' als je elke monitor of melding met dezelfde naam wilt overslaan. Kies 'Overschrijf' als je elke monitor of notificatie wilt verwijderen.",
confirmImportMsg: "Weet je zeker dat je dit bestand wilt importeren?",
"Heartbeat Retry Interval": "Heartbeat Retry Interval",
"Import Backup": "Import Backup",
"Export Backup": "Export Backup",
"Skip existing": "Skip existing",
Overwrite: "Overwrite",
Options: "Options",
"Keep both": "Keep both",
Tags: "Tags",
"Add New below or Select...": "Add New below or Select...",
"Tag with this name already exist.": "Tag with this name already exist.",
"Tag with this value already exist.": "Tag with this value already exist.",
color: "color",
"value (optional)": "value (optional)",
Gray: "Gray",
Red: "Red",
Orange: "Orange",
Green: "Green",
Blue: "Blue",
"Import Backup": "Importeer Backup",
"Export Backup": "Exporteer Backup",
"Skip existing": "Sla bestaande over",
Overwrite: "Overschrijf",
Options: "Opties",
"Keep both": "Bewaar beide",
Tags: "Labels",
"Add New below or Select...": "Voeg nieuwe toe of selecteer...",
"Tag with this name already exist.": "Label met deze naam bestaat al",
"Tag with this value already exist.": "Label met deze waarde bestaat al",
color: "Kleur",
"value (optional)": "waarde (optioneel)",
Gray: "Grijs",
Red: "Rood",
Orange: "Oranje",
Green: "Groen",
Blue: "Blauw",
Indigo: "Indigo",
Purple: "Purple",
Pink: "Pink",
"Search...": "Search...",
"Avg. Ping": "Avg. Ping",
"Avg. Response": "Avg. Response",
Purple: "Paars",
Pink: "Roze",
"Search...": "Zoeken...",
"Avg. Ping": "Gemiddelde Ping",
"Avg. Response": "Gemiddelde Response",
"Entry Page": "Entry Page",
statusPageNothing: "Nothing here, please add a group or a monitor.",
statusPageNothing: "Niets hier, voeg een groep of monitor toe.",
"No Services": "No Services",
"All Systems Operational": "All Systems Operational",
"Partially Degraded Service": "Partially Degraded Service",
"Degraded Service": "Degraded Service",
"Add Group": "Add Group",
"Add a monitor": "Add a monitor",
"Edit Status Page": "Edit Status Page",
"Go to Dashboard": "Go to Dashboard",
"Status Page": "Status Page",
"All Systems Operational": "Alle systemen operationeel",
"Partially Degraded Service": "Gedeeltelijk verminderde prestaties",
"Degraded Service": "Verminderde prestaties",
"Add Group": "Voeg groep toe",
"Add a monitor": "Voeg monitor toe",
"Edit Status Page": "Wijzig status pagina",
"Go to Dashboard": "Ga naar Dashboard",
"Status Page": "Status Pagina",
telegram: "Telegram",
webhook: "Webhook",
smtp: "Email (SMTP)",

View file

@ -1,5 +1,6 @@
import { io } from "socket.io-client";
import { useToast } from "vue-toastification";
import jwt_decode from "jwt-decode";
const toast = useToast();
let socket;
@ -217,6 +218,15 @@ export default {
return (this.remember) ? localStorage : sessionStorage;
},
getJWTPayload() {
const jwtToken = this.$root.storage().token;
if (jwtToken && jwtToken !== "autoLogin") {
return jwt_decode(jwtToken);
}
return undefined;
},
getSocket() {
return socket;
},

View file

@ -306,7 +306,7 @@
<p>这是为 <strong>有第三方认证</strong> 的用户提供的功能 Cloudflare Access</p>
<p>请谨慎使用</p>
</template>
<template v-else-if="$i18n.locale === 'zh-TW' ">
<p>你是否要<strong>取消登入驗證</strong></p>
<p>此功能是設計給已有<strong>第三方認證</strong>的使用者例如 Cloudflare Access</p>
@ -515,9 +515,11 @@ export default {
},
loadUsername() {
const jwtToken = this.$root.storage().token;
const jwtPayload = jwt_decode(jwtToken);
this.username = jwtPayload.username;
const jwtPayload = this.$root.getJWTPayload();
if (jwtPayload) {
this.username = jwtPayload.username;
}
},
loadSettings() {
@ -568,6 +570,7 @@ export default {
this.settings.disableAuth = false;
this.saveSettings();
this.$root.storage().removeItem("token");
location.reload();
},
downloadBackup() {