Commit graph

158 commits

Author SHA1 Message Date
Vincent Ambo
871093a973 feat(db): Update views with thread-closed field 2018-05-27 15:00:41 +02:00
Vincent Ambo
468af132e8 feat(db): Add migration & fields to indicate a thread is closed 2018-05-27 15:00:41 +02:00
Vincent Ambo
33462c01fa chore(cargo): Remove dependency on Tera 2018-05-22 20:44:49 +02:00
Vincent Ambo
dbc082b3ee chore: Remove Tera usage in all modules 2018-05-22 20:44:49 +02:00
Vincent Ambo
4747bacfe9 refactor(templates): Move search result template to Askama 2018-05-22 20:44:49 +02:00
Vincent Ambo
2bbcced032 refactor(templates): Move post editing template to Askama 2018-05-22 20:44:49 +02:00
Vincent Ambo
69583b1236 refactor(templates): Move thread page template to Askama 2018-05-22 20:44:49 +02:00
Vincent Ambo
94d5e02bb3 chore(cargo): Add dependency on Askama 2018-05-22 20:44:49 +02:00
Vincent Ambo
f5badb97d3 refactor(templates): Use Askama for index template 2018-05-22 20:44:49 +02:00
Vincent Ambo
d90dc2d77f fix(templates): Fix layout of user info on desktop view 2018-05-22 10:37:31 +02:00
Vincent Ambo
ff697ff792 feat(templates): Add new MDL-themed search result view 2018-05-22 09:45:11 +02:00
Vincent Ambo
ef15752b59 chore(build): Don't run Travis build in containers
According to a Github thread[1] this causes a significant speedup.

[1]: https://github.com/travis-ci/travis-ci/issues/6604#issuecomment-357486807
2018-05-22 09:45:11 +02:00
Vincent Ambo
fb9ea437e9 feat(templates): Add new thread view with MDL design 2018-05-22 09:45:11 +02:00
Vincent Ambo
0bfc8fbf8b fix(static): Attach thread index divider to correct element 2018-05-22 09:45:11 +02:00
Vincent Ambo
fa32b9f700 fix(static): Set monospaced fonts appropriately
I'm not web enough to make the `not`-selector thing work.
2018-05-22 09:45:11 +02:00
Vincent Ambo
92591142bd fix(static): Fix non-display of material icons 2018-05-22 09:45:11 +02:00
Vincent Ambo
dbd207c452 feat(templates): Add new MDL-based post editing page 2018-05-22 09:45:11 +02:00
Vincent Ambo
0febe676b2 fix(static): Let monospaced fonts be monospaced. 2018-05-22 09:45:11 +02:00
Vincent Ambo
eaf1c46ba8 feat(templates): Add new MDL based index page 2018-05-22 09:45:11 +02:00
Vincent Ambo
d0d3777eaa fix(gitattributes): Fix generated derivation file name 2018-05-19 00:53:08 +02:00
Vincent Ambo
157029fc56 chore(build): Bump dependencies requires for mime-packages 2018-05-19 00:52:21 +02:00
Vincent Ambo
98f9c5dd94 refactor(handlers): Embed static files into binary 2018-05-19 00:52:21 +02:00
Vincent Ambo
cda66c4cd3 feat(templates): Add syntax highlighting for code via highlight.js
Includes a static distribution of highlight.js for syntax
highlighting. A sane set of languages has been chosen.
2018-05-19 00:52:21 +02:00
Vincent Ambo
ab3f7d888a chore(cargo): Bump actix-web to >0.6 2018-05-18 22:28:55 +02:00
Vincent Ambo
02542317ea fix(build): Split Cargo.nix into separate file 2018-05-18 22:28:51 +02:00
Vincent Ambo
5371e1dcd5 chore(build): Bump dependencies & pin pq-sys 2018-05-18 21:43:04 +02:00
Vincent Ambo
831f5c5abd docs: Add contribution guidelines document
This document is intended to provide some information about how to
contribute to the project, from basic sanity checks and code quality
to information about how to structure git commits.

These are the most common things that I encounter in pull requests
sent to my projects.
2018-05-15 11:09:47 +02:00
Vincent Ambo
06f21643dd docs(build): Document manual changes to Carnix expression 2018-05-02 00:33:46 +02:00
Vincent Ambo
c07b1be3be fix(build): Apply a workaround for building Comrak in Nix
Carnix can not be configured to not build a dependency's
binaries (even if relevant features are disabled), but Comrak's binary
can by default not be built in Carnix because it attempts to read a
Cargo-provided environment variable at compile time.

