mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-28 22:00:51 +00:00
simplify create site wizard
This commit is contained in:
@@ -426,32 +426,32 @@ export default function Page() {
|
||||
)}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="subnet"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>
|
||||
{t("address")}
|
||||
</FormLabel>
|
||||
<FormControl>
|
||||
<Input
|
||||
autoComplete="off"
|
||||
placeholder={t(
|
||||
"subnetPlaceholder"
|
||||
)}
|
||||
{...field}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
<FormDescription>
|
||||
{t(
|
||||
"addressDescription"
|
||||
)}
|
||||
</FormDescription>
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
{/* <FormField */}
|
||||
{/* control={form.control} */}
|
||||
{/* name="subnet" */}
|
||||
{/* render={({ field }) => ( */}
|
||||
{/* <FormItem> */}
|
||||
{/* <FormLabel> */}
|
||||
{/* {t("address")} */}
|
||||
{/* </FormLabel> */}
|
||||
{/* <FormControl> */}
|
||||
{/* <Input */}
|
||||
{/* autoComplete="off" */}
|
||||
{/* placeholder={t( */}
|
||||
{/* "subnetPlaceholder" */}
|
||||
{/* )} */}
|
||||
{/* {...field} */}
|
||||
{/* /> */}
|
||||
{/* </FormControl> */}
|
||||
{/* <FormMessage /> */}
|
||||
{/* <FormDescription> */}
|
||||
{/* {t( */}
|
||||
{/* "addressDescription" */}
|
||||
{/* )} */}
|
||||
{/* </FormDescription> */}
|
||||
{/* </FormItem> */}
|
||||
{/* )} */}
|
||||
{/* /> */}
|
||||
|
||||
{/* <FormField */}
|
||||
{/* control={form.control} */}
|
||||
|
||||
@@ -708,7 +708,7 @@ WantedBy=default.target`
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
{form.watch("method") ===
|
||||
{/*form.watch("method") ===
|
||||
"newt" && (
|
||||
<FormField
|
||||
control={form.control}
|
||||
@@ -751,36 +751,31 @@ WantedBy=default.target`
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
)*/}
|
||||
</form>
|
||||
</Form>
|
||||
</SettingsSectionForm>
|
||||
|
||||
{tunnelTypes.length > 1 && (
|
||||
<>
|
||||
<div className="mb-2">
|
||||
<span>{t("type")}</span>
|
||||
</div>
|
||||
<StrategySelect
|
||||
options={tunnelTypes}
|
||||
defaultValue={form.getValues(
|
||||
"method"
|
||||
)}
|
||||
onChange={(value) => {
|
||||
form.setValue("method", value);
|
||||
}}
|
||||
cols={3}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</SettingsSectionBody>
|
||||
</SettingsSection>
|
||||
|
||||
{tunnelTypes.length > 1 && (
|
||||
<SettingsSection>
|
||||
<SettingsSectionHeader>
|
||||
<SettingsSectionTitle>
|
||||
{t("tunnelType")}
|
||||
</SettingsSectionTitle>
|
||||
<SettingsSectionDescription>
|
||||
{t("siteTunnelDescription")}
|
||||
</SettingsSectionDescription>
|
||||
</SettingsSectionHeader>
|
||||
<SettingsSectionBody>
|
||||
<StrategySelect
|
||||
options={tunnelTypes}
|
||||
defaultValue={form.getValues("method")}
|
||||
onChange={(value) => {
|
||||
form.setValue("method", value);
|
||||
}}
|
||||
cols={3}
|
||||
/>
|
||||
</SettingsSectionBody>
|
||||
</SettingsSection>
|
||||
)}
|
||||
|
||||
{form.watch("method") === "newt" && (
|
||||
<>
|
||||
<SettingsSection>
|
||||
|
||||
Reference in New Issue
Block a user