mirror of
https://github.com/CaramelFur/Picsur.git
synced 2026-03-24 04:20:03 +01:00
cleanup imports
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { AuthModule } from './routes/api/auth/auth.module';
|
||||
import { ImageModule } from './routes/image/imageroute.module';
|
||||
import { ServeStaticModule } from '@nestjs/serve-static';
|
||||
import { DemoManagerModule } from './managers/demo/demomanager.module';
|
||||
import { PrefModule } from './routes/api/pref/pref.module';
|
||||
import { TypeOrmConfigService } from './config/typeorm.config.service';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { PicsurConfigModule } from './config/config.module';
|
||||
import { ServeStaticConfigService } from './config/servestatic.config.service';
|
||||
import { TypeOrmConfigService } from './config/typeorm.config.service';
|
||||
import { DemoManagerModule } from './managers/demo/demomanager.module';
|
||||
import { AuthModule } from './routes/api/auth/auth.module';
|
||||
import { PrefModule } from './routes/api/pref/pref.module';
|
||||
import { ImageModule } from './routes/image/imageroute.module';
|
||||
|
||||
|
||||
@Module({
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { SysPreferences } from 'picsur-shared/dist/dto/syspreferences.dto';
|
||||
import { generateRandomString } from 'picsur-shared/dist/util/random';
|
||||
import { EnvJwtConfigService } from '../../config/jwt.config.service';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { ConfigModule, ConfigService } from '@nestjs/config';
|
||||
import { TypeOrmConfigService } from './typeorm.config.service';
|
||||
import { ServeStaticConfigService } from './servestatic.config.service';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { AuthConfigService } from './auth.config.service';
|
||||
import { HostConfigService } from './host.config.service';
|
||||
import { EnvJwtConfigService } from './jwt.config.service';
|
||||
import { AuthConfigService } from './auth.config.service';
|
||||
import { MultipartConfigService } from './multipart.config.service';
|
||||
import { ServeStaticConfigService } from './servestatic.config.service';
|
||||
import { TypeOrmConfigService } from './typeorm.config.service';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import {
|
||||
ServeStaticModuleOptions,
|
||||
ServeStaticModuleOptionsFactory,
|
||||
} from '@nestjs/serve-static';
|
||||
import { join } from 'path';
|
||||
import { EnvPrefix, PackageRoot } from './config.static';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { EnvPrefix } from './config.static';
|
||||
|
||||
@Injectable()
|
||||
export class HostConfigService {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Logger, Module, OnModuleInit } from '@nestjs/common';
|
||||
import { JwtConfigService } from './jwt.lateconfig.service';
|
||||
import { SysPreferenceModule } from '../collections/syspreferencesdb/syspreferencedb.module';
|
||||
import { SysPreferenceService } from '../collections/syspreferencesdb/syspreferencedb.service';
|
||||
import { PicsurConfigModule } from './config.module';
|
||||
import { EnvJwtConfigService } from './jwt.config.service';
|
||||
import { SysPreferenceService } from '../collections/syspreferencesdb/syspreferencedb.service';
|
||||
import { JwtConfigService } from './jwt.lateconfig.service';
|
||||
|
||||
// This module contains all configservices that depend on the syspref module
|
||||
// The syspref module can only be used when connected to the database
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import {
|
||||
ServeStaticModuleOptions,
|
||||
ServeStaticModuleOptionsFactory,
|
||||
ServeStaticModuleOptionsFactory
|
||||
} from '@nestjs/serve-static';
|
||||
import { join } from 'path';
|
||||
import { EnvPrefix, PackageRoot } from './config.static';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
|
||||
@Injectable()
|
||||
export class ServeStaticConfigService
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { TypeOrmModuleOptions, TypeOrmOptionsFactory } from '@nestjs/typeorm';
|
||||
import { EntityList } from '../models/entities';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { DefaultName, EnvPrefix } from './config.static';
|
||||
|
||||
@Injectable()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {
|
||||
createParamDecorator,
|
||||
ExecutionContext,
|
||||
ExecutionContext
|
||||
} from '@nestjs/common';
|
||||
import { Newable } from 'picsur-shared/dist/types';
|
||||
import { MultiPartPipe } from './multipart.pipe';
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
Injectable,
|
||||
Logger,
|
||||
PipeTransform,
|
||||
Scope,
|
||||
Scope
|
||||
} from '@nestjs/common';
|
||||
import { validate } from 'class-validator';
|
||||
import { FastifyRequest } from 'fastify';
|
||||
@@ -12,7 +12,7 @@ import { Newable } from 'picsur-shared/dist/types';
|
||||
import { MultipartConfigService } from '../config/multipart.config.service';
|
||||
import {
|
||||
MultiPartFieldDto,
|
||||
MultiPartFileDto,
|
||||
MultiPartFileDto
|
||||
} from '../models/dto/multipart.dto';
|
||||
|
||||
@Injectable({ scope: Scope.REQUEST })
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
Injectable,
|
||||
Logger,
|
||||
PipeTransform,
|
||||
Scope,
|
||||
Scope
|
||||
} from '@nestjs/common';
|
||||
import { FastifyRequest } from 'fastify';
|
||||
import { Multipart } from 'fastify-multipart';
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
import {
|
||||
ExceptionFilter,
|
||||
Catch,
|
||||
ArgumentsHost,
|
||||
HttpException,
|
||||
ArgumentsHost, Catch, ExceptionFilter, HttpException
|
||||
} from '@nestjs/common';
|
||||
import { FastifyRequest } from 'fastify';
|
||||
import { FastifyReply } from 'fastify';
|
||||
import { FastifyReply, FastifyRequest } from 'fastify';
|
||||
import { ApiErrorResponse } from 'picsur-shared/dist/dto/api.dto';
|
||||
|
||||
@Catch(HttpException)
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import {
|
||||
Injectable,
|
||||
NestInterceptor,
|
||||
ExecutionContext,
|
||||
CallHandler,
|
||||
CallHandler, ExecutionContext, Injectable,
|
||||
NestInterceptor
|
||||
} from '@nestjs/common';
|
||||
import { ApiResponse } from 'picsur-shared/dist/dto/api.dto';
|
||||
import { Observable, map } from 'rxjs';
|
||||
import { map, Observable } from 'rxjs';
|
||||
|
||||
@Injectable()
|
||||
export class SuccessInterceptor<T> implements NestInterceptor {
|
||||
|
||||
@@ -2,14 +2,14 @@ import { ValidationPipe } from '@nestjs/common';
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import {
|
||||
FastifyAdapter,
|
||||
NestFastifyApplication,
|
||||
NestFastifyApplication
|
||||
} from '@nestjs/platform-fastify';
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
import * as multipart from 'fastify-multipart';
|
||||
import { AppModule } from './app.module';
|
||||
import { HostConfigService } from './config/host.config.service';
|
||||
import { MainExceptionFilter } from './layers/httpexception/httpexception.filter';
|
||||
import { SuccessInterceptor } from './layers/success/success.interceptor';
|
||||
import { HostConfigService } from './config/host.config.service';
|
||||
|
||||
|
||||
async function bootstrap() {
|
||||
const fastifyAdapter = new FastifyAdapter();
|
||||
|
||||
@@ -2,9 +2,9 @@ import { Injectable } from '@nestjs/common';
|
||||
import { fileTypeFromBuffer, FileTypeResult } from 'file-type';
|
||||
import { FullMime } from 'picsur-shared/dist/dto/mimes.dto';
|
||||
import { AsyncFailable, HasFailed } from 'picsur-shared/dist/types';
|
||||
import { EImageBackend } from '../../models/entities/image.entity';
|
||||
import { ImageDBService } from '../../collections/imagedb/imagedb.service';
|
||||
import { MimesService } from '../../collections/imagedb/mimes.service';
|
||||
import { EImageBackend } from '../../models/entities/image.entity';
|
||||
|
||||
@Injectable()
|
||||
export class ImageManagerService {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsDefined, ValidateNested } from 'class-validator';
|
||||
import { MultiPartFileDto } from './multipart.dto';
|
||||
import { Type } from 'class-transformer';
|
||||
|
||||
export class ImageUploadDto {
|
||||
@IsDefined()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { MultipartFile } from 'fastify-multipart';
|
||||
import { BusboyFileStream } from '@fastify/busboy';
|
||||
import { IsDefined, IsNotEmpty, IsString } from 'class-validator';
|
||||
import { HttpException } from '@nestjs/common';
|
||||
import { IsDefined, IsNotEmpty, IsString } from 'class-validator';
|
||||
import { MultipartFile } from 'fastify-multipart';
|
||||
|
||||
export class MultiPartFileDto {
|
||||
@IsString()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {
|
||||
SupportedMime,
|
||||
SupportedMimes,
|
||||
SupportedMimes
|
||||
} from 'picsur-shared/dist/dto/mimes.dto';
|
||||
import { EImage } from 'picsur-shared/dist/entities/image.entity';
|
||||
import { Column, Entity, Index, PrimaryGeneratedColumn } from 'typeorm';
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import {
|
||||
Injectable,
|
||||
CanActivate,
|
||||
ExecutionContext,
|
||||
Logger,
|
||||
ExecutionContext, Injectable, Logger
|
||||
} from '@nestjs/common';
|
||||
import { plainToClass } from 'class-transformer';
|
||||
import { validate } from 'class-validator';
|
||||
|
||||
@@ -1,26 +1,18 @@
|
||||
import {
|
||||
Controller,
|
||||
Post,
|
||||
UseGuards,
|
||||
Request,
|
||||
Body,
|
||||
Get,
|
||||
ConflictException,
|
||||
NotFoundException,
|
||||
InternalServerErrorException,
|
||||
Body, Controller, Get, InternalServerErrorException, Post, Request, UseGuards
|
||||
} from '@nestjs/common';
|
||||
import { LocalAuthGuard } from './localauth.guard';
|
||||
import { AuthService } from './auth.service';
|
||||
import { JwtAuthGuard } from './jwt.guard';
|
||||
import { AdminGuard } from './admin.guard';
|
||||
import { HasFailed } from 'picsur-shared/dist/types';
|
||||
import AuthFasityRequest from './authrequest';
|
||||
import {
|
||||
AuthDeleteRequest,
|
||||
AuthLoginResponse,
|
||||
AuthMeResponse,
|
||||
AuthRegisterRequest,
|
||||
AuthRegisterRequest
|
||||
} from 'picsur-shared/dist/dto/auth.dto';
|
||||
import { HasFailed } from 'picsur-shared/dist/types';
|
||||
import { AdminGuard } from './admin.guard';
|
||||
import { AuthService } from './auth.service';
|
||||
import AuthFasityRequest from './authrequest';
|
||||
import { JwtAuthGuard } from './jwt.guard';
|
||||
import { LocalAuthGuard } from './localauth.guard';
|
||||
|
||||
@Controller('api/auth')
|
||||
export class AuthController {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { ExistingProvider, Logger, Module, OnModuleInit } from '@nestjs/common';
|
||||
import { PassportModule } from '@nestjs/passport';
|
||||
import { AuthService } from './auth.service';
|
||||
import { LocalAuthStrategy } from './localauth.strategy';
|
||||
import { AuthController } from './auth.controller';
|
||||
import { Logger, Module, OnModuleInit } from '@nestjs/common';
|
||||
import { JwtModule } from '@nestjs/jwt';
|
||||
import { JwtStrategy } from './jwt.strategy';
|
||||
import { UsersModule } from '../../../collections/userdb/userdb.module';
|
||||
|
||||
import { PassportModule } from '@nestjs/passport';
|
||||
import { SysPreferenceModule } from '../../../collections/syspreferencesdb/syspreferencedb.module';
|
||||
import { UsersModule } from '../../../collections/userdb/userdb.module';
|
||||
import { AuthConfigService } from '../../../config/auth.config.service';
|
||||
import { JwtConfigService, JwtSecretProvider } from '../../../config/jwt.lateconfig.service';
|
||||
import { PicsurLateConfigModule } from '../../../config/lateconfig.module';
|
||||
import { AuthConfigService } from '../../../config/auth.config.service';
|
||||
import { AuthController } from './auth.controller';
|
||||
import { AuthService } from './auth.service';
|
||||
import { JwtStrategy } from './jwt.strategy';
|
||||
import { LocalAuthStrategy } from './localauth.strategy';
|
||||
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
|
||||
@@ -4,9 +4,9 @@ import * as bcrypt from 'bcrypt';
|
||||
import { instanceToPlain, plainToClass } from 'class-transformer';
|
||||
import { validate } from 'class-validator';
|
||||
import { JwtDataDto } from 'picsur-shared/dist/dto/auth.dto';
|
||||
import { AsyncFailable, HasFailed, Fail } from 'picsur-shared/dist/types';
|
||||
import { EUserBackend } from '../../../models/entities/user.entity';
|
||||
import { AsyncFailable, Fail, HasFailed } from 'picsur-shared/dist/types';
|
||||
import { UsersService } from '../../../collections/userdb/userdb.service';
|
||||
import { EUserBackend } from '../../../models/entities/user.entity';
|
||||
|
||||
@Injectable()
|
||||
export class AuthService {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { ExtractJwt, Strategy } from 'passport-jwt';
|
||||
import { PassportStrategy } from '@nestjs/passport';
|
||||
import {
|
||||
Inject,
|
||||
Injectable,
|
||||
Logger,
|
||||
UnauthorizedException,
|
||||
UnauthorizedException
|
||||
} from '@nestjs/common';
|
||||
import { validate } from 'class-validator';
|
||||
import { PassportStrategy } from '@nestjs/passport';
|
||||
import { plainToClass } from 'class-transformer';
|
||||
import { validate } from 'class-validator';
|
||||
import { ExtractJwt, Strategy } from 'passport-jwt';
|
||||
import { JwtDataDto } from 'picsur-shared/dist/dto/auth.dto';
|
||||
import { EUserBackend } from '../../../models/entities/user.entity';
|
||||
@Injectable()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Strategy } from 'passport-local';
|
||||
import { PassportStrategy } from '@nestjs/passport';
|
||||
import { Injectable, UnauthorizedException } from '@nestjs/common';
|
||||
import { AuthService } from './auth.service';
|
||||
import { PassportStrategy } from '@nestjs/passport';
|
||||
import { Strategy } from 'passport-local';
|
||||
import { AsyncFailable, HasFailed } from 'picsur-shared/dist/types';
|
||||
import { EUserBackend } from '../../../models/entities/user.entity';
|
||||
import { AuthService } from './auth.service';
|
||||
|
||||
@Injectable()
|
||||
export class LocalAuthStrategy extends PassportStrategy(Strategy, 'local') {
|
||||
|
||||
@@ -2,15 +2,13 @@ import {
|
||||
Body,
|
||||
Controller,
|
||||
Get,
|
||||
InternalServerErrorException,
|
||||
NotFoundException,
|
||||
Param,
|
||||
InternalServerErrorException, Param,
|
||||
Post,
|
||||
UseGuards,
|
||||
UseGuards
|
||||
} from '@nestjs/common';
|
||||
import {
|
||||
SysPreferences,
|
||||
UpdateSysPreferenceRequest,
|
||||
UpdateSysPreferenceRequest
|
||||
} from 'picsur-shared/dist/dto/syspreferences.dto';
|
||||
import { HasFailed } from 'picsur-shared/dist/types';
|
||||
import { SysPreferenceService } from '../../../collections/syspreferencesdb/syspreferencedb.service';
|
||||
|
||||
@@ -7,14 +7,14 @@ import {
|
||||
Param,
|
||||
Post,
|
||||
Req,
|
||||
Res,
|
||||
Res
|
||||
} from '@nestjs/common';
|
||||
import { isHash } from 'class-validator';
|
||||
import { FastifyReply, FastifyRequest } from 'fastify';
|
||||
import { HasFailed } from 'picsur-shared/dist/types';
|
||||
import { ImageManagerService } from '../../managers/imagemanager/imagemanager.service';
|
||||
import { isHash } from 'class-validator';
|
||||
import { ImageUploadDto } from '../../models/dto/imageroute.dto';
|
||||
import { MultiPart } from '../../decorators/decorator';
|
||||
import { ImageManagerService } from '../../managers/imagemanager/imagemanager.service';
|
||||
import { ImageUploadDto } from '../../models/dto/imageroute.dto';
|
||||
@Controller('i')
|
||||
export class ImageController {
|
||||
constructor(private readonly imagesService: ImageManagerService) {}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { ApiService } from './api.service';
|
||||
import { ImageService } from './image.service';
|
||||
import { UserService } from './user.service';
|
||||
import { KeyService } from './key.service';
|
||||
import { UserService } from './user.service';
|
||||
|
||||
@NgModule({
|
||||
providers: [ApiService, ImageService, UserService, KeyService],
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
import { AsyncFailable, Fail, HasFailed } from 'picsur-shared/dist/types';
|
||||
import { ClassConstructor, plainToClass } from 'class-transformer';
|
||||
import { validate } from 'class-validator';
|
||||
import {
|
||||
ApiResponse,
|
||||
ApiSuccessResponse,
|
||||
ApiSuccessResponse
|
||||
} from 'picsur-shared/dist/dto/api.dto';
|
||||
import { validate } from 'class-validator';
|
||||
import { ClassConstructor, plainToClass } from 'class-transformer';
|
||||
import { AsyncFailable, Fail, HasFailed } from 'picsur-shared/dist/types';
|
||||
import { MultiPartRequest } from '../models/multi-part-request';
|
||||
import { KeyService } from './key.service';
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { EImage } from 'picsur-shared/dist/entities/image.entity';
|
||||
import { AsyncFailable, HasFailed } from 'picsur-shared/dist/types';
|
||||
import { ApiService } from './api.service';
|
||||
import { ImageUploadRequest } from '../models/image-upload-request';
|
||||
import { ApiService } from './api.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
|
||||
@@ -1,21 +1,19 @@
|
||||
import { Injectable, OnInit } from '@angular/core';
|
||||
import { EUser } from 'picsur-shared/dist/entities/user.entity';
|
||||
import { BehaviorSubject, Subject } from 'rxjs';
|
||||
import jwt_decode from 'jwt-decode';
|
||||
import {
|
||||
AsyncFailable,
|
||||
Fail,
|
||||
Failable,
|
||||
HasFailed,
|
||||
} from 'picsur-shared/dist/types';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { plainToClass } from 'class-transformer';
|
||||
import { validate } from 'class-validator';
|
||||
import jwt_decode from 'jwt-decode';
|
||||
import {
|
||||
AuthLoginRequest,
|
||||
AuthLoginResponse,
|
||||
AuthMeResponse,
|
||||
JwtDataDto,
|
||||
JwtDataDto
|
||||
} from 'picsur-shared/dist/dto/auth.dto';
|
||||
import { validate } from 'class-validator';
|
||||
import { EUser } from 'picsur-shared/dist/entities/user.entity';
|
||||
import {
|
||||
AsyncFailable,
|
||||
Fail, HasFailed
|
||||
} from 'picsur-shared/dist/types';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { ApiService } from './api.service';
|
||||
import { KeyService } from './key.service';
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
|
||||
import { AppRouterModule } from './router/router.module';
|
||||
import { AppComponent } from './app.component';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { HeaderModule } from './components/header/header.module';
|
||||
import { AppComponent } from './app.component';
|
||||
import { FooterModule } from './components/footer/footer.module';
|
||||
import { HeaderModule } from './components/header/header.module';
|
||||
import { AppRouterModule } from './router/router.module';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent],
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { SnackBarType } from 'src/app/models/snack-bar-type';
|
||||
import { UtilService } from 'src/app/util/util.service';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CopyFieldComponent } from './copyfield.component';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { UtilModule } from 'src/app/util/util.module';
|
||||
import { CopyFieldComponent } from './copyfield.component';
|
||||
@NgModule({
|
||||
declarations: [CopyFieldComponent],
|
||||
imports: [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-footer',
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FooterComponent } from './footer.component';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [FooterComponent],
|
||||
imports: [CommonModule],
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { AutoUnsubscribe } from 'ngx-auto-unsubscribe-decorator';
|
||||
import { EUser } from 'picsur-shared/dist/entities/user.entity';
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { HeaderComponent } from './header.component';
|
||||
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { ApiModule } from 'src/app/api/api.module';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatMenuModule } from '@angular/material/menu';
|
||||
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { ApiModule } from 'src/app/api/api.module';
|
||||
import { UtilModule } from 'src/app/util/util.module';
|
||||
import { HeaderComponent } from './header.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-pagenotfound',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { PageNotFoundComponent } from './pagenotfound.component';
|
||||
|
||||
@NgModule({
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { UploadComponent } from '../routes/upload/upload.component';
|
||||
import { NgxDropzoneModule } from 'ngx-dropzone';
|
||||
import { ProcessingComponent } from '../routes/processing/processing.component';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { ApiModule } from '../api/api.module';
|
||||
import { PageNotFoundModule } from '../components/pagenotfound/pagenotfound.module';
|
||||
import { PageNotFoundComponent } from '../components/pagenotfound/pagenotfound.component';
|
||||
import { ViewComponent } from '../routes/view/view.component';
|
||||
import { CopyFieldModule } from '../components/copyfield/copyfield.module';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { UtilModule } from '../util/util.module';
|
||||
import { LoginComponent } from '../routes/login/login.component';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import {MatFormFieldControl, MatFormFieldModule} from '@angular/material/form-field';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { NgxDropzoneModule } from 'ngx-dropzone';
|
||||
import { ApiModule } from '../api/api.module';
|
||||
import { CopyFieldModule } from '../components/copyfield/copyfield.module';
|
||||
import { PageNotFoundComponent } from '../components/pagenotfound/pagenotfound.component';
|
||||
import { PageNotFoundModule } from '../components/pagenotfound/pagenotfound.module';
|
||||
import { LoginComponent } from '../routes/login/login.component';
|
||||
import { ProcessingComponent } from '../routes/processing/processing.component';
|
||||
import { UploadComponent } from '../routes/upload/upload.component';
|
||||
import { ViewComponent } from '../routes/view/view.component';
|
||||
import { UtilModule } from '../util/util.module';
|
||||
|
||||
// TODO: split up router
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '', component: UploadComponent },
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { AutoUnsubscribe } from 'ngx-auto-unsubscribe-decorator';
|
||||
import { HasFailed } from 'picsur-shared/dist/types';
|
||||
import { UserService } from 'src/app/api/user.service';
|
||||
import { SnackBarType } from 'src/app/models/snack-bar-type';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { ProcessingViewMetadata } from 'src/app/models/processing-view-metadata';
|
||||
import { ImageService } from 'src/app/api/image.service';
|
||||
import { HasFailed } from 'picsur-shared/dist/types';
|
||||
import { ImageService } from 'src/app/api/image.service';
|
||||
import { ProcessingViewMetadata } from 'src/app/models/processing-view-metadata';
|
||||
import { UtilService } from 'src/app/util/util.service';
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { Component } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { NgxDropzoneChangeEvent } from 'ngx-dropzone';
|
||||
import { UtilService } from 'src/app/util/util.service';
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Router } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { isHash } from 'class-validator';
|
||||
import { ImageLinks } from 'picsur-shared/dist/dto/imagelinks.dto';
|
||||
import { HasFailed } from 'picsur-shared/dist/types';
|
||||
import { ImageService } from 'src/app/api/image.service';
|
||||
import { ImageLinks } from 'picsur-shared/dist/dto/imagelinks.dto';
|
||||
import { UtilService } from 'src/app/util/util.service';
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { UtilService } from './util.service';
|
||||
import { NgModule } from '@angular/core';
|
||||
import {
|
||||
MatSnackBarModule,
|
||||
MAT_SNACK_BAR_DEFAULT_OPTIONS,
|
||||
MAT_SNACK_BAR_DEFAULT_OPTIONS
|
||||
} from '@angular/material/snack-bar';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { UtilService } from './util.service';
|
||||
|
||||
@NgModule({
|
||||
declarations: [],
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import Environment from './environments/environment';
|
||||
|
||||
|
||||
if (Environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
/***************************************************************************************************
|
||||
* Zone JS is required by default for Angular itself.
|
||||
*/
|
||||
import 'zone.js'; // Included with Angular CLI.
|
||||
import 'reflect-metadata';
|
||||
import 'zone.js'; // Included with Angular CLI.
|
||||
|
||||
/***************************************************************************************************
|
||||
* APPLICATION IMPORTS
|
||||
|
||||
Reference in New Issue
Block a user