0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-26 00:52:48 +00:00
Commit Graph

5763 Commits

Author SHA1 Message Date
Gazook89
0dc9e9ecdb Add 2 custom zoom related icons
New icons for Zoom to Fit, and Fit Width buttons.  Used SVGR online tool to create react components and then combined them.

If doing in future, be sure to set currentColor on `fill` property in the SVG itself.  Make the SVGs as closed curves only (don't rely on stroke).  set only a width property, not height.
2024-08-22 23:21:48 -05:00
Gazook89
977b871967 Combine toFit and toFill functions
Reduce overlap of the two functions and just require a 'mode' parameter.  Could like roll a 'manual' mode into this for the zoom slider, as well, but skipping for now.
2024-08-22 23:19:24 -05:00
Gazook89
90dd4326e7 Add a toFit() method to fit largest page in view
Adding a real toFit() button that takes the page with the largest single dimension (height or width) and makes it fit within the pane.
2024-08-22 20:56:42 -05:00
Gazook89
4c71987866 change the toFit method to toFill
Realized this method is filling the preview pane, and that toFit would force the zoom to show the entirety of a single page at once.
2024-08-22 15:56:23 -05:00
Gazook89
8965bb60aa add a toFit() method to determine zoom change
Adds a toFit() method to determine the delta/change needed to the current zoomLevel to fit the page to the pane, so that the widest page fits just inside the pane.
2024-08-22 15:52:52 -05:00
Gazook89
64fb032622 fix className 2024-08-22 15:51:16 -05:00
Víctor Losada Hernández
fb06ae0d03 Merge branch 'master' into pdf-tools 2024-08-21 23:07:25 +02:00
Trevor Buckner
c020297d78 Merge pull request #3655 from naturalcrit/dependabot/npm_and_yarn/googleapis/drive-8.13.0
Bump @googleapis/drive from 8.11.1 to 8.13.0
2024-08-21 10:34:35 -04:00
dependabot[bot]
8ea7d3dc8f Bump @googleapis/drive from 8.11.1 to 8.13.0
Bumps [@googleapis/drive](https://github.com/googleapis/google-api-nodejs-client) from 8.11.1 to 8.13.0.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/main/release-please-config.json)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/drive-v8.11.1...drive-v8.13.0)

---
updated-dependencies:
- dependency-name: "@googleapis/drive"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-21 03:14:46 +00:00
Gazook89
051eed0e83 restructure html, eliminate .tool divs
Treat each input and button as a direct child of the `.group` class, removing the intermediate div and reassign the `tool` classname to those inputs and buttons.  One item, the current / total page "set", is wrapped in a .tool div because they should be considered one item (even within the .group container).

And then a bunch of CSS adjustments to match the new structure.
2024-08-20 21:08:07 -05:00
Gazook89
cdc2ffeff4 remove if statement that shouldn't occur at all
Removing a redundant if/else that shouldn't be possible now that the currentPage is clamped between 1 and totalPages.
2024-08-20 20:18:54 -05:00
Trevor Buckner
dedf9e0be9 Merge pull request #3630 from dbolack-ab/FalsePaths
Prevent loading of undefined renderer or theme theme bundle.
2024-08-20 17:33:41 -04:00
Trevor Buckner
0cc001fe94 Merge branch 'master' into FalsePaths 2024-08-20 17:33:30 -04:00
Gazook89
83244485ab Move scrollToPage to toolbar component
Keeps toolbar functions within the toolbar component and reduces props that need to be sent down.
2024-08-20 15:15:36 -05:00
Trevor Buckner
defbc716c0 Merge pull request #3633 from naturalcrit/dependabot/npm_and_yarn/mongoose-8.5.3
Bump mongoose from 8.5.2 to 8.5.3
2024-08-20 16:09:07 -04:00
Trevor Buckner
1803dfdeb1 Merge branch 'master' into dependabot/npm_and_yarn/mongoose-8.5.3 2024-08-20 15:54:55 -04:00
Trevor Buckner
787d50f17c Merge pull request #3483 from dbolack-ab/Issue_241
Add Jump-To hotkeys
2024-08-20 15:54:42 -04:00
David Bolack
e45bcf76ce Merge branch 'master' into Issue_241 2024-08-20 13:49:02 -05:00
David Bolack
54d5dbf992 Pruning 2024-08-20 13:47:32 -05:00
dependabot[bot]
f8895721fc Bump mongoose from 8.5.2 to 8.5.3
Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.5.2 to 8.5.3.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/8.5.2...8.5.3)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-20 18:36:57 +00:00
Trevor Buckner
4c30a8f6a3 Merge pull request #3641 from naturalcrit/dependabot/npm_and_yarn/stylelint-16.8.2
Bump stylelint from 16.8.1 to 16.8.2
2024-08-20 14:35:39 -04:00
David Bolack
cbcb712587 Merge branch 'master' into Issue_241 2024-08-20 13:34:47 -05:00
Trevor Buckner
187b6a9e8a Merge branch 'master' into dependabot/npm_and_yarn/stylelint-16.8.2 2024-08-20 14:27:37 -04:00
Trevor Buckner
2816a39ff9 Merge pull request #3652 from dbolack-ab/saveTheClones
Prevent reload from clobbering modified fresh clones
2024-08-20 14:27:24 -04:00
David Bolack
9e19ba2d4e Merge branch 'master' into saveTheClones 2024-08-20 13:22:56 -05:00
David Bolack
a706c9ff9b Merge branch 'master' into Issue_241 2024-08-20 13:22:25 -05:00
David Bolack
4957a0d2ef Flip which arror is which. 2024-08-20 13:18:48 -05:00
David Bolack
727f2bd80e use replaceState instead 2024-08-20 13:15:32 -05:00
Trevor Buckner
11790fa438 Merge branch 'master' into dependabot/npm_and_yarn/stylelint-16.8.2 2024-08-20 13:53:56 -04:00
Trevor Buckner
c4049ec5fa Merge pull request #3642 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.26.1
Bump react-router-dom from 6.26.0 to 6.26.1
2024-08-20 13:53:35 -04:00
Trevor Buckner
02fca27f85 Merge branch 'master' into dependabot/npm_and_yarn/react-router-dom-6.26.1 2024-08-20 13:51:07 -04:00
Trevor Buckner
7f717b92fd Merge pull request #3653 from naturalcrit/dependabot/npm_and_yarn/elliptic-6.5.7
Bump elliptic from 6.5.6 to 6.5.7
2024-08-20 13:50:52 -04:00
dependabot[bot]
e2272b078b Bump elliptic from 6.5.6 to 6.5.7
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.6 to 6.5.7.
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.6...v6.5.7)

