Commit graph

7750 commits

Author SHA1 Message Date
Julian Rota
21c99261e6 Remove polls from help page HTML 2022-08-19 03:16:46 -05:00
TLSM
d005bd6237 Fix desktop header dropdown menu clipping off page.
The width of the account menu dropdown header is determined by the
length of one's username. Users with short names cause the dropdown
menu to partially clip off the right side of the page, which is
unsightly and impedes usage thereof. This commit enforces a minimum
width to prevent that.

Alternate approaches such as right-aligning the dropdown proved
unwieldy with CSS when fixing this same bug on the upstream.
2022-08-17 14:03:11 -05:00
TLSM
a95f47339d
Cachebust main.css. 2022-08-17 01:55:44 -04:00
TLSM
f1983da8d4
Fix long domains overflowing post-meta (#182).
In submissions and submission_listings, long domains would overflow
the container and generally break everything. Fixed in the template
by truncating the outputted text length and in the frontend by
enforcing a maximum width on the element.
2022-08-17 01:52:38 -04:00
TLSM
4cfd1d5a5b
Fix 2FA modal not displaying in UI (#178). (#180)
Fixes issue #178. Root cause was attempting to document.getElementById
of both modal and toggle input before both were loaded into the DOM.
In the upstream, Cloudflare's Rocket Loader is used, which papers over
many cases of inattention to loading order.
2022-08-16 22:38:19 -05:00
painejohn
defe23ea16
Update comment reply css + clear preview as well (#158)
This basically extends the CSS changes from
https://github.com/themotte/rDrama/pull/150 to also cover comment
_replies_ and then updates the JS from
https://github.com/themotte/rDrama/pull/153 to also reset the comment
reply preview div back to default after posting the comment reply.
2022-08-10 06:04:54 -05:00
Michael House
b5b1f79394
Merge pull request #155 from zorbathut/pr_deussy
Remove culture-warrish instances of `ussy` and `igger`.
2022-08-07 11:11:32 -05:00
Michael House
8570b92d3d
Merge pull request #156 from zorbathut/pr_examplecull
Remove obsolete formatting help.
2022-08-07 08:02:19 -05:00
Ben Rog-Wilhelm
da19c8cb11 Remove marquee support from the formatting, because, uh, no. 2022-08-07 02:28:35 -05:00
Ben Rog-Wilhelm
d377889a13 Remove obsolete formatting help. 2022-08-07 02:26:59 -05:00
Ben Rog-Wilhelm
d844b6c340 Remove culture-warrish instances of ussy and igger. 2022-08-07 02:09:05 -05:00
painejohn
cbcc2aac6f
139: Disabled multimedia embedding
This change disables multimedia embedding:

- In comments and comments replies.
- In new submissions.
- In comment & submission preview

And it's all toggle-able via an envvar, except for the JS bits,
but I linked those to the github issue, so should be easy to find
in the future.

The way it works is:

- removes markdown image/video syntax,
  eg. `![](https://example.org/someimage.jpg)` into ``
- changes link text into anchors, eg.
  `https://example.org/someimage.jpg` into
  `[https://example.org/someimage.jpg](https://example.org/someimage.jpg)`
- removes html img/video/audio tags, eg.
  `<img href="https://example.org/someimage.jpg" />` into ``
- when embedding gifs via the giphy modal in "new submission", it will
  insert only an anchor to the gif
- when attaching an image, it will upload the image, then add only an
  anchor to the post/comment body

I tested this manually, but not sure if I got all the test cases. What I
checked was:

- create comment w/ image/video/audio media using markdown -> success
- create comment reply w/ image/video/audio media using markdown ->
  success
- create comment w/ link to img/imgur/youtube/audio -> success
- create comment w/ attachment -> success
- create comment reply w/ attachment -> success
- create comment w/ img/video tag -> success
- create comment reply w/ image/video tag -> success
- create post submission w/ image/video/media using markdown -> success
- create post submission w/ link to img/imgur/youtube/audio -> success
- create post submission w/ attachment -> success
- create post submission w/ giphy gif -> success

Also, updated the formatting page.

Co-authored-by: Ben Rog-Wilhelm <zorba-github@pavlovian.net>
2022-08-07 01:30:47 -05:00
painejohn
8463a9ebbe
135 - Posting a comment clears out comment textarea & preview 2022-08-07 01:17:46 -05:00
Michael House
10b5823721
Merge branch 'frost' into pr_sitename 2022-08-01 15:21:56 -05:00
painejohn
19385b249f 141 - Comment preview is obviously a preview
This PR reworks the comment preview to include a border and initial
message identifying it as "Comment preview". It also bumps all the
TheMotte.css versions from 56 to 57.
2022-08-01 14:39:03 -05:00
Ben Rog-Wilhelm
800ae8d2dc Split SITE_NAME into computer-readable SITE_ID and human-readable SITE_TITLE. 2022-07-31 18:53:18 -05:00
Julian Rota
96563c6d35 Add check for user existing 2022-07-31 16:58:01 -05:00
Ben Rog-Wilhelm
7393013f60 Fix ACX link. 2022-07-29 14:32:27 -05:00
Ben Rog-Wilhelm
7b4a4f21d0 Update sidebar. 2022-07-29 14:30:06 -05:00
Ben Rog-Wilhelm
2948d66a81 Remove the site name from the OpenGraph description. 2022-07-29 10:02:29 -05:00
painejohn
0e165e17c0 Fixes #110 "Signout doesn't always work"
I tried reproducing the issues from #110 but without luck. The
workflow looks a little like this:

- User changes their avatar.
    - This triggers a POST request to the profile endpoint.
- User clicks "Log out" from the dropdown menu"
    - This triggers the post_toast function in js that makes a POST to
      /logout, which clears the user's session. Then, on receipt of the
      response, the js calls `location.reload`, which replays the
      browser's last action, which in our case is the earlier POST
      request to the profile endpoint. This is why the browser asks
      whether it's OK to resubmit the data _again_. Agreeing resubmits
      the first POST request.
    - After `location.reload`, since the user is no longer logged in,
      they either get a 405 (from the profile edit page) or a 500 (from
      the profile overview page).

This PR then changes the `/logout` endpoint from POST to GET, then
updates the header template to change the "Log out" anchor to simply
link to "/logout" instead of calling any js.

Reasoning behind it:
- logout doesn't modify server-side resources, so it's safe to make it a
  GET request.
- Making it a GET prevents the browser from ever displaying the "data
  resubmit" warning window.
- The "/logout" endpoint can now simply redirect to the homepage.
2022-07-29 06:47:19 -05:00
JulianRota
f495981a5e
Merge pull request #122 from zorbathut/pr_fixvote
Fix voting.
2022-07-26 23:19:33 -04:00
JulianRota
7c86c88c68
Merge pull request #121 from zorbathut/pr_hidevotes
Hide vote details from non-admins.
2022-07-26 23:16:08 -04:00
Ben Rog-Wilhelm
5023ca8ada Fix: Upvoted/Downvoted link visibility was based on the viewee, not the viewer. 2022-07-24 06:01:16 -05:00
Ben Rog-Wilhelm
e28a486da9 Update annoying magic numbers. 2022-07-24 05:52:31 -05:00
Ben Rog-Wilhelm
6aedb62cd9
Replace formatting examples with less, uh, culturally specific examples. 2022-07-23 12:38:47 -05:00
Ben Rog-Wilhelm
19e9c1a20e Hide vote details from non-admins.
It is intentional that the links show up on admin level 2 but aren't usable until admin level 3; I don't know what I want right now and I want to encourage admins to pester me about it.
2022-07-23 03:04:43 -05:00
Julian Rota
81610b803a Support settings for integers and allow setting filter settings in UI 2022-07-09 06:33:41 -05:00
Julian Rota
bd5fd8fb21 Switch over comment reporting to use the new system 2022-07-09 06:33:41 -05:00
Julian Rota
a0488f2b23 UI to allow update of comment filter status 2022-07-09 06:33:41 -05:00
Julian Rota
4b0c4fcc73 Add page for filtered comments 2022-07-09 06:33:41 -05:00
Julian Rota
f736d660b6 Filter on other pages as well 2022-07-09 06:33:41 -05:00
Julian Rota
ba9689f017 Working on hiding filtered comments 2022-07-09 06:33:41 -05:00
Julian Rota
962a46ad83 Add new settings for comment filtering 2022-07-09 06:33:41 -05:00
Julian Rota
ccc4dd485f Fix comment voting 2022-07-09 06:33:41 -05:00
Ben Rog-Wilhelm
8fbac9cc23 Change the JS email regex to match our internal one. 2022-07-03 10:13:59 -05:00
Michael House
db185a9ef2
Fixed reply-twice bug on submission page. 2022-06-29 00:25:11 -05:00
Michael House
9fef790629 Added caching to /@username/pic endpoint, other small fixes 2022-06-09 05:36:45 -05:00
Julian Rota
1e0aa4ee22 Merge branch 'frost' into new-user-filtering 2022-06-06 14:56:28 -04:00
Ben Rog-Wilhelm
12b790dfd7
Merge pull request #107 from themotte/fix_unrendered_html_entities
Fix unrendered html entities
2022-06-06 01:58:42 -05:00
Michael House
1f6671ab55 Fixed desktop top menu bar icons 2022-06-05 17:14:29 -05:00
Michael House
e7c7fba0ad Fixed 404 on random user button and changed icons 2022-06-05 17:02:34 -05:00
Michael House
2e7f34608c Replaced pseudo-input field on frontpage with a button for creating a post 2022-06-05 16:44:56 -05:00
Michael House
03aa2ca48e Added spoiler extension to the marked.js markdown preview 2022-06-05 15:56:11 -05:00
Michael House
bce168c295 Added purify for html sanitization 2022-06-05 10:58:17 -05:00
Michael House
bce836bf81 First stab at resolving html entities not being rendered 2022-06-05 10:37:09 -05:00
Michael House
f3f2aa3935 Made a lot of small changes in the frontend 2022-06-04 07:48:26 -05:00
Michael House
0d489d9dd7 Fixed issue with empty-comment-section message staying after reply is submitted 2022-06-03 07:07:27 -05:00
Michael House
058e50add7 Added new default text and default link thumbnails, color fixes for some buttons 2022-06-03 06:36:03 -05:00
Michael House
2e1c102438 Fixed colors on posts 2022-06-02 20:51:09 -05:00