Move common and file related components to app-common and file module
Signed-off-by: trivernis <trivernis@protonmail.com>pull/4/head
parent
4c1c13d4cd
commit
86519f22a1
@ -0,0 +1,37 @@
|
|||||||
|
import {NgModule} from "@angular/core";
|
||||||
|
import {ConfirmDialogComponent} from "./confirm-dialog/confirm-dialog.component";
|
||||||
|
import {BusyIndicatorComponent} from "./busy-indicator/busy-indicator.component";
|
||||||
|
import {ContextMenuComponent} from "./context-menu/context-menu.component";
|
||||||
|
import {CommonModule} from "@angular/common";
|
||||||
|
import {NgIconsModule} from "@ng-icons/core";
|
||||||
|
import {MatProgressSpinnerModule} from "@angular/material/progress-spinner";
|
||||||
|
import {MatButtonModule} from "@angular/material/button";
|
||||||
|
import {MatDialogModule} from "@angular/material/dialog";
|
||||||
|
import {MatMenuModule} from "@angular/material/menu";
|
||||||
|
import {ContentAwareImageComponent} from "./content-aware-image/content-aware-image.component";
|
||||||
|
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
declarations: [
|
||||||
|
ConfirmDialogComponent,
|
||||||
|
BusyIndicatorComponent,
|
||||||
|
ContextMenuComponent,
|
||||||
|
ContentAwareImageComponent,
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
ConfirmDialogComponent,
|
||||||
|
BusyIndicatorComponent,
|
||||||
|
ContextMenuComponent,
|
||||||
|
ContentAwareImageComponent,
|
||||||
|
],
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
NgIconsModule.withIcons({}),
|
||||||
|
MatProgressSpinnerModule,
|
||||||
|
MatButtonModule,
|
||||||
|
MatDialogModule,
|
||||||
|
MatMenuModule
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class AppCommonModule {
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
import {Component, ViewChild} from "@angular/core";
|
import {Component, ViewChild} from "@angular/core";
|
||||||
import {File} from "../../../../models/File";
|
import {File} from "../../../../models/File";
|
||||||
import {ContextMenuComponent} from "../context-menu.component";
|
import {ContextMenuComponent} from "../../app-common/context-menu/context-menu.component";
|
||||||
import {clipboard} from "@tauri-apps/api";
|
import {clipboard} from "@tauri-apps/api";
|
||||||
import {FileService} from "../../../../services/file/file.service";
|
import {FileService} from "../../../../services/file/file.service";
|
||||||
import {ErrorBrokerService} from "../../../../services/error-broker/error-broker.service";
|
import {ErrorBrokerService} from "../../../../services/error-broker/error-broker.service";
|
@ -1,5 +1,5 @@
|
|||||||
@use 'sass:map';
|
@use 'sass:map';
|
||||||
@use '../../../../../../../node_modules/@angular/material/index' as mat;
|
@use '../../../../../../../../node_modules/@angular/material/index' as mat;
|
||||||
|
|
||||||
@mixin color($theme) {
|
@mixin color($theme) {
|
||||||
$color-config: mat.get-color-config($theme);
|
$color-config: mat.get-color-config($theme);
|
@ -1,4 +1,3 @@
|
|||||||
<div (click)="fileSelectEvent.emit(this.file)" [class.selected]="this.file.selected" class="image-wrapper">
|
<div (click)="fileSelectEvent.emit(this.file)" [class.selected]="this.file.selected" class="image-wrapper">
|
||||||
<mat-progress-spinner *ngIf="!contentUrl"></mat-progress-spinner>
|
|
||||||
<app-file-thumbnail [file]="file.data"></app-file-thumbnail>
|
<app-file-thumbnail [file]="file.data"></app-file-thumbnail>
|
||||||
</div>
|
</div>
|
@ -1,4 +1,4 @@
|
|||||||
import {File} from "../../../../../models/File";
|
import {File} from "../../../../../../models/File";
|
||||||
|
|
||||||
export type GridEntry = {
|
export type GridEntry = {
|
||||||
file: File,
|
file: File,
|
@ -1,5 +1,5 @@
|
|||||||
@use 'sass:map';
|
@use 'sass:map';
|
||||||
@use '../../../../../../../node_modules/@angular/material/index' as mat;
|
@use '../../../../../../../../node_modules/@angular/material/index' as mat;
|
||||||
|
|
||||||
@mixin color($theme) {
|
@mixin color($theme) {
|
||||||
$color-config: mat.get-color-config($theme);
|
$color-config: mat.get-color-config($theme);
|
@ -1,5 +1,5 @@
|
|||||||
import {Component, EventEmitter, Input, Output} from "@angular/core";
|
import {Component, EventEmitter, Input, Output} from "@angular/core";
|
||||||
import {File} from "../../../models/File";
|
import {File} from "../../../../models/File";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: "app-file-multiview",
|
selector: "app-file-multiview",
|
@ -0,0 +1,68 @@
|
|||||||
|
import { NgModule } from "@angular/core";
|
||||||
|
import { CommonModule } from "@angular/common";
|
||||||
|
import {FileMultiviewComponent} from "./file-multiview/file-multiview.component";
|
||||||
|
import {FileGridComponent} from "./file-multiview/file-grid/file-grid.component";
|
||||||
|
import {FileGalleryComponent} from "./file-multiview/file-gallery/file-gallery.component";
|
||||||
|
import {FileGalleryEntryComponent} from "./file-multiview/file-gallery/file-gallery-entry/file-gallery-entry.component";
|
||||||
|
import {FileGridEntryComponent} from "./file-multiview/file-grid/file-grid-entry/file-grid-entry.component";
|
||||||
|
import {FileContextMenuComponent} from "./file-context-menu/file-context-menu.component";
|
||||||
|
import {FileThumbnailComponent} from "./file-thumbnail/file-thumbnail.component";
|
||||||
|
import {ContentViewerComponent} from "./content-viewer/content-viewer.component";
|
||||||
|
import {AudioViewerComponent} from "./content-viewer/audio-viewer/audio-viewer.component";
|
||||||
|
import {ImageViewerComponent} from "./content-viewer/image-viewer/image-viewer.component";
|
||||||
|
import {VideoViewerComponent} from "./content-viewer/video-viewer/video-viewer.component";
|
||||||
|
import {AppCommonModule} from "../app-common/app-common.module";
|
||||||
|
import {MatSliderModule} from "@angular/material/slider";
|
||||||
|
import {NgIconsModule} from "@ng-icons/core";
|
||||||
|
import {MatRefresh, MatClose, MatImage, MatMovie, MatGif, MatAudiotrack, MatDescription} from "@ng-icons/material-icons";
|
||||||
|
import {DragDropModule} from "@angular/cdk/drag-drop";
|
||||||
|
import {MatButtonModule} from "@angular/material/button";
|
||||||
|
import {MatMenuModule} from "@angular/material/menu";
|
||||||
|
import {MatDividerModule} from "@angular/material/divider";
|
||||||
|
import {FlexModule} from "@angular/flex-layout";
|
||||||
|
import {ScrollingModule} from "@angular/cdk/scrolling";
|
||||||
|
import {MatProgressSpinnerModule} from "@angular/material/progress-spinner";
|
||||||
|
import {MatCardModule} from "@angular/material/card";
|
||||||
|
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
declarations: [
|
||||||
|
FileMultiviewComponent,
|
||||||
|
FileGridComponent,
|
||||||
|
FileGalleryComponent,
|
||||||
|
FileGalleryEntryComponent,
|
||||||
|
FileGridEntryComponent,
|
||||||
|
FileContextMenuComponent,
|
||||||
|
FileThumbnailComponent,
|
||||||
|
ContentViewerComponent,
|
||||||
|
AudioViewerComponent,
|
||||||
|
ImageViewerComponent,
|
||||||
|
VideoViewerComponent,
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
FileMultiviewComponent
|
||||||
|
],
|
||||||
|
imports: [
|
||||||
|
CommonModule,
|
||||||
|
AppCommonModule,
|
||||||
|
MatSliderModule,
|
||||||
|
NgIconsModule.withIcons({
|
||||||
|
MatRefresh,
|
||||||
|
MatClose,
|
||||||
|
MatImage,
|
||||||
|
MatMovie,
|
||||||
|
MatGif,
|
||||||
|
MatAudiotrack,
|
||||||
|
MatDescription
|
||||||
|
}),
|
||||||
|
DragDropModule,
|
||||||
|
MatButtonModule,
|
||||||
|
MatMenuModule,
|
||||||
|
MatDividerModule,
|
||||||
|
FlexModule,
|
||||||
|
ScrollingModule,
|
||||||
|
MatProgressSpinnerModule,
|
||||||
|
MatCardModule
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class FileModule { }
|
Loading…
Reference in New Issue