Add info.serverTimezoneOffset and improve some styles

pull/1213/head
Louis Lam 2 years ago
parent f6bbd1ca67
commit 2271ac4a5a

4
package-lock.json generated

@ -1,12 +1,12 @@
{ {
"name": "uptime-kuma", "name": "uptime-kuma",
"version": "1.18.4", "version": "1.18.5",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "uptime-kuma", "name": "uptime-kuma",
"version": "1.18.4", "version": "1.18.5",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@louislam/sqlite3": "~15.0.6", "@louislam/sqlite3": "~15.0.6",

@ -8,6 +8,7 @@ const server = UptimeKumaServer.getInstance();
const io = server.io; const io = server.io;
const { setting } = require("./util-server"); const { setting } = require("./util-server");
const checkVersion = require("./check-version"); const checkVersion = require("./check-version");
const dayjs = require("dayjs");
/** /**
* Send list of notification providers to client * Send list of notification providers to client
@ -124,6 +125,7 @@ async function sendInfo(socket) {
latestVersion: checkVersion.latestVersion, latestVersion: checkVersion.latestVersion,
primaryBaseURL: await setting("primaryBaseURL"), primaryBaseURL: await setting("primaryBaseURL"),
serverTimezone: await server.getTimezone(), serverTimezone: await server.getTimezone(),
serverTimezoneOffset: dayjs().format("Z"),
}); });
} }

@ -101,6 +101,11 @@ optgroup {
} }
} }
// Override Bootstrap
.btn-group > .btn:hover {
z-index: initial;
}
.btn { .btn {
padding-left: 20px; padding-left: 20px;
padding-right: 20px; padding-right: 20px;

@ -5,7 +5,7 @@
<form @submit.prevent="submit"> <form @submit.prevent="submit">
<div class="shadow-box"> <div class="shadow-box">
<div class="row"> <div class="row">
<div class="col-xl-7"> <div class="col-xl-10">
<!-- Title --> <!-- Title -->
<div class="mb-3"> <div class="mb-3">
<label for="name" class="form-label">{{ $t("Title") }}</label> <label for="name" class="form-label">{{ $t("Title") }}</label>
@ -82,7 +82,7 @@
<h2 class="mt-5">{{ $t("Date and Time") }}</h2> <h2 class="mt-5">{{ $t("Date and Time") }}</h2>
<div> {{ $t("warningTimezone") }}: {{ $root.info.serverTimezone }}</div> <div> {{ $t("warningTimezone") }}: <mark>{{ $root.info.serverTimezone }} ({{ $root.info.serverTimezoneOffset }})</mark></div>
<!-- Strategy --> <!-- Strategy -->
<div class="my-3"> <div class="my-3">

@ -35,21 +35,23 @@
<div class="buttons"> <div class="buttons">
<router-link v-if="false" :to="maintenanceURL(item.id)" class="btn btn-light">{{ $t("Details") }}</router-link> <router-link v-if="false" :to="maintenanceURL(item.id)" class="btn btn-light">{{ $t("Details") }}</router-link>
<button v-if="item.active" class="btn btn-normal" @click="pauseDialog"> <div class="btn-group" role="group">
<font-awesome-icon icon="pause" /> {{ $t("Pause") }} <button v-if="item.active" class="btn btn-normal" @click="pauseDialog">
</button> <font-awesome-icon icon="pause" /> {{ $t("Pause") }}
</button>
<button v-if="!item.active" class="btn btn-primary" @click="resumeMaintenance">
<font-awesome-icon icon="play" /> {{ $t("Resume") }} <button v-if="!item.active" class="btn btn-primary" @click="resumeMaintenance">
</button> <font-awesome-icon icon="play" /> {{ $t("Resume") }}
</button>
<router-link :to="'/maintenance/edit/' + item.id" class="btn btn-normal">
<font-awesome-icon icon="edit" /> {{ $t("Edit") }} <router-link :to="'/maintenance/edit/' + item.id" class="btn btn-normal">
</router-link> <font-awesome-icon icon="edit" /> {{ $t("Edit") }}
</router-link>
<button class="btn btn-danger" @click="deleteDialog(item.id)">
<font-awesome-icon icon="trash" /> {{ $t("Delete") }} <button class="btn btn-danger" @click="deleteDialog(item.id)">
</button> <font-awesome-icon icon="trash" /> {{ $t("Delete") }}
</button>
</div>
</div> </div>
</div> </div>
</div> </div>

@ -363,7 +363,6 @@ function utcToISODateTime(input) {
return dayjs.utc(input).toISOString(); return dayjs.utc(input).toISOString();
} }
exports.utcToISODateTime = utcToISODateTime; exports.utcToISODateTime = utcToISODateTime;
/**
/** /**
* For SQL_DATETIME_FORMAT * For SQL_DATETIME_FORMAT
*/ */

@ -409,7 +409,6 @@ export function utcToISODateTime(input : string) {
return dayjs.utc(input).toISOString(); return dayjs.utc(input).toISOString();
} }
/**
/** /**
* For SQL_DATETIME_FORMAT * For SQL_DATETIME_FORMAT
*/ */

Loading…
Cancel
Save