Find a file
TLSM 344df24148
Fix comment self-upvote removal UI bug. (#236)
Fixes minor UI bug when removing self-upvote on a comment. Previous
behavior, starting from a new comment:
    - Initial state: score 1 from self-upvote, upvote button shows
      highlighted as `color: var(--primary)`.
    - Click on upvote button to remove self-upvote → button
      unhighlights, score displays as 0.
    - [reload page]
    - Score displays as 0, but button is highlighted.
    - Click on upvote button → button unhighlights, score displays
      as -1. [If you reload the page now, state is score 0 &
      highlighted; no change in serverside votes.]
    - Click on upvote again → button highlights, score displays as 0.
    - [reload page]
    - Score displays as 1, button is highlighted.
Direct cause is `templates/comments.html @ L115-117`. I checked
`api_comment`, though, and it adds a vote on new comments, and that
state change propagates to the template's parameters before it renders,
so I believe the only time this triggers is specifically when a user
has removed their self-upvote. Bug is fixed when testing with L115-117
removed. Is there some other edge case it was meant to solve?

Secondary bugfix: Removing a self-upvote _costs_ you a coin & a
truescore point. I think this is one of the few ways to get negative
dramacoin. I chose to fix it by having self-votes and self-unvotes not
change coins/truecoins. The alternative of having new comments & posts
give the user +1 coin/truecoin would modify site behavior, and you'd
retroactively owe some powerusers thousands of DC & truescore.
2022-05-02 20:12:28 +02:00
.github Delete codacy.yml 2022-02-27 07:41:20 -08:00
files Fix comment self-upvote removal UI bug. (#236) 2022-05-02 20:12:28 +02:00
.gitattributes fds 2021-11-02 13:33:36 -07:00
.gitignore fsd 2022-04-29 16:02:52 +02:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2022-01-31 15:29:51 -08:00
dependabot.yml fds 2021-11-02 13:33:36 -07:00
docker-compose.yml vc 2022-02-22 15:34:41 +02:00
Dockerfile Update Dockerfile 2022-03-01 16:14:08 -08:00
env site settings 2022-04-12 21:05:50 +02:00
imei.sh nxcv 2022-02-18 15:47:17 +02:00
LICENSE fds 2021-11-02 13:33:36 -07:00
pg_hba.conf 1 2021-11-26 21:28:55 +02:00
push.sh fdsfsd 2021-11-27 21:41:37 +02:00
pushforce.sh fdsfsd 2021-11-27 21:41:37 +02:00
readme.md fixes and additions (#230) 2022-04-24 15:22:12 +02:00
redis.conf fsdfsd 2021-12-05 21:45:08 +02:00
requirements.txt fixes and additions (#230) 2022-04-24 15:22:12 +02:00
schema.sql sneed 2022-04-29 16:00:02 +00:00
seed-db.sql sfd 2022-05-01 23:44:38 +02:00
site_settings.json sneed 2022-04-29 07:00:01 +00:00
snappy_PCM.txt gdfg 2022-03-31 18:28:53 +02:00
snappy_rDrama.txt sfd 2022-05-01 23:44:38 +02:00
supervisord.conf devrama 2022-04-04 19:52:14 +02:00
ubuntu_setup vcx 2022-04-25 17:48:36 +02:00

This code runs https://rdrama.net and https://pcmemes.net

Installation (Windows/Linux/MacOS)

1- Install Docker on your machine.

Docker installation

2 - If hosting on localhost and/or without HTTPS, change"SESSION_COOKIE_SECURE" in __main__.py to "False"

3- Run the following commands in the terminal:

git clone https://github.com/Aevann1/rDrama/

cd rDrama

docker-compose up

4- That's it! Visit localhost in your browser.

5- Optional: to change the domain from "localhost" to something else and configure the site settings, as well as integrate it with the external services the website uses, please edit the variables in the env file and then restart the docker container.