Commit 6758f3d3 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

refac: disable sortable on mobile

parent 6bd7c20f
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
import { onMount, getContext, tick } from 'svelte'; import { onMount, getContext, tick } from 'svelte';
import { WEBUI_NAME, modelfiles, models, settings, user } from '$lib/stores'; import { WEBUI_NAME, mobile, models, settings, user } from '$lib/stores';
import { addNewModel, deleteModelById, getModelInfos, updateModelById } from '$lib/apis/models'; import { addNewModel, deleteModelById, getModelInfos, updateModelById } from '$lib/apis/models';
import { deleteModel } from '$lib/apis/ollama'; import { deleteModel } from '$lib/apis/ollama';
...@@ -170,14 +170,16 @@ ...@@ -170,14 +170,16 @@
console.log(localModelfiles); console.log(localModelfiles);
} }
// SortableJS if (!$mobile) {
sortable = new Sortable(document.getElementById('model-list'), { // SortableJS
animation: 150, sortable = new Sortable(document.getElementById('model-list'), {
onUpdate: async (event) => { animation: 150,
console.log(event); onUpdate: async (event) => {
positionChangeHanlder(); console.log(event);
} positionChangeHanlder();
}); }
});
}
}); });
</script> </script>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment