diff --git a/src/assets/app.scss b/src/assets/app.scss
index 36150de4..bc9d2e8e 100644
--- a/src/assets/app.scss
+++ b/src/assets/app.scss
@@ -379,27 +379,33 @@ h2 {
[contenteditable=true] {
transition: all $easing-in 0.2s;
+ background-color: rgba(239, 239, 239, 0.7);
+ border-radius: 8px;
&:focus {
outline: 0 solid #eee;
+ background-color: rgba(245, 245, 245, 0.9);
}
- &:hover, &:focus {
- background-color: rgb(239, 239, 239);
-
- .dark & {
- background-color: rgba(239, 239, 239, 0.2);
- }
-
- border-radius: 8px;
+ &:hover {
+ background-color: rgba(239, 239, 239, 0.8);
}
+ .dark & {
+ background-color: rgba(239, 239, 239, 0.2);
+ }
+
+ /*
+
+
&::after {
margin-left: 5px;
content: "🖊️";
font-size: 13px;
color: #eee;
}
+ */
+
}
.action {
diff --git a/src/icon.js b/src/icon.js
index 5ff8f9ec..42335aa1 100644
--- a/src/icon.js
+++ b/src/icon.js
@@ -24,6 +24,7 @@ import {
faExclamationCircle,
faBullhorn,
faArrowsAltV,
+ faUnlink,
} from "@fortawesome/free-solid-svg-icons";
library.add(
@@ -47,6 +48,7 @@ library.add(
faExclamationCircle,
faBullhorn,
faArrowsAltV,
+ faUnlink,
);
export { FontAwesomeIcon };
diff --git a/src/pages/StatusPage.vue b/src/pages/StatusPage.vue
index eb487d9d..657fa71b 100644
--- a/src/pages/StatusPage.vue
+++ b/src/pages/StatusPage.vue
@@ -17,8 +17,6 @@
:noCircle="true"
:noSquare="false"
@crop-success="cropSuccess"
- @crop-upload-success="cropUploadSuccess"
- @crop-upload-fail="cropUploadFail"
/>
@@ -26,7 +24,7 @@
-
+
@@ -50,7 +48,7 @@
{{ $t("Discard") }}
-
+
{{ $t("Create Incident") }}
@@ -79,8 +77,39 @@
+
+
+
+
+
+
+
+
+
+ {{ $t("Post") }}
+
+
+
+
+ {{ $t("Cancel") }}
+
+
+
+
+
+
+ {{ $t("Edit") }}
+
+
+
+
+ {{ $t("Unpin") }}
+
+
+
+
-
+
All Systems Operational
@@ -98,19 +127,6 @@
-
-
-
Well done!
-
Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.
-
-
Whenever you need to, be sure to use margin utilities to keep things nice and tidy.
-
-
- Unpin
- Edit
-
-
-
@@ -175,6 +191,7 @@ export default {
data() {
return {
enableEditMode: false,
+ enableEditIncidentMode: false,
hasToken: false,
config: {},
selectedMonitor: null,
@@ -205,6 +222,10 @@ export default {
return this.enableEditMode && this.$root.socket.connected;
},
+ editIncidentMode() {
+ return this.editMode && this.enableEditIncidentMode;
+ },
+
isPublished() {
return this.config.statusPagePublished;
},
@@ -308,10 +329,9 @@ export default {
},
/**
- * Crop success
+ * Crop Success
*/
- cropSuccess(imgDataUrl, field) {
- console.log("-------- crop success --------");
+ cropSuccess(imgDataUrl) {
this.imgDataUrl = imgDataUrl;
},
@@ -319,6 +339,34 @@ export default {
if (this.editMode) {
this.showImageCropUpload = true;
}
+ },
+
+ createIncident() {
+ this.enableEditIncidentMode = true;
+ this.incident = {
+ title: "",
+ content: "",
+ };
+ },
+
+ postIncident() {
+ this.enableEditIncidentMode = false;
+ // TODO
+ },
+
+ editIncident() {
+ this.enableEditIncidentMode = true;
+ // TODO
+ },
+
+ cancelIncident() {
+ this.enableEditIncidentMode = false;
+ this.incident = null;
+ },
+
+ unpinIncident() {
+ this.incident = null;
+ // TODO
}
}
}
@@ -375,4 +423,10 @@ footer {
}
}
+.incident {
+ .content {
+ min-height: 60px;
+ }
+}
+
diff --git a/src/util.js b/src/util.js
index 14c68321..df2e14a7 100644
--- a/src/util.js
+++ b/src/util.js
@@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.getRandomInt = exports.getRandomArbitrary = exports.TimeLogger = exports.polyfill = exports.debug = exports.ucfirst = exports.sleep = exports.flipStatus = exports.PENDING = exports.UP = exports.DOWN = exports.appName = exports.isDev = void 0;
+exports.getRandomInt = exports.getRandomArbitrary = exports.TimeLogger = exports.polyfill = exports.debug = exports.ucfirst = exports.sleep = exports.flipStatus = exports.STATUS_PAGE_PARTIAL_DOWN = exports.STATUS_PAGE_ALL_UP = exports.STATUS_PAGE_ALL_DOWN = exports.PENDING = exports.UP = exports.DOWN = exports.appName = exports.isDev = void 0;
const _dayjs = require("dayjs");
const dayjs = _dayjs;
exports.isDev = process.env.NODE_ENV === "development";
@@ -8,6 +8,9 @@ exports.appName = "Uptime Kuma";
exports.DOWN = 0;
exports.UP = 1;
exports.PENDING = 2;
+exports.STATUS_PAGE_ALL_DOWN = 0;
+exports.STATUS_PAGE_ALL_UP = 1;
+exports.STATUS_PAGE_PARTIAL_DOWN = 2;
function flipStatus(s) {
if (s === exports.UP) {
return exports.DOWN;
diff --git a/src/util.ts b/src/util.ts
index 3b96f7b9..0fd8bbdb 100644
--- a/src/util.ts
+++ b/src/util.ts
@@ -12,6 +12,11 @@ export const DOWN = 0;
export const UP = 1;
export const PENDING = 2;
+export const STATUS_PAGE_ALL_DOWN = 0;
+export const STATUS_PAGE_ALL_UP = 1;
+export const STATUS_PAGE_PARTIAL_DOWN = 2;
+
+
export function flipStatus(s: number) {
if (s === UP) {
return DOWN;