[File UI] Persist the path on the URI.

This commit is contained in:
Fabio Manganiello 2024-07-16 03:12:18 +02:00
parent aa92db9850
commit 5ebdb381f1
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -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>