diff --git a/.swift-version b/.swift-version deleted file mode 100644 index 9ad974f610..0000000000 --- a/.swift-version +++ /dev/null @@ -1 +0,0 @@ -5.5 diff --git a/special-pages/pages/history/app/components/Item.js b/special-pages/pages/history/app/components/Item.js index 7dc90bfa02..7ad81274e6 100644 --- a/special-pages/pages/history/app/components/Item.js +++ b/special-pages/pages/history/app/components/Item.js @@ -18,7 +18,7 @@ export const Item = memo( * @param {string} props.url - The text to be displayed for the item. * @param {string} props.domain - The text to be displayed for the domain * @param {number} props.kind - The kind or type of the item that determines its visual style. - * @param {string} props.dateTimeOfDay - the time of day, like 11.00am. + * @param {string} [props.dateTimeOfDay] - the time of day, like 11.00am. * @param {string} props.dateRelativeDay - the time of day, like 11.00am. * @param {string|null} props.etldPlusOne * @param {number} props.index - original index @@ -63,7 +63,7 @@ export const Item = memo( {props.domain} - {dateTimeOfDay} + {dateTimeOfDay && {dateTimeOfDay}} diff --git a/special-pages/pages/history/app/components/Sidebar.js b/special-pages/pages/history/app/components/Sidebar.js index 240414470d..cf9a25771e 100644 --- a/special-pages/pages/history/app/components/Sidebar.js +++ b/special-pages/pages/history/app/components/Sidebar.js @@ -28,6 +28,7 @@ const iconMap = { saturday: 'icons/day.svg', sunday: 'icons/day.svg', older: 'icons/older.svg', + sites: 'icons/sites.svg', }; /** @type {Record string) => string>} */ @@ -43,6 +44,7 @@ const titleMap = { saturday: (t) => t('range_saturday'), sunday: (t) => t('range_sunday'), older: (t) => t('range_older'), + sites: (t) => t('range_sites'), }; /** @@ -182,6 +184,7 @@ function labels(range, t) { case 'thursday': case 'friday': case 'saturday': + case 'sites': case 'sunday': return { linkLabel: t('show_history_for', { range }), buttonLabel: t('delete_history_for', { range }) }; case 'older': diff --git a/special-pages/pages/history/app/history.service.js b/special-pages/pages/history/app/history.service.js index 75e6df3c80..50c3814670 100644 --- a/special-pages/pages/history/app/history.service.js +++ b/special-pages/pages/history/app/history.service.js @@ -421,6 +421,7 @@ export function toRange(input) { 'sunday', 'recentlyOpened', 'older', + 'sites', ]; return valid.includes(input) ? /** @type {import('../types/history.js').RangeId} */ (input) : null; } diff --git a/special-pages/pages/history/app/mocks/mock-transport.js b/special-pages/pages/history/app/mocks/mock-transport.js index 65966a1807..d7b4d2948e 100644 --- a/special-pages/pages/history/app/mocks/mock-transport.js +++ b/special-pages/pages/history/app/mocks/mock-transport.js @@ -40,6 +40,7 @@ export function mockTransport() { { id: 'saturday', count: 1 }, { id: 'friday', count: 1 }, { id: 'older', count: 1 }, + { id: 'sites', count: 1 }, ], }; @@ -268,8 +269,10 @@ function queryResponseFrom(memory, msg) { const response = asResponse(memory.slice(0, 10), msg.params.offset, msg.params.limit); const range = msg.params.query.range; response.value = response.value.map((item) => { + if (!('range' in msg.params.query)) return item; // unreachable return { ...item, + dateTimeOfDay: msg.params.query.range === 'sites' ? undefined : item.dateTimeOfDay, title: 'range:' + range + ' ' + item.title, }; }); diff --git a/special-pages/pages/history/app/strings.json b/special-pages/pages/history/app/strings.json index ae93ea6f7e..823926070b 100644 --- a/special-pages/pages/history/app/strings.json +++ b/special-pages/pages/history/app/strings.json @@ -106,5 +106,9 @@ "range_older": { "title": "Older", "note": "Label on a button that shows older history entries." + }, + "range_sites": { + "title": "Sites", + "note": "Label on a button that shows which sites have been visited" } } \ No newline at end of file diff --git a/special-pages/pages/history/messages/types/history-item.json b/special-pages/pages/history/messages/types/history-item.json index 4dc26a01de..ce59b515a2 100644 --- a/special-pages/pages/history/messages/types/history-item.json +++ b/special-pages/pages/history/messages/types/history-item.json @@ -5,7 +5,6 @@ "id", "dateRelativeDay", "dateShort", - "dateTimeOfDay", "domain", "time", "title", diff --git a/special-pages/pages/history/messages/types/range.json b/special-pages/pages/history/messages/types/range.json index 473685ba63..2dd15c0ce1 100644 --- a/special-pages/pages/history/messages/types/range.json +++ b/special-pages/pages/history/messages/types/range.json @@ -29,7 +29,8 @@ "friday", "saturday", "sunday", - "older" + "older", + "sites" ] } }, diff --git a/special-pages/pages/history/public/icons/sites.svg b/special-pages/pages/history/public/icons/sites.svg new file mode 100644 index 0000000000..27eb7ad66c --- /dev/null +++ b/special-pages/pages/history/public/icons/sites.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/special-pages/pages/history/public/locales/en/history.json b/special-pages/pages/history/public/locales/en/history.json index b544b6e5a1..3250c691fd 100644 --- a/special-pages/pages/history/public/locales/en/history.json +++ b/special-pages/pages/history/public/locales/en/history.json @@ -116,5 +116,9 @@ "range_older": { "title": "Older", "note": "Label on a button that shows older history entries." + }, + "range_sites": { + "title": "Sites", + "note": "Label on a button that shows which sites have been visited" } } \ No newline at end of file diff --git a/special-pages/pages/history/types/history.ts b/special-pages/pages/history/types/history.ts index 2635f8f2f1..967558d6bf 100644 --- a/special-pages/pages/history/types/history.ts +++ b/special-pages/pages/history/types/history.ts @@ -31,7 +31,8 @@ export type RangeId = | "friday" | "saturday" | "sunday" - | "older"; + | "older" + | "sites"; export type QueryKind = SearchTerm | DomainFilter | RangeFilter; /** * Indicates the query was triggered before the UI was rendered @@ -266,7 +267,7 @@ export interface HistoryItem { /** * The time of day in 24-hour format (e.g., '11:01'). */ - dateTimeOfDay: string; + dateTimeOfDay?: string; /** * The eTLD+1 version of the domain, representing the domain and its top-level domain (e.g., 'example.com', 'localhost'). This differs from 'domain', which may include subdomains (e.g., 'www.youtube.com'). */