mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-09 20:26:40 +00:00
simplify create site wizard
This commit is contained in:
@@ -426,32 +426,32 @@ export default function Page() {
|
|||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FormField
|
{/* <FormField */}
|
||||||
control={form.control}
|
{/* control={form.control} */}
|
||||||
name="subnet"
|
{/* name="subnet" */}
|
||||||
render={({ field }) => (
|
{/* render={({ field }) => ( */}
|
||||||
<FormItem>
|
{/* <FormItem> */}
|
||||||
<FormLabel>
|
{/* <FormLabel> */}
|
||||||
{t("address")}
|
{/* {t("address")} */}
|
||||||
</FormLabel>
|
{/* </FormLabel> */}
|
||||||
<FormControl>
|
{/* <FormControl> */}
|
||||||
<Input
|
{/* <Input */}
|
||||||
autoComplete="off"
|
{/* autoComplete="off" */}
|
||||||
placeholder={t(
|
{/* placeholder={t( */}
|
||||||
"subnetPlaceholder"
|
{/* "subnetPlaceholder" */}
|
||||||
)}
|
{/* )} */}
|
||||||
{...field}
|
{/* {...field} */}
|
||||||
/>
|
{/* /> */}
|
||||||
</FormControl>
|
{/* </FormControl> */}
|
||||||
<FormMessage />
|
{/* <FormMessage /> */}
|
||||||
<FormDescription>
|
{/* <FormDescription> */}
|
||||||
{t(
|
{/* {t( */}
|
||||||
"addressDescription"
|
{/* "addressDescription" */}
|
||||||
)}
|
{/* )} */}
|
||||||
</FormDescription>
|
{/* </FormDescription> */}
|
||||||
</FormItem>
|
{/* </FormItem> */}
|
||||||
)}
|
{/* )} */}
|
||||||
/>
|
{/* /> */}
|
||||||
|
|
||||||
{/* <FormField */}
|
{/* <FormField */}
|
||||||
{/* control={form.control} */}
|
{/* control={form.control} */}
|
||||||
|
|||||||
@@ -708,7 +708,7 @@ WantedBy=default.target`
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
{form.watch("method") ===
|
{/*form.watch("method") ===
|
||||||
"newt" && (
|
"newt" && (
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
@@ -751,36 +751,31 @@ WantedBy=default.target`
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
)}
|
)*/}
|
||||||
</form>
|
</form>
|
||||||
</Form>
|
</Form>
|
||||||
</SettingsSectionForm>
|
</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>
|
</SettingsSectionBody>
|
||||||
</SettingsSection>
|
</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" && (
|
{form.watch("method") === "newt" && (
|
||||||
<>
|
<>
|
||||||
<SettingsSection>
|
<SettingsSection>
|
||||||
|
|||||||
Reference in New Issue
Block a user