web: add page for OAuth2 Provider

This commit is contained in:
Jens Langhammer
2021-02-06 18:35:55 +01:00
parent 0f5e6d0d8c
commit 830b8bcd5b
8 changed files with 329 additions and 88 deletions

View File

@ -24,6 +24,15 @@ export function convertToSlug(text: string): string {
.replace(/[^\w-]+/g, "");
}
export function convertToTitle(text: string): string {
return text.replace(
/\w\S*/g,
function (txt) {
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
}
);
}
export function truncate(input?: string, max = 10): string {
input = input || "";
const array = input.trim().split(" ");