Skip to content

Commit 7ad9068

Browse files
committed
Merge branch 'master' into pomodoro
2 parents b6bf155 + afff0cd commit 7ad9068

File tree

13 files changed

+211
-11
lines changed

13 files changed

+211
-11
lines changed

src/_locales/de/messages.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,5 +366,15 @@
366366
"completelyBlocked": {
367367
"message": "Vollständig blockiert",
368368
"description": "Vollständig blockieren"
369+
},
370+
"tryMyOtherApps": {
371+
"message": "Probieren Sie meine anderen Apps aus"
372+
},
373+
"clearYoutube": {
374+
"message": "Clear YouTube",
375+
"description": "Chrome-Erweiterung, die YouTube-Shorts, empfohlene Videos, Kommentare, Feeds, Homepage-Empfehlungen und andere Ablenkungen ausblenden kann. Sieh dir YouTube ohne Ablenkungen an."
376+
},
377+
"darkTheme": {
378+
"message": "Dunkles Thema"
369379
}
370380
}

src/_locales/en/messages.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,5 +366,15 @@
366366
"completelyBlocked": {
367367
"message": "Completely Blocked",
368368
"description": "Completely Block"
369+
},
370+
"tryMyOtherApps": {
371+
"message": "Try my other apps"
372+
},
373+
"clearYoutube": {
374+
"message": "Clear YouTube",
375+
"description": "Chrome extension that can hide YouTube shorts, recomended videos, comments, feed, homepage recommendations and other distractions. Watch YouTube free of distractions."
376+
},
377+
"darkTheme": {
378+
"message": "Dark theme"
369379
}
370380
}

src/_locales/ru/messages.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,5 +367,15 @@
367367
"completelyBlocked": {
368368
"message": "Полностью заблокирован",
369369
"description": "Полностью заблокировать"
370+
},
371+
"tryMyOtherApps": {
372+
"message": "Попробуйте другие мои приложения"
373+
},
374+
"clearYoutube": {
375+
"message": "Clear YouTube",
376+
"description": "Расширение для Chrome, которое может скрывать шортс YouTube, рекомендуемые видео, комментарии, ленту новостей, рекомендации по домашней странице и другие отвлекающие факторы. Смотрите YouTube без отвлекающих факторов."
377+
},
378+
"darkTheme": {
379+
"message": "Темная тема"
370380
}
371381
}

src/_locales/zh_CN/messages.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,5 +366,15 @@
366366
"completelyBlocked": {
367367
"message": "完全封锁",
368368
"description": "完全封锁"
369+
},
370+
"tryMyOtherApps": {
371+
"message": "试试我的其他应用程序"
372+
},
373+
"clearYoutube": {
374+
"message": "Clear YouTube",
375+
"description": "Chrome扩展程序,可以隐藏YouTube短片,推荐视频,评论,feed,主页推荐和其他分心。 观看YouTube免费分心。"
376+
},
377+
"darkTheme": {
378+
"message": "黑暗主题"
369379
}
370380
}

src/assets/css/dark.css

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
color: white;
44
}
55
.dark .headerBlock .header {
6-
color: #ffffff;
6+
color: #ffffff !important;
77
}
88
.dark .headerBlock .icons-block a:hover{
99
filter: invert(40%) sepia(94%) saturate(3371%) hue-rotate(227deg) brightness(99%) contrast(92%);
@@ -24,7 +24,7 @@
2424
filter: invert(100%) sepia(17%) saturate(0%) hue-rotate(24deg) brightness(103%) contrast(102%);
2525
}
2626
.dark .stats-block .block p{
27-
color: #b9b9b9;
27+
color: #b9b9b9 !important;
2828
}
2929
.dark .stats-block .block .header {
3030
background-color: #595959;
@@ -35,14 +35,35 @@
3535
color: rgb(255 255 255);
3636
}
3737
.dark .stats-block.block p{
38-
color: #b9b9b9;
38+
color: #b9b9b9 !important;
3939
}
4040
.dark .expander-body{
41-
background-color: #595959;
41+
background-color: #595959 !important;
42+
}
43+
.dark .expander .header span{
44+
color: #b9b9b9 !important;
4245
}
4346
.dark .header span{
4447
color: rgb(255 255 255);
4548
}
49+
.dark .settings-tab label[name="tabName"] img{
50+
filter: invert(100%) sepia(17%) saturate(0%) hue-rotate(24deg) brightness(103%) contrast(102%);
51+
}
52+
.dark .settings-tab label[name="tabName"]{
53+
background-color: #303030 !important;
54+
}
55+
.dark .settings-content{
56+
background-color: #303030 !important;
57+
}
58+
.dark .app-block .title{
59+
color: black;
60+
}
61+
.dark .settings-tab label[name="tabName"]:hover, .dark [type='radio']:checked ~ label{
62+
background-color: #979797 !important;
63+
}
64+
.dark .container p.value{
65+
color: black;
66+
}
4667
.dark .review-block p{
4768
color:#303030;
4869
}

src/assets/css/dashboard.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ label {
283283
}
284284
.settings-tab label[name='tabName']:hover {
285285
background-color: #cccccc !important;
286-
border-radius: 10px;
286+
border-radius: 10px;
287287
}
288288
.settings-tab [type='radio'] {
289289
display: none;
Lines changed: 11 additions & 0 deletions
Loading

src/components/About.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<a :href="CHROME_STORE_REVIEW_URL" target="_blank">{{ t('review.message') }}</a></label
2323
>
2424
</div>
25+
<MyApps />
2526
</template>
2627

2728
<script lang="ts">
@@ -31,6 +32,7 @@ export default {
3132
</script>
3233

3334
<script lang="ts" setup>
35+
import MyApps from './MyApps.vue';
3436
import { useI18n } from 'vue-i18n';
3537
import { CHROME_STORE_SUPPORT_URL, CHROME_STORE_REVIEW_URL } from '../utils/chrome-url';
3638
const { t } = useI18n();

src/components/GeneralSettings.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</p>
3030
</label>
3131
</div>
32-
<!-- <div class="settings-item">
32+
<div class="settings-item">
3333
<label class="setting-header">
3434
<input
3535
type="checkbox"
@@ -38,10 +38,9 @@
3838
v-model="darkMode"
3939
@change="onChange(StorageParams.DARK_MODE, $event.target)"
4040
/>
41-
<span>Dark mode</span>
42-
<p class="description">Dark theme</p>
41+
<span>{{ t('darkTheme.message') }}</span>
4342
</label>
44-
</div> -->
43+
</div>
4544
<div class="settings-item">
4645
<label class="setting-header d-inline-block">{{ t('intervalInactivity.message') }} </label>
4746
<div class="d-inline-block ml-10">
@@ -156,6 +155,7 @@ import { FileType, useFile } from '../functions/useFile';
156155
import { useRemoveAllData } from '../functions/useRemoveAllData';
157156
import { injectTabsRepository } from '../repository/inject-tabs-repository';
158157
import { useRestoreData } from '../functions/useRestoreData';
158+
import { applyDarkMode } from '../utils/dark-mode';
159159
160160
const { t } = useI18n();
161161
@@ -202,6 +202,8 @@ async function onChange(storageParam: StorageParams, target: any) {
202202
storageParam,
203203
storageParam == StorageParams.INTERVAL_INACTIVITY ? Number(target.value) : target.checked,
204204
);
205+
206+
if (storageParam == StorageParams.DARK_MODE) applyDarkMode(target.checked);
205207
}
206208
207209
async function save(storageParam: StorageParams, value: any) {

src/components/ListWithTime.vue

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@
1010
/>
1111
<Favicon :type="TypeOfUrl.WebSite" :favicon="getFavicon(limit.domain)" />
1212
<span>{{ limit.domain }}</span>
13-
<p class="time-value">{{ t('limit.message') }} : {{ getTime(limit.time) }}</p>
13+
<div>
14+
<p class="time-value d-inline-block" v-if="!completelyBlocked(limit.time)">
15+
{{ t('limit.message') }} : {{ getTime(limit.time) }}
16+
</p>
17+
<p class="blocked" v-if="completelyBlocked(limit.time)">
18+
{{ t('completelyBlocked.message') }}
19+
</p>
20+
</div>
1421
</div>
1522
</li>
1623
</ul>
@@ -31,6 +38,18 @@
3138
@click="isEdit ? editItem() : addToList()"
3239
/>
3340
</div>
41+
<div class="mt-10" v-if="showCompletelyBlockValue">
42+
<label class="block-checkbox">
43+
<input
44+
type="checkbox"
45+
class="filled-in"
46+
id="viewTimeInBadge"
47+
v-model="isCheckedCompletelyBlocked"
48+
@change="completelyBlock"
49+
/>
50+
<span>{{ t('completelyBlocked.description') }}</span>
51+
</label>
52+
</div>
3453
</template>
3554

3655
<script lang="ts">
@@ -73,6 +92,15 @@ const time = ref<Time>({
7392
});
7493
const newWebsiteForList = ref<string>();
7594
const storageParam = ref<StorageParams>();
95+
const isCheckedCompletelyBlocked = computed(
96+
() => time.value != undefined && time.value.hours == 0 && time.value.minutes == 0,
97+
);
98+
const showCompletelyBlockValue = computed(
99+
() =>
100+
props.type == ListWithTime.Limits &&
101+
newWebsiteForList.value != undefined &&
102+
newWebsiteForList.value != '',
103+
);
76104
77105
onMounted(async () => {
78106
switch (props.type) {
@@ -112,6 +140,15 @@ function addToList() {
112140
}
113141
}
114142
143+
function completelyBlock() {
144+
time.value.hours = 0;
145+
time.value.minutes = 0;
146+
}
147+
148+
function completelyBlocked(time: number) {
149+
return props.type == ListWithTime.Limits && time == 0;
150+
}
151+
115152
function getTime(time: number) {
116153
const timeObj = convertSecondsToHHMM(time);
117154
return `${timeObj.hours}:${timeObj.minutes < 10 ? '0' + timeObj.minutes : timeObj.minutes}`;
@@ -171,4 +208,11 @@ async function save(value: any) {
171208
width: 120px;
172209
margin: 0 15px;
173210
}
211+
.blocked {
212+
display: inline-block;
213+
font-size: 13px;
214+
color: gray;
215+
margin-left: 55px;
216+
margin-top: 5px;
217+
}
174218
</style>

0 commit comments

Comments
 (0)