Skip to content

Commit 9504b4a

Browse files
committed
fix(css): file-modifications for backwards compatability with 7.0
1 parent b0ff85b commit 9504b4a

12 files changed

+28
-12
lines changed

api/src/unraid-api/unraid-file-modifier/modifications/__test__/snapshots/default-azure.css.modified.snapshot

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
html{font-family:clear-sans,sans-serif;font-size:62.5%;height:100%}
22
body{font-size:1.3rem;color:#606e7f;background-color:#e4e2e4;padding:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
3+
@layer default {
34
@scope (:root) to (.unapi) {
45
img{border:none;text-decoration:none;vertical-align:middle}
56
p{text-align:left}
@@ -274,4 +275,5 @@ a.bannerInfo {cursor:pointer;text-decoration:none}
274275
::-webkit-scrollbar-corner{background:lightgray;border-radius:10px}
275276
::-webkit-scrollbar-thumb:hover{background:gray}
276277

278+
}
277279
}

api/src/unraid-api/unraid-file-modifier/modifications/__test__/snapshots/default-black.css.modified.snapshot

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
html{font-family:clear-sans,sans-serif;font-size:62.5%;height:100%}
22
body{font-size:1.3rem;color:#f2f2f2;background-color:#1c1b1b;padding:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
3+
@layer default {
34
@scope (:root) to (.unapi) {
45
img{border:none;text-decoration:none;vertical-align:middle}
56
p{text-align:justify}
@@ -262,4 +263,5 @@ a.bannerInfo {cursor:pointer;text-decoration:none}
262263
::-webkit-scrollbar-corner{background:gray;border-radius:10px}
263264
::-webkit-scrollbar-thumb:hover{background:lightgray}
264265

266+
}
265267
}

api/src/unraid-api/unraid-file-modifier/modifications/__test__/snapshots/default-gray.css.modified.snapshot

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
html{font-family:clear-sans,sans-serif;font-size:62.5%;height:100%}
22
body{font-size:1.3rem;color:#606e7f;background-color:#1b1d1b;padding:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
3+
@layer default {
34
@scope (:root) to (.unapi) {
45
img{border:none;text-decoration:none;vertical-align:middle}
56
p{text-align:left}
@@ -274,4 +275,5 @@ a.bannerInfo {cursor:pointer;text-decoration:none}
274275
::-webkit-scrollbar-corner{background:gray;border-radius:10px}
275276
::-webkit-scrollbar-thumb:hover{background:lightgray}
276277

278+
}
277279
}

api/src/unraid-api/unraid-file-modifier/modifications/__test__/snapshots/default-white.css.modified.snapshot

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
html{font-family:clear-sans,sans-serif;font-size:62.5%;height:100%}
22
body{font-size:1.3rem;color:#1c1b1b;background-color:#f2f2f2;padding:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
3+
@layer default {
34
@scope (:root) to (.unapi) {
45
img{border:none;text-decoration:none;vertical-align:middle}
56
p{text-align:justify}
@@ -262,4 +263,5 @@ a.bannerInfo {cursor:pointer;text-decoration:none}
262263
::-webkit-scrollbar-corner{background:lightgray;border-radius:10px}
263264
::-webkit-scrollbar-thumb:hover{background:gray}
264265

266+
}
265267
}

api/src/unraid-api/unraid-file-modifier/modifications/default-azure-css.modification.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ export default class DefaultAzureCssModification extends FileModification {
5050
const before = source.slice(0, insertIndex);
5151
const after = source.slice(insertIndex);
5252

53-
return `${before}\n@scope (:root) to (.unapi) {${after}\n}`;
53+
return `${before}\n@layer default {\n@scope (:root) to (.unapi) {${after}\n}\n}`;
5454
}
5555
}

api/src/unraid-api/unraid-file-modifier/modifications/default-black-css.modification.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ export default class DefaultBlackCssModification extends FileModification {
5050
const before = source.slice(0, insertIndex);
5151
const after = source.slice(insertIndex);
5252

53-
return `${before}\n@scope (:root) to (.unapi) {${after}\n}`;
53+
return `${before}\n@layer default {\n@scope (:root) to (.unapi) {${after}\n}\n}`;
5454
}
5555
}

api/src/unraid-api/unraid-file-modifier/modifications/default-gray-css.modification.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ export default class DefaultGrayCssModification extends FileModification {
5050
const before = source.slice(0, insertIndex);
5151
const after = source.slice(insertIndex);
5252

53-
return `${before}\n@scope (:root) to (.unapi) {${after}\n}`;
53+
return `${before}\n@layer default {\n@scope (:root) to (.unapi) {${after}\n}\n}`;
5454
}
5555
}

api/src/unraid-api/unraid-file-modifier/modifications/default-white-css.modification.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ export default class DefaultWhiteCssModification extends FileModification {
5757
const before = source.slice(0, insertIndex);
5858
const after = source.slice(insertIndex);
5959

60-
return `${before}\n@scope (:root) to (.unapi) {${after}\n}`;
60+
return `${before}\n@layer default {\n@scope (:root) to (.unapi) {${after}\n}\n}`;
6161
}
6262
}

api/src/unraid-api/unraid-file-modifier/modifications/patches/default-azure-css-modification.patch

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,23 @@ Index: /usr/local/emhttp/plugins/dynamix/styles/default-azure.css
22
===================================================================
33
--- /usr/local/emhttp/plugins/dynamix/styles/default-azure.css original
44
+++ /usr/local/emhttp/plugins/dynamix/styles/default-azure.css modified
5-
@@ -1,7 +1,8 @@
5+
@@ -1,7 +1,9 @@
66
html{font-family:clear-sans,sans-serif;font-size:62.5%;height:100%}
77
body{font-size:1.3rem;color:#606e7f;background-color:#e4e2e4;padding:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
8+
+@layer default {
89
+@scope (:root) to (.unapi) {
910
img{border:none;text-decoration:none;vertical-align:middle}
1011
p{text-align:left}
1112
p.centered{text-align:left}
1213
p:empty{display:none}
1314
a:hover{text-decoration:underline}
14-
@@ -270,5 +271,7 @@
15+
@@ -270,5 +272,8 @@
1516
.bannerInfo::before {content:"\f05a";font-family:fontAwesome;color:#e68a00}
1617
::-webkit-scrollbar{width:8px;height:8px;background:transparent}
1718
::-webkit-scrollbar-thumb{background:lightgray;border-radius:10px}
1819
::-webkit-scrollbar-corner{background:lightgray;border-radius:10px}
1920
::-webkit-scrollbar-thumb:hover{background:gray}
2021
+
2122
+}
23+
+}
2224
\ No newline at end of file

api/src/unraid-api/unraid-file-modifier/modifications/patches/default-black-css-modification.patch

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,23 @@ Index: /usr/local/emhttp/plugins/dynamix/styles/default-black.css
22
===================================================================
33
--- /usr/local/emhttp/plugins/dynamix/styles/default-black.css original
44
+++ /usr/local/emhttp/plugins/dynamix/styles/default-black.css modified
5-
@@ -1,7 +1,8 @@
5+
@@ -1,7 +1,9 @@
66
html{font-family:clear-sans,sans-serif;font-size:62.5%;height:100%}
77
body{font-size:1.3rem;color:#f2f2f2;background-color:#1c1b1b;padding:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
8+
+@layer default {
89
+@scope (:root) to (.unapi) {
910
img{border:none;text-decoration:none;vertical-align:middle}
1011
p{text-align:justify}
1112
p.centered{text-align:left}
1213
p:empty{display:none}
1314
a:hover{text-decoration:underline}
14-
@@ -258,5 +259,7 @@
15+
@@ -258,5 +260,8 @@
1516
.bannerInfo::before {content:"\f05a";font-family:fontAwesome;color:#e68a00}
1617
::-webkit-scrollbar{width:8px;height:8px;background:transparent}
1718
::-webkit-scrollbar-thumb{background:gray;border-radius:10px}
1819
::-webkit-scrollbar-corner{background:gray;border-radius:10px}
1920
::-webkit-scrollbar-thumb:hover{background:lightgray}
2021
+
2122
+}
23+
+}
2224
\ No newline at end of file

0 commit comments

Comments
 (0)