1
1
//
2
2
3
3
import { button } from "@~/app.ui/button" ;
4
- import { CopyButton } from "@~/app.ui/button/components/copy" ;
5
4
import { GoogleSearchButton } from "@~/app.ui/button/components/search" ;
6
5
import { menu_item } from "@~/app.ui/menu" ;
7
6
import { Horizontal_Menu } from "@~/app.ui/menu/components/Horizontal_Menu" ;
@@ -79,37 +78,37 @@ async function Add_Domain() {
79
78
function TypeToEmoji ( { type } : { type : MCP_EmailDomain_Type } ) {
80
79
return match ( type )
81
80
. with ( "verified" , ( ) => (
82
- < span role = "img" aria-label = "vérifié" >
81
+ < span role = "img" aria-label = "vérifié" title = "vérifié" >
83
82
✅
84
83
</ span >
85
84
) )
86
85
. with ( "authorized" , ( ) => (
87
- < span role = "img" aria-label = "autorisé" >
86
+ < span role = "img" aria-label = "autorisé" title = "autorisé" >
88
87
🔓
89
88
</ span >
90
89
) )
91
90
. with ( "external" , ( ) => (
92
- < span role = "img" aria-label = "externe" >
93
- ❌
91
+ < span role = "img" aria-label = "externe" title = "externe" >
92
+ ❎
94
93
</ span >
95
94
) )
96
95
. with ( "blacklisted" , ( ) => (
97
- < span role = "img" aria-label = "blacklisté" >
98
- 🚫
96
+ < span role = "img" aria-label = "blacklisté" title = "blacklisté" >
97
+ ☠️
99
98
</ span >
100
99
) )
101
100
. with ( "official_contact" , ( ) => (
102
- < span role = "img" aria-label = "contact officiel" >
103
- 📞
101
+ < span role = "img" aria-label = "contact officiel" title = "contact officiel" >
102
+ ✅
104
103
</ span >
105
104
) )
106
105
. with ( "trackdechets_postal_mail" , ( ) => (
107
- < span role = "img" aria-label = "postal mail" >
108
- 📬
106
+ < span role = "img" aria-label = "postal mail" title = "postal mail" >
107
+ ✅
109
108
</ span >
110
109
) )
111
110
. otherwise ( ( ) => (
112
- < span role = "img" aria-label = "inconnu" >
111
+ < span role = "img" aria-label = "inconnu" title = "inconnu" >
113
112
❓
114
113
</ span >
115
114
) ) ;
@@ -130,7 +129,7 @@ function Row({
130
129
</ td >
131
130
< td > { domain } </ td >
132
131
< td > { type } </ td >
133
- < td class = "!text-end" >
132
+ < td class = "space-x-2 !text-end" >
134
133
< GoogleSearchButton
135
134
class = { button ( { class : "align-bottom" , size : "sm" } ) }
136
135
query = { domain }
@@ -154,7 +153,7 @@ async function Row_Actions({
154
153
} : {
155
154
organization_domain : get_orginization_domains_dto [ number ] ;
156
155
} ) {
157
- const { domain , id, organization_id, organization } = organization_domain ;
156
+ const { id, organization_id } = organization_domain ;
158
157
159
158
const hx_delete_domain_props = await hx_urls . organizations [ ":id" ] . domains [
160
159
":domain_id"
@@ -171,56 +170,34 @@ async function Row_Actions({
171
170
return (
172
171
< Horizontal_Menu >
173
172
< ul class = "list-none p-0" >
174
- < li >
175
- < CopyButton
176
- text = { domain }
177
- variant = { {
178
- type : "tertiary" ,
179
- class : menu_item ( { class : "shadow-none" } ) ,
180
- } }
181
- >
182
- Copier le domaine
183
- </ CopyButton >
184
- </ li >
185
- < li >
186
- < button
187
- { ...hx_delete_domain_props }
188
- class = { menu_item ( ) }
189
- hx-confirm = { `Êtes-vous sûr de vouloir supprimer le domaine « ${ domain } » de l'organisation « ${ organization . cached_libelle } » ?` }
190
- hx-swap = "none"
191
- role = "menuitem"
192
- >
193
- 🗑️ Supprimer
194
- </ button >
195
- </ li >
196
173
< li >
197
174
< button
198
175
{ ...await hx_change_type_props ( "verified" ) }
199
176
class = { menu_item ( ) }
200
177
hx-swap = "none"
201
178
role = "menuitem"
202
179
>
203
- 🔄 Domain vérifié
180
+ ✅ Domain autorisé
204
181
</ button >
205
182
</ li >
206
183
< li >
207
184
< button
208
- { ...await hx_change_type_props ( null ) }
185
+ { ...await hx_change_type_props ( "external" ) }
209
186
class = { menu_item ( ) }
210
187
hx-swap = "none"
211
188
role = "menuitem"
212
189
>
213
- 🔄 Domain autorisé
190
+ ❎ Domain externe
214
191
</ button >
215
192
</ li >
216
193
< li >
217
194
< button
218
- { ...await hx_change_type_props ( "external" ) }
195
+ { ...await hx_delete_domain_props }
219
196
class = { menu_item ( ) }
220
197
hx-swap = "none"
221
198
role = "menuitem"
222
199
>
223
- 🔄 Domain externe
200
+ 🚫 Domain refusé
224
201
</ button >
225
202
</ li >
226
203
</ ul >
0 commit comments