0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-05-07 18:48:39 +00:00
Commit Graph

334 Commits

Author SHA1 Message Date
David Bolack 544bc9bd01 Catch bad assumption in unlogged saves 2024-02-28 08:32:15 -06:00
David Bolack 562daf9b04 Handle some statics 2024-02-27 21:13:22 -06:00
G.Ambatte 0d1d3a180d Handle missing lock property 2024-02-28 16:02:35 +13:00
David Bolack 8f15887c03 Cleanup of console logging 2024-02-27 20:51:59 -06:00
David Bolack 7384cdc241 My god it works 2024-02-27 20:20:43 -06:00
David Bolack 56851f2c2d Edit working - with noise. 2024-02-27 19:33:33 -06:00
David Bolack 4f4659b0e2 Cleaned up noise in homebrew.api.js 2024-02-27 13:57:58 -06:00
David Bolack 7b3a1eb4ff Functional user theme loading though noising console 2024-02-27 13:41:51 -06:00
G.Ambatte 802da2920b Initial functionality pass 2024-02-25 22:28:44 +13:00
David Bolack 3e66647f9f Fix @import loading on Chrome. 2024-02-23 14:43:29 -06:00
David Bolack f9307986cd WIP
@import statements are just not working. Uploaded for other eyes.
2024-02-22 23:06:40 -06:00
David Bolack ae2bb3a028 Add missing style.css 2024-02-20 23:26:09 -06:00
David Bolack c319d6bcfa Consolidate and add theme parent walking
This consolidates the style/theme endpoint to a singular method, adds
interpretation of static themes, and allow parent theme recursion.

I am not 100% sure this will order styles correctly.
2024-02-20 23:15:37 -06:00
David Bolack e2ef9b8122 Report Theme title with CSS
This adds a comment/field ( depending on endpoint ) that reports the
name of the Brew being used as a theming source.
2024-02-20 16:44:17 -06:00
David Bolack 8e48df5de1 Partial Code coverage for new endpoints 2024-02-18 12:45:14 -06:00
David Bolack a3b1d7fb7c Use a brew as a theme, three ways.
This has been implemented three different ways to allow for comparison
and discussion

- /api/css/:id : This returns the style frontmatter of the referenced
  document as a text/css document.
/api/theme/:id : This returns an object with the reference'd object's
theme and style frontmatter.
/api/csstheme/:id : This returns the stylye frontmatter of the
referenced document as a text/css document and adds the theme as an
@import ( if not using the legacy renderer )
2024-02-17 11:01:21 -06:00
G.Ambatte 0845234f2f Add brew's shareId to error info 2023-10-14 19:59:51 +13:00
G.Ambatte 7aa374e529 Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-07-08 19:07:55 +12:00
Trevor Buckner 6344eaa17d Handle Old Google Drive links that used 10-char shareID
When the Homebrewery was first made, editIds and ShareIds only had 10 characters. We later increased this to 12.

However this means some old, old Google Drive links (in the form of `googleId + editId`) were being split incorrectly because they assumed the newer 12-char length, accidentally cutting the last 2 chars from the googleId.
2023-07-06 00:10:07 -04:00
G.Ambatte a41553637a Add trim to brew description 2023-06-29 16:43:30 +12:00
G.Ambatte 636f2f9372 Add title trim before new saves and updates 2023-06-29 16:35:26 +12:00
Trevor Buckner 8baf0fc849 Add additional test for when logged in, but not in author list 2023-06-26 23:26:59 -04:00
Trevor Buckner d0de7ca28c Rephrasing of error texts 2023-06-26 22:48:58 -04:00
Trevor Buckner c0164dce6a Fix for username undefined (not logged in) 2023-06-26 17:02:28 -04:00
G.Ambatte e88e7f852c Add account check to Google File not found error 2023-06-26 20:40:11 +12:00
G.Ambatte c5f4793c23 Add owner info to missing Google file message 2023-06-26 17:43:19 +12:00
G.Ambatte cff4f8eae5 Catch duplicate delete requests 2023-06-25 21:26:02 +12:00
G.Ambatte fa38d5c892 Additional info in errors 2023-06-25 20:39:36 +12:00
G.Ambatte 04eb7d0556 Add brew title to Not an Author page 2023-06-25 20:13:13 +12:00
G.Ambatte f175323221 Use common error object to reduce DRY 2023-06-25 18:22:22 +12:00
G.Ambatte e28b6e7a19 Differentiate Not an Author from Not logged in 2023-06-25 18:10:31 +12:00
G.Ambatte e5ef0aedd3 Pass all error properties to message generator 2023-06-25 17:10:25 +12:00
G.Ambatte da8e7ec610 Change Not an Author to 401 2023-06-25 16:51:17 +12:00
G.Ambatte 7efe8964f1 Change throw method, update HBErrors 2023-06-25 14:21:35 +12:00
G.Ambatte 853515e09e Switch Error gen from spread operator to func 2023-06-25 12:56:22 +12:00
Trevor Buckner f6c5354ce0 Add support for custom HBErrorCodes 2023-06-24 02:57:03 -04:00
G.Ambatte 9e1d53a30c Basic ErrorPage functionality 2023-06-19 21:06:38 +12:00
Trevor Buckner eaf7b9c4ef Change tests from .remove() to deleteOne() 2023-04-04 17:47:25 -04:00
G.Ambatte dce880610d Change Model.remove to Model.deleteOne 2023-04-02 20:57:03 +12:00
Trevor Buckner 298a10bc42 Clean up tests 2023-02-18 13:48:02 -05:00
G.Ambatte e751f9a25c Remove mocking function from homebrew.api.js 2023-02-17 17:42:56 +13:00
G.Ambatte 41db670e63 Add mock markModified when it does not exist 2023-02-17 16:14:33 +13:00
G.Ambatte 4b98c1ac89 Add markModified to fix authors array in DB 2023-02-17 11:26:11 +13:00
Charlie Humphreys 6bae21a578 Merge branch 'master' into client-server-version-mismatch-middleware 2023-01-21 00:26:18 -06:00
Charlie Humphreys 7755affa1e update based on feedback 2023-01-20 23:07:24 -06:00
Trevor Buckner c9241e2162 Fix Google Drive brews duplicating 2023-01-20 17:19:02 -05:00
Trevor Buckner da676c6ec1 Ensure getBrew returns an object if undefined 2023-01-12 13:33:55 -05:00
Trevor Buckner 901615d99e Remove extra console log for getGoogleBrew
App.js already logs the thrown error, so we were getting double logs (and Google errors are long....). This should make the logs a bit easier to sift through.
2023-01-10 21:08:21 -05:00
Trevor Buckner 6ed52f37cc Only fix stub if we actually found one. 2023-01-09 17:30:49 -05:00
Trevor Buckner 15e5a31767 If no stub exists, start stub as {}, not undefined
Recent changes to handle bad brew properties (tags as strings, no renderer, etc.) didn't account for the case where an old Google brew is first being stubbed; since no stub exists, there is no object to perform the corrections on, and we crash.
2023-01-09 14:53:35 -05:00