Skip to content

Commit

Permalink
Change color for dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Stigmatoz committed Oct 22, 2024
1 parent 611e9cc commit 2150352
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 9 deletions.
11 changes: 10 additions & 1 deletion src/assets/css/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
.dark .expander.total {
background-color: #6f6f6f !important;
}
.dark .url-list{
border: 1px solid #494949 !important;
}
.dark .header span{
color: rgb(255 255 255);
}
Expand All @@ -62,8 +65,14 @@
background-color: #303030 !important;
border-left: 1px solid #494949 !important;
}
.dark .app-block{
background-color: #919191 !important;
}
.dark .app-block .title{
color: black;
color: rgb(255, 255, 255);
}
.dark .app-block .description{
color: white !important;
}
.dark .settings-tab label[name="tabName"]:hover, .dark [type='radio']:checked ~ label{
background-color: #666666 !important;
Expand Down
4 changes: 2 additions & 2 deletions src/assets/css/general.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ select {
width: 100%;
}
input[type='button'] {
background: #428bff;
background: #5377af;
color: #fff;
border-radius: 7px;
height: 36px;
Expand All @@ -91,7 +91,7 @@ input[type='button'] {
}

input[type='button']:hover {
background: #5c9dfe;
background: #314158;
text-decoration: none;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/Dashboad.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function openChart(type: TypeOfChart) {
}
.chart-btn.active {
background-color: #428bff !important;
background-color: #5377af !important;
color: white;
}
</style>
1 change: 1 addition & 0 deletions src/components/MyApps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ function openAppLink(app: App) {
.description {
margin-top: 10px;
font-size: 14px;
color: black;
}
img {
margin: auto;
Expand Down
18 changes: 14 additions & 4 deletions src/components/TimeIntervalChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ export default {
<script lang="ts" setup>
import { onMounted, ref } from 'vue';
import { injectStorage } from '../storage/inject-storage';
import { StorageDeserializeParam } from '../storage/storage-params';
import {
DARK_MODE_DEFAULT,
StorageDeserializeParam,
StorageParams,
} from '../storage/storage-params';
import { TimeInterval } from '../entity/time-interval';
import { todayLocalDate } from '../utils/date';
import { useI18n } from 'vue-i18n';
Expand All @@ -43,6 +47,7 @@ const storage = injectStorage();
const chart = ref<any>();
const minValue = ref<number>();
const todayIntervals = ref<TimeInterval[]>();
const darkMode = ref();
type DataForChart = {
domain: string;
Expand All @@ -56,6 +61,7 @@ onMounted(async () => {
)) as TimeInterval[];
todayIntervals.value = timeIntervalList?.filter(x => x.day == todayLocalDate());
darkMode.value = await storage.getValue(StorageParams.DARK_MODE, DARK_MODE_DEFAULT);
renderChart();
});
Expand Down Expand Up @@ -157,12 +163,16 @@ function drawIntervalChart(data: DataForChart[]) {
svg
.append('g')
.attr('class', 'grid')
.style('color', '#e5e5e5')
.style('color', darkMode.value ? '#797979' : '#e5e5e5')
.attr('transform', `translate(0, ${height})`)
.call(xAxis.tickSize(-height));
svg.append('g').attr('class', 'grid').style('color', '#e5e5e5').call(yAxis.tickSize(-width));
svg.selectAll('text').style('fill', 'black');
svg
.append('g')
.attr('class', 'grid')
.style('color', darkMode.value ? '#797979' : '#e5e5e5')
.call(yAxis.tickSize(-width));
svg.selectAll('text').style('fill', '#797979');
//draw the bars, offset y and bar height based on data
svg
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "__MSG_extName__",
"short_name": "Web Tracker",
"version": "2.1.7",
"version": "2.1.8",
"description": "__MSG_extDescription__",
"options_page": "src/dashboard.html",
"default_locale": "en",
Expand Down

0 comments on commit 2150352

Please sign in to comment.