From e10c9b84bf4d8ab9f63ae81c80120cf0623b7b36 Mon Sep 17 00:00:00 2001
From: Josep Piguillem
Date: Fri, 16 Oct 2026 20:12:13 +0200
Subject: [PATCH] refactor(web): settings switches are @pi/ui's slide toggle
Visibility, the public's proposals, the definition of done and the link
for clients each had a hand-made switch; they use pi-slide-toggle now,
like the bell's, with their state written beside it.
Co-Authored-By: Claude Opus 5.5
---
.../presenters/src/lib/pages/settings.page.ts | 115 +++++-------------
.../presenters/src/lib/ui/client-share.ts | 63 ++--------
2 files changed, 39 insertions(+), 139 deletions(-)
diff --git a/libs/web/tracker/presenters/src/lib/pages/settings.page.ts b/libs/web/tracker/presenters/src/lib/pages/settings.page.ts
index 332ea78..8462b83 100644
--- a/libs/web/tracker/presenters/src/lib/pages/settings.page.ts
+++ b/libs/web/tracker/presenters/src/lib/pages/settings.page.ts
@@ -17,7 +17,12 @@ import {
untracked,
} from '@angular/core';
import { NgTemplateOutlet } from '@angular/common';
-import { PiCheckboxComponent, PiIconComponent, PiNoteComponent } from '@pi/ui';
+import {
+ PiCheckboxComponent,
+ PiIconComponent,
+ PiNoteComponent,
+ PiSlideToggleComponent,
+} from '@pi/ui';
import { GitIntegrationComponent } from '../ui/git-integration';
import { WebhooksComponent } from '../ui/webhooks';
import { TransferComponent } from '../ui/transfer';
@@ -151,6 +156,7 @@ function idFrom(name: string): string {
NgTemplateOutlet,
PiIconComponent,
PiNoteComponent,
+ PiSlideToggleComponent,
],
template: `
@@ -209,17 +215,15 @@ function idFrom(name: string): string {
}
-
+ {{ project.isPublic ? 'Público' : 'Privado' }}
+
-
+ {{ project.isPublic && project.acceptsProposals ? 'Abierto' : 'Cerrado' }}
+
@if (facade.canManage()) {
@@ -464,20 +464,14 @@ function idFrom(name: string): string {
medias. El propietario y los admins sí pueden cerrarlo.