JS design
This commit is contained in:
19 files changed
+46
-64
No files matched your search
@@ -22,9 +22,9 @@ export default {
|
||||
...mapState(['req', 'selected'])
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['showDelete']),
|
||||
...mapMutations(['closePrompts']),
|
||||
submit: function (event) {
|
||||
this.showDelete(false)
|
||||
this.closePrompts()
|
||||
// buttons.setLoading('delete')
|
||||
|
||||
if (this.req.kind !== 'listing') {
|
||||
|
||||
@@ -39,6 +39,7 @@ export default {
|
||||
}
|
||||
|
||||
window.open(uri)
|
||||
this.$store.commit('closePrompts')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<button type="submit" @click="$store.commit('showHelp', false)" class="ok">OK</button>
|
||||
<button type="submit" @click="$store.commit('closePrompts')" class="ok">OK</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</section>
|
||||
|
||||
<div>
|
||||
<button type="submit" @click="$store.commit('showInfo', false)" class="ok">OK</button>
|
||||
<button type="submit" @click="$store.commit('closePrompts')" class="ok">OK</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<div>
|
||||
<button class="ok" @click="move">Move</button>
|
||||
<button class="cancel" @click="$store.commit('showMove', false)">Cancel</button>
|
||||
<button class="cancel" @click="$store.commit('closePrompts')">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<input autofocus type="text" @keyup.enter="submit" v-model.trim="name">
|
||||
<div>
|
||||
<button class="ok" @click="submit">Create</button>
|
||||
<button class="cancel" @click="$store.commit('showNewDir', false)">Cancel</button>
|
||||
<button class="cancel" @click="$store.commit('closePrompts')">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -45,7 +45,7 @@ export default {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
this.$store.commit('showNewDir', false)
|
||||
this.$store.commit('closePrompts')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<input autofocus type="text" @keyup.enter="submit" v-model.trim="name">
|
||||
<div>
|
||||
<button class="ok" @click="submit">Create</button>
|
||||
<button class="cancel" @click="$store.commit('showNewFile', false)">Cancel</button>
|
||||
<button class="cancel" @click="$store.commit('closePrompts')">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -45,7 +45,7 @@ export default {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
this.$store.commit('showNewFile', false)
|
||||
this.$store.commit('closePrompts')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ import Download from './Download'
|
||||
import Move from './Move'
|
||||
import NewFile from './NewFile'
|
||||
import NewDir from './NewDir'
|
||||
import {mapGetters, mapState} from 'vuex'
|
||||
import {mapGetters} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'prompts',
|
||||
@@ -37,9 +37,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'showOverlay'
|
||||
]),
|
||||
...mapState([
|
||||
'showOverlay',
|
||||
'showInfo',
|
||||
'showHelp',
|
||||
'showDelete',
|
||||
@@ -52,7 +50,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
resetPrompts () {
|
||||
this.$store.commit('resetPrompts')
|
||||
this.$store.commit('closePrompts')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ export default {
|
||||
computed: mapState(['req', 'selected', 'selectedCount']),
|
||||
methods: {
|
||||
cancel: function (event) {
|
||||
this.$store.commit('showRename', false)
|
||||
this.$store.commit('closePrompts')
|
||||
},
|
||||
oldName: function () {
|
||||
if (this.req.kind !== 'listing') {
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
console.log(error)
|
||||
})
|
||||
|
||||
this.$store.commit('showRename', false)
|
||||
this.$store.commit('closePrompts')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user