Commit graph

25 commits

Author SHA1 Message Date
Matt Baer
803dd78df5 Remove Password field from OAuth signup page
This removes a bit of friction.

Ref T715 T712
2020-01-16 14:30:09 -05:00
Matt Baer
130c9eb747 Change Blog Title to Display Name in OAuth signup
Ref T712
2020-01-16 13:58:14 -05:00
Matt Baer
4d5c89e7ef Fix false login state on OAuth signup page
Having a `Username` field populated in the page data tells the base
template to display navigation that only a logged in user should see. So
this renames the field to `LoginUsername`, similar to our login.tmpl
page.

Ref T712
2020-01-16 13:37:44 -05:00
Matt Baer
33a6129d1e Add async username check on OAuth signup form
This checks the user's inputted username as they type it, and prevents
form submission if the name is taken.

Ref T712
2020-01-16 13:18:23 -05:00
Nick Gerakines
8ddfce4f19 oauth signup page changes per PR feedback. T712 2020-01-07 22:13:29 -05:00
Matt Baer
77e0126808 Move and restyle OAuth login links
- Move them above local login form
- Restyle as side-by-side buttons

Ref T712
2020-01-05 11:00:58 -05:00
Nick Gerakines
6429d495a2 Implemented /oauth/signup. T712 2020-01-03 13:50:21 -05:00
Nick Gerakines
b985292b18 First take at template updates. T712 2020-01-02 15:33:39 -05:00
Matt Baer
4419632f83 Fix false login state on failed login
Previously, a failed login would change the site-wide navigation so that
it looked like the user was logged in, even though they weren't. This
fixes that.
2019-09-03 17:56:27 -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
a72ce2ef29 Make landing page dynamic
This enables admins to customize their landing / home page via the Admin
dashboard -- including the text at the top of the page and the section
below it. It keeps the current default text, falling back to it if the
user hasn't overwritten it.

Ref T565
2019-06-27 17:06:37 -04:00
Matt Baer
aedb05080c Support ?landing=1 to always show landing page
This supports admins previewing changes to the landing page.

Ref T565
2019-06-27 16:38:24 -04:00
Matt Baer
238a913ce3 Make WriteFreely spacing consistent 2019-04-11 21:33:33 -04:00
Matt Baer
9cb0f80921 Support changing instance page titles
Now admins can choose a title for their About and Privacy pages; now
editable through the instance page editor.

This adds `title` and `content_type` fields to the `appcontent` table,
requiring a migration by running `writefreely --migrate`

The content_type field specifies that items we're currently storing in
this table are all "page"s; queries for fetching these have been updated
to filter for this type. In the future, this field will be used to
indicate when an item is a stylesheet (ref T563) or other supported
type.

Ref T566
2019-04-11 13:56:07 -04:00
Matt Baer
70e823d6ab Support user invites
This includes:

- A new `user_invites` config value that determines who can generate
  invite links
- A new page for generating invite links, with new user navigation link
- A new /invite/ path that allows anyone to sign up via unique invite
  link, even if registrations are closed
- Tracking who (of registered users) has been invited by whom

It requires an updated database with `writefreely --migrate` in order to
work.

This closes T556
2019-01-18 00:05:50 -05:00
Matt Baer
cb2b30b379 Show stats on About page if public_stats enabled
Previously, it would only show the stats if federation was enabled.
2018-12-03 18:49:12 -05:00
Matt Baer
77e79acd06 Include About/Privacy page content in page description 2018-11-21 15:04:47 -05:00
Matt Baer
be2c7ef86b Show instance stats on About page
This also moves the stats database logic out of nodeinfo.go and into
database.go.
2018-11-21 14:08:47 -05:00
Matt Baer
bdc4f270f8 Support editing About and Privacy pages from Admin panel
This allows admin to edit these pages from the web, using Markdown. It
also dynamically loads information on those pages now, and makes loading
`pages` templates a little easier to find in the code / more explicit.

It requires this new schema change:

CREATE TABLE IF NOT EXISTS `appcontent` (
  `id` varchar(36) NOT NULL,
  `content` mediumtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `updated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

This closes T533
2018-11-18 21:58:50 -05:00
Matt Baer
001fc8bb2d Fully support single-user mode
- New editor nav
- New backend nav
- Support for drafts
- Different footers on backend
2018-11-09 22:10:46 -05:00
Matt Baer
5614bb448a Show "closed registration" message on landing page 2018-11-09 19:55:07 -05:00
Matt Baer
2ea10939f2 Improve sign up
- Add server-side validation
- Normalize usernames
- Check username existence when signing up
- Tailor UI to whether federation is enabled or not
- Return user to form and show errors on sign up
2018-11-09 14:51:11 -05:00
Matt Baer
c5e7e35205 Update copy on default pages
- Removes more mentions of Write.as
- Adds a default privacy policy
- Improves the About page
2018-11-09 14:37:31 -05:00
Matt Baer
af872127c6 Add user-facing templates and pages 2018-11-08 01:13:00 -05:00
Matt Baer
a30fc5b52b Add handler, page, template loading 2018-11-07 23:50:50 -05:00