diff --git a/packages/app/browser/src/app.html b/packages/app/browser/src/app.html
index e5e02993..99e23733 100644
--- a/packages/app/browser/src/app.html
+++ b/packages/app/browser/src/app.html
@@ -8,21 +8,20 @@
-
- <- Back
-
code-server
-
- Enter server password
-
-
-
+
<- Back
+
code-server
+
+ Enter server password
+
+
+
+
diff --git a/packages/app/browser/src/app.scss b/packages/app/browser/src/app.scss
index 376befb9..8b504328 100644
--- a/packages/app/browser/src/app.scss
+++ b/packages/app/browser/src/app.scss
@@ -106,3 +106,16 @@ body {
// transition: 500ms opacity ease;
}
+
+#error-display {
+ box-sizing: border-box;
+ color: #bb2d0f;
+ font-size: 14px;
+ font-weight: 400;
+ letter-spacing: 0.3px;
+ line-height: 12px;
+ padding: 8px;
+ padding-bottom: 0;
+ padding-top: 20px;
+ text-align: center;
+}
diff --git a/packages/app/browser/src/app.ts b/packages/app/browser/src/app.ts
index ecb1a0f3..ddb35e7e 100644
--- a/packages/app/browser/src/app.ts
+++ b/packages/app/browser/src/app.ts
@@ -28,3 +28,14 @@ submit.addEventListener("click", () => {
document.cookie = `password=${password.value}`;
location.reload();
});
+
+/**
+ * Notify user on load of page if previous password was unsuccessful
+ */
+const reg = new RegExp(`password=(\\w+);?`);
+const matches = document.cookie.match(reg);
+const errorDisplay = document.getElementById("error-display") as HTMLDivElement;
+
+if (document.referrer === document.location.href && matches) {
+ errorDisplay.innerText = "Password is incorrect!";
+}
\ No newline at end of file