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 name: 🚀 Feature Request
description: "Submit a proposal for a new feature" description: "Submit a proposal for a new feature"
#title: "[Feature] " #title: "[Feature] "
labels: [enhancement] labels: [feature-request]
body: body:
- type: checkboxes - type: checkboxes
id: no-duplicate-issues id: no-duplicate-issues

View file

@ -1,6 +1,6 @@
{ {
"name": "uptime-kuma", "name": "uptime-kuma",
"version": "1.10.1", "version": "1.10.2",
"license": "MIT", "license": "MIT",
"repository": { "repository": {
"type": "git", "type": "git",
@ -30,13 +30,13 @@
"build-docker": "npm run build-docker-debian && npm run build-docker-alpine", "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-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-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-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.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-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": "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-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", "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", "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", "download-dist": "node extra/download-dist.js",
"update-version": "node extra/update-version.js", "update-version": "node extra/update-version.js",
"mark-as-nightly": "node extra/mark-as-nightly.js", "mark-as-nightly": "node extra/mark-as-nightly.js",

View file

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

View file

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

View file

@ -515,9 +515,11 @@ export default {
}, },
loadUsername() { loadUsername() {
const jwtToken = this.$root.storage().token; const jwtPayload = this.$root.getJWTPayload();
const jwtPayload = jwt_decode(jwtToken);
this.username = jwtPayload.username; if (jwtPayload) {
this.username = jwtPayload.username;
}
}, },
loadSettings() { loadSettings() {
@ -568,6 +570,7 @@ export default {
this.settings.disableAuth = false; this.settings.disableAuth = false;
this.saveSettings(); this.saveSettings();
this.$root.storage().removeItem("token"); this.$root.storage().removeItem("token");
location.reload();
}, },
downloadBackup() { downloadBackup() {