Move /api to /docs/api
Also make API docs responsive so they can be viewed on mobile. REST docs are at /docs/api/rest and WebSocket docs are at /docs/api/websocket.
This commit is contained in:
21
frontend/src/app/components/docs/docs.component.ts
Normal file
21
frontend/src/app/components/docs/docs.component.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-docs',
|
||||
templateUrl: './docs.component.html',
|
||||
styleUrls: ['./docs.component.scss']
|
||||
})
|
||||
export class DocsComponent implements OnInit {
|
||||
|
||||
activeTab = 0;
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
const url = this.route.snapshot.url;
|
||||
this.activeTab = ( url[2].path === "rest" ) ? 0 : 1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user