Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update logic for coloring chapters' last action #211

Merged
merged 2 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions frontend/ChapterList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yuck forgot we were still using dayjs in this 🤣

fine thought for now obvs

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol. noted dayjs is yuck.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not as bad as moment. i didn't realize it's still being updated, but it is. i prefer date-fns these days though, and it has a smaller bundle size.

c = 'is-warning';
}
if (time.isAfter(dayjs().add(-1, 'month'))) {
if (time.isAfter(dayjs().add(-29, 'day'))) {
c = 'is-success';
}
return c;
Expand Down
Loading