@canmingir/link 1.2.26 → 1.2.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Platform.jsx +1 -0
- package/src/hooks/index.js +2 -1
- package/src/hooks/use-beta.js +8 -0
- package/src/widgets/SettingsDialog.jsx +17 -0
package/package.json
CHANGED
package/src/Platform.jsx
CHANGED
package/src/hooks/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import Iconify from "../components/Iconify";
|
|
|
2
2
|
import config from "../config/config";
|
|
3
3
|
import { useEvent } from "@nucleoidai/react-event";
|
|
4
4
|
import useSettings from "../hooks/useSettings";
|
|
5
|
+
import { useSettingsContext } from "../components/settings/context";
|
|
5
6
|
import { useUser } from "../hooks/use-user";
|
|
6
7
|
|
|
7
8
|
import {
|
|
@@ -20,6 +21,7 @@ import {
|
|
|
20
21
|
ListItemText,
|
|
21
22
|
NativeSelect,
|
|
22
23
|
Stack,
|
|
24
|
+
Switch,
|
|
23
25
|
Tab,
|
|
24
26
|
Tabs,
|
|
25
27
|
TextField,
|
|
@@ -282,6 +284,7 @@ const Permission = () => {
|
|
|
282
284
|
const Settings = () => {
|
|
283
285
|
const projectId = localStorage.getItem("projectId");
|
|
284
286
|
const { settings, updateSettings } = useSettings(projectId);
|
|
287
|
+
const { beta, onUpdate } = useSettingsContext();
|
|
285
288
|
|
|
286
289
|
const timeZones = [
|
|
287
290
|
"Asia/Kolkata",
|
|
@@ -333,6 +336,20 @@ const Settings = () => {
|
|
|
333
336
|
</NativeSelect>
|
|
334
337
|
</FormControl>
|
|
335
338
|
</ListItem>
|
|
339
|
+
<ListItem
|
|
340
|
+
sx={{
|
|
341
|
+
backgroundColor: "background.paper",
|
|
342
|
+
boxShadow: 1,
|
|
343
|
+
borderRadius: 1,
|
|
344
|
+
m: 1,
|
|
345
|
+
p: 2,
|
|
346
|
+
":hover": { boxShadow: 3 },
|
|
347
|
+
transition: "all 0.2s ease-in-out",
|
|
348
|
+
}}
|
|
349
|
+
>
|
|
350
|
+
<ListItemText primary="Beta" secondary="Enable beta features" />
|
|
351
|
+
<Switch checked={beta} onChange={() => onUpdate("beta", !beta)} />
|
|
352
|
+
</ListItem>
|
|
336
353
|
</List>
|
|
337
354
|
</Stack>
|
|
338
355
|
);
|