Skip to content

Commit

Permalink
(feat): various styling and functional changes
Browse files Browse the repository at this point in the history
  • Loading branch information
markharding committed Jan 17, 2017
1 parent 817891d commit 9fd3191
Show file tree
Hide file tree
Showing 52 changed files with 288 additions and 93 deletions.
3 changes: 2 additions & 1 deletion config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.minds.mobile.dev" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.minds.mobile.dev" version="0.0.2" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Minds (2.0)</name>
<description>The next gen Minds app</description>
<author email="mark@minds.com" href="http://minds.com/mark">Minds Inc.</author>
Expand All @@ -23,6 +23,7 @@
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="none" />
<preference name="loadUrlTimeoutValue" value="700000" />

<!--
Change these to configure how the splashscreen displays and fades in/out.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/android/icon/drawable-hdpi-icon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/android/icon/drawable-mdpi-icon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/android/icon/drawable-xhdpi-icon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/android/icon/drawable-xxhdpi-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/android/icon/drawable-xxxhdpi-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/android/splash/drawable-land-hdpi-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/android/splash/drawable-land-mdpi-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/android/splash/drawable-port-xhdpi-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/android/splash/drawable-port-xxhdpi-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/android/splash/drawable-port-xxxhdpi-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 7 additions & 6 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Component, ViewChild } from "@angular/core";
import { Nav } from 'ionic-angular';

import { TabsComponent } from "./modules/tabs/tabs.component"
import { LoginComponent } from "./modules/auth/login.component"
import { TabsComponent } from "./modules/tabs/tabs.component";
import { LoginComponent } from "./modules/auth/login.component";
import { NewsfeedList } from "./modules/newsfeed/list.component";
import { OAuth2 } from "./common/services/api/oauth2";

@Component({
Expand All @@ -18,13 +19,13 @@ export class MindsApp {
rootPage : any = LoginComponent;

constructor(private oauth2 : OAuth2){
if(this.oauth2.hasAccessToken()){
this.rootPage = TabsComponent;
}
}

ngOnInit(){
if(this.oauth2.hasAccessToken()){
//this.nav.setRoot(LoginComponent);
this.rootPage = LoginComponent;
}

}

logout(){
Expand Down
5 changes: 4 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { MindsApp } from './app.component';
import { ApiModule } from './common/services/api.module';
import { CacheModule } from './common/services/cache/cache.module';

import { CommonModule } from './common/common.module';

import { AuthModule } from './modules/auth/auth.module';
import { TabsModule } from './modules/tabs/tabs.module';
import { ChannelModule } from './modules/channel/channel.module';
Expand All @@ -25,10 +27,11 @@ import { routes } from "./app.routes";
tabsPlacement: 'bottom',
platforms: {
android: {
tabsPlacement: 'top'
tabsPlacement: 'bottom'
}
}
}),
CommonModule,
ApiModule,
CacheModule,
AuthModule,
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ $tabbar-md-background: #37474f;


img{
background:#333;

}


Expand Down
10 changes: 10 additions & 0 deletions src/app/common/common.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { NgModule } from '@angular/core';

import { ImgFadeDirective } from './directives/img-fade.directive';
import { DomainPipe } from './pipes/domain.pipe';

@NgModule({
declarations: [ ImgFadeDirective, DomainPipe ],
exports: [ ImgFadeDirective, DomainPipe ]
})
export class CommonModule { }
17 changes: 17 additions & 0 deletions src/app/common/directives/img-fade.directive.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
img[imgFade]{
-webkit-transition: -webkit-filter 1s ease-in;
transition: filter 1s ease-in;

background:#666;
-webkit-filter:
//blur(1px)
opacity(0%);

drop-shadow:0 0 3px #EEE;
}

img.m-imgFade--loaded{
-webkit-filter:
//blur(0)
opacity(100%);
}
17 changes: 17 additions & 0 deletions src/app/common/directives/img-fade.directive.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Directive, ElementRef, Input } from '@angular/core';

@Directive({
selector: '[imgFade]'
})

export class ImgFadeDirective {

constructor(el: ElementRef) {

//el.nativeElement.cla = 0;
el.nativeElement.addEventListener('load', () => {
el.nativeElement.className += " m-imgFade--loaded";
});

}
}
27 changes: 0 additions & 27 deletions src/app/modules/auth/login.component.css

This file was deleted.

6 changes: 3 additions & 3 deletions src/app/modules/auth/login.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<div class="login-header">
<div class="background-image background-image-2"></div>
<img src="assets/full_logo.png" class="login-logo"/>
<div class="m-ionic-login--header login-header">
<div class="m-ionic-login--bg"></div>
<img src="assets/full_logo_white.png" class="m-ionic-login--logo"/>
</div>

<ion-list>
Expand Down
31 changes: 31 additions & 0 deletions src/app/modules/auth/login.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.m-auth-login-grid{
/*padding: 16;*/
}

.m-ionic-login--header{
text-align:center;
width:100%;
overflow: hidden;
position: relative;
max-height: 300px;

}

.m-ionic-login--bg{
position: absolute;
top: 0;
left: 0;
width: 110%;
height: 110%;
background: url('../assets/bg-1.jpeg') center 0;
background-size:100%;
z-index: -1;
margin: -12px;
-webkit-filter: brightness(60%);
}

.m-ionic-login--logo{
width:200px;
margin:50px 0;
background:transparent;
}
23 changes: 15 additions & 8 deletions src/app/modules/auth/login.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, OnInit, OnDestroy } from '@angular/core';
import { NavController } from 'ionic-angular';
import { NavController, LoadingController, AlertController } from 'ionic-angular';


import { TabsComponent } from '../tabs/tabs.component';
Expand All @@ -14,7 +14,7 @@ import { OAuth2 } from '../../common/services/api/oauth2';

export class LoginComponent {

constructor(private oauth2 : OAuth2, private nav : NavController){
constructor(private oauth2 : OAuth2, private nav : NavController, public loadingCtrl: LoadingController, private alertCtrl: AlertController){
}

ngOnInit(){
Expand All @@ -25,16 +25,23 @@ export class LoginComponent {

login(username, password, e){
e.preventDefault();
console.log('clicked login');
console.log('username: ', username.value);
console.log('password: ', password.value);

let loader = this.loadingCtrl.create({
content: "Please wait...",
});
loader.present();

this.oauth2.login(username.value, password.value, (success) => {
console.log('login callback called');
console.log(success);
loader.dismiss();
if(success){
this.nav.push(TabsComponent);
} else {
alert('Please try again');
let alert = this.alertCtrl.create({
title: 'Sorry!',
subTitle: "We could not log you in. Please check your credentials",
buttons: ['Try again']
});
alert.present();
}
});
//this.routerExtensions.navigate(['/tab/newsfeed'], { clearHistory: true });
Expand Down
10 changes: 10 additions & 0 deletions src/app/modules/buttons/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,13 @@
.m-ionic-icon{
font-size:20px;
}


minds-button-comment{
span{
margin-top: 4px;
margin-left: 8px;
font-weight: 600;
position: absolute;
}
}
3 changes: 2 additions & 1 deletion src/app/modules/channel/channel.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
width="100%"
[hidden]="banner.hide"
height="225px"

imgFade
>
</div>

Expand All @@ -23,6 +23,7 @@
[src]="'https://www.minds.com/icon/' + channel.guid + '/large'"
width="150px"
height="150px"
imgFade
>

<h1> {{channel.name}} </h1>
Expand Down
3 changes: 2 additions & 1 deletion src/app/modules/channel/channel.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Client } from '../../common/services/api/client';
import { ChannelComponent } from './channel.component';
import { ChannelFeedComponent } from './feed.component';
import { NewsfeedModule } from '../newsfeed/newsfeed.module';
import { CommonModule } from '../../common/common.module';

@NgModule({
/*imports: [
Expand All @@ -22,7 +23,7 @@ import { NewsfeedModule } from '../newsfeed/newsfeed.module';
exports: [
RouterModule
]*/
imports: [ IonicModule, NewsfeedModule ],
imports: [ IonicModule, NewsfeedModule, CommonModule ],
providers: [ Client ],
declarations: [ ChannelComponent, ChannelFeedComponent ],
exports: [ ChannelComponent ],
Expand Down
29 changes: 14 additions & 15 deletions src/app/modules/comments/list.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@

<ion-content>

<ion-refresher (ionRefresh)="refresh($event)">
<ion-refresher-content></ion-refresher-content>
<ion-refresher (ionRefresh)="loadEarlier($event)">
<ion-refresher-content *ngIf="inProgress"></ion-refresher-content>
</ion-refresher>

<ion-list>
<ion-list class="m-ionic-comments--list">

<div *ngFor="let comment of comments" class="m-ionic-comments--list">
<div *ngFor="let comment of comments">
<div class="m-ionic-comments--comment">
<div class="m-ionic-avatar">
<img [src]="'https://www.minds.com/icon/' + comment.ownerObj.guid + '/medium'" class="mdl-shadow--2dp"/>
Expand All @@ -34,17 +34,16 @@
</ion-list>


<ion-infinite-scroll (ionInfinite)="loadMore($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>

<div class="m-ionic-comments--composer">
<div class="m-ionic-avatar">
<img [src]="'https://www.minds.com/icon/' + storage.get('user_guid') + '/medium'" class="mdl-shadow--2dp"/>
</div>
<div class="m-ionic-body">
<textarea placeholder="Write your comment..." rows="0"></textarea>
</div>
</div>


</ion-content>

<div class="m-ionic-comments--composer">
<div class="m-ionic-avatar">
<img [src]="'https://www.minds.com/icon/' + storage.get('user_guid') + '/medium'" class="mdl-shadow--2dp"/>
</div>
<div class="m-ionic-body">
<textarea placeholder="Write your comment..." rows="0"></textarea>
</div>
</div>
7 changes: 7 additions & 0 deletions src/app/modules/comments/list.component.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.m-ionic-comments--list{
margin-bottom:100px;
}


.m-ionic-comments--comment{
display:flex;
align-items:column;
Expand All @@ -23,6 +28,8 @@
padding: 8px;
width: 100%;
border-top: 1px solid #EEE;
background:#FFF;
z-index:9999;

.m-ionic-body{
width: 100%;
Expand Down
Loading

0 comments on commit 9fd3191

Please sign in to comment.