Skip to content

Commit

Permalink
fix(ui): Remove clear collection button from workspace nav, as it tak…
Browse files Browse the repository at this point in the history
…es too much space + it's not very useful + it's not correctly implemented (currently it doesn't delete all related resources) - it was originally added during development to quickly clear a workspace for testing - unless someone asks for it, it's not required
  • Loading branch information
flawiddsouza committed Mar 9, 2024
1 parent 1d38d71 commit e83218e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
6 changes: 0 additions & 6 deletions packages/ui/src/components/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
</div>
<a href="#" @click.prevent="showImportModal" class="bl">Import</a>
<a href="#" @click.prevent="exportCollection" class="bl">Export</a>
<a href="#" @click.prevent="clearCollection" class="bl">Clear Collection</a>
</div>
<template v-if="nav === 'workspaces'">
<a href="#" @click.prevent="showAddWorkspace" class="bl">Add Workspace</a>
Expand Down Expand Up @@ -142,11 +141,6 @@ export default {
}
exportRestfoxCollection(collection, this.activeWorkspace.environments)
},
async clearCollection() {
if(await window.createPrompt('Are you sure? Type "clear everything in workspace" to confirm') === 'clear everything in workspace') {
this.$store.commit('clearCollection')
}
},
setActiveWorkspace(workspace) {
this.$store.commit('setActiveWorkspace', workspace)
},
Expand Down
7 changes: 0 additions & 7 deletions packages/ui/src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,13 +322,6 @@ const store = createStore({
sortTree(collectionTree)
state.collectionTree = collectionTree
},
clearCollection(state) {
state.collection = []
deleteCollectionsByWorkspaceId(state.activeWorkspace._id)
state.collectionTree = []
state.activeTab = null
state.tabs = []
},
setCollectionFilter(state, filter) {
state.collectionFilter = filter
},
Expand Down

0 comments on commit e83218e

Please sign in to comment.