Compare commits
3 Commits
v1.4.0
...
0a97ea2fea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a97ea2fea | ||
|
|
12f499cb98 | ||
|
|
829850aa88 |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "kochwas",
|
"name": "kochwas",
|
||||||
"version": "1.3.0",
|
"version": "1.4.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "kochwas",
|
"name": "kochwas",
|
||||||
"version": "1.3.0",
|
"version": "1.4.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@google/generative-ai": "^0.24.1",
|
"@google/generative-ai": "^0.24.1",
|
||||||
"@types/archiver": "^7.0.0",
|
"@types/archiver": "^7.0.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "kochwas",
|
"name": "kochwas",
|
||||||
"version": "1.3.0",
|
"version": "1.4.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { onMount, tick } from 'svelte';
|
import { onMount, tick, untrack } from 'svelte';
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
import { CookingPot, X, ChevronDown } from 'lucide-svelte';
|
import { CookingPot, X, ChevronDown } from 'lucide-svelte';
|
||||||
import { slide } from 'svelte/transition';
|
import { slide } from 'svelte/transition';
|
||||||
@@ -235,12 +235,17 @@
|
|||||||
// profiles, refetch with the new profile_id so the list reflects what
|
// profiles, refetch with the new profile_id so the list reflects what
|
||||||
// the *current* profile has viewed. Other sorts are profile-agnostic
|
// the *current* profile has viewed. Other sorts are profile-agnostic
|
||||||
// and don't need this.
|
// and don't need this.
|
||||||
|
//
|
||||||
|
// Only `profileStore.active` must be a tracked dep. `allSort` /
|
||||||
|
// `allLoading` are read inside untrack: otherwise the `allLoading = false`
|
||||||
|
// write in the fetch-finally would re-trigger the effect and start the
|
||||||
|
// next fetch → endless loop.
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
const active = profileStore.active;
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||||
|
profileStore.active;
|
||||||
|
untrack(() => {
|
||||||
if (allSort !== 'viewed') return;
|
if (allSort !== 'viewed') return;
|
||||||
if (allLoading) return;
|
if (allLoading) return;
|
||||||
// Re-fetch the first page; rehydrate would re-load the previous
|
|
||||||
// depth, but a sort-context change should reset to page 1 anyway.
|
|
||||||
void (async () => {
|
void (async () => {
|
||||||
allLoading = true;
|
allLoading = true;
|
||||||
try {
|
try {
|
||||||
@@ -253,10 +258,9 @@
|
|||||||
} finally {
|
} finally {
|
||||||
allLoading = false;
|
allLoading = false;
|
||||||
}
|
}
|
||||||
// 'active' is referenced so $effect tracks it as a dep:
|
|
||||||
void active;
|
|
||||||
})();
|
})();
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// Sync current query back into the URL as ?q=... via replaceState,
|
// Sync current query back into the URL as ?q=... via replaceState,
|
||||||
// without spamming the history stack. Pushing a new entry happens only
|
// without spamming the history stack. Pushing a new entry happens only
|
||||||
|
|||||||
@@ -284,6 +284,8 @@
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
.meta {
|
.meta {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -340,4 +342,25 @@
|
|||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Handy: Card stacked — Bild+Titel oben, Actions als eigene Reihe
|
||||||
|
darunter full-width. Vermeidet Titel-Overflow hinter den Buttons auf
|
||||||
|
schmalen Viewports (≤~414px), gibt Tap-Targets mehr Platz. */
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
.card {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.text {
|
||||||
|
padding: 0.7rem 0.75rem;
|
||||||
|
}
|
||||||
|
.actions-top {
|
||||||
|
position: static;
|
||||||
|
display: flex;
|
||||||
|
gap: 0.4rem;
|
||||||
|
padding: 0.5rem 0.75rem;
|
||||||
|
border-top: 1px solid #e4eae7;
|
||||||
|
justify-content: flex-end;
|
||||||
|
background: #fafbfa;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user