-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add giga update_fn support + num env values to condition builder and …
…vars + bunch of improvements all over the place
- Loading branch information
Showing
41 changed files
with
867 additions
and
94 deletions.
There are no files selected for viewing
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
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
8 changes: 8 additions & 0 deletions
8
...src/pages/job-new/condition-builder/condition-node/value-input/EnvValueDialog.module.sass
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,8 @@ | ||
.root | ||
width: 640px | ||
|
||
.body | ||
display: grid | ||
grid-template-columns: 1fr 1fr | ||
row-gap: 20px !important | ||
column-gap: 20px !important |
35 changes: 35 additions & 0 deletions
35
...rotocol/src/pages/job-new/condition-builder/condition-node/value-input/EnvValueDialog.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,35 @@ | ||
import { Button } from 'components/primitives'; | ||
import { useDialog, DialogProps } from '@terra-money/apps/hooks'; | ||
import { Dialog, DialogBody, DialogHeader } from 'components/dialog'; | ||
import styles from './EnvValueDialog.module.sass'; | ||
import { warp_resolver } from '@terra-money/warp-sdk'; | ||
|
||
type EnvValueDialogProps = {}; | ||
|
||
const numEnvValues: warp_resolver.NumEnvValue[] = ['time', 'block_height']; | ||
|
||
export const EnvValueDialog = (props: DialogProps<EnvValueDialogProps, warp_resolver.NumEnvValue>) => { | ||
const { closeDialog } = props; | ||
|
||
return ( | ||
<Dialog className={styles.root}> | ||
<DialogHeader title="Select Environment Value" onClose={() => closeDialog(undefined)} /> | ||
<DialogBody className={styles.body}> | ||
{numEnvValues.map((envValue) => ( | ||
<Button | ||
key={envValue} | ||
onClick={() => { | ||
closeDialog(envValue); | ||
}} | ||
> | ||
{envValue} | ||
</Button> | ||
))} | ||
</DialogBody> | ||
</Dialog> | ||
); | ||
}; | ||
|
||
export const useEnvValueDialog = () => { | ||
return useDialog<EnvValueDialogProps, warp_resolver.NumEnvValue>(EnvValueDialog); | ||
}; |
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
Oops, something went wrong.