detached 4e23726

fix(systemviews): simplify history header layout

commit
4e23726143761692a1941f4a8ca047adb6b12bda
author
brice · · 2026-04-26 07:07 UTC
parent
d685499
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
7 files · +287 -478
M assets/systemviews/systemviews.css +41 -43
@@ -240,29 +240,6 @@ body {
240240 }
241241 }
242242
243-.sv-history-overview {
244- display: grid;
245- gap: 1rem;
246- align-items: start;
247-}
248-
249-.sv-history-overview > .sv-section {
250- min-width: 0;
251- height: 100%;
252-}
253-
254-@media (min-width: 720px) {
255- .sv-history-overview {
256- grid-template-columns: minmax(12rem, 3.8fr) minmax(0, 6.2fr);
257- }
258-}
259-
260-@media (min-width: 900px) {
261- .sv-history-overview {
262- grid-template-columns: minmax(13rem, 3fr) minmax(0, 7fr);
263- }
264-}
265-
266243 .sv-stat-grid {
267244 display: grid;
268245 grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
@@ -270,12 +247,6 @@ body {
270247 margin-top: 0.75rem;
271248 }
272249
273-.sv-history-overview .sv-stat-grid {
274- grid-template-columns: 1fr;
275- gap: 0.55rem;
276- margin-top: 0.5rem;
277-}
278-
279250 .sv-stat-card {
280251 display: grid;
281252 gap: 0.15rem;
@@ -285,10 +256,6 @@ body {
285256 background: var(--sv-surface-variant, #1d2129);
286257 }
287258
288-.sv-history-overview .sv-stat-card {
289- padding: 0.65rem 0.75rem;
290-}
291-
292259 .sv-stat-value {
293260 color: var(--sv-accent, #8ab4ff);
294261 font-size: 1.35rem;
@@ -307,28 +274,36 @@ body {
307274 .sv-domain-list {
308275 display: flex;
309276 flex-wrap: wrap;
310- gap: 0.5rem;
311- margin-top: 0.75rem;
277+ gap: 0.35rem;
278+ max-height: 4rem;
279+ margin-top: 0.5rem;
280+ overflow: hidden;
312281 }
313282
314283 .sv-domain-chip {
315- display: grid;
316- grid-template-columns: minmax(0, 1fr) auto;
317- gap: 0.5rem;
318- align-items: start;
319- min-width: 10.5rem;
320- padding: 0.55rem 0.65rem;
284+ display: inline-flex;
285+ gap: 0.35rem;
286+ align-items: center;
287+ max-width: 13rem;
288+ min-width: 0;
289+ padding: 0.25rem 0.35rem 0.25rem 0.5rem;
321290 border: 1px solid var(--sv-border, #2a313d);
322291 border-radius: var(--sv-radius-chip, 0.45rem);
323292 background: var(--sv-surface-variant, #1d2129);
324293 }
325294
326295 .sv-domain-chip-main {
327- display: grid;
328- gap: 0.15rem;
296+ display: inline-flex;
297+ gap: 0.3rem;
298+ align-items: baseline;
329299 min-width: 0;
330300 }
331301
302+.sv-domain-meta {
303+ flex: 0 0 auto;
304+ white-space: nowrap;
305+}
306+
332307 .sv-domain-meta,
333308 .sv-history-meta,
334309 .sv-history-url {
@@ -619,6 +594,7 @@ body {
619594
620595 .sv-filter-chip button,
621596 .sv-domain-filter,
597+.sv-domain-delete,
622598 .sv-icon-button {
623599 border: 0;
624600 background: transparent;
@@ -628,10 +604,32 @@ body {
628604 }
629605
630606 .sv-domain-filter {
607+ min-width: 0;
608+ overflow: hidden;
631609 color: var(--sv-text, #e8ebf0);
632610 font-weight: 700;
633611 padding: 0;
634612 text-align: left;
613+ text-overflow: ellipsis;
614+ white-space: nowrap;
615+}
616+
617+.sv-domain-delete {
618+ display: inline-grid;
619+ place-items: center;
620+ flex: 0 0 auto;
621+ width: 1rem;
622+ height: 1rem;
623+ padding: 0;
624+ border-radius: 999px;
625+ color: var(--sv-danger-text, #fecaca);
626+ font-size: 0.85rem;
627+ font-weight: 700;
628+ line-height: 1;
629+}
630+
631+.sv-domain-delete:hover {
632+ background: color-mix(in srgb, var(--sv-danger, #ef4444) 18%, transparent);
635633 }
636634
637635 .sv-icon-button {
@@ -240,29 +240,6 @@ body {
240 }240 }
241 }241 }
242 242
243-.sv-history-overview {
244- display: grid;
245- gap: 1rem;
246- align-items: start;
247-}
248-
249-.sv-history-overview > .sv-section {
250- min-width: 0;
251- height: 100%;
252-}
253-
254-@media (min-width: 720px) {
255- .sv-history-overview {
256- grid-template-columns: minmax(12rem, 3.8fr) minmax(0, 6.2fr);
257- }
258-}
259-
260-@media (min-width: 900px) {
261- .sv-history-overview {
262- grid-template-columns: minmax(13rem, 3fr) minmax(0, 7fr);
263- }
264-}
265-
266 .sv-stat-grid {243 .sv-stat-grid {
267 display: grid;244 display: grid;
268 grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));245 grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
@@ -270,12 +247,6 @@ body {
270 margin-top: 0.75rem;247 margin-top: 0.75rem;
271 }248 }
272 249
273-.sv-history-overview .sv-stat-grid {
274- grid-template-columns: 1fr;
275- gap: 0.55rem;
276- margin-top: 0.5rem;
277-}
278-
279 .sv-stat-card {250 .sv-stat-card {
280 display: grid;251 display: grid;
281 gap: 0.15rem;252 gap: 0.15rem;
@@ -285,10 +256,6 @@ body {
285 background: var(--sv-surface-variant, #1d2129);256 background: var(--sv-surface-variant, #1d2129);
286 }257 }
287 258
288-.sv-history-overview .sv-stat-card {
289- padding: 0.65rem 0.75rem;
290-}
291-
292 .sv-stat-value {259 .sv-stat-value {
293 color: var(--sv-accent, #8ab4ff);260 color: var(--sv-accent, #8ab4ff);
294 font-size: 1.35rem;261 font-size: 1.35rem;
@@ -307,28 +274,36 @@ body {
307 .sv-domain-list {274 .sv-domain-list {
308 display: flex;275 display: flex;
309 flex-wrap: wrap;276 flex-wrap: wrap;
310- gap: 0.5rem;277+ gap: 0.35rem;
311- margin-top: 0.75rem;278+ max-height: 4rem;
279+ margin-top: 0.5rem;
280+ overflow: hidden;
312 }281 }
313 282
314 .sv-domain-chip {283 .sv-domain-chip {
315- display: grid;284+ display: inline-flex;
316- grid-template-columns: minmax(0, 1fr) auto;285+ gap: 0.35rem;
317- gap: 0.5rem;286+ align-items: center;
318- align-items: start;287+ max-width: 13rem;
319- min-width: 10.5rem;288+ min-width: 0;
320- padding: 0.55rem 0.65rem;289+ padding: 0.25rem 0.35rem 0.25rem 0.5rem;
321 border: 1px solid var(--sv-border, #2a313d);290 border: 1px solid var(--sv-border, #2a313d);
322 border-radius: var(--sv-radius-chip, 0.45rem);291 border-radius: var(--sv-radius-chip, 0.45rem);
323 background: var(--sv-surface-variant, #1d2129);292 background: var(--sv-surface-variant, #1d2129);
324 }293 }
325 294
326 .sv-domain-chip-main {295 .sv-domain-chip-main {
327- display: grid;296+ display: inline-flex;
328- gap: 0.15rem;297+ gap: 0.3rem;
298+ align-items: baseline;
329 min-width: 0;299 min-width: 0;
330 }300 }
331 301
302+.sv-domain-meta {
303+ flex: 0 0 auto;
304+ white-space: nowrap;
305+}
306+
332 .sv-domain-meta,307 .sv-domain-meta,
333 .sv-history-meta,308 .sv-history-meta,
334 .sv-history-url {309 .sv-history-url {
@@ -619,6 +594,7 @@ body {
619 594
620 .sv-filter-chip button,595 .sv-filter-chip button,
621 .sv-domain-filter,596 .sv-domain-filter,
597+.sv-domain-delete,
622 .sv-icon-button {598 .sv-icon-button {
623 border: 0;599 border: 0;
624 background: transparent;600 background: transparent;
@@ -628,10 +604,32 @@ body {
628 }604 }
629 605
630 .sv-domain-filter {606 .sv-domain-filter {
607+ min-width: 0;
608+ overflow: hidden;
631 color: var(--sv-text, #e8ebf0);609 color: var(--sv-text, #e8ebf0);
632 font-weight: 700;610 font-weight: 700;
633 padding: 0;611 padding: 0;
634 text-align: left;612 text-align: left;
613+ text-overflow: ellipsis;
614+ white-space: nowrap;
615+}
616+
617+.sv-domain-delete {
618+ display: inline-grid;
619+ place-items: center;
620+ flex: 0 0 auto;
621+ width: 1rem;
622+ height: 1rem;
623+ padding: 0;
624+ border-radius: 999px;
625+ color: var(--sv-danger-text, #fecaca);
626+ font-size: 0.85rem;
627+ font-weight: 700;
628+ line-height: 1;
629+}
630+
631+.sv-domain-delete:hover {
632+ background: color-mix(in srgb, var(--sv-danger, #ef4444) 18%, transparent);
635 }633 }
636 634
637 .sv-icon-button {635 .sv-icon-button {
M internal/ui/systemviews/app.go +8 -6
@@ -513,10 +513,11 @@ func (a *App) loadHistoryLoadingRoute() {
513513 Error: a.historyError,
514514 Loading: true,
515515 }
516+ title := historyDocumentTitle(data)
516517 a.renderedHTML = renderAppFrame(renderedPage{
517518 route: RouteHistory,
518- title: "History — Loading",
519- subtitle: "Recent visits",
519+ title: title,
520+ subtitle: title,
520521 body: historyHTML(data),
521522 }, a.shellTheme)
522523 }
@@ -527,7 +528,7 @@ func (a *App) loadHistoryRoute(ctx context.Context) error {
527528 a.renderedHTML = renderAppFrame(renderedPage{
528529 route: a.currentRoute,
529530 title: routeDocumentTitle(RouteHistory),
530- subtitle: "Recent visits",
531+ subtitle: routeDocumentTitle(RouteHistory),
531532 body: placeholderHTML(a.currentRoute),
532533 }, a.shellTheme)
533534 return nil
@@ -585,7 +586,7 @@ func (a *App) renderHistoryRouteSnapshot(ctx context.Context, snapshot historyRo
585586 html: renderAppFrame(renderedPage{
586587 route: snapshot.route,
587588 title: routeDocumentTitle(RouteHistory),
588- subtitle: "Recent visits",
589+ subtitle: routeDocumentTitle(RouteHistory),
589590 body: placeholderHTML(snapshot.route),
590591 }, snapshot.shellTheme),
591592 }, nil
@@ -630,10 +631,11 @@ func (a *App) renderHistoryRouteSnapshot(ctx context.Context, snapshot historyRo
630631 Notice: snapshot.notice,
631632 Error: snapshot.error,
632633 }
634+ title := historyDocumentTitle(data)
633635 result.html = renderAppFrame(renderedPage{
634636 route: RouteHistory,
635- title: historyDocumentTitle(data),
636- subtitle: "Recent visits",
637+ title: title,
638+ subtitle: title,
637639 body: historyHTML(data),
638640 }, snapshot.shellTheme)
639641 return result, nil
@@ -513,10 +513,11 @@ func (a *App) loadHistoryLoadingRoute() {
513 Error: a.historyError,513 Error: a.historyError,
514 Loading: true,514 Loading: true,
515 }515 }
516+ title := historyDocumentTitle(data)
516 a.renderedHTML = renderAppFrame(renderedPage{517 a.renderedHTML = renderAppFrame(renderedPage{
517 route: RouteHistory,518 route: RouteHistory,
518- title: "History — Loading",519+ title: title,
519- subtitle: "Recent visits",520+ subtitle: title,
520 body: historyHTML(data),521 body: historyHTML(data),
521 }, a.shellTheme)522 }, a.shellTheme)
522 }523 }
@@ -527,7 +528,7 @@ func (a *App) loadHistoryRoute(ctx context.Context) error {
527 a.renderedHTML = renderAppFrame(renderedPage{528 a.renderedHTML = renderAppFrame(renderedPage{
528 route: a.currentRoute,529 route: a.currentRoute,
529 title: routeDocumentTitle(RouteHistory),530 title: routeDocumentTitle(RouteHistory),
530- subtitle: "Recent visits",531+ subtitle: routeDocumentTitle(RouteHistory),
531 body: placeholderHTML(a.currentRoute),532 body: placeholderHTML(a.currentRoute),
532 }, a.shellTheme)533 }, a.shellTheme)
533 return nil534 return nil
@@ -585,7 +586,7 @@ func (a *App) renderHistoryRouteSnapshot(ctx context.Context, snapshot historyRo
585 html: renderAppFrame(renderedPage{586 html: renderAppFrame(renderedPage{
586 route: snapshot.route,587 route: snapshot.route,
587 title: routeDocumentTitle(RouteHistory),588 title: routeDocumentTitle(RouteHistory),
588- subtitle: "Recent visits",589+ subtitle: routeDocumentTitle(RouteHistory),
589 body: placeholderHTML(snapshot.route),590 body: placeholderHTML(snapshot.route),
590 }, snapshot.shellTheme),591 }, snapshot.shellTheme),
591 }, nil592 }, nil
@@ -630,10 +631,11 @@ func (a *App) renderHistoryRouteSnapshot(ctx context.Context, snapshot historyRo
630 Notice: snapshot.notice,631 Notice: snapshot.notice,
631 Error: snapshot.error,632 Error: snapshot.error,
632 }633 }
634+ title := historyDocumentTitle(data)
633 result.html = renderAppFrame(renderedPage{635 result.html = renderAppFrame(renderedPage{
634 route: RouteHistory,636 route: RouteHistory,
635- title: historyDocumentTitle(data),637+ title: title,
636- subtitle: "Recent visits",638+ subtitle: title,
637 body: historyHTML(data),639 body: historyHTML(data),
638 }, snapshot.shellTheme)640 }, snapshot.shellTheme)
639 return result, nil641 return result, nil
M internal/ui/systemviews/app_test.go +5 -5
@@ -90,7 +90,7 @@ func TestAppLoadInitialHistoryRouteUsesStyledSections(t *testing.T) {
9090 assert.NotContains(t, app.renderedHTML, "<body")
9191 assert.Contains(t, app.renderedHTML, `class="sv-shell"`)
9292 assert.Contains(t, app.renderedHTML, `data-route="history"`)
93- assert.Contains(t, app.renderedHTML, `data-page-title="History — 1 entry"`)
93+ assert.Contains(t, app.renderedHTML, `data-page-title="History - 1 entry, 1 visit, 0 days"`)
9494 assert.Contains(t, app.renderedHTML, `sv-section`)
9595 assert.Contains(t, app.renderedHTML, `class="sv-list"`)
9696 }
@@ -110,10 +110,10 @@ func TestAppLoadInitialHistoryRouteShowsTotalStatsWithWindowedTimeline(t *testin
110110 require.NoError(t, app.LoadInitial(context.Background()))
111111 assert.True(t, history.statsCalled)
112112 assert.Contains(t, app.renderedHTML, "Loaded 2 items")
113- assert.Contains(t, app.renderedHTML, `data-page-title="History — 8904 entries"`)
114- assert.Contains(t, app.renderedHTML, `<span class="sv-stat-value">8904</span><span class="sv-stat-label">Entries</span>`)
115- assert.Contains(t, app.renderedHTML, `<span class="sv-stat-value">40947</span><span class="sv-stat-label">Visits</span>`)
116- assert.Contains(t, app.renderedHTML, `<span class="sv-stat-value">121</span><span class="sv-stat-label">Days</span>`)
113+ assert.Contains(t, app.renderedHTML, `data-page-title="History - 8904 entries, 40947 visits, 121 days"`)
114+ assert.Contains(t, app.renderedHTML, `<h1 class="sv-title">History - 8904 entries, 40947 visits, 121 days</h1>`)
115+ assert.NotContains(t, app.renderedHTML, `sv-history-summary`)
116+ assert.NotContains(t, app.renderedHTML, `sv-stat-value`)
117117 }
118118
119119 func TestAppRunMountsHistoryLoadingBeforeAsyncHydration(t *testing.T) {
@@ -90,7 +90,7 @@ func TestAppLoadInitialHistoryRouteUsesStyledSections(t *testing.T) {
90 assert.NotContains(t, app.renderedHTML, "<body")90 assert.NotContains(t, app.renderedHTML, "<body")
91 assert.Contains(t, app.renderedHTML, `class="sv-shell"`)91 assert.Contains(t, app.renderedHTML, `class="sv-shell"`)
92 assert.Contains(t, app.renderedHTML, `data-route="history"`)92 assert.Contains(t, app.renderedHTML, `data-route="history"`)
93- assert.Contains(t, app.renderedHTML, `data-page-title="History — 1 entry"`)93+ assert.Contains(t, app.renderedHTML, `data-page-title="History - 1 entry, 1 visit, 0 days"`)
94 assert.Contains(t, app.renderedHTML, `sv-section`)94 assert.Contains(t, app.renderedHTML, `sv-section`)
95 assert.Contains(t, app.renderedHTML, `class="sv-list"`)95 assert.Contains(t, app.renderedHTML, `class="sv-list"`)
96 }96 }
@@ -110,10 +110,10 @@ func TestAppLoadInitialHistoryRouteShowsTotalStatsWithWindowedTimeline(t *testin
110 require.NoError(t, app.LoadInitial(context.Background()))110 require.NoError(t, app.LoadInitial(context.Background()))
111 assert.True(t, history.statsCalled)111 assert.True(t, history.statsCalled)
112 assert.Contains(t, app.renderedHTML, "Loaded 2 items")112 assert.Contains(t, app.renderedHTML, "Loaded 2 items")
113- assert.Contains(t, app.renderedHTML, `data-page-title="History — 8904 entries"`)113+ assert.Contains(t, app.renderedHTML, `data-page-title="History - 8904 entries, 40947 visits, 121 days"`)
114- assert.Contains(t, app.renderedHTML, `<span class="sv-stat-value">8904</span><span class="sv-stat-label">Entries</span>`)114+ assert.Contains(t, app.renderedHTML, `<h1 class="sv-title">History - 8904 entries, 40947 visits, 121 days</h1>`)
115- assert.Contains(t, app.renderedHTML, `<span class="sv-stat-value">40947</span><span class="sv-stat-label">Visits</span>`)115+ assert.NotContains(t, app.renderedHTML, `sv-history-summary`)
116- assert.Contains(t, app.renderedHTML, `<span class="sv-stat-value">121</span><span class="sv-stat-label">Days</span>`)116+ assert.NotContains(t, app.renderedHTML, `sv-stat-value`)
117 }117 }
118 118
119 func TestAppRunMountsHistoryLoadingBeforeAsyncHydration(t *testing.T) {119 func TestAppRunMountsHistoryLoadingBeforeAsyncHydration(t *testing.T) {
M internal/ui/systemviews/history.templ +5 -32
@@ -12,14 +12,9 @@ templ HistoryView(data historyRenderData) {
1212 @Section("sv-history-controls", "Manage history") {
1313 @HistoryControls(data)
1414 }
15- <div class="sv-history-overview">
16- @Section("sv-history-summary", "History stats") {
17- @HistorySummary(data)
18- }
19- @Section("sv-history-domains", "Top domains") {
20- @HistoryDomains(data)
21- }
22- </div>
15+ @Section("sv-history-domains", "Top domains") {
16+ @HistoryDomains(data)
17+ }
2318 @Section("sv-history-timeline", "Recent visits") {
2419 @HistoryTimeline(data)
2520 }
@@ -57,28 +52,6 @@ templ HistoryControls(data historyRenderData) {
5752 </div>
5853 }
5954
60-templ HistorySummary(data historyRenderData) {
61- if historySummaryLoading(data) {
62- <div class="sv-stat-grid">
63- @LoadingCard("Entries")
64- @LoadingCard("Visits")
65- @LoadingCard("Days")
66- </div>
67- } else {
68- {{ entries, visits, days := historySummaryValues(data) }}
69- <div class="sv-stat-grid">
70- @HistoryStatCard("Entries", entries)
71- @HistoryStatCard("Visits", visits)
72- @HistoryStatCard("Days", days)
73- </div>
74- }
75-}
76-
77-
78-templ HistoryStatCard(label string, value int64) {
79- <div class="sv-stat-card"><span class="sv-stat-value">{ fmt.Sprintf("%d", value) }</span><span class="sv-stat-label">{ label }</span></div>
80-}
81-
8255 templ HistoryDomains(data historyRenderData) {
8356 if data.Loading {
8457 @LoadingPanel("Loading top domains…")
@@ -93,9 +66,9 @@ templ HistoryDomains(data historyRenderData) {
9366 <span class="sv-domain-chip">
9467 <span class="sv-domain-chip-main">
9568 <button type="button" class="sv-domain-filter" data-sv-action="history.filterDomain" data-domain={ domainKey }>{ displayDomain }</button>
96- <span class="sv-domain-meta">{ fmt.Sprintf("%d pages · %d visits", domain.PageCount, domain.TotalVisits) }</span>
69+ <span class="sv-domain-meta">{ fmt.Sprintf("%dp · %dv", domain.PageCount, domain.TotalVisits) }</span>
9770 </span>
98- <button type="button" class="sv-icon-button sv-danger" data-sv-action="history.deleteDomain" data-domain={ domainKey } data-sv-confirm={ "Delete all history for " + displayDomain + "?" } aria-label={ "Delete history for " + displayDomain }>@IconOnly(iconTrash, "Delete history for " + displayDomain)</button>
71+ <button type="button" class="sv-domain-delete" data-sv-action="history.deleteDomain" data-domain={ domainKey } data-sv-confirm={ "Delete all history for " + displayDomain + "?" } aria-label={ "Delete history for " + displayDomain }><span aria-hidden="true">×</span><span class="sv-sr-only">Delete history for { displayDomain }</span></button>
9972 </span>
10073 }
10174 }
@@ -12,14 +12,9 @@ templ HistoryView(data historyRenderData) {
12 @Section("sv-history-controls", "Manage history") {12 @Section("sv-history-controls", "Manage history") {
13 @HistoryControls(data)13 @HistoryControls(data)
14 }14 }
15- <div class="sv-history-overview">15+ @Section("sv-history-domains", "Top domains") {
16- @Section("sv-history-summary", "History stats") {16+ @HistoryDomains(data)
17- @HistorySummary(data)17+ }
18- }
19- @Section("sv-history-domains", "Top domains") {
20- @HistoryDomains(data)
21- }
22- </div>
23 @Section("sv-history-timeline", "Recent visits") {18 @Section("sv-history-timeline", "Recent visits") {
24 @HistoryTimeline(data)19 @HistoryTimeline(data)
25 }20 }
@@ -57,28 +52,6 @@ templ HistoryControls(data historyRenderData) {
57 </div>52 </div>
58 }53 }
59 54
60-templ HistorySummary(data historyRenderData) {
61- if historySummaryLoading(data) {
62- <div class="sv-stat-grid">
63- @LoadingCard("Entries")
64- @LoadingCard("Visits")
65- @LoadingCard("Days")
66- </div>
67- } else {
68- {{ entries, visits, days := historySummaryValues(data) }}
69- <div class="sv-stat-grid">
70- @HistoryStatCard("Entries", entries)
71- @HistoryStatCard("Visits", visits)
72- @HistoryStatCard("Days", days)
73- </div>
74- }
75-}
76-
77-
78-templ HistoryStatCard(label string, value int64) {
79- <div class="sv-stat-card"><span class="sv-stat-value">{ fmt.Sprintf("%d", value) }</span><span class="sv-stat-label">{ label }</span></div>
80-}
81-
82 templ HistoryDomains(data historyRenderData) {55 templ HistoryDomains(data historyRenderData) {
83 if data.Loading {56 if data.Loading {
84 @LoadingPanel("Loading top domains…")57 @LoadingPanel("Loading top domains…")
@@ -93,9 +66,9 @@ templ HistoryDomains(data historyRenderData) {
93 <span class="sv-domain-chip">66 <span class="sv-domain-chip">
94 <span class="sv-domain-chip-main">67 <span class="sv-domain-chip-main">
95 <button type="button" class="sv-domain-filter" data-sv-action="history.filterDomain" data-domain={ domainKey }>{ displayDomain }</button>68 <button type="button" class="sv-domain-filter" data-sv-action="history.filterDomain" data-domain={ domainKey }>{ displayDomain }</button>
96- <span class="sv-domain-meta">{ fmt.Sprintf("%d pages · %d visits", domain.PageCount, domain.TotalVisits) }</span>69+ <span class="sv-domain-meta">{ fmt.Sprintf("%dp · %dv", domain.PageCount, domain.TotalVisits) }</span>
97 </span>70 </span>
98- <button type="button" class="sv-icon-button sv-danger" data-sv-action="history.deleteDomain" data-domain={ domainKey } data-sv-confirm={ "Delete all history for " + displayDomain + "?" } aria-label={ "Delete history for " + displayDomain }>@IconOnly(iconTrash, "Delete history for " + displayDomain)</button>71+ <button type="button" class="sv-domain-delete" data-sv-action="history.deleteDomain" data-domain={ domainKey } data-sv-confirm={ "Delete all history for " + displayDomain + "?" } aria-label={ "Delete history for " + displayDomain }><span aria-hidden="true">×</span><span class="sv-sr-only">Delete history for { displayDomain }</span></button>
99 </span>72 </span>
100 }73 }
101 }74 }
M internal/ui/systemviews/history_actions.go +3 -2
@@ -235,10 +235,11 @@ func (a *App) handleHistoryLoadMore(ctx context.Context, event DOMAction) error
235235 if _, ok := dom.(DOMHistoryTimelineAppender); !ok {
236236 fullData := data
237237 fullData.Entries = a.historyEntries
238+ title := historyDocumentTitle(fullData)
238239 a.renderedHTML = renderAppFrame(renderedPage{
239240 route: RouteHistory,
240- title: historyDocumentTitle(fullData),
241- subtitle: "Recent visits",
241+ title: title,
242+ subtitle: title,
242243 body: historyHTML(fullData),
243244 }, a.shellTheme)
244245 fallbackHTML = a.renderedHTML
@@ -235,10 +235,11 @@ func (a *App) handleHistoryLoadMore(ctx context.Context, event DOMAction) error
235 if _, ok := dom.(DOMHistoryTimelineAppender); !ok {235 if _, ok := dom.(DOMHistoryTimelineAppender); !ok {
236 fullData := data236 fullData := data
237 fullData.Entries = a.historyEntries237 fullData.Entries = a.historyEntries
238+ title := historyDocumentTitle(fullData)
238 a.renderedHTML = renderAppFrame(renderedPage{239 a.renderedHTML = renderAppFrame(renderedPage{
239 route: RouteHistory,240 route: RouteHistory,
240- title: historyDocumentTitle(fullData),241+ title: title,
241- subtitle: "Recent visits",242+ subtitle: title,
242 body: historyHTML(fullData),243 body: historyHTML(fullData),
243 }, a.shellTheme)244 }, a.shellTheme)
244 fallbackHTML = a.renderedHTML245 fallbackHTML = a.renderedHTML
M internal/ui/systemviews/history_templ.go +212 -361
@@ -64,33 +64,7 @@ func HistoryView(data historyRenderData) templ.Component {
6464 if templ_7745c5c3_Err != nil {
6565 return templ_7745c5c3_Err
6666 }
67- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"sv-history-overview\">")
68- if templ_7745c5c3_Err != nil {
69- return templ_7745c5c3_Err
70- }
7167 templ_7745c5c3_Var3 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
72- templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
73- templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
74- if !templ_7745c5c3_IsBuffer {
75- defer func() {
76- templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
77- if templ_7745c5c3_Err == nil {
78- templ_7745c5c3_Err = templ_7745c5c3_BufErr
79- }
80- }()
81- }
82- ctx = templ.InitializeContext(ctx)
83- templ_7745c5c3_Err = HistorySummary(data).Render(ctx, templ_7745c5c3_Buffer)
84- if templ_7745c5c3_Err != nil {
85- return templ_7745c5c3_Err
86- }
87- return nil
88- })
89- templ_7745c5c3_Err = Section("sv-history-summary", "History stats").Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer)
90- if templ_7745c5c3_Err != nil {
91- return templ_7745c5c3_Err
92- }
93- templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
9468 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
9569 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
9670 if !templ_7745c5c3_IsBuffer {
@@ -108,15 +82,11 @@ func HistoryView(data historyRenderData) templ.Component {
10882 }
10983 return nil
11084 })
111- templ_7745c5c3_Err = Section("sv-history-domains", "Top domains").Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer)
112- if templ_7745c5c3_Err != nil {
113- return templ_7745c5c3_Err
114- }
115- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "</div>")
85+ templ_7745c5c3_Err = Section("sv-history-domains", "Top domains").Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer)
11686 if templ_7745c5c3_Err != nil {
11787 return templ_7745c5c3_Err
11888 }
119- templ_7745c5c3_Var5 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
89+ templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
12090 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
12191 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
12292 if !templ_7745c5c3_IsBuffer {
@@ -134,7 +104,7 @@ func HistoryView(data historyRenderData) templ.Component {
134104 }
135105 return nil
136106 })
137- templ_7745c5c3_Err = Section("sv-history-timeline", "Recent visits").Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer)
107+ templ_7745c5c3_Err = Section("sv-history-timeline", "Recent visits").Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer)
138108 if templ_7745c5c3_Err != nil {
139109 return templ_7745c5c3_Err
140110 }
@@ -158,25 +128,25 @@ func HistoryControls(data historyRenderData) templ.Component {
158128 }()
159129 }
160130 ctx = templ.InitializeContext(ctx)
161- templ_7745c5c3_Var6 := templ.GetChildren(ctx)
162- if templ_7745c5c3_Var6 == nil {
163- templ_7745c5c3_Var6 = templ.NopComponent
131+ templ_7745c5c3_Var5 := templ.GetChildren(ctx)
132+ if templ_7745c5c3_Var5 == nil {
133+ templ_7745c5c3_Var5 = templ.NopComponent
164134 }
165135 ctx = templ.ClearChildren(ctx)
166- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "<form class=\"sv-toolbar sv-history-search\" data-sv-action=\"history.search\"><label class=\"sv-search-label\"><span>Search</span> <input data-sv-history-search data-sv-autofocus name=\"query\" type=\"search\" value=\"")
136+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<form class=\"sv-toolbar sv-history-search\" data-sv-action=\"history.search\"><label class=\"sv-search-label\"><span>Search</span> <input data-sv-history-search data-sv-autofocus name=\"query\" type=\"search\" value=\"")
167137 if templ_7745c5c3_Err != nil {
168138 return templ_7745c5c3_Err
169139 }
170- var templ_7745c5c3_Var7 string
171- templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(data.Query)
140+ var templ_7745c5c3_Var6 string
141+ templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(data.Query)
172142 if templ_7745c5c3_Err != nil {
173- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 32, Col: 96}
143+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 27, Col: 96}
174144 }
175- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
145+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
176146 if templ_7745c5c3_Err != nil {
177147 return templ_7745c5c3_Err
178148 }
179- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "\" placeholder=\"Search title or URL\" autocomplete=\"off\" autofocus></label> <button class=\"sv-button\" type=\"submit\">")
149+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\" placeholder=\"Search title or URL\" autocomplete=\"off\" autofocus></label> <button class=\"sv-button\" type=\"submit\">")
180150 if templ_7745c5c3_Err != nil {
181151 return templ_7745c5c3_Err
182152 }
@@ -184,7 +154,7 @@ func HistoryControls(data historyRenderData) templ.Component {
184154 if templ_7745c5c3_Err != nil {
185155 return templ_7745c5c3_Err
186156 }
187- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "</button> <button class=\"sv-button sv-button-secondary\" type=\"button\" data-sv-action=\"history.clear\">")
157+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "</button> <button class=\"sv-button sv-button-secondary\" type=\"button\" data-sv-action=\"history.clear\">")
188158 if templ_7745c5c3_Err != nil {
189159 return templ_7745c5c3_Err
190160 }
@@ -192,49 +162,49 @@ func HistoryControls(data historyRenderData) templ.Component {
192162 if templ_7745c5c3_Err != nil {
193163 return templ_7745c5c3_Err
194164 }
195- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "</button></form>")
165+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "</button></form>")
196166 if templ_7745c5c3_Err != nil {
197167 return templ_7745c5c3_Err
198168 }
199169 if showHistoryFilters(data) {
200- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "<div class=\"sv-active-filters\">")
170+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "<div class=\"sv-active-filters\">")
201171 if templ_7745c5c3_Err != nil {
202172 return templ_7745c5c3_Err
203173 }
204174 if data.Query != "" {
205- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "<span class=\"sv-filter-chip\">Query: ")
175+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "<span class=\"sv-filter-chip\">Query: ")
206176 if templ_7745c5c3_Err != nil {
207177 return templ_7745c5c3_Err
208178 }
209- var templ_7745c5c3_Var8 string
210- templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(data.Query)
179+ var templ_7745c5c3_Var7 string
180+ templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(data.Query)
211181 if templ_7745c5c3_Err != nil {
212- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 40, Col: 52}
182+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 35, Col: 52}
213183 }
214- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
184+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
215185 if templ_7745c5c3_Err != nil {
216186 return templ_7745c5c3_Err
217187 }
218- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "</span> ")
188+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</span> ")
219189 if templ_7745c5c3_Err != nil {
220190 return templ_7745c5c3_Err
221191 }
222192 }
223193 if data.DomainFilter != "" {
224- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "<span class=\"sv-filter-chip\">Domain: ")
194+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "<span class=\"sv-filter-chip\">Domain: ")
225195 if templ_7745c5c3_Err != nil {
226196 return templ_7745c5c3_Err
227197 }
228- var templ_7745c5c3_Var9 string
229- templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(data.DomainFilter)
198+ var templ_7745c5c3_Var8 string
199+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(data.DomainFilter)
230200 if templ_7745c5c3_Err != nil {
231- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 43, Col: 60}
201+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 38, Col: 60}
232202 }
233- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
203+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
234204 if templ_7745c5c3_Err != nil {
235205 return templ_7745c5c3_Err
236206 }
237- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, " <button type=\"button\" data-sv-action=\"history.clearDomain\" aria-label=\"Clear domain filter\">")
207+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, " <button type=\"button\" data-sv-action=\"history.clearDomain\" aria-label=\"Clear domain filter\">")
238208 if templ_7745c5c3_Err != nil {
239209 return templ_7745c5c3_Err
240210 }
@@ -242,203 +212,79 @@ func HistoryControls(data historyRenderData) templ.Component {
242212 if templ_7745c5c3_Err != nil {
243213 return templ_7745c5c3_Err
244214 }
245- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "</button></span>")
215+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "</button></span>")
246216 if templ_7745c5c3_Err != nil {
247217 return templ_7745c5c3_Err
248218 }
249219 }
250- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "</div>")
220+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "</div>")
251221 if templ_7745c5c3_Err != nil {
252222 return templ_7745c5c3_Err
253223 }
254224 }
255- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "<div class=\"sv-history-actions-panel\"><div class=\"sv-button-row\" aria-label=\"History pagination\"><span class=\"sv-meta\">")
225+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "<div class=\"sv-history-actions-panel\"><div class=\"sv-button-row\" aria-label=\"History pagination\"><span class=\"sv-meta\">")
256226 if templ_7745c5c3_Err != nil {
257227 return templ_7745c5c3_Err
258228 }
259- var templ_7745c5c3_Var10 string
260- templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(historyShowingLabel(data))
229+ var templ_7745c5c3_Var9 string
230+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(historyShowingLabel(data))
261231 if templ_7745c5c3_Err != nil {
262- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 49, Col: 52}
232+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 44, Col: 52}
263233 }
264- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
234+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
265235 if templ_7745c5c3_Err != nil {
266236 return templ_7745c5c3_Err
267237 }
268- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "</span></div><div class=\"sv-button-row\" aria-label=\"History cleanup\"><span class=\"sv-meta\">Clean up</span> ")
238+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "</span></div><div class=\"sv-button-row\" aria-label=\"History cleanup\"><span class=\"sv-meta\">Clean up</span> ")
269239 if templ_7745c5c3_Err != nil {
270240 return templ_7745c5c3_Err
271241 }
272242 for _, item := range historyCleanupItems() {
273- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "<button type=\"button\" class=\"sv-danger-link\" data-sv-action=\"history.deleteRange\" data-range=\"")
274- if templ_7745c5c3_Err != nil {
275- return templ_7745c5c3_Err
276- }
277- var templ_7745c5c3_Var11 string
278- templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(item.RangeID)
279- if templ_7745c5c3_Err != nil {
280- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 54, Col: 111}
281- }
282- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
283- if templ_7745c5c3_Err != nil {
284- return templ_7745c5c3_Err
285- }
286- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "\" data-sv-confirm=\"")
287- if templ_7745c5c3_Err != nil {
288- return templ_7745c5c3_Err
289- }
290- var templ_7745c5c3_Var12 string
291- templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(item.Confirm)
292- if templ_7745c5c3_Err != nil {
293- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 54, Col: 144}
294- }
295- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
296- if templ_7745c5c3_Err != nil {
297- return templ_7745c5c3_Err
298- }
299- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "\">")
300- if templ_7745c5c3_Err != nil {
301- return templ_7745c5c3_Err
302- }
303- var templ_7745c5c3_Var13 string
304- templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(item.Label)
305- if templ_7745c5c3_Err != nil {
306- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 54, Col: 159}
307- }
308- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
309- if templ_7745c5c3_Err != nil {
310- return templ_7745c5c3_Err
311- }
312- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "</button>")
313- if templ_7745c5c3_Err != nil {
314- return templ_7745c5c3_Err
315- }
316- }
317- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "</div></div>")
318- if templ_7745c5c3_Err != nil {
319- return templ_7745c5c3_Err
320- }
321- return nil
322- })
323-}
324-
325-func HistorySummary(data historyRenderData) templ.Component {
326- return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
327- templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
328- if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
329- return templ_7745c5c3_CtxErr
330- }
331- templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
332- if !templ_7745c5c3_IsBuffer {
333- defer func() {
334- templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
335- if templ_7745c5c3_Err == nil {
336- templ_7745c5c3_Err = templ_7745c5c3_BufErr
337- }
338- }()
339- }
340- ctx = templ.InitializeContext(ctx)
341- templ_7745c5c3_Var14 := templ.GetChildren(ctx)
342- if templ_7745c5c3_Var14 == nil {
343- templ_7745c5c3_Var14 = templ.NopComponent
344- }
345- ctx = templ.ClearChildren(ctx)
346- if historySummaryLoading(data) {
347- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "<div class=\"sv-stat-grid\">")
243+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "<button type=\"button\" class=\"sv-danger-link\" data-sv-action=\"history.deleteRange\" data-range=\"")
348244 if templ_7745c5c3_Err != nil {
349245 return templ_7745c5c3_Err
350246 }
351- templ_7745c5c3_Err = LoadingCard("Entries").Render(ctx, templ_7745c5c3_Buffer)
247+ var templ_7745c5c3_Var10 string
248+ templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(item.RangeID)
352249 if templ_7745c5c3_Err != nil {
353- return templ_7745c5c3_Err
250+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 49, Col: 111}
354251 }
355- templ_7745c5c3_Err = LoadingCard("Visits").Render(ctx, templ_7745c5c3_Buffer)
252+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
356253 if templ_7745c5c3_Err != nil {
357254 return templ_7745c5c3_Err
358255 }
359- templ_7745c5c3_Err = LoadingCard("Days").Render(ctx, templ_7745c5c3_Buffer)
256+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "\" data-sv-confirm=\"")
360257 if templ_7745c5c3_Err != nil {
361258 return templ_7745c5c3_Err
362259 }
363- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "</div>")
260+ var templ_7745c5c3_Var11 string
261+ templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(item.Confirm)
364262 if templ_7745c5c3_Err != nil {
365- return templ_7745c5c3_Err
263+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 49, Col: 144}
366264 }
367- } else {
368- entries, visits, days := historySummaryValues(data)
369- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "<div class=\"sv-stat-grid\">")
265+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
370266 if templ_7745c5c3_Err != nil {
371267 return templ_7745c5c3_Err
372268 }
373- templ_7745c5c3_Err = HistoryStatCard("Entries", entries).Render(ctx, templ_7745c5c3_Buffer)
269+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\">")
374270 if templ_7745c5c3_Err != nil {
375271 return templ_7745c5c3_Err
376272 }
377- templ_7745c5c3_Err = HistoryStatCard("Visits", visits).Render(ctx, templ_7745c5c3_Buffer)
273+ var templ_7745c5c3_Var12 string
274+ templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(item.Label)
378275 if templ_7745c5c3_Err != nil {
379- return templ_7745c5c3_Err
276+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 49, Col: 159}
380277 }
381- templ_7745c5c3_Err = HistoryStatCard("Days", days).Render(ctx, templ_7745c5c3_Buffer)
278+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
382279 if templ_7745c5c3_Err != nil {
383280 return templ_7745c5c3_Err
384281 }
385- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "</div>")
282+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "</button>")
386283 if templ_7745c5c3_Err != nil {
387284 return templ_7745c5c3_Err
388285 }
389286 }
390- return nil
391- })
392-}
393-
394-func HistoryStatCard(label string, value int64) templ.Component {
395- return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
396- templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
397- if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
398- return templ_7745c5c3_CtxErr
399- }
400- templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
401- if !templ_7745c5c3_IsBuffer {
402- defer func() {
403- templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
404- if templ_7745c5c3_Err == nil {
405- templ_7745c5c3_Err = templ_7745c5c3_BufErr
406- }
407- }()
408- }
409- ctx = templ.InitializeContext(ctx)
410- templ_7745c5c3_Var15 := templ.GetChildren(ctx)
411- if templ_7745c5c3_Var15 == nil {
412- templ_7745c5c3_Var15 = templ.NopComponent
413- }
414- ctx = templ.ClearChildren(ctx)
415- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<div class=\"sv-stat-card\"><span class=\"sv-stat-value\">")
416- if templ_7745c5c3_Err != nil {
417- return templ_7745c5c3_Err
418- }
419- var templ_7745c5c3_Var16 string
420- templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", value))
421- if templ_7745c5c3_Err != nil {
422- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 79, Col: 81}
423- }
424- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
425- if templ_7745c5c3_Err != nil {
426- return templ_7745c5c3_Err
427- }
428- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "</span><span class=\"sv-stat-label\">")
429- if templ_7745c5c3_Err != nil {
430- return templ_7745c5c3_Err
431- }
432- var templ_7745c5c3_Var17 string
433- templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(label)
434- if templ_7745c5c3_Err != nil {
435- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 79, Col: 125}
436- }
437- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
438- if templ_7745c5c3_Err != nil {
439- return templ_7745c5c3_Err
440- }
441- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "</span></div>")
287+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "</div></div>")
442288 if templ_7745c5c3_Err != nil {
443289 return templ_7745c5c3_Err
444290 }
@@ -462,9 +308,9 @@ func HistoryDomains(data historyRenderData) templ.Component {
462308 }()
463309 }
464310 ctx = templ.InitializeContext(ctx)
465- templ_7745c5c3_Var18 := templ.GetChildren(ctx)
466- if templ_7745c5c3_Var18 == nil {
467- templ_7745c5c3_Var18 = templ.NopComponent
311+ templ_7745c5c3_Var13 := templ.GetChildren(ctx)
312+ if templ_7745c5c3_Var13 == nil {
313+ templ_7745c5c3_Var13 = templ.NopComponent
468314 }
469315 ctx = templ.ClearChildren(ctx)
470316 if data.Loading {
@@ -478,7 +324,7 @@ func HistoryDomains(data historyRenderData) templ.Component {
478324 return templ_7745c5c3_Err
479325 }
480326 } else {
481- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "<div class=\"sv-domain-list\">")
327+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "<div class=\"sv-domain-list\">")
482328 if templ_7745c5c3_Err != nil {
483329 return templ_7745c5c3_Err
484330 }
@@ -486,99 +332,104 @@ func HistoryDomains(data historyRenderData) templ.Component {
486332 if domain != nil && domain.Domain != "" {
487333 domainKey := historyDomainActionKey(domain)
488334 displayDomain := historyDomainDisplayLabel(domain)
489- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "<span class=\"sv-domain-chip\"><span class=\"sv-domain-chip-main\"><button type=\"button\" class=\"sv-domain-filter\" data-sv-action=\"history.filterDomain\" data-domain=\"")
335+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "<span class=\"sv-domain-chip\"><span class=\"sv-domain-chip-main\"><button type=\"button\" class=\"sv-domain-filter\" data-sv-action=\"history.filterDomain\" data-domain=\"")
490336 if templ_7745c5c3_Err != nil {
491337 return templ_7745c5c3_Err
492338 }
493- var templ_7745c5c3_Var19 string
494- templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(domainKey)
339+ var templ_7745c5c3_Var14 string
340+ templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(domainKey)
495341 if templ_7745c5c3_Err != nil {
496- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 95, Col: 115}
342+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 68, Col: 115}
497343 }
498- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
344+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
499345 if templ_7745c5c3_Err != nil {
500346 return templ_7745c5c3_Err
501347 }
502- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "\">")
348+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "\">")
503349 if templ_7745c5c3_Err != nil {
504350 return templ_7745c5c3_Err
505351 }
506- var templ_7745c5c3_Var20 string
507- templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(displayDomain)
352+ var templ_7745c5c3_Var15 string
353+ templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(displayDomain)
508354 if templ_7745c5c3_Err != nil {
509- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 95, Col: 133}
355+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 68, Col: 133}
510356 }
511- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
357+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
512358 if templ_7745c5c3_Err != nil {
513359 return templ_7745c5c3_Err
514360 }
515- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "</button> <span class=\"sv-domain-meta\">")
361+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "</button> <span class=\"sv-domain-meta\">")
516362 if templ_7745c5c3_Err != nil {
517363 return templ_7745c5c3_Err
518364 }
519- var templ_7745c5c3_Var21 string
520- templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d pages · %d visits", domain.PageCount, domain.TotalVisits))
365+ var templ_7745c5c3_Var16 string
366+ templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%dp · %dv", domain.PageCount, domain.TotalVisits))
521367 if templ_7745c5c3_Err != nil {
522- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 96, Col: 112}
368+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 69, Col: 101}
523369 }
524- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
370+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
525371 if templ_7745c5c3_Err != nil {
526372 return templ_7745c5c3_Err
527373 }
528- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</span></span> <button type=\"button\" class=\"sv-icon-button sv-danger\" data-sv-action=\"history.deleteDomain\" data-domain=\"")
374+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "</span></span> <button type=\"button\" class=\"sv-domain-delete\" data-sv-action=\"history.deleteDomain\" data-domain=\"")
529375 if templ_7745c5c3_Err != nil {
530376 return templ_7745c5c3_Err
531377 }
532- var templ_7745c5c3_Var22 string
533- templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(domainKey)
378+ var templ_7745c5c3_Var17 string
379+ templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(domainKey)
534380 if templ_7745c5c3_Err != nil {
535- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 98, Col: 122}
381+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 71, Col: 114}
536382 }
537- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
383+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
538384 if templ_7745c5c3_Err != nil {
539385 return templ_7745c5c3_Err
540386 }
541- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "\" data-sv-confirm=\"")
387+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\" data-sv-confirm=\"")
542388 if templ_7745c5c3_Err != nil {
543389 return templ_7745c5c3_Err
544390 }
545- var templ_7745c5c3_Var23 string
546- templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs("Delete all history for " + displayDomain + "?")
391+ var templ_7745c5c3_Var18 string
392+ templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs("Delete all history for " + displayDomain + "?")
547393 if templ_7745c5c3_Err != nil {
548- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 98, Col: 190}
394+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 71, Col: 182}
549395 }
550- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
396+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
551397 if templ_7745c5c3_Err != nil {
552398 return templ_7745c5c3_Err
553399 }
554- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "\" aria-label=\"")
400+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "\" aria-label=\"")
555401 if templ_7745c5c3_Err != nil {
556402 return templ_7745c5c3_Err
557403 }
558- var templ_7745c5c3_Var24 string
559- templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs("Delete history for " + displayDomain)
404+ var templ_7745c5c3_Var19 string
405+ templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs("Delete history for " + displayDomain)
560406 if templ_7745c5c3_Err != nil {
561- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 98, Col: 243}
407+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 71, Col: 235}
562408 }
563- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))
409+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
564410 if templ_7745c5c3_Err != nil {
565411 return templ_7745c5c3_Err
566412 }
567- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "\">")
413+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\"><span aria-hidden=\"true\">×</span><span class=\"sv-sr-only\">Delete history for ")
568414 if templ_7745c5c3_Err != nil {
569415 return templ_7745c5c3_Err
570416 }
571- templ_7745c5c3_Err = IconOnly(iconTrash, "Delete history for "+displayDomain).Render(ctx, templ_7745c5c3_Buffer)
417+ var templ_7745c5c3_Var20 string
418+ templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(displayDomain)
419+ if templ_7745c5c3_Err != nil {
420+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 71, Col: 331}
421+ }
422+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
572423 if templ_7745c5c3_Err != nil {
573424 return templ_7745c5c3_Err
574425 }
575- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "</button></span>")
426+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "</span></button></span>")
576427 if templ_7745c5c3_Err != nil {
577428 return templ_7745c5c3_Err
578429 }
579430 }
580431 }
581- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</div>")
432+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</div>")
582433 if templ_7745c5c3_Err != nil {
583434 return templ_7745c5c3_Err
584435 }
@@ -603,9 +454,9 @@ func HistoryTimeline(data historyRenderData) templ.Component {
603454 }()
604455 }
605456 ctx = templ.InitializeContext(ctx)
606- templ_7745c5c3_Var25 := templ.GetChildren(ctx)
607- if templ_7745c5c3_Var25 == nil {
608- templ_7745c5c3_Var25 = templ.NopComponent
457+ templ_7745c5c3_Var21 := templ.GetChildren(ctx)
458+ if templ_7745c5c3_Var21 == nil {
459+ templ_7745c5c3_Var21 = templ.NopComponent
609460 }
610461 ctx = templ.ClearChildren(ctx)
611462 if data.Loading {
@@ -614,7 +465,7 @@ func HistoryTimeline(data historyRenderData) templ.Component {
614465 return templ_7745c5c3_Err
615466 }
616467 } else {
617- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<div class=\"sv-history-timeline-list\" data-sv-history-timeline>")
468+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "<div class=\"sv-history-timeline-list\" data-sv-history-timeline>")
618469 if templ_7745c5c3_Err != nil {
619470 return templ_7745c5c3_Err
620471 }
@@ -634,7 +485,7 @@ func HistoryTimeline(data historyRenderData) templ.Component {
634485 if templ_7745c5c3_Err != nil {
635486 return templ_7745c5c3_Err
636487 }
637- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</div>")
488+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "</div>")
638489 if templ_7745c5c3_Err != nil {
639490 return templ_7745c5c3_Err
640491 }
@@ -659,9 +510,9 @@ func HistoryTimelineAppend(data historyRenderData) templ.Component {
659510 }()
660511 }
661512 ctx = templ.InitializeContext(ctx)
662- templ_7745c5c3_Var26 := templ.GetChildren(ctx)
663- if templ_7745c5c3_Var26 == nil {
664- templ_7745c5c3_Var26 = templ.NopComponent
513+ templ_7745c5c3_Var22 := templ.GetChildren(ctx)
514+ if templ_7745c5c3_Var22 == nil {
515+ templ_7745c5c3_Var22 = templ.NopComponent
665516 }
666517 ctx = templ.ClearChildren(ctx)
667518 templ_7745c5c3_Err = HistoryTimelineAppendGroups(data.Entries, data.AppendSkipFirstDate).Render(ctx, templ_7745c5c3_Buffer)
@@ -692,9 +543,9 @@ func HistoryTimelineGroups(entries []*entity.HistoryEntry, skipFirstDate string)
692543 }()
693544 }
694545 ctx = templ.InitializeContext(ctx)
695- templ_7745c5c3_Var27 := templ.GetChildren(ctx)
696- if templ_7745c5c3_Var27 == nil {
697- templ_7745c5c3_Var27 = templ.NopComponent
546+ templ_7745c5c3_Var23 := templ.GetChildren(ctx)
547+ if templ_7745c5c3_Var23 == nil {
548+ templ_7745c5c3_Var23 = templ.NopComponent
698549 }
699550 ctx = templ.ClearChildren(ctx)
700551 groups := groupHistoryEntries(entries)
@@ -724,28 +575,28 @@ func HistoryTimelineAppendGroups(entries []*entity.HistoryEntry, mergeFirstDate
724575 }()
725576 }
726577 ctx = templ.InitializeContext(ctx)
727- templ_7745c5c3_Var28 := templ.GetChildren(ctx)
728- if templ_7745c5c3_Var28 == nil {
729- templ_7745c5c3_Var28 = templ.NopComponent
578+ templ_7745c5c3_Var24 := templ.GetChildren(ctx)
579+ if templ_7745c5c3_Var24 == nil {
580+ templ_7745c5c3_Var24 = templ.NopComponent
730581 }
731582 ctx = templ.ClearChildren(ctx)
732583 groups := groupHistoryEntries(entries)
733584 for index, group := range groups {
734585 if index == 0 && group.Date == mergeFirstDate {
735- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<div data-sv-history-merge-date=\"")
586+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "<div data-sv-history-merge-date=\"")
736587 if templ_7745c5c3_Err != nil {
737588 return templ_7745c5c3_Err
738589 }
739- var templ_7745c5c3_Var29 string
740- templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(group.Date)
590+ var templ_7745c5c3_Var25 string
591+ templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(group.Date)
741592 if templ_7745c5c3_Err != nil {
742- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 138, Col: 47}
593+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 111, Col: 47}
743594 }
744- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
595+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
745596 if templ_7745c5c3_Err != nil {
746597 return templ_7745c5c3_Err
747598 }
748- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "\">")
599+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "\">")
749600 if templ_7745c5c3_Err != nil {
750601 return templ_7745c5c3_Err
751602 }
@@ -757,7 +608,7 @@ func HistoryTimelineAppendGroups(entries []*entity.HistoryEntry, mergeFirstDate
757608 }
758609 }
759610 }
760- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "</div>")
611+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</div>")
761612 if templ_7745c5c3_Err != nil {
762613 return templ_7745c5c3_Err
763614 }
@@ -788,48 +639,48 @@ func HistoryTimelineGroup(group historyTimelineGroup, showHeading bool) templ.Co
788639 }()
789640 }
790641 ctx = templ.InitializeContext(ctx)
791- templ_7745c5c3_Var30 := templ.GetChildren(ctx)
792- if templ_7745c5c3_Var30 == nil {
793- templ_7745c5c3_Var30 = templ.NopComponent
642+ templ_7745c5c3_Var26 := templ.GetChildren(ctx)
643+ if templ_7745c5c3_Var26 == nil {
644+ templ_7745c5c3_Var26 = templ.NopComponent
794645 }
795646 ctx = templ.ClearChildren(ctx)
796- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "<section class=\"sv-timeline-group\" data-sv-history-date=\"")
647+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<section class=\"sv-timeline-group\" data-sv-history-date=\"")
797648 if templ_7745c5c3_Err != nil {
798649 return templ_7745c5c3_Err
799650 }
800- var templ_7745c5c3_Var31 string
801- templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(group.Date)
651+ var templ_7745c5c3_Var27 string
652+ templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(group.Date)
802653 if templ_7745c5c3_Err != nil {
803- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 152, Col: 69}
654+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 125, Col: 69}
804655 }
805- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))
656+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
806657 if templ_7745c5c3_Err != nil {
807658 return templ_7745c5c3_Err
808659 }
809- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "\">")
660+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "\">")
810661 if templ_7745c5c3_Err != nil {
811662 return templ_7745c5c3_Err
812663 }
813664 if showHeading {
814- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "<h3>")
665+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "<h3>")
815666 if templ_7745c5c3_Err != nil {
816667 return templ_7745c5c3_Err
817668 }
818- var templ_7745c5c3_Var32 string
819- templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(group.Label)
669+ var templ_7745c5c3_Var28 string
670+ templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(group.Label)
820671 if templ_7745c5c3_Err != nil {
821- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 154, Col: 20}
672+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 127, Col: 20}
822673 }
823- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
674+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
824675 if templ_7745c5c3_Err != nil {
825676 return templ_7745c5c3_Err
826677 }
827- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "</h3>")
678+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</h3>")
828679 if templ_7745c5c3_Err != nil {
829680 return templ_7745c5c3_Err
830681 }
831682 }
832- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "<ul class=\"sv-list\">")
683+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<ul class=\"sv-list\">")
833684 if templ_7745c5c3_Err != nil {
834685 return templ_7745c5c3_Err
835686 }
@@ -841,7 +692,7 @@ func HistoryTimelineGroup(group historyTimelineGroup, showHeading bool) templ.Co
841692 }
842693 }
843694 }
844- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "</ul></section>")
695+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</ul></section>")
845696 if templ_7745c5c3_Err != nil {
846697 return templ_7745c5c3_Err
847698 }
@@ -865,40 +716,40 @@ func HistoryLoadMore(data historyRenderData) templ.Component {
865716 }()
866717 }
867718 ctx = templ.InitializeContext(ctx)
868- templ_7745c5c3_Var33 := templ.GetChildren(ctx)
869- if templ_7745c5c3_Var33 == nil {
870- templ_7745c5c3_Var33 = templ.NopComponent
719+ templ_7745c5c3_Var29 := templ.GetChildren(ctx)
720+ if templ_7745c5c3_Var29 == nil {
721+ templ_7745c5c3_Var29 = templ.NopComponent
871722 }
872723 ctx = templ.ClearChildren(ctx)
873- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "<div class=\"sv-history-load-more\" data-sv-history-load-more-container>")
724+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<div class=\"sv-history-load-more\" data-sv-history-load-more-container>")
874725 if templ_7745c5c3_Err != nil {
875726 return templ_7745c5c3_Err
876727 }
877728 if showHistoryLoadMore(data) {
878- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<button type=\"button\" class=\"sv-button sv-button-secondary\" data-sv-action=\"history.loadMore\" data-before=\"")
729+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "<button type=\"button\" class=\"sv-button sv-button-secondary\" data-sv-action=\"history.loadMore\" data-before=\"")
879730 if templ_7745c5c3_Err != nil {
880731 return templ_7745c5c3_Err
881732 }
882- var templ_7745c5c3_Var34 string
883- templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(historyLoadMoreCursor(data))
733+ var templ_7745c5c3_Var30 string
734+ templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(historyLoadMoreCursor(data))
884735 if templ_7745c5c3_Err != nil {
885- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 169, Col: 138}
736+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 142, Col: 138}
886737 }
887- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))
738+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
888739 if templ_7745c5c3_Err != nil {
889740 return templ_7745c5c3_Err
890741 }
891- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "\" data-sv-history-load-more>Load older visits</button>")
742+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "\" data-sv-history-load-more>Load older visits</button>")
892743 if templ_7745c5c3_Err != nil {
893744 return templ_7745c5c3_Err
894745 }
895746 } else if strings.TrimSpace(data.Query) == "" && countHistoryEntries(data.Entries) > 0 {
896- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "<p class=\"sv-meta\">End of history</p>")
747+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "<p class=\"sv-meta\">End of history</p>")
897748 if templ_7745c5c3_Err != nil {
898749 return templ_7745c5c3_Err
899750 }
900751 }
901- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "</div>")
752+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "</div>")
902753 if templ_7745c5c3_Err != nil {
903754 return templ_7745c5c3_Err
904755 }
@@ -922,162 +773,162 @@ func HistoryItem(entry *entity.HistoryEntry) templ.Component {
922773 }()
923774 }
924775 ctx = templ.InitializeContext(ctx)
925- templ_7745c5c3_Var35 := templ.GetChildren(ctx)
926- if templ_7745c5c3_Var35 == nil {
927- templ_7745c5c3_Var35 = templ.NopComponent
776+ templ_7745c5c3_Var31 := templ.GetChildren(ctx)
777+ if templ_7745c5c3_Var31 == nil {
778+ templ_7745c5c3_Var31 = templ.NopComponent
928779 }
929780 ctx = templ.ClearChildren(ctx)
930- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "<li class=\"sv-list-row\"><article class=\"sv-history-item\" data-sv-history-row data-history-id=\"")
781+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "<li class=\"sv-list-row\"><article class=\"sv-history-item\" data-sv-history-row data-history-id=\"")
931782 if templ_7745c5c3_Err != nil {
932783 return templ_7745c5c3_Err
933784 }
934- var templ_7745c5c3_Var36 string
935- templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", entry.ID))
785+ var templ_7745c5c3_Var32 string
786+ templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", entry.ID))
936787 if templ_7745c5c3_Err != nil {
937- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 178, Col: 100}
788+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 151, Col: 100}
938789 }
939- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))
790+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
940791 if templ_7745c5c3_Err != nil {
941792 return templ_7745c5c3_Err
942793 }
943- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "\"><div class=\"sv-history-content\">")
794+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "\"><div class=\"sv-history-content\">")
944795 if templ_7745c5c3_Err != nil {
945796 return templ_7745c5c3_Err
946797 }
947798 faviconURL := historyItemFaviconURL(entry)
948- var templ_7745c5c3_Var37 = []any{historyFaviconClass(faviconURL)}
949- templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var37...)
799+ var templ_7745c5c3_Var33 = []any{historyFaviconClass(faviconURL)}
800+ templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var33...)
950801 if templ_7745c5c3_Err != nil {
951802 return templ_7745c5c3_Err
952803 }
953- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "<span class=\"")
804+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "<span class=\"")
954805 if templ_7745c5c3_Err != nil {
955806 return templ_7745c5c3_Err
956807 }
957- var templ_7745c5c3_Var38 string
958- templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var37).String())
808+ var templ_7745c5c3_Var34 string
809+ templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var33).String())
959810 if templ_7745c5c3_Err != nil {
960811 return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 1, Col: 0}
961812 }
962- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38))
813+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))
963814 if templ_7745c5c3_Err != nil {
964815 return templ_7745c5c3_Err
965816 }
966- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "\" aria-hidden=\"true\"><span class=\"sv-history-favicon-fallback\">")
817+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "\" aria-hidden=\"true\"><span class=\"sv-history-favicon-fallback\">")
967818 if templ_7745c5c3_Err != nil {
968819 return templ_7745c5c3_Err
969820 }
970- var templ_7745c5c3_Var39 string
971- templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(historyFaviconFallback(entry))
821+ var templ_7745c5c3_Var35 string
822+ templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(historyFaviconFallback(entry))
972823 if templ_7745c5c3_Err != nil {
973- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 182, Col: 78}
824+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 155, Col: 78}
974825 }
975- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39))
826+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))
976827 if templ_7745c5c3_Err != nil {
977828 return templ_7745c5c3_Err
978829 }
979- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "</span> ")
830+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "</span> ")
980831 if templ_7745c5c3_Err != nil {
981832 return templ_7745c5c3_Err
982833 }
983834 if faviconURL != "" {
984- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "<img src=\"")
835+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<img src=\"")
985836 if templ_7745c5c3_Err != nil {
986837 return templ_7745c5c3_Err
987838 }
988- var templ_7745c5c3_Var40 string
989- templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(templ.SafeURL(faviconURL))
839+ var templ_7745c5c3_Var36 string
840+ templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(templ.SafeURL(faviconURL))
990841 if templ_7745c5c3_Err != nil {
991- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 184, Col: 42}
842+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 157, Col: 42}
992843 }
993- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))
844+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))
994845 if templ_7745c5c3_Err != nil {
995846 return templ_7745c5c3_Err
996847 }
997- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "\" alt=\"\" width=\"24\" height=\"24\" loading=\"lazy\" decoding=\"async\" referrerpolicy=\"same-origin\" onerror=\"this.parentElement.classList.remove('sv-history-favicon-has-image'); this.remove()\">")
848+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "\" alt=\"\" width=\"24\" height=\"24\" loading=\"lazy\" decoding=\"async\" referrerpolicy=\"same-origin\" onerror=\"this.parentElement.classList.remove('sv-history-favicon-has-image'); this.remove()\">")
998849 if templ_7745c5c3_Err != nil {
999850 return templ_7745c5c3_Err
1000851 }
1001852 }
1002- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "</span><div class=\"sv-history-main\"><a class=\"sv-link sv-history-open\" href=\"")
853+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "</span><div class=\"sv-history-main\"><a class=\"sv-link sv-history-open\" href=\"")
1003854 if templ_7745c5c3_Err != nil {
1004855 return templ_7745c5c3_Err
1005856 }
1006- var templ_7745c5c3_Var41 templ.SafeURL
1007- templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(sanitizeHref(entry.URL)))
857+ var templ_7745c5c3_Var37 templ.SafeURL
858+ templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(sanitizeHref(entry.URL)))
1008859 if templ_7745c5c3_Err != nil {
1009- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 188, Col: 85}
860+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 161, Col: 85}
1010861 }
1011- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41))
862+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37))
1012863 if templ_7745c5c3_Err != nil {
1013864 return templ_7745c5c3_Err
1014865 }
1015- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "\">")
866+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "\">")
1016867 if templ_7745c5c3_Err != nil {
1017868 return templ_7745c5c3_Err
1018869 }
1019- var templ_7745c5c3_Var42 string
1020- templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinStringErrs(historyItemLabel(entry))
870+ var templ_7745c5c3_Var38 string
871+ templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(historyItemLabel(entry))
1021872 if templ_7745c5c3_Err != nil {
1022- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 188, Col: 113}
873+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 161, Col: 113}
1023874 }
1024- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42))
875+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38))
1025876 if templ_7745c5c3_Err != nil {
1026877 return templ_7745c5c3_Err
1027878 }
1028- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "</a><p class=\"sv-history-url\" title=\"")
879+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "</a><p class=\"sv-history-url\" title=\"")
1029880 if templ_7745c5c3_Err != nil {
1030881 return templ_7745c5c3_Err
1031882 }
1032- var templ_7745c5c3_Var43 string
1033- templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.JoinStringErrs(entry.URL)
883+ var templ_7745c5c3_Var39 string
884+ templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(entry.URL)
1034885 if templ_7745c5c3_Err != nil {
1035- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 189, Col: 48}
886+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 162, Col: 48}
1036887 }
1037- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43))
888+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39))
1038889 if templ_7745c5c3_Err != nil {
1039890 return templ_7745c5c3_Err
1040891 }
1041- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "\">")
892+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "\">")
1042893 if templ_7745c5c3_Err != nil {
1043894 return templ_7745c5c3_Err
1044895 }
1045- var templ_7745c5c3_Var44 string
1046- templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.JoinStringErrs(historyItemURL(entry))
896+ var templ_7745c5c3_Var40 string
897+ templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(historyItemURL(entry))
1047898 if templ_7745c5c3_Err != nil {
1048- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 189, Col: 74}
899+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 162, Col: 74}
1049900 }
1050- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var44))
901+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))
1051902 if templ_7745c5c3_Err != nil {
1052903 return templ_7745c5c3_Err
1053904 }
1054- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "</p><p class=\"sv-history-meta\">")
905+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "</p><p class=\"sv-history-meta\">")
1055906 if templ_7745c5c3_Err != nil {
1056907 return templ_7745c5c3_Err
1057908 }
1058- var templ_7745c5c3_Var45 string
1059- templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.JoinStringErrs(historyItemMeta(entry))
909+ var templ_7745c5c3_Var41 string
910+ templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinStringErrs(historyItemMeta(entry))
1060911 if templ_7745c5c3_Err != nil {
1061- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 190, Col: 56}
912+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 163, Col: 56}
1062913 }
1063- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var45))
914+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41))
1064915 if templ_7745c5c3_Err != nil {
1065916 return templ_7745c5c3_Err
1066917 }
1067- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "</p></div></div><div class=\"sv-history-row-actions\"><a class=\"sv-button sv-button-secondary\" href=\"")
918+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "</p></div></div><div class=\"sv-history-row-actions\"><a class=\"sv-button sv-button-secondary\" href=\"")
1068919 if templ_7745c5c3_Err != nil {
1069920 return templ_7745c5c3_Err
1070921 }
1071- var templ_7745c5c3_Var46 templ.SafeURL
1072- templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(sanitizeHref(entry.URL)))
922+ var templ_7745c5c3_Var42 templ.SafeURL
923+ templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(sanitizeHref(entry.URL)))
1073924 if templ_7745c5c3_Err != nil {
1074- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 194, Col: 90}
925+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 167, Col: 90}
1075926 }
1076- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46))
927+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42))
1077928 if templ_7745c5c3_Err != nil {
1078929 return templ_7745c5c3_Err
1079930 }
1080- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "\">")
931+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "\">")
1081932 if templ_7745c5c3_Err != nil {
1082933 return templ_7745c5c3_Err
1083934 }
@@ -1085,30 +936,30 @@ func HistoryItem(entry *entity.HistoryEntry) templ.Component {
1085936 if templ_7745c5c3_Err != nil {
1086937 return templ_7745c5c3_Err
1087938 }
1088- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "</a> <button type=\"button\" class=\"sv-button sv-button-secondary sv-button-danger sv-button-icon-only\" data-sv-action=\"history.deleteEntry\" data-id=\"")
939+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "</a> <button type=\"button\" class=\"sv-button sv-button-secondary sv-button-danger sv-button-icon-only\" data-sv-action=\"history.deleteEntry\" data-id=\"")
1089940 if templ_7745c5c3_Err != nil {
1090941 return templ_7745c5c3_Err
1091942 }
1092- var templ_7745c5c3_Var47 string
1093- templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", entry.ID))
943+ var templ_7745c5c3_Var43 string
944+ templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", entry.ID))
1094945 if templ_7745c5c3_Err != nil {
1095- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 195, Col: 175}
946+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 168, Col: 175}
1096947 }
1097- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47))
948+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43))
1098949 if templ_7745c5c3_Err != nil {
1099950 return templ_7745c5c3_Err
1100951 }
1101- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "\" data-sv-confirm=\"Delete this history entry?\" aria-label=\"Delete this history entry\"")
952+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "\" data-sv-confirm=\"Delete this history entry?\" aria-label=\"Delete this history entry\"")
1102953 if templ_7745c5c3_Err != nil {
1103954 return templ_7745c5c3_Err
1104955 }
1105956 if entry.ID <= 0 {
1106- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, " disabled")
957+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, " disabled")
1107958 if templ_7745c5c3_Err != nil {
1108959 return templ_7745c5c3_Err
1109960 }
1110961 }
1111- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, ">")
962+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, ">")
1112963 if templ_7745c5c3_Err != nil {
1113964 return templ_7745c5c3_Err
1114965 }
@@ -1116,7 +967,7 @@ func HistoryItem(entry *entity.HistoryEntry) templ.Component {
1116967 if templ_7745c5c3_Err != nil {
1117968 return templ_7745c5c3_Err
1118969 }
1119- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "</button></div></article></li>")
970+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "</button></div></article></li>")
1120971 if templ_7745c5c3_Err != nil {
1121972 return templ_7745c5c3_Err
1122973 }
@@ -64,33 +64,7 @@ func HistoryView(data historyRenderData) templ.Component {
64 if templ_7745c5c3_Err != nil {64 if templ_7745c5c3_Err != nil {
65 return templ_7745c5c3_Err65 return templ_7745c5c3_Err
66 }66 }
67- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"sv-history-overview\">")
68- if templ_7745c5c3_Err != nil {
69- return templ_7745c5c3_Err
70- }
71 templ_7745c5c3_Var3 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {67 templ_7745c5c3_Var3 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
72- templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
73- templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
74- if !templ_7745c5c3_IsBuffer {
75- defer func() {
76- templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
77- if templ_7745c5c3_Err == nil {
78- templ_7745c5c3_Err = templ_7745c5c3_BufErr
79- }
80- }()
81- }
82- ctx = templ.InitializeContext(ctx)
83- templ_7745c5c3_Err = HistorySummary(data).Render(ctx, templ_7745c5c3_Buffer)
84- if templ_7745c5c3_Err != nil {
85- return templ_7745c5c3_Err
86- }
87- return nil
88- })
89- templ_7745c5c3_Err = Section("sv-history-summary", "History stats").Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer)
90- if templ_7745c5c3_Err != nil {
91- return templ_7745c5c3_Err
92- }
93- templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
94 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context68 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
95 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)69 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
96 if !templ_7745c5c3_IsBuffer {70 if !templ_7745c5c3_IsBuffer {
@@ -108,15 +82,11 @@ func HistoryView(data historyRenderData) templ.Component {
108 }82 }
109 return nil83 return nil
110 })84 })
111- templ_7745c5c3_Err = Section("sv-history-domains", "Top domains").Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer)85+ templ_7745c5c3_Err = Section("sv-history-domains", "Top domains").Render(templ.WithChildren(ctx, templ_7745c5c3_Var3), templ_7745c5c3_Buffer)
112- if templ_7745c5c3_Err != nil {
113- return templ_7745c5c3_Err
114- }
115- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "</div>")
116 if templ_7745c5c3_Err != nil {86 if templ_7745c5c3_Err != nil {
117 return templ_7745c5c3_Err87 return templ_7745c5c3_Err
118 }88 }
119- templ_7745c5c3_Var5 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {89+ templ_7745c5c3_Var4 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
120 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context90 templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
121 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)91 templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
122 if !templ_7745c5c3_IsBuffer {92 if !templ_7745c5c3_IsBuffer {
@@ -134,7 +104,7 @@ func HistoryView(data historyRenderData) templ.Component {
134 }104 }
135 return nil105 return nil
136 })106 })
137- templ_7745c5c3_Err = Section("sv-history-timeline", "Recent visits").Render(templ.WithChildren(ctx, templ_7745c5c3_Var5), templ_7745c5c3_Buffer)107+ templ_7745c5c3_Err = Section("sv-history-timeline", "Recent visits").Render(templ.WithChildren(ctx, templ_7745c5c3_Var4), templ_7745c5c3_Buffer)
138 if templ_7745c5c3_Err != nil {108 if templ_7745c5c3_Err != nil {
139 return templ_7745c5c3_Err109 return templ_7745c5c3_Err
140 }110 }
@@ -158,25 +128,25 @@ func HistoryControls(data historyRenderData) templ.Component {
158 }()128 }()
159 }129 }
160 ctx = templ.InitializeContext(ctx)130 ctx = templ.InitializeContext(ctx)
161- templ_7745c5c3_Var6 := templ.GetChildren(ctx)131+ templ_7745c5c3_Var5 := templ.GetChildren(ctx)
162- if templ_7745c5c3_Var6 == nil {132+ if templ_7745c5c3_Var5 == nil {
163- templ_7745c5c3_Var6 = templ.NopComponent133+ templ_7745c5c3_Var5 = templ.NopComponent
164 }134 }
165 ctx = templ.ClearChildren(ctx)135 ctx = templ.ClearChildren(ctx)
166- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "<form class=\"sv-toolbar sv-history-search\" data-sv-action=\"history.search\"><label class=\"sv-search-label\"><span>Search</span> <input data-sv-history-search data-sv-autofocus name=\"query\" type=\"search\" value=\"")136+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<form class=\"sv-toolbar sv-history-search\" data-sv-action=\"history.search\"><label class=\"sv-search-label\"><span>Search</span> <input data-sv-history-search data-sv-autofocus name=\"query\" type=\"search\" value=\"")
167 if templ_7745c5c3_Err != nil {137 if templ_7745c5c3_Err != nil {
168 return templ_7745c5c3_Err138 return templ_7745c5c3_Err
169 }139 }
170- var templ_7745c5c3_Var7 string140+ var templ_7745c5c3_Var6 string
171- templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(data.Query)141+ templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(data.Query)
172 if templ_7745c5c3_Err != nil {142 if templ_7745c5c3_Err != nil {
173- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 32, Col: 96}143+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 27, Col: 96}
174 }144 }
175- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))145+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
176 if templ_7745c5c3_Err != nil {146 if templ_7745c5c3_Err != nil {
177 return templ_7745c5c3_Err147 return templ_7745c5c3_Err
178 }148 }
179- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "\" placeholder=\"Search title or URL\" autocomplete=\"off\" autofocus></label> <button class=\"sv-button\" type=\"submit\">")149+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\" placeholder=\"Search title or URL\" autocomplete=\"off\" autofocus></label> <button class=\"sv-button\" type=\"submit\">")
180 if templ_7745c5c3_Err != nil {150 if templ_7745c5c3_Err != nil {
181 return templ_7745c5c3_Err151 return templ_7745c5c3_Err
182 }152 }
@@ -184,7 +154,7 @@ func HistoryControls(data historyRenderData) templ.Component {
184 if templ_7745c5c3_Err != nil {154 if templ_7745c5c3_Err != nil {
185 return templ_7745c5c3_Err155 return templ_7745c5c3_Err
186 }156 }
187- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "</button> <button class=\"sv-button sv-button-secondary\" type=\"button\" data-sv-action=\"history.clear\">")157+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "</button> <button class=\"sv-button sv-button-secondary\" type=\"button\" data-sv-action=\"history.clear\">")
188 if templ_7745c5c3_Err != nil {158 if templ_7745c5c3_Err != nil {
189 return templ_7745c5c3_Err159 return templ_7745c5c3_Err
190 }160 }
@@ -192,49 +162,49 @@ func HistoryControls(data historyRenderData) templ.Component {
192 if templ_7745c5c3_Err != nil {162 if templ_7745c5c3_Err != nil {
193 return templ_7745c5c3_Err163 return templ_7745c5c3_Err
194 }164 }
195- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "</button></form>")165+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "</button></form>")
196 if templ_7745c5c3_Err != nil {166 if templ_7745c5c3_Err != nil {
197 return templ_7745c5c3_Err167 return templ_7745c5c3_Err
198 }168 }
199 if showHistoryFilters(data) {169 if showHistoryFilters(data) {
200- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "<div class=\"sv-active-filters\">")170+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "<div class=\"sv-active-filters\">")
201 if templ_7745c5c3_Err != nil {171 if templ_7745c5c3_Err != nil {
202 return templ_7745c5c3_Err172 return templ_7745c5c3_Err
203 }173 }
204 if data.Query != "" {174 if data.Query != "" {
205- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "<span class=\"sv-filter-chip\">Query: ")175+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "<span class=\"sv-filter-chip\">Query: ")
206 if templ_7745c5c3_Err != nil {176 if templ_7745c5c3_Err != nil {
207 return templ_7745c5c3_Err177 return templ_7745c5c3_Err
208 }178 }
209- var templ_7745c5c3_Var8 string179+ var templ_7745c5c3_Var7 string
210- templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(data.Query)180+ templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(data.Query)
211 if templ_7745c5c3_Err != nil {181 if templ_7745c5c3_Err != nil {
212- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 40, Col: 52}182+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 35, Col: 52}
213 }183 }
214- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))184+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
215 if templ_7745c5c3_Err != nil {185 if templ_7745c5c3_Err != nil {
216 return templ_7745c5c3_Err186 return templ_7745c5c3_Err
217 }187 }
218- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "</span> ")188+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</span> ")
219 if templ_7745c5c3_Err != nil {189 if templ_7745c5c3_Err != nil {
220 return templ_7745c5c3_Err190 return templ_7745c5c3_Err
221 }191 }
222 }192 }
223 if data.DomainFilter != "" {193 if data.DomainFilter != "" {
224- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "<span class=\"sv-filter-chip\">Domain: ")194+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "<span class=\"sv-filter-chip\">Domain: ")
225 if templ_7745c5c3_Err != nil {195 if templ_7745c5c3_Err != nil {
226 return templ_7745c5c3_Err196 return templ_7745c5c3_Err
227 }197 }
228- var templ_7745c5c3_Var9 string198+ var templ_7745c5c3_Var8 string
229- templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(data.DomainFilter)199+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(data.DomainFilter)
230 if templ_7745c5c3_Err != nil {200 if templ_7745c5c3_Err != nil {
231- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 43, Col: 60}201+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 38, Col: 60}
232 }202 }
233- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))203+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
234 if templ_7745c5c3_Err != nil {204 if templ_7745c5c3_Err != nil {
235 return templ_7745c5c3_Err205 return templ_7745c5c3_Err
236 }206 }
237- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, " <button type=\"button\" data-sv-action=\"history.clearDomain\" aria-label=\"Clear domain filter\">")207+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, " <button type=\"button\" data-sv-action=\"history.clearDomain\" aria-label=\"Clear domain filter\">")
238 if templ_7745c5c3_Err != nil {208 if templ_7745c5c3_Err != nil {
239 return templ_7745c5c3_Err209 return templ_7745c5c3_Err
240 }210 }
@@ -242,203 +212,79 @@ func HistoryControls(data historyRenderData) templ.Component {
242 if templ_7745c5c3_Err != nil {212 if templ_7745c5c3_Err != nil {
243 return templ_7745c5c3_Err213 return templ_7745c5c3_Err
244 }214 }
245- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "</button></span>")215+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "</button></span>")
246 if templ_7745c5c3_Err != nil {216 if templ_7745c5c3_Err != nil {
247 return templ_7745c5c3_Err217 return templ_7745c5c3_Err
248 }218 }
249 }219 }
250- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "</div>")220+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "</div>")
251 if templ_7745c5c3_Err != nil {221 if templ_7745c5c3_Err != nil {
252 return templ_7745c5c3_Err222 return templ_7745c5c3_Err
253 }223 }
254 }224 }
255- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "<div class=\"sv-history-actions-panel\"><div class=\"sv-button-row\" aria-label=\"History pagination\"><span class=\"sv-meta\">")225+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "<div class=\"sv-history-actions-panel\"><div class=\"sv-button-row\" aria-label=\"History pagination\"><span class=\"sv-meta\">")
256 if templ_7745c5c3_Err != nil {226 if templ_7745c5c3_Err != nil {
257 return templ_7745c5c3_Err227 return templ_7745c5c3_Err
258 }228 }
259- var templ_7745c5c3_Var10 string229+ var templ_7745c5c3_Var9 string
260- templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(historyShowingLabel(data))230+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(historyShowingLabel(data))
261 if templ_7745c5c3_Err != nil {231 if templ_7745c5c3_Err != nil {
262- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 49, Col: 52}232+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 44, Col: 52}
263 }233 }
264- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))234+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
265 if templ_7745c5c3_Err != nil {235 if templ_7745c5c3_Err != nil {
266 return templ_7745c5c3_Err236 return templ_7745c5c3_Err
267 }237 }
268- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "</span></div><div class=\"sv-button-row\" aria-label=\"History cleanup\"><span class=\"sv-meta\">Clean up</span> ")238+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "</span></div><div class=\"sv-button-row\" aria-label=\"History cleanup\"><span class=\"sv-meta\">Clean up</span> ")
269 if templ_7745c5c3_Err != nil {239 if templ_7745c5c3_Err != nil {
270 return templ_7745c5c3_Err240 return templ_7745c5c3_Err
271 }241 }
272 for _, item := range historyCleanupItems() {242 for _, item := range historyCleanupItems() {
273- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "<button type=\"button\" class=\"sv-danger-link\" data-sv-action=\"history.deleteRange\" data-range=\"")243+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "<button type=\"button\" class=\"sv-danger-link\" data-sv-action=\"history.deleteRange\" data-range=\"")
274- if templ_7745c5c3_Err != nil {
275- return templ_7745c5c3_Err
276- }
277- var templ_7745c5c3_Var11 string
278- templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(item.RangeID)
279- if templ_7745c5c3_Err != nil {
280- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 54, Col: 111}
281- }
282- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
283- if templ_7745c5c3_Err != nil {
284- return templ_7745c5c3_Err
285- }
286- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "\" data-sv-confirm=\"")
287- if templ_7745c5c3_Err != nil {
288- return templ_7745c5c3_Err
289- }
290- var templ_7745c5c3_Var12 string
291- templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(item.Confirm)
292- if templ_7745c5c3_Err != nil {
293- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 54, Col: 144}
294- }
295- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
296- if templ_7745c5c3_Err != nil {
297- return templ_7745c5c3_Err
298- }
299- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "\">")
300- if templ_7745c5c3_Err != nil {
301- return templ_7745c5c3_Err
302- }
303- var templ_7745c5c3_Var13 string
304- templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(item.Label)
305- if templ_7745c5c3_Err != nil {
306- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 54, Col: 159}
307- }
308- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
309- if templ_7745c5c3_Err != nil {
310- return templ_7745c5c3_Err
311- }
312- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "</button>")
313- if templ_7745c5c3_Err != nil {
314- return templ_7745c5c3_Err
315- }
316- }
317- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "</div></div>")
318- if templ_7745c5c3_Err != nil {
319- return templ_7745c5c3_Err
320- }
321- return nil
322- })
323-}
324-
325-func HistorySummary(data historyRenderData) templ.Component {
326- return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
327- templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
328- if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
329- return templ_7745c5c3_CtxErr
330- }
331- templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
332- if !templ_7745c5c3_IsBuffer {
333- defer func() {
334- templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
335- if templ_7745c5c3_Err == nil {
336- templ_7745c5c3_Err = templ_7745c5c3_BufErr
337- }
338- }()
339- }
340- ctx = templ.InitializeContext(ctx)
341- templ_7745c5c3_Var14 := templ.GetChildren(ctx)
342- if templ_7745c5c3_Var14 == nil {
343- templ_7745c5c3_Var14 = templ.NopComponent
344- }
345- ctx = templ.ClearChildren(ctx)
346- if historySummaryLoading(data) {
347- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "<div class=\"sv-stat-grid\">")
348 if templ_7745c5c3_Err != nil {244 if templ_7745c5c3_Err != nil {
349 return templ_7745c5c3_Err245 return templ_7745c5c3_Err
350 }246 }
351- templ_7745c5c3_Err = LoadingCard("Entries").Render(ctx, templ_7745c5c3_Buffer)247+ var templ_7745c5c3_Var10 string
248+ templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(item.RangeID)
352 if templ_7745c5c3_Err != nil {249 if templ_7745c5c3_Err != nil {
353- return templ_7745c5c3_Err250+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 49, Col: 111}
354 }251 }
355- templ_7745c5c3_Err = LoadingCard("Visits").Render(ctx, templ_7745c5c3_Buffer)252+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
356 if templ_7745c5c3_Err != nil {253 if templ_7745c5c3_Err != nil {
357 return templ_7745c5c3_Err254 return templ_7745c5c3_Err
358 }255 }
359- templ_7745c5c3_Err = LoadingCard("Days").Render(ctx, templ_7745c5c3_Buffer)256+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "\" data-sv-confirm=\"")
360 if templ_7745c5c3_Err != nil {257 if templ_7745c5c3_Err != nil {
361 return templ_7745c5c3_Err258 return templ_7745c5c3_Err
362 }259 }
363- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "</div>")260+ var templ_7745c5c3_Var11 string
261+ templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(item.Confirm)
364 if templ_7745c5c3_Err != nil {262 if templ_7745c5c3_Err != nil {
365- return templ_7745c5c3_Err263+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 49, Col: 144}
366 }264 }
367- } else {265+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
368- entries, visits, days := historySummaryValues(data)
369- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "<div class=\"sv-stat-grid\">")
370 if templ_7745c5c3_Err != nil {266 if templ_7745c5c3_Err != nil {
371 return templ_7745c5c3_Err267 return templ_7745c5c3_Err
372 }268 }
373- templ_7745c5c3_Err = HistoryStatCard("Entries", entries).Render(ctx, templ_7745c5c3_Buffer)269+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\">")
374 if templ_7745c5c3_Err != nil {270 if templ_7745c5c3_Err != nil {
375 return templ_7745c5c3_Err271 return templ_7745c5c3_Err
376 }272 }
377- templ_7745c5c3_Err = HistoryStatCard("Visits", visits).Render(ctx, templ_7745c5c3_Buffer)273+ var templ_7745c5c3_Var12 string
274+ templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(item.Label)
378 if templ_7745c5c3_Err != nil {275 if templ_7745c5c3_Err != nil {
379- return templ_7745c5c3_Err276+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 49, Col: 159}
380 }277 }
381- templ_7745c5c3_Err = HistoryStatCard("Days", days).Render(ctx, templ_7745c5c3_Buffer)278+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
382 if templ_7745c5c3_Err != nil {279 if templ_7745c5c3_Err != nil {
383 return templ_7745c5c3_Err280 return templ_7745c5c3_Err
384 }281 }
385- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "</div>")282+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "</button>")
386 if templ_7745c5c3_Err != nil {283 if templ_7745c5c3_Err != nil {
387 return templ_7745c5c3_Err284 return templ_7745c5c3_Err
388 }285 }
389 }286 }
390- return nil287+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "</div></div>")
391- })
392-}
393-
394-func HistoryStatCard(label string, value int64) templ.Component {
395- return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
396- templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
397- if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
398- return templ_7745c5c3_CtxErr
399- }
400- templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
401- if !templ_7745c5c3_IsBuffer {
402- defer func() {
403- templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
404- if templ_7745c5c3_Err == nil {
405- templ_7745c5c3_Err = templ_7745c5c3_BufErr
406- }
407- }()
408- }
409- ctx = templ.InitializeContext(ctx)
410- templ_7745c5c3_Var15 := templ.GetChildren(ctx)
411- if templ_7745c5c3_Var15 == nil {
412- templ_7745c5c3_Var15 = templ.NopComponent
413- }
414- ctx = templ.ClearChildren(ctx)
415- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<div class=\"sv-stat-card\"><span class=\"sv-stat-value\">")
416- if templ_7745c5c3_Err != nil {
417- return templ_7745c5c3_Err
418- }
419- var templ_7745c5c3_Var16 string
420- templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", value))
421- if templ_7745c5c3_Err != nil {
422- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 79, Col: 81}
423- }
424- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
425- if templ_7745c5c3_Err != nil {
426- return templ_7745c5c3_Err
427- }
428- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "</span><span class=\"sv-stat-label\">")
429- if templ_7745c5c3_Err != nil {
430- return templ_7745c5c3_Err
431- }
432- var templ_7745c5c3_Var17 string
433- templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(label)
434- if templ_7745c5c3_Err != nil {
435- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 79, Col: 125}
436- }
437- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
438- if templ_7745c5c3_Err != nil {
439- return templ_7745c5c3_Err
440- }
441- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "</span></div>")
442 if templ_7745c5c3_Err != nil {288 if templ_7745c5c3_Err != nil {
443 return templ_7745c5c3_Err289 return templ_7745c5c3_Err
444 }290 }
@@ -462,9 +308,9 @@ func HistoryDomains(data historyRenderData) templ.Component {
462 }()308 }()
463 }309 }
464 ctx = templ.InitializeContext(ctx)310 ctx = templ.InitializeContext(ctx)
465- templ_7745c5c3_Var18 := templ.GetChildren(ctx)311+ templ_7745c5c3_Var13 := templ.GetChildren(ctx)
466- if templ_7745c5c3_Var18 == nil {312+ if templ_7745c5c3_Var13 == nil {
467- templ_7745c5c3_Var18 = templ.NopComponent313+ templ_7745c5c3_Var13 = templ.NopComponent
468 }314 }
469 ctx = templ.ClearChildren(ctx)315 ctx = templ.ClearChildren(ctx)
470 if data.Loading {316 if data.Loading {
@@ -478,7 +324,7 @@ func HistoryDomains(data historyRenderData) templ.Component {
478 return templ_7745c5c3_Err324 return templ_7745c5c3_Err
479 }325 }
480 } else {326 } else {
481- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "<div class=\"sv-domain-list\">")327+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "<div class=\"sv-domain-list\">")
482 if templ_7745c5c3_Err != nil {328 if templ_7745c5c3_Err != nil {
483 return templ_7745c5c3_Err329 return templ_7745c5c3_Err
484 }330 }
@@ -486,99 +332,104 @@ func HistoryDomains(data historyRenderData) templ.Component {
486 if domain != nil && domain.Domain != "" {332 if domain != nil && domain.Domain != "" {
487 domainKey := historyDomainActionKey(domain)333 domainKey := historyDomainActionKey(domain)
488 displayDomain := historyDomainDisplayLabel(domain)334 displayDomain := historyDomainDisplayLabel(domain)
489- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "<span class=\"sv-domain-chip\"><span class=\"sv-domain-chip-main\"><button type=\"button\" class=\"sv-domain-filter\" data-sv-action=\"history.filterDomain\" data-domain=\"")335+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "<span class=\"sv-domain-chip\"><span class=\"sv-domain-chip-main\"><button type=\"button\" class=\"sv-domain-filter\" data-sv-action=\"history.filterDomain\" data-domain=\"")
490 if templ_7745c5c3_Err != nil {336 if templ_7745c5c3_Err != nil {
491 return templ_7745c5c3_Err337 return templ_7745c5c3_Err
492 }338 }
493- var templ_7745c5c3_Var19 string339+ var templ_7745c5c3_Var14 string
494- templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(domainKey)340+ templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(domainKey)
495 if templ_7745c5c3_Err != nil {341 if templ_7745c5c3_Err != nil {
496- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 95, Col: 115}342+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 68, Col: 115}
497 }343 }
498- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))344+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
499 if templ_7745c5c3_Err != nil {345 if templ_7745c5c3_Err != nil {
500 return templ_7745c5c3_Err346 return templ_7745c5c3_Err
501 }347 }
502- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "\">")348+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "\">")
503 if templ_7745c5c3_Err != nil {349 if templ_7745c5c3_Err != nil {
504 return templ_7745c5c3_Err350 return templ_7745c5c3_Err
505 }351 }
506- var templ_7745c5c3_Var20 string352+ var templ_7745c5c3_Var15 string
507- templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(displayDomain)353+ templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(displayDomain)
508 if templ_7745c5c3_Err != nil {354 if templ_7745c5c3_Err != nil {
509- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 95, Col: 133}355+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 68, Col: 133}
510 }356 }
511- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))357+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
512 if templ_7745c5c3_Err != nil {358 if templ_7745c5c3_Err != nil {
513 return templ_7745c5c3_Err359 return templ_7745c5c3_Err
514 }360 }
515- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "</button> <span class=\"sv-domain-meta\">")361+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "</button> <span class=\"sv-domain-meta\">")
516 if templ_7745c5c3_Err != nil {362 if templ_7745c5c3_Err != nil {
517 return templ_7745c5c3_Err363 return templ_7745c5c3_Err
518 }364 }
519- var templ_7745c5c3_Var21 string365+ var templ_7745c5c3_Var16 string
520- templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d pages · %d visits", domain.PageCount, domain.TotalVisits))366+ templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%dp · %dv", domain.PageCount, domain.TotalVisits))
521 if templ_7745c5c3_Err != nil {367 if templ_7745c5c3_Err != nil {
522- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 96, Col: 112}368+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 69, Col: 101}
523 }369 }
524- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))370+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
525 if templ_7745c5c3_Err != nil {371 if templ_7745c5c3_Err != nil {
526 return templ_7745c5c3_Err372 return templ_7745c5c3_Err
527 }373 }
528- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "</span></span> <button type=\"button\" class=\"sv-icon-button sv-danger\" data-sv-action=\"history.deleteDomain\" data-domain=\"")374+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "</span></span> <button type=\"button\" class=\"sv-domain-delete\" data-sv-action=\"history.deleteDomain\" data-domain=\"")
529 if templ_7745c5c3_Err != nil {375 if templ_7745c5c3_Err != nil {
530 return templ_7745c5c3_Err376 return templ_7745c5c3_Err
531 }377 }
532- var templ_7745c5c3_Var22 string378+ var templ_7745c5c3_Var17 string
533- templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(domainKey)379+ templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(domainKey)
534 if templ_7745c5c3_Err != nil {380 if templ_7745c5c3_Err != nil {
535- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 98, Col: 122}381+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 71, Col: 114}
536 }382 }
537- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))383+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
538 if templ_7745c5c3_Err != nil {384 if templ_7745c5c3_Err != nil {
539 return templ_7745c5c3_Err385 return templ_7745c5c3_Err
540 }386 }
541- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "\" data-sv-confirm=\"")387+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\" data-sv-confirm=\"")
542 if templ_7745c5c3_Err != nil {388 if templ_7745c5c3_Err != nil {
543 return templ_7745c5c3_Err389 return templ_7745c5c3_Err
544 }390 }
545- var templ_7745c5c3_Var23 string391+ var templ_7745c5c3_Var18 string
546- templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs("Delete all history for " + displayDomain + "?")392+ templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs("Delete all history for " + displayDomain + "?")
547 if templ_7745c5c3_Err != nil {393 if templ_7745c5c3_Err != nil {
548- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 98, Col: 190}394+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 71, Col: 182}
549 }395 }
550- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))396+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
551 if templ_7745c5c3_Err != nil {397 if templ_7745c5c3_Err != nil {
552 return templ_7745c5c3_Err398 return templ_7745c5c3_Err
553 }399 }
554- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "\" aria-label=\"")400+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "\" aria-label=\"")
555 if templ_7745c5c3_Err != nil {401 if templ_7745c5c3_Err != nil {
556 return templ_7745c5c3_Err402 return templ_7745c5c3_Err
557 }403 }
558- var templ_7745c5c3_Var24 string404+ var templ_7745c5c3_Var19 string
559- templ_7745c5c3_Var24, templ_7745c5c3_Err = templ.JoinStringErrs("Delete history for " + displayDomain)405+ templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs("Delete history for " + displayDomain)
560 if templ_7745c5c3_Err != nil {406 if templ_7745c5c3_Err != nil {
561- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 98, Col: 243}407+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 71, Col: 235}
562 }408 }
563- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var24))409+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
564 if templ_7745c5c3_Err != nil {410 if templ_7745c5c3_Err != nil {
565 return templ_7745c5c3_Err411 return templ_7745c5c3_Err
566 }412 }
567- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "\">")413+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\"><span aria-hidden=\"true\">×</span><span class=\"sv-sr-only\">Delete history for ")
568 if templ_7745c5c3_Err != nil {414 if templ_7745c5c3_Err != nil {
569 return templ_7745c5c3_Err415 return templ_7745c5c3_Err
570 }416 }
571- templ_7745c5c3_Err = IconOnly(iconTrash, "Delete history for "+displayDomain).Render(ctx, templ_7745c5c3_Buffer)417+ var templ_7745c5c3_Var20 string
418+ templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(displayDomain)
419+ if templ_7745c5c3_Err != nil {
420+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 71, Col: 331}
421+ }
422+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
572 if templ_7745c5c3_Err != nil {423 if templ_7745c5c3_Err != nil {
573 return templ_7745c5c3_Err424 return templ_7745c5c3_Err
574 }425 }
575- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "</button></span>")426+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "</span></button></span>")
576 if templ_7745c5c3_Err != nil {427 if templ_7745c5c3_Err != nil {
577 return templ_7745c5c3_Err428 return templ_7745c5c3_Err
578 }429 }
579 }430 }
580 }431 }
581- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</div>")432+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "</div>")
582 if templ_7745c5c3_Err != nil {433 if templ_7745c5c3_Err != nil {
583 return templ_7745c5c3_Err434 return templ_7745c5c3_Err
584 }435 }
@@ -603,9 +454,9 @@ func HistoryTimeline(data historyRenderData) templ.Component {
603 }()454 }()
604 }455 }
605 ctx = templ.InitializeContext(ctx)456 ctx = templ.InitializeContext(ctx)
606- templ_7745c5c3_Var25 := templ.GetChildren(ctx)457+ templ_7745c5c3_Var21 := templ.GetChildren(ctx)
607- if templ_7745c5c3_Var25 == nil {458+ if templ_7745c5c3_Var21 == nil {
608- templ_7745c5c3_Var25 = templ.NopComponent459+ templ_7745c5c3_Var21 = templ.NopComponent
609 }460 }
610 ctx = templ.ClearChildren(ctx)461 ctx = templ.ClearChildren(ctx)
611 if data.Loading {462 if data.Loading {
@@ -614,7 +465,7 @@ func HistoryTimeline(data historyRenderData) templ.Component {
614 return templ_7745c5c3_Err465 return templ_7745c5c3_Err
615 }466 }
616 } else {467 } else {
617- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<div class=\"sv-history-timeline-list\" data-sv-history-timeline>")468+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "<div class=\"sv-history-timeline-list\" data-sv-history-timeline>")
618 if templ_7745c5c3_Err != nil {469 if templ_7745c5c3_Err != nil {
619 return templ_7745c5c3_Err470 return templ_7745c5c3_Err
620 }471 }
@@ -634,7 +485,7 @@ func HistoryTimeline(data historyRenderData) templ.Component {
634 if templ_7745c5c3_Err != nil {485 if templ_7745c5c3_Err != nil {
635 return templ_7745c5c3_Err486 return templ_7745c5c3_Err
636 }487 }
637- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</div>")488+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "</div>")
638 if templ_7745c5c3_Err != nil {489 if templ_7745c5c3_Err != nil {
639 return templ_7745c5c3_Err490 return templ_7745c5c3_Err
640 }491 }
@@ -659,9 +510,9 @@ func HistoryTimelineAppend(data historyRenderData) templ.Component {
659 }()510 }()
660 }511 }
661 ctx = templ.InitializeContext(ctx)512 ctx = templ.InitializeContext(ctx)
662- templ_7745c5c3_Var26 := templ.GetChildren(ctx)513+ templ_7745c5c3_Var22 := templ.GetChildren(ctx)
663- if templ_7745c5c3_Var26 == nil {514+ if templ_7745c5c3_Var22 == nil {
664- templ_7745c5c3_Var26 = templ.NopComponent515+ templ_7745c5c3_Var22 = templ.NopComponent
665 }516 }
666 ctx = templ.ClearChildren(ctx)517 ctx = templ.ClearChildren(ctx)
667 templ_7745c5c3_Err = HistoryTimelineAppendGroups(data.Entries, data.AppendSkipFirstDate).Render(ctx, templ_7745c5c3_Buffer)518 templ_7745c5c3_Err = HistoryTimelineAppendGroups(data.Entries, data.AppendSkipFirstDate).Render(ctx, templ_7745c5c3_Buffer)
@@ -692,9 +543,9 @@ func HistoryTimelineGroups(entries []*entity.HistoryEntry, skipFirstDate string)
692 }()543 }()
693 }544 }
694 ctx = templ.InitializeContext(ctx)545 ctx = templ.InitializeContext(ctx)
695- templ_7745c5c3_Var27 := templ.GetChildren(ctx)546+ templ_7745c5c3_Var23 := templ.GetChildren(ctx)
696- if templ_7745c5c3_Var27 == nil {547+ if templ_7745c5c3_Var23 == nil {
697- templ_7745c5c3_Var27 = templ.NopComponent548+ templ_7745c5c3_Var23 = templ.NopComponent
698 }549 }
699 ctx = templ.ClearChildren(ctx)550 ctx = templ.ClearChildren(ctx)
700 groups := groupHistoryEntries(entries)551 groups := groupHistoryEntries(entries)
@@ -724,28 +575,28 @@ func HistoryTimelineAppendGroups(entries []*entity.HistoryEntry, mergeFirstDate
724 }()575 }()
725 }576 }
726 ctx = templ.InitializeContext(ctx)577 ctx = templ.InitializeContext(ctx)
727- templ_7745c5c3_Var28 := templ.GetChildren(ctx)578+ templ_7745c5c3_Var24 := templ.GetChildren(ctx)
728- if templ_7745c5c3_Var28 == nil {579+ if templ_7745c5c3_Var24 == nil {
729- templ_7745c5c3_Var28 = templ.NopComponent580+ templ_7745c5c3_Var24 = templ.NopComponent
730 }581 }
731 ctx = templ.ClearChildren(ctx)582 ctx = templ.ClearChildren(ctx)
732 groups := groupHistoryEntries(entries)583 groups := groupHistoryEntries(entries)
733 for index, group := range groups {584 for index, group := range groups {
734 if index == 0 && group.Date == mergeFirstDate {585 if index == 0 && group.Date == mergeFirstDate {
735- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<div data-sv-history-merge-date=\"")586+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "<div data-sv-history-merge-date=\"")
736 if templ_7745c5c3_Err != nil {587 if templ_7745c5c3_Err != nil {
737 return templ_7745c5c3_Err588 return templ_7745c5c3_Err
738 }589 }
739- var templ_7745c5c3_Var29 string590+ var templ_7745c5c3_Var25 string
740- templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(group.Date)591+ templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(group.Date)
741 if templ_7745c5c3_Err != nil {592 if templ_7745c5c3_Err != nil {
742- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 138, Col: 47}593+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 111, Col: 47}
743 }594 }
744- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))595+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
745 if templ_7745c5c3_Err != nil {596 if templ_7745c5c3_Err != nil {
746 return templ_7745c5c3_Err597 return templ_7745c5c3_Err
747 }598 }
748- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "\">")599+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "\">")
749 if templ_7745c5c3_Err != nil {600 if templ_7745c5c3_Err != nil {
750 return templ_7745c5c3_Err601 return templ_7745c5c3_Err
751 }602 }
@@ -757,7 +608,7 @@ func HistoryTimelineAppendGroups(entries []*entity.HistoryEntry, mergeFirstDate
757 }608 }
758 }609 }
759 }610 }
760- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "</div>")611+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "</div>")
761 if templ_7745c5c3_Err != nil {612 if templ_7745c5c3_Err != nil {
762 return templ_7745c5c3_Err613 return templ_7745c5c3_Err
763 }614 }
@@ -788,48 +639,48 @@ func HistoryTimelineGroup(group historyTimelineGroup, showHeading bool) templ.Co
788 }()639 }()
789 }640 }
790 ctx = templ.InitializeContext(ctx)641 ctx = templ.InitializeContext(ctx)
791- templ_7745c5c3_Var30 := templ.GetChildren(ctx)642+ templ_7745c5c3_Var26 := templ.GetChildren(ctx)
792- if templ_7745c5c3_Var30 == nil {643+ if templ_7745c5c3_Var26 == nil {
793- templ_7745c5c3_Var30 = templ.NopComponent644+ templ_7745c5c3_Var26 = templ.NopComponent
794 }645 }
795 ctx = templ.ClearChildren(ctx)646 ctx = templ.ClearChildren(ctx)
796- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "<section class=\"sv-timeline-group\" data-sv-history-date=\"")647+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<section class=\"sv-timeline-group\" data-sv-history-date=\"")
797 if templ_7745c5c3_Err != nil {648 if templ_7745c5c3_Err != nil {
798 return templ_7745c5c3_Err649 return templ_7745c5c3_Err
799 }650 }
800- var templ_7745c5c3_Var31 string651+ var templ_7745c5c3_Var27 string
801- templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(group.Date)652+ templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(group.Date)
802 if templ_7745c5c3_Err != nil {653 if templ_7745c5c3_Err != nil {
803- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 152, Col: 69}654+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 125, Col: 69}
804 }655 }
805- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))656+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
806 if templ_7745c5c3_Err != nil {657 if templ_7745c5c3_Err != nil {
807 return templ_7745c5c3_Err658 return templ_7745c5c3_Err
808 }659 }
809- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "\">")660+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "\">")
810 if templ_7745c5c3_Err != nil {661 if templ_7745c5c3_Err != nil {
811 return templ_7745c5c3_Err662 return templ_7745c5c3_Err
812 }663 }
813 if showHeading {664 if showHeading {
814- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "<h3>")665+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 36, "<h3>")
815 if templ_7745c5c3_Err != nil {666 if templ_7745c5c3_Err != nil {
816 return templ_7745c5c3_Err667 return templ_7745c5c3_Err
817 }668 }
818- var templ_7745c5c3_Var32 string669+ var templ_7745c5c3_Var28 string
819- templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(group.Label)670+ templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(group.Label)
820 if templ_7745c5c3_Err != nil {671 if templ_7745c5c3_Err != nil {
821- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 154, Col: 20}672+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 127, Col: 20}
822 }673 }
823- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))674+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
824 if templ_7745c5c3_Err != nil {675 if templ_7745c5c3_Err != nil {
825 return templ_7745c5c3_Err676 return templ_7745c5c3_Err
826 }677 }
827- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "</h3>")678+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 37, "</h3>")
828 if templ_7745c5c3_Err != nil {679 if templ_7745c5c3_Err != nil {
829 return templ_7745c5c3_Err680 return templ_7745c5c3_Err
830 }681 }
831 }682 }
832- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "<ul class=\"sv-list\">")683+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 38, "<ul class=\"sv-list\">")
833 if templ_7745c5c3_Err != nil {684 if templ_7745c5c3_Err != nil {
834 return templ_7745c5c3_Err685 return templ_7745c5c3_Err
835 }686 }
@@ -841,7 +692,7 @@ func HistoryTimelineGroup(group historyTimelineGroup, showHeading bool) templ.Co
841 }692 }
842 }693 }
843 }694 }
844- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "</ul></section>")695+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 39, "</ul></section>")
845 if templ_7745c5c3_Err != nil {696 if templ_7745c5c3_Err != nil {
846 return templ_7745c5c3_Err697 return templ_7745c5c3_Err
847 }698 }
@@ -865,40 +716,40 @@ func HistoryLoadMore(data historyRenderData) templ.Component {
865 }()716 }()
866 }717 }
867 ctx = templ.InitializeContext(ctx)718 ctx = templ.InitializeContext(ctx)
868- templ_7745c5c3_Var33 := templ.GetChildren(ctx)719+ templ_7745c5c3_Var29 := templ.GetChildren(ctx)
869- if templ_7745c5c3_Var33 == nil {720+ if templ_7745c5c3_Var29 == nil {
870- templ_7745c5c3_Var33 = templ.NopComponent721+ templ_7745c5c3_Var29 = templ.NopComponent
871 }722 }
872 ctx = templ.ClearChildren(ctx)723 ctx = templ.ClearChildren(ctx)
873- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "<div class=\"sv-history-load-more\" data-sv-history-load-more-container>")724+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 40, "<div class=\"sv-history-load-more\" data-sv-history-load-more-container>")
874 if templ_7745c5c3_Err != nil {725 if templ_7745c5c3_Err != nil {
875 return templ_7745c5c3_Err726 return templ_7745c5c3_Err
876 }727 }
877 if showHistoryLoadMore(data) {728 if showHistoryLoadMore(data) {
878- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<button type=\"button\" class=\"sv-button sv-button-secondary\" data-sv-action=\"history.loadMore\" data-before=\"")729+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 41, "<button type=\"button\" class=\"sv-button sv-button-secondary\" data-sv-action=\"history.loadMore\" data-before=\"")
879 if templ_7745c5c3_Err != nil {730 if templ_7745c5c3_Err != nil {
880 return templ_7745c5c3_Err731 return templ_7745c5c3_Err
881 }732 }
882- var templ_7745c5c3_Var34 string733+ var templ_7745c5c3_Var30 string
883- templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(historyLoadMoreCursor(data))734+ templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(historyLoadMoreCursor(data))
884 if templ_7745c5c3_Err != nil {735 if templ_7745c5c3_Err != nil {
885- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 169, Col: 138}736+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 142, Col: 138}
886 }737 }
887- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))738+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
888 if templ_7745c5c3_Err != nil {739 if templ_7745c5c3_Err != nil {
889 return templ_7745c5c3_Err740 return templ_7745c5c3_Err
890 }741 }
891- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "\" data-sv-history-load-more>Load older visits</button>")742+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "\" data-sv-history-load-more>Load older visits</button>")
892 if templ_7745c5c3_Err != nil {743 if templ_7745c5c3_Err != nil {
893 return templ_7745c5c3_Err744 return templ_7745c5c3_Err
894 }745 }
895 } else if strings.TrimSpace(data.Query) == "" && countHistoryEntries(data.Entries) > 0 {746 } else if strings.TrimSpace(data.Query) == "" && countHistoryEntries(data.Entries) > 0 {
896- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "<p class=\"sv-meta\">End of history</p>")747+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 43, "<p class=\"sv-meta\">End of history</p>")
897 if templ_7745c5c3_Err != nil {748 if templ_7745c5c3_Err != nil {
898 return templ_7745c5c3_Err749 return templ_7745c5c3_Err
899 }750 }
900 }751 }
901- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "</div>")752+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 44, "</div>")
902 if templ_7745c5c3_Err != nil {753 if templ_7745c5c3_Err != nil {
903 return templ_7745c5c3_Err754 return templ_7745c5c3_Err
904 }755 }
@@ -922,162 +773,162 @@ func HistoryItem(entry *entity.HistoryEntry) templ.Component {
922 }()773 }()
923 }774 }
924 ctx = templ.InitializeContext(ctx)775 ctx = templ.InitializeContext(ctx)
925- templ_7745c5c3_Var35 := templ.GetChildren(ctx)776+ templ_7745c5c3_Var31 := templ.GetChildren(ctx)
926- if templ_7745c5c3_Var35 == nil {777+ if templ_7745c5c3_Var31 == nil {
927- templ_7745c5c3_Var35 = templ.NopComponent778+ templ_7745c5c3_Var31 = templ.NopComponent
928 }779 }
929 ctx = templ.ClearChildren(ctx)780 ctx = templ.ClearChildren(ctx)
930- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "<li class=\"sv-list-row\"><article class=\"sv-history-item\" data-sv-history-row data-history-id=\"")781+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 45, "<li class=\"sv-list-row\"><article class=\"sv-history-item\" data-sv-history-row data-history-id=\"")
931 if templ_7745c5c3_Err != nil {782 if templ_7745c5c3_Err != nil {
932 return templ_7745c5c3_Err783 return templ_7745c5c3_Err
933 }784 }
934- var templ_7745c5c3_Var36 string785+ var templ_7745c5c3_Var32 string
935- templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", entry.ID))786+ templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", entry.ID))
936 if templ_7745c5c3_Err != nil {787 if templ_7745c5c3_Err != nil {
937- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 178, Col: 100}788+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 151, Col: 100}
938 }789 }
939- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))790+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
940 if templ_7745c5c3_Err != nil {791 if templ_7745c5c3_Err != nil {
941 return templ_7745c5c3_Err792 return templ_7745c5c3_Err
942 }793 }
943- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "\"><div class=\"sv-history-content\">")794+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 46, "\"><div class=\"sv-history-content\">")
944 if templ_7745c5c3_Err != nil {795 if templ_7745c5c3_Err != nil {
945 return templ_7745c5c3_Err796 return templ_7745c5c3_Err
946 }797 }
947 faviconURL := historyItemFaviconURL(entry)798 faviconURL := historyItemFaviconURL(entry)
948- var templ_7745c5c3_Var37 = []any{historyFaviconClass(faviconURL)}799+ var templ_7745c5c3_Var33 = []any{historyFaviconClass(faviconURL)}
949- templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var37...)800+ templ_7745c5c3_Err = templ.RenderCSSItems(ctx, templ_7745c5c3_Buffer, templ_7745c5c3_Var33...)
950 if templ_7745c5c3_Err != nil {801 if templ_7745c5c3_Err != nil {
951 return templ_7745c5c3_Err802 return templ_7745c5c3_Err
952 }803 }
953- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "<span class=\"")804+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 47, "<span class=\"")
954 if templ_7745c5c3_Err != nil {805 if templ_7745c5c3_Err != nil {
955 return templ_7745c5c3_Err806 return templ_7745c5c3_Err
956 }807 }
957- var templ_7745c5c3_Var38 string808+ var templ_7745c5c3_Var34 string
958- templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var37).String())809+ templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.JoinStringErrs(templ.CSSClasses(templ_7745c5c3_Var33).String())
959 if templ_7745c5c3_Err != nil {810 if templ_7745c5c3_Err != nil {
960 return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 1, Col: 0}811 return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 1, Col: 0}
961 }812 }
962- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38))813+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))
963 if templ_7745c5c3_Err != nil {814 if templ_7745c5c3_Err != nil {
964 return templ_7745c5c3_Err815 return templ_7745c5c3_Err
965 }816 }
966- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "\" aria-hidden=\"true\"><span class=\"sv-history-favicon-fallback\">")817+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 48, "\" aria-hidden=\"true\"><span class=\"sv-history-favicon-fallback\">")
967 if templ_7745c5c3_Err != nil {818 if templ_7745c5c3_Err != nil {
968 return templ_7745c5c3_Err819 return templ_7745c5c3_Err
969 }820 }
970- var templ_7745c5c3_Var39 string821+ var templ_7745c5c3_Var35 string
971- templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(historyFaviconFallback(entry))822+ templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(historyFaviconFallback(entry))
972 if templ_7745c5c3_Err != nil {823 if templ_7745c5c3_Err != nil {
973- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 182, Col: 78}824+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 155, Col: 78}
974 }825 }
975- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39))826+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))
976 if templ_7745c5c3_Err != nil {827 if templ_7745c5c3_Err != nil {
977 return templ_7745c5c3_Err828 return templ_7745c5c3_Err
978 }829 }
979- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "</span> ")830+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 49, "</span> ")
980 if templ_7745c5c3_Err != nil {831 if templ_7745c5c3_Err != nil {
981 return templ_7745c5c3_Err832 return templ_7745c5c3_Err
982 }833 }
983 if faviconURL != "" {834 if faviconURL != "" {
984- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "<img src=\"")835+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 50, "<img src=\"")
985 if templ_7745c5c3_Err != nil {836 if templ_7745c5c3_Err != nil {
986 return templ_7745c5c3_Err837 return templ_7745c5c3_Err
987 }838 }
988- var templ_7745c5c3_Var40 string839+ var templ_7745c5c3_Var36 string
989- templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(templ.SafeURL(faviconURL))840+ templ_7745c5c3_Var36, templ_7745c5c3_Err = templ.JoinStringErrs(templ.SafeURL(faviconURL))
990 if templ_7745c5c3_Err != nil {841 if templ_7745c5c3_Err != nil {
991- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 184, Col: 42}842+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 157, Col: 42}
992 }843 }
993- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))844+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))
994 if templ_7745c5c3_Err != nil {845 if templ_7745c5c3_Err != nil {
995 return templ_7745c5c3_Err846 return templ_7745c5c3_Err
996 }847 }
997- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "\" alt=\"\" width=\"24\" height=\"24\" loading=\"lazy\" decoding=\"async\" referrerpolicy=\"same-origin\" onerror=\"this.parentElement.classList.remove('sv-history-favicon-has-image'); this.remove()\">")848+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 51, "\" alt=\"\" width=\"24\" height=\"24\" loading=\"lazy\" decoding=\"async\" referrerpolicy=\"same-origin\" onerror=\"this.parentElement.classList.remove('sv-history-favicon-has-image'); this.remove()\">")
998 if templ_7745c5c3_Err != nil {849 if templ_7745c5c3_Err != nil {
999 return templ_7745c5c3_Err850 return templ_7745c5c3_Err
1000 }851 }
1001 }852 }
1002- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, "</span><div class=\"sv-history-main\"><a class=\"sv-link sv-history-open\" href=\"")853+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 52, "</span><div class=\"sv-history-main\"><a class=\"sv-link sv-history-open\" href=\"")
1003 if templ_7745c5c3_Err != nil {854 if templ_7745c5c3_Err != nil {
1004 return templ_7745c5c3_Err855 return templ_7745c5c3_Err
1005 }856 }
1006- var templ_7745c5c3_Var41 templ.SafeURL857+ var templ_7745c5c3_Var37 templ.SafeURL
1007- templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(sanitizeHref(entry.URL)))858+ templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(sanitizeHref(entry.URL)))
1008 if templ_7745c5c3_Err != nil {859 if templ_7745c5c3_Err != nil {
1009- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 188, Col: 85}860+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 161, Col: 85}
1010 }861 }
1011- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41))862+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37))
1012 if templ_7745c5c3_Err != nil {863 if templ_7745c5c3_Err != nil {
1013 return templ_7745c5c3_Err864 return templ_7745c5c3_Err
1014 }865 }
1015- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, "\">")866+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 53, "\">")
1016 if templ_7745c5c3_Err != nil {867 if templ_7745c5c3_Err != nil {
1017 return templ_7745c5c3_Err868 return templ_7745c5c3_Err
1018 }869 }
1019- var templ_7745c5c3_Var42 string870+ var templ_7745c5c3_Var38 string
1020- templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinStringErrs(historyItemLabel(entry))871+ templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(historyItemLabel(entry))
1021 if templ_7745c5c3_Err != nil {872 if templ_7745c5c3_Err != nil {
1022- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 188, Col: 113}873+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 161, Col: 113}
1023 }874 }
1024- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42))875+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38))
1025 if templ_7745c5c3_Err != nil {876 if templ_7745c5c3_Err != nil {
1026 return templ_7745c5c3_Err877 return templ_7745c5c3_Err
1027 }878 }
1028- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "</a><p class=\"sv-history-url\" title=\"")879+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 54, "</a><p class=\"sv-history-url\" title=\"")
1029 if templ_7745c5c3_Err != nil {880 if templ_7745c5c3_Err != nil {
1030 return templ_7745c5c3_Err881 return templ_7745c5c3_Err
1031 }882 }
1032- var templ_7745c5c3_Var43 string883+ var templ_7745c5c3_Var39 string
1033- templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.JoinStringErrs(entry.URL)884+ templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(entry.URL)
1034 if templ_7745c5c3_Err != nil {885 if templ_7745c5c3_Err != nil {
1035- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 189, Col: 48}886+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 162, Col: 48}
1036 }887 }
1037- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43))888+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39))
1038 if templ_7745c5c3_Err != nil {889 if templ_7745c5c3_Err != nil {
1039 return templ_7745c5c3_Err890 return templ_7745c5c3_Err
1040 }891 }
1041- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 64, "\">")892+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 55, "\">")
1042 if templ_7745c5c3_Err != nil {893 if templ_7745c5c3_Err != nil {
1043 return templ_7745c5c3_Err894 return templ_7745c5c3_Err
1044 }895 }
1045- var templ_7745c5c3_Var44 string896+ var templ_7745c5c3_Var40 string
1046- templ_7745c5c3_Var44, templ_7745c5c3_Err = templ.JoinStringErrs(historyItemURL(entry))897+ templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(historyItemURL(entry))
1047 if templ_7745c5c3_Err != nil {898 if templ_7745c5c3_Err != nil {
1048- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 189, Col: 74}899+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 162, Col: 74}
1049 }900 }
1050- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var44))901+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))
1051 if templ_7745c5c3_Err != nil {902 if templ_7745c5c3_Err != nil {
1052 return templ_7745c5c3_Err903 return templ_7745c5c3_Err
1053 }904 }
1054- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 65, "</p><p class=\"sv-history-meta\">")905+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 56, "</p><p class=\"sv-history-meta\">")
1055 if templ_7745c5c3_Err != nil {906 if templ_7745c5c3_Err != nil {
1056 return templ_7745c5c3_Err907 return templ_7745c5c3_Err
1057 }908 }
1058- var templ_7745c5c3_Var45 string909+ var templ_7745c5c3_Var41 string
1059- templ_7745c5c3_Var45, templ_7745c5c3_Err = templ.JoinStringErrs(historyItemMeta(entry))910+ templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinStringErrs(historyItemMeta(entry))
1060 if templ_7745c5c3_Err != nil {911 if templ_7745c5c3_Err != nil {
1061- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 190, Col: 56}912+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 163, Col: 56}
1062 }913 }
1063- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var45))914+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41))
1064 if templ_7745c5c3_Err != nil {915 if templ_7745c5c3_Err != nil {
1065 return templ_7745c5c3_Err916 return templ_7745c5c3_Err
1066 }917 }
1067- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 66, "</p></div></div><div class=\"sv-history-row-actions\"><a class=\"sv-button sv-button-secondary\" href=\"")918+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 57, "</p></div></div><div class=\"sv-history-row-actions\"><a class=\"sv-button sv-button-secondary\" href=\"")
1068 if templ_7745c5c3_Err != nil {919 if templ_7745c5c3_Err != nil {
1069 return templ_7745c5c3_Err920 return templ_7745c5c3_Err
1070 }921 }
1071- var templ_7745c5c3_Var46 templ.SafeURL922+ var templ_7745c5c3_Var42 templ.SafeURL
1072- templ_7745c5c3_Var46, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(sanitizeHref(entry.URL)))923+ templ_7745c5c3_Var42, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(sanitizeHref(entry.URL)))
1073 if templ_7745c5c3_Err != nil {924 if templ_7745c5c3_Err != nil {
1074- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 194, Col: 90}925+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 167, Col: 90}
1075 }926 }
1076- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var46))927+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var42))
1077 if templ_7745c5c3_Err != nil {928 if templ_7745c5c3_Err != nil {
1078 return templ_7745c5c3_Err929 return templ_7745c5c3_Err
1079 }930 }
1080- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 67, "\">")931+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 58, "\">")
1081 if templ_7745c5c3_Err != nil {932 if templ_7745c5c3_Err != nil {
1082 return templ_7745c5c3_Err933 return templ_7745c5c3_Err
1083 }934 }
@@ -1085,30 +936,30 @@ func HistoryItem(entry *entity.HistoryEntry) templ.Component {
1085 if templ_7745c5c3_Err != nil {936 if templ_7745c5c3_Err != nil {
1086 return templ_7745c5c3_Err937 return templ_7745c5c3_Err
1087 }938 }
1088- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 68, "</a> <button type=\"button\" class=\"sv-button sv-button-secondary sv-button-danger sv-button-icon-only\" data-sv-action=\"history.deleteEntry\" data-id=\"")939+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 59, "</a> <button type=\"button\" class=\"sv-button sv-button-secondary sv-button-danger sv-button-icon-only\" data-sv-action=\"history.deleteEntry\" data-id=\"")
1089 if templ_7745c5c3_Err != nil {940 if templ_7745c5c3_Err != nil {
1090 return templ_7745c5c3_Err941 return templ_7745c5c3_Err
1091 }942 }
1092- var templ_7745c5c3_Var47 string943+ var templ_7745c5c3_Var43 string
1093- templ_7745c5c3_Var47, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", entry.ID))944+ templ_7745c5c3_Var43, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("%d", entry.ID))
1094 if templ_7745c5c3_Err != nil {945 if templ_7745c5c3_Err != nil {
1095- return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 195, Col: 175}946+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `history.templ`, Line: 168, Col: 175}
1096 }947 }
1097- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var47))948+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43))
1098 if templ_7745c5c3_Err != nil {949 if templ_7745c5c3_Err != nil {
1099 return templ_7745c5c3_Err950 return templ_7745c5c3_Err
1100 }951 }
1101- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 69, "\" data-sv-confirm=\"Delete this history entry?\" aria-label=\"Delete this history entry\"")952+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 60, "\" data-sv-confirm=\"Delete this history entry?\" aria-label=\"Delete this history entry\"")
1102 if templ_7745c5c3_Err != nil {953 if templ_7745c5c3_Err != nil {
1103 return templ_7745c5c3_Err954 return templ_7745c5c3_Err
1104 }955 }
1105 if entry.ID <= 0 {956 if entry.ID <= 0 {
1106- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 70, " disabled")957+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 61, " disabled")
1107 if templ_7745c5c3_Err != nil {958 if templ_7745c5c3_Err != nil {
1108 return templ_7745c5c3_Err959 return templ_7745c5c3_Err
1109 }960 }
1110 }961 }
1111- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 71, ">")962+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 62, ">")
1112 if templ_7745c5c3_Err != nil {963 if templ_7745c5c3_Err != nil {
1113 return templ_7745c5c3_Err964 return templ_7745c5c3_Err
1114 }965 }
@@ -1116,7 +967,7 @@ func HistoryItem(entry *entity.HistoryEntry) templ.Component {
1116 if templ_7745c5c3_Err != nil {967 if templ_7745c5c3_Err != nil {
1117 return templ_7745c5c3_Err968 return templ_7745c5c3_Err
1118 }969 }
1119- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 72, "</button></div></article></li>")970+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 63, "</button></div></article></li>")
1120 if templ_7745c5c3_Err != nil {971 if templ_7745c5c3_Err != nil {
1121 return templ_7745c5c3_Err972 return templ_7745c5c3_Err
1122 }973 }
M internal/ui/systemviews/history_view.go +13 -29
@@ -12,8 +12,6 @@ import (
1212
1313 const historyURLDisplayMaxRunes = 180
1414
15-const historySearchTitleMaxRunes = 48
16-
1715 type historyRenderData struct {
1816 Entries []*entity.HistoryEntry
1917 Stats *entity.HistoryStats
@@ -55,37 +53,23 @@ func historyTimelineAppendHTML(data historyRenderData) string {
5553
5654 func historyDocumentTitle(data historyRenderData) string {
5755 if data.Loading {
58- return "History — Loading"
59- }
60- if query := strings.TrimSpace(data.Query); query != "" {
61- return "History — search: " + truncateTitle(query, historySearchTitleMaxRunes)
56+ return "History - Loading"
6257 }
63- if domain := strings.TrimSpace(data.DomainFilter); domain != "" {
64- label := browserurl.DisplayDomain(domain)
65- if label == "" {
66- label = domain
67- }
68- return "History — " + label
69- }
70-
71- entries := int64(countHistoryEntries(data.Entries))
72- if data.Stats != nil {
73- entries = data.Stats.TotalEntries
74- } else if data.Analytics != nil {
75- entries = data.Analytics.TotalEntries
76- }
77- if entries == 1 {
78- return "History — 1 entry"
79- }
80- return fmt.Sprintf("History — %d entries", entries)
58+ entries, visits, days := historySummaryValues(data)
59+ return fmt.Sprintf(
60+ "History - %s, %s, %s",
61+ historyCountLabel(entries, "entry", "entries"),
62+ historyCountLabel(visits, "visit", "visits"),
63+ historyCountLabel(days, "day", "days"),
64+ )
8165 }
8266
83-func truncateTitle(value string, maxRunes int) string {
84- runes := []rune(strings.TrimSpace(value))
85- if maxRunes <= 0 || len(runes) <= maxRunes {
86- return string(runes)
67+func historyCountLabel(count int64, singular, plural string) string {
68+ label := plural
69+ if count == 1 {
70+ label = singular
8771 }
88- return string(runes[:maxRunes]) + "…"
72+ return fmt.Sprintf("%d %s", count, label)
8973 }
9074
9175 var historyCleanupRanges = []historyCleanupItem{
@@ -12,8 +12,6 @@ import (
12 12
13 const historyURLDisplayMaxRunes = 18013 const historyURLDisplayMaxRunes = 180
14 14
15-const historySearchTitleMaxRunes = 48
16-
17 type historyRenderData struct {15 type historyRenderData struct {
18 Entries []*entity.HistoryEntry16 Entries []*entity.HistoryEntry
19 Stats *entity.HistoryStats17 Stats *entity.HistoryStats
@@ -55,37 +53,23 @@ func historyTimelineAppendHTML(data historyRenderData) string {
55 53
56 func historyDocumentTitle(data historyRenderData) string {54 func historyDocumentTitle(data historyRenderData) string {
57 if data.Loading {55 if data.Loading {
58- return "History — Loading"56+ return "History - Loading"
59- }
60- if query := strings.TrimSpace(data.Query); query != "" {
61- return "History — search: " + truncateTitle(query, historySearchTitleMaxRunes)
62 }57 }
63- if domain := strings.TrimSpace(data.DomainFilter); domain != "" {58+ entries, visits, days := historySummaryValues(data)
64- label := browserurl.DisplayDomain(domain)59+ return fmt.Sprintf(
65- if label == "" {60+ "History - %s, %s, %s",
66- label = domain61+ historyCountLabel(entries, "entry", "entries"),
67- }62+ historyCountLabel(visits, "visit", "visits"),
68- return "History — " + label63+ historyCountLabel(days, "day", "days"),
69- }64+ )
70-
71- entries := int64(countHistoryEntries(data.Entries))
72- if data.Stats != nil {
73- entries = data.Stats.TotalEntries
74- } else if data.Analytics != nil {
75- entries = data.Analytics.TotalEntries
76- }
77- if entries == 1 {
78- return "History — 1 entry"
79- }
80- return fmt.Sprintf("History — %d entries", entries)
81 }65 }
82 66
83-func truncateTitle(value string, maxRunes int) string {67+func historyCountLabel(count int64, singular, plural string) string {
84- runes := []rune(strings.TrimSpace(value))68+ label := plural
85- if maxRunes <= 0 || len(runes) <= maxRunes {69+ if count == 1 {
86- return string(runes)70+ label = singular
87 }71 }
88- return string(runes[:maxRunes]) + "…"72+ return fmt.Sprintf("%d %s", count, label)
89 }73 }
90 74
91 var historyCleanupRanges = []historyCleanupItem{75 var historyCleanupRanges = []historyCleanupItem{

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close