Skip to content

Commit

Permalink
Merge branch 'language-support'
Browse files Browse the repository at this point in the history
  • Loading branch information
ritalarina committed Jan 3, 2025
2 parents 6e16164 + 3e24588 commit 3894fa1
Show file tree
Hide file tree
Showing 20 changed files with 902 additions and 159 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ To calculate volume of each nutrition needed linear programming is used to minim
- for each other health condition a patient has, a special nutrition formula is added to the nutrition mix. If calculation becomes impossible, lower bounds are ignored and some nutrition formulas might be skipped,
- if all else fails, protein constraint can be relaxed down to 85% of the minimum protein need and caloric constraint can be relaxed to be a maximum of 125% of caloric need. This happens in rare cases for patients with small total burn area. You will be indormed if this happens

## Languages Supported
CaloricMedCare is available in the following languages:
- English
- Russian
- Latvian

More languages may be added in future updates based on user demand and feedback.

## Running the app
### Option 1. Running the App from a Published Release
1. Go to the [Releases](https://github.com/ritalarina/caloricmedcare/releases) page and download the latest release for Windows (e.g., .exe file).
Expand Down
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ UI:

Other:
- Make nutrition.xml file editable either via direct file edit or from app settings.
- Add language support.
- ~~Add language support.~~
- Set up app auto-update.
- Physical printing of calculation results.
- calculator if calorimetry is available
Expand Down
34 changes: 0 additions & 34 deletions main.js

This file was deleted.

118 changes: 99 additions & 19 deletions package-lock.json

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

13 changes: 5 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "caloricmedcare",
"version": "0.3.0",
"version": "0.3.1",
"description": "An Electron app to calculate daily caloric need of a patient in a burn ward based on entered patient data.",
"main": "main.js",
"type": "module",
"main": "src/main.js",
"scripts": {
"start": "electron .",
"package": "electron-builder",
Expand All @@ -21,17 +22,13 @@
"productName": "CaloricMedCare",
"win": {
"target": "nsis",
"icon": "assets/icons/nutrient.ico"
"icon": "src/assets/icons/nutrient.ico"
},
"directories": {
"output": "release-builds"
},
"files": [
"main.js",
"renderer.js",
"index.html",
"package.json",
"assets/**/*"
"src/**/*"
]
},
"author": "Rita Larina",
Expand Down
97 changes: 97 additions & 0 deletions src/assets/css/settings-modal.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
.modal {
display: none; /* Hidden by default */
position: fixed;
z-index: 1000; /* Above other content */
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgba(0,0,0,0.4); /* Black background with opacity */
}

.modal-content {
background-color: #fff;
margin: 10% auto; /* Center the modal */
padding: 20px 30px;
border: 1px solid #888;
width: 30%;
border-radius: 10px;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.modal-input-group {
display: flex;
align-items: center;
gap: 10px;
}

.settings-modal-form-group label {
flex: 2;
text-align: right; /* Align label text to the right */
font-size: 1rem;
margin-right: 10px; /* Add space between the label and dropdown */
}

.modal-select {
flex: 3;
padding: 8px 10px;
font-size: 0.9rem;
border: 1px solid #ccc;
border-radius: 4px;
}

.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
}

.close:hover,
.close:focus {
color: black;
text-decoration: none;
cursor: pointer;
}

.modal-footer {
display: flex;
justify-content: flex-end; /* Aligns items to the right */
margin-top: 15px;
}

/* General button styling */
.button {
margin-top: 15px;
background-color: #4CAF50; /* Green background */
color: white; /* White text */
border: none; /* Remove borders */
padding: 10px 20px; /* Add padding for a comfortable size */
font-size: 1em; /* Match general font size */
border-radius: 5px; /* Rounded corners */
cursor: pointer; /* Pointer cursor on hover */
transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transitions */
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for a modern look */
float: right;
}

/* Hover effect */
.button:hover {
background-color: #45a049; /* Slightly darker green */
transform: translateY(-2px); /* Subtle lift effect */
}

/* Active (clicked) effect */
.button:active {
background-color: #3e8e41; /* Even darker green */
transform: translateY(0); /* Return to original position */
}

/* Disabled state */
.button:disabled {
background-color: #ccc; /* Gray background */
color: #666; /* Muted text color */
cursor: not-allowed; /* Indicate it's not clickable */
box-shadow: none; /* Remove shadow for disabled state */
}
File renamed without changes.
7 changes: 7 additions & 0 deletions src/assets/data/illnesses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"diabetes": "diabetes",
"constipation": "constipation",
"swelling": "swelling",
"liver-failure": "liver failure",
"malnutrition": "malnutrition"
}
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 3894fa1

Please sign in to comment.