enh: sort functions list by type
Some checks failed
Deploy to HuggingFace Spaces / check-secret (push) Successful in 3m56s
Create and publish Docker images with specific build args / build-main-image (linux/arm64) (push) Has been cancelled
Create and publish Docker images with specific build args / build-main-image (linux/amd64) (push) Has been cancelled
Create and publish Docker images with specific build args / build-cuda-image (linux/amd64) (push) Has been cancelled
Create and publish Docker images with specific build args / build-cuda-image (linux/arm64) (push) Has been cancelled
Create and publish Docker images with specific build args / build-ollama-image (linux/amd64) (push) Has been cancelled
Create and publish Docker images with specific build args / build-ollama-image (linux/arm64) (push) Has been cancelled
Create and publish Docker images with specific build args / merge-main-images (push) Has been cancelled
Create and publish Docker images with specific build args / merge-cuda-images (push) Has been cancelled
Create and publish Docker images with specific build args / merge-ollama-images (push) Has been cancelled
Deploy to HuggingFace Spaces / deploy (push) Has been cancelled
Python CI / Format Backend (3.11) (push) Has been cancelled
Frontend Build / Format & Build Frontend (push) Has been cancelled
Frontend Build / Frontend Unit Tests (push) Has been cancelled
Integration Test / Run Migration Tests (push) Has been cancelled
Integration Test / Run Cypress Integration Tests (push) Has been cancelled

This commit is contained in:
Timothy Jaeryang Baek 2024-11-13 21:22:13 -08:00
parent 9cdd66ca59
commit f5f2215348

View File

@ -50,12 +50,14 @@
let showDeleteConfirm = false; let showDeleteConfirm = false;
let filteredItems = []; let filteredItems = [];
$: filteredItems = $functions.filter( $: filteredItems = $functions
(f) => .filter(
query === '' || (f) =>
f.name.toLowerCase().includes(query.toLowerCase()) || query === '' ||
f.id.toLowerCase().includes(query.toLowerCase()) f.name.toLowerCase().includes(query.toLowerCase()) ||
); f.id.toLowerCase().includes(query.toLowerCase())
)
.sort((a, b) => a.type.localeCompare(b.type) || a.name.localeCompare(b.name));
const shareHandler = async (func) => { const shareHandler = async (func) => {
const item = await getFunctionById(localStorage.token, func.id).catch((error) => { const item = await getFunctionById(localStorage.token, func.id).catch((error) => {