mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-09 13:40:28 +08:00
@@ -187,6 +187,11 @@
|
||||
<div class="stat">
|
||||
<strong>{tree.stats.contributors}</strong> contributor(s)
|
||||
</div>
|
||||
{#if config.seed.api}
|
||||
<div class="stat" title="Project data is fetched from this seed">
|
||||
<span>{utils.formatSeedApi(config.seed.api)}</span>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="anchor">
|
||||
{#if org}
|
||||
{#await getAnchor}
|
||||
|
||||
@@ -58,6 +58,14 @@ export function formatHash(hash: string): string {
|
||||
+ hash.substring(hash.length - 4, hash.length);
|
||||
}
|
||||
|
||||
export function formatSeedApi(input: string): string {
|
||||
const match = input.match(/^https?:\/\/([^:]+)/);
|
||||
if (match) {
|
||||
return match[1];
|
||||
}
|
||||
return input;
|
||||
}
|
||||
|
||||
export function capitalize(s: string): string {
|
||||
if (s === "") return s;
|
||||
return s[0].toUpperCase() + s.substr(1);
|
||||
|
||||
Reference in New Issue
Block a user