Commit graph

28 commits

Author SHA1 Message Date
Shadowfacts
e55382acd6
Use type=email for email input (#400)
So that mobile devices with software keyboards use the email keyboard
and turn off autocorrect/autocapitalization
2022-02-16 16:16:47 +01:00
Forest Johnson
6ed368cbeb
[feature] add authorization to the already-existing authentication (#365)
* add ensureUserIsAuthorizedOrRedirect to /oauth/authorize

* adding authorization (email confirm, account approve, etc) to TokenCheck

* revert un-needed changes to signin.go

* oops what happened here

* error css

* add account.SuspendedAt check

* remove redundant checks from oauth util Authed function

* wip tests

* tests passing

* stop stripping useful information from ErrAlreadyExists

* that feeling of scraping the dryer LINT off the screen

* oops I didn't mean to get rid of this NewTestRouter function

* make tests work with recorder

* re-add ConfigureTemplatesWithGin to handle template path err

Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
2022-02-07 12:04:31 +01:00
Forest Johnson
5be8a7a7ea
[bug] Send plaintext emails to fix "message refused: Message is not RFC 2822 compliant" (#366)
* trying to fix "message refused: Message is not RFC 2822 compliant"

* fix "message refused: Message is not RFC 2822 compliant"

550 5.7.1 Delivery not authorized, message refused: Message is not RFC
2822 compliant

* remove silly regex

* lint

* fix tests

* we should use text/template instead of html/template now
2022-01-31 11:46:20 +01:00
dependabot[bot]
664927ea58
Bump nanoid from 3.1.25 to 3.2.0 in /web/gotosocial-styling (#364)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.25 to 3.2.0.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.25...3.2.0)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-30 15:01:04 +01:00
tobi
2aaec82732
smtp + email confirmation (#285)
* add smtp configuration

* add email confirm + reset templates

* add email sender to testrig

* flesh out the email sender interface

* go fmt

* golint

* update from field with more clarity

* tidy up the email formatting

* fix tests

* add email sender to processor

* tidy client api processing a bit

* further tidying in fromClientAPI

* pin new account to user

* send msg to processor on new account creation

* generate confirm email uri

* remove emailer from account processor again

* add processCreateAccountFromClientAPI

* move emailer accountprocessor => userprocessor

* add email sender to user processor

* SendConfirmEmail function

* add noop email sender

* use noop email sender in tests

* only assemble message if callback is not nil

* use noop email sender if no smtp host is defined

* minify email html before sending

* fix wrong email address

* email confirm test

* fmt

* serve web hndler

* add email confirm handler

* init test log properly on testrig

* log emails that *would* have been sent

* go fmt ./...

* unexport confirm email handler

* updatedAt

* test confirm email function

* don't allow tokens older than 7 days

* change error message a bit

* add basic smtp docs

* add a few more snippets

* typo

* add email sender to outbox tests

* don't use dutch wikipedia link

* don't minify email html
2021-10-31 15:46:23 +01:00
tobi
27605f7c47
add new logo + credits (#277) 2021-10-13 13:19:10 +02:00
tobi
d515c9f1ec
Goreleaser (#241)
* add goreleaser tooling

* add files + hook

* update hooks

* allow passing build-dir using cli args

* build tweaks

* tweak more

* update drone and goreleaser

* chill out tests

* remove postgres

* docker push on snapshot

* update releaser
2021-09-24 13:14:20 +02:00
f0x
af884de8f9 fix viewport scaling for mobile 2021-09-13 17:39:29 +02:00
f0x52
8ab9108d3a
include Fork-Awesome files in-repo (#222) 2021-09-13 16:07:37 +02:00
f0x52
026674bc2c
Thread views on the web (#207)
* Webviews for status threads

* fix up templates

* add ForkAwesome and gotosocial-styling into repo

* clean up gotosocial-styling, old styling

* update CONTRIBUTING with new css building, and nodemon recommendation

* update Dockerfile with new css bundling

* those weren't supposed to make it in

* upgrade gotosocial-styling deps

* update authorize template with main wrapper

* update css pipeline

* abstract status from thread to avoid copy-pasting

* basic CW implementation

* fix PR review suggestions

* fix no-image-desc icon alignment

* remove template loading println

* remove println

* remove changes to testmodels

* reset changes to testmodels
2021-09-13 14:45:33 +02:00
f0x52
eef88ae31d
frontpage template tweaks (#99) 2021-07-13 18:40:47 +02:00
f0x52
f05b255511
Noescape (#88)
* disable html escaping for short description

* provide noescape function for templates

* move template functions before template loading

* go fmt

* linter fixes
2021-07-13 16:05:03 +02:00
f0x52
606ee5c615
Css button tweak (#93)
* css styling tweaks

* bundle

* apply styling to textarea as well

* bundle, whitespace

* generalize .button class styling

* bundle

* give .button a pointer cursor too

* bundle
2021-07-09 10:44:10 +02:00
f0x52
2cebac592f
Css input/select styling tweak (#91)
* css styling tweaks

* bundle

* apply styling to textarea as well

* bundle, whitespace
2021-07-08 18:00:23 +02:00
Tobi Smethurst
05e62479c8
undo template no escape (#87) 2021-07-08 15:11:10 +02:00
f0x52
fd0714cfde
disable html escaping for short description (#84) 2021-07-08 14:57:37 +02:00
Tobi Smethurst
cf19aaf0df
Fix 404 contact (#74)
* Fix a little bug in the contact href on 404
2021-06-28 13:52:03 +02:00
Tobi Smethurst
4f3b3f5c0b
put version in binary properly (#73)
Addresses #71 :

    Set version on the CLI framework.
    Add a build.sh script that injects variables into the build tooling using git and a version file.
    Set version in config.
2021-06-28 12:17:20 +02:00
Tobi Smethurst
8c9a853343
Instance settings updates (#59)
Allow admins to set instance settings through a PATCH to /api/v1/instance

Update templates to reflect some of the new fields
2021-06-23 16:35:57 +02:00
f0x52
fd57cca437
Opengraph meta tags (#55)
* add favicon

* add opengraph tags with title and description
2021-06-21 21:09:06 +02:00
f0x52
5a2f3b35ba
add 404 handler (#57) 2021-06-21 21:08:02 +02:00
f0x52
eaeceb1c67
add favicon (#54) 2021-06-21 21:06:47 +02:00
f0x52
f9bc305aca
new styling for frontpage, update login and authorize templates (#46)
* new styling for frontpage, update login and authorize templates

* run go fmt

* add AssetBaseDir to command flag parsing

* untested: move landing page to it's own router

* go fmt, fix typo

* fix package, adapt to proper Route structure
2021-06-21 19:46:10 +02:00
Tobi Smethurst
aa9ce272dc
Oauth/token (#7)
* add host and protocol options

* some fiddling

* tidying up and comments

* tick off /oauth/token

* tidying a bit

* tidying

* go mod tidy

* allow attaching middleware to server

* add middleware

* more user friendly

* add comments

* comments

* store account + app

* tidying

* lots of restructuring

* lint + tidy
2021-03-22 22:26:54 +01:00
tsmethurst
d0e6625d6e tidying up 2021-03-20 19:06:28 +01:00
tsmethurst
1b11884121 auth flow working for code 2021-03-18 23:27:43 +01:00
tsmethurst
18d0685ef1 further fun 2021-03-03 21:15:20 +01:00
tsmethurst
fbf52fe84b messing around a bit 2021-02-27 22:57:50 +01:00