From 368e5de69f0008c7ce87e69c7a86bb2d41e0e7cb Mon Sep 17 00:00:00 2001 From: Alexander Taylor Date: Thu, 30 May 2024 06:01:12 +0000 Subject: [PATCH 1/2] Add readme instruction to connect to local database with mysql-client --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9bffa8e..06877ac 100644 --- a/README.md +++ b/README.md @@ -22,13 +22,29 @@ make deps #### Set up mysql locally for development -There is now a Docker container to run MySQL locally, so just run the following: +If you are not using the devcontainer, you can use our Docker Compose configuration +to run MySQL locally: ```bash ( cd server/ && docker compose up -d ) make dev_db ``` +If you are using the devcontainer, just run this command in the container: +```bash +make dev_db +``` + +This command will log you into the database if you run the comman in the same +container as the database: + +```bash +mysql -u adb_user -padbpassword -h 127.0.0.1 +``` + +(Note the syntax of the above command is to accept the password after `-p` +without a space.) + ### Run After downloading the dependencies, start the server: From bfb593c3b883f0a484211d872fd2fcd0cb401689 Mon Sep 17 00:00:00 2001 From: Alexander Taylor Date: Thu, 30 May 2024 06:02:19 +0000 Subject: [PATCH 2/2] Update logic for coloring chapters' last action time based on request from Michelle Tested by manually setting last event dates to be 29,30,58,59 days ago in local database and checking the color. --- frontend/ChapterList.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/ChapterList.vue b/frontend/ChapterList.vue index 64bd9d6..c4196d1 100644 --- a/frontend/ChapterList.vue +++ b/frontend/ChapterList.vue @@ -871,10 +871,10 @@ export default Vue.extend({ if (time.isValid()) { c = 'is-danger'; } - if (time.isAfter(dayjs().add(-2, 'month'))) { + if (time.isAfter(dayjs().add(-58, 'day'))) { c = 'is-warning'; } - if (time.isAfter(dayjs().add(-1, 'month'))) { + if (time.isAfter(dayjs().add(-29, 'day'))) { c = 'is-success'; } return c;