mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 21:55:52 +02:00
Archive update v0.53.2
This commit is contained in:
@@ -2,6 +2,7 @@ import { Component } from '@angular/core';
|
||||
import { emojis } from '../../../client/emoji';
|
||||
import { faArrowLeft, faArrowRight, faArrowUp, faArrowDown } from '../../../client/icons';
|
||||
import { contactEmail } from '../../../client/data';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'help',
|
||||
@@ -16,4 +17,15 @@ export class Help {
|
||||
readonly emotes = emojis.map(e => e.names[0]);
|
||||
readonly mac = /Macintosh/.test(navigator.userAgent);
|
||||
readonly contactEmail = contactEmail;
|
||||
|
||||
// allow scrolling to #issues and #rules fragments
|
||||
|
||||
constructor(private route: ActivatedRoute) {}
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.route.fragment.subscribe(f => {
|
||||
const element = document.querySelector("#" + f);
|
||||
if (element) setTimeout(() => element.scrollIntoView(), 10);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user