Skip to content

Commit

Permalink
Merge pull request #14 from SimonB50/main
Browse files Browse the repository at this point in the history
Librusek v0.4.3
  • Loading branch information
SimonB50 authored Dec 6, 2024
2 parents 053b7bf + e151e14 commit b75c8d0
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "librusek",
"version": "0.4.2",
"version": "0.4.3",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
27 changes: 17 additions & 10 deletions pages/grades.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,8 @@ const Grades = () => {
.map((grade) => (
<button
key={grade.Id}
className={`bg-${
grade.IsConstituent ? "primary" : "secondary"
className={`${
grade.IsConstituent ? "bg-primary" : "bg-secondary"
} text-primary-content w-fit p-2 font-semibold rounded-md text-center aspect-square`}
onClick={() => {
setFocusedGrade(`g-${grade.Id.toString()}`);
Expand Down Expand Up @@ -612,8 +612,10 @@ const Grades = () => {
.map((grade) => (
<button
key={grade.Id}
className={`bg-${
grade.IsConstituent ? "primary" : "secondary"
className={`${
grade.IsConstituent
? "bg-primary"
: "bg-secondary"
} text-primary-content w-fit p-2 font-semibold rounded-md text-center aspect-square`}
onClick={() => {
setFocusedGrade(`g-${grade.Id.toString()}`);
Expand Down Expand Up @@ -803,12 +805,12 @@ const Grades = () => {
<div className="flex flex-col gap-2 mt-2 bg-base-100 p-3 rounded-md">
<div className="flex flex-row gap-2 items-center">
<span
class={`text-4xl font-semibold bg-${
class={`text-4xl font-semibold ${
(!editMode ? gradesData.Grades : tmpGrades).find(
(x) => x.Id == focusedGrade.slice(2)
).IsConstituent
? "primary"
: "secondary"
? "bg-primary"
: "bg-secondary"
} w-20 h-20 flex items-center justify-center text-primary-content rounded-md`}
>
{
Expand Down Expand Up @@ -969,9 +971,14 @@ const Grades = () => {
{upperFirst(textGrade.Grade)}
</span>
<span className="text-lg">
{upperFirst(!subjectsLoading && !subjectsError && subjectsData.Subjects.find(
(x) => x.Id == textGrade.Subject.Id
).Name)} - {textGrade.Date}
{upperFirst(
!subjectsLoading &&
!subjectsError &&
subjectsData.Subjects.find(
(x) => x.Id == textGrade.Subject.Id
).Name
)}{" "}
- {textGrade.Date}
</span>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions pages/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const Profile = () => {
<div className="flex flex-col mt-4">
<span className="text-3xl font-semibold">Behaviour</span>
{behaviourGradesData.Grades.length > 0 ? (
<div className="grid grid-cols-2 gap-4 mt-4">
<div className="grid grid-cols-1 sm:grid-cols-2 gap-2 mt-4">
{behaviourGradesData.Grades.sort(
(a, b) => new Date(b.AddDate) - new Date(a.AddDate)
).map((grade) => (
Expand All @@ -97,7 +97,7 @@ const Profile = () => {
))}
{behaviourGradesData.Grades.length % 2 == 1 && (
<div className="flex rounded-box p-4 bg-base-200 justify-center items-center">
<span className="text-lg text-primary">
<span className="text-lg text-primary text-center">
Awaiting final grade
</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "app"
version = "0.4.2"
version = "0.4.3"
description = "Librusek app"
authors = ["SimonB50"]
license = "AGPL-3.0"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "Librusek",
"version": "0.4.2",
"version": "0.4.3",
"identifier": "com.librusek.dev",
"build": {
"frontendDist": "../out",
Expand Down

0 comments on commit b75c8d0

Please sign in to comment.