mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-12-25 02:04:15 +02:00
removing ng2-material from project
This commit is contained in:
parent
142bf34a87
commit
9cc5520f74
@ -1,9 +1,12 @@
|
|||||||
<app-frame>
|
<app-frame>
|
||||||
<md-card>
|
<div class="container">
|
||||||
<md-card-title>User management</md-card-title>
|
<div class="panel panel-default">
|
||||||
<md-card-content>
|
<div class="panel-heading">
|
||||||
|
<h3 class="panel-title">User management</h3>
|
||||||
<button md-button (click)="addUser()">+ add user</button>
|
</div>
|
||||||
</md-card-content>
|
<div class="panel-body">
|
||||||
</md-card>
|
<button class="button button-primary" (click)="addUser()">+ add user</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</app-frame>
|
</app-frame>
|
||||||
|
@ -3,16 +3,13 @@
|
|||||||
import {Component, OnInit} from 'angular2/core';
|
import {Component, OnInit} from 'angular2/core';
|
||||||
import {AuthenticationService} from "../model/network/authentication.service.ts";
|
import {AuthenticationService} from "../model/network/authentication.service.ts";
|
||||||
import {Router} from "angular2/router";
|
import {Router} from "angular2/router";
|
||||||
import {MATERIAL_DIRECTIVES} from "ng2-material/all";
|
|
||||||
import {MATERIAL_BROWSER_PROVIDERS} from "ng2-material/all";
|
|
||||||
import {FrameComponent} from "../frame/frame.component";
|
import {FrameComponent} from "../frame/frame.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'admin',
|
selector: 'admin',
|
||||||
templateUrl: 'app/admin/admin.component.html',
|
templateUrl: 'app/admin/admin.component.html',
|
||||||
styleUrls:['app/admin/admin.component.css'],
|
styleUrls:['app/admin/admin.component.css'],
|
||||||
directives:[MATERIAL_DIRECTIVES, FrameComponent],
|
directives:[FrameComponent]
|
||||||
providers:[MATERIAL_BROWSER_PROVIDERS]
|
|
||||||
})
|
})
|
||||||
export class AdminComponent implements OnInit{
|
export class AdminComponent implements OnInit{
|
||||||
constructor(private _authService: AuthenticationService, private _router: Router) {
|
constructor(private _authService: AuthenticationService, private _router: Router) {
|
||||||
|
@ -1,16 +1,13 @@
|
|||||||
|
|
||||||
import {Component} from 'angular2/core';
|
import {Component} from 'angular2/core';
|
||||||
import {MATERIAL_DIRECTIVES} from "ng2-material/all";
|
|
||||||
import {MdDialogRef} from "ng2-material/components/dialog/dialog_ref";
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'admin-new-user',
|
selector: 'admin-new-user',
|
||||||
templateUrl: 'app/admin/newuser/new.user.admin.component.html',
|
templateUrl: 'app/admin/newuser/new.user.admin.component.html',
|
||||||
styleUrls:['app/admin/newuser/new.user.admin.component.css'],
|
styleUrls:['app/admin/newuser/new.user.admin.component.css']
|
||||||
directives:[MATERIAL_DIRECTIVES]
|
|
||||||
})
|
})
|
||||||
export class NewUserComponent{
|
export class NewUserComponent{
|
||||||
constructor(private dialog: MdDialogRef) {
|
constructor() {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,9 +10,7 @@ import {User} from "../../common/entities/User";
|
|||||||
import {Router} from "angular2/router";
|
import {Router} from "angular2/router";
|
||||||
import {HTTP_PROVIDERS} from "angular2/http";
|
import {HTTP_PROVIDERS} from "angular2/http";
|
||||||
import {UserService} from "./model/network/user.service.ts";
|
import {UserService} from "./model/network/user.service.ts";
|
||||||
import {GalleryService} from "./gallery/gallery.service";
|
import {GalleryService} from "./gallery/gallery.service";
|
||||||
import {MATERIAL_BROWSER_PROVIDERS} from "ng2-material/all";
|
|
||||||
import {ViewportHelper} from "ng2-material/core/util/viewport";
|
|
||||||
import {AdminComponent} from "./admin/admin.component";
|
import {AdminComponent} from "./admin/admin.component";
|
||||||
|
|
||||||
|
|
||||||
@ -25,9 +23,7 @@ import {AdminComponent} from "./admin/admin.component";
|
|||||||
ROUTER_PROVIDERS,
|
ROUTER_PROVIDERS,
|
||||||
UserService,
|
UserService,
|
||||||
GalleryService,
|
GalleryService,
|
||||||
AuthenticationService,MATERIAL_BROWSER_PROVIDERS,ViewportHelper
|
AuthenticationService]
|
||||||
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
@RouteConfig([
|
@RouteConfig([
|
||||||
{
|
{
|
||||||
|
@ -1,59 +1,21 @@
|
|||||||
<md-sidenav-container layout="row">
|
<nav class="navbar navbar-inverse navbar-static-top">
|
||||||
|
<div class="container">
|
||||||
<md-sidenav name="menu" align="left" layout="column">
|
<div class="navbar-header">
|
||||||
<md-toolbar class="md-theme-light">
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
|
||||||
<h1 class="md-toolbar-tools">PiGallery2</h1>
|
aria-expanded="false" aria-controls="navbar">
|
||||||
</md-toolbar>
|
<span class="sr-only">Toggle navigation</span>
|
||||||
<md-content layout-padding>
|
<span class="icon-bar"></span>
|
||||||
<button md-raised-button [routerLink]="['Gallery',{directory: '/'}]" class="md-primary">
|
<span class="icon-bar"></span>
|
||||||
Gallery
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
<button md-raised-button [routerLink]="['Admin']" class="md-primary">
|
<a class="navbar-brand" href="#"><img src="icon_inv.png" style="max-height: 26px; display: inline;"/> PiGallery2</a>
|
||||||
Admin
|
</div>
|
||||||
</button>
|
<div id="navbar" class="collapse navbar-collapse">
|
||||||
</md-content>
|
<ul class="nav navbar-nav">
|
||||||
</md-sidenav>
|
<li class="active"><a [routerLink]="['Gallery',{directory: '/'}]">Gallery</a></li>
|
||||||
|
<li><a [routerLink]="['Admin']">Admin</a></li>
|
||||||
<!-- <div layout="column" style="height: 100vh; overflow-y: hidden;">
|
</ul>
|
||||||
<md-toolbar mdScrollShrink>
|
</div><!--/.nav-collapse -->
|
||||||
<div class="md-toolbar-tools">
|
</div>
|
||||||
<button md-button class="md-icon-button md-primary" aria-label="Settings" (click)="showSideNav()">
|
</nav>
|
||||||
<i md-icon>more_vert</i>
|
<ng-content></ng-content>
|
||||||
</button>
|
|
||||||
<h3>
|
|
||||||
<span>PiGallery2</span>
|
|
||||||
</h3>
|
|
||||||
<span flex></span>
|
|
||||||
</div>
|
|
||||||
</md-toolbar>
|
|
||||||
|
|
||||||
<ng-content></ng-content>
|
|
||||||
</div>-->
|
|
||||||
<md-content felx>
|
|
||||||
<nav class="navbar navbar-inverse navbar-static-top">
|
|
||||||
<div class="container">
|
|
||||||
<div class="navbar-header">
|
|
||||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
|
||||||
<span class="sr-only">Toggle navigation</span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
<span class="icon-bar"></span>
|
|
||||||
</button>
|
|
||||||
<a class="navbar-brand" href="#">Project name</a>
|
|
||||||
</div>
|
|
||||||
<div id="navbar" class="collapse navbar-collapse">
|
|
||||||
<ul class="nav navbar-nav">
|
|
||||||
<li class="active"><a href="#">Gallery</a></li>
|
|
||||||
</ul>
|
|
||||||
</div><!--/.nav-collapse -->
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<div class="container" style="width: 100%; padding:0px">
|
|
||||||
|
|
||||||
|
|
||||||
<ng-content></ng-content>
|
|
||||||
|
|
||||||
</div><!-- /.container -->
|
|
||||||
</md-content >
|
|
||||||
</md-sidenav-container>
|
|
@ -1,25 +1,18 @@
|
|||||||
///<reference path="../../browser.d.ts"/>
|
///<reference path="../../browser.d.ts"/>
|
||||||
|
|
||||||
import {Component, ViewEncapsulation} from 'angular2/core';
|
import {Component, ViewEncapsulation} from 'angular2/core';
|
||||||
import {Router, RouterLink} from "angular2/router";
|
import {RouterLink} from "angular2/router";
|
||||||
import {MATERIAL_DIRECTIVES} from "ng2-material/all";
|
|
||||||
import {MATERIAL_BROWSER_PROVIDERS} from "ng2-material/all";
|
|
||||||
import {ViewportHelper} from "ng2-material/all";
|
|
||||||
import {SidenavService} from "ng2-material/all";
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-frame',
|
selector: 'app-frame',
|
||||||
templateUrl: 'app/frame/frame.component.html',
|
templateUrl: 'app/frame/frame.component.html',
|
||||||
directives:[RouterLink,MATERIAL_DIRECTIVES],
|
directives:[RouterLink],
|
||||||
providers: [SidenavService],
|
|
||||||
encapsulation: ViewEncapsulation.Emulated
|
encapsulation: ViewEncapsulation.Emulated
|
||||||
})
|
})
|
||||||
export class FrameComponent {
|
export class FrameComponent {
|
||||||
constructor( private _router: Router, public sidenav: SidenavService) {
|
constructor() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public showSideNav(){
|
|
||||||
this.sidenav.show("menu");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,15 +4,11 @@ import {Component, Input, OnInit} from 'angular2/core';
|
|||||||
import {Directory} from "../../../../common/entities/Directory";
|
import {Directory} from "../../../../common/entities/Directory";
|
||||||
import {RouterLink} from "angular2/router";
|
import {RouterLink} from "angular2/router";
|
||||||
import {Utils} from "../../../../common/Utils";
|
import {Utils} from "../../../../common/Utils";
|
||||||
import {MATERIAL_BROWSER_PROVIDERS} from "ng2-material/all";
|
|
||||||
import {ViewportHelper} from "ng2-material/all";
|
|
||||||
import {MATERIAL_DIRECTIVES} from "ng2-material/all";
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'gallery-directory',
|
selector: 'gallery-directory',
|
||||||
templateUrl: 'app/gallery/directory/directory.gallery.component.html',
|
templateUrl: 'app/gallery/directory/directory.gallery.component.html',
|
||||||
directives:[RouterLink,MATERIAL_DIRECTIVES],
|
directives:[RouterLink],
|
||||||
providers:[MATERIAL_BROWSER_PROVIDERS, ViewportHelper]
|
|
||||||
})
|
})
|
||||||
export class GalleryDirectoryComponent{
|
export class GalleryDirectoryComponent{
|
||||||
@Input() directory: Directory;
|
@Input() directory: Directory;
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
<gallery-lightbox #lightbox></gallery-lightbox>
|
<gallery-lightbox #lightbox></gallery-lightbox>
|
||||||
<app-frame>
|
<app-frame>
|
||||||
|
<div class="container" style="width: 100%; padding:0">
|
||||||
<div *ngIf="currentDirectory" *ngFor="let directory of currentDirectory.directories">
|
<div *ngIf="currentDirectory" *ngFor="let directory of currentDirectory.directories">
|
||||||
<gallery-directory *ngIf="directory" [directory]="directory"></gallery-directory>
|
<gallery-directory *ngIf="directory" [directory]="directory"></gallery-directory>
|
||||||
</div>
|
</div>
|
||||||
<gallery-grid [directory]="currentDirectory" [lightbox]="lightbox" ></gallery-grid>
|
<gallery-grid [directory]="currentDirectory" [lightbox]="lightbox"></gallery-grid>
|
||||||
|
</div>
|
||||||
</app-frame>
|
</app-frame>
|
@ -8,7 +8,6 @@ import {Directory} from "../../../common/entities/Directory";
|
|||||||
import {Message} from "../../../common/entities/Message";
|
import {Message} from "../../../common/entities/Message";
|
||||||
import {GalleryDirectoryComponent} from "./directory/directory.gallery.component";
|
import {GalleryDirectoryComponent} from "./directory/directory.gallery.component";
|
||||||
import {GalleryGridComponent} from "./grid/grid.gallery.component";
|
import {GalleryGridComponent} from "./grid/grid.gallery.component";
|
||||||
import {MATERIAL_DIRECTIVES} from "ng2-material/all";
|
|
||||||
import {FrameComponent} from "../frame/frame.component";
|
import {FrameComponent} from "../frame/frame.component";
|
||||||
import {GalleryLightboxComponent} from "./lightbox/lightbox.gallery.component";
|
import {GalleryLightboxComponent} from "./lightbox/lightbox.gallery.component";
|
||||||
|
|
||||||
@ -19,8 +18,7 @@ import {GalleryLightboxComponent} from "./lightbox/lightbox.gallery.component";
|
|||||||
directives:[GalleryGridComponent,
|
directives:[GalleryGridComponent,
|
||||||
GalleryDirectoryComponent,
|
GalleryDirectoryComponent,
|
||||||
GalleryLightboxComponent,
|
GalleryLightboxComponent,
|
||||||
FrameComponent,
|
FrameComponent]
|
||||||
MATERIAL_DIRECTIVES]
|
|
||||||
})
|
})
|
||||||
export class GalleryComponent implements OnInit{
|
export class GalleryComponent implements OnInit{
|
||||||
|
|
||||||
|
@ -1,26 +1,13 @@
|
|||||||
|
<div class="container">
|
||||||
|
<div class="col-sm-offset-3 col-sm-6 col-lg-4 col-lg-offset-4">
|
||||||
<md-content class="md-padding" layout="row" layout-wrap layout-align="center start">
|
<form class="form-signin" (ngSubmit)="onSubmit()" #LoginForm="ngForm">
|
||||||
<div flex-gt-lg="25" flex="50" flex-xs="100" layout="column">
|
<h2 class="form-signin-heading">Please sign in</h2>
|
||||||
<md-card>
|
<input type="email" class="form-control" placeholder="Email address" autofocus
|
||||||
<md-card-title>Login</md-card-title>
|
[(value)]="loginCredential.username" ngControl="name" #name="ngForm" required>
|
||||||
<md-card-content>
|
<input type="password" class="form-control" placeholder="Password"
|
||||||
<form (ngSubmit)="onSubmit()" #LoginForm="ngForm">
|
[(value)]="loginCredential.password" ngControl="password" #name="ngForm" required>
|
||||||
<md-input-container class="md-block" flex-gt-sm>
|
<br/>
|
||||||
<label>Username (or e-mail)</label>
|
<button class="btn btn-lg btn-primary btn-block" [disabled]="!LoginForm.form.valid" (click)="onLogin()">Sign in</button>
|
||||||
<input md-input type="text" [(value)]="loginCredential.username"
|
</form>
|
||||||
ngControl="name" #name="ngForm" required >
|
|
||||||
</md-input-container>
|
|
||||||
<md-input-container class="md-block" flex-gt-sm>
|
|
||||||
<label>Password</label>
|
|
||||||
<input md-input type="password" [(value)]="loginCredential.password"
|
|
||||||
ngControl="password" #name="ngForm" required>
|
|
||||||
</md-input-container>
|
|
||||||
</form>
|
|
||||||
</md-card-content>
|
|
||||||
<md-card-actions layout="row" layout-align="end center">
|
|
||||||
<button md-button [disabled]="!LoginForm.form.valid" (click)="onLogin()">LOGIN</button>
|
|
||||||
</md-card-actions>
|
|
||||||
</md-card>
|
|
||||||
</div>
|
</div>
|
||||||
</md-content>
|
</div> <!-- /container -->
|
||||||
|
@ -3,18 +3,14 @@
|
|||||||
import {Component, OnInit} from 'angular2/core';
|
import {Component, OnInit} from 'angular2/core';
|
||||||
import {LoginCredential} from '../../../common/entities/LoginCredential';
|
import {LoginCredential} from '../../../common/entities/LoginCredential';
|
||||||
import {AuthenticationService} from "../model/network/authentication.service.ts";
|
import {AuthenticationService} from "../model/network/authentication.service.ts";
|
||||||
import {Router} from "angular2/router";
|
import {Router} from "angular2/router";
|
||||||
import {MATERIAL_DIRECTIVES} from "ng2-material/all";
|
import {FORM_DIRECTIVES} from "angular2/common";
|
||||||
import {FORM_DIRECTIVES} from "angular2/common";
|
|
||||||
import {MATERIAL_BROWSER_PROVIDERS} from "ng2-material/all";
|
|
||||||
import {ViewportHelper} from "ng2-material/all";
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'login',
|
selector: 'login',
|
||||||
templateUrl: 'app/login/login.component.html',
|
templateUrl: 'app/login/login.component.html',
|
||||||
styleUrls:['app/login/login.component.css'],
|
styleUrls:['app/login/login.component.css'],
|
||||||
directives:[MATERIAL_DIRECTIVES,FORM_DIRECTIVES],
|
directives:[FORM_DIRECTIVES]
|
||||||
providers:[MATERIAL_BROWSER_PROVIDERS, ViewportHelper]
|
|
||||||
})
|
})
|
||||||
export class LoginComponent implements OnInit{
|
export class LoginComponent implements OnInit{
|
||||||
loginCredential: LoginCredential;
|
loginCredential: LoginCredential;
|
||||||
|
BIN
frontend/icon_inv.png
Normal file
BIN
frontend/icon_inv.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
@ -6,7 +6,9 @@
|
|||||||
<title>PiGallery2</title>
|
<title>PiGallery2</title>
|
||||||
<link rel="shortcut icon" href="icon.png">
|
<link rel="shortcut icon" href="icon.png">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
|
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"
|
||||||
|
integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7"
|
||||||
|
crossorigin="anonymous">
|
||||||
|
|
||||||
|
|
||||||
<body >
|
<body >
|
||||||
|
@ -35,7 +35,6 @@
|
|||||||
"mongoose": "^4.4.14",
|
"mongoose": "^4.4.14",
|
||||||
"morgan": "^1.7.0",
|
"morgan": "^1.7.0",
|
||||||
"ng2-cookies": "^0.1.5",
|
"ng2-cookies": "^0.1.5",
|
||||||
"ng2-material": "^0.3.7",
|
|
||||||
"optimist": "^0.6.1",
|
"optimist": "^0.6.1",
|
||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.6",
|
||||||
"ts-loader": "^0.8.2",
|
"ts-loader": "^0.8.2",
|
||||||
|
Loading…
Reference in New Issue
Block a user