4darsh-Dev / CogniGaurd

A web extension for identifying dark pattern on websites powered by Fine Tuned BERT Model for classificaiton on dark pattern custom dataset,
https://cogniguard.onionreads.com/
MIT License
23 stars 49 forks source link

Progressbar below navbar #138

Closed Garima-149 closed 3 months ago

Garima-149 commented 4 months ago

@4darsh-Dev I would like to add progress bar which will track the loading of webpage.I thought of placing it below navbar section.Please assign me with this issue. Screenshot (99)

4darsh-Dev commented 4 months ago

assinged to you @Garima-149 , complete the work as well, you've been assigned so many issues at once.

Garima-149 commented 4 months ago

@4darsh-Dev Could you please help me that How to setup this project on my local network? I have tried according to readme. Md file available but It's not clear.

4darsh-Dev commented 4 months ago

okay @Garima-149 : Here's a simplified version.

  1. You fork the repo and clone it to your device.
  2. navigate to django-web-app ( working directory) where you have to work.
  3. Create a virtual environment(venv) using python (3.12) (prefer)
  4. activate the venv
  5. Install dependencies using pip
  6. create a .env file in your working directory for managing environment variables.
  7. Just add any value of sample .env file ( to avoid any errors ) of missing values.
  8. Now you have to start a django development server, before that
  9. comment out urlpatterns code as shown in code sample and turn DEBUG=True and comment PostgreSQL db add code for sqlite3 database as shown in image (readme.md)
  10. python manage.py runserver.
  11. Make changes in respective files.
  12. Undo development changes ( 9 pt)
  13. push the code
4darsh-Dev commented 4 months ago

any errors share the SS ?

Garima-149 commented 4 months ago

Ok Thanku so much

Garima-149 commented 4 months ago

Screenshot (104) @4darsh-Dev I am getting this error.What should I do to solve this?

4darsh-Dev commented 4 months ago

have you added sqlite3 database instead of the vercel production database see reference from readme.

4darsh-Dev commented 4 months ago

@Garima-149 the error message is incomplete share the last few lines.

Garima-149 commented 4 months ago

Screenshot (106) This is complete error @4darsh-Dev

4darsh-Dev commented 4 months ago

have you created a new file .env in the django-web-app directory with default values? @Garima-149 this is due to missing client-id key

4darsh-Dev commented 4 months ago

create an .env file with CLIENT_ID = your-sample-value

Garima-149 commented 4 months ago

@4darsh-Dev I am getting this error now. Screenshot (108)

4darsh-Dev commented 4 months ago

okay got it, @Garima-149 have you applied migrations to sqlite3 database, python manage.py makemigrations python manage.py migrate.

-- this will create all the tables required for project. mitigating the error. -- tell me if you got any other errors.

Garima-149 commented 4 months ago

@4darsh-Dev I have created all the comments and changes for sqlite3 data base according to read. Me page and when I did the command python manage. Py migrations. Then, it showed this error.

4darsh-Dev commented 4 months ago

okay @Garima-149 , this error might be due to api/views.py might be calling a function which requires a URL from api_request, but currently due to new database there are no requests already. do the best bug hunting comment out a simple code . which is calling that api_request,

urlLen = len(dpUrls) share ss of api/views.py last few lines of code ... which is calling that function.

4darsh-Dev commented 4 months ago

in the new version released, I've changed this to stop calling automatically.

4darsh-Dev commented 4 months ago

connect me on discord , to fix that issue now, or gssoc project group on discord..

4darsh-Dev commented 4 months ago

Screenshot 2024-07-15 110541

commenting these lines might fix the error,

from 68 to 75

Garima-149 commented 3 months ago

@4darsh-Dev The project is working on my local host but I am facing an error that whenever I am changing something in js files in my working directort, it is not reflecting on website. What could be the possibile issue in that? Screenshot (109) Like this one Screenshot (110)

4darsh-Dev commented 3 months ago

@Garima-149 , it might be due to browser caches, try using ctrl+f5 for reload on PC keyboard, on laptop use this fn lock enabled, see if it works, you can check console on inspect tab, for logs, ctrl+shift+i or right click

Garima-149 commented 3 months ago

Yes changes are not showing on clicking inspect tab.

4darsh-Dev commented 3 months ago

@Garima-149 got the issue, use innerHTML, not innerText becz you're inserting another element backToTopButton.innerHTML = '<i class="fa-solid fa-arrow-up"></i>'; Screenshot 2024-07-16 131616

4darsh-Dev commented 3 months ago

Some points.

  1. make changes in terms_of_use.js and privacy_policy.js as well.
  2. while creating PR πŸ‘πŸ» commit on changed files only, so no conflicts arise due to changes in settings.py and urls.py
Garima-149 commented 3 months ago

Screenshot (112)

@4darsh-Dev Please review the progressbar?

4darsh-Dev commented 3 months ago

@Garima-149 make it thinner, try with different color options, slightly darker as background is light.

Garima-149 commented 3 months ago

@4darsh-Dev IMG_20240716_233550.jpg

Is it good?

4darsh-Dev commented 3 months ago

@Garima-149 yes, much better. πŸ‘πŸ»

4darsh-Dev commented 3 months ago

Hey @Garima-149 ! Thank you so much for your raising the issueπŸ’— It’s all yours, you can come anytime again and make some contributions! πŸš€ Alone, we can do little, but together we can do so much! πŸ˜‡