mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-09 04:06:36 +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,7 +167,9 @@ export default function CreateRoleForm({
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
{isPaidUser && (
|
{build !== "oss" && (
|
||||||
|
<>
|
||||||
|
<PaidFeaturesAlert />
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="requireDeviceApproval"
|
name="requireDeviceApproval"
|
||||||
@@ -174,6 +178,9 @@ export default function CreateRoleForm({
|
|||||||
<FormControl>
|
<FormControl>
|
||||||
<CheckboxWithLabel
|
<CheckboxWithLabel
|
||||||
{...field}
|
{...field}
|
||||||
|
disabled={
|
||||||
|
!isPaidUser
|
||||||
|
}
|
||||||
value={undefined}
|
value={undefined}
|
||||||
defaultChecked={
|
defaultChecked={
|
||||||
field.value
|
field.value
|
||||||
@@ -194,6 +201,7 @@ export default function CreateRoleForm({
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
</form>
|
</form>
|
||||||
</Form>
|
</Form>
|
||||||
|
|||||||
Reference in New Issue
Block a user