-
Notifications
You must be signed in to change notification settings - Fork 0
Client/settings #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client/settings #127
Changes from all commits
caf627d
ce118e9
ea0ec59
5790be0
7e570d2
abbc903
5ec24f6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import { useQueryState } from "nuqs" | ||
|
|
||
| import { appConfig, type QueryIds } from "@/config" | ||
|
|
||
| export function useQuery(queryId: QueryIds) { | ||
| return useQueryState(queryId, appConfig.queries[queryId]) | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,47 +1,59 @@ | ||
| import { useSnapshot } from "valtio" | ||
|
|
||
| import { Button, Column, Icon, List, ListItem } from "@code-glue/paradigm" | ||
| import { useQuery } from "@/hooks/useQuery" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <2307> reported by reviewdog 🐶 |
||
| import { useRouter } from "@/hooks/useRouter" | ||
| import { store } from "@/store" | ||
| import { CreateAutomation } from "../../components/CreateAutomation" | ||
| import { Header } from "../../components/Header" | ||
| import { Settings } from "./Settings" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <6142> reported by reviewdog 🐶 |
||
| export const Nav = () => { | ||
| const { automations } = useSnapshot(store) | ||
|
|
||
| const [{ route, automationId }, navigateTo] = useRouter() | ||
| const [isSettings, setIsSettings] = useQuery("settings") | ||
|
|
||
| return ( | ||
| <Column grow color={"$cardStock"}> | ||
| <Header> | ||
| <img src="./headerLogo.png" alt="CodeGlue" height={42} /> | ||
| <Button icon={Icon.Settings} isRaised /> | ||
| <Button | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| icon={isSettings ? Icon.X : Icon.Settings} | ||
| isRaised | ||
| onPress={() => { | ||
| setIsSettings(!isSettings) | ||
| }} | ||
| /> | ||
| </Header> | ||
| <List.Group> | ||
| <List.Simple> | ||
| <ListItem | ||
| label="Logs" | ||
| isSelected={!route} | ||
| onPress={() => navigateTo("home")} | ||
| /> | ||
| </List.Simple> | ||
| <List.Simple header="Automations"> | ||
| <CreateAutomation /> | ||
| {Array.from(automations, ([, automation]) => { | ||
| return ( | ||
| <ListItem | ||
| label={automation.title} | ||
| key={automation.id} | ||
| isSelected={ | ||
| route === "automations" && automation.id === automationId | ||
| } | ||
| onPress={() => { | ||
| navigateTo("automations", { automationId: automation.id }) | ||
| }} | ||
| /> | ||
| ) | ||
| })} | ||
| </List.Simple> | ||
| </List.Group> | ||
| {isSettings ? ( | ||
| <Settings /> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| ) : ( | ||
| <List.Group> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| <List.Simple> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| <ListItem | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| label="Logs" | ||
| isSelected={!route} | ||
| onPress={() => navigateTo("home")} | ||
| /> | ||
| </List.Simple> | ||
| <List.Simple header="Automations"> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| <CreateAutomation /> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| {Array.from(automations, ([, automation]) => { | ||
| return ( | ||
| <ListItem | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| label={automation.title} | ||
| key={automation.id} | ||
| isSelected={ | ||
| route === "automations" && automation.id === automationId | ||
| } | ||
| onPress={() => { | ||
| navigateTo("automations", { automationId: automation.id }) | ||
| }} | ||
| /> | ||
| ) | ||
| })} | ||
| </List.Simple> | ||
| </List.Group> | ||
| )} | ||
| </Column> | ||
| ) | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import { Column, Text } from "@code-glue/paradigm" | ||
|
|
||
| export const Settings = () => { | ||
| return ( | ||
| <Column> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| <Text>Settings</Text> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| <Text> Appearance (Dark/light/system) dropdown</Text> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| <Text>------</Text> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| <Text>Editor Theme (dropdown)</Text> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| <Text>Typeface (dropdown)</Text> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| <Text>Font Size (slider)</Text> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| <Text>Width (slider)</Text> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| <Text>Weight (slider)</Text> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| <Text>------</Text> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| <Text>Console Theme (dropdown)</Text> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| <Text>Typeface (dropdown)</Text> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| <Text>Font Size (slider)</Text> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| <Text>Width (slider)</Text> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| <Text>Weight (slider)</Text> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [tsc] <17004> reported by reviewdog 🐶 |
||
| </Column> | ||
| ) | ||
| } | ||
| +4 −3 | .github/actions/setup-node/action.yml | |
| +4 −1 | .gitignore | |
| +2 −0 | .vscode/settings.json | |
| +5 −0 | chromatic.config.json | |
| +4 −3 | package.json | |
| +0 −0 | patches/@window-splitter+react+patch.patch | |
| +0 −15 | patches/@window-splitter+state+1.1.2.patch | |
| +22 −19 | src/components/List/EmptyContent.tsx | |
| +21 −23 | src/components/List/Group/index.tsx | |
| +1 −1 | src/components/List/Header/index.tsx | |
| +7 −4 | src/components/List/Simple/index.tsx | |
| +70 −4 | src/components/List/Simple/stories.tsx | |
| +16 −16 | src/components/List/Wrapper/index.tsx | |
| +8 −5 | src/components/ListItem/StatusHandler.tsx | |
| +5 −3 | src/components/ScrollView/ScrollView.tsx | |
| +5 −0 | src/config/animation.config.ts | |
| +6 −2 | src/config/tamagui.config.ts | |
| +0 −10,027 | yarn.lock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [tsc] <2307> reported by reviewdog 🐶
Cannot find module '@/config' or its corresponding type declarations.