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 Git3
// protocol names. Keep legacy database IDs and wire protocols unchanged.4
const PUBLIC_NAMES=Object.freeze({5
git_ssh:'ArchForge SSH',6
git_http:'ArchForge HTTPS'7
});8
function serviceLabel(service){9
if(!service||typeof service!=='object')return '';10
return PUBLIC_NAMES[service.id]||service.label||'';11
}12
function 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;16
}17
module.exports={PUBLIC_NAMES,serviceLabel,presentService};