Commit Graph

852 Commits

Author SHA1 Message Date
dougmellon
b707e2b9bb Remove aria-label from divs
This is a recommendation from the W3C validator: "Don't use aria-label
or aria-labelledby on a span or div unless its given a role."
2020-04-07 15:06:27 -06:00
Deimos
f2c0b68f78 Monitoring server: add blackbox exporter
This is a prometheus exporter that allows checking IPv4 and IPv6
responses, among other things. This sets it up to make sure that the
site is responding over both IPv4 and IPv6, so that I can monitor and
set up an alert if either stops working.
2020-04-03 17:49:20 -06:00
Deimos
284c3cfd8d Treat scheduled-topic title/markdown as Jinja
This probably isn't particularly safe, but it's fine since I'm the only
one that can create or edit scheduled topics for now. The only available
variable so far is current_time_utc.
2020-03-25 16:32:01 -06:00
Timo
f0305bc0cd Show donation meter on financials page 2020-03-23 17:35:17 -06:00
Deimos
a0d62be6cb Fix more minor styling issues with header views 2020-03-21 11:04:17 -06:00
Deimos
2c6967b3da Fix alignment of "segmented" subgroup header links 2020-03-20 18:16:39 -06:00
Deimos
4dedcf1716 Add more space between groups on the group listing 2020-03-19 17:42:28 -06:00
Deimos
3903c6f6de Refactor site header HTML/CSS away from flexbox
I don't like this as much, but it works better to be able to wrap the
coronavirus views bar underneath the logo on small screens.
2020-03-19 16:55:25 -06:00
Deimos
dbaf4c61e2 Stop specialized views breaking on thin screens
This isn't great, but at least it won't be as broken as it was before.
I'll try to follow this up with a better improvement soon.
2020-03-19 11:59:56 -06:00
Deimos
fea2884343 Move coronavirus views into header
This is a little awkward on mobile, but it doesn't take up any more
vertical space than the previous version did, and is much better on
desktop.
2020-03-18 19:43:07 -06:00
Deimos
0ea9d81a6b Add id to bar with coronavirus views
To make it easier for people to hide using local CSS, uBlock element
filtering, etc.
2020-03-18 15:42:29 -06:00
Deimos
3f1decb243 Add global autocomplete tags
This is kind of hacky again (and shouldn't contain the coronavirus tag
over the long term), but makes sure that the "spoiler", "nsfw", and
"coronaviruses.covid19" tags are always offered as autocomplete options,
no matter how common they are in the topic's group.
2020-03-17 17:05:42 -06:00
Deimos
355dd9d334 TEMP: Add some hacky coronavirus "views"
This adds two links at the top of the home page that go to different
"views" - one includes only topics related to the coronavirus, while the
other filters out all coronavirus topics.

For the purposes of these views, a "coronavirus topic" is one that is
either in the ~health.coronavirus group, or has coronaviruses.covid19
tag.

This is very hacky and will only work on the main tildes.net site due to
hardcoded group name and tag. I'm okay with that.
2020-03-17 16:28:59 -06:00
Deimos
1c739d9736 Update groups page layout + show activity stats
This replaces the groups page with a new list style that doesn't include
the ability to subscribe/unsubscribe directly on the page, and also
shows approximate activity statistics (daily topics/comments) for each
group.
2020-03-12 18:25:31 -06:00
Deimos
7d1c3297fb Add group_stats table, track daily topics/comments
This adds a group_stats table and cronjob that will insert the previous
day's stats into it each day just after 00:00 UTC.
2020-03-09 17:57:43 -06:00
Deimos
01752141fc Salt: set overall server timezone to UTC 2020-03-05 20:55:12 -07:00
Deimos
c8f8697767 Fix autocomplete chip X "ends with" conflicts
Let's try this again without the regex.

Clicking the X button in an autocomplete chip could inadvertently remove
the wrong tag (and cause a weird "merging" behavior) if another tag
ended with the same text as the one being removed. For example, if a
post had both "one.two" and "two" tags and you clicked the X button on
the "two".
2020-03-05 14:13:11 -07:00
Deimos
6e610be349 Revert "Fix autocomplete chip X "ends with" conflicts"
This reverts commit 83ce08248d.
2020-03-05 01:03:50 -07:00
Deimos
83ce08248d Fix autocomplete chip X "ends with" conflicts
Clicking the X button in an autocomplete chip could inadvertently remove
the wrong tag (and cause a weird "merging" behavior) if another tag
ended with the same text as the one being removed. For example, if a
post had both "one.two" and "two" tags and you clicked the X button on
the "two".
2020-03-04 17:56:15 -07:00
Deimos
c5492cf4ed Minor updates to Financials and donation goal
Just a couple relatively minor updates to the financial stuff:

* Removed the "is_approximate" column on the table and just added a more
  general note about most of the amounts being approximate. It was more
  annoying to worry about than meaningful.
* Some style/layout/wording tweaks to the donation goal to try to make
  it a little more obvious that this is a long-term sustainability goal.
2020-03-04 17:09:34 -07:00
Deimos
3f6bd60281 Fix comment labeling permission check 2020-03-02 15:44:03 -07:00
Deimos
13d7e97e4c Fix some comments from permissions rework
Whoops, forgot to squash this in before pushing.
2020-03-02 15:44:03 -07:00
Deimos
94b9e1bf10 Rework permissions/ACL system
This is a major rework of the permissions system to enable various new
capabilities and clean up some of the oddities that were there.
Highlights:

- The concept of "admin" permission is removed. All permissions must be
  granted individually.
- Permissions can now be granted on a group-specific level, such as
  giving a user the ability to tag topics only in a specific group.
- Permissions can also be denied for a specific group (or all groups),
  enabling uses like "tag topics in all groups except ~music".
- Removed the two cases where "all permissions" were granted: users on
  themselves and the sender and recipient on messages. This was
  dangerous, we should always grant permissions explicitly.
- Eliminated all the granular permissions for changing a user's settings
  (which were all granted implicitly), and replaced with an overall
  "change_settings" permission.
2020-02-29 15:22:06 -07:00
Deimos
9ab70c440c Update cleanup script for new permissions table 2020-02-29 14:45:41 -07:00
Deimos
62b0adc983 Move user permissions into their own table
This is a bit of an odd commit: it adds a user_permissions table that
has capabilities that are not yet usable. Specifically, the table allows
setting DENY permissions as well as restricting permissions to an
individual group, but neither of those work yet. I want to make sure
that the existing, limited permission system seems to transfer over
properly before adding the additional complexity for those.

The Alembic data migrations for this commit is fairly ugly, but seem to
work okay.
2020-02-27 19:20:30 -07:00
Deimos
2532df018c Strip trailing periods from topic titles
Note that this will also prevent a title from ending with "...". I did a
search for all titles that ended in that, and none of them seemed
essential (and probably should have been removed), so I think this
should be fine.
2020-02-26 15:08:56 -07:00
Bauke
2c7572016d Add setting to choose default comment sort order 2020-02-20 14:32:21 -07:00
Deimos
89c7c13be2 Reload gunicorn when site-icons CSS updates
This starts using webassets for the site-icons.css file inside the base
template so that a cache-busting "version" string is added after the
filename as a query variable (as was already being done with the other
CSS and JS files).

It also creates a new service that's triggered by a "path changed" event
on site-icons.css, which causes gunicorn to reload. This should mean
that whenever the site-icons.css file is updated by the cronjob that
generates it, gunicorn will automatically reload and update the
cache-busting string for the CSS file, causing users' browsers to update
to the newest version.
2020-02-12 21:23:30 -07:00
Deimos
4dc99d9fda Vagrantfile: pin Salt version to 2019.2.3
The new version of Salt ("3000") seems to have a number of bugs,
including not being able to handle "unless" checks, which the Tildes
states use frequently. Because of this, creating a new dev environment
currently doesn't work. This pins Salt to the previous stable version
for now.

Here's the relevant bug for "unless" specifically:
https://github.com/saltstack/salt/issues/56131

And the overall release notes:
https://docs.saltstack.com/en/latest/topics/releases/3000.html
2020-02-12 21:03:45 -07:00
Deimos
97e8d756df Improve wrapping of content metadata for topics 2020-02-10 18:43:48 -07:00
Deimos
4371f9cef6 Don't show View Markdown for logged-out users 2020-02-10 18:23:39 -07:00
Deimos
2724dc9a98 Add SiteInfo entries for more common sites 2020-02-10 18:07:01 -07:00
Deimos
c63e6e0fd2 Move "More" button on comments left of Reply
I'm not sure about this, but want to try it. I like Reply being the last
button.
2020-02-10 14:04:16 -07:00
Deimos
d0e23ef1b5 Remove leftover extra margins on footer links 2020-02-10 11:27:49 -07:00
Deimos
3b62d2adf7 Improve centering/spacing/wrapping of footer links 2020-02-09 16:40:52 -07:00
Deimos
eee2f2a03c Move <li> tag out of post_action_toggle_button 2020-02-09 16:21:32 -07:00
Deimos
a4b52086bd Add space between logo and "context" on mobile 2020-02-09 15:08:29 -07:00
Bauke
6b3ae4e3c5 Add more places to open user and group links in new tabs 2020-02-09 14:52:43 -07:00
Bauke
f96e9ecc65 Toggle the set default theme button on page load 2020-02-09 14:30:27 -07:00
Deimos
c3c3a073d2 Hide "View Markdown" when user can edit the post
If a user can edit a post, they don't need the ability to view the
markdown separately, so the button doesn't need to be shown in those
cases. I'm not sure if this should be a separate permission defined
inside the ACL or not.
2020-02-09 13:47:02 -07:00
Bauke
0ad36ac143 Add a View Markdown option for topics and comments 2020-02-09 13:45:56 -07:00
Deimos
5b49ef6991 2FA settings: add note about generating new codes 2020-02-09 13:10:43 -07:00
Deimos
06ec67c144 Shorten topic re-visit "grace period" to 30 sec 2020-02-07 11:48:41 -07:00
Deimos
6462991b2e Fix missing "with context" in messages template 2020-02-06 21:34:42 -07:00
Bauke
accb39df8e Add settings to open group and user links in new tab 2020-02-06 18:25:16 -07:00
Bauke
7a4ca23b5a Add the post new topic button to group searches 2020-02-06 15:03:59 -07:00
Alexander Bliskovsky
d75a6fc547 Add detection for IP addresses in the domain parser 2020-02-05 16:23:55 -07:00
Cassidy Dingenskirchen
dccf3df4db Add query parameters for auto-filling PM content 2020-02-05 14:52:10 -07:00
Bauke
589918401a Add a way to view your 2FA backup codes 2020-02-04 15:52:35 -07:00
Deimos
94460790db Update pypi package versions (requirements.txt) 2020-02-03 18:13:08 -07:00