Commit Graph

113 Commits

Author SHA1 Message Date
Matt Baer 7f96e8c384 Rename UserSuspended to UserSilenced
Some of the work needed to have the backend match user-facing wording.

Ref T661
2019-11-12 00:41:25 +09:00
Matt Baer c3f76a3ab8 Change "suspend" to "silence" where user-facing
This puts the verbiage more in line with what the feature does, and
leaves room for other moderation controls in the future.

NOTE: this includes no backend refactoring, which may be confusing. We
should rename things to fit ASAP.

Ref T661
2019-11-12 00:22:33 +09:00
Matt Baer 2c2ee0c00c Tweak "suspended" notification copy 2019-11-11 15:16:04 +09:00
Matt Baer 619b10c3e5 Fix "suspended" message location on Drafts
Previously it was above the header.

Ref T661
2019-11-07 17:10:17 +09:00
Matt Baer 280c32afdc Confirm suspension before submitting the form
This also includes a bit of explanation about what suspending a user
actually does.

Ref T661
2019-11-07 16:59:02 +09:00
Matt Baer c9f7219831 Move user status in list out of <a>
The link here is a little redundant, and might make people think that it
actually changes the status by clicking on it.
2019-11-07 16:49:52 +09:00
Matt Baer da7dcfee6a Move admin template IsSuspended logic into method
This adds a User.IsSuspended() method and uses it when displaying the
user's status on admin pages, instead of doing a magic number check.
This should also help in the future, in case this logic ever changes.

Ref T661
2019-11-07 14:07:00 +09:00
Rob Loranger f85f0751a3
address PR comments
- update error messages to be correct
- move suspended message into template and include for other pages
- check suspended status on all relevant pages and show message if
logged in user is suspended.
- fix possible nil pointer error
- remove changes to db schema files
- add version comment to migration
- add UserStatus type with UserActive and UserSuspended
- change database table to use status column instead of suspended
- update toggle suspended handler to be toggle status in prep for
possible future inclusion of further user statuses
2019-10-25 12:04:24 -07:00
Matt Baer 9873fc443f Merge branch 'develop' into T661-disable-accounts 2019-10-24 13:22:26 -04:00
Matt Baer c6564b3d16 Shorten invite-instructions.tmpl filename 2019-09-23 10:31:38 -04:00
Matt Baer ddce177784 Fix invite input box size in non-Firefox browsers
font-size-adjust is still a flag-enabled feature in Chrome 77, and
doesn't have widespread support across browsers. So instead this uses
font-size to make the text large enough.

Ref T690
2019-09-23 10:21:03 -04:00
Matt Baer 26a4f48e8b Add expiration information to invite help
This uses the Invite fetched from the database to explain a bit more
about how the invite URL expires. It also reduces some space around the
input box.

Ref T690
2019-09-23 10:06:12 -04:00
Matt Baer f01b439ff5 Tweak invite page title and intro
Ref T690
2019-09-23 10:02:36 -04:00
Matt Baer 7e9e3cb7eb Show status on logged-in expired invite links
Ref T690
2019-09-23 09:45:36 -04:00
Rob Loranger d954b7c8e3
add user invite instructions
this adds a new page with instructions for sharing user invites

if a user clicks the link for one of their own invite codes they are
directed to a page with clear instructions for it's use.

if a user clicks another users link they are redirectec to their account
settings witha flash telling them they do not need to register.
2019-09-13 10:58:17 -07:00
Matt Baer c7a90d2ace Fix blog post links when `chorus` enabled
This ensures the "new post" link under each blog on the user Blogs page
goes to /new instead of /.

Ref T681
2019-09-10 22:07:14 +02:00
Matt Baer 8ec25f1fb4 Fix pinning on chorus collection page
Previously, the new pinned post link would appear in the site header,
instead of the blog header.
2019-09-03 17:42:23 -04:00
Matt Baer 954e57897b Fix unpinning on chorus post page 2019-09-03 17:40:02 -04:00
Rob Loranger 77f7b4a522
Add account suspension features
This renders all requests for that user's posts, collections and related
ActivityPub endpoints with 404 responses.

While suspended, users may not create or edit posts or collections.

User status is listed in the admin user page

Admin view of user details shows status and now has a button to activate
or suspend a user.
2019-08-29 09:09:11 -07:00
Matt Baer 55808233fd Fix logic for showing sign up link
This prevents the link from showing when an instance lands on the sign
up page anyway.

Ref T681
2019-08-14 23:25:02 -04:00
Matt Baer 8a29a4dfc9 Link to home page in bare editor in chorus mode
Ref T681
2019-08-14 23:14:34 -04:00
Matt Baer 047ad0323b Don't show user pages in nav when unauth'd
Ref T681 T680
2019-08-09 14:58:43 -04:00
Matt Baer fda2929aed Show New Post button when Chorus, not SimpleNav
Ref T681
2019-08-09 13:59:55 -04:00
Matt Baer df56060f99 Add DisableDrafts option and adjust nav
This shows Drafts in the SimpleNav menu, when both enabled. It also
hides Drafts in the non-SimpleNav menu when disabled.

Ref T679
2019-08-09 13:53:41 -04:00
Matt Baer 9dc15f569c Move About nav link next to Home
Ref T681
2019-08-09 13:52:07 -04:00
Matt Baer da423fa1bc Move Reader to Home link in nav when chorus
Also, refactor navigation bar template logic to be simpler and easier to
understand.

Ref T681
2019-08-09 13:45:19 -04:00
Matt Baer 603839fda7 Add link to Posts in user backend pages when chorus
This provides easy navigation to the logged in user's posts, since
there's no direct link to their blog otherwise.

Ref T681
2019-08-09 12:04:55 -04:00
Matt Baer f821dbaac4 Support dedicated signup page in chorus mode
This adds a Sign Up link to site navigation and shows the
otherwise-landing page on /signup when in chorus mode.

Ref T681
2019-08-09 12:00:46 -04:00
Matt Baer 7b42efb9d9 Enable customizing Reader page
This makes it possible to edit the title and introductory text at the
top of the Reader view.

Ref T684
2019-08-09 11:16:38 -04:00
Matt Baer deec914ccb Merge branch 'develop' into chorus 2019-08-08 07:55:49 -04:00
Matt Baer 1c9438e305
Merge branch 'develop' into modestly-writefreely 2019-08-07 18:02:54 -04:00
Matt Baer adfcc82241
Merge pull request #148 from writeas/default-visibility
Support setting default blog visibility on instance

Resolves T675
2019-08-07 17:44:37 -04:00
Matt Baer de1a51d70d
Merge pull request #145 from writeas/fix-single-user
Fix single-user instance issues
2019-08-07 15:54:31 -04:00
Matt Baer f6dc07850b Fix pinned post URL on single-user instances
Previously, the URL of the dynamically-added pinned post on a
single-user instance would include the username, causing the link to go
to a non-existent page. This fixes that.
2019-08-07 15:47:49 -04:00
Matt Baer 3cc397ad76 Merge branch 'develop' into chorus 2019-08-07 10:58:34 -04:00
Matt Baer 1a80cd3c02 Add site-wide navigation on colls when chorus = true
This adds a new config value: `chorus` that signifies an instance is
more about the Reader view than individual blogs / writers. When
enabled, user navigation will show on all pages, including About,
Reader, and Privacy (ref T680).

It also uses different collection templates that keep the instance-wide
navigation at the top of the page, instead of the author's name --
again, branded more for the collective than the individual.

Ref T681
2019-08-07 09:00:16 -04:00
Matt Baer cd27a37027 Display current tag on Reader
i.e. current tag a user is browsing, when they are.
2019-08-06 10:42:43 -04:00
Matt Baer 17f7bc1bec Move user navigation to its own template section
Ref T681
2019-08-06 09:15:05 -04:00
Matt Baer 1d25784d20 Add `bare` editor option
This adds a new editor template that strips away most of the
customization features in the default editor and includes only:

- publishing
- editing
- viewing word count

It also restricts publishing to a user's first collection, so it's
optimized for instances that only allow users to have a single
collection and don't use Drafts.

Ref T680 T677
2019-08-05 09:54:05 -04:00
Matt Baer 90ad50c7f5 Use normal nav on user pages when SimpleNav
This shows About, Reader, Log out links on backend user pages when
logged in. It also adds "New post" buttons on the backend pages and
blogs.
2019-08-05 09:34:47 -04:00
Matt Baer 73ec3e3016 Support toning down WriteFreely promotion
This adds a new `wf_modesty` config option that removes the copious
mentions of WriteFreely in places like the About page and site
footers.

WriteFreely remains boastful and bumptious by default; but enabling
the modesty option will tone it down and likely lead to less confusion
among average users.

Ref T676
2019-07-31 22:53:10 -04:00
Matt Baer 569bc792d0 Enable changing default_visibility from Admin dash
Ref T675
2019-07-31 22:20:00 -04:00
Matt Baer a48b746706 Fix empty Drafts page for single-user instances
- This removes copy mentioning the Blogs page, which isn't used on
  single-user instances
- This fixes the "Start writing" link, which on a single-user instance
  would've gone to the blog index, rather than the editor
2019-07-22 14:47:39 -04:00
Matt Baer 3129b837f1 Hide footer links to About and Privacy pages when single-user
Previously, these links showed up on user backend pages on a single-user
instance, despite them not working / only being applicable on multi-user
instances.
2019-07-22 14:40:10 -04:00
Matt Baer bd4bb52b9c Hide Public blog option on single-user instances 2019-07-22 14:37:32 -04:00
Matt Baer f541f72224 Style collection 404 page like rest of blog
This displays the "page is missing" text within the same page as any
other blog post, keeping customizations, pinned pages, and general blog
navigation.

Ref T493
2019-07-21 15:15:52 -04:00
Matt Baer ad6fd5e809 Use "Draft" in post meta page
instead of "Anonymous".
2019-07-01 19:59:52 -04:00
Matt Baer 554995916e Replace top-left "w" button on post meta page
This was still a relic of Write.as. Now it has the same icon as the
WriteFreely editor.
2019-07-01 19:56:50 -04:00
Matt Baer 7aaff778da
Merge pull request #123 from writeas/private-instance
Private instances

Resolves T576
2019-07-01 19:14:20 -04:00
Matt Baer fdcdfe4d25 Open landing page preview in new window 2019-07-01 19:05:47 -04:00