mirror of
https://github.com/NicolasConstant/sengi
synced 2025-02-05 21:03:54 +01:00
display column names in footer
This commit is contained in:
parent
f498b3f563
commit
fed9533015
@ -5,28 +5,29 @@ import { AccountsStateModel, AccountInfo } from '../../../states/accounts.state'
|
|||||||
import { AccountWrapper } from '../../../models/account.models';
|
import { AccountWrapper } from '../../../models/account.models';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-manage-account',
|
selector: 'app-manage-account',
|
||||||
templateUrl: './manage-account.component.html',
|
templateUrl: './manage-account.component.html',
|
||||||
styleUrls: ['./manage-account.component.scss']
|
styleUrls: ['./manage-account.component.scss']
|
||||||
})
|
})
|
||||||
export class ManageAccountComponent implements OnInit {
|
export class ManageAccountComponent implements OnInit {
|
||||||
@Input() account: AccountWrapper;
|
@Input() account: AccountWrapper;
|
||||||
|
|
||||||
availableStreams: StreamElement[] = [];
|
availableStreams: StreamElement[] = [];
|
||||||
|
|
||||||
constructor(private readonly store: Store) { }
|
constructor(private readonly store: Store) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.availableStreams.length = 0;
|
const instance = this.account.info.instance;
|
||||||
this.availableStreams.push(new StreamElement(StreamTypeEnum.global, 'Global Timeline', this.account.info.id, null, null));
|
this.availableStreams.length = 0;
|
||||||
this.availableStreams.push(new StreamElement(StreamTypeEnum.local, 'Local Timeline', this.account.info.id, null, null));
|
this.availableStreams.push(new StreamElement(StreamTypeEnum.global, 'Federated Timeline', this.account.info.id, null, null, `federate@${instance}`));
|
||||||
this.availableStreams.push(new StreamElement(StreamTypeEnum.personnal, 'Personnal Timeline', this.account.info.id, null, null));
|
this.availableStreams.push(new StreamElement(StreamTypeEnum.local, 'Local Timeline', this.account.info.id, null, null, `local@${instance}`));
|
||||||
}
|
this.availableStreams.push(new StreamElement(StreamTypeEnum.personnal, 'Home', this.account.info.id, null, null, `home@${instance}`));
|
||||||
|
}
|
||||||
addStream(stream: StreamElement): boolean {
|
|
||||||
if (stream) {
|
addStream(stream: StreamElement): boolean {
|
||||||
this.store.dispatch([new AddStream(stream)]);
|
if (stream) {
|
||||||
|
this.store.dispatch([new AddStream(stream)]);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ export class HashtagComponent implements OnInit {
|
|||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
const hashtag = this.hashtagElement.tag;
|
const hashtag = this.hashtagElement.tag;
|
||||||
const newStream = new StreamElement(StreamTypeEnum.tag, `#${hashtag}`, this.hashtagElement.accountId, hashtag, null);
|
const newStream = new StreamElement(StreamTypeEnum.tag, `#${hashtag}`, this.hashtagElement.accountId, hashtag, null, this.hashtagElement.displayableFullName);
|
||||||
this.store.dispatch([new AddStream(newStream)]);
|
this.store.dispatch([new AddStream(newStream)]);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -116,7 +116,7 @@ export class StreamOverlayComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const selectedAccount = this.toolsService.getSelectedAccounts()[0];
|
const selectedAccount = this.toolsService.getSelectedAccounts()[0];
|
||||||
const hashTagElement = new StreamElement(StreamTypeEnum.tag, hashtag, selectedAccount.id, hashtag, null);
|
const hashTagElement = new StreamElement(StreamTypeEnum.tag, hashtag, selectedAccount.id, hashtag, null, `#${hashtag}@${selectedAccount.instance}`);
|
||||||
const newElement = new OverlayBrowsing(hashTagElement, null, null);
|
const newElement = new OverlayBrowsing(hashTagElement, null, null);
|
||||||
this.loadElement(newElement);
|
this.loadElement(newElement);
|
||||||
this.canGoForward = false;
|
this.canGoForward = false;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="streams-selection-footer">
|
<div class="streams-selection-footer">
|
||||||
<a class="stream-selection" *ngFor="let str of streams; let i=index" href (click)="onColumnSelection(i)" >
|
<a class="stream-selection" *ngFor="let str of streams; let i=index" href (click)="onColumnSelection(i)" title="open {{str.displayableFullName}}">
|
||||||
<span class="stream-selection__column-reprensentation"></span>
|
<span class="stream-selection__column-reprensentation"></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
@ -31,7 +31,8 @@ export class StreamElement {
|
|||||||
public name: string,
|
public name: string,
|
||||||
public accountId: string,
|
public accountId: string,
|
||||||
public tag: string,
|
public tag: string,
|
||||||
public list: string) {
|
public list: string,
|
||||||
|
public displayableFullName: string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user