mirror of
https://github.com/kunkunsh/kunkun.git
synced 2025-04-11 17:29:44 +00:00
Merge branch 'develop' into command-redesign
This commit is contained in:
commit
20b976db0d
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@kksh/desktop",
|
"name": "@kksh/desktop",
|
||||||
"version": "0.1.31",
|
"version": "0.1.32",
|
||||||
"description": "",
|
"description": "",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -51,7 +51,6 @@
|
|||||||
import Inspect from "svelte-inspect-value"
|
import Inspect from "svelte-inspect-value"
|
||||||
import { type CommandEvent } from "tauri-plugin-shellx-api"
|
import { type CommandEvent } from "tauri-plugin-shellx-api"
|
||||||
import * as v from "valibot"
|
import * as v from "valibot"
|
||||||
import Listview2 from "./listview2.svelte"
|
|
||||||
|
|
||||||
const { data } = $props()
|
const { data } = $props()
|
||||||
let listviewInputRef = $state<HTMLInputElement | null>(null)
|
let listviewInputRef = $state<HTMLInputElement | null>(null)
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
<script lang="ts">
|
|
||||||
import { ListSchema } from "@kunkunapi/src/models"
|
|
||||||
|
|
||||||
let { listViewContent }: { listViewContent: ListSchema.List } = $props()
|
|
||||||
let detailWidth = $derived(listViewContent.detail ? (listViewContent.detail?.width ?? 70) : 0)
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div>detailWidth: {detailWidth}</div>
|
|
@ -144,10 +144,10 @@
|
|||||||
let resultingItems = $derived<ListSchema.Item[]>(
|
let resultingItems = $derived<ListSchema.Item[]>(
|
||||||
// when search term changes, update the resulting items
|
// when search term changes, update the resulting items
|
||||||
listViewContent.filter === "none"
|
listViewContent.filter === "none"
|
||||||
? searchTerm.length > 0
|
? (listViewContent.items ?? [])
|
||||||
|
: searchTerm.length > 0
|
||||||
? itemsFuse.search(searchTerm).map((item) => item.item)
|
? itemsFuse.search(searchTerm).map((item) => item.item)
|
||||||
: srcItems
|
: srcItems
|
||||||
: (listViewContent.items ?? [])
|
|
||||||
)
|
)
|
||||||
// section total height is auto derived from section refs
|
// section total height is auto derived from section refs
|
||||||
let sectionTotalHeight = $derived(srcSections.reduce((acc, s) => acc + (s.sectionHeight ?? 0), 0))
|
let sectionTotalHeight = $derived(srcSections.reduce((acc, s) => acc + (s.sectionHeight ?? 0), 0))
|
||||||
|
@ -48,10 +48,10 @@
|
|||||||
let resultingItems = $derived(
|
let resultingItems = $derived(
|
||||||
// when search term changes, update the resulting items
|
// when search term changes, update the resulting items
|
||||||
filterMode === "none"
|
filterMode === "none"
|
||||||
? searchTerm.length > 0
|
? items
|
||||||
|
: searchTerm.length > 0
|
||||||
? fuse.search(searchTerm).map((item) => item.item)
|
? fuse.search(searchTerm).map((item) => item.item)
|
||||||
: items
|
: items
|
||||||
: items
|
|
||||||
)
|
)
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user