diff --git a/visions/server/Taskfile.yml b/visions/server/Taskfile.yml new file mode 100644 index 0000000..58152e8 --- /dev/null +++ b/visions/server/Taskfile.yml @@ -0,0 +1,14 @@ +version: '3' + +tasks: + build: + cmds: + - cargo build + + test: + cmds: + - cargo watch -x test + + server: + cmds: + - cargo watch -x run diff --git a/visions/ui/Taskfile.yml b/visions/ui/Taskfile.yml new file mode 100644 index 0000000..823ef51 --- /dev/null +++ b/visions/ui/Taskfile.yml @@ -0,0 +1,7 @@ +version: '3' + +tasks: + dev: + cmds: + - npm run start + diff --git a/visions/ui/src/plugins/Candela/Charsheet.css b/visions/ui/src/plugins/Candela/Charsheet.css index c940466..6c63076 100644 --- a/visions/ui/src/plugins/Candela/Charsheet.css +++ b/visions/ui/src/plugins/Candela/Charsheet.css @@ -16,4 +16,40 @@ width: 33%; } +.action-group { + position: relative; + border: 2px solid black; + border-radius: 4px; + padding-left: 8px; + padding-bottom: 8px; +} + +.action-group:before { + content: " "; + position: absolute; + z-index: -1; + top: 2px; + left: 2px; + right: 2px; + bottom: 2px; + border: 2px solid black; +} + +.action-group > h1 { + margin: 4px; + margin-left: -4px; + padding-left: 4px; + background-color: black; + color: white; +} + +.action-group__action { + margin: 2px; +} + +.action-group__dots { + margin: 0px; + padding: 0px; + padding-left: 16px; +} diff --git a/visions/ui/src/plugins/Candela/Charsheet.tsx b/visions/ui/src/plugins/Candela/Charsheet.tsx index 44729e6..09cf46e 100644 --- a/visions/ui/src/plugins/Candela/Charsheet.tsx +++ b/visions/ui/src/plugins/Candela/Charsheet.tsx @@ -7,7 +7,7 @@ export type Guage = { } export type Action = { - guilded: boolean, + gilded: boolean, score: number, } @@ -20,6 +20,7 @@ export type ActionGroup = { } type Nerve = { + type_: "nerve", drives: Guage, resistances: Guage, move: Action, @@ -28,6 +29,7 @@ type Nerve = { } type Cunning = { + type_: "cunning", drives: Guage, resistances: Guage, sway: Action, @@ -36,6 +38,7 @@ type Cunning = { } type Intuition = { + type_: "intuition", drives: Guage, resistances: Guage, survey: Action, @@ -62,11 +65,6 @@ interface CharsheetProps { sheet: Charsheet, } -interface ActionDriveProps { - groupName: string, - group: Nerve | Cunning | Intuition, -} - interface GuageProps { current: number, max: number, @@ -76,15 +74,67 @@ const GuageElement = ({ current, max }: GuageProps) => { } -const ActionDriveElement = ({ groupName, group }: ActionDriveProps) => { +function assertNever(value: never) { + throw new Error("Unexpected value: " + value); +} - if ("move" in group) { - return