This works around the issue by "faking" the environment variable,
which is less than ideal but works.
2018-05-02 00:33:46 +02:00
Vincent Ambo
40fb4ebbb9 refactor(handlers/render): Use users from database for all functions
Converse now sets the user ID as the session identity parameter in
actix_web's identity middleware after a successful login and uses the
ID to determine identity when creating threads & posts and when
validating edit permissions.
2018-05-02 00:33:46 +02:00
Vincent Ambo
6d69f5001e refactor(main): Use actix-web's identity middleware for auth 2018-05-02 00:33:46 +02:00
Vincent Ambo
095293e8e3 feat(db): Add LookupOrCreateUser message
Adds a message to look up a user in the database based on their email
address. If the user does not exist, it is created.
2018-05-02 00:33:46 +02:00
Vincent Ambo
1e57b879fb chore(cargo): Update dependency minor versions 2018-05-02 00:33:46 +02:00
Vincent Ambo
9b1f6d3628 refactor(db/render/schema): Use SimplePost type for thread views
This uses the simplified view for querying posts instead of the post
table directly to display posts.
2018-05-02 00:33:46 +02:00
Vincent Ambo
9d5830e9a7 feat(migrations): Add a view for simplified post querying
Adds a view to avoid having to query and join the users & posts table
inside of the application (which isn't particularly convenient in Diesel).
2018-05-02 00:33:46 +02:00
Vincent Ambo
7a17d532c4 fix(schema): Update for author->user_id column rename 2018-05-02 00:33:46 +02:00
Vincent Ambo
a45da31abc refactor(migrations): Rename 'author' column to 'user_id'
This makes it easier to integrate with Diesel, for which this is the
expected column name.
2018-05-02 00:33:46 +02:00
Vincent Ambo
a324a89fd0 chore(schema): Update generated Diesel schema
Updates the generated schema with the new users table.

This commit will break the build.
2018-05-02 00:33:46 +02:00
Vincent Ambo
1d9ff8b4c8 fix(migrations): Explicitly insert anonymous user
This guarantees that the anonymous user will always exist and have
ID=1.
2018-05-02 00:33:46 +02:00
Vincent Ambo
02c15f06d6 fix(migrations): Fix search index creation in user migration 2018-05-02 00:33:46 +02:00
Vincent Ambo
2159c76ca7 feat(migrations): Adds a migration to create a users table
As a first step of getting the concept of users into the database,
this creates a (somewhat involved) migration that moves all existing
"users" into a new users table and updates the post table to reference
it.

This migration is not yet finalised and still needs to be updated with
something to handle the concept of anonymous users (which I want to
keep around).
2018-05-02 00:33:46 +02:00
Vincent Ambo
0d23a04daf chore(gitattributes): Tell Github Linguist to ignore default.nix
The `default.nix` in this repository contains generated code and skews
Github's language statistics. While I'm a big fan of Nix, Converse is
certainly not 80% written in Nix ;-)
2018-04-24 16:04:12 +02:00
Vincent Ambo
9adacf8696 fix(build): Add explicit pulldown-cmark dependency
There is some weird dependency interaction between pulldown-cmark and
getopts which causes builds to fail with a message about unstable
features if getopts is not explicitly depended on as a dependency of a
dependency (yeah, huh?)
2018-04-23 22:09:37 +02:00
Vincent Ambo
0f6f5aeb4c refactor(build): Use Carnix-based expression for building
This is probably going to break Github's language statistics ...
2018-04-23 22:09:37 +02:00
Vincent Ambo
9dc1143b14 chore(cargo): Bump dependency minor versions 2018-04-23 22:09:37 +02:00
Vincent Ambo
93d6c7bbd1 chore(license): Relicense under AGPL-3.0-or-later
Relicense the project from the standard GPL3 to the Affero version of
the license, requiring source code disclosure for modifications made
on instances of Converse that are serving users over the network.
2018-04-17 14:47:36 +02:00
Vincent Ambo
1427220f9d style(thread): Fix padding on thread view
Removing this padding lets the author column render evenly sized.
2018-04-16 20:17:15 +02:00
Vincent Ambo
37331d9107 fix(thread): Load Gravatar images at larger size
This makes them look nicer in 2x situations (e.g. retina displays) and
when a user zooms in.
2018-04-16 16:48:42 +02:00
TatriX
ee855d8b67 feat(templates): Add 'Last post by' to the list of threads 2018-04-16 16:26:24 +02:00
Vincent Ambo
09a97d46ea docs(envrc): Add .envrc example file 2018-04-16 14:24:42 +02:00