folder settings bugfix

This commit is contained in:
Braun Patrik 2017-07-15 17:48:29 +02:00
parent 935f0e35ec
commit 1cf911e186
9 changed files with 61 additions and 62 deletions

View File

@ -1,17 +1,17 @@
declare module Express { declare module Express {
export interface Request { export interface Request {
resultPipe?:any resultPipe?: any
body?:{ body?: {
loginCredential loginCredential
}
} }
}
export interface Response { export interface Response {
tpl?:any tpl?: any
} }
export interface Session { export interface Session {
user?; user?;
} }
} }

View File

@ -1,10 +1,10 @@
declare module "jimp" { declare module "jimp" {
function read(filaname); function read(filaname);
var RESIZE_NEAREST_NEIGHBOR; var RESIZE_NEAREST_NEIGHBOR;
var RESIZE_BILINEAR; var RESIZE_BILINEAR;
var RESIZE_BICUBIC; var RESIZE_BICUBIC;
var RESIZE_HERMITE; var RESIZE_HERMITE;
var RESIZE_BEZIER; var RESIZE_BEZIER;
var AUTO:any; var AUTO: any;
} }

View File

@ -50,6 +50,7 @@ export class AuthenticationMWs {
return next(); return next();
} }
public static async authenticate(req: Request, res: Response, next: NextFunction) { public static async authenticate(req: Request, res: Response, next: NextFunction) {
if (Config.Client.authenticationRequired === false) { if (Config.Client.authenticationRequired === false) {

View File

@ -1,13 +1,13 @@
declare module "flat-file-db" { declare module "flat-file-db" {
export function sync(path: string): DB; export function sync(path: string): DB;
} }
declare interface DB { declare interface DB {
sync(): any; sync(): any;
put(): any; put(): any;
get(): any; get(): any;
del(): any; del(): any;
has(): any; has(): any;
keys(): any; keys(): any;
close(): any; close(): any;
} }

View File

@ -1,37 +1,37 @@
import {Entity, Column, PrimaryGeneratedColumn, OneToMany, ManyToOne} from "typeorm"; import {Column, Entity, ManyToOne, OneToMany, PrimaryGeneratedColumn} from "typeorm";
import {DirectoryDTO} from "../../../../common/entities/DirectoryDTO"; import {DirectoryDTO} from "../../../../common/entities/DirectoryDTO";
import {PhotoEntity} from "./PhotoEntity"; import {PhotoEntity} from "./PhotoEntity";
@Entity() @Entity()
export class DirectoryEntity implements DirectoryDTO { export class DirectoryEntity implements DirectoryDTO {
@PrimaryGeneratedColumn() @PrimaryGeneratedColumn()
id: number; id: number;
@Column({ @Column({
length: 500 length: 500
}) })
name: string; name: string;
@Column({ @Column({
length: 500 length: 500
}) })
path: string; path: string;
@Column('number') @Column('number')
public lastUpdate: number; public lastUpdate: number;
@Column({type: 'smallint', length: 1}) @Column({type: 'smallint', length: 1})
public scanned: boolean; public scanned: boolean;
@ManyToOne(type => DirectoryEntity, directory => directory.directories) @ManyToOne(type => DirectoryEntity, directory => directory.directories)
public parent: DirectoryEntity; public parent: DirectoryEntity;
@OneToMany(type => DirectoryEntity, dir => dir.parent) @OneToMany(type => DirectoryEntity, dir => dir.parent)
public directories: Array<DirectoryEntity>; public directories: Array<DirectoryEntity>;
@OneToMany(type => PhotoEntity, photo => photo.directory) @OneToMany(type => PhotoEntity, photo => photo.directory)
public photos: Array<PhotoEntity>; public photos: Array<PhotoEntity>;
} }

View File

@ -12,7 +12,7 @@
<link rel="stylesheet" <link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.4/css/bootstrap3/bootstrap-switch.css"> href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.4/css/bootstrap3/bootstrap-switch.css">
<script type="text/javascript" src="config_inject.js"></script> <script type="text/javascript" src="config_inject.js"></script>
</head> </head>
<body style="overflow-y: scroll"> <body style="overflow-y: scroll">

View File

@ -18,7 +18,7 @@
*/ */
/** IE9, IE10 and IE11 requires all of the following polyfills. **/ /** IE9, IE10 and IE11 requires all of the following polyfills. **/
// import 'core-js/es6/symbol'; // import 'core-js/es6/symbol';
import 'core-js/es6/object'; import "core-js/es6/object";
// import 'core-js/es6/function'; // import 'core-js/es6/function';
// import 'core-js/es6/parse-int'; // import 'core-js/es6/parse-int';
// import 'core-js/es6/parse-float'; // import 'core-js/es6/parse-float';
@ -26,7 +26,7 @@
// import 'core-js/es6/math'; // import 'core-js/es6/math';
// import 'core-js/es6/string'; // import 'core-js/es6/string';
// import 'core-js/es6/date'; // import 'core-js/es6/date';
import 'core-js/es6/array'; import "core-js/es6/array";
// import 'core-js/es6/regexp'; // import 'core-js/es6/regexp';
// import 'core-js/es6/map'; // import 'core-js/es6/map';
// import 'core-js/es6/weak-map'; // import 'core-js/es6/weak-map';
@ -44,17 +44,14 @@ import "core-js/es7/reflect";
* Zone JS is required by Angular itself. * Zone JS is required by Angular itself.
*/ */
import "zone.js/dist/zone"; // Included with Angular CLI. import "zone.js/dist/zone"; // Included with Angular CLI.
/*************************************************************************************************** /***************************************************************************************************
* APPLICATION IMPORTS * APPLICATION IMPORTS
*/ */
/** /**
* Date, currency, decimal and percent pipes. * Date, currency, decimal and percent pipes.
* Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
*/ */
import 'intl'; // Run `npm install --save intl`. import "intl"; // Run `npm install --save intl`.
/** /**
* Need to import at least one locale-data with intl. * Need to import at least one locale-data with intl.
*/ */

View File

@ -12,11 +12,11 @@ module.exports = function (config) {
require('karma-coverage-istanbul-reporter'), require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma') require('@angular/cli/plugins/karma')
], ],
client:{ client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser clearContext: false // leave Jasmine Spec Runner output visible in browser
}, },
coverageIstanbulReporter: { coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly' ], reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true fixWebpackSourcePaths: true
}, },
angularCli: { angularCli: {

View File

@ -1,7 +1,7 @@
// Protractor configuration file, see link for more information // Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts // https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter'); const {SpecReporter} = require('jasmine-spec-reporter');
exports.config = { exports.config = {
allScriptsTimeout: 11000, allScriptsTimeout: 11000,
@ -17,12 +17,13 @@ exports.config = {
jasmineNodeOpts: { jasmineNodeOpts: {
showColors: true, showColors: true,
defaultTimeoutInterval: 30000, defaultTimeoutInterval: 30000,
print: function() {} print: function () {
}
}, },
onPrepare() { onPrepare() {
require('ts-node').register({ require('ts-node').register({
project: 'test/e2e/tsconfig.e2e.json' project: 'test/e2e/tsconfig.e2e.json'
}); });
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); jasmine.getEnv().addReporter(new SpecReporter({spec: {displayStacktrace: true}}));
} }
}; };