Skip to content

Commit

Permalink
Merge pull request #40 from beyenilmez/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
beyenilmez authored Feb 11, 2024
2 parents 062aea0 + 7bf8405 commit 3c4875b
Show file tree
Hide file tree
Showing 20 changed files with 814 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = {
"version": "detect"
}
},
"ignorePatterns": ["tailwind.config.js", "src/presets/*"],
"ignorePatterns": ["tailwind.config.js", "config-overrides.js", "src/presets/*"],
"rules": {
// suppress errors for missing 'import React' in files
"react/react-in-jsx-scope": "off"
Expand Down
34 changes: 0 additions & 34 deletions .github/configs/.eslintrc.js

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow will do a clean installation of node dependencies, cache/restore them and build the source code across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: build

on:
pull_request:
branches: [ "main", "development" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
cache: npm
- run: npm ci
- run: npm run build --if-present
12 changes: 12 additions & 0 deletions config-overrides.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const LicensePlugin = require('webpack-license-plugin');

module.exports = function override(config, env) {
// Add the LicensePlugin to the plugins array
config.plugins.push(
new LicensePlugin({
outputFilename: 'licenses.json'
}),
);

return config;
};
106 changes: 105 additions & 1 deletion package-lock.json

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

22 changes: 15 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "gradeful",
"version": "1.1.0",
"version": "1.2.0",
"description": "A grade tracker to monitor your progress throughout your university education.",
"private": true,
"homepage": ".",
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test",
"eject": "react-scripts eject",
"lint": "eslint . --config .eslintrc.js --ext .js,.jsx"
},
Expand All @@ -27,12 +28,19 @@
"base64-compressor": "^1.0.3",
"eslint": "^8.56.0",
"react": "^18.2.0",
"react-app-rewired": "^2.2.1",
"react-dom": "^18.2.0",
"react-feather": "^2.0.10",
"react-scripts": "5.0.1",
"react-sortablejs": "^6.1.4",
"tailwind-scrollbar": "^3.0.5",
"tailwindcss": "^3.4.1",
"typescript": "^4.9.5"
}
}
"typescript": "^4.9.5",
"webpack-license-plugin": "^4.4.2"
},
"author": {
"name": "beyenilmez",
"url": "https://github.com/beyenilmez"
},
"license": "MIT"
}
Binary file modified public/favicon.ico
Binary file not shown.
Binary file modified public/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import ExportURLPopup from "./components/ExportURLPopup";
import LoadURLPopup from "./components/LoadURLPopup";
import Grid from "./components/Grid";
import { InactiveProvider } from "./components/InactiveContext";
import QucikStartWindow from "./components/QuickStartWindow";

document.body.className = 'bg-slate-250 dark:bg-slate-750 dark:text-slate-200 text-slate-800 slate';

