refactor(welcome): simplify service cards and remove duplicates

- remove min-height from card headers for natural sizing
- remove duplicate postgres credentials from postgresus card
- consolidate python-runner info into single multiline note
- add spacing between credential rows and support for line breaks
This commit is contained in:
Yury Kossakovsky
2025-12-12 18:14:25 -07:00
parent 4c153bca58
commit bfc1e3671c
2 changed files with 6 additions and 17 deletions

View File

@@ -93,13 +93,8 @@ fi
if is_profile_active "postgresus"; then
SERVICES_ARRAY+=(" \"postgresus\": {
\"hostname\": \"$(json_escape "$POSTGRESUS_HOSTNAME")\",
\"credentials\": {},
\"extra\": {
\"pg_host\": \"postgres\",
\"pg_port\": \"${POSTGRES_PORT:-5432}\",
\"pg_user\": \"$(json_escape "${POSTGRES_USER:-postgres}")\",
\"pg_password\": \"$(json_escape "$POSTGRES_PASSWORD")\",
\"pg_db\": \"$(json_escape "${POSTGRES_DB:-postgres}")\"
\"credentials\": {
\"note\": \"PostgreSQL credentials are shown in the PostgreSQL card\"
}
}")
fi
@@ -409,12 +404,7 @@ if is_profile_active "python-runner"; then
SERVICES_ARRAY+=(" \"python-runner\": {
\"hostname\": null,
\"credentials\": {
\"note\": \"Internal service only\"
},
\"extra\": {
\"mounted_dir\": \"./python-runner -> /app\",
\"entry_file\": \"/app/main.py\",
\"logs_command\": \"docker compose -p localai logs -f python-runner\"
\"note\": \"Mount: ./python-runner → /app\\nEntry: /app/main.py\\nLogs: make logs s=python-runner\"
}
}")
fi

View File

@@ -630,12 +630,12 @@
*/
function createBottomSection(creds, extra) {
const section = document.createElement('div');
section.className = 'mt-4 pt-4 border-t border-surface-400 space-y-0';
section.className = 'mt-4 pt-4 border-t border-surface-400 space-y-1';
// Handle credentials note (special case - just show note text)
if (creds && creds.note) {
const noteP = document.createElement('p');
noteP.className = 'text-sm text-gray-500 italic';
noteP.className = 'text-sm text-gray-500 italic whitespace-pre-line';
noteP.textContent = creds.note;
section.appendChild(noteP);
}
@@ -687,8 +687,7 @@
*/
function createCardHeader(metadata, serviceData) {
const header = document.createElement('div');
// Fixed min-height so border is always at the same position (accounts for external + internal URLs)
header.className = 'flex items-start gap-4 min-h-[104px]';
header.className = 'flex items-start gap-4';
// Icon
const iconDiv = document.createElement('div');