From 686774a1824dbb43cb9f63e2a4ffe511841c8aaa Mon Sep 17 00:00:00 2001
From: realaravinth
Date: Sun, 9 May 2021 16:39:52 +0530
Subject: [PATCH] dom manipulations uses elements
---
.github/workflows/coverage.yml | 5 +-
.github/workflows/linux.yml | 2 +-
templates/_reset.scss | 4 +
templates/auth/css/main.scss | 2 +-
templates/components/_box.scss | 2 +-
templates/components/details-footers.html | 38 +++---
templates/components/details.scss | 11 +-
templates/components/footers.html | 2 +-
templates/components/headers.html | 38 +++++-
templates/index.ts | 11 +-
templates/main.scss | 64 ++++++++++
templates/panel/css/main.scss | 1 -
templates/panel/header/index.html | 2 +-
.../panel/{ => header}/taskbar/index.html | 0
.../panel/{ => header}/taskbar/main.scss | 6 +-
templates/panel/index.html | 2 +-
.../{header/sidebar => navbar}/index.html | 0
.../panel/{header/sidebar => navbar}/index.ts | 0
.../{header/sidebar => navbar}/main.scss | 17 +--
templates/panel/sitekey/add/css/main.scss | 2 +-
templates/panel/sitekey/add/index.html | 8 +-
.../panel/sitekey/add/ts/addLevelButton.ts | 109 +++++++++++-------
.../sitekey/add/ts/removeLevelButton/index.ts | 29 +++--
.../removeLevelButton.test.ts | 2 +-
.../ts/removeLevelButton/updateDom/index.ts | 4 +-
.../updateDom/updateInputs.test.ts | 3 +-
.../updateDom/updateInputs.ts | 4 +-
templates/panel/sitekey/list/index.html | 9 +-
templates/panel/sitekey/view/index.html | 7 +-
webpack.config.js | 6 +-
30 files changed, 262 insertions(+), 128 deletions(-)
create mode 100644 templates/main.scss
rename templates/panel/{ => header}/taskbar/index.html (100%)
rename templates/panel/{ => header}/taskbar/main.scss (93%)
rename templates/panel/{header/sidebar => navbar}/index.html (100%)
rename templates/panel/{header/sidebar => navbar}/index.ts (100%)
rename templates/panel/{header/sidebar => navbar}/main.scss (92%)
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index bfad3921..b5f2cc90 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -1,4 +1,4 @@
-name: CI (Linux)
+name: Coverage
on:
pull_request:
@@ -52,6 +52,9 @@ jobs:
- name: Install JavaScript Dependencies
run: yarn install
+ - name: Build frontend
+ run: yarn build
+
- name: Run the tests
run: yarn test
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
index 8996110f..10e29a2f 100644
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -1,4 +1,4 @@
-name: CI (Linux)
+name: Check Build
on:
pull_request:
diff --git a/templates/_reset.scss b/templates/_reset.scss
index a2539ca8..475eaac4 100644
--- a/templates/_reset.scss
+++ b/templates/_reset.scss
@@ -19,6 +19,9 @@
margin: 0;
padding: 0;
font-family: Arial, Helvetica, sans-serif;
+
+ // check all layouts
+ box-sizing: border-box;
}
a {
@@ -31,6 +34,7 @@ li {
html {
height: 100%;
+ box-sizing: border-box;
}
body {
diff --git a/templates/auth/css/main.scss b/templates/auth/css/main.scss
index 897d65b8..db27ab10 100644
--- a/templates/auth/css/main.scss
+++ b/templates/auth/css/main.scss
@@ -27,7 +27,7 @@ body {
.auth-inner-container {
@include inner-container;
flex-direction: column;
- margin: 0px, auto;
+ margin: auto;
width: $auth-content-width;
top: 50%;
left: 50%;
diff --git a/templates/components/_box.scss b/templates/components/_box.scss
index 3b82ddb1..b8edb0f6 100644
--- a/templates/components/_box.scss
+++ b/templates/components/_box.scss
@@ -33,7 +33,7 @@
width: 90%;
justify-content: center;
align-items: center;
- box-sizing: content-box;
+// box-sizing: content-box;
background-color: $white;
margin: auto;
padding-bottom: 30px;
diff --git a/templates/components/details-footers.html b/templates/components/details-footers.html
index 5d1811a3..ad576504 100644
--- a/templates/components/details-footers.html
+++ b/templates/components/details-footers.html
@@ -1,19 +1,19 @@
-
- - © 2021 mCAptcha Developers
-
- -
- Homepage
-
- -
- About
-
- -
- Thanks
-
- -
- Donate
-
- -
- v<.= crate::VERSION .>-<.= crate::GIT_COMMIT_HASH[0..8] .>
-
-
+
diff --git a/templates/components/details.scss b/templates/components/details.scss
index a41031c1..57094e16 100644
--- a/templates/components/details.scss
+++ b/templates/components/details.scss
@@ -18,27 +18,20 @@
.details {
list-style: none;
- position: absolute;
+ position: relative;
bottom: 0px;
box-sizing: border-box;
width: 95%;
display: flex;
font-size: 14px;
margin: auto;
-}
-
-.details__dummy-filler {
- flex: 10;
+ background-color: $backdrop;
}
.details__item {
margin: auto 10px;
}
-.details__item:first-child {
- flex: 4;
-}
-
.details__link {
color: $blue-link;
}
diff --git a/templates/components/footers.html b/templates/components/footers.html
index bf342415..60670481 100644
--- a/templates/components/footers.html
+++ b/templates/components/footers.html
@@ -1,5 +1,5 @@
-<. include!("./details-footers.html"); .>
+<. include!("./details-footers.html"); .>
+
+
diff --git a/templates/components/headers.html b/templates/components/headers.html
index cd0d6edd..6a32c2c2 100644
--- a/templates/components/headers.html
+++ b/templates/components/headers.html
@@ -2,7 +2,41 @@