forked from platypush/platypush
[File UI] Persist the path on the URI.
This commit is contained in:
parent
aa92db9850
commit
5ebdb381f1
1 changed files with 9 additions and 0 deletions
|
@ -134,6 +134,7 @@ export default {
|
|||
try {
|
||||
this.files = await this.request('file.list', {path: this.path})
|
||||
this.$emit('path-change', this.path)
|
||||
this.setUrlArgs({path: decodeURIComponent(this.path)})
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
|
@ -165,8 +166,16 @@ export default {
|
|||
},
|
||||
|
||||
mounted() {
|
||||
const args = this.getUrlArgs()
|
||||
if (args.path)
|
||||
this.path = args.path
|
||||
|
||||
this.refresh()
|
||||
},
|
||||
|
||||
unmounted() {
|
||||
this.setUrlArgs({path: null})
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in a new issue