Commit graph

2906 commits

Author SHA1 Message Date
Fabien Basmaison
7e49b3cb26 [assets] Simplify addRemoveClass function. 2021-04-06 11:19:44 +02:00
Fabien Basmaison
70c652d565 [assets] Add rules to ESLint:
- Fix long line.
- Enforce a few stylistic habits:

    - Avoid some potential dangerous constructs.
    - `arrow-spacing`: Use at least one space around arrows.
    - `keyword-spacing`: Use at least one space around keywords (if, else, for…).
    - `no-multiple-empty-lines`: Only use one empty line between code.
	- `no-var`: Use `let` or `const` instead of `var`:
    - `padded-blocks`: Do not pad blocks.
    - `padding-line-between-statements`: Use empty lines between some statements.
    - `space-before-blocks`: Use at least one space before the opening brace of a block.
2021-04-06 10:42:52 +02:00
Fabien Basmaison
991d897ac7 [assets] Listen to events as soon as possible. 2021-04-06 09:57:52 +02:00
Fabien Basmaison
2f2f7db086 [assets] Use classes for JS files:
- Classes strictly parse code implicitly.
- Fix previously updated code.
2021-04-06 09:44:59 +02:00
Fabien Basmaison
f430363be0 [assets] Simplify a function expression. 2021-04-06 09:11:56 +02:00
Fabien Basmaison
f6c3e581b9 [assets] Replace Array.from(document.getElementsByClassName(…)) by querySelectorAll(…). 2021-04-06 09:11:27 +02:00
Fabien Basmaison
6b0a3ce4b1 [assets] Move localStorage chunks of code to their own file:
This should prevent a sync issue with updateDisplay not always being loaded on time.
2021-04-06 09:06:51 +02:00
Fabien Basmaison
964b47ea97 [assets] Fix path for icomoon font. 2021-04-05 16:46:30 +02:00
Fabien Basmaison
27e47b0a35 [lint] Update context for linting frontend files:
- Lint files when pushing on the _frontend_ branch.
- Lint files when eslint or stylelint config files are updated.
- Use _strict_ parsing of JS files by default. This should make the JS linting test to fail.
2021-04-05 16:35:09 +02:00
Fabien Basmaison
cbed5e331b [assets] Move some frontend assets to _vendor_ directories:
This simplifies linting of files we have no grasp on, and clarifies responsibilities.

