Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attachments, GPX Maps, Global Search, Security #460

Merged
merged 37 commits into from
Jan 27, 2025
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9132ef3
fix: add 'finding_recommendations' key and update 'no_adventures_to_r…
seanmorley15 Jan 18, 2025
d60945d
feat: implement global search functionality for adventures, collectio…
seanmorley15 Jan 18, 2025
f10e171
fix: update RegionCard component to handle undefined visited state an…
seanmorley15 Jan 18, 2025
433599d
feat: implement protected media serving and permission checks for adv…
seanmorley15 Jan 18, 2025
aa216f5
feat: add Attachment model and implement file permission checks for m…
seanmorley15 Jan 19, 2025
e0fa62c
feat: add GSAP animations to signup, login, and dashboard pages; incl…
seanmorley15 Jan 19, 2025
e9538b7
Add basic PWA
larsl-net Jan 19, 2025
3ccd078
Add Service Worker
larsl-net Jan 19, 2025
a88e598
Fix service worker
larsl-net Jan 19, 2025
94c3e3d
feat: implement attachment management with upload, delete, and permis…
seanmorley15 Jan 20, 2025
1f3abf7
feat: replace placeholder image with gradient background and text for…
seanmorley15 Jan 20, 2025
25edec4
feat: enhance search page with reactive data updates and simplify com…
seanmorley15 Jan 20, 2025
30c58ca
feat: refactor AttachmentCard component to handle delete action local…
seanmorley15 Jan 20, 2025
64d2bde
feat: add GPX file handling and GeoJSON integration in adventure page…
seanmorley15 Jan 21, 2025
f9cf920
feat: enhance CategoryModal with loading state and remove unused acti…
seanmorley15 Jan 22, 2025
1b3cf6a
feat: add keyboard shortcut to focus search input in Navbar and clean…
seanmorley15 Jan 22, 2025
6e28e52
feat: enhance attachment handling with new localization strings and G…
seanmorley15 Jan 22, 2025
3f30819
feat: add GPX file support in AdventureModal and improve map marker h…
seanmorley15 Jan 22, 2025
10230e9
build(deps-dev): bump vite
dependabot[bot] Jan 22, 2025
1447a94
Merge pull request #461 from seanmorley15/dependabot/npm_and_yarn/fro…
seanmorley15 Jan 22, 2025
d5fe7ee
build(deps): bump the npm_and_yarn group across 2 directories with 1 …
dependabot[bot] Jan 22, 2025
6ea0e07
Merge pull request #462 from seanmorley15/dependabot/npm_and_yarn/doc…
seanmorley15 Jan 22, 2025
0eb4bc7
feat: enhance adventure handling with user ID support in serializers …
seanmorley15 Jan 22, 2025
12a6429
Merge branch 'development' of github.com:seanmorley15/AdventureLog in…
seanmorley15 Jan 22, 2025
9e66c67
fix: Display adventure category icon also on collection maps
larsl-net Jan 23, 2025
f04a6e3
Remove package-lock.json
larsl-net Jan 23, 2025
69967b7
fix: Error loading calender when transport has no date
larsl-net Jan 23, 2025
8fee537
feat: Open collection calendar on start date
larsl-net Jan 23, 2025
8fef53f
Merge pull request #466 from larsl-net/calendar-collection-range
seanmorley15 Jan 23, 2025
6b09009
Merge pull request #465 from larsl-net/collection-map-icons
seanmorley15 Jan 23, 2025
abaee8c
feat: Add attachments array to recommendation object and update optio…
seanmorley15 Jan 23, 2025
37fca9b
Merge branch 'development' of github.com:seanmorley15/AdventureLog in…
seanmorley15 Jan 23, 2025
6a5bfbd
feat: Enhance adventure marker popup with image carousel and visit de…
seanmorley15 Jan 23, 2025
d326d38
feat: Update session cookie domain handling using publicsuffix2 and p…
seanmorley15 Jan 27, 2025
f5dc0ce
feat: Refactor session cookie domain handling to use psl for improved…
seanmorley15 Jan 27, 2025
680a237
Merge pull request #458 from larsl-net/basic-pwa
seanmorley15 Jan 27, 2025
3468e82
feat: Sanitize FRONTEND_URL by removing quotes for improved URL parsing
seanmorley15 Jan 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: add keyboard shortcut to focus search input in Navbar and clean…
… up dashboard animations
  • Loading branch information
seanmorley15 committed Jan 22, 2025
commit 1b3cf6ab39748971111326463176ebde7fd7e9e4
50 changes: 30 additions & 20 deletions frontend/src/lib/components/Navbar.svelte
Original file line number Diff line number Diff line change
@@ -12,6 +12,28 @@
import { page } from '$app/stores';
import { t, locale, locales } from 'svelte-i18n';
import { themes } from '$lib';
import { onMount } from 'svelte';
let inputElement: HTMLInputElement | null = null;

// Event listener for focusing input
function handleKeydown(event: KeyboardEvent) {
if (event.key === '/' && document.activeElement !== inputElement) {
event.preventDefault(); // Prevent browser's search shortcut
if (inputElement) {
inputElement.focus();
}
}
}

onMount(() => {
// Attach event listener on component mount
document.addEventListener('keydown', handleKeydown);

// Cleanup event listener on component destruction
return () => {
document.removeEventListener('keydown', handleKeydown);
};
});

let languages: { [key: string]: string } = {
en: 'English',
@@ -123,12 +145,7 @@
{#if data.user}
<form class="flex gap-2">
<label class="input input-bordered flex items-center gap-2">
<input
type="text"
bind:value={query}
class="grow"
placeholder={$t('navbar.search')}
/>
<input type="text" bind:value={query} placeholder={$t('navbar.search')} />

<svg
xmlns="http://www.w3.org/2000/svg"
@@ -200,20 +217,13 @@
{#if data.user}
<form class="flex gap-2">
<label class="input input-bordered flex items-center gap-2">
<input type="text" bind:value={query} class="grow" placeholder={$t('navbar.search')} />

<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
fill="currentColor"
class="h-4 w-4 opacity-70"
>
<path
fill-rule="evenodd"
d="M9.965 11.026a5 5 0 1 1 1.06-1.06l2.755 2.754a.75.75 0 1 1-1.06 1.06l-2.755-2.754ZM10.5 7a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z"
clip-rule="evenodd"
/>
</svg>
<input
type="text"
bind:value={query}
class="grow"
placeholder={$t('navbar.search')}
bind:this={inputElement}
/><kbd class="kbd">/</kbd>
</label>
<button on:click={searchGo} type="submit" class="btn btn-neutral"
>{$t('navbar.search')}</button
10 changes: 0 additions & 10 deletions frontend/src/routes/dashboard/+page.svelte
Original file line number Diff line number Diff line change
@@ -43,17 +43,7 @@
ease: 'power2.out',
delay: 0 // Shorter delay for quicker appearance
});

// Inspiration section with faster bounce effect
gsap.from('.inspiration', {
opacity: 0,
scale: 0.7, // Less scale for snappier effect
duration: 1, // Slightly quicker duration
ease: 'elastic.out(0.75, 0.5)', // Snappier bounce
delay: 0 // Reduced delay for quicker animation
});
});

export let data: PageData;

import FlagCheckeredVariantIcon from '~icons/mdi/flag-checkered-variant';
Loading