diff --git a/mediarepo-ui/src-tauri/Cargo.lock b/mediarepo-ui/src-tauri/Cargo.lock index edd4860..a6f44ae 100644 --- a/mediarepo-ui/src-tauri/Cargo.lock +++ b/mediarepo-ui/src-tauri/Cargo.lock @@ -1489,8 +1489,8 @@ checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" [[package]] name = "mediarepo-api" -version = "0.24.2" -source = "git+https://github.com/Trivernis/mediarepo-api.git?rev=076e9f344da034fc70c99cb1b9c4359374acc2ca#076e9f344da034fc70c99cb1b9c4359374acc2ca" +version = "0.25.0" +source = "git+https://github.com/Trivernis/mediarepo-api.git?rev=cd7bcc8d688d05275679d20af71231098602009b#cd7bcc8d688d05275679d20af71231098602009b" dependencies = [ "async-trait", "bromine", diff --git a/mediarepo-ui/src-tauri/Cargo.toml b/mediarepo-ui/src-tauri/Cargo.toml index 10fe426..f9bb22b 100644 --- a/mediarepo-ui/src-tauri/Cargo.toml +++ b/mediarepo-ui/src-tauri/Cargo.toml @@ -25,7 +25,7 @@ features = [ "env-filter" ] [dependencies.mediarepo-api] git = "https://github.com/Trivernis/mediarepo-api.git" -rev = "076e9f344da034fc70c99cb1b9c4359374acc2ca" +rev = "cd7bcc8d688d05275679d20af71231098602009b" features = [ "tauri-plugin" ] [features] diff --git a/mediarepo-ui/src/app/components/core/repositories-tab/repository-details-view/repository-details-view.component.ts b/mediarepo-ui/src/app/components/core/repositories-tab/repository-details-view/repository-details-view.component.ts index 2ae64da..cff59cd 100644 --- a/mediarepo-ui/src/app/components/core/repositories-tab/repository-details-view/repository-details-view.component.ts +++ b/mediarepo-ui/src/app/components/core/repositories-tab/repository-details-view/repository-details-view.component.ts @@ -12,6 +12,10 @@ import { } from "../../../../services/repository/repository.service"; import {RepositoryMetadata} from "../../../../models/RepositoryMetadata"; import {BehaviorSubject} from "rxjs"; +import {MatDialog} from "@angular/material/dialog"; +import { + BusyDialogComponent +} from "../../../shared/app-common/busy-dialog/busy-dialog.component"; @Component({ selector: "app-repository-details-view", @@ -29,7 +33,7 @@ export class RepositoryDetailsViewComponent implements OnInit, OnChanges, OnDest public thumbFolderSize = new BehaviorSubject(undefined); public databaseFileSize = new BehaviorSubject(undefined); - constructor(private repoService: RepositoryService) { + constructor(private repoService: RepositoryService, public dialog: MatDialog) { } public async ngOnInit() { @@ -48,11 +52,18 @@ export class RepositoryDetailsViewComponent implements OnInit, OnChanges, OnDest } public async closeRepository() { + let closeDialog = this.dialog.open(BusyDialogComponent, { + data: { + title: "Closing repository", + message: new BehaviorSubject("Closing repository...") + } + }); if (this.repository?.local) { await this.repoService.closeSelectedRepository(); } else { await this.repoService.disconnectSelectedRepository(); } + closeDialog.close(true); } public async getSizes() {