---
updated-dependencies:
- dependency-name: elliptic
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-20 17:47:02 +00:00
dependabot[bot]
01161752c6 Bump react-router-dom from 6.26.0 to 6.26.1
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.26.0 to 6.26.1.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.26.1/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-20 17:46:53 +00:00
Trevor Buckner
3237a4f2eb Merge branch 'master' into dependabot/npm_and_yarn/stylelint-16.8.2 2024-08-20 13:45:58 -04:00
Trevor Buckner
d87e07e9ba Merge pull request #3649 from naturalcrit/dependabot/npm_and_yarn/stylistic/stylelint-plugin-3.0.1
Bump @stylistic/stylelint-plugin from 3.0.0 to 3.0.1
2024-08-20 13:45:38 -04:00
dependabot[bot]
82529e0b06 Bump stylelint from 16.8.1 to 16.8.2
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.8.1 to 16.8.2.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.8.1...16.8.2)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-20 17:44:18 +00:00
dependabot[bot]
641303d1ad Bump @stylistic/stylelint-plugin from 3.0.0 to 3.0.1
Bumps [@stylistic/stylelint-plugin](https://github.com/stylelint-stylistic/stylelint-stylistic) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/stylelint-stylistic/stylelint-stylistic/releases)
- [Changelog](https://github.com/stylelint-stylistic/stylelint-stylistic/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint-stylistic/stylelint-stylistic/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: "@stylistic/stylelint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-20 17:44:14 +00:00
Trevor Buckner
845c2eca76 Merge pull request #3650 from naturalcrit/dependabot/npm_and_yarn/googleapis/drive-8.11.1
Bump @googleapis/drive from 8.11.0 to 8.11.1
2024-08-20 13:42:58 -04:00
Gazook89
f5ee55d0ca keep current page number within existing page range
Make it so that if a user enters a page number higher than the total page count, it jumps them to last page.  if lower than 1, it jumps them to first page.
2024-08-19 23:40:21 -05:00
Gazook89
2cf73698e8 white space lint 2024-08-19 23:38:48 -05:00
Gazook89
28a06348ab style tool groups, minor tweaks to spacing 2024-08-19 23:15:02 -05:00
Gazook89
9510b4d097 wrap each set of toolbars into groups
Allows more styling options, including flex wrapping by group rather than individual button.
2024-08-19 23:14:45 -05:00
Gazook89
37c8ea4fd7 Add total page count and some styling
Displaying the total page count near the current page number means we can lose the bottom right toolbar entirely (the renderer could be added to top toolbar, or just left for the metadata info in title bar).
2024-08-19 23:01:55 -05:00
Gazook89
9adc3e2e1a linting 2024-08-19 22:49:38 -05:00
Gazook89
fd00a9f81d remove some console logs and some linting 2024-08-19 22:46:25 -05:00
Gazook89
720e43e9d9 update page increment/decrement buttons
putting the `pageInput - 1` modifier in the `scrollToPage` method allows for more understandable button function ('back button' is `- 1` and 'forward button' is `+ 1`).
2024-08-19 22:43:41 -05:00
Gazook89
176977dd2a change input type to 'text'
Changing input type to text removes the "spinner" controls from within the text box.  The spinner buttons are an accessibility issue (the tiny buttons are tiny), and we already have better buttons for incrementing/decrementing page number.

Text box only accepts numbers.
2024-08-19 22:40:50 -05:00
Gazook89
a42b867bcb create handler function for controlled input
Moved onChange handler function to a component method and simplified it a smidge.

Must use parseInt now because the input type will change to 'text' rather than 'number'
2024-08-19 22:38:46 -05:00
Gazook89
1196a1577f update minZoom and maxZoom variable names
Forgot to update the zoom variable names after making them all uppercase at their assignments.
2024-08-19 22:35:35 -05:00