1
0
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:
Braun Patrik 2016-05-01 10:28:05 +02:00
parent 142bf34a87
commit 9cc5520f74
14 changed files with 63 additions and 136 deletions

View File

@ -1,9 +1,12 @@
<app-frame>
<md-card>
<md-card-title>User management</md-card-title>
<md-card-content>
<button md-button (click)="addUser()">+ add user</button>
</md-card-content>
</md-card>
<div class="container">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">User management</h3>
</div>
<div class="panel-body">
<button class="button button-primary" (click)="addUser()">+ add user</button>
</div>
</div>
</div>
</app-frame>

View File

@ -3,16 +3,13 @@
import {Component, OnInit} from 'angular2/core';
import {AuthenticationService} from "../model/network/authentication.service.ts";
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";
@Component({
selector: 'admin',
templateUrl: 'app/admin/admin.component.html',
styleUrls:['app/admin/admin.component.css'],
directives:[MATERIAL_DIRECTIVES, FrameComponent],
providers:[MATERIAL_BROWSER_PROVIDERS]
directives:[FrameComponent]
})
export class AdminComponent implements OnInit{
constructor(private _authService: AuthenticationService, private _router: Router) {

View File

@ -1,16 +1,13 @@
import {Component} from 'angular2/core';
import {MATERIAL_DIRECTIVES} from "ng2-material/all";
import {MdDialogRef} from "ng2-material/components/dialog/dialog_ref";
@Component({
selector: 'admin-new-user',
templateUrl: 'app/admin/newuser/new.user.admin.component.html',
styleUrls:['app/admin/newuser/new.user.admin.component.css'],
directives:[MATERIAL_DIRECTIVES]
styleUrls:['app/admin/newuser/new.user.admin.component.css']
})
export class NewUserComponent{
constructor(private dialog: MdDialogRef) {
constructor() {
}
}

View File

@ -10,9 +10,7 @@ import {User} from "../../common/entities/User";
import {Router} from "angular2/router";
import {HTTP_PROVIDERS} from "angular2/http";
import {UserService} from "./model/network/user.service.ts";
import {GalleryService} from "./gallery/gallery.service";
import {MATERIAL_BROWSER_PROVIDERS} from "ng2-material/all";
import {ViewportHelper} from "ng2-material/core/util/viewport";
import {GalleryService} from "./gallery/gallery.service";
import {AdminComponent} from "./admin/admin.component";
@ -25,9 +23,7 @@ import {AdminComponent} from "./admin/admin.component";
ROUTER_PROVIDERS,
UserService,
GalleryService,
AuthenticationService,MATERIAL_BROWSER_PROVIDERS,ViewportHelper
]
AuthenticationService]
})
@RouteConfig([
{

View File

@ -1,59 +1,21 @@
<md-sidenav-container layout="row">
<md-sidenav name="menu" align="left" layout="column">
<md-toolbar class="md-theme-light">
<h1 class="md-toolbar-tools">PiGallery2</h1>
</md-toolbar>
<md-content layout-padding>
<button md-raised-button [routerLink]="['Gallery',{directory: '/'}]" class="md-primary">
Gallery
<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>
<button md-raised-button [routerLink]="['Admin']" class="md-primary">
Admin
</button>
</md-content>
</md-sidenav>
<!-- <div layout="column" style="height: 100vh; overflow-y: hidden;">
<md-toolbar mdScrollShrink>
<div class="md-toolbar-tools">
<button md-button class="md-icon-button md-primary" aria-label="Settings" (click)="showSideNav()">
<i md-icon>more_vert</i>
</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>
<a class="navbar-brand" href="#"><img src="icon_inv.png" style="max-height: 26px; display: inline;"/> PiGallery2</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a [routerLink]="['Gallery',{directory: '/'}]">Gallery</a></li>
<li><a [routerLink]="['Admin']">Admin</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<ng-content></ng-content>

View File

@ -1,25 +1,18 @@
///<reference path="../../browser.d.ts"/>
import {Component, ViewEncapsulation} from 'angular2/core';
import {Router, 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";
import {RouterLink} from "angular2/router";
@Component({
selector: 'app-frame',
templateUrl: 'app/frame/frame.component.html',
directives:[RouterLink,MATERIAL_DIRECTIVES],
providers: [SidenavService],
directives:[RouterLink],
encapsulation: ViewEncapsulation.Emulated
})
export class FrameComponent {
constructor( private _router: Router, public sidenav: SidenavService) {
constructor() {
}
public showSideNav(){
this.sidenav.show("menu");
}
}

View File

@ -4,15 +4,11 @@ import {Component, Input, OnInit} from 'angular2/core';
import {Directory} from "../../../../common/entities/Directory";
import {RouterLink} from "angular2/router";
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({
selector: 'gallery-directory',
templateUrl: 'app/gallery/directory/directory.gallery.component.html',
directives:[RouterLink,MATERIAL_DIRECTIVES],
providers:[MATERIAL_BROWSER_PROVIDERS, ViewportHelper]
directives:[RouterLink],
})
export class GalleryDirectoryComponent{
@Input() directory: Directory;

View File

@ -1,8 +1,9 @@
<gallery-lightbox #lightbox></gallery-lightbox>
<gallery-lightbox #lightbox></gallery-lightbox>
<app-frame>
<div class="container" style="width: 100%; padding:0">
<div *ngIf="currentDirectory" *ngFor="let directory of currentDirectory.directories">
<gallery-directory *ngIf="directory" [directory]="directory"></gallery-directory>
</div>
<gallery-grid [directory]="currentDirectory" [lightbox]="lightbox" ></gallery-grid>
<gallery-grid [directory]="currentDirectory" [lightbox]="lightbox"></gallery-grid>
</div>
</app-frame>

View File

@ -8,7 +8,6 @@ import {Directory} from "../../../common/entities/Directory";
import {Message} from "../../../common/entities/Message";
import {GalleryDirectoryComponent} from "./directory/directory.gallery.component";
import {GalleryGridComponent} from "./grid/grid.gallery.component";
import {MATERIAL_DIRECTIVES} from "ng2-material/all";
import {FrameComponent} from "../frame/frame.component";
import {GalleryLightboxComponent} from "./lightbox/lightbox.gallery.component";
@ -19,8 +18,7 @@ import {GalleryLightboxComponent} from "./lightbox/lightbox.gallery.component";
directives:[GalleryGridComponent,
GalleryDirectoryComponent,
GalleryLightboxComponent,
FrameComponent,
MATERIAL_DIRECTIVES]
FrameComponent]
})
export class GalleryComponent implements OnInit{

View File

@ -1,26 +1,13 @@
<md-content class="md-padding" layout="row" layout-wrap layout-align="center start">
<div flex-gt-lg="25" flex="50" flex-xs="100" layout="column">
<md-card>
<md-card-title>Login</md-card-title>
<md-card-content>
<form (ngSubmit)="onSubmit()" #LoginForm="ngForm">
<md-input-container class="md-block" flex-gt-sm>
<label>Username (or e-mail)</label>
<input md-input type="text" [(value)]="loginCredential.username"
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 class="container">
<div class="col-sm-offset-3 col-sm-6 col-lg-4 col-lg-offset-4">
<form class="form-signin" (ngSubmit)="onSubmit()" #LoginForm="ngForm">
<h2 class="form-signin-heading">Please sign in</h2>
<input type="email" class="form-control" placeholder="Email address" autofocus
[(value)]="loginCredential.username" ngControl="name" #name="ngForm" required>
<input type="password" class="form-control" placeholder="Password"
[(value)]="loginCredential.password" ngControl="password" #name="ngForm" required>
<br/>
<button class="btn btn-lg btn-primary btn-block" [disabled]="!LoginForm.form.valid" (click)="onLogin()">Sign in</button>
</form>
</div>
</md-content>
</div> <!-- /container -->

View File

@ -3,18 +3,14 @@
import {Component, OnInit} from 'angular2/core';
import {LoginCredential} from '../../../common/entities/LoginCredential';
import {AuthenticationService} from "../model/network/authentication.service.ts";
import {Router} from "angular2/router";
import {MATERIAL_DIRECTIVES} from "ng2-material/all";
import {FORM_DIRECTIVES} from "angular2/common";
import {MATERIAL_BROWSER_PROVIDERS} from "ng2-material/all";
import {ViewportHelper} from "ng2-material/all";
import {Router} from "angular2/router";
import {FORM_DIRECTIVES} from "angular2/common";
@Component({
selector: 'login',
templateUrl: 'app/login/login.component.html',
styleUrls:['app/login/login.component.css'],
directives:[MATERIAL_DIRECTIVES,FORM_DIRECTIVES],
providers:[MATERIAL_BROWSER_PROVIDERS, ViewportHelper]
directives:[FORM_DIRECTIVES]
})
export class LoginComponent implements OnInit{
loginCredential: LoginCredential;

BIN
frontend/icon_inv.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -6,7 +6,9 @@
<title>PiGallery2</title>
<link rel="shortcut icon" href="icon.png">
<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 >

View File

@ -35,7 +35,6 @@
"mongoose": "^4.4.14",
"morgan": "^1.7.0",
"ng2-cookies": "^0.1.5",
"ng2-material": "^0.3.7",
"optimist": "^0.6.1",
"rxjs": "5.0.0-beta.6",
"ts-loader": "^0.8.2",