mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-21 22:15:40 +00:00
feat(settings): compact server cards with capability badges (#1054)
* feat(settings): redesign server cards with identity line and capability badges Compact two-line server headers (entry name + user@host), HTTPS lock, and a clickable version info tooltip. Navidrome ≥0.62 shows a green AudioMuse inline badge; older Navidrome keeps the manual toggle row. Adds click-pinned tooltips via data-tooltip-click on TooltipPortal. * feat(settings): unify use/active slot and move delete into edit form Merge Active badge and Use button into one rightmost action; Active uses green styling. Reorder actions to edit, test, use/active. Remove the card delete icon — deletion lives in the server edit form footer. * docs: note compact server cards in CHANGELOG and credits (PR #1054) * fix(credits): move PR #1054 server cards line to cucadmuh block Was appended to Psychotoxical's contributions array by mistake; CHANGELOG already credited cucadmuh (gh pr view author).
This commit is contained in:
@@ -41,11 +41,13 @@ function hostnameForDnsHint(rawUrl: string): string | null {
|
||||
export function AddServerForm({
|
||||
onSave,
|
||||
onCancel,
|
||||
onDelete,
|
||||
initialInvite = null,
|
||||
editingServer = null,
|
||||
}: {
|
||||
onSave: (data: Omit<ServerProfile, 'id'>) => void | Promise<void>;
|
||||
onCancel: () => void;
|
||||
onDelete?: () => void | Promise<void>;
|
||||
initialInvite?: ServerMagicPayload | null;
|
||||
editingServer?: ServerProfile | null;
|
||||
}) {
|
||||
@@ -349,11 +351,20 @@ export function AddServerForm({
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<div style={{ display: 'flex', gap: '8px', justifyContent: 'flex-end' }}>
|
||||
<button type="button" className="btn btn-ghost" onClick={onCancel}>{t('common.cancel')}</button>
|
||||
<button type="submit" className="btn btn-primary">
|
||||
{isEdit ? t('common.save') : t('common.add')}
|
||||
</button>
|
||||
<div style={{ display: 'flex', gap: '8px', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
{isEdit && onDelete ? (
|
||||
<button type="button" className="btn btn-danger" onClick={() => void onDelete()}>
|
||||
{t('settings.deleteServer')}
|
||||
</button>
|
||||
) : (
|
||||
<span />
|
||||
)}
|
||||
<div style={{ display: 'flex', gap: '8px' }}>
|
||||
<button type="button" className="btn btn-ghost" onClick={onCancel}>{t('common.cancel')}</button>
|
||||
<button type="submit" className="btn btn-primary">
|
||||
{isEdit ? t('common.save') : t('common.add')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user