@@ -115,9 +115,11 @@ static const String APPWRITE_PUBLIC_ENDPOINT = "${sdk.forProject(page.params.reg
115
115
projectId ,
116
116
platform ,
117
117
$createPlatform .name ,
118
- $createPlatform .key || undefined ,
118
+ platform === PlatformType . Flutterweb ? undefined : $createPlatform .key || undefined ,
119
119
undefined ,
120
- undefined
120
+ platform === PlatformType .Flutterweb
121
+ ? $createPlatform .hostname || undefined
122
+ : undefined
121
123
);
122
124
123
125
isPlatformCreated = true ;
@@ -189,19 +191,35 @@ static const String APPWRITE_PUBLIC_ENDPOINT = "${sdk.forProject(page.params.reg
189
191
bind:value ={$createPlatform .name } />
190
192
191
193
<!-- Tooltips on InputText don't work as of now -->
192
- <InputText
193
- id =" hostname"
194
- label ={hostname [platform ]}
195
- placeholder ={placeholder [platform ].hostname }
196
- required
197
- bind:value ={$createPlatform .key }>
198
- <Tooltip slot =" info" maxWidth =" 15rem" >
199
- <Icon icon ={IconInfo } size =" s" />
200
- <Typography .Caption variant =" 400" slot =" tooltip" >
201
- {placeholder [platform ].tooltip }
202
- </Typography .Caption >
203
- </Tooltip >
204
- </InputText >
194
+ {#if platform === PlatformType .Flutterweb }
195
+ <InputText
196
+ id =" hostname"
197
+ label ={hostname [platform ]}
198
+ placeholder ={placeholder [platform ].hostname }
199
+ required
200
+ bind:value ={$createPlatform .hostname }>
201
+ <Tooltip slot =" info" maxWidth =" 15rem" >
202
+ <Icon icon ={IconInfo } size =" s" />
203
+ <Typography .Caption variant =" 400" slot =" tooltip" >
204
+ {placeholder [platform ].tooltip }
205
+ </Typography .Caption >
206
+ </Tooltip >
207
+ </InputText >
208
+ {:else }
209
+ <InputText
210
+ id =" key"
211
+ label ={hostname [platform ]}
212
+ placeholder ={placeholder [platform ].hostname }
213
+ required
214
+ bind:value ={$createPlatform .key }>
215
+ <Tooltip slot =" info" maxWidth =" 15rem" >
216
+ <Icon icon ={IconInfo } size =" s" />
217
+ <Typography .Caption variant =" 400" slot =" tooltip" >
218
+ {placeholder [platform ].tooltip }
219
+ </Typography .Caption >
220
+ </Tooltip >
221
+ </InputText >
222
+ {/if }
205
223
</Layout .Stack >
206
224
207
225
<Button
@@ -212,7 +230,7 @@ static const String APPWRITE_PUBLIC_ENDPOINT = "${sdk.forProject(page.params.reg
212
230
submissionLoader ={isCreatingPlatform }
213
231
disabled ={! platform ||
214
232
! $createPlatform .name ||
215
- ! $createPlatform .key ||
233
+ ( ! $createPlatform .key && ! $createPlatform . hostname ) ||
216
234
isCreatingPlatform }>
217
235
Create platform
218
236
</Button >
0 commit comments