- Add .eslintignore.
- Restrict linting to bookwyrm/static.
2021-04-05 16:17:11 +02:00
Fabien Basmaison
5aea7343b4 [assets] Rename some files for consistency. 2021-04-05 16:16:48 +02:00
Fabien Basmaison
6971c9b133 [assets] Move toggleAllCheckboxes code to its own file. 2021-04-05 16:16:05 +02:00
Mouse Reeve
d25c68f887 Restores stream length settings 2021-04-04 21:01:52 -07:00
Mouse Reeve
c94af1b240
Merge pull request #874 from mouse-reeve/fixes-stream-trimming
Fixes trimming streams
2021-04-04 20:59:53 -07:00
Mouse Reeve
940e841502 Fixes trimming streams 2021-04-04 20:57:30 -07:00
Mouse Reeve
a571bbb48a
Merge pull request #873 from SavinaRoja/772-translate-invite-dropdown
772 Use gettext_lazy for form classes
2021-04-04 14:04:00 -07:00
Pablo Barton
593e435816 772 Use gettext_lazy for form classes 2021-04-04 16:22:36 -04:00
Mouse Reeve
ea837a3879
Merge pull request #864 from mouse-reeve/delete-and-redraft
Delete and redraft
2021-04-04 11:00:09 -07:00
Mouse Reeve
abd6a78295
Merge pull request #862 from mouse-reeve/disabled-link
Valid html solution to disabling pagination links
2021-04-04 10:59:22 -07:00
Mouse Reeve
2d044746de
Merge pull request #872 from mouse-reeve/invite-management
Expands filtering and sorting on invite requests page
2021-04-04 10:58:57 -07:00
Mouse Reeve
b6aa36960c Separates button grouping from td element 2021-04-04 10:38:40 -07:00
Mouse Reeve
03ba01a790 Expands filtering and sorting on invite requests page 2021-04-04 10:36:28 -07:00
Mouse Reeve
467748e2c8 Adds delete and redraft tests 2021-04-04 09:45:25 -07:00
Mouse Reeve
ff3631cbe3 Python formatting 2021-04-04 09:24:17 -07:00
Mouse Reeve
be8c3b7904 Handles delete and redraft replies 2021-04-04 09:18:52 -07:00
Mouse Reeve
936d68f0ed Don't allow delete and redraft of ratings 2021-04-04 09:08:44 -07:00
Mouse Reeve
521f917d01 Pass existing rating to stars form element as variable 2021-04-04 09:05:21 -07:00
Mouse Reeve
4c2f1db6a6 Merge branch 'main' into delete-and-redraft 2021-04-04 09:05:12 -07:00
Mouse Reeve
ecf489b0bd
Merge pull request #863 from mouse-reeve/edit-book-field-types
Uses date input type for publication date fields
2021-04-04 08:50:46 -07:00
Mouse Reeve
7dcbc14225
Merge pull request #866 from mouse-reeve/goal-page-book-link
Fixes goal page book link
2021-04-04 08:50:00 -07:00
Mouse Reeve
b3535d9a90 Hides disabled pagination links for screenreaders 2021-04-04 08:42:01 -07:00
Mouse Reeve
6ae0451a61
Merge pull request #867 from GuDzpoz/main
[i18n:zh_CN] Updated Simplified Chinese tranlation
2021-04-04 07:24:52 -07:00
Mouse Reeve
d8520c79e9
Merge pull request #869 from arkhi/review-rate
Simplify rating form
2021-04-04 07:23:24 -07:00
Fabien Basmaison
485b0fa0f3 Simplify rating form:
- Create a snippet to regroup similar code.
- Reduce and document tricky logic of CSS.
- Add i18n strings.
2021-04-04 15:08:42 +02:00
GuDzpoz
02ef930f65 Contextual fixes 2021-04-04 12:41:12 +08:00
GuDzpoz
1e4cc68fae Contextual fixes 2021-04-04 12:37:40 +08:00
GuDzpoz
cfb0d0954b Updated Simplified Chinese translation 2021-04-04 12:20:16 +08:00
Mouse Reeve
74ca54d8d6 Fixes goal page book link 2021-04-03 20:55:44 -07:00
Mouse Reeve
d5643047e1 hidden checkbox should always be hidden 2021-04-03 15:49:27 -07:00
Mouse Reeve
ffb7f8f7ce Populate redraft form 2021-04-03 15:47:47 -07:00
Mouse Reeve
7b3c85f351
Merge pull request #865 from mouse-reeve/zrem
Uses correct redis remove activity type
2021-04-03 15:34:52 -07:00
Mouse Reeve
6ed74e6f60 Merge branch 'zrem' into delete-and-redraft 2021-04-03 14:59:29 -07:00
Mouse Reeve
3dee60e9e5 Uses correct redis remove activity type 2021-04-03 14:56:56 -07:00
Mouse Reeve
2a4fc8fb9a Adds model-to-form helper for statuses 2021-04-03 14:55:13 -07:00
Mouse Reeve
4cf9bca5aa Adds compose view 2021-04-03 14:32:34 -07:00
Mouse Reeve
dae31459e4 Show correct book when url param is provided 2021-04-03 13:56:41 -07:00
Mouse Reeve
029913de32 Logic for rendering a particular compose tab server-side 2021-04-03 13:12:55 -07:00
Mouse Reeve
fb900d58cd Names status urls 2021-04-03 12:38:12 -07:00
Mouse Reeve
8711a2eba5 Adds url path 2021-04-03 12:31:28 -07:00
Mouse Reeve
c5b2489330 Adds start of redraft view 2021-04-03 12:30:18 -07:00