aboutsummaryrefslogtreecommitdiff
path: root/ui/src
diff options
context:
space:
mode:
authorJames Woglom <j@wogloms.net>2022-08-29 20:41:21 -0400
committerJames Woglom <j@wogloms.net>2022-08-29 20:41:21 -0400
commitf79c8fa7542822cd3edd542d646fc5881d3bb80e (patch)
tree286b2562995d0d5a8fd05fb13e678725266fa719 /ui/src
parentPropagate configuration on load via downloads socket (diff)
downloadmetube-f79c8fa7542822cd3edd542d646fc5881d3bb80e.tar.gz
metube-f79c8fa7542822cd3edd542d646fc5881d3bb80e.tar.bz2
metube-f79c8fa7542822cd3edd542d646fc5881d3bb80e.zip
pass custom_directories from server to client
Diffstat (limited to 'ui/src')
-rw-r--r--ui/src/app/app.component.sass3
-rw-r--r--ui/src/app/downloads.service.ts10
2 files changed, 11 insertions, 2 deletions
diff --git a/ui/src/app/app.component.sass b/ui/src/app/app.component.sass
index 656fac2..d95fc0d 100644
--- a/ui/src/app/app.component.sass
+++ b/ui/src/app/app.component.sass
@@ -15,6 +15,9 @@
button.add-url
width: 100%
+.folder-dropdown-menu
+ width: 500px
+
$metube-section-color-bg: rgba(0,0,0,.07)
.metube-section-header
diff --git a/ui/src/app/downloads.service.ts b/ui/src/app/downloads.service.ts
index eb7bac3..018f225 100644
--- a/ui/src/app/downloads.service.ts
+++ b/ui/src/app/downloads.service.ts
@@ -34,6 +34,7 @@ export class DownloadsService {
queueChanged = new Subject();
doneChanged = new Subject();
configuration = {};
+ custom_directories = {};
constructor(private http: HttpClient, private socket: MeTubeSocket) {
socket.fromEvent('all').subscribe((strdata: string) => {
@@ -76,10 +77,15 @@ export class DownloadsService {
this.doneChanged.next(null);
});
socket.fromEvent('configuration').subscribe((strdata: string) => {
- let data: string = JSON.parse(strdata);
+ let data = JSON.parse(strdata);
console.debug("got configuration:", data);
this.configuration = data;
- })
+ });
+ socket.fromEvent('custom_directories').subscribe((strdata: string) => {
+ let data = JSON.parse(strdata);
+ console.debug("got custom_directories:", data);
+ this.custom_directories = data["directories"];
+ });
}
handleHTTPError(error: HttpErrorResponse) {
bgstack15