Skip to content

Commit a1e66df

Browse files
committed
Fix error after test migration data from old version
1 parent 79fc9f1 commit a1e66df

File tree

5 files changed

+16
-20
lines changed

5 files changed

+16
-20
lines changed

src/assets/css/general.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ select{
3636
.w-100{
3737
width: 100%;
3838
}
39-
.w-85{
40-
width: 85%;
39+
.w-80{
40+
width: 80%;
4141
}

src/components/ByDaysChart.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ const props = defineProps<{
3131
ChartJS.register(CategoryScale, LinearScale, BarElement, Title, Tooltip, Legend);
3232
const labelsForChart = props.data.days.map(x => x.day);
3333
const dataForChart = props.data.days.map(x => x.time);
34-
const maxTimeValue = dataForChart.sort((a, b) => b - a)[0];
35-
const tickStep = Math.round(maxTimeValue / 5 / 60) * 60;
34+
const tickStep = Math.round(dataForChart[0] / 5 / 600) * 600;
3635
3736
const data = {
3837
labels: labelsForChart,
@@ -65,7 +64,6 @@ const options = {
6564
scales: {
6665
y: {
6766
ticks: {
68-
max: maxTimeValue / 60,
6967
stepSize: tickStep,
7068
callback: function (value: any, index: number, ticks: number) {
7169
return convertSummaryTimeToString(value);

src/components/Favicon.vue

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
<template>
2-
<img
3-
v-if="favicon == undefined || favicon == ''"
4-
class="favicon no-favicon"
5-
height="22"
6-
:src="NO_FAVICON_URL"
7-
/>
8-
<img
9-
v-else
10-
class="favicon"
11-
height="30"
12-
:src="favicon"
13-
/>
2+
<img v-if="favIconValid" class="favicon no-favicon" height="22" :src="NO_FAVICON_URL" />
3+
<img v-else class="favicon" height="30" :src="favicon" />
144
</template>
155

166
<script lang="ts">
@@ -20,11 +10,19 @@ export default {
2010
</script>
2111

2212
<script lang="ts" setup>
13+
import { computed } from 'vue';
2314
import { NO_FAVICON_URL } from '../utils/consts';
2415
2516
const props = defineProps<{
2617
favicon: string | undefined;
2718
}>();
19+
20+
const favIconValid = computed(
21+
() =>
22+
props.favicon == undefined ||
23+
props.favicon == '' ||
24+
props.favicon.startsWith('chrome://favicon/'),
25+
);
2826
</script>
2927

3028
<style scoped>

src/components/TabItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Favicon :favicon="item.favicon" />
44
<div class="ml-10 flex-grow-2">
55
<div class="first-block">
6-
<div class="w-85">
6+
<div class="w-80">
77
<p class="url" @click="openUrl(item.url)">{{ url }}</p>
88
<div class="d-inline-block" v-html="getBadgeIcon()"></div>
99
</div>

src/compositions/tab-list-by-days.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ export async function useTabListByDays(dateFrom: Date, dateTo: Date): Promise<Ta
4141
});
4242
});
4343

44-
daysTabs = daysTabs.sort(function (a, b) {
44+
daysTabs.sort(function (a, b) {
4545
return new Date(a.day).valueOf() - new Date(b.day).valueOf();
4646
});
4747

4848
daysTabs.forEach(dayTab => {
49-
dayTab.tabs = dayTab.tabs.sort(function (a: CurrentTabItem, b: CurrentTabItem) {
49+
dayTab.tabs.sort(function (a: CurrentTabItem, b: CurrentTabItem) {
5050
return b.summaryTime - a.summaryTime;
5151
});
5252
});

0 commit comments

Comments
 (0)