Skip to content

Commit

Permalink
Organize workflows by most recently updated
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Dec 16, 2024
1 parent fc714bc commit d296035
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion website/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ const workflowStore = useWorkflowStore();
const allWorkflows = computed(() => workflowStore.allWorkflows);
// Sort workflows descending by workflow.updated
const sortedWorkflows = computed(() =>
allWorkflows.value.sort((a, b) => new Date(b.updated).getTime() - new Date(a.updated).getTime()),
);
const filteredWorkflows = computed(() =>
allWorkflows.value.filter((workflow) =>
sortedWorkflows.value.filter((workflow) =>
workflow.definition.name.toLowerCase().includes(searchQuery.value.toLowerCase()),
),
);
Expand Down

0 comments on commit d296035

Please sign in to comment.