Improve FAQ & video rendering, tighten homepage and CSS
This commit is contained in:
parent
05a1f316e1
commit
c69bb0d614
48 changed files with 4689 additions and 1077 deletions
|
|
@ -70,10 +70,18 @@ export function parseUrlState(): {
|
|||
tab?: 'properties' | 'area';
|
||||
travelTime?: TravelTimeInitial;
|
||||
postcode?: string;
|
||||
share?: string;
|
||||
} {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const result: ReturnType<typeof parseUrlState> = {};
|
||||
|
||||
// Share-link code: grants bbox-scoped access to the area the link references
|
||||
// even for unlicensed users. The backend looks the code up against PocketBase.
|
||||
const share = params.get('share');
|
||||
if (share && /^[a-z0-9]{1,20}$/i.test(share)) {
|
||||
result.share = share;
|
||||
}
|
||||
|
||||
// View state: separate lat/lon/zoom params
|
||||
const lat = params.get('lat');
|
||||
const lon = params.get('lon');
|
||||
|
|
@ -146,10 +154,15 @@ export function stateToParams(
|
|||
features: FeatureMeta[],
|
||||
selectedPOICategories: Set<string>,
|
||||
rightPaneTab: 'properties' | 'area',
|
||||
travelTimeEntries?: TravelTimeEntry[]
|
||||
travelTimeEntries?: TravelTimeEntry[],
|
||||
share?: string
|
||||
): URLSearchParams {
|
||||
const params = new URLSearchParams();
|
||||
|
||||
if (share) {
|
||||
params.set('share', share);
|
||||
}
|
||||
|
||||
if (viewState) {
|
||||
params.set('lat', viewState.latitude.toFixed(4));
|
||||
params.set('lon', viewState.longitude.toFixed(4));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue