created the edition menu for the columns

This commit is contained in:
Nicolas Constant 2019-01-28 23:12:46 -05:00
parent 49f6d1a22a
commit 730beea13a
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
8 changed files with 87 additions and 24 deletions

View File

@ -44,6 +44,7 @@ import { StreamOverlayComponent } from './components/stream/stream-overlay/strea
import { DatabindedTextComponent } from './components/stream/status/databinded-text/databinded-text.component';
import { TimeAgoPipe } from './pipes/time-ago.pipe';
import { StreamStatusesComponent } from './components/stream/stream-statuses/stream-statuses.component';
import { StreamEditionComponent } from './components/stream/stream-edition/stream-edition.component';
const routes: Routes = [
{ path: "", redirectTo: "home", pathMatch: "full" },
@ -78,7 +79,8 @@ const routes: Routes = [
StreamOverlayComponent,
DatabindedTextComponent,
TimeAgoPipe,
StreamStatusesComponent
StreamStatusesComponent,
StreamEditionComponent
],
imports: [
FontAwesomeModule,

View File

@ -0,0 +1,5 @@
<div class="stream-edition">
<button (click)="moveLeft()">Move left</button>
<button (click)="moveRight()">Move right</button>
<button (click)="delete()">Delete</button>
</div>

View File

@ -0,0 +1,5 @@
.stream-edition {
width: 100%;
min-height: 50px;
background-color: #222736;
}

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { StreamEditionComponent } from './stream-edition.component';
xdescribe('StreamEditionComponent', () => {
let component: StreamEditionComponent;
let fixture: ComponentFixture<StreamEditionComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ StreamEditionComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(StreamEditionComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,29 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-stream-edition',
templateUrl: './stream-edition.component.html',
styleUrls: ['./stream-edition.component.scss']
})
export class StreamEditionComponent implements OnInit {
constructor() { }
ngOnInit() {
}
moveLeft(): boolean {
console.log('move left');
return false;
}
moveRight(): boolean {
console.log('move right');
return false;
}
delete(): boolean {
console.log('delete');
return false;
}
}

View File

@ -4,7 +4,7 @@
[browseAccountData]="overlayAccountToBrowse" [browseHashtagData]="overlayHashtagToBrowse" [browseThreadData]="overlayThreadToBrowse"></app-stream-overlay>
<div class="stream-column__stream-header">
<a class="stream-column__open-menu" href title="open menu" (click)="openMenu()">
<a class="stream-column__open-menu" href title="edit column" (click)="openEditionMenu()">
<fa-icon class="stream-column__open-menu--icon" [icon]="menuFaIcon"></fa-icon>
</a>
<a class="stream-column__stream-selector" href title="return to top" (click)="goToTop()">
@ -12,6 +12,9 @@
<h1 class="stream-column__stream-selector--title">{{ streamElement.name.toUpperCase() }}</h1>
</a>
</div>
<app-stream-edition class="stream-edition" *ngIf="editionPanelIsOpen"></app-stream-edition>
<app-stream-statuses class="stream-statuses" [streamElement]="streamElement" [goToTop]="goToTopSubject.asObservable()"
(browseAccountEvent)="browseAccount($event)" (browseHashtagEvent)="browseHashtag($event)" (browseThreadEvent)="browseThread($event)"></app-stream-statuses>
<!-- <div class="stream-toots flexcroll" #statusstream (scroll)="onScroll()">

View File

@ -1,63 +1,55 @@
@import "variables";
@import "commons";
$stream-header-height: 40px;
.stream-edition {
width: $stream-column-width;
position: absolute;
z-index: 50;
}
.stream-column {
position: relative;
width: $stream-column-width;
height: calc(100%);
background-color: $column-color;
margin: 0 0 0 $stream-column-separator;
&__stream-header {
border-bottom: 1px solid #222736;
&__stream-header {
border-bottom: 1px solid #222736;
}
&__open-menu {
float: right;
display: block;
width: $stream-header-height - 10px;
height: $stream-header-height - 10px;
margin: 5px;
&:hover &--icon {
color: darken(whitesmoke, 30);
color: darken(whitesmoke, 30);
}
&--icon {
color: whitesmoke;
// float: left;
color: whitesmoke; // float: left;
position: relative;
top: 4px;
top: 4px;
left: 8px;
}
}
&__stream-selector {
display: block;
width: calc(100%);
height: $stream-header-height;
background-color: $column-header-background-color;
text-decoration: none;
// &:hover {
text-decoration: none; // &:hover {
// }
&--icon {
color: whitesmoke;
float: left;
position: relative;
left: 11px;
top: 9px;
}
&--title {
color: whitesmoke;
font-size: 0.8em;
font-weight: normal;
// margin: 0 0 0 25px;
font-weight: normal; // margin: 0 0 0 25px;
padding: 14px 0 0 35px;
}
}

View File

@ -89,8 +89,10 @@ export class StreamComponent implements OnInit {
this.overlayActive = false;
}
openMenu(): bool {
editionPanelIsOpen: boolean;
openEditionMenu(): boolean {
console.log('opened menu');
this.editionPanelIsOpen = !this.editionPanelIsOpen;
return false;
}
}