Commit Graph

125 Commits

Author SHA1 Message Date
Cinnamon 7dfd84b65e
Merge pull request #146 from christianbundy/no-strangers
No strangers
2020-02-03 21:55:27 -08:00
Christian Bundy 1099395dfa Merge branch 'master' of github.com:fraction/oasis into add-i18n 2020-02-03 21:51:59 -08:00
Christian Bundy 7f40a99799 Add 'Topics' page to show latest root posts
Problem: @masukomi pointed out that the 'latest' view doesn't show the
awesome slice of content that you'll see if you just look at root posts.

Solution: Let's experiment with them! This commit adds a 'Topics' page
that has the latest root posts from people you're following.
2020-02-02 16:54:37 -08:00
Christian Bundy c2ea8f7cb5 Hide strangers on popular+latest and hide blocked
Problem: We shouldn't be showing any strangers on the popular or latest
pages. We shouldn't be showing anyone who's been blocked on any of those
feeds.

Solution: Don't show blocked people on any pages and don't show
strangers on the popular / latest pages.
2020-02-02 16:37:49 -08:00
Christian Bundy d0e98b9663 Fix /image/ URL returning a broken image
Problem: I think during a refactor this code was changed and ended up
breaking the "fake image" that we return when the user doesn't have an
image. We also don't see image errors because they aren't in the browser
viewport if they return text and we don't `console.error()` our errors.

Solution: Fix the image code to return a PNG as a buffer and duplicate
errors to stderr.
2020-02-02 14:42:40 -08:00
Christian Bundy edf87a70df Persist language in cookies and fix fork drop-down
Problem: The previous commits didn't persist language choices and the
drop-down's initial value wasn't respecting the language you selected.

Solution: Persist the language choice in a cookie, defaulting to
English, and build the drop-down with the selected language. This also
changes the word "Spanish" to "Español", and slightly refactors
`http.js` to accept *middleware* rather than just routes. This lets us
add other middleware, such as the language selection middleware added in
this commit.
2020-02-02 09:31:43 -08:00
Christian Bundy 339fbdcf6a Add super basic language selection
Problem: The previous commit added English as a language but didn't add
other languages or ways to switch between them.

Solution: Add the most primitive language selection possible and a few
small translations contributed by @bramdroid during a totally unrelated
conversation. This does not persist the language selection and doesn't
auto-select the current language from the dropdown, but those should be
easy to add in the future.
2020-02-01 14:08:37 -08:00
Cinnamon 0c6a2458b8
Merge pull request #123 from christianbundy/following
Add basic following page
2020-01-31 15:32:01 -08:00
Christian Bundy 01701d5119 Fix SVG rendering by setting content-type
Problem: Most browsers parse SVG files as XML and refuse to display it
in an `<img>` tag. It's usually unsafe to have browsers try to sniff the
file type themselves, because they can be tricked into running unsafe
code, so we want to set the file type ourselves in the server.

Solution: Use the Is-SVG library for a quick-n-dirty check for whether a
buffer is an SVG. If so, we set the file type accordingly.
2020-01-31 15:04:13 -08:00
Christian Bundy ca2bc656f5 Add basic following page
Problem: We don't always want to see all of the messages on our
computer, sometimes we just want to see messages from the people we're
explicitly following. The 'Popular' and 'Latest' pages don't help with
that.

Solution: Add a super basic page that just shows the latest messages
from the people you're explicitly following.
2020-01-30 20:54:47 -08:00
Christian Bundy 53c1a1ad94 Hide private messages from author profiles
Problem: Showing private posts on profiles is scary and may give people
the impression that these posts are visible.
https://github.com/fraction/oasis/issues/113

Solution: Hide private messages when rendering public profiles and
change the method name to be very clear that it only returns public
messages.
2020-01-28 17:15:48 -08:00
Christian Bundy ec3e4d489a Merge branch 'master' of github.com:fraction/oasis into conn-buttons 2020-01-28 10:25:42 -08:00
Christian Bundy ae08e0715f Use capitalization for Oasis links and buttons
Problem: Using all-lowercase-everything isn't really a standard around
the web and it might be better to use consistent capitalization. This
was brought up in: https://github.com/fraction/oasis/issues/98

Solution: This changes the main navigation to use links with the first
letter capitalized, like how Patchwork + Twitter + Mastodon + etc do it.
This means that we're consistently using sentence case everywhere, which
I think is our best option. Originally I tried experimenting with
all-caps for actions, which I found aesthetically pleasing, but you have
to reduce the font size to make it look good (bad!) and I was reading
that all-caps text is harder for friends with dyslexia or vision
impairments.
2020-01-27 15:48:13 -08:00
Christian Bundy 681e3c6755 Add buttons to 'meta' page to manage networking
Problem: Sometimes you want to disconnect from the network but you don't
want to have to restart Oasis with the `--offline` flag
(https://github.com/fraction/oasis/issues/89). Sometimes networking gets
stuck and you need to run the equivalent of `ssb gossip reconnect`
(https://github.com/fraction/oasis/issues/63).

Solution: Buttons on the 'meta' page that let you start, stop, or
restart SSB-CONN whenever you want. Note that this commit includes an
update to SSB-CONN, but this version and the previous version both have
a bug where hitting 'stop' twice in a row will throw an error. This
commit implements a workaround for the bug, but it's something we'll
want to remove later once the underlying bug is fixed.
2020-01-26 16:55:48 -08:00
Christian Bundy abe802910f Update npm dependencies for new common-good
Problem: Common-Good had a bug in the Prettier glob where the recursion
wasn't working correctly. This meant that we weren't actually testing or
fixing some of the deeper files.

Solution: Update CG to the latest version and run `npm run fix` to fix
the linter stuff.
2020-01-23 14:36:25 -08:00
Cinnamon a963248ed3
Merge branch 'master' into meta-names 2020-01-23 12:03:16 -08:00
Christian Bundy 817bfaa7e0 Add prototype for names in peer list 2020-01-22 17:29:14 -08:00
Christian Bundy b34b04c2c2 Experiment with common-good module 2020-01-21 16:22:19 -08:00
Christian Bundy 4304178be6 Add follow and unfollow 2020-01-11 15:34:43 -08:00
Christian Bundy 2a6bcc993f Merge branch 'master' of github.com:fraction/oasis into mediator 2020-01-09 09:26:17 -08:00
Christian Bundy 9297b5f198 Separate SSB interface from model code 2020-01-09 09:04:46 -08:00
Christian Bundy 0bd3ae42a4 Move controllers into src/index 2020-01-08 13:56:52 -08:00
Christian Bundy 0622d97e96 Replace pages with single controller file 2020-01-08 12:38:47 -08:00
Christian Bundy ca29986131 Move shebang from cli.js to index.js 2020-01-08 12:04:43 -08:00
Christian Bundy 5f528588b1 Change src directory to use mediator pattern 2020-01-08 08:37:52 -08:00