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 {
|
try {
|
||||||
this.files = await this.request('file.list', {path: this.path})
|
this.files = await this.request('file.list', {path: this.path})
|
||||||
this.$emit('path-change', this.path)
|
this.$emit('path-change', this.path)
|
||||||
|
this.setUrlArgs({path: decodeURIComponent(this.path)})
|
||||||
} finally {
|
} finally {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
|
@ -165,8 +166,16 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
const args = this.getUrlArgs()
|
||||||
|
if (args.path)
|
||||||
|
this.path = args.path
|
||||||
|
|
||||||
this.refresh()
|
this.refresh()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
unmounted() {
|
||||||
|
this.setUrlArgs({path: null})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue