Skip to content

Commit 2150352

Browse files
committed
Change color for dark mode
1 parent 611e9cc commit 2150352

File tree

6 files changed

+29
-9
lines changed

6 files changed

+29
-9
lines changed

src/assets/css/dark.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
.dark .expander.total {
4747
background-color: #6f6f6f !important;
4848
}
49+
.dark .url-list{
50+
border: 1px solid #494949 !important;
51+
}
4952
.dark .header span{
5053
color: rgb(255 255 255);
5154
}
@@ -62,8 +65,14 @@
6265
background-color: #303030 !important;
6366
border-left: 1px solid #494949 !important;
6467
}
68+
.dark .app-block{
69+
background-color: #919191 !important;
70+
}
6571
.dark .app-block .title{
66-
color: black;
72+
color: rgb(255, 255, 255);
73+
}
74+
.dark .app-block .description{
75+
color: white !important;
6776
}
6877
.dark .settings-tab label[name="tabName"]:hover, .dark [type='radio']:checked ~ label{
6978
background-color: #666666 !important;

src/assets/css/general.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ select {
7575
width: 100%;
7676
}
7777
input[type='button'] {
78-
background: #428bff;
78+
background: #5377af;
7979
color: #fff;
8080
border-radius: 7px;
8181
height: 36px;
@@ -91,7 +91,7 @@ input[type='button'] {
9191
}
9292

9393
input[type='button']:hover {
94-
background: #5c9dfe;
94+
background: #314158;
9595
text-decoration: none;
9696
}
9797

src/components/Dashboad.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function openChart(type: TypeOfChart) {
8787
}
8888
8989
.chart-btn.active {
90-
background-color: #428bff !important;
90+
background-color: #5377af !important;
9191
color: white;
9292
}
9393
</style>

src/components/MyApps.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ function openAppLink(app: App) {
7070
.description {
7171
margin-top: 10px;
7272
font-size: 14px;
73+
color: black;
7374
}
7475
img {
7576
margin: auto;

src/components/TimeIntervalChart.vue

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ export default {
2323
<script lang="ts" setup>
2424
import { onMounted, ref } from 'vue';
2525
import { injectStorage } from '../storage/inject-storage';
26-
import { StorageDeserializeParam } from '../storage/storage-params';
26+
import {
27+
DARK_MODE_DEFAULT,
28+
StorageDeserializeParam,
29+
StorageParams,
30+
} from '../storage/storage-params';
2731
import { TimeInterval } from '../entity/time-interval';
2832
import { todayLocalDate } from '../utils/date';
2933
import { useI18n } from 'vue-i18n';
@@ -43,6 +47,7 @@ const storage = injectStorage();
4347
const chart = ref<any>();
4448
const minValue = ref<number>();
4549
const todayIntervals = ref<TimeInterval[]>();
50+
const darkMode = ref();
4651
4752
type DataForChart = {
4853
domain: string;
@@ -56,6 +61,7 @@ onMounted(async () => {
5661
)) as TimeInterval[];
5762
5863
todayIntervals.value = timeIntervalList?.filter(x => x.day == todayLocalDate());
64+
darkMode.value = await storage.getValue(StorageParams.DARK_MODE, DARK_MODE_DEFAULT);
5965
renderChart();
6066
});
6167
@@ -157,12 +163,16 @@ function drawIntervalChart(data: DataForChart[]) {
157163
svg
158164
.append('g')
159165
.attr('class', 'grid')
160-
.style('color', '#e5e5e5')
166+
.style('color', darkMode.value ? '#797979' : '#e5e5e5')
161167
.attr('transform', `translate(0, ${height})`)
162168
.call(xAxis.tickSize(-height));
163169
164-
svg.append('g').attr('class', 'grid').style('color', '#e5e5e5').call(yAxis.tickSize(-width));
165-
svg.selectAll('text').style('fill', 'black');
170+
svg
171+
.append('g')
172+
.attr('class', 'grid')
173+
.style('color', darkMode.value ? '#797979' : '#e5e5e5')
174+
.call(yAxis.tickSize(-width));
175+
svg.selectAll('text').style('fill', '#797979');
166176
167177
//draw the bars, offset y and bar height based on data
168178
svg

src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 3,
33
"name": "__MSG_extName__",
44
"short_name": "Web Tracker",
5-
"version": "2.1.7",
5+
"version": "2.1.8",
66
"description": "__MSG_extDescription__",
77
"options_page": "src/dashboard.html",
88
"default_locale": "en",

0 commit comments

Comments
 (0)