mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-04 09:46:40 +00:00
🚧 wip
This commit is contained in:
@@ -35,6 +35,8 @@ import { useEnvContext } from "@app/hooks/useEnvContext";
|
|||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
import { CheckboxWithLabel } from "./ui/checkbox";
|
import { CheckboxWithLabel } from "./ui/checkbox";
|
||||||
import { usePaidStatus } from "@app/hooks/usePaidStatus";
|
import { usePaidStatus } from "@app/hooks/usePaidStatus";
|
||||||
|
import { build } from "@server/build";
|
||||||
|
import { PaidFeaturesAlert } from "./PaidFeaturesAlert";
|
||||||
|
|
||||||
type CreateRoleFormProps = {
|
type CreateRoleFormProps = {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
@@ -165,35 +167,41 @@ export default function CreateRoleForm({
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
{isPaidUser && (
|
{build !== "oss" && (
|
||||||
<FormField
|
<>
|
||||||
control={form.control}
|
<PaidFeaturesAlert />
|
||||||
name="requireDeviceApproval"
|
<FormField
|
||||||
render={({ field }) => (
|
control={form.control}
|
||||||
<FormItem className="pt-3">
|
name="requireDeviceApproval"
|
||||||
<FormControl>
|
render={({ field }) => (
|
||||||
<CheckboxWithLabel
|
<FormItem className="pt-3">
|
||||||
{...field}
|
<FormControl>
|
||||||
value={undefined}
|
<CheckboxWithLabel
|
||||||
defaultChecked={
|
{...field}
|
||||||
field.value
|
disabled={
|
||||||
}
|
!isPaidUser
|
||||||
label={t(
|
}
|
||||||
"requireDeviceApproval"
|
value={undefined}
|
||||||
|
defaultChecked={
|
||||||
|
field.value
|
||||||
|
}
|
||||||
|
label={t(
|
||||||
|
"requireDeviceApproval"
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</FormControl>
|
||||||
|
|
||||||
|
<FormDescription>
|
||||||
|
{t(
|
||||||
|
"requireDeviceApprovalDescription"
|
||||||
)}
|
)}
|
||||||
/>
|
</FormDescription>
|
||||||
</FormControl>
|
|
||||||
|
|
||||||
<FormDescription>
|
<FormMessage />
|
||||||
{t(
|
</FormItem>
|
||||||
"requireDeviceApprovalDescription"
|
)}
|
||||||
)}
|
/>
|
||||||
</FormDescription>
|
</>
|
||||||
|
|
||||||
<FormMessage />
|
|
||||||
</FormItem>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
</form>
|
</form>
|
||||||
</Form>
|
</Form>
|
||||||
|
|||||||
Reference in New Issue
Block a user