Commit Graph
195 Commits
Author SHA1 Message Date
Trevor Buckner e222811d03 Rename engine to renderer to unify naming
This value is named `renderer` everywhere else. Relabeling to a consistent name.
2024-07-13 18:06:46 -04:00
Trevor Buckner 47f912750b Extract getting userThemes from getBrew()
`getBrew()` should do one thing only; retrieve a brew. UI elements like the list of themes available to the user are not part of a brew.

Moved into the handers for the `/edit/` and `/new/` endpoints
2024-07-13 17:44:23 -04:00
David Bolack ade819c70c A not so light rework.
This removes the existing endpoints and replaces them with /theme.

/theme/:id - return a theme bundle containing all styling from this USER theme and any parents.
/theme/:engine/:id - return a theme bundle containing all styling from this STATIC theme and any parents

The theme bundle returns a marshalled JSON object containing:
  styles - an array of strings representing the collected styles in loading order
  snippets - an array ( currently empty ) of collected snippets.

The various bits of theme rendering code for <style> an style <link> have been swapped out with an 'onDidMount' call that loads the thendpoint and appends a series of <style> blocks to the brewRender's head.

This loses some caching advantages, but probably won't matter in the long run.
2024-07-13 12:12:05 -05:00
Trevor Buckner a6f787ea8f Remove getBrewThemeParentCSS 2024-07-10 17:56:39 -04:00
Trevor Buckner a247e50c9f renaming "get" functions
rename `getStaticTheme` to `getStaticThemeCSS`
rename `getBrewThemeWithCSS` to `getBrewThemeCSS`
rename `getBrewThemeParent` to `getBrewThemeParentCSS`

to avoid confusion with other "get" endpoints like `getBrew`, and unify naming for endpoint functions that return CSS.

Simplify `isStaticTheme` function (getting the parent theme is handled elsewhere)
2024-07-10 14:15:03 -04:00
Víctor Losada Hernández 90431efbc9 "Removed ArchivePage and related files, replaced with VaultPage, updated routes and API endpoints, and made minor changes to theme configuration and error handling." 2024-06-11 00:33:36 +02:00
Víctor Losada Hernández 99b0c2b54e Merge branch 'master' of https://github.com/naturalcrit/homebrewery into experimental-development 2024-06-10 23:25:42 +02:00
David Bolack 5442f232d5 Merge branch 'master' into brew_themes_user_selection 2024-05-31 22:32:14 -05:00
Trevor Buckner 695b9916dd Remove old /print page 2024-05-28 12:39:43 -04:00
Víctor Losada Hernández 0f9ba1a5ae Merge branch 'master' of https://github.com/naturalcrit/homebrewery into experimental-development 2024-05-22 08:23:53 +02:00
Trevor Buckner e62e185214 Lint a bunch of things 2024-05-21 17:32:17 -04:00
David Bolack 8c5f4e0605 Brew Theme Fixes.
This adds the User Brew themes, where applicible, to the /new path.

This adds a semi-graceful failure to the metadata panel when a Brew Theme is declared as used but is not present.

More gracefully handles loading with themes not present.
2024-05-13 11:14:35 -05:00
David Bolack ef25139ffe Merge branch 'master' into brew_themes_user_selection 2024-05-06 12:04:38 -05:00
Víctor Losada Hernández 752b2caaf4 Merge branch 'master' of https://github.com/naturalcrit/homebrewery into experimental-development 2024-05-06 13:45:06 +02:00
Víctor Losada Hernández 3c1f8804af initial commit 2024-05-02 11:38:00 +02:00
David Bolack 1292d9ad9b Merge branch 'master' into brew_themes_user_selection 2024-04-18 21:13:01 -05:00
Gazook89 777438fd94 rename props.brew.uiItems to ...accountDetails
and destructure props at start of account page component.

`accountDetails` is more descriptive of what set of info is being passed through props to the account page, info which is only *then* displayed as UI items.
2024-04-06 21:23:26 -05:00
Víctor Losada Hernández 3c84143511 Merge branch 'master' of https://github.com/naturalcrit/homebrewery into experimental-development 2024-04-02 14:40:24 +02:00
David Bolack 54e2deaddc Merge branch 'master' into brew_themes_user_selection 2024-03-06 19:28:37 -06:00
David Bolack 1ac510af3d Heroku debug 2024-03-06 19:24:16 -06:00
David Bolack 33933ef212 Attempted fix on access 2024-03-06 19:14:16 -06:00
David Bolack 87502f4249 Heavy rework for usertheme parents. 2024-03-06 18:55:12 -06:00
Víctor Losada Hernández f93af38fa6 split-style-and-metadata moved to helpers.js 2024-03-06 18:09:26 +01: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 50c9d95ce0 WIP trying to debug theme selection. 2024-02-27 17:30:14 -06:00
David Bolack 7b3a1eb4ff Functional user theme loading though noising console 2024-02-27 13:41:51 -06:00
David Bolack 2456432844 Exclude self from brew themes list to prevent circular ref. 2024-02-23 17:12:54 -06:00
David Bolack 3e66647f9f Fix @import loading on Chrome. 2024-02-23 14:43:29 -06:00
Víctor Losada Hernández dad4cd90ca Merge branch 'master' into addCSSRoute-#1097 2024-02-23 20:23:19 +01: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 f60090e5fa Update Theme Picker to use Brews tagged as a theme
This updates the theme picker to include brews tagged as themes owned by
the user.

Some supporting functions were updated. User themes are loaded on /edit
and added to the request.
2024-02-22 21:12:56 -06:00
Víctor Losada Hernández 625819da91 Merge branch 'master' of https://github.com/naturalcrit/homebrewery into experimental-development 2024-01-27 19:14:48 +01:00
David Bolack 54921a998a Clone tags along with the rest of the brew 2024-01-25 19:51:03 -06:00
Víctor Losada Hernández 54a2f6940c from admin to archive api 2024-01-23 10:40:53 +01:00
Trevor Buckner b0ea34cc3f Add custom error messages. 2024-01-18 17:20:31 -05:00
G.Ambatte 511c38dd1e Remove unnecessary nullish coalescing operators 2023-10-29 14:16:41 +13:00
G.Ambatte 85b0976082 Move API call error handling 2023-10-29 11:52:02 +13:00
G.Ambatte 7052337669 Remove API error message from log 2023-10-29 11:43:24 +13:00
G.Ambatte e07d1d1ddb Add originalUrl to error object 2023-10-29 11:27:03 +13:00
G.Ambatte c5ebd0352d Identify API errors and send error response 2023-10-29 11:04:07 +13:00
Trevor Buckner 3ac0ac7568 Fix crash when not logged in
If not logged in, brew.authors doesn't exist, so visiting the share page crashes.
2023-10-13 23:44:34 -04:00
G.Ambatte 0a309ad0e1 Remove debugging console.log 2023-10-01 21:46:52 +13:00
G.Ambatte 52b0ae0400 Basic functionality pass 2023-10-01 21:35:50 +13:00
Gazook89 1556cf361a Check for author in author list before increasing views. 2023-09-27 23:46:38 -05:00
Sean Robertson 3e43b058a5 Move userpage brew data clean up to app.js 2023-09-06 11:52:28 +12:00
G.Ambatte cca882869d Add file link to Google icon on User Page 2023-08-07 22:03:17 +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 e5ef0aedd3 Pass all error properties to message generator 2023-06-25 17:10:25 +12:00