Skip to content

Repository files, collaboration, releases and project activity.

archforge-external-status / src/branding.jsmain
▤ src/branding.js664 bytes
18 lines · Select a line number for a permalink
1'use strict';
2// Public branding is independent of internal SQLite identifiers and Git
3// protocol names. Keep legacy database IDs and wire protocols unchanged.
4const PUBLIC_NAMES=Object.freeze({
5 git_ssh:'ArchForge SSH',
6 git_http:'ArchForge HTTPS'
7});
8function serviceLabel(service){
9 if(!service||typeof service!=='object')return '';
10 return PUBLIC_NAMES[service.id]||service.label||'';
12function presentService(service){
13 if(!service||typeof service!=='object')return service;
14 const desired=PUBLIC_NAMES[service.id];
15 return desired?{...service,label:desired,category:'ArchForge'}:service;
17module.exports={PUBLIC_NAMES,serviceLabel,presentService};