mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-08 03:36:37 +00:00
Pull up downstream changes
This commit is contained in:
@@ -5,10 +5,12 @@ import { Card, CardContent } from "@/components/ui/card";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { ArrowRight, DockIcon as Docker, Globe, Server, X } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { useEnvContext } from "@app/hooks/useEnvContext";
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
export const SitesSplashCard = () => {
|
||||
const [isDismissed, setIsDismissed] = useState(true);
|
||||
const { env } = useEnvContext();
|
||||
|
||||
const key = "sites-splash-card-dismissed";
|
||||
const t = useTranslations();
|
||||
|
||||
@@ -375,7 +375,10 @@ WantedBy=default.target`
|
||||
async function onSubmit(data: CreateSiteFormValues) {
|
||||
setCreateLoading(true);
|
||||
|
||||
let payload: CreateSiteBody = { name: data.name, type: data.method };
|
||||
let payload: CreateSiteBody = {
|
||||
name: data.name,
|
||||
type: data.method as "newt" | "wireguard" | "local"
|
||||
};
|
||||
|
||||
if (data.method == "wireguard") {
|
||||
if (!siteDefaults || !wgConfig) {
|
||||
@@ -412,7 +415,7 @@ WantedBy=default.target`
|
||||
exitNodeId: siteDefaults.exitNodeId,
|
||||
secret: siteDefaults.newtSecret,
|
||||
newtId: siteDefaults.newtId,
|
||||
address: clientAddress
|
||||
// address: clientAddress
|
||||
};
|
||||
}
|
||||
|
||||
@@ -573,42 +576,42 @@ WantedBy=default.target`
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="clientAddress"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>
|
||||
Site Address
|
||||
</FormLabel>
|
||||
<FormControl>
|
||||
<Input
|
||||
autoComplete="off"
|
||||
value={
|
||||
clientAddress
|
||||
}
|
||||
onChange={(
|
||||
e
|
||||
) => {
|
||||
setClientAddress(
|
||||
e.target
|
||||
.value
|
||||
);
|
||||
field.onChange(
|
||||
e.target
|
||||
.value
|
||||
);
|
||||
}}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
<FormDescription>
|
||||
Specify the IP
|
||||
address of the host.
|
||||
</FormDescription>
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
{/* <FormField */}
|
||||
{/* control={form.control} */}
|
||||
{/* name="clientAddress" */}
|
||||
{/* render={({ field }) => ( */}
|
||||
{/* <FormItem> */}
|
||||
{/* <FormLabel> */}
|
||||
{/* Site Address */}
|
||||
{/* </FormLabel> */}
|
||||
{/* <FormControl> */}
|
||||
{/* <Input */}
|
||||
{/* autoComplete="off" */}
|
||||
{/* value={ */}
|
||||
{/* clientAddress */}
|
||||
{/* } */}
|
||||
{/* onChange={( */}
|
||||
{/* e */}
|
||||
{/* ) => { */}
|
||||
{/* setClientAddress( */}
|
||||
{/* e.target */}
|
||||
{/* .value */}
|
||||
{/* ); */}
|
||||
{/* field.onChange( */}
|
||||
{/* e.target */}
|
||||
{/* .value */}
|
||||
{/* ); */}
|
||||
{/* }} */}
|
||||
{/* /> */}
|
||||
{/* </FormControl> */}
|
||||
{/* <FormMessage /> */}
|
||||
{/* <FormDescription> */}
|
||||
{/* Specify the IP */}
|
||||
{/* address of the host. */}
|
||||
{/* </FormDescription> */}
|
||||
{/* </FormItem> */}
|
||||
{/* )} */}
|
||||
{/* /> */}
|
||||
</form>
|
||||
</Form>
|
||||
</SettingsSectionForm>
|
||||
@@ -760,7 +763,7 @@ WantedBy=default.target`
|
||||
? "squareOutlinePrimary"
|
||||
: "squareOutline"
|
||||
}
|
||||
className={`flex-1 min-w-[120px] ${platform === os ? "bg-primary/10" : ""}`}
|
||||
className={`flex-1 min-w-[120px] ${platform === os ? "bg-primary/10" : ""} shadow-none`}
|
||||
onClick={() => {
|
||||
setPlatform(os);
|
||||
}}
|
||||
@@ -791,7 +794,7 @@ WantedBy=default.target`
|
||||
? "squareOutlinePrimary"
|
||||
: "squareOutline"
|
||||
}
|
||||
className={`flex-1 min-w-[120px] ${architecture === arch ? "bg-primary/10" : ""}`}
|
||||
className={`flex-1 min-w-[120px] ${architecture === arch ? "bg-primary/10" : ""} shadow-none`}
|
||||
onClick={() =>
|
||||
setArchitecture(
|
||||
arch
|
||||
|
||||
Reference in New Issue
Block a user