From 22fe05a605cb259a5aa96dc487b95a63a8a7ebef Mon Sep 17 00:00:00 2001 From: Oskar Marquardt <oskar.marquardt@student.uni-halle.de> Date: Wed, 12 Jun 2024 12:57:23 +0200 Subject: [PATCH] Removed main.js from langauge stat - Added sphere affinity --- .gitattributes | 1 + src/Character.elm | 1 + src/Main.elm | 4 ++-- src/Sphere.elm | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..681988c --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +public/main.js -linguist-vendored \ No newline at end of file diff --git a/src/Character.elm b/src/Character.elm index 2ed88e4..7f73d98 100644 --- a/src/Character.elm +++ b/src/Character.elm @@ -25,6 +25,7 @@ new = , spheres = [ { name = "Correspondence" , dots = Sphere.dots 0 + , affinity = False } ] } \ No newline at end of file diff --git a/src/Main.elm b/src/Main.elm index abfc1fb..7ccda3f 100644 --- a/src/Main.elm +++ b/src/Main.elm @@ -112,12 +112,12 @@ viewSphere sphere = [ span [] [ text sphere.name ] , button [ class "button is-small" - , onClick ( ChangeSphere { name = sphere.name, dots = BoundedInt.change sphere.dots (sphere.dots.value - 1) } ) + , onClick ( ChangeSphere { sphere | dots = BoundedInt.change sphere.dots (sphere.dots.value - 1) } ) ] [ text "-" ] , span [] [ text ( String.fromInt sphere.dots.value ) ] , button [ class "button is-small" - , onClick ( ChangeSphere { name = sphere.name, dots = BoundedInt.change sphere.dots (sphere.dots.value + 1) } ) + , onClick ( ChangeSphere { sphere | dots = BoundedInt.change sphere.dots (sphere.dots.value + 1) } ) ] [ text "+" ] ] diff --git a/src/Sphere.elm b/src/Sphere.elm index 6dec7f8..1c30a2c 100644 --- a/src/Sphere.elm +++ b/src/Sphere.elm @@ -5,6 +5,7 @@ import BoundedInt exposing (BoundedInt) type alias Sphere = { name : String , dots : BoundedInt + , affinity : Bool } changeSphereInList : List Sphere -> Sphere -> List Sphere -- GitLab