Skip to content

Commit

Permalink
enhance: other improvements and misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rschlaefli committed Nov 13, 2024
1 parent 62b0725 commit 0eaa969
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion apps/demo-game/src/components/DecisionsDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function DecisionsDisplayCompact({ segmentDecisions }: DecisionDisplayProps) {
return (
<Card>
<CardHeader>
<CardTitle>Decision history</CardTitle>
<CardTitle>Decision History</CardTitle>
<CardDescription>
Here is an overview of the final decisions per period and segment that
have been made.
Expand Down
4 changes: 2 additions & 2 deletions apps/demo-game/src/components/StoryElements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ function StoryElements({ playerState, player }: Props) {
return (
<Image
{...props}
width={300}
height={300}
width={250}
height={250}
alt="Visual representation of the story element"
className="mt-4 rounded-lg"
style={{ maxWidth: '100%' }}
Expand Down
7 changes: 5 additions & 2 deletions apps/demo-game/src/pages/play/cockpit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function GameLayout({ children }: { children: React.ReactNode }) {
/>
)}

{countdownDurationMs !== null && (
{/* {countdownDurationMs !== null && (
<CycleCountdown
className={{
root: '',
Expand Down Expand Up @@ -177,7 +177,7 @@ function GameLayout({ children }: { children: React.ReactNode }) {
})
}}
/>
)}
)} */}
</div>
<LearningElements />
</div>
Expand Down Expand Up @@ -796,6 +796,9 @@ function Cockpit() {
columns={columns_portfolio}
data={data_portfolio}
caption=""
className={{
tableHeader: 'text-right pr-4', row: 'text-right'
}}
/>

<div className="mt-8 flex flex-row gap-2">
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ function Layout({ children, tabs, playerInfo, sidebar }: Props) {
color={playerInfo.color}
location={playerInfo.location}
level={playerInfo.level}
xp={playerInfo.xp}
xpMax={playerInfo.xpMax}
// xp={playerInfo.xp}
// xpMax={playerInfo.xpMax}
achievements={playerInfo.achievements}
imgPathAvatar={playerInfo.imgPathAvatar}
imgPathLocation={playerInfo.imgPathLocation}
Expand Down
12 changes: 6 additions & 6 deletions packages/ui/src/components/PlayerDisplay.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Logo } from './Logo'
import { Achievement } from './Achievement'
import { XpBar } from './XpBar'
// import { XpBar } from './XpBar'
import { Button } from '@uzh-bf/design-system'

interface PlayerDataProps {
name?: string
color?: string
xp?: number
xpMax: number
// xp?: number
// xpMax: number
level: number
location?: string
achievements?: {
Expand All @@ -32,8 +32,8 @@ interface PlayerDataProps {
function PlayerDisplay({
name,
color,
xp,
xpMax,
// xp,
// xpMax,
level,
location,
achievements,
Expand All @@ -55,7 +55,7 @@ function PlayerDisplay({
/>
</Button>

<XpBar value={xp ?? 0} max={xpMax} />
{/* <XpBar value={xp ?? 0} max={xpMax} /> */}

<div className="flex flex-row flex-wrap flex-initial gap-2">
{achievements?.map((achievement) => (
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ProbabilityChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function ProbabilityChart({
<XAxis dataKey="eyes">
<Label value="Dice Roll" position="bottom" offset={0} />
</XAxis>
<YAxis dataKey="prob" tickFormatter={(value) => `${value * 100}%`}>
<YAxis dataKey="prob" tickFormatter={(value) => `${(value * 100).toFixed(1)}%`}>
<Label value="Probability" angle={-90} position="left" offset={0} />
</YAxis>
<Bar dataKey="prob">
Expand Down
3 changes: 1 addition & 2 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
},
"dev": {
"cache": false,
"outputs": ["dist/**", ".next/**", "public/**"],
"dependsOn": ["@gbl-uzh/platform#build", "@gbl-uzh/ui#build"]
"outputs": ["dist/**", ".next/**", "public/**"]
},
"dev-web": {
"cache": false,
Expand Down

0 comments on commit 0eaa969

Please sign in to comment.