Expand All @@ -21,6 +22,7 @@ function App() {
<SettingsWindow showSettingsPopup={showSettings} setShowSettingsPopup={setShowSettings} />
<ExportURLPopup showExportURLPopup={showExportURLPopup} setShowExportURLPopup={setShowExportURLPopup} />
<LoadURLPopup />
<QucikStartWindow />
</React.Fragment>
);
}
Expand Down
12 changes: 6 additions & 6 deletions src/components/Course.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,16 @@ function CourseExport(props) {
onChange={(e) => setNameValue(e.target.value)}
></textarea>

<textarea rows="1" inputMode="numeric"
<textarea rows="1" inputMode="decimal"
className={`
${editData !== undefined ? 'block' : 'hidden'}
whitespace-nowrap
no-scrollbar resize-none min-w-[4rem] max-w-[4rem] w-full h-7 text-center outline-none rounded-lg border dark:text-slate-300 text-slate-700 dark:border-slate-400 border-slate-500 dark:bg-slate-650 bg-slate-350 dark:placeholder-slate-500 placeholder-slate-450
`}
placeholder="Credit"
value={creditValue}
onChange={(e) => setCreditValue(e.target.value.replace(/[^0-9]/g, ''))}
maxLength={3}
onChange={(e) => setCreditValue(e.target.value.replace(/[^0-9.]/g, ''))}
maxLength={4}
></textarea>
</div>

Expand All @@ -213,15 +213,15 @@ function CourseExport(props) {
</div>
</div>
<div className={`border dark:border-slate-400 border-slate-500 flex items-center h-7 px-1 mx-1 rounded-lg dark:bg-slate-650 bg-slate-350 ${editData === undefined || autoCalcScoreValue ? 'hidden' : 'block'}`}>
<textarea rows="1" inputMode="numeric"
<textarea rows="1" inputMode="decimal"
className={`
whitespace-nowrap w-10
no-scrollbar resize-none text-center outline-none dark:text-slate-300 text-slate-700 dark:border-slate-400 border-slate-500 bg-transparent dark:placeholder-slate-500 placeholder-slate-450
`}
placeholder="Score"
value={scoreValue}
onChange={(e) => setScoreValue(e.target.value.replace(/[^0-9]/g, ''))}
maxLength={3}
onChange={(e) => setScoreValue(e.target.value.replace(/[^0-9.]/g, ''))}
maxLength={4}
></textarea>
</div>

Expand Down
11 changes: 3 additions & 8 deletions src/components/ImportFromFileWindow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import FileUpload from './UploadForm';
import { X } from 'react-feather/dist';
import { decode } from "base64-compressor"

import { ReactComponent as Logo } from "../logo.svg"

function ImportFromFileWindow(props) {
// Context
const { setUniversityData } = useUniData();
Expand Down Expand Up @@ -66,14 +68,7 @@ function ImportFromFileWindow(props) {
dark:bg-slate-650 bg-slate-350"
>
{/* Uni logo */}
<div className="w-fit mr-4 py-3 pl-3">
<svg className="w-10 dark:fill-slate-300 fill-slate-700" xmlns="http://www.w3.org/2000/svg"
data-name="Layer 1" viewBox="0 0 24 24">
<path
d="M21,10a.99974.99974,0,0,0,1-1V6a.9989.9989,0,0,0-.68359-.94824l-9-3a1.002,1.002,0,0,0-.63282,0l-9,3A.9989.9989,0,0,0,2,6V9a.99974.99974,0,0,0,1,1H4v7.18427A2.99507,2.99507,0,0,0,2,20v2a.99974.99974,0,0,0,1,1H21a.99974.99974,0,0,0,1-1V20a2.99507,2.99507,0,0,0-2-2.81573V10ZM20,21H4V20a1.001,1.001,0,0,1,1-1H19a1.001,1.001,0,0,1,1,1ZM6,17V10H8v7Zm4,0V10h4v7Zm6,0V10h2v7ZM4,8V6.7207l8-2.667,8,2.667V8Z">
</path>
</svg>
</div>
<Logo className="shrink-0 w-10 mr-4 m-3" />
{/* Uni logo */}

<div className="py-3 pr-4 shrink-0">
Expand Down
12 changes: 4 additions & 8 deletions src/components/LoadURLPopup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import Button from "./Button";
import { decode } from "base64-compressor";
import Window from "./Window";

import {ReactComponent as Logo} from "../logo.svg"

function LoadURLPopup() {
// Context
const { setUniversityData, save } = useUniData();
Expand All @@ -20,6 +22,7 @@ function LoadURLPopup() {
const urlParams = new URLSearchParams(window.location.search);
const data = urlParams.get('data');
if (data) {
localStorage.setItem('visited', 'visited');
decodeURL();
setShowPopup(true);
}
Expand Down Expand Up @@ -68,14 +71,7 @@ function LoadURLPopup() {
dark:bg-slate-650 bg-slate-350"
>
{/* Uni logo */}
<div className="w-fit mr-4">
<svg className="w-10 dark:fill-slate-300 fill-slate-700" xmlns="http://www.w3.org/2000/svg"
data-name="Layer 1" viewBox="0 0 24 24">
<path
d="M21,10a.99974.99974,0,0,0,1-1V6a.9989.9989,0,0,0-.68359-.94824l-9-3a1.002,1.002,0,0,0-.63282,0l-9,3A.9989.9989,0,0,0,2,6V9a.99974.99974,0,0,0,1,1H4v7.18427A2.99507,2.99507,0,0,0,2,20v2a.99974.99974,0,0,0,1,1H21a.99974.99974,0,0,0,1-1V20a2.99507,2.99507,0,0,0-2-2.81573V10ZM20,21H4V20a1.001,1.001,0,0,1,1-1H19a1.001,1.001,0,0,1,1,1ZM6,17V10H8v7Zm4,0V10h4v7Zm6,0V10h2v7ZM4,8V6.7207l8-2.667,8,2.667V8Z">
</path>
</svg>
</div>
<Logo className="shrink-0 w-10 mr-4" />
{/* Uni logo */}

<div className="pr-4 shrink-0">
Expand Down
Loading

0 comments on commit 3c4875b

Please sign in to comment.