@@ -95,7 +95,7 @@ div(:class="{'fixed-top-padding': fixedTopMenu}")
9595}
9696 </style >
9797
98- <script >
98+ <script lang="ts" >
9999// only import the icons you use to reduce bundle size
100100import ' vue-awesome/icons/calendar-day' ;
101101import ' vue-awesome/icons/calendar-week' ;
@@ -125,6 +125,7 @@ import _ from 'lodash';
125125import { mapState } from ' pinia' ;
126126import { useSettingsStore } from ' ~/stores/settings' ;
127127import { useBucketsStore } from ' ~/stores/buckets' ;
128+ import { IBucket } from ' ~/util/interfaces' ;
128129
129130export default {
130131 name: ' Header' ,
@@ -141,18 +142,18 @@ export default {
141142 mounted : async function () {
142143 const bucketStore = useBucketsStore ();
143144 await bucketStore .ensureLoaded ();
144- const buckets = bucketStore .buckets ;
145+ const buckets: IBucket [] = bucketStore .buckets ;
145146 const types_by_host = {};
146147
147148 const activityViews = [];
148149
149150 // TODO: Change to use same bucket detection logic as get_buckets/set_available in store/modules/activity.ts
150151 _ .each (buckets , v => {
151152 types_by_host [v .hostname ] = types_by_host [v .hostname ] || {};
152- // The '&& true;' is just to typecoerce into booleans
153- types_by_host[v .hostname ].afk | = v .type == ' afkstatus ' ;
154- types_by_host[ v . hostname ]. window |= v . type == ' currentwindow ' ;
155- types_by_host[v .hostname ].android |= v .type == ' currentwindow' && v .id .includes (' android' ); // Use other bucket type ID in the future
153+ types_by_host [ v . hostname ]. afk || = v . type == ' afkstatus ' ;
154+ types_by_host [v .hostname ].window || = v .type == ' currentwindow ' ;
155+ // TODO: Use other bucket type ID in the future
156+ types_by_host [v .hostname ].android || = v .type == ' currentwindow' && v .id .includes (' android' );
156157 });
157158 // console.log(types_by_host);
158159
@@ -166,7 +167,7 @@ export default {
166167 icon: ' desktop' ,
167168 });
168169 }
169- if (types . android ) {
170+ if (types [ ' android' ] ) {
170171 activityViews .push ({
171172 name: ` ${hostname } (Android) ` ,
172173 hostname: hostname ,
0 commit comments