created scheduled statuses navigation
This commit is contained in:
parent
a0bce355e7
commit
d777b78063
|
@ -73,6 +73,7 @@ import { StatusUserContextMenuComponent } from './components/stream/status/actio
|
|||
import { StatusSchedulerComponent } from './components/create-status/status-scheduler/status-scheduler.component';
|
||||
import { PollEditorComponent } from './components/create-status/poll-editor/poll-editor.component';
|
||||
import { PollEntryComponent } from './components/create-status/poll-editor/poll-entry/poll-entry.component';
|
||||
import { ScheduledStatusesComponent } from './components/floating-column/scheduled-statuses/scheduled-statuses.component';
|
||||
|
||||
|
||||
const routes: Routes = [
|
||||
|
@ -130,7 +131,8 @@ const routes: Routes = [
|
|||
StatusUserContextMenuComponent,
|
||||
StatusSchedulerComponent,
|
||||
PollEditorComponent,
|
||||
PollEntryComponent
|
||||
PollEntryComponent,
|
||||
ScheduledStatusesComponent
|
||||
],
|
||||
entryComponents: [
|
||||
EmojiPickerComponent
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
(browseHashtagEvent)="browseHashtag($event)" (browseThreadEvent)="browseThread($event)">
|
||||
</app-search>
|
||||
<app-settings *ngIf="openPanel === 'settings'"></app-settings>
|
||||
<app-scheduled-statuses *ngIf="openPanel === 'scheduledStatuses'"></app-scheduled-statuses>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -13,7 +13,7 @@ import { StatusWrapper } from '../../models/common.model';
|
|||
styleUrls: ['./floating-column.component.scss']
|
||||
})
|
||||
export class FloatingColumnComponent implements OnInit, OnDestroy {
|
||||
|
||||
|
||||
faTimes = faTimes;
|
||||
overlayActive: boolean;
|
||||
overlayAccountToBrowse: string;
|
||||
|
@ -85,6 +85,13 @@ export class FloatingColumnComponent implements OnInit, OnDestroy {
|
|||
this.openPanel = 'settings';
|
||||
}
|
||||
break;
|
||||
case LeftPanelType.ScheduledStatuses:
|
||||
if (this.openPanel === 'scheduledStatuses') {
|
||||
this.closePanel();
|
||||
} else {
|
||||
this.openPanel = 'scheduledStatuses';
|
||||
}
|
||||
break;
|
||||
default:
|
||||
this.openPanel = '';
|
||||
}
|
||||
|
@ -92,7 +99,7 @@ export class FloatingColumnComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
if(this.activatedPanelSub) {
|
||||
if (this.activatedPanelSub) {
|
||||
this.activatedPanelSub.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<p>
|
||||
scheduled-statuses works!
|
||||
</p>
|
|
@ -0,0 +1,25 @@
|
|||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ScheduledStatusesComponent } from './scheduled-statuses.component';
|
||||
|
||||
xdescribe('ScheduledStatusesComponent', () => {
|
||||
let component: ScheduledStatusesComponent;
|
||||
let fixture: ComponentFixture<ScheduledStatusesComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ScheduledStatusesComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ScheduledStatusesComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,15 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-scheduled-statuses',
|
||||
templateUrl: './scheduled-statuses.component.html',
|
||||
styleUrls: ['./scheduled-statuses.component.scss']
|
||||
})
|
||||
export class ScheduledStatusesComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
|
@ -19,7 +19,14 @@
|
|||
<fa-icon [icon]="faPlus"></fa-icon>
|
||||
</a>
|
||||
|
||||
<a class="left-bar-button left-bar-button--cog left-bar-link" href title="settings" (click)="openSettings()"
|
||||
|
||||
<a class="left-bar-button left-bar-button--scheduled left-bar-button--bottom left-bar-link" href title="scheduled statuses"
|
||||
(click)="openScheduledStatuses()"
|
||||
(contextmenu)="openScheduledStatuses()" *ngIf="hasAccounts">
|
||||
<fa-icon [icon]="faCalendarAlt"></fa-icon>
|
||||
</a>
|
||||
|
||||
<a class="left-bar-button left-bar-button--cog left-bar-button--bottom left-bar-link" href title="settings" (click)="openSettings()"
|
||||
(contextmenu)="openSettings()" *ngIf="hasAccounts">
|
||||
<fa-icon [icon]="faCog"></fa-icon>
|
||||
</a>
|
||||
|
|
|
@ -42,17 +42,24 @@ $height-button: 40px;
|
|||
padding: 2px 0 5px 18px;
|
||||
font-size: 14px;
|
||||
}
|
||||
&--scheduled {
|
||||
font-size: 24px;
|
||||
position: absolute;
|
||||
left: 14px;
|
||||
bottom: 37px;
|
||||
}
|
||||
&--cog {
|
||||
font-size: 24px;
|
||||
padding: 5px 0 0 12px;
|
||||
position: absolute;
|
||||
bottom: 7px;
|
||||
|
||||
}
|
||||
|
||||
&--bottom {
|
||||
opacity: .3;
|
||||
transition: all .3s;
|
||||
filter: alpha(opacity=30);
|
||||
|
||||
// color: darken($font-link-primary, 30);
|
||||
|
||||
&:hover{
|
||||
filter: alpha(opacity=100);
|
||||
opacity: 1;
|
||||
|
|
|
@ -3,7 +3,7 @@ import { HttpErrorResponse } from "@angular/common/http";
|
|||
import { Subscription, Observable } from "rxjs";
|
||||
import { Store } from "@ngxs/store";
|
||||
import { faPlus, faCog, faSearch } from "@fortawesome/free-solid-svg-icons";
|
||||
import { faCommentAlt } from "@fortawesome/free-regular-svg-icons";
|
||||
import { faCommentAlt, faCalendarAlt } from "@fortawesome/free-regular-svg-icons";
|
||||
|
||||
import { Account } from "../../services/models/mastodon.interfaces";
|
||||
import { AccountWrapper } from "../../models/account.models";
|
||||
|
@ -23,7 +23,7 @@ export class LeftSideBarComponent implements OnInit, OnDestroy {
|
|||
faSearch = faSearch;
|
||||
faPlus = faPlus;
|
||||
faCog = faCog;
|
||||
|
||||
faCalendarAlt = faCalendarAlt;
|
||||
|
||||
accounts: AccountWithNotificationWrapper[] = [];
|
||||
hasAccounts: boolean;
|
||||
|
@ -119,6 +119,11 @@ export class LeftSideBarComponent implements OnInit, OnDestroy {
|
|||
this.navigationService.openPanel(LeftPanelType.Settings);
|
||||
return false;
|
||||
}
|
||||
|
||||
openScheduledStatuses(): boolean {
|
||||
this.navigationService.openPanel(LeftPanelType.ScheduledStatuses);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export class AccountWithNotificationWrapper extends AccountWrapper {
|
||||
|
|
|
@ -72,9 +72,10 @@ export enum LeftPanelAction {
|
|||
|
||||
export enum LeftPanelType {
|
||||
Closed = 0,
|
||||
ManageAccount = 1,
|
||||
CreateNewStatus = 2,
|
||||
ManageAccount = 1,
|
||||
CreateNewStatus = 2,
|
||||
Search = 3,
|
||||
AddNewAccount = 4,
|
||||
Settings = 5
|
||||
Settings = 5,
|
||||
ScheduledStatuses = 6
|
||||
}
|
Loading…
Reference in New Issue