Spaces:
Sleeping
Sleeping
format
Browse files- Dockerfile +2 -2
- static/index.html +0 -1
- static/json_viewer.css +31 -30
- static/script.js +3 -2
- static/style.css +13 -10
Dockerfile
CHANGED
@@ -22,7 +22,7 @@ USER user
|
|
22 |
|
23 |
# Set home to the user's home directory
|
24 |
ENV HOME=/home/user \
|
25 |
-
|
26 |
|
27 |
# Set the working directory to the user's home directory
|
28 |
WORKDIR $HOME/app
|
@@ -33,7 +33,7 @@ COPY --chown=user . $HOME/app
|
|
33 |
# Download and uzip truepic-sign from Google Drive
|
34 |
RUN pip install gdown
|
35 |
RUN --mount=type=secret,id=truepic_sign_gdoc_id,mode=0444,required=true \
|
36 |
-
|
37 |
RUN tar -xf truepic-sign-v0.3.1-ubuntu-20.04.tar.gz
|
38 |
RUN chmod +x truepic-sign
|
39 |
|
|
|
22 |
|
23 |
# Set home to the user's home directory
|
24 |
ENV HOME=/home/user \
|
25 |
+
PATH=/home/user/.local/bin:$PATH
|
26 |
|
27 |
# Set the working directory to the user's home directory
|
28 |
WORKDIR $HOME/app
|
|
|
33 |
# Download and uzip truepic-sign from Google Drive
|
34 |
RUN pip install gdown
|
35 |
RUN --mount=type=secret,id=truepic_sign_gdoc_id,mode=0444,required=true \
|
36 |
+
gdown --id $(cat /run/secrets/truepic_sign_gdoc_id)
|
37 |
RUN tar -xf truepic-sign-v0.3.1-ubuntu-20.04.tar.gz
|
38 |
RUN chmod +x truepic-sign
|
39 |
|
static/index.html
CHANGED
@@ -135,5 +135,4 @@
|
|
135 |
</div>
|
136 |
</section>
|
137 |
</body>
|
138 |
-
|
139 |
</html>
|
|
|
135 |
</div>
|
136 |
</section>
|
137 |
</body>
|
|
|
138 |
</html>
|
static/json_viewer.css
CHANGED
@@ -1,69 +1,70 @@
|
|
1 |
.json-viewer {
|
2 |
-
|
3 |
-
|
4 |
}
|
5 |
|
6 |
.json-viewer ul {
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
}
|
13 |
|
14 |
.json-viewer .hide {
|
15 |
-
|
16 |
}
|
17 |
|
18 |
.json-viewer .type-string {
|
19 |
-
|
20 |
}
|
21 |
|
22 |
.json-viewer .type-date {
|
23 |
-
|
24 |
}
|
25 |
|
26 |
.json-viewer .type-boolean {
|
27 |
-
|
28 |
-
|
29 |
}
|
30 |
|
31 |
.json-viewer .type-number {
|
32 |
-
|
33 |
}
|
34 |
|
35 |
-
.json-viewer .type-null,
|
36 |
-
|
|
|
37 |
}
|
38 |
|
39 |
.json-viewer a.list-link {
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
}
|
44 |
|
45 |
.json-viewer a.list-link:before {
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
}
|
53 |
|
54 |
.json-viewer a.list-link.collapsed:before {
|
55 |
-
|
56 |
}
|
57 |
|
58 |
.json-viewer a.list-link.empty:before {
|
59 |
-
|
60 |
}
|
61 |
|
62 |
.json-viewer .items-ph {
|
63 |
-
|
64 |
-
|
65 |
}
|
66 |
|
67 |
.json-viewer .items-ph:hover {
|
68 |
-
|
69 |
-
}
|
|
|
1 |
.json-viewer {
|
2 |
+
color: #000;
|
3 |
+
padding-left: 20px;
|
4 |
}
|
5 |
|
6 |
.json-viewer ul {
|
7 |
+
list-style-type: none;
|
8 |
+
margin: 0;
|
9 |
+
margin: 0 0 0 1px;
|
10 |
+
border-left: 1px dotted #ccc;
|
11 |
+
padding-left: 2em;
|
12 |
}
|
13 |
|
14 |
.json-viewer .hide {
|
15 |
+
display: none;
|
16 |
}
|
17 |
|
18 |
.json-viewer .type-string {
|
19 |
+
color: #0b7500;
|
20 |
}
|
21 |
|
22 |
.json-viewer .type-date {
|
23 |
+
color: #cb7500;
|
24 |
}
|
25 |
|
26 |
.json-viewer .type-boolean {
|
27 |
+
color: #1a01cc;
|
28 |
+
font-weight: bold;
|
29 |
}
|
30 |
|
31 |
.json-viewer .type-number {
|
32 |
+
color: #1a01cc;
|
33 |
}
|
34 |
|
35 |
+
.json-viewer .type-null,
|
36 |
+
.json-viewer .type-undefined {
|
37 |
+
color: #90a;
|
38 |
}
|
39 |
|
40 |
.json-viewer a.list-link {
|
41 |
+
color: #000;
|
42 |
+
text-decoration: none;
|
43 |
+
position: relative;
|
44 |
}
|
45 |
|
46 |
.json-viewer a.list-link:before {
|
47 |
+
color: #aaa;
|
48 |
+
content: "\25BC";
|
49 |
+
position: absolute;
|
50 |
+
display: inline-block;
|
51 |
+
width: 1em;
|
52 |
+
left: -1em;
|
53 |
}
|
54 |
|
55 |
.json-viewer a.list-link.collapsed:before {
|
56 |
+
content: "\25B6";
|
57 |
}
|
58 |
|
59 |
.json-viewer a.list-link.empty:before {
|
60 |
+
content: "";
|
61 |
}
|
62 |
|
63 |
.json-viewer .items-ph {
|
64 |
+
color: #aaa;
|
65 |
+
padding: 0 1em;
|
66 |
}
|
67 |
|
68 |
.json-viewer .items-ph:hover {
|
69 |
+
text-decoration: underline;
|
70 |
+
}
|
static/script.js
CHANGED
@@ -135,7 +135,7 @@ function setCertificateOutput(manifestStore = null) {
|
|
135 |
|
136 |
certificates.forEach((certificate, index) => {
|
137 |
var li = document.createElement("li");
|
138 |
-
if (index == 0) li.classList.add(
|
139 |
li.appendChild(document.createTextNode(certificate.transformed.commonName));
|
140 |
li.addEventListener("click", function (e) {
|
141 |
setCertificate(index);
|
@@ -231,6 +231,7 @@ function setCertificate(ind) {
|
|
231 |
document.querySelector(".details .expired").innerHTML = certificate.expired;
|
232 |
document.querySelector(".details .serialNumber").innerHTML =
|
233 |
certificate.serialNumber;
|
234 |
-
document.querySelector(".details .algorithm").innerHTML =
|
|
|
235 |
document.querySelector(".details .modulus").innerHTML = certificate.modulus;
|
236 |
}
|
|
|
135 |
|
136 |
certificates.forEach((certificate, index) => {
|
137 |
var li = document.createElement("li");
|
138 |
+
if (index == 0) li.classList.add("active");
|
139 |
li.appendChild(document.createTextNode(certificate.transformed.commonName));
|
140 |
li.addEventListener("click", function (e) {
|
141 |
setCertificate(index);
|
|
|
231 |
document.querySelector(".details .expired").innerHTML = certificate.expired;
|
232 |
document.querySelector(".details .serialNumber").innerHTML =
|
233 |
certificate.serialNumber;
|
234 |
+
document.querySelector(".details .algorithm").innerHTML =
|
235 |
+
certificate.algorithm;
|
236 |
document.querySelector(".details .modulus").innerHTML = certificate.modulus;
|
237 |
}
|
static/style.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
@import url(
|
2 |
|
3 |
body {
|
4 |
-
font-family:
|
5 |
}
|
6 |
|
7 |
section#header {
|
@@ -27,14 +27,15 @@ p {
|
|
27 |
display: block;
|
28 |
font-weight: 600;
|
29 |
font-size: 14px;
|
30 |
-
padding-bottom: .5rem;
|
31 |
}
|
32 |
|
33 |
-
select,
|
|
|
34 |
border: 1px solid rgba(227, 234, 240, 1);
|
35 |
margin-bottom: 1rem;
|
36 |
width: 100%;
|
37 |
-
padding: .5rem;
|
38 |
}
|
39 |
|
40 |
textarea {
|
@@ -94,7 +95,8 @@ textarea {
|
|
94 |
justify-content: center;
|
95 |
}
|
96 |
|
97 |
-
.output #image-container #placeholder,
|
|
|
98 |
width: 48px;
|
99 |
height: 48px;
|
100 |
align-self: center;
|
@@ -147,7 +149,8 @@ section.verification-details nav ul li a.active {
|
|
147 |
border-bottom-color: #1a6dff;
|
148 |
}
|
149 |
|
150 |
-
section.verification-details .verification,
|
|
|
151 |
margin: 2rem 2rem 2rem 10rem;
|
152 |
height: 480px;
|
153 |
background: #f7f9fa;
|
@@ -174,11 +177,11 @@ section.verification-details .certificate .details {
|
|
174 |
|
175 |
section.verification-details .certificate .details > div {
|
176 |
clear: both;
|
177 |
-
padding: .4rem 0;
|
178 |
}
|
179 |
|
180 |
section.verification-details .certificate .details strong {
|
181 |
-
padding: .5rem 0;
|
182 |
display: block;
|
183 |
color: black;
|
184 |
}
|
@@ -199,7 +202,7 @@ section.verification-details .certificate .details div label {
|
|
199 |
border: 1px solid #d8dfe5;
|
200 |
border-bottom: none;
|
201 |
list-style: none;
|
202 |
-
padding: .8rem 0 .8rem 1.5rem;
|
203 |
font-size: 14px;
|
204 |
}
|
205 |
|
|
|
1 |
+
@import url("https://fonts.cdnfonts.com/css/inter");
|
2 |
|
3 |
body {
|
4 |
+
font-family: "Inter", sans-serif;
|
5 |
}
|
6 |
|
7 |
section#header {
|
|
|
27 |
display: block;
|
28 |
font-weight: 600;
|
29 |
font-size: 14px;
|
30 |
+
padding-bottom: 0.5rem;
|
31 |
}
|
32 |
|
33 |
+
select,
|
34 |
+
textarea {
|
35 |
border: 1px solid rgba(227, 234, 240, 1);
|
36 |
margin-bottom: 1rem;
|
37 |
width: 100%;
|
38 |
+
padding: 0.5rem;
|
39 |
}
|
40 |
|
41 |
textarea {
|
|
|
95 |
justify-content: center;
|
96 |
}
|
97 |
|
98 |
+
.output #image-container #placeholder,
|
99 |
+
.output #image-container #spinner {
|
100 |
width: 48px;
|
101 |
height: 48px;
|
102 |
align-self: center;
|
|
|
149 |
border-bottom-color: #1a6dff;
|
150 |
}
|
151 |
|
152 |
+
section.verification-details .verification,
|
153 |
+
section.verification-details .certificate .details {
|
154 |
margin: 2rem 2rem 2rem 10rem;
|
155 |
height: 480px;
|
156 |
background: #f7f9fa;
|
|
|
177 |
|
178 |
section.verification-details .certificate .details > div {
|
179 |
clear: both;
|
180 |
+
padding: 0.4rem 0;
|
181 |
}
|
182 |
|
183 |
section.verification-details .certificate .details strong {
|
184 |
+
padding: 0.5rem 0;
|
185 |
display: block;
|
186 |
color: black;
|
187 |
}
|
|
|
202 |
border: 1px solid #d8dfe5;
|
203 |
border-bottom: none;
|
204 |
list-style: none;
|
205 |
+
padding: 0.8rem 0 0.8rem 1.5rem;
|
206 |
font-size: 14px;
|
207 |
}
|
208 |
|