Skip to content

Commit d2c2a4a

Browse files
added created by field and minute cache for activity
1 parent bd59171 commit d2c2a4a

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/apis/apis.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export class APIService {
170170
return null;
171171
}
172172

173-
await this.cacheManager.set(`activity:${id}`, JSON.stringify(response.data), 1000 * 60 * 30);
173+
await this.cacheManager.set(`activity:${id}`, JSON.stringify(response.data), 1000 * 60);
174174
return response.data;
175175
}
176176
}

src/widget/views/index.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
}
2929
</style>
3030
<rect width="800" height="{{ height_ }}" style="fill: #1e1e1e;" />
31-
<rect width="685" height="40" x="115" style="fill: #252526;" />
31+
<rect width="685" height="40" x="107" style="fill: #252526;" />
3232
<rect width="1" height="{{ height }}" x="40" y="40" style="fill: #404040;" />
3333

3434
<text y="60" font-family="Consolas, monospace" class="indexes">
3535
{{{indexes}}}
3636
</text>
3737
<text y="25" class="filename" font-family="Segoe WPC, Segoe UI, sans-serif">
38-
<tspan style="fill: #ffd700;" font-family="Consolas, monospace">{}</tspan> stats.json
38+
<tspan style="fill: #ffd700;" font-family="Consolas, monospace">{}</tspan> info.json
3939
</text>
4040
<text y="60" font-family="Consolas, monospace" class="main_text">
4141
{{{json}}}

src/widget/widget.service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,13 @@ export class WidgetService {
126126
file: activity.activities[0].file ?? 'Idling',
127127
workplace: activity.activities[0].workplace ?? 'No workplace',
128128
duration: this.getTimeDiff(new Date(activity.activities[0].start_time))
129-
} : undefined
129+
} : undefined,
130+
created_by: "AndcoolSystems"
130131
}
131132
} catch (e) {
132133
json = {
133134
status: 'error',
134-
message: e
135+
message: e.message ?? "Unknown error. See server console."
135136
}
136137
}
137138
return this.parserService.parse(json, 30);

0 commit comments

Comments
 (0)