Show oauth logos.

This commit is contained in:
Yang Luo
2021-02-13 23:00:43 +08:00
parent bac289d387
commit ea09beffe2
6 changed files with 71 additions and 33 deletions

View File

@ -116,6 +116,14 @@ export function getShortName(s) {
return s.split('/').slice(-1)[0];
}
export function getShortText(s, maxLength=35) {
if (s.length > maxLength) {
return `${s.slice(0, maxLength)}...`;
} else {
return s;
}
}
function getRandomInt(s) {
let hash = 0;
if (s.length !== 0) {