diff --git a/src/app/pages/manager/fileMode/fileMode.component.ts b/src/app/pages/manager/fileMode/fileMode.component.ts
index efca60c..a7648c1 100644
--- a/src/app/pages/manager/fileMode/fileMode.component.ts
+++ b/src/app/pages/manager/fileMode/fileMode.component.ts
@@ -1,5 +1,5 @@
-import { Component, OnInit, Input } from '@angular/core';
-import { NavigationFlow } from 'src/app/@dataflow/extra';
+import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
+import { NavigationFlow, NavigationFlowOutNode } from 'src/app/@dataflow/extra';
import { ConnectionService } from '../../connection.service';
import { Subject } from 'rxjs';
import { OperationsListFlow, OperationsListFlowInNode } from 'src/app/@dataflow/rclone';
@@ -8,7 +8,7 @@ import { CombErr } from 'src/app/@dataflow/core';
@Component({
selector: 'manager-fileMode',
- template: ` `,
+ template: ` `,
styles: [],
})
export class FileModeComponent implements OnInit {
@@ -16,6 +16,8 @@ export class FileModeComponent implements OnInit {
@Input() nav$: NavigationFlow;
+ @Output() jump = new EventEmitter();
+
private listTrigger = new Subject();
list$: OperationsListFlow;
@@ -35,7 +37,7 @@ export class FileModeComponent implements OnInit {
return [{ ...navNode[0], ...cmdNode[0] }, []];
}
),
- filter(x=>x[1].length !==0 || !!x[0].remote)
+ filter((x) => x[1].length !== 0 || !!x[0].remote)
);
})();
this.list$.deploy();
diff --git a/src/app/pages/manager/fileMode/listView/listView.component.ts b/src/app/pages/manager/fileMode/listView/listView.component.ts
index 080bdc0..a859f7e 100644
--- a/src/app/pages/manager/fileMode/listView/listView.component.ts
+++ b/src/app/pages/manager/fileMode/listView/listView.component.ts
@@ -1,12 +1,19 @@
-import { Component, OnInit, OnDestroy, Input } from '@angular/core';
+import { Component, OnInit, OnDestroy, Input, Output, EventEmitter } from '@angular/core';
import { Columns, Config, DefaultConfig } from 'ngx-easy-table';
import { OperationsListFlowOutItemNode, OperationsListFlow } from 'src/app/@dataflow/rclone';
import { Subscription } from 'rxjs';
+import { NavigationFlowOutNode } from 'src/app/@dataflow/extra';
@Component({
selector: 'manager-listView',
template: `
-
+
+
`,
styles: [],
})
@@ -18,14 +25,28 @@ export class ListViewComponent implements OnInit, OnDestroy {
constructor() {}
+ @Output() jump = new EventEmitter();
+ private remote: string;
+ eventEmitted($event: { event: string; value: { row: OperationsListFlowOutItemNode } }): void {
+ // console.log('$event', $event);
+ if ($event.event === 'onDoubleClick') {
+ // console.log($event.value);
+ const item = $event.value.row;
+ if (item.IsDir) {
+ this.jump.emit({ remote: this.remote, path: item.Path });
+ }
+ }
+ }
+
@Input() list$: OperationsListFlow;
ngOnInit() {
- this.listScrb = this.list$.getOutput().subscribe((x) => {
+ this.listScrb = this.list$.getSupersetOutput().subscribe((x) => {
if (x[1].length !== 0) {
this.data = undefined;
}
this.data = x[0].list;
+ this.remote = x[0].remote;
});
this.configuration = { ...DefaultConfig };
diff --git a/src/app/pages/manager/manager.component.ts b/src/app/pages/manager/manager.component.ts
index def9ae1..972d45b 100644
--- a/src/app/pages/manager/manager.component.ts
+++ b/src/app/pages/manager/manager.component.ts
@@ -19,7 +19,8 @@ import { HomeModeComponent } from './homeMode/homeMode.component';
-
+
+