Skip to content

Commit

Permalink
adding double click run renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
justintucker1 committed Oct 29, 2024
1 parent 281cc4d commit 49ef0eb
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions webviews/src/views/RokuAutomationView/AutoRunsEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,22 @@
runs = newRunList;
};
const renameRun = (e) => {
const run = getRunFromEvent(e);
console.log(`Renaming run: ${run}`);
selectedRun = run;
showRunNameDialog(selectedRun)
.then((runName) => {
runs.find((r) => r.name === run).name = runName;
runs = runs;
selectedRun = runName;
})
.catch((e) => {
// do nothing
});
};
const addNewRun = () => {
showRunNameDialog()
.then((runName) => {
Expand Down Expand Up @@ -351,6 +367,7 @@
}}
use:draggable={run.name}
on:click={selectRun}
on:dblclick={renameRun}
title={run.name}
id={run.name === selectedRun ? 'selected-tr' : ''}>
<td class="run-row-name">
Expand Down

0 comments on commit 49ef0eb

Please sign in to comment.