-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
84 additions
and
9 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/features/editor/providers/settings-dialog-provider/development/debug-mode-settings.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Label } from '@/components/ui/label'; | ||
import { Switch } from '@/components/ui/switch'; | ||
import { useSettingsStore } from '@/features/editor/stores/settings'; | ||
|
||
export const DebugModeSettings = () => { | ||
const { debugMode, updateDebugMode } = useSettingsStore(); | ||
|
||
return ( | ||
<div className="grid gap-2"> | ||
<div className="flex items-center justify-between gap-2"> | ||
<Label>Logs</Label> | ||
<Switch onCheckedChange={updateDebugMode} checked={debugMode} /> | ||
</div> | ||
</div> | ||
); | ||
}; |
13 changes: 13 additions & 0 deletions
13
src/features/editor/providers/settings-dialog-provider/development/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { DebugModeSettings } from './debug-mode-settings'; | ||
|
||
export const DevelopmentSettings = () => { | ||
return ( | ||
<div className="grid gap-4"> | ||
<h3 className="font-medium leading-none">Development</h3> | ||
<small className="text-muted text-sm"> | ||
<b>Note:</b> These settings are intended for debugging purpose | ||
</small> | ||
<DebugModeSettings /> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export const DebugLog = (...args: unknown[]) => { | ||
console.debug('DEBUG: ', ...args); | ||
}; | ||
|
||
export const DebugLogVoid = (..._: unknown[]) => {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters