Skip to content

Commit e899038

Browse files
authored
Merge pull request Stigmatoz#108 from Stigmatoz/time-chart
Time chart
2 parents 8669791 + c66387b commit e899038

File tree

20 files changed

+405
-49
lines changed

20 files changed

+405
-49
lines changed

src/_locales/de/messages.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
"message": "Im letzten Monat"
115115
},
116116
"generalSettings": {
117-
"message": "Grundlegende Einstellungen"
117+
"message": "Einstellungen"
118118
},
119119
"whiteListSettings": {
120120
"message": "Weiße Liste"
@@ -130,7 +130,7 @@
130130
},
131131
"viewTimeInBadge": {
132132
"message": "Zeitindikator anzeigen",
133-
"description": "Sie können die aktuellen Informationen zur verbrauchten Zeit im Kurzformat auf dem Erweiterungssymbol anzeigen"
133+
"description": "Sie können die aktuellen Informationen zur \"verbrauchten Zeit\" im Kurzformat anzeigen"
134134
},
135135
"deferringDescription": {
136136
"message": "Sie können die Sperre nur einmal während des Tages um 5 Minuten verschieben"
@@ -194,7 +194,7 @@
194194
"description": "Dieser Text wird in der Benachrichtigung für Websites angezeigt"
195195
},
196196
"notificationTimeSetting": {
197-
"message": "Zeigt eine Benachrichtigung an, die eine Zusammenfassung Ihrer täglichen Nutzung enthält"
197+
"message": "Benachrichtigungszeit mit zusammenfassenden Informationen zur täglichen Nutzung"
198198
},
199199
"github": {
200200
"message": "Wenn Sie eine Frage haben oder ein Problem melden möchten, können Sie dies tun"
@@ -225,5 +225,11 @@
225225
},
226226
"mostVisited": {
227227
"message": "Die meistbesuchte Website "
228+
},
229+
"dashboard": {
230+
"message": "Dashboard"
231+
},
232+
"timeChartDescription": {
233+
"message": "Dies ist eine stundenweise Zeitleiste für den Tag"
228234
}
229235
}

src/_locales/en/messages.json

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
"message": "Last month"
115115
},
116116
"generalSettings": {
117-
"message": "General Settings"
117+
"message": "Settings"
118118
},
119119
"whiteListSettings": {
120120
"message": "WhiteList"
@@ -137,10 +137,10 @@
137137
},
138138
"allowDeferringBlock": {
139139
"message": "Allow deferring block for 5 minutes",
140-
"description": "After the site is blocked, you can postpone the blocking for 5 minutes once during the day"
140+
"description": "After the site is blocked, you can postpone the blocking for 5 minutes during the day only once"
141141
},
142142
"intervalInactivity": {
143-
"message": "Stop the tracker if there is no action during:",
143+
"message": "Stop the tracker if there is no action for",
144144
"description": "These are any actions with the mouse or keyboard"
145145
},
146146
"exportToCsvSetting": {
@@ -172,8 +172,8 @@
172172
"message": "Enter notification message..."
173173
},
174174
"limits": {
175-
"message": "Daily restrictions on access to websites",
176-
"description": "Set the maximum time allowed to visit the site per day. After this time, the site will be blocked."
175+
"message": "Daily access restrictions for the websites",
176+
"description": "Set the maximum time allowed to visit the website per day. After this time, the site will be blocked."
177177
},
178178
"limitsTip": {
179179
"message": "If you set the blocking time to 0 hours 0 minutes, the website will be blocked immediately"
@@ -197,33 +197,39 @@
197197
"message": "Notification time with summary information about your daily usage"
198198
},
199199
"github": {
200-
"message": "If you have feedback or would like to report an issue, you can do so on the"
200+
"message": "Leave your feedback or report an issue on "
201201
},
202202
"question": {
203-
"message": "You can also ask questions or leave your suggestions here"
203+
"message": "You can also ask questions and leave your suggestions"
204204
},
205205
"supportForm": {
206206
"message": "support form"
207207
},
208208
"doYouEnjoy": {
209-
"message": "Do you enjoy using Web Activity Time Tracker?"
209+
"message": "Do you enjoy Web Activity Time Tracker?"
210210
},
211211
"review": {
212212
"message": "Leave a review!"
213213
},
214214
"block": {
215-
"message": "You've reached your limit today on "
215+
"message": "You've reached your limit for today on "
216216
},
217217
"5mins": {
218218
"message": "+ 5 minutes"
219219
},
220220
"todayUsageTime": {
221-
"message": "Today's total usage time "
221+
"message": "Total usage time for today "
222222
},
223223
"comparedToYesterday": {
224224
"message": " compared to yesterday "
225225
},
226226
"mostVisited": {
227227
"message": "Most visited website "
228+
},
229+
"dashboard": {
230+
"message": "Dashboard"
231+
},
232+
"timeChartDescription": {
233+
"message": "This is a chart of time during the day by the hour"
228234
}
229235
}

src/_locales/ru/messages.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
"message": "Последний месяц"
115115
},
116116
"generalSettings": {
117-
"message": "Основные настройки"
117+
"message": "Настройки"
118118
},
119119
"whiteListSettings": {
120120
"message": "Белый список"
@@ -176,7 +176,7 @@
176176
"description": "Установите максимальное время, разрешенное для посещения сайта в день. По истечении этого времени сайт будет заблокирован."
177177
},
178178
"limitsTip": {
179-
"message": "Если вы установите время блокировки равным 0 часам 0 минутам, сайт будет немедленно заблокирован"
179+
"message": "Если вы установите время блокировки на 0 часов 0 минут, сайт будет немедленно заблокирован"
180180
},
181181
"save": {
182182
"message": "Сохранить"
@@ -200,13 +200,13 @@
200200
"message": "Если \u0443 вас есть вопрос или вы хотели бы сообщить \u043E проблеме, вы можете сделать это на"
201201
},
202202
"question": {
203-
"message": "Также вы можете задать вопросы или оставить свои предложения здесь"
203+
"message": "Также вы можете задать вопросы или оставить свои предложения "
204204
},
205205
"supportForm": {
206206
"message": "поддержка"
207207
},
208208
"doYouEnjoy": {
209-
"message": "Вам нравится использовать Web Activity Time Tracker?"
209+
"message": "Вам нравится Web Activity Time Tracker?"
210210
},
211211
"review": {
212212
"message": "Оставьте отзыв!"
@@ -225,5 +225,11 @@
225225
},
226226
"mostVisited": {
227227
"message": "Самый посещаемый сайт "
228+
},
229+
"dashboard": {
230+
"message": "Дашборд"
231+
},
232+
"timeChartDescription": {
233+
"message": "Это график времени в течение дня по часам"
228234
}
229235
}

src/assets/css/dashboard.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ label {
288288
bottom: 0;
289289
padding: 50px;
290290
border-left: 1px solid #ccc;
291+
overflow-y: auto;
291292
}
292293
.settings-content span {
293294
animation: 0.5s ease-out 0s 1 slideInFromTop;

src/assets/css/general.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
:root {
2+
--main-color: #6ebf5d;
3+
--popup-header: #efefef;
4+
--progress-bar: #428bff;
5+
}
6+
7+
.no-data {
8+
text-align: center;
9+
font-size: 16px;
10+
font-weight: 600;
11+
margin-top: 30%;
12+
}
13+
114
.float-right {
215
float: right;
316
}

src/assets/css/main.css

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
:root {
2-
--main-color: #6ebf5d;
3-
--popup-header: #efefef;
4-
--progress-bar: #428bff;
5-
}
61
::-webkit-scrollbar-track {
72
border-radius: 10px;
83
background-color: #f5f5f5;
@@ -24,19 +19,14 @@ body {
2419
padding: 0;
2520
margin: 0;
2621
}
27-
.no-data {
28-
text-align: center;
29-
font-size: 16px;
30-
font-weight: 600;
31-
margin-top: 30%;
32-
}
3322
.tabs {
3423
}
3524
.tabs input[name='tab-control'] {
3625
display: none;
3726
}
3827
.tabs .content section h2,
3928
.tabs ul li label {
29+
4030
font-size: 15px;
4131
color: #428bff;
4232
}

src/assets/icons/dashboard.svg

Lines changed: 2 additions & 0 deletions
Loading

src/assets/icons/settings.svg

Lines changed: 2 additions & 2 deletions
Loading

src/components/BadgeIcons.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ const isLimit = computedAsync(async () => {
3131
}, false);
3232
3333
const showDocumentBadge = computed(() => props.type == TypeOfUrl.Document);
34-
const showLimitBadge = computed(() => props.listType == TypeOfList.Today && isLimit.value == true);
34+
const showLimitBadge = computed(
35+
() =>
36+
(props.listType == TypeOfList.Today || props.listType == TypeOfList.Dashboard) &&
37+
isLimit.value == true,
38+
);
3539
</script>
3640

3741
<style scoped>

src/components/Dashboad.vue

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<template>
2+
<div class="main">
3+
<div class="settings-item">
4+
<label class="setting-header"> {{ t('dashboard.message') }} </label>
5+
<p class="description">{{ t('timeChartDescription.message') }}</p>
6+
</div>
7+
<div class="chart chartByHours">
8+
<TimeIntervalChart />
9+
</div>
10+
<div class="chart mt-20">
11+
<TabList :type="TypeOfList.Dashboard" :showAllStats="false" />
12+
</div>
13+
</div>
14+
</template>
15+
16+
<script lang="ts">
17+
export default {
18+
name: 'Dashboard',
19+
};
20+
</script>
21+
22+
<script lang="ts" setup>
23+
import { useI18n } from 'vue-i18n';
24+
import TimeIntervalChart from './TimeIntervalChart.vue';
25+
import TabList from '../components/TabList.vue';
26+
import { TypeOfList } from '../utils/enums';
27+
28+
const { t } = useI18n();
29+
</script>
30+
31+
<style scoped>
32+
.main {
33+
width: 80%;
34+
margin: auto;
35+
}
36+
.chart {
37+
margin: 20px;
38+
width: 80%;
39+
}
40+
.chartByHours {
41+
height: 350px;
42+
}
43+
</style>

0 commit comments

Comments
 (0)