created the edition menu for the columns
This commit is contained in:
parent
49f6d1a22a
commit
730beea13a
|
@ -44,6 +44,7 @@ import { StreamOverlayComponent } from './components/stream/stream-overlay/strea
|
||||||
import { DatabindedTextComponent } from './components/stream/status/databinded-text/databinded-text.component';
|
import { DatabindedTextComponent } from './components/stream/status/databinded-text/databinded-text.component';
|
||||||
import { TimeAgoPipe } from './pipes/time-ago.pipe';
|
import { TimeAgoPipe } from './pipes/time-ago.pipe';
|
||||||
import { StreamStatusesComponent } from './components/stream/stream-statuses/stream-statuses.component';
|
import { StreamStatusesComponent } from './components/stream/stream-statuses/stream-statuses.component';
|
||||||
|
import { StreamEditionComponent } from './components/stream/stream-edition/stream-edition.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: "", redirectTo: "home", pathMatch: "full" },
|
{ path: "", redirectTo: "home", pathMatch: "full" },
|
||||||
|
@ -78,7 +79,8 @@ const routes: Routes = [
|
||||||
StreamOverlayComponent,
|
StreamOverlayComponent,
|
||||||
DatabindedTextComponent,
|
DatabindedTextComponent,
|
||||||
TimeAgoPipe,
|
TimeAgoPipe,
|
||||||
StreamStatusesComponent
|
StreamStatusesComponent,
|
||||||
|
StreamEditionComponent
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
FontAwesomeModule,
|
FontAwesomeModule,
|
||||||
|
|
|
@ -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>
|
|
@ -0,0 +1,5 @@
|
||||||
|
.stream-edition {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 50px;
|
||||||
|
background-color: #222736;
|
||||||
|
}
|
|
@ -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();
|
||||||
|
});
|
||||||
|
});
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,7 +4,7 @@
|
||||||
[browseAccountData]="overlayAccountToBrowse" [browseHashtagData]="overlayHashtagToBrowse" [browseThreadData]="overlayThreadToBrowse"></app-stream-overlay>
|
[browseAccountData]="overlayAccountToBrowse" [browseHashtagData]="overlayHashtagToBrowse" [browseThreadData]="overlayThreadToBrowse"></app-stream-overlay>
|
||||||
|
|
||||||
<div class="stream-column__stream-header">
|
<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>
|
<fa-icon class="stream-column__open-menu--icon" [icon]="menuFaIcon"></fa-icon>
|
||||||
</a>
|
</a>
|
||||||
<a class="stream-column__stream-selector" href title="return to top" (click)="goToTop()">
|
<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>
|
<h1 class="stream-column__stream-selector--title">{{ streamElement.name.toUpperCase() }}</h1>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<app-stream-edition class="stream-edition" *ngIf="editionPanelIsOpen"></app-stream-edition>
|
||||||
|
|
||||||
<app-stream-statuses class="stream-statuses" [streamElement]="streamElement" [goToTop]="goToTopSubject.asObservable()"
|
<app-stream-statuses class="stream-statuses" [streamElement]="streamElement" [goToTop]="goToTopSubject.asObservable()"
|
||||||
(browseAccountEvent)="browseAccount($event)" (browseHashtagEvent)="browseHashtag($event)" (browseThreadEvent)="browseThread($event)"></app-stream-statuses>
|
(browseAccountEvent)="browseAccount($event)" (browseHashtagEvent)="browseHashtag($event)" (browseThreadEvent)="browseThread($event)"></app-stream-statuses>
|
||||||
<!-- <div class="stream-toots flexcroll" #statusstream (scroll)="onScroll()">
|
<!-- <div class="stream-toots flexcroll" #statusstream (scroll)="onScroll()">
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
@import "variables";
|
@import "variables";
|
||||||
@import "commons";
|
@import "commons";
|
||||||
$stream-header-height: 40px;
|
$stream-header-height: 40px;
|
||||||
|
.stream-edition {
|
||||||
|
width: $stream-column-width;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 50;
|
||||||
|
}
|
||||||
|
|
||||||
.stream-column {
|
.stream-column {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: $stream-column-width;
|
width: $stream-column-width;
|
||||||
|
@ -10,54 +16,40 @@ $stream-header-height: 40px;
|
||||||
&__stream-header {
|
&__stream-header {
|
||||||
border-bottom: 1px solid #222736;
|
border-bottom: 1px solid #222736;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__open-menu {
|
&__open-menu {
|
||||||
float: right;
|
float: right;
|
||||||
display: block;
|
display: block;
|
||||||
width: $stream-header-height - 10px;
|
width: $stream-header-height - 10px;
|
||||||
height: $stream-header-height - 10px;
|
height: $stream-header-height - 10px;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
|
|
||||||
&:hover &--icon {
|
&:hover &--icon {
|
||||||
color: darken(whitesmoke, 30);
|
color: darken(whitesmoke, 30);
|
||||||
}
|
}
|
||||||
|
|
||||||
&--icon {
|
&--icon {
|
||||||
color: whitesmoke;
|
color: whitesmoke; // float: left;
|
||||||
// float: left;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 4px;
|
top: 4px;
|
||||||
left: 8px;
|
left: 8px;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__stream-selector {
|
&__stream-selector {
|
||||||
display: block;
|
display: block;
|
||||||
width: calc(100%);
|
width: calc(100%);
|
||||||
height: $stream-header-height;
|
height: $stream-header-height;
|
||||||
background-color: $column-header-background-color;
|
background-color: $column-header-background-color;
|
||||||
text-decoration: none;
|
text-decoration: none; // &:hover {
|
||||||
|
|
||||||
// &:hover {
|
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
&--icon {
|
&--icon {
|
||||||
color: whitesmoke;
|
color: whitesmoke;
|
||||||
float: left;
|
float: left;
|
||||||
position: relative;
|
position: relative;
|
||||||
left: 11px;
|
left: 11px;
|
||||||
top: 9px;
|
top: 9px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&--title {
|
&--title {
|
||||||
color: whitesmoke;
|
color: whitesmoke;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
font-weight: normal;
|
font-weight: normal; // margin: 0 0 0 25px;
|
||||||
// margin: 0 0 0 25px;
|
|
||||||
padding: 14px 0 0 35px;
|
padding: 14px 0 0 35px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,8 +89,10 @@ export class StreamComponent implements OnInit {
|
||||||
this.overlayActive = false;
|
this.overlayActive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
openMenu(): bool {
|
editionPanelIsOpen: boolean;
|
||||||
|
openEditionMenu(): boolean {
|
||||||
console.log('opened menu');
|
console.log('opened menu');
|
||||||
|
this.editionPanelIsOpen = !this.editionPanelIsOpen;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue