From e13a4afddebcdcfcb311d26d6ee3be36c4dd5f83 Mon Sep 17 00:00:00 2001 From: Tagaishi Date: Sat, 30 Dec 2023 20:09:17 +0100 Subject: [PATCH] feat: remove location based timezone resolving (#1680) --- package.json | 1 - public/locales/en/modules/date.json | 21 +- .../Tiles/Widgets/WidgetsEditModal.tsx | 1 + src/server/api/root.ts | 2 - src/server/api/routers/timezone.ts | 19 - src/widgets/date/DateTile.tsx | 63 +- yarn.lock | 1598 +---------------- 7 files changed, 71 insertions(+), 1634 deletions(-) delete mode 100644 src/server/api/routers/timezone.ts diff --git a/package.json b/package.json index d2ac3e5e7..9e336f36f 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,6 @@ "axios": "^1.0.0", "bcryptjs": "^2.4.3", "better-sqlite3": "^8.6.0", - "browser-geo-tz": "^0.0.4", "consola": "^3.0.0", "cookies": "^0.8.0", "cookies-next": "^2.1.1", diff --git a/public/locales/en/modules/date.json b/public/locales/en/modules/date.json index 1a9e36efc..5dc6c0572 100644 --- a/public/locales/en/modules/date.json +++ b/public/locales/en/modules/date.json @@ -4,6 +4,13 @@ "description": "Displays the current date and time.", "settings": { "title": "Settings for Date and Time widget", + "timezone":{ + "label":"Timezone", + "info":"Select the name of your timezone, find yours here: " + }, + "customTitle":{ + "label":"City name or custom title" + }, "display24HourFormat": { "label": "Display full time (24-hour)" }, @@ -13,18 +20,12 @@ "hide": "Hide Date" } }, - "enableTimezone": { - "label": "Display a custom Timezone" - }, - "timezoneLocation": { - "label": "Timezone Location" - }, "titleState": { - "label": "City title", - "info": "In case you activate the Timezone option, the name of the city and the timezone code can be shown.
You can also show the city alone or even show none.", + "label": "Clock title", + "info": "The custom title and the timezone code can be shown on your widget.
You can also show the city alone, show none,
or even show the timezone alone when both are selected but no title is provided.", "data": { - "both": "City and Timezone", - "city": "City only", + "both": "Title and Timezone", + "city": "Title only", "none": "None" } } diff --git a/src/components/Dashboard/Tiles/Widgets/WidgetsEditModal.tsx b/src/components/Dashboard/Tiles/Widgets/WidgetsEditModal.tsx index 738473177..750231281 100644 --- a/src/components/Dashboard/Tiles/Widgets/WidgetsEditModal.tsx +++ b/src/components/Dashboard/Tiles/Widgets/WidgetsEditModal.tsx @@ -207,6 +207,7 @@ const WidgetOptionTypeSwitch: FC<{ {info && }