@@ -14,6 +14,7 @@ import { Table, TableBody, TableHead, TableHeader, TableRow } from "@podkit/tabl
1414import { useListConfigurationVariables } from "../../../data/configurations/configuration-queries" ;
1515import { LoadingState } from "@podkit/loading/LoadingState" ;
1616import { ConfigurationVariableItem } from "./ConfigurationVariableItem" ;
17+ import { EnableDockerdAuthentication } from "./EnableDockerdAuthentication" ;
1718
1819type Props = {
1920 configuration : Configuration ;
@@ -27,52 +28,55 @@ export const ConfigurationVariableList = ({ configuration }: Props) => {
2728 }
2829
2930 return (
30- < ConfigurationSettingsField >
31- { showAddVariableModal && (
32- < AddVariableModal
33- configurationId = { configuration . id }
34- onClose = { ( ) => {
35- setShowAddVariableModal ( false ) ;
36- } }
37- />
38- ) }
39- < div className = "mb-2 flex" >
40- < div className = "flex-grow" >
41- < Heading3 > Environment variables</ Heading3 >
42- < Subheading > Manage repository-specific environment variables.</ Subheading >
31+ < >
32+ < ConfigurationSettingsField >
33+ { showAddVariableModal && (
34+ < AddVariableModal
35+ configurationId = { configuration . id }
36+ onClose = { ( ) => {
37+ setShowAddVariableModal ( false ) ;
38+ } }
39+ />
40+ ) }
41+ < div className = "mb-2 flex" >
42+ < div className = "flex-grow" >
43+ < Heading3 > Environment variables</ Heading3 >
44+ < Subheading > Manage repository-specific environment variables.</ Subheading >
45+ </ div >
4346 </ div >
44- </ div >
45- { data . length === 0 ? (
46- < div className = "bg-pk-surface-secondary rounded-xl w-full p-6 flex flex-col justify-center space-y-3" >
47- < span className = "font-semi-bold text-base" > No environment variables are set</ span >
48- < span className = "text-sm text-pk-content-secondary" >
49- All repository-specific environment variables will be visible in prebuilds and optionally in
50- workspaces for this repository.
51- </ span >
52- </ div >
53- ) : (
54- < Table >
55- < TableHeader >
56- < TableRow >
57- < TableHead > Name</ TableHead >
58- < TableHead className = "w-48" > Visibility</ TableHead >
59- < TableHead className = "w-16" > </ TableHead >
60- </ TableRow >
61- </ TableHeader >
62- < TableBody >
63- { data . map ( ( variable ) => (
64- < ConfigurationVariableItem
65- key = { variable . id }
66- configurationId = { configuration . id }
67- variable = { variable }
68- />
69- ) ) }
70- </ TableBody >
71- </ Table >
72- ) }
73- < Button className = "mt-4" onClick = { ( ) => setShowAddVariableModal ( true ) } >
74- Add Variable
75- </ Button >
76- </ ConfigurationSettingsField >
47+ { data . length === 0 ? (
48+ < div className = "bg-pk-surface-secondary rounded-xl w-full p-6 flex flex-col justify-center space-y-3" >
49+ < span className = "font-semi-bold text-base" > No environment variables are set</ span >
50+ < span className = "text-sm text-pk-content-secondary" >
51+ All repository-specific environment variables will be visible in prebuilds and optionally in
52+ workspaces for this repository.
53+ </ span >
54+ </ div >
55+ ) : (
56+ < Table >
57+ < TableHeader >
58+ < TableRow >
59+ < TableHead > Name</ TableHead >
60+ < TableHead className = "w-48" > Visibility</ TableHead >
61+ < TableHead className = "w-16" > </ TableHead >
62+ </ TableRow >
63+ </ TableHeader >
64+ < TableBody >
65+ { data . map ( ( variable ) => (
66+ < ConfigurationVariableItem
67+ key = { variable . id }
68+ configurationId = { configuration . id }
69+ variable = { variable }
70+ />
71+ ) ) }
72+ </ TableBody >
73+ </ Table >
74+ ) }
75+ < Button className = "mt-4" onClick = { ( ) => setShowAddVariableModal ( true ) } >
76+ Add Variable
77+ </ Button >
78+ </ ConfigurationSettingsField >
79+ < EnableDockerdAuthentication configuration = { configuration } />
80+ </ >
7781 ) ;
7882} ;
0 commit comments