vocascan / vocascan-frontend

A highly configurable vocabulary trainer
https://vocascan.com
Apache License 2.0
29 stars 8 forks source link

Little Light/Dark mode bug in UI #130

Closed noctera closed 1 year ago

noctera commented 1 year ago

We have a small bug in our UI leaving the Vocascan next to our logo black while in light mode. When turning it to dark mode everything works just fine. Changing the color in the scss file itself won't fix it, as this color is used for the font too. Maybe you just have to introduce another color variable or have a look at the color variable used for the NavButtons as they are styled as intended.

Dark-mode: image

Light-mode: image

tamalCodes commented 1 year ago

You said Changing the color in the scss file itself won't fix it , but in the scss we have used .top-nav .title p

noctera commented 1 year ago

Yeah this would work with the current themes. But we want to have it flexible. In the future there might be Themes that require a black font instead of a white font. This can't be solved with a fixed white value, but instead with a variable

aritroCoder commented 1 year ago

Can you assign this to me, I want to work

noctera commented 1 year ago

Can you assign this to me, I want to work

I haven't heard anything from @IAmTamal about solving this issue, so you can work on it

aritroCoder commented 1 year ago

Just a small question, how do I get the docker database URL to set up vocascan.config.js?

noctera commented 1 year ago

If you haven't seen it already, the installation process is described on Vocascan Docs

Your can either expose the port with

ports:
  - 5432:5432

And access the database via 127.0.0.1 and port 5432

Or use the name of the service, as shown here: https://github.com/vocascan/vocascan-server/tree/main/docker%2Fdefault

(Maybe this config file might be a little too old, and one or two options might be missing. But in this case you will get noticed on the start if anything has changed. But i think this minimum configuration is still working)

aritroCoder commented 1 year ago

When I try to create a session using docker-compose exec vocascan ash I get the response:

Error response from daemon: Container 91f73df2fd701359d02dae649d11ab1c3c925c000ac321c8a709744514441f67 is restarting, wait until the container is running

I don't know much about docker so if you can help me fix it then it will be very helpful

luwol03 commented 1 year ago

@aritroCoder This means your container crashed and keeps restarting. So you have to figure out why. Please open a discussion in the servers repo for that and provide more details (logs (docker-compose logs -f), your docker-compose.yml file, commands you executed, ...)

noctera commented 1 year ago

@aritroCoder If you can't get a server up and running, you can use our internal development server. But keep in mind that you mustn't store personal data on this account, as they are just for development and might be deleted without a warning. For a personal usage, take our cloud. The dev server is reachable under this domain: https://test-server.vocascan.com having the following accounts:

1. Username: test1; Password: test1;
2. Username: test2; Password: test2;
...
9. Username: test9; Password: test9;
aritroCoder commented 1 year ago

thanks, I had set up the server, now if I am changing some files I am not seeing it to update, I had tried hard reloading and clearing cache but its still the same

luwol03 commented 1 year ago

How have you set up your server? Which files have you changed? And how do you run your server?

aritroCoder commented 1 year ago

docker-compose.yml file:

version: '3.8'
services:
  vocascan:
    image: vocascan/server:latest
    restart: always
    tty: true
    depends_on:
      - db
    environment:
      VOCASCAN_CONFIG: '/vocascan.config.js'
    ports:
      - '6000:80'
    volumes:
      - './vocascan.config.js:/etc/vocascan/vocascan.config.js:ro'
  db:
    image: postgres
    environment:
      POSTGRES_USER: 'vocascan'
      POSTGRES_PASSWORD: 'vocascan'
      POSTGRES_DB: 'vocascan'
    volumes:
      - './database:/var/lib/postgresql/data'
  frontend:
    image: vocascan/frontend:latest
    restart: always
    tty: true
    environment:
      VOCASCAN_BASE_URL: "https://test-server.vocascan.com"
    ports:
      - "3000:80"

vocascan.config,js

/**
 * For more help with the file see https://docs.vocascan.com/#/vocascan-server/configuration
 * This config file lists all available options
 */

module.exports = {
  debug: false,

  server: {
    port: 8000,
    jwt_secret: '',
    salt_rounds: 10,
  },

  database: {
    dialect: 'postgres',
    host: 'db',
    port: '5432',
    username: 'vocascan',
    password: 'vocascan',
    database: 'vocascan',
  },

  log: {
    console: {
      level: 'info',
      colorize: true,
      enable_sql_log: true,
      enable_router_log: true,
      stderr_levels: ['error'],
    },
  },
};

file trying to change: src/components/Nav/TopNav.jsx

luwol03 commented 1 year ago

You cannot use the docker container of the frontend for developing. Go to our contributing documentation for a contributing setup. If you installed all npm dependencies you can just run npm run start

Your server keeps restarting because the config file ENV is not the path inside of the container. Please open a discussion in the specific repo instead of posting to this issues. This has nothing todo with the frontend UI bug.

aritroCoder commented 1 year ago

You cannot use the docker container of the frontend for developing. Go to our contributing documentation for a contributing setup. If you installed all npm dependencies you can just run npm run start

Your server keeps restarting because the config file ENV is not the path inside of the container. Please open a discussion in the specific repo instead of posting to this issues. This has nothing todo with the frontend UI bug.

Thanks for the guidance! It ran perfectly and I have fixed it! image

heres a screenshot of what I did

luwol03 commented 1 year ago

please remove the package-lock.json and vocascan.config.js from your branch, as they dont belong to this change/repo.

aritroCoder commented 1 year ago

done, will create the PR in 1st october