Skip to content
This repository has been archived by the owner on Dec 25, 2023. It is now read-only.

Consistent JSON API incl. Proper Handling of Errors (2nd half of big refactoring) #282

Merged
merged 179 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from 169 commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
db89735
Adopted front-end to modified JSON API
nagmat84 Jul 18, 2021
1670964
Merge branch 'master' into refactor_photo_model
nagmat84 Jul 20, 2021
c6b4d16
Re-run prettier after merge
nagmat84 Jul 20, 2021
181b093
Fixed 204 response for deleted content
nagmat84 Jul 25, 2021
51be1c3
Fixed return type of Photo::duplicate
nagmat84 Jul 31, 2021
4594e85
Fixed duplicate error
nagmat84 Jul 31, 2021
c4a1775
fix justified layout
ildyria Aug 7, 2021
adb6e51
fix formatting
ildyria Aug 7, 2021
360dba0
Renamed attribute "password" to "has_password" and made all flags rea…
nagmat84 Aug 22, 2021
df568ff
Method for adding a (tag) album uses correct return type
nagmat84 Sep 7, 2021
9d2b6ed
Fixed smart albums
nagmat84 Sep 7, 2021
753d03f
Fixed type error for previous and next photo ID.
nagmat84 Sep 7, 2021
a63ae56
Fixed return type for login
nagmat84 Sep 7, 2021
9f080b5
Fixed "star" attribute.
nagmat84 Sep 7, 2021
f098e10
Renamed functions and attributes
nagmat84 Sep 7, 2021
b3cdf5d
Fix user creation/deletion.
nagmat84 Sep 7, 2021
da37c38
Fixed name of parameters for album sorting
nagmat84 Sep 8, 2021
097459a
Fixed boolean for get position data.
nagmat84 Sep 8, 2021
a0c2786
Renamed attributes
nagmat84 Sep 11, 2021
65fe39c
Correct handling of No Response (204) upon import.
nagmat84 Sep 12, 2021
ba845f6
Fixed regression bugs wrt. visibility badge
nagmat84 Sep 12, 2021
26d6437
Fixed password input
nagmat84 Sep 12, 2021
428a4b7
Corrected return type for Photo::delete
nagmat84 Sep 12, 2021
4c8c994
Fixed imgDirection --> img_direction
nagmat84 Sep 12, 2021
9c80a78
Fixed problem with null value for tags
nagmat84 Nov 1, 2021
fd7a62f
Merge branch 'master' into refactor_photo_model
nagmat84 Nov 2, 2021
d4f7c32
Fixed a missing size variant
nagmat84 Nov 2, 2021
d3a3722
Merge branch 'refactor_photo_model' into refactor_album_model
nagmat84 Nov 2, 2021
cad3a9e
Merge branch 'master' into refactor_photo_model
nagmat84 Nov 28, 2021
dd6a16d
Removed `data !== true` for API calls which return 204 on success
nagmat84 Nov 30, 2021
5ad4ec0
Added random IDs for photos and albums
nagmat84 Dec 4, 2021
da0b569
Sorting according to upload/creation time uses column "created_at" no…
nagmat84 Dec 11, 2021
2b5e1d8
Bring some API aspects forward to avoid another migration.
nagmat84 Dec 15, 2021
740c792
Adopted error handler and API interface.
nagmat84 Dec 27, 2021
1caac99
Fixed capitalization for API calls.
nagmat84 Dec 27, 2021
4cd64b7
Some formatting.
nagmat84 Dec 27, 2021
6c3c8bd
Fixed login.
nagmat84 Dec 27, 2021
3bbdc24
Removed extra error handling from each API call.
nagmat84 Dec 29, 2021
173615e
Fixed an error wrt. album_id
nagmat84 Dec 30, 2021
77afa86
Cleanup and jsDoc
nagmat84 Dec 30, 2021
7aa903d
Fixed upload of photos.
nagmat84 Dec 30, 2021
9a27945
Fixed error handling.
nagmat84 Dec 30, 2021
c79bea3
Fix unjustified layout
kamil4 Dec 30, 2021
1308e3c
Fix album vs album_id confusion
kamil4 Dec 30, 2021
577d882
Fix clicking in search results
kamil4 Dec 30, 2021
fd746a0
Fix formatting
kamil4 Dec 30, 2021
da7e793
Merge branch 'refactor_photo_model' into consistent_json_api
nagmat84 Dec 31, 2021
c90d438
Correctly handle null 2x album thumbs
kamil4 Jan 1, 2022
c7197d6
Fix a case exposed by previous commit
kamil4 Jan 1, 2022
2f0b557
Added reload for IDs in legacy format.
nagmat84 Jan 1, 2022
4a5ebd3
Merge branch 'refactor_photo_model' into consistent_json_api
nagmat84 Jan 1, 2022
d710cf5
Fix a recent change
kamil4 Jan 2, 2022
5ef316e
Support numeric searches
kamil4 Jan 2, 2022
aa2cf6f
Work on import from server
nagmat84 Jan 2, 2022
5d1b992
Fixed bug which prevented uploading to root/unsorted.
nagmat84 Jan 2, 2022
7b0c2de
Front-end can handle microseconds.
nagmat84 Jan 2, 2022
518d4b6
Support null getParentID()
kamil4 Jan 3, 2022
f102c71
Use null for Unsorted
kamil4 Jan 3, 2022
e3321a9
Fixed duplicate-to for root album.
nagmat84 Jan 3, 2022
904815c
Replace "unsorted" with null
kamil4 Jan 3, 2022
d2653ce
Reverted some changes.
nagmat84 Jan 4, 2022
3f68863
Fetch all legacy model IDs in a single request.
nagmat84 Jan 4, 2022
048cc48
Don't display sorting info in public mode
kamil4 Jan 5, 2022
3b19022
Use null for default album sorting
kamil4 Jan 5, 2022
7b484fc
Fix pop-down menu Rename and Tag
kamil4 Jan 5, 2022
eb2d006
Fix #1185
kamil4 Jan 5, 2022
315b0f0
Prevent double loading of albums/photos
nagmat84 Jan 4, 2022
72dc3dd
Merge branch 'refactor_photo_model' into consistent_json_api
nagmat84 Jan 6, 2022
681f94d
Fixed import from server
nagmat84 Jan 7, 2022
248c5b8
Don't accidentally pass event to methods
nagmat84 Jan 7, 2022
6604029
Cleanup of upload code.
nagmat84 Jan 7, 2022
fa4147b
Added JsDoc for 3rd party modules to allow static code analyzation an…
nagmat84 Jan 8, 2022
ab82997
Fixed a lot of JsDoc comments
nagmat84 Jan 8, 2022
f564b33
Renamed callbacks
nagmat84 Jan 8, 2022
3119e02
Removed "post_raw" and fixed diagnostics and logs.
nagmat84 Jan 8, 2022
8c9f964
Renamed get-method of API
nagmat84 Jan 8, 2022
b0f24a4
Transmit arrays as arrays (avoid stringification of arrays)
nagmat84 Jan 8, 2022
ddfa884
Commented a lot to make code analyzing possible.
nagmat84 Jan 9, 2022
0e09f7d
Completly commented albums.js
nagmat84 Jan 9, 2022
204eaa5
Completly commented build.js
nagmat84 Jan 9, 2022
1dc23b1
Started to add comments to contextMenu
nagmat84 Jan 13, 2022
ec4da47
Added jsDoc up to and incl. `leftMenu`.
nagmat84 Jan 13, 2022
6231b00
Commented up to and incl. `lychee.js`.
nagmat84 Jan 15, 2022
d82a3fa
Commented up to and incl. `password.js`.
nagmat84 Jan 22, 2022
8ec5201
Added annotations up to and including `photos.js`
nagmat84 Jan 23, 2022
51ded1f
Annotated up to and incl. `settings.js`
nagmat84 Jan 24, 2022
81dd7b9
Annotated sidebar.js
nagmat84 Jan 25, 2022
f2e004b
Annotated up to and incl. `users.js`
nagmat84 Jan 29, 2022
0927624
Annotated all JS in main
nagmat84 Jan 29, 2022
5cfe34e
Fixed return annotation
nagmat84 Jan 29, 2022
c17c0cb
Fixed some trivial bugs noted by my IDE.
nagmat84 Jan 29, 2022
d02b13c
Annotated remaining files outside of `./scripts/main/`
nagmat84 Jan 30, 2022
c9a5263
Added one more TODO.
nagmat84 Jan 30, 2022
a58a826
Merge branch 'master' into consistent_json_api
nagmat84 Feb 5, 2022
b079962
Fixed a unneccessary string conversion.
nagmat84 Feb 5, 2022
3c39722
Fixed some after-merge bugs.
nagmat84 Feb 5, 2022
c3ce35d
Fixed gulpfile to include backend.js
nagmat84 Feb 6, 2022
a54ba05
Fixed two silly bugs
nagmat84 Feb 6, 2022
91f2e13
Fixed initialization data
nagmat84 Feb 6, 2022
d4b6ccc
Run prettier
nagmat84 Feb 6, 2022
019e877
Another silly bug
nagmat84 Feb 6, 2022
fc7c02d
And another silly bug
nagmat84 Feb 6, 2022
1c29d37
Archive uses joined array again.
nagmat84 Feb 6, 2022
43675b9
Transformed tags into proper array of strings.
nagmat84 Feb 6, 2022
0723135
Merge branch 'master' into consistent_json_api
nagmat84 Feb 11, 2022
8e48fcc
Fixed status code for password-protected album.
nagmat84 Feb 19, 2022
e39c3cc
Fixed some TODO comment and single photo view.
nagmat84 Feb 19, 2022
ca7b4e4
Hide loading bar if error handled by custom error handler.
nagmat84 Feb 19, 2022
dc8b4ef
Show password dialog only for password-protected albums.
nagmat84 Feb 19, 2022
8077436
Proper callback for combined album/photo loading.
nagmat84 Feb 19, 2022
552b9b9
Avoid flicker of content.
nagmat84 Feb 19, 2022
6b89a58
Fixed type error
nagmat84 Feb 19, 2022
9f251cb
Restructured `album.setPublic`
nagmat84 Feb 20, 2022
ccacf18
Restructured `album.shareUsers`
nagmat84 Feb 20, 2022
e939fc4
Repaired types for sharing.
nagmat84 Feb 20, 2022
d121d00
Cleaned up some comments according to results of discussion on Github.
nagmat84 Feb 20, 2022
86a88ce
Added explainations to alternative "mains" for view and frame mode.
nagmat84 Feb 20, 2022
d25b1f4
Fixed search
nagmat84 Feb 20, 2022
130ba61
Fixed a trivial TODO.
nagmat84 Feb 20, 2022
afbab1c
Split smart and tag albums.
nagmat84 Feb 20, 2022
173d485
Simplified the handling of CSRF cookies.
nagmat84 Feb 20, 2022
c2a9600
Removed awkward "_gup".
nagmat84 Feb 20, 2022
cc424e1
Improved handling of sorting criterions
nagmat84 Feb 20, 2022
7ef6805
Fixed some bugs reported by SonarCloud.
nagmat84 Feb 20, 2022
dc9bfd6
Fixed Lychee exception.
nagmat84 Feb 21, 2022
5fd27f7
Fixed import from URL/dropbox.
nagmat84 Feb 21, 2022
abbfc95
Import from server fixed.
nagmat84 Feb 26, 2022
23ec8b0
Fixed sorting bug
nagmat84 Feb 26, 2022
e42cb4d
Fixed a bug with JS month handling.
nagmat84 Feb 26, 2022
4c46375
Fixed some problems reported by SonarCloud.
nagmat84 Feb 27, 2022
a9d3e16
Apply suggestions from code review
nagmat84 Mar 13, 2022
968a9cf
Trivial changes from code review.
nagmat84 Mar 13, 2022
59faafb
Renamed misleading "setPublic" to "setProtectionPolicy".
nagmat84 Mar 13, 2022
d7f12fb
Renamed "setStar" to "toggleStar"
nagmat84 Mar 13, 2022
8b149d5
Fixed setNSWF due to review by @kamil4
nagmat84 Mar 19, 2022
e712c60
Cleaned up toggleStar for photos.
nagmat84 Mar 19, 2022
07dedc8
Merge branch 'master' into consistent_json_api
nagmat84 Mar 24, 2022
8f8782e
Apply suggestions from code review
nagmat84 Mar 29, 2022
c376fb5
Some fixes due to code review.
nagmat84 Mar 29, 2022
fd2825a
@kamil4 suggested to be brave (I trust @kamil4 and my IDE)
nagmat84 Mar 29, 2022
9e5bed4
Apply suggestions from code review
nagmat84 Mar 31, 2022
7804734
Apply suggestions from code review.
nagmat84 Mar 31, 2022
72466af
Apply suggestions from code review
nagmat84 Apr 2, 2022
3c51df6
Fix divider issues for non-admin users
kamil4 Apr 5, 2022
d751c2b
Show at most one of Star Selected/Unstar Selected
kamil4 Apr 6, 2022
5e0e991
Apply suggestions from code review
nagmat84 Apr 9, 2022
620a74e
Removed confusing comment.
nagmat84 Apr 9, 2022
058b013
Cleaned up unnessary function v_2
nagmat84 Apr 9, 2022
aa616d3
Changed comment due to a remark by @kamil4.
nagmat84 Apr 9, 2022
5f3bc86
Fixed another JSdoc due to an remark by @kamil4.
nagmat84 Apr 9, 2022
f6408a2
Fixed the handling of untitled albums/photos.
nagmat84 Apr 9, 2022
b9092c2
Run prettier.
nagmat84 Apr 9, 2022
0afd0a9
Bravely removed some kind as recommended by @kamil4.
nagmat84 Apr 9, 2022
e458e5f
Fixed upload code due to remarks by @kamil4.
nagmat84 Apr 9, 2022
1fd9486
Added PhotoResyncedException
nagmat84 Apr 9, 2022
502394d
Fixed type annotation for SmartAlbums due to visibility constraints.
nagmat84 Apr 9, 2022
28bbdc7
Merge branch 'master' into consistent_json_api
nagmat84 Apr 10, 2022
2a8cc98
Fix the handling of null albumID in form data
kamil4 Apr 13, 2022
b0f23f7
Update status of cancelled uploads
kamil4 Apr 13, 2022
01a5e3d
Fix the formatting
kamil4 Apr 14, 2022
e61f046
Apply suggestions from code review
nagmat84 Apr 14, 2022
af35f7b
Merge branch 'master' into consistent_json_api
nagmat84 Apr 14, 2022
052ced8
Update scripts/main/sidebar.js
nagmat84 Apr 14, 2022
745bdda
Make it prettier
kamil4 Apr 14, 2022
e2eb240
Quick solution to crash in context menu for multi-selection
nagmat84 Apr 17, 2022
4a1c25f
Proper solution to crash in context menu for multi-selection
nagmat84 Apr 17, 2022
95e768b
Fixed incompatible types for user settings
nagmat84 Apr 17, 2022
d26af30
Simplified handling of boolean values
nagmat84 Apr 17, 2022
18071e4
Simplified dropdown menus
nagmat84 Apr 17, 2022
cd6df80
Fixed type of legacy ID.
nagmat84 Apr 25, 2022
66e4914
Added code to detect expired sessions.
nagmat84 Apr 25, 2022
36313b9
Fixed detection of expired sessions.
nagmat84 Apr 27, 2022
eb869c1
Apply suggestions from code review
nagmat84 Apr 27, 2022
d7443a6
Error handler for album loading uses name of exception.
nagmat84 Apr 28, 2022
f03019b
Fix flickering issues
kamil4 Apr 29, 2022
263bcaf
Consistently restore album scroll position
kamil4 Apr 29, 2022
ae25a4a
Put search results into a special `SearchAlbum`
nagmat84 Apr 30, 2022
5f039a5
Update scripts/main/album.js
nagmat84 May 1, 2022
62e2ac3
Reverted @kamil4's suggestion and moved it to the correct condition
nagmat84 May 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const catchError = function (err) {
paths.view = {
php: ["../view.php"],
js: [
"./scripts/_gup.js",
"./scripts/api.js",
"./scripts/csrf_protection.js",
"./scripts/view/main.js",
Expand All @@ -27,6 +26,7 @@ paths.view = {
"./scripts/main/mapview.js",
"./scripts/main/lychee_locale.js",
"./scripts/main/tabindex.js",
"./scripts/3rd-party/backend.js",
"./deps/basiccontext/scripts/basicContext.js",
],
scripts: ["node_modules/jquery/dist/jquery.min.js", "node_modules/lazysizes/lazysizes.min.js", "../dist/_view--javascript.js"],
Expand Down Expand Up @@ -78,7 +78,7 @@ gulp.task("view--svg", function () {

paths.main = {
html: ["../index.html"],
js: ["./scripts/*.js", "./scripts/main/*.js", "./deps/basiccontext/scripts/basicContext.js"],
js: ["./scripts/*.js", "./scripts/main/*.js", "./scripts/3rd-party/backend.js", "./deps/basiccontext/scripts/basicContext.js"],
scripts: [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/lazysizes/lazysizes.min.js",
Expand Down Expand Up @@ -165,7 +165,7 @@ gulp.task("main--svg", function () {
/* Frame ----------------------------------------- */

paths.frame = {
js: ["./scripts/_gup.js", "./scripts/api.js", "./scripts/csrf_protection.js", "./scripts/frame/main.js"],
js: ["./scripts/api.js", "./scripts/csrf_protection.js", "./scripts/frame/main.js", "./scripts/3rd-party/backend.js"],
scss: ["./styles/frame/*.scss"],
styles: ["./styles/frame/frame.scss"],
scripts: [
Expand Down Expand Up @@ -217,7 +217,7 @@ gulp.task(
/* Landing ----------------------------------------- */

paths.landing = {
js: ["./scripts/_gup.js", "./scripts/landing/*.js"],
js: ["./scripts/landing/*.js"],
scripts: ["node_modules/jquery/dist/jquery.min.js", "node_modules/lazysizes/lazysizes.min.js", "../dist/_landing--javascript.js"],
scss: [
"./styles/landing/*.scss",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"gulp-sass": "^4.0.2",
"gulp-uglify": "^3.0.2",
"node-sass": "^4.13.0",
"npm": "^6.14.11",
"npm": "^6.14.16",
"prettier": "2.2.1",
"uglify-js": "^3.12.4"
}
Expand Down
Loading