Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf6f18ce

Browse files
committed
feat: extract IdpField and improve field spacing
1 parent6b168d6 commitf6f18ce

File tree

1 file changed

+53
-37
lines changed

1 file changed

+53
-37
lines changed

‎site/src/pages/ManagementSettingsPage/IdpSyncPage/IdpSyncPageView.tsx‎

Lines changed: 53 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -50,48 +50,30 @@ export const IdpSyncPageView: FC<IdpSyncPageViewProps> = ({ oidcConfig }) => {
5050
updates to these fields in a form */}
5151
<fieldsetcss={styles.box}>
5252
<legendcss={styles.legend}>Groups</legend>
53-
<Stackdirection={"row"}alignItems={"center"}spacing={3}>
54-
<h4>Sync Field</h4>
55-
<pcss={styles.secondary}>
56-
{groups_field||(
57-
<div
58-
css={{
59-
display:"flex",
60-
alignItems:"center",
61-
gap:"8px",
62-
height:0,
63-
}}
64-
>
65-
<StatusIndicatorcolor="error"/>
66-
<p>disabled</p>
67-
</div>
68-
)}
69-
</p>
70-
<h4>Regex Filter</h4>
71-
<pcss={styles.secondary}>{group_regex_filter||"none"}</p>
72-
<h4>Auto Create</h4>
73-
<pcss={styles.secondary}>{group_auto_create?.toString()}</p>
53+
<Stackdirection={"row"}alignItems={"center"}spacing={8}>
54+
<IdpField
55+
name={"Sync Field"}
56+
fieldText={groups_field}
57+
showStatusIndicator
58+
/>
59+
<IdpField
60+
name={"Regex Filter"}
61+
fieldText={group_regex_filter}
62+
/>
63+
<IdpField
64+
name={"Auto Create"}
65+
fieldText={group_auto_create?.toString()}
66+
/>
7467
</Stack>
7568
</fieldset>
7669
<fieldsetcss={styles.box}>
7770
<legendcss={styles.legend}>Roles</legend>
7871
<Stackdirection={"row"}alignItems={"center"}spacing={3}>
79-
<h4>Sync Field</h4>
80-
<pcss={styles.secondary}>
81-
{user_role_field||(
82-
<div
83-
css={{
84-
display:"flex",
85-
alignItems:"center",
86-
gap:"8px",
87-
height:0,
88-
}}
89-
>
90-
<StatusIndicatorcolor="error"/>
91-
<p>disabled</p>
92-
</div>
93-
)}
94-
</p>
72+
<IdpField
73+
name={"Sync Field"}
74+
fieldText={user_role_field}
75+
showStatusIndicator
76+
/>
9577
</Stack>
9678
</fieldset>
9779
</Stack>
@@ -143,6 +125,40 @@ export const IdpSyncPageView: FC<IdpSyncPageViewProps> = ({ oidcConfig }) => {
143125
);
144126
};
145127

128+
interfaceIdpFieldProps{
129+
name:string;
130+
fieldText:string|undefined;
131+
showStatusIndicator?:boolean;
132+
}
133+
134+
constIdpField:FC<IdpFieldProps>=({
135+
name,
136+
fieldText,
137+
showStatusIndicator=false,
138+
})=>{
139+
return(
140+
<spancss={{display:"flex",alignItems:"center",gap:"16px"}}>
141+
<h4>{name}</h4>
142+
<pcss={styles.secondary}>
143+
{fieldText||
144+
(showStatusIndicator&&(
145+
<div
146+
css={{
147+
display:"flex",
148+
alignItems:"center",
149+
gap:"8px",
150+
height:0,
151+
}}
152+
>
153+
<StatusIndicatorcolor="error"/>
154+
<p>disabled</p>
155+
</div>
156+
))}
157+
</p>
158+
</span>
159+
);
160+
};
161+
146162
interfaceIdpMappingTableProps{
147163
type:"Role"|"Group";
148164
isEmpty:boolean;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp