mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-21 22:09:36 +02:00
chore: Disable email verification for new users, update search functionality, and improve note card display
This commit is contained in:
parent
10466f5913
commit
7c61fa3363
5 changed files with 67 additions and 63 deletions
|
@ -74,6 +74,9 @@ MIDDLEWARE = (
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# disable verifications for new users
|
||||||
|
ACCOUNT_EMAIL_VERIFICATION = 'none'
|
||||||
|
|
||||||
# For backwards compatibility for Django 1.8
|
# For backwards compatibility for Django 1.8
|
||||||
MIDDLEWARE_CLASSES = MIDDLEWARE
|
MIDDLEWARE_CLASSES = MIDDLEWARE
|
||||||
|
|
||||||
|
|
|
@ -28,17 +28,15 @@
|
||||||
|
|
||||||
const searchGo = async (e: Event) => {
|
const searchGo = async (e: Event) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let reload: boolean = false;
|
|
||||||
|
|
||||||
if ($page.url.pathname === '/search') {
|
if ($page.url.pathname === '/search') {
|
||||||
reload = true;
|
let url = new URL(window.location.href);
|
||||||
|
url.searchParams.set('query', query);
|
||||||
|
goto(url.toString(), { invalidateAll: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (query) {
|
if (query) {
|
||||||
await goto(`/search?query=${query}`);
|
goto(`/search?query=${query}`);
|
||||||
if (reload) {
|
|
||||||
window.location.reload();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -33,6 +33,9 @@
|
||||||
>
|
>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h2 class="card-title overflow-ellipsis">{note.name}</h2>
|
<h2 class="card-title overflow-ellipsis">{note.name}</h2>
|
||||||
|
{#if note.links && note.links.length > 0}
|
||||||
|
<p>{note.links.length} links</p>
|
||||||
|
{/if}
|
||||||
<div class="card-actions justify-end">
|
<div class="card-actions justify-end">
|
||||||
<!-- <button class="btn btn-neutral mb-2" on:click={() => goto(`/notes/${note.id}`)}
|
<!-- <button class="btn btn-neutral mb-2" on:click={() => goto(`/notes/${note.id}`)}
|
||||||
><Launch class="w-6 h-6" />Open Details</button
|
><Launch class="w-6 h-6" />Open Details</button
|
||||||
|
|
|
@ -168,7 +168,7 @@
|
||||||
<a href={link} class="link link-primary" target="_blank">{link}</a>
|
<a href={link} class="link link-primary" target="_blank">{link}</a>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="btn btn-sm btn-error absolute right-0"
|
class="btn btn-sm btn-error absolute right-0 mr-4"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
newNote.links = newNote.links.filter((_, index) => index !== i);
|
newNote.links = newNote.links.filter((_, index) => index !== i);
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import type { PageData } from './$types';
|
import type { PageData } from './$types';
|
||||||
import EditAdventure from '$lib/components/EditAdventure.svelte';
|
import EditAdventure from '$lib/components/EditAdventure.svelte';
|
||||||
import { appVersion } from '$lib/config';
|
import { appVersion } from '$lib/config';
|
||||||
import { goto, invalidate } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
|
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
|
|
||||||
|
@ -110,61 +110,61 @@
|
||||||
|
|
||||||
{#if myAdventures.length !== 0 && publicAdventures.length !== 0}
|
{#if myAdventures.length !== 0 && publicAdventures.length !== 0}
|
||||||
<h2 class="text-center font-bold text-2xl mb-4">AdventureLog Results</h2>
|
<h2 class="text-center font-bold text-2xl mb-4">AdventureLog Results</h2>
|
||||||
{/if}
|
<div class="flex items-center justify-center mt-2 mb-2">
|
||||||
<div class="flex items-center justify-center mt-2 mb-2">
|
<div class="join">
|
||||||
<div class="join">
|
<input
|
||||||
<input
|
class="join-item btn"
|
||||||
class="join-item btn"
|
type="radio"
|
||||||
type="radio"
|
name="filter"
|
||||||
name="filter"
|
aria-label="All"
|
||||||
aria-label="All"
|
id="all"
|
||||||
id="all"
|
checked
|
||||||
checked
|
on:change={() => (property = 'all')}
|
||||||
on:change={() => (property = 'all')}
|
/>
|
||||||
/>
|
<input
|
||||||
<input
|
class="join-item btn"
|
||||||
class="join-item btn"
|
type="radio"
|
||||||
type="radio"
|
name="filter"
|
||||||
name="filter"
|
aria-label="Name"
|
||||||
aria-label="Name"
|
id="name"
|
||||||
id="name"
|
on:change={() => (property = 'name')}
|
||||||
on:change={() => (property = 'name')}
|
/>
|
||||||
/>
|
<input
|
||||||
<input
|
class="join-item btn"
|
||||||
class="join-item btn"
|
type="radio"
|
||||||
type="radio"
|
name="filter"
|
||||||
name="filter"
|
aria-label="Type"
|
||||||
aria-label="Type"
|
id="type"
|
||||||
id="type"
|
on:change={() => (property = 'type')}
|
||||||
on:change={() => (property = 'type')}
|
/>
|
||||||
/>
|
<input
|
||||||
<input
|
class="join-item btn"
|
||||||
class="join-item btn"
|
type="radio"
|
||||||
type="radio"
|
name="filter"
|
||||||
name="filter"
|
aria-label="Location"
|
||||||
aria-label="Location"
|
id="location"
|
||||||
id="location"
|
on:change={() => (property = 'location')}
|
||||||
on:change={() => (property = 'location')}
|
/>
|
||||||
/>
|
<input
|
||||||
<input
|
class="join-item btn"
|
||||||
class="join-item btn"
|
type="radio"
|
||||||
type="radio"
|
name="filter"
|
||||||
name="filter"
|
aria-label="Description"
|
||||||
aria-label="Description"
|
id="description"
|
||||||
id="description"
|
on:change={() => (property = 'description')}
|
||||||
on:change={() => (property = 'description')}
|
/>
|
||||||
/>
|
<input
|
||||||
<input
|
class="join-item btn"
|
||||||
class="join-item btn"
|
type="radio"
|
||||||
type="radio"
|
name="filter"
|
||||||
name="filter"
|
aria-label="Activity Types"
|
||||||
aria-label="Activity Types"
|
id="activity_types"
|
||||||
id="activity_types"
|
on:change={() => (property = 'activity_types')}
|
||||||
on:change={() => (property = 'activity_types')}
|
/>
|
||||||
/>
|
</div>
|
||||||
|
<button class="btn btn-primary ml-2" type="button" on:click={filterByProperty}>Filter</button>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-primary ml-2" type="button" on:click={filterByProperty}>Filter</button>
|
{/if}
|
||||||
</div>
|
|
||||||
|
|
||||||
{#if myAdventures.length > 0}
|
{#if myAdventures.length > 0}
|
||||||
<h2 class="text-center font-bold text-2xl mb-4">My Adventures</h2>
|
<h2 class="text-center font-bold text-2xl mb-4">My Adventures</h2>
|
||||||
|
@ -199,7 +199,7 @@
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
{/if}
|
{/if}
|
||||||
{#if osmResults.length > 0}
|
{#if osmResults.length > 0}
|
||||||
<h2 class="text-center font-bold text-2xl mb-4">Online Results</h2>
|
<h2 class="text-center font-bold mt-2 text-2xl mb-4">Online Results</h2>
|
||||||
<div class="flex flex-wrap gap-4 mr-4 justify-center content-center">
|
<div class="flex flex-wrap gap-4 mr-4 justify-center content-center">
|
||||||
{#each osmResults as result}
|
{#each osmResults as result}
|
||||||
<div class="bg-base-300 rounded-lg shadow-md p-4 w-96 mb-2">
|
<div class="bg-base-300 rounded-lg shadow-md p-4 w-96 mb-2">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue