Skip to content

Commit

Permalink
Merge pull request #174 from t29mato/feature/improve_datasets_control
Browse files Browse the repository at this point in the history
Update dataset manager
  • Loading branch information
yu-smc authored Aug 29, 2024
2 parents 9442765 + 98b5296 commit 95daf59
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 43 deletions.
26 changes: 15 additions & 11 deletions src/presentation/components/DatasetManager/DatasetManager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@
</h4>
<v-list
density="compact"
height="20vh"
class="overflow-y-auto mb-5 mt-1 pa-0"
style="outline: solid 1px gray"
class="mb-5 mt-1 pa-0"
style="min-height: 154px; outline: solid 1px gray"
>
<v-list-item
v-for="dataset in datasetRepository.datasets"
:key="dataset.id"
class="pl-2"
class="pl-2 c__dataset-item"
link
@click="handleOnClickDataset(dataset.id)"
:class="
Expand Down Expand Up @@ -117,18 +116,23 @@ export default defineComponent({
this.datasetRepository.createNewDataset()
this.activateDataset(this.datasetRepository.lastDatasetId)
},
handleOnClickRemoveDatasetButton() {
if (
!window.confirm(
'Are you sure to delete this dataset? This operation is irreversible.',
)
)
return
removeActiveDataset() {
this.interpolator.isActive && this.interpolator.clearPreview()
this.datasetRepository.removeDataset(
this.datasetRepository.activeDatasetId,
)
},
handleOnClickRemoveDatasetButton() {
//NOTE: remove active dataset without confirmation if the active dataset doesn't have data points
if (this.datasetRepository.activeDataset.plots.length === 0) {
this.removeActiveDataset()
return
}
window.confirm(
`Are you sure to delete '${this.datasetRepository.activeDataset.name}'? This operation is irreversible.`,
) && this.removeActiveDataset()
},
},
})
</script>
28 changes: 0 additions & 28 deletions src/styles/style.scss

This file was deleted.

3 changes: 0 additions & 3 deletions src/styles/variables/layout.scss

This file was deleted.

1 change: 0 additions & 1 deletion src/styles/variables/main.scss

This file was deleted.

0 comments on commit 95daf59

Please sign in to comment.