Skip to content

Commit b6a649e

Browse files
committed
Add a new tab for time chart
1 parent 1ec08e3 commit b6a649e

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

src/pages/Dashboard.vue

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,27 @@
55
<img class="d-inline-block logo" height="30" src="../assets/icons/48x48.png" />
66
<p class="d-inline-block title">Web Activity Time Tracker</p>
77
</div>
8+
<!-- <p class="tab-separator">Dashboard</p> -->
89
<div class="settings-tab">
910
<input
1011
type="radio"
11-
id="general-tab"
12+
id="timeIntervalChart-tab"
1213
name="settings-group"
1314
checked
15+
v-on:change="selectTab(SettingsTab.TimeIntervalChart)"
16+
/>
17+
<label name="tabName" for="timeIntervalChart-tab">Today Time chart</label>
18+
19+
<div class="settings-content">
20+
<TimeIntervalChart v-if="selectedTab == SettingsTab.TimeIntervalChart" />
21+
</div>
22+
</div>
23+
<!-- <p class="tab-separator">Settings</p> -->
24+
<div class="settings-tab">
25+
<input
26+
type="radio"
27+
id="general-tab"
28+
name="settings-group"
1429
v-on:change="selectTab(SettingsTab.GeneralSettings)"
1530
/>
1631
<label name="tabName" for="general-tab">{{ t('generalSettings.message') }}</label>
@@ -83,6 +98,7 @@ import { useI18n } from 'vue-i18n';
8398
import GeneralSettings from '../components/GeneralSettings.vue';
8499
import WhiteList from '../components/WhiteList.vue';
85100
import Limits from '../components/Limits.vue';
101+
import TimeIntervalChart from '../components/TimeIntervalChart.vue';
86102
import DailyNotifications from '../components/Notifications.vue';
87103
import About from '../components/About.vue';
88104
import { SettingsTab } from '../utils/enums';
@@ -91,7 +107,7 @@ const { t } = useI18n();
91107
92108
const selectedTab = ref<SettingsTab>();
93109
94-
onMounted(() => (selectedTab.value = SettingsTab.GeneralSettings));
110+
onMounted(() => (selectedTab.value = SettingsTab.TimeIntervalChart));
95111
96112
function selectTab(value: SettingsTab) {
97113
selectedTab.value = value;
@@ -112,4 +128,9 @@ function selectTab(value: SettingsTab) {
112128
.header-block .logo {
113129
margin: 10px 20px;
114130
}
131+
.tab-separator {
132+
margin-left: 10px;
133+
font-size: 13px;
134+
font-weight: 600;
135+
}
115136
</style>

0 commit comments

Comments
 (0)