mirror of
https://example.com
synced 2024-11-22 12:36:40 +09:00
fix: show correct software names (close #30)
This commit is contained in:
parent
de18274a75
commit
6b21ca3131
2 changed files with 22 additions and 1 deletions
|
@ -17,6 +17,7 @@
|
|||
|
||||
## 細かい変更点
|
||||
|
||||
- インスタンスティッカーのツールチップに出るソフトウェア名で FoundKey, PeerTube, GNU Social, WriteFreely などを正しく表示する
|
||||
- 藍ちゃんウィジェットの復活
|
||||
- インスタンスティッカーのツールチップにソフトウェアのバージョン番号も表示する
|
||||
- 気になるから
|
||||
|
|
|
@ -42,7 +42,27 @@ const instance = props.instance ?? {
|
|||
softwareVersion: version,
|
||||
};
|
||||
|
||||
const capitalize = (s: string) => s && s[0].toUpperCase() + s.slice(1);
|
||||
const commonNames = new Map<string, string>([
|
||||
["birdsitelive", "BirdsiteLIVE"],
|
||||
["bookwyrm", "BookWyrm"],
|
||||
["foundkey", "FoundKey"],
|
||||
["gnusocial", "GNU social"],
|
||||
["gotosocial", "GoToSocial"],
|
||||
["microblogpub", "microblog.pub"],
|
||||
["nextcloud social" "Nextcloud Social"],
|
||||
["peertube", "PeerTube"],
|
||||
["snac", "snac"],
|
||||
["takahe", "Takahē"],
|
||||
["wordpress", "WordPress"],
|
||||
["writefreely", "WriteFreely"],
|
||||
["wxwclub", "wxwClub"],
|
||||
]);
|
||||
|
||||
const capitalize = (s: string) => {
|
||||
if (s == null) return "Unknown";
|
||||
if (commonNames.has(s)) return commonNames.get(s);
|
||||
return s[0].toUpperCase() + s.slice(1);
|
||||
};
|
||||
|
||||
const computedStyle = getComputedStyle(document.documentElement);
|
||||
const themeColor =
|
||||
|
|
Loading…
Reference in a new issue