Commit graph

121 commits

Author SHA1 Message Date
Glandos
dc40c8fc14 use a dict for project list
this avoid finding duplicates, and we only need id -> name

also, use a common function to avoid duplicate code

fix #1081
2022-10-22 23:02:27 +02:00
Glandos
08defaea8f use double quotes so that value that contains single quote is not a syntax error 2022-08-28 11:34:38 +02:00
Glandos
31fef4f4d6
Fix CSRF on logout (#1040)
fix for https://huntr.dev/bounties/a3045614-1125-4901-bb7a-9d51be4beeed/
2022-07-14 15:45:32 +02:00
936ea0ea8e
Almet/qrcode (#1000)
Add a QRCode utility to join the project.
2022-05-11 11:20:15 +02:00
erwan-lacoudre
0d511e03d8
Add a Cancel Button when editing a bill (#1013)
Co-authored-by: Glandos <bugs-github@antipoul.fr>
2022-05-08 15:37:28 +02:00
Glandos
eaf059fe91
Hide "each" amount when there's only one recipient (#1008)
Fixes #1002
2022-03-24 17:31:50 +01:00
Gianluca De Cola
a14c7c5aaf Add a tooltip to advertize the computation trick on bills. 2022-01-31 22:07:47 +01:00
7c3ced06f8
Some small cleanups (#976)
Co-authored-by: Glandos <bugs-github@antipoul.fr>
2022-01-30 15:26:22 +01:00
Glandos
023ec71536
[Performance] Get weight sum along with bills to scale (#949)
* get weight sum along with bills to scale

otherwise, we need to get the weight sum for each displayed bill.
Here, we are much more scalable

* add test

* format

* remove unused import

* oops, restore pagination to 100

* add comments

* format

* rename method to make it clearer

And also, make it static, since it doesn't rely on instance.

* improve comments and naming

* improve naming

* missing article
2022-01-22 00:13:07 +01:00
Salamandar
6519223b45
Fix : use url_for in showcase template. (#974) 2021-12-22 19:25:55 +01:00
Youe Graillot
747824a298
CSV bills import (cospend compatible) (#951)
* proper import form (fix messy errors)
* csv compatible import
* cospend compatible import
* localization (best effort)
* refactoring
* revert localization (best effort)
* import return 400 on error
* fix Person.query.get_by_ids calls
* Bill explicit init parameters
* fix tests
* refacto tests with self.get_project
* separate import tests
* fix tests
* csv import test case
* fix import csv parsing
* revert DestructiveActionProjectForm renaming
* fix csv import test
* fix error redirection on import
* fix lint
* import file input type hint
* various fixes from review

Co-authored-by: Youe Graillot <youe.graillot@gmail.com>
2021-12-22 00:00:34 +01:00
Glandos
a0d13e4081
Top pagination and new bill button are sticky (#956) 2021-12-14 22:51:06 +01:00
Glandos
b9fee9e886
Rework flash messages (#943) 2021-12-01 22:42:20 +01:00
Glandos
521838ace4
small css cleanup by using bootstrap classes (#945) 2021-11-26 00:06:36 +01:00
ef3944ccad
Send an email when the project is created via the API. (#938) 2021-11-25 00:49:17 +01:00
Glandos
9bffe72607 Upgrade jquery 2021-11-13 22:33:18 +01:00
Glandos
c59aaadcde
sidebar_table_layout switches to flex column layout (#905)
* Fixes #896

sidebar_table_layout switches to flex column layout
remove all 'float' buttons, replace them with nice flexboxes.
bill_table needs a flex-basis because with a very small width, it has a 0 height. I don't really know why, but adding a flex-basis: auto shows it.

* ensure new bill is on top of pagination
2021-11-01 20:08:48 +01:00
35a74100cb
Rename all strings to "participants", clean old and small weird stuff (#871)
* Rename all strings to "participants".
* Update the tests with the new strings
* Update tests
2021-11-01 18:25:57 +01:00
cdc98a6706
Make the "Add a new bill" button visible on small resolutions. Fixes #896 (#904)
The clearfix should be applied before the pagination blocks.
2021-11-01 17:52:51 +01:00
JocelynDelalande
18aebb618f
Avoid showcase-guy to point his finger at nothing (#901)
That occured on some screen sizes.
2021-10-30 17:36:42 +02:00
Glandos
ff4de78b56
Reduce the size of showcase images (#899)
Fixes #875

Original showcase images are kept in another directory, and compressed
in webp in the distributed directory.
Since they won't change so much, let's keep them in git.
2021-10-30 17:30:59 +02:00
53c88c3b13
Add a LEGAL_LINK setting. Fixes #761 (#883) 2021-10-21 19:16:32 +02:00
zorun
97447c96f5
Improve pagination style (#873)
The style for top and bottom pagination was different, and the top part
was confusing.

Also translate bottom pagination text.

Co-authored-by: Baptiste Jonglez <git@bitsofnetworks.org>
2021-10-20 00:53:50 +02:00
Glandos
7a15051996
Make multiple currency optional (#864)
* Make multiple currency optional
Fixes #848

A description is provided in project settings to make the feature self explanatory.

* I forgot the description.
Let's update translation altogether.

* black format
2021-10-18 23:46:53 +02:00
Glandos
b44bef33db
regenerate translations (#860) 2021-10-14 22:15:54 +02:00
Glandos
e2286676f1 Flash messages must be dimissed manually 2021-10-14 00:09:20 +02:00
Glandos
7d9226745f
Change token path authentication to /PROJECT/join/TOKEN (#843) 2021-10-13 22:00:38 +02:00
2bcc41bdb3
Add optional support for a simple CAPTCHA. (#844)
* Add optional support for a simple CAPTCHA.
* formatting
* add test case
* Flake8

Co-authored-by: Glandos <bugs-github@antipoul.fr>
2021-10-11 17:39:24 +02:00
Glandos
bbe00ebb57
Include project code into project authentication token (#802)
Fix #780 

This a breaking change, the API for authentication is different, as it now requires `project_id`. Token is generated with only the project_id (so it's shorter than before), and signature is done by mixing password with secret key. Thus, it expires on every project code change.
2021-10-10 14:43:40 +02:00
Daniel Neto
49abd7fedd Fix #838: Round weight to 2 decimal cases 2021-09-19 19:04:49 +02:00
b933e236ba Update the email template to feel more inclusive. 2021-09-01 22:57:51 +02:00
Baptiste Jonglez
9217360973 Localize month names in the statistics view 2021-07-20 19:42:14 +02:00
Baptiste Jonglez
9444c1099a Display and highlight current language in dropdown list
Currently, we don't display the current language in the list.  This is
confusing because the list changes when switching language.

Now we always display the full list, and we highlight the current
language.
2021-07-18 14:32:09 +02:00
Baptiste Jonglez
82f3f067ef Fix layout of history deletion modals 2021-07-17 13:54:11 +02:00
zorun
439282356c Improve "confirm deletion" behaviour
* add the event listener only once, instead of every time the form is clicked

* use a standard button by default, so that the second state with a
  "danger" button is more visible

* reset confirmation button to original state when losing focus

Co-authored-by: Glandos <bugs-github@antipoul.fr>
2021-07-17 13:54:11 +02:00
Baptiste Jonglez
db982572aa History: also ask for private code to confirm deletion
This is the same idea as deleting a project: deleting history is also a
major destructive action.  We reuse the same form as for project deletion
to ask for the private code and provide CSRF validation.
2021-07-17 13:54:11 +02:00
Baptiste Jonglez
969029a811 Add CSRF validation to project history deletion 2021-07-17 13:54:11 +02:00
Baptiste Jonglez
2bb6f2b6a7 Rework project deletion to add CSRF validation
It requires reworking the user interface, but it's probably for the best.
2021-07-17 13:54:11 +02:00
Baptiste Jonglez
109d7fca17 Add CSRF validation to most disruptive actions
This also switches all such actions to POST requests.

Deleting the project is handled in another commit because it requires more
changes.
2021-07-17 13:54:11 +02:00
Baptiste Jonglez
078f9e8b6b Fix invalid HTML 2021-07-14 16:10:13 +02:00
Andrew Dickinson
72230448a7
Improve localization on the History page using string replacement (#587) 2021-07-12 22:48:19 +02:00
Glandos
526db044b2 Use "No one" instead of "Noone", that is really too old. 2021-07-10 00:40:06 +02:00
Glandos
ccad5ac859 align translation with existing tokens 2021-07-10 00:40:06 +02:00
Glandos
3f9303d5b5 badges for selectors, and payees in column 2021-07-10 00:40:06 +02:00
Glandos
e9afc539c8 slightly more margin for details 2021-07-10 00:40:06 +02:00
Glandos
c4f98580c1 move extra options to bottom 2021-07-10 00:40:06 +02:00
Glandos
6e2283f915 draft 2021-07-10 00:40:06 +02:00
Glandos
07b86bc580
Rework currency switching (#661)
Co-authored-by: Alexis Métaireau <alexis@notmyidea.org>

Currency switching is both simpler and less powerful. This was done primarily for users, to have a clear and logical understanding, but the code is also simpler. The main change is that it is now forbidden to switch a project to "no currency" if bills don't share the same currency.

Also, tests assume that projects are created without currency, as in the web UI.
2021-07-06 21:51:32 +02:00
958a85148f
Navbar change (#739)
* Changed the navbar element spacing to make it look more even.

* Put history and settings in a submenu

Co-authored-by: Joshua <mckerracher@gmail.com>
2021-04-12 21:23:25 +02:00
Mayank Choudhary
6ec7dd6077
Added a page for downloading mobile application (#688)
Fixes #597 
Fixes #697 

Co-authored-by: Glandos <bugs-github@antipoul.fr>
2020-11-24 22:22:46 +01:00