40 Commits

Author SHA1 Message Date
Kamil Jiwa a1148f6b6c Serve config.js network-first so deploy-time edits aren't frozen by the service worker (#1283)
* Serve config.js network-first so deploy-time edits aren't frozen by the service worker

* Simplify documentation and do not support subpath deployments
2026-06-29 09:54:38 +02:00
David Straub e9239944e7 Nuclear option: remove index.html caching, skip waiting 2026-05-23 14:44:00 +02:00
David Straub 8d755869df More sw fixes 2026-05-23 11:53:48 +02:00
David Straub 10117f5a01 Fix sw error 2026-04-08 10:50:20 +00:00
David Straub 5c3b8c65a2 Cache thumbnails in service worker (#1044)
* Cache thumbnails in service worker

* comment
2026-04-06 11:41:08 +02:00
David Straub 9d2edde66a Improve new tag dialog (#1030)
* Improve new tag dialog

* Style tweaks

* Reviewer comment 1

* Reviewer comment
2026-04-02 13:45:11 +02:00
David Straub 84ade5df00 Add optional TypeScript support (#981)
* Add optional TypeScript support

* Address comment
2026-03-08 17:28:17 +01:00
David Straub b0dc731b6d Update build system (#980)
* Update build system

* Remove babel

* Update rollup

* Address reviewer comment
2026-03-08 16:40:58 +01:00
M. Schüpbach 280c212162 Dark mode (#145) (#755)
* Add theme select to settings view

* WIP: dark mode colors

* Use system theme by default

* Fix eslint error

* Move variables unrelated to theme back to SharedStyles.js

* Move theme css variables to separate file

* Revert light theme colors

* WIP: replace hardcoded colors with variables

* Add commas to rgb values for vs code to show color decorators

* Fix invalid color code

* Remove unused css

* WIP: replace hardcoded colors with variables

* WIP: replace hardcoded colors with variables

* WIP: replace hardcoded colors with variables

* WIP: replace hardcoded colors with variables

* WIP: replace hardcoded colors with variables

* WIP: replace hardcoded colors with variables

* Set dark theme colors for legacy material components

* Set dark theme colors for legacy checkbox component

* Change primary color for dark theme

* Imrove fan chart text colors for dark mode

* Set dark theme outline colors for legacy button component

* Fix light mode background colors when dialog is open

* Change primary color for dark theme

* Sync map theme with gramps theme

* Make theme selector translatable

* Improve contrast for mwc-dialog in dark theme

* Replace hardcoded colors with variables

* Fix contrast for broken image in dark theme
2025-10-12 10:39:14 +02:00
David Straub 807fc058f1 Migrate map rendering from Leaflet to MapLibre GL (#678)
* Migrate map rendering from Leaflet to MapLibre GL (#673)

* refactor: migrate from Leaflet to MapLibre GL for map rendering

- Removed Leaflet dependencies and related code from GrampsjsMap, GrampsjsMapMarker, and GrampsjsMapOverlay components.
- Integrated MapLibre GL for map rendering and marker management.
- Updated map style switching functionality to support MapLibre GL styles.
- Enhanced marker and overlay handling using MapLibre GL's API.
- Updated package dependencies to use MapLibre GL version 5.6.0 and removed obsolete packages.

* refactor: remove unnecessary import of maplibregl from GrampsjsMap and GrampsjsMapMarker

* Update src/components/GrampsjsMap.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: update attribution control handling in GrampsjsMap

* refactor: remove unused Leaflet CSS file

* fix: update style positioning for map style switcher

* refactor: replace Leaflet methods with MapLibre GL JS equivalents and update bounds format

* fix: correct bounds order for MapLibre coordinates in GrampsjsMapOverlay

* refactor: remove redundant attribution update logic in style change handler

* fix: remove debug log from map click handler

* fix: ensure correct overlay addition and layer management in GrampsjsMapOverlay

* fix: adjust width of style switcher container in GrampsjsMap

* fix: remove unused CSS file from copy targets in rollup configuration

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Use OpenFreeMap, add icon to layer switcher

* Fix appstate in map

* Use material for layer switcher

* Tweak style of layer switcher

* Fix edit lat long, partially fix edit map layer

* Modify layer switcher

* Fix map bounds

* Fix year filter for OHM on layer change

* Refactor layer switcher into component

* Make layer switcher work for overlays

* Remove debug log statement

* Use local CSS for MapLibre

---------

Co-authored-by: Muhammad Imran Siddique <muimsd@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-28 16:13:19 +02:00
David Straub 39fb66273b Fix config.js bundling 2025-03-08 12:52:04 +01:00
Théo Chamley a2b12fbb66 Ignore index.html in service worker cache (#522)
Fixes #517

By default, index.html is cached by the service worker. This is
breaks the application if it's hosted behind an authentifying proxy
which requires periodic revalidation of an auth token.
Specifically, once the auth token expires
1. The index.html is still served from the service worker cache.
2. Subsequent requests (e.g for JS resources) are redirected to the
   login page of the proxy.
3. That login page is never displayed to the user as index.html has been
   successfully loaded.
4. All requests but index.html fail, and the app displays a blank page.

This change fixes this behavior by preventing index.html from being
cached by the service worker. With that change, once the auth token from
the proxy expires:
1. The request for index.html is not served from the service worker
   cache.
2. Instead, a network request for index.html is made, and the user is
   properly redirected to the proxy login page.
3. The user logs in, and index.html is served as normal.
4. Subsequent requests (e.g for JS resources) succeed as now the auth
   token has been refreshed.
2024-11-10 09:06:42 +01:00
khashashin 62cb82618b Remove rollup-plugin-import-assertions (#460)
* Remove rollup-plugin-import-assertions from package.json

* Remove rollup-plugin-import-assertions from rollup.config.js
2024-06-29 16:12:15 +02:00
David Straub a4ce54dfe8 Add language JSON files to build 2024-06-28 09:56:21 +02:00
David Straub 680e09936f Show system info in settings (fixes #233) 2023-06-28 21:45:18 +02:00
David Straub b7251475f7 Add frontend config file 2023-05-08 17:18:26 +02:00
David Straub bd4fbb94b7 Include tippy CSS in dist 2023-04-06 08:31:54 +02:00
David Straub 83c83fd81e Add tooltips (#196) 2023-04-05 19:56:23 +02:00
David Straub 82706fb27f Completely reimplement tree charts with d3 2023-02-15 21:24:43 +01:00
David Straub 36dc8f2922 Add CSS to bundle 2022-11-14 20:56:40 +01:00
David Straub 3c4e93b7e4 Bundle fonts 2022-11-13 19:14:51 +01:00
David Straub 909c76cd49 Fix linting and formatting (fixes #86) (#93)
* Update eslint config

* Add vscode

* Remove eslintrc

* npm run format

* Fix some linter errors

* Fix more linter error

* More lint fixes

* Remove stories

* Fix lint error in test

* Fix lint errors in tests

* lint error in test

* Fix more linter errors

* test

* test

* test

* Remove semi

* Remove bracket space

* remove

* Remove semi

* Fix more lint errors

* Fix more lint errors

* Fix remaining lints

* Fix remaining lint issues

* Format

* Add unit test workflow

* Fix wrong import
2022-08-28 14:50:37 +02:00
khashashin 34ee1abf12 Feat/i18n (#87)
* add new translations and fix existing

* add index file to handle exporting all translations so we can import them as a single line in string.js

* Added some plugins to handle json translation files.
Rollup now converts them to javascript objects during application build

* upgrade rollup to 2.60.2 to fix build issues

* Add more translation strings
2022-08-19 13:28:28 +02:00
David Straub e47dfcb8d4 Fix typo 2021-10-03 20:44:42 +02:00
David Straub 1b60fd812b Don't skip waiting automatically 2021-10-03 20:26:53 +02:00
David Straub bd55741321 Try deploying graphviz wasm 2021-10-03 15:29:47 +02:00
David Straub dcfe9ae4d6 Add manifest to rollup config 2021-09-24 22:05:49 +02:00
David Straub 9a34295c18 Do not use uuid due to issues with crypto 2021-09-24 16:56:40 +02:00
David Straub ef33390fec Add node polyfills 2021-09-24 16:32:18 +02:00
David Straub eb6d427cd9 Fix base dir replacement 2021-08-08 10:34:41 +02:00
David Straub 2ba1fa2813 Replace base dir in build 2021-08-08 10:18:49 +02:00
David Straub 73cbdef042 Fix routing if base dir is not null (#15) 2021-08-08 10:12:43 +02:00
David Straub 35e6b86276 Fix workbox config 2021-01-20 20:00:20 +01:00
David Straub 33362d4e86 Ignore api paths in service worker cache (#14) 2021-01-20 19:57:11 +01:00
David Straub 916cbe9d9a [rollup] Add BASE_DIR environment variable 2021-01-02 14:45:39 +01:00
David Straub db50dfaccf [rollup] Add API_URL environment variable 2021-01-02 14:15:25 +01:00
David Straub 3bdbfb5b29 Add dashboard view 2020-12-23 22:20:21 +01:00
David Straub 58e7f8d3de Rollup: copy leaflet CSS 2020-12-20 20:30:00 +01:00
David Straub 38121f3365 Update rollup config 2020-12-18 20:10:51 +01:00
David Straub 4b10b948da Open WC boilerplate 2020-11-08 11:29:01 +01:00