Skip to content

Commit 40f461c

Browse files
author
Working On It
committed
fix: improve dark mode
1 parent 9ab754e commit 40f461c

File tree

4 files changed

+16
-23
lines changed

4 files changed

+16
-23
lines changed

web/src/ActivityPage.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,6 @@ class ActivityPage extends BaseListPage {
350350
showLoading={this.state["activities" + dataName] === undefined}
351351
loadingOption={{
352352
color: localStorage.getItem("themeColor"),
353-
textColor: "#000",
354-
maskColor: "rgba(255, 255, 255, 0.8)",
355353
fontSize: "16px",
356354
spinnerRadius: 6,
357355
lineWidth: 3,
@@ -386,8 +384,6 @@ class ActivityPage extends BaseListPage {
386384
showLoading={activitiesAction === undefined}
387385
loadingOption={{
388386
color: localStorage.getItem("themeColor"),
389-
textColor: "#000",
390-
maskColor: "rgba(255, 255, 255, 0.8)",
391387
fontSize: "16px",
392388
spinnerRadius: 6,
393389
lineWidth: 3,
@@ -408,8 +404,6 @@ class ActivityPage extends BaseListPage {
408404
showLoading={activitiesAction === undefined}
409405
loadingOption={{
410406
color: localStorage.getItem("themeColor"),
411-
textColor: "#000",
412-
maskColor: "rgba(255, 255, 255, 0.8)",
413407
fontSize: "16px",
414408
spinnerRadius: 6,
415409
lineWidth: 3,

web/src/App.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,10 @@ class App extends Component {
345345
return Setting.getLogo(themes);
346346
}
347347

348+
getFooterHtml(themes) {
349+
return Setting.getFooterHtml(themes);
350+
}
351+
348352
renderAvatar() {
349353
if (this.state.account.avatar === "") {
350354
return (
@@ -868,7 +872,7 @@ class App extends Component {
868872
height: "67px",
869873
}
870874
}>
871-
<div dangerouslySetInnerHTML={{__html: Conf.FooterHtml}} />
875+
<div dangerouslySetInnerHTML={{__html: this.getFooterHtml(this.state.themeAlgorithm)}} />
872876
</Footer>
873877
</React.Fragment>
874878
);

web/src/Setting.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2058,3 +2058,13 @@ export function getLogo(themes) {
20582058
return defaultLogoUrl;
20592059
}
20602060
}
2061+
2062+
export function getFooterHtml(themes) {
2063+
let FooterHtml = Conf.FooterHtml;
2064+
FooterHtml = FooterHtml.replace("https://cdn.casibase.org", Conf.StaticBaseUrl);
2065+
if (themes.includes("dark")) {
2066+
return FooterHtml.replace(/(\.png)/g, "_white$1");
2067+
} else {
2068+
return FooterHtml;
2069+
}
2070+
}

web/src/UsagePage.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,6 @@ class UsagePage extends BaseListPage {
521521
trigger: "axis",
522522
axisPointer: {
523523
type: "cross",
524-
crossStyle: {
525-
color: "#999",
526-
},
527524
},
528525
},
529526
legend: {
@@ -661,13 +658,10 @@ class UsagePage extends BaseListPage {
661658
height: "400px",
662659
width: "100%",
663660
display: "inline-block",
664-
backgroundColor: "#fff",
665661
}}
666662
showLoading={this.state.usages === null}
667663
loadingOption={{
668664
color: localStorage.getItem("themeColor"),
669-
textColor: "#000",
670-
maskColor: "rgba(255, 255, 255, 0.8)",
671665
fontSize: "16px",
672666
spinnerRadius: 6,
673667
lineWidth: 3,
@@ -683,13 +677,10 @@ class UsagePage extends BaseListPage {
683677
height: "400px",
684678
width: "100%",
685679
display: "inline-block",
686-
backgroundColor: "#fff",
687680
}}
688681
showLoading={this.state.usages === null}
689682
loadingOption={{
690683
color: localStorage.getItem("themeColor"),
691-
textColor: "#000",
692-
maskColor: "rgba(255, 255, 255, 0.8)",
693684
fontSize: "16px",
694685
spinnerRadius: 6,
695686
lineWidth: 3,
@@ -714,13 +705,10 @@ class UsagePage extends BaseListPage {
714705
height: "400px",
715706
width: "48%",
716707
display: "inline-block",
717-
backgroundColor: "#fff",
718708
}}
719709
showLoading={rangeUsages === null}
720710
loadingOption={{
721711
color: localStorage.getItem("themeColor"),
722-
textColor: "#000",
723-
maskColor: "rgba(255, 255, 255, 0.8)",
724712
fontSize: "16px",
725713
spinnerRadius: 6,
726714
lineWidth: 3,
@@ -734,13 +722,10 @@ class UsagePage extends BaseListPage {
734722
height: "400px",
735723
width: "48%",
736724
display: "inline-block",
737-
backgroundColor: "#fff",
738725
}}
739726
showLoading={rangeUsages === null}
740727
loadingOption={{
741728
color: localStorage.getItem("themeColor"),
742-
textColor: "#000",
743-
maskColor: "rgba(255, 255, 255, 0.8)",
744729
fontSize: "16px",
745730
spinnerRadius: 6,
746731
lineWidth: 3,
@@ -755,7 +740,7 @@ class UsagePage extends BaseListPage {
755740

756741
render() {
757742
return (
758-
<div style={{backgroundColor: "white"}}>
743+
<div>
759744
<Row style={{marginTop: "20px"}} >
760745
<Col span={1} />
761746
<Col span={17} >

0 commit comments

Comments
 (0)