0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-23 20:53:05 +00:00

Compare commits

..

445 Commits

Author SHA1 Message Date
Trevor Buckner
c3f885012a Update changelog 2022-09-08 23:19:29 -04:00
Trevor Buckner
969eac4c5a 3.2.2 2022-09-08 23:02:00 -04:00
Trevor Buckner
0bc20112b2 Merge pull request #2345 from jeddai/fix-delete-former-google-brew
update deletion to delete brews when the google brew cannot be found
2022-09-08 22:40:51 -04:00
Trevor Buckner
9e137fa6a8 Merge pull request #2344 from naturalcrit/StyleBrewitemTags
Add Styling to Tags on userpage
2022-09-08 22:40:31 -04:00
Trevor Buckner
1f8701bea6 Merge pull request #2342 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.19.0
Bump @babel/preset-env from 7.18.10 to 7.19.0
2022-09-08 22:39:21 -04:00
Trevor Buckner
313ffab7c1 Merge pull request #2341 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-react-7.31.7
Bump eslint-plugin-react from 7.31.1 to 7.31.7
2022-09-08 22:39:10 -04:00
Trevor Buckner
9f602e416f Merge pull request #2343 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.19.0
Bump @babel/core from 7.18.13 to 7.19.0
2022-09-08 22:38:54 -04:00
Trevor Buckner
de90e2d801 Merge pull request #2347 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.5.5
Bump mongoose from 6.5.4 to 6.5.5
2022-09-08 22:38:37 -04:00
Trevor Buckner
3c12f1133e Tweak console warning 2022-09-08 22:38:00 -04:00
Charlie Humphreys
0625c57824 override next with an empty function 2022-09-08 08:16:49 -05:00
Charlie Humphreys
a234fdbab7 fix getBrew issue 2022-09-08 08:15:55 -05:00
dependabot[bot]
5830ee471b Bump @babel/core from 7.18.13 to 7.19.0
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.18.13 to 7.19.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.19.0/packages/babel-core)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-08 04:06:01 +00:00
dependabot[bot]
c35d97bf69 Bump eslint-plugin-react from 7.31.1 to 7.31.7
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.31.1 to 7.31.7.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.31.1...v7.31.7)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-08 04:05:48 +00:00
dependabot[bot]
6c3a9370dc Bump mongoose from 6.5.4 to 6.5.5
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.5.4 to 6.5.5.
- [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/6.5.4...6.5.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-08 04:05:29 +00:00
dependabot[bot]
edb74237bd Bump @babel/preset-env from 7.18.10 to 7.19.0
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.18.10 to 7.19.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.19.0/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-08 04:05:20 +00:00
Trevor Buckner
cd8496b62b Merge pull request #2338 from naturalcrit/dependabot/npm_and_yarn/jest-29.0.2
Bump jest from 29.0.1 to 29.0.2
2022-09-08 00:04:23 -04:00
Charlie Humphreys
af1821e697 update deletion to delete brews when the google brew cannot be found 2022-09-06 22:50:51 -05:00
Trevor Buckner
c0a14a5618 remove console.log 2022-09-06 22:57:00 -04:00
Trevor Buckner
8709545f14 Don't display tags that are empty strings. 2022-09-06 22:41:10 -04:00
Trevor Buckner
e0d8846c44 tweaks 2022-09-06 01:00:38 -04:00
Trevor Buckner
cae1bc9f0a Put tags in individual spans 2022-09-05 23:31:23 -04:00
dependabot[bot]
2a3aeec459 Bump jest from 29.0.1 to 29.0.2
Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 29.0.1 to 29.0.2.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v29.0.2/packages/jest)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-05 13:11:21 +00:00
Trevor Buckner
746e8f8a6a Merge pull request #2329 from G-Ambatte/smartenApostrophe-#2328
[UserPage] Change apostrophe in `usernameWithS`
2022-09-03 23:12:13 -04:00
Trevor Buckner
4f52cc075a Merge pull request #2327 from G-Ambatte/addSortType&DirToLocalStorage-#2326
[UserPage] Add sort type & dir to local storage
2022-09-03 23:11:24 -04:00
Trevor Buckner
8cf8c5cabb Merge branch 'master' into addSortType&DirToLocalStorage-#2326 2022-09-03 23:11:13 -04:00
Trevor Buckner
2f44c35ede Merge pull request #2320 from G-Ambatte/addBrewTagsToFilter-#2319
[UserPage] Add tags to filter
2022-09-03 22:40:08 -04:00
Trevor Buckner
62dee13881 Merge pull request #2324 from naturalcrit/FixNewPageCloning
Fix conflicts on /new
2022-09-03 22:38:59 -04:00
G.Ambatte
85cad49b03 Simplify getSortedBrews logic 2022-09-03 22:28:03 +12:00
G.Ambatte
76203928d2 Change apostrophe 2022-09-03 22:07:23 +12:00
G.Ambatte
cfbc089207 Add sort type & dir to local storage 2022-09-03 21:15:32 +12:00
G.Ambatte
ba693365ec Lint fixes 2022-09-03 20:53:28 +12:00
Trevor Buckner
b4be9bb741 Default brew in getDefaultProps, don't get localstorage when cloning 2022-09-03 01:32:42 -04:00
Trevor Buckner
e5fe6b1fd9 Merge branch 'master' into pr/2320 2022-09-02 23:55:34 -04:00
Trevor Buckner
8d10800cb6 Merge pull request #2318 from G-Ambatte/addTagsToBrewItem-#2317
[UserPage] Add tags to UserPage BrewItem
2022-09-02 23:43:26 -04:00
Trevor Buckner
67099bba40 Merge pull request #2316 from G-Ambatte/addSortTypeAndDirToURL-#2315
[UserPage] Add sort type and dir to URL
2022-09-02 22:46:25 -04:00
Trevor Buckner
d94b274439 Merge branch 'master' into addSortTypeAndDirToURL-#2315 2022-09-02 22:44:43 -04:00
Trevor Buckner
99c2ff15a0 Merge pull request #2300 from G-Ambatte/addUserPageCollapse-#1797
[UserPage] Collapse Brew Groups
2022-09-02 22:33:27 -04:00
G.Ambatte
0b89a895e7 Merge branch 'master' into addSortTypeAndDirToURL-#2315 2022-09-03 13:28:28 +12:00
G.Ambatte
64740ba528 Merge branch 'master' into addBrewTagsToFilter-#2319 2022-09-03 13:28:05 +12:00
G.Ambatte
f35634a295 Merge branch 'master' into addTagsToBrewItem-#2317 2022-09-03 13:27:19 +12:00
G.Ambatte
9807e24e0a Add brewTags class to BrewItem tags 2022-09-03 12:58:45 +12:00
G.Ambatte
de43bd46a5 Merge branch 'master' into addUserPageCollapse-#1797 2022-09-03 12:49:49 +12:00
G.Ambatte
b9f64092b8 Remove unnecessary visible from UserPage 2022-09-03 12:48:04 +12:00
G.Ambatte
3f1bc02885 Reduce duplicate CSS
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2022-09-03 09:58:17 +12:00
Trevor Buckner
407d3565cd Fix /new page "default" values not being read 2022-09-01 11:05:47 -04:00
G.Ambatte
2fcccfb48f Expand filtering functionality 2022-09-01 23:55:14 +12:00
G.Ambatte
3262751fea Add tags to UserPage BrewItem 2022-09-01 23:25:52 +12:00
G.Ambatte
80428fc412 Expand updateUrl function 2022-09-01 23:03:33 +12:00
G.Ambatte
66626b3427 Remove unnecessary visible from UserPage props 2022-09-01 20:06:30 +12:00
G.Ambatte
fc3a599f90 Merge branch 'addUserPageCollapse-#1797' of https://github.com/G-Ambatte/homebrewery into addUserPageCollapse-#1797 2022-09-01 19:18:04 +12:00
G.Ambatte
e355621bbf Load from local storage working without errors 2022-09-01 19:17:51 +12:00
G.Ambatte
9571cb0cc4 Initial pass at visibility functionality 2022-09-01 19:17:51 +12:00
Trevor Buckner
98e2d57691 Update changelog for v3.2.1 2022-08-31 23:29:38 -04:00
Trevor Buckner
6038b90798 3.2.1 2022-08-31 23:12:36 -04:00
Trevor Buckner
0ca25c06f2 Update Marked-Extended-Tables to V1.0.5 2022-08-31 23:11:55 -04:00
Trevor Buckner
b85b3be1d1 Merge pull request #2291 from naturalcrit/dependabot/npm_and_yarn/jest-29.0.1
Bump jest from 28.1.3 to 29.0.1
2022-08-31 21:57:32 -04:00
Trevor Buckner
78b7e07d09 Merge pull request #2309 from naturalcrit/dependabot/npm_and_yarn/marked-4.1.0
Bump marked from 4.0.19 to 4.1.0
2022-08-31 19:51:54 -04:00
dependabot[bot]
cd3dcfce86 Bump marked from 4.0.19 to 4.1.0
Bumps [marked](https://github.com/markedjs/marked) from 4.0.19 to 4.1.0.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v4.0.19...v4.1.0)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-31 15:12:51 +00:00
Trevor Buckner
0a0e57ad38 Merge pull request #2310 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.5.4
Bump mongoose from 6.5.3 to 6.5.4
2022-08-31 11:08:37 -04:00
Trevor Buckner
4c565657a9 Merge pull request #2313 from G-Ambatte/fixMissingSnippetButtons-#2311
[NewPage] Load from local storage in componentDidMount
2022-08-31 08:44:03 -04:00
Trevor Buckner
165a15e106 Update newPage.jsx 2022-08-31 08:43:18 -04:00
G.Ambatte
d27e07b620 Load from local storage in componentDidMount 2022-08-31 08:38:31 -04:00
Trevor Buckner
545ea8342e Merge pull request #2308 from jeddai/fix-new-print-page
add elvis to handle missing metaStorage
2022-08-31 08:26:37 -04:00
Trevor Buckner
0831c68e2d Merge pull request #2305 from G-Ambatte/userPage-removeAutofocus-#2121
[UserPage] Remove autofocus from filter textbox
2022-08-31 08:24:20 -04:00
Trevor Buckner
4ad674040d Merge pull request #2304 from G-Ambatte/userPage-fixSortContainerPosition-#2303
[UserPage] Fix sort container position when scroll bar absent
2022-08-31 08:22:05 -04:00
Trevor Buckner
052fd4132b Merge pull request #2302 from G-Ambatte/userPage-changeRenderer
[UserPage] Change UserPage CSS
2022-08-31 08:19:53 -04:00
dependabot[bot]
6c54c0a960 Bump mongoose from 6.5.3 to 6.5.4
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.5.3 to 6.5.4.
- [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/6.5.3...6.5.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-31 03:02:06 +00:00
Trevor Buckner
17704e5010 Immediately save brew to localstorage upon page load 2022-08-30 22:50:04 -04:00
Charlie Humphreys
59451f47e6 add elvis to handle missing metaStorage 2022-08-30 19:20:32 -05:00
dependabot[bot]
f8ea556ed5 Bump jest from 28.1.3 to 29.0.1
Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 28.1.3 to 29.0.1.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v29.0.1/packages/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-29 15:09:18 +00:00
Trevor Buckner
9a60d60b6d Merge pull request #2299 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-react-7.31.1
Bump eslint-plugin-react from 7.31.0 to 7.31.1
2022-08-29 11:06:50 -04:00
dependabot[bot]
4c50f60484 Bump eslint-plugin-react from 7.31.0 to 7.31.1
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.31.0 to 7.31.1.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.31.0...v7.31.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-29 15:04:30 +00:00
Trevor Buckner
e6d034b163 Merge pull request #2298 from naturalcrit/dependabot/npm_and_yarn/eslint-8.23.0
Bump eslint from 8.22.0 to 8.23.0
2022-08-29 11:03:00 -04:00
G.Ambatte
7034da03ab Remove autofocus from filter textbox 2022-08-29 21:57:31 +12:00
G.Ambatte
289fcc531d Fix sort container position when scroll bar absent 2022-08-29 21:50:38 +12:00
G.Ambatte
4e5f86e8b6 Change UserPage CSS 2022-08-29 21:23:18 +12:00
G.Ambatte
a25c7a5ccd Load from local storage working without errors 2022-08-29 20:39:16 +12:00
dependabot[bot]
1fb0b694f6 Bump eslint from 8.22.0 to 8.23.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.22.0 to 8.23.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.22.0...v8.23.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-29 03:01:18 +00:00
G.Ambatte
f93d46d2b1 Merge branch 'addUserPageCollapse-#1797' of https://github.com/G-Ambatte/homebrewery into addUserPageCollapse-#1797 2022-08-29 10:12:56 +12:00
G.Ambatte
4bb5e96c42 Initial pass at visibility functionality 2022-08-29 10:12:40 +12:00
Trevor Buckner
0811da79c4 Merge pull request #2297 from jeddai/fix-query-params
update WithRoute to handle query params correctly
2022-08-28 15:00:39 -04:00
Charlie Humphreys
17c426cc91 update WithRoute to handle query params correctly 2022-08-28 12:40:56 -05:00
G.Ambatte
4b5b6e3b02 Initial pass at visibility functionality 2022-08-28 23:46:19 +12:00
Trevor Buckner
e40dbf7935 Merge pull request #2292 from naturalcrit/v3.2.0
Up version to 3.2.0
2022-08-27 13:28:56 -04:00
Trevor Buckner
2ea853aeda Up version to 3.2.0 2022-08-27 13:28:31 -04:00
Trevor Buckner
215b64f5a6 Merge pull request #2287 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.5.3
Bump mongoose from 6.5.2 to 6.5.3
2022-08-27 13:05:57 -04:00
Trevor Buckner
239526f4ee Merge pull request #2286 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-react-7.31.0
Bump eslint-plugin-react from 7.30.1 to 7.31.0
2022-08-27 13:05:49 -04:00
Trevor Buckner
697d4d98bf Merge pull request #2285 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.18.13
Bump @babel/core from 7.18.10 to 7.18.13
2022-08-27 13:05:37 -04:00
Trevor Buckner
87bc27544b Merge pull request #2290 from naturalcrit/MakeV3Default
Make V3 default setting in /new, and homepage
2022-08-27 13:05:26 -04:00
Trevor Buckner
1bbddacbf3 Merge pull request #2233 from jeddai/document-tags
Document tags
2022-08-27 13:05:09 -04:00
Trevor Buckner
cf2e6aa900 Update notificationPopup.jsx 2022-08-27 13:01:53 -04:00
Charlie Humphreys
6aa9eda5fb update if in stringArrayEditor.jsx componentDidUpdate 2022-08-27 00:52:44 -05:00
Trevor Buckner
3271eae4df Make V3 default setting in /new, and homepage 2022-08-27 01:51:30 -04:00
Charlie Humphreys
5227bbc1d4 add tag length limit, fix tag editing issues 2022-08-26 10:42:34 -05:00
dependabot[bot]
f3cdb0dfc2 Bump mongoose from 6.5.2 to 6.5.3
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.5.2 to 6.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/6.5.2...6.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>
2022-08-25 03:01:34 +00:00
dependabot[bot]
9a6d409800 Bump eslint-plugin-react from 7.30.1 to 7.31.0
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.30.1 to 7.31.0.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.30.1...v7.31.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-25 03:01:07 +00:00
dependabot[bot]
7f343d4634 Bump @babel/core from 7.18.10 to 7.18.13
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.18.10 to 7.18.13.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.13/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-23 03:01:18 +00:00
Trevor Buckner
ed933bdf92 Merge pull request #2273 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.18.10
Bump @babel/plugin-transform-runtime from 7.18.6 to 7.18.10
2022-08-22 21:34:43 -04:00
Trevor Buckner
1c4dac6a52 Merge pull request #2255 from naturalcrit/dependabot/npm_and_yarn/jest-28.1.3
Bump jest from 28.1.2 to 28.1.3
2022-08-22 21:34:29 -04:00
Trevor Buckner
f734b29a00 Merge pull request #2284 from naturalcrit/dependabot/npm_and_yarn/marked-4.0.19
Bump marked from 4.0.17 to 4.0.19
2022-08-22 21:33:32 -04:00
dependabot[bot]
889fcb84b2 Bump @babel/plugin-transform-runtime from 7.18.6 to 7.18.10
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.18.6 to 7.18.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.10/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-23 01:33:29 +00:00
Trevor Buckner
fa4db2acfa Merge pull request #2279 from naturalcrit/dependabot/npm_and_yarn/eslint-8.22.0
Bump eslint from 8.19.0 to 8.22.0
2022-08-22 21:33:22 -04:00
Trevor Buckner
167e5c87ae Merge pull request #2283 from naturalcrit/dependabot/npm_and_yarn/googleapis-107.0.0
Bump googleapis from 105.0.0 to 107.0.0
2022-08-22 21:33:13 -04:00
Trevor Buckner
42db46fa33 Merge pull request #2276 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.5.2
Bump mongoose from 6.4.4 to 6.5.2
2022-08-22 21:32:51 -04:00
Trevor Buckner
257920d9db Merge pull request #2272 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.18.10
Bump @babel/preset-env from 7.18.6 to 7.18.10
2022-08-22 21:32:08 -04:00
Trevor Buckner
88a09415e5 Merge pull request #2271 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.18.10
Bump @babel/core from 7.18.6 to 7.18.10
2022-08-22 21:31:56 -04:00
dependabot[bot]
a86f5232cc Bump marked from 4.0.17 to 4.0.19
Bumps [marked](https://github.com/markedjs/marked) from 4.0.17 to 4.0.19.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v4.0.17...v4.0.19)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 03:01:12 +00:00
dependabot[bot]
4fa0d701c9 Bump googleapis from 105.0.0 to 107.0.0
Bumps [googleapis](https://github.com/googleapis/google-api-nodejs-client) from 105.0.0 to 107.0.0.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/googleapis-v105.0.0...googleapis-v107.0.0)

---
updated-dependencies:
- dependency-name: googleapis
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 03:00:49 +00:00
dependabot[bot]
2544563fea Bump eslint from 8.19.0 to 8.22.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.19.0 to 8.22.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.19.0...v8.22.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 03:01:04 +00:00
dependabot[bot]
65f943bc21 Bump mongoose from 6.4.4 to 6.5.2
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.4.4 to 6.5.2.
- [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/6.4.4...6.5.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-10 03:01:14 +00:00
Charlie Humphreys
ae9eef4fba update location of tags type rewrite 2022-08-05 15:37:22 -05:00
dependabot[bot]
539fb8365f Bump @babel/preset-env from 7.18.6 to 7.18.10
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.18.6 to 7.18.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.10/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-02 03:01:49 +00:00
dependabot[bot]
0e65685b8e Bump @babel/core from 7.18.6 to 7.18.10
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.18.6 to 7.18.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.10/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-02 03:01:18 +00:00
dependabot[bot]
a3038868b9 Bump jest from 28.1.2 to 28.1.3
Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 28.1.2 to 28.1.3.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v28.1.3/packages/jest)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-14 03:01:19 +00:00
Trevor Buckner
80334a1649 Merge pull request #2252 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.4.4
Bump mongoose from 6.4.2 to 6.4.4
2022-07-08 14:19:16 -04:00
dependabot[bot]
3fe43a1f4d Bump mongoose from 6.4.2 to 6.4.4
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.4.2 to 6.4.4.
- [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/6.4.2...6.4.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-08 17:45:19 +00:00
Trevor Buckner
b257b4c0fc Merge pull request #2251 from naturalcrit/dependabot/npm_and_yarn/moment-2.29.4
Bump moment from 2.29.3 to 2.29.4
2022-07-08 13:44:39 -04:00
dependabot[bot]
10cc040f16 Bump moment from 2.29.3 to 2.29.4
Bumps [moment](https://github.com/moment/moment) from 2.29.3 to 2.29.4.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.3...2.29.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 03:01:21 +00:00
Trevor Buckner
985f4abb45 Merge pull request #2232 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-react-7.30.1
Bump eslint-plugin-react from 7.30.0 to 7.30.1
2022-07-05 20:53:07 -04:00
Trevor Buckner
e20fa09170 Merge pull request #2239 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.18.6
Bump @babel/plugin-transform-runtime from 7.18.5 to 7.18.6
2022-07-05 20:52:59 -04:00
Trevor Buckner
b2a4054561 Merge pull request #2249 from naturalcrit/dependabot/npm_and_yarn/googleapis-105.0.0
Bump googleapis from 104.0.0 to 105.0.0
2022-07-05 20:52:44 -04:00
dependabot[bot]
23e378dcdf Bump googleapis from 104.0.0 to 105.0.0
Bumps [googleapis](https://github.com/googleapis/google-api-nodejs-client) from 104.0.0 to 105.0.0.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/googleapis-v104.0.0...googleapis-v105.0.0)

---
updated-dependencies:
- dependency-name: googleapis
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-05 03:01:08 +00:00
dependabot[bot]
6d6c9ab102 Bump @babel/plugin-transform-runtime from 7.18.5 to 7.18.6
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.18.5 to 7.18.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.6/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 05:47:05 +00:00
dependabot[bot]
3f191d5b47 Bump eslint-plugin-react from 7.30.0 to 7.30.1
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.30.0 to 7.30.1.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.30.0...v7.30.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 05:46:21 +00:00
Trevor Buckner
5362cc90f4 Merge pull request #2237 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.18.6
Bump @babel/preset-env from 7.18.2 to 7.18.6
2022-07-04 01:46:00 -04:00
Trevor Buckner
66ae4dc67d Merge pull request #2246 from naturalcrit/dependabot/npm_and_yarn/eslint-8.19.0
Bump eslint from 8.18.0 to 8.19.0
2022-07-04 01:45:52 -04:00
Trevor Buckner
7d8890a61a Merge pull request #2247 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.4.2
Bump mongoose from 6.4.1 to 6.4.2
2022-07-04 01:45:45 -04:00
Trevor Buckner
0697673382 Merge pull request #2248 from naturalcrit/dependabot/npm_and_yarn/supertest-6.2.4
Bump supertest from 6.2.3 to 6.2.4
2022-07-04 01:45:38 -04:00
dependabot[bot]
1646fa14e6 Bump supertest from 6.2.3 to 6.2.4
Bumps [supertest](https://github.com/visionmedia/supertest) from 6.2.3 to 6.2.4.
- [Release notes](https://github.com/visionmedia/supertest/releases)
- [Commits](https://github.com/visionmedia/supertest/compare/v6.2.3...v6.2.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 03:02:11 +00:00
dependabot[bot]
2f104712ed Bump mongoose from 6.4.1 to 6.4.2
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.4.1 to 6.4.2.
- [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/6.4.1...6.4.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 03:01:58 +00:00
dependabot[bot]
c23ba26171 Bump eslint from 8.18.0 to 8.19.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.18.0 to 8.19.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.18.0...v8.19.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 03:01:30 +00:00
dependabot[bot]
fa59f8b156 Bump @babel/preset-env from 7.18.2 to 7.18.6
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.18.2 to 7.18.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.6/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-02 14:20:49 +00:00
Trevor Buckner
bc66ad0221 Merge pull request #2238 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.4.1
Bump mongoose from 6.4.0 to 6.4.1
2022-07-02 10:19:31 -04:00
Trevor Buckner
08c52e4bac Merge pull request #2240 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.18.6
Bump @babel/core from 7.18.5 to 7.18.6
2022-07-02 10:19:13 -04:00
Trevor Buckner
0741066554 Merge pull request #2241 from naturalcrit/dependabot/npm_and_yarn/babel/preset-react-7.18.6
Bump @babel/preset-react from 7.17.12 to 7.18.6
2022-07-02 10:19:05 -04:00
Trevor Buckner
24458ad2af Merge pull request #2242 from naturalcrit/dependabot/npm_and_yarn/jest-28.1.2
Bump jest from 28.1.1 to 28.1.2
2022-07-02 10:18:57 -04:00
dependabot[bot]
e38975177f Bump jest from 28.1.1 to 28.1.2
Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 28.1.1 to 28.1.2.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v28.1.2/packages/jest)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-30 03:01:28 +00:00
dependabot[bot]
abebe1b3a0 Bump @babel/preset-react from 7.17.12 to 7.18.6
Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.17.12 to 7.18.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.6/packages/babel-preset-react)

---
updated-dependencies:
- dependency-name: "@babel/preset-react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-28 03:02:41 +00:00
dependabot[bot]
ae8942d989 Bump @babel/core from 7.18.5 to 7.18.6
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.18.5 to 7.18.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.6/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-28 03:02:03 +00:00
dependabot[bot]
3cded29729 Bump mongoose from 6.4.0 to 6.4.1
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.4.0 to 6.4.1.
- [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/6.4.0...6.4.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-28 03:01:32 +00:00
Charlie Humphreys
c7cfa86205 remove migration in favor of as-edited approach 2022-06-25 00:43:47 -05:00
Charlie Humphreys
8ee832e633 add MIGRATE environment variable 2022-06-25 00:00:41 -05:00
Charlie Humphreys
c7d5d6800b add close button for string array edit input, update styles 2022-06-24 23:48:32 -05:00
Charlie Humphreys
e963672b65 update tag setup to be based on the latest version of the stringArrayEditor.jsx 2022-06-24 23:31:20 -05:00
Charlie Humphreys
1965218e74 Merge branch 'master' into document-tags
# Conflicts:
#	client/homebrew/editor/metadataEditor/metadataEditor.jsx
#	server/homebrew.api.js
2022-06-24 22:55:35 -05:00
Trevor Buckner
3649099d00 Merge pull request #2229 from naturalcrit/dependabot/npm_and_yarn/googleapis-104.0.0
Bump googleapis from 103.0.0 to 104.0.0
2022-06-22 00:24:28 -04:00
Trevor Buckner
5d7a46abfe Merge pull request #2228 from naturalcrit/dependabot/npm_and_yarn/codemirror-5.65.6
Bump codemirror from 5.65.5 to 5.65.6
2022-06-22 00:24:14 -04:00
dependabot[bot]
209f0ec32a Bump codemirror from 5.65.5 to 5.65.6
Bumps [codemirror](https://github.com/codemirror/CodeMirror) from 5.65.5 to 5.65.6.
- [Release notes](https://github.com/codemirror/CodeMirror/releases)
- [Changelog](https://github.com/codemirror/codemirror5/blob/5.65.6/CHANGELOG.md)
- [Commits](https://github.com/codemirror/CodeMirror/compare/5.65.5...5.65.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-22 04:21:42 +00:00
dependabot[bot]
b336a6b6a3 Bump googleapis from 103.0.0 to 104.0.0
Bumps [googleapis](https://github.com/googleapis/google-api-nodejs-client) from 103.0.0 to 104.0.0.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/googleapis-v103.0.0...googleapis-v104.0.0)

---
updated-dependencies:
- dependency-name: googleapis
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-22 04:21:26 +00:00
Trevor Buckner
32833459e4 Merge pull request #2230 from naturalcrit/dependabot/npm_and_yarn/shell-quote-1.7.3
Bump shell-quote from 1.7.2 to 1.7.3
2022-06-22 00:20:18 -04:00
dependabot[bot]
0e450f724b Bump shell-quote from 1.7.2 to 1.7.3
Bumps [shell-quote](https://github.com/substack/node-shell-quote) from 1.7.2 to 1.7.3.
- [Release notes](https://github.com/substack/node-shell-quote/releases)
- [Changelog](https://github.com/substack/node-shell-quote/blob/master/CHANGELOG.md)
- [Commits](https://github.com/substack/node-shell-quote/compare/v1.7.2...1.7.3)

---
updated-dependencies:
- dependency-name: shell-quote
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-22 04:18:40 +00:00
Trevor Buckner
c4ee39461e Merge pull request #2223 from jlgraves/master
Implements issue #2215 - spell-casting ability
2022-06-21 15:40:54 -04:00
Trevor Buckner
586ff67fa0 Small tweaks 2022-06-21 15:38:20 -04:00
jlgraves
dbbc529a57 Merge branch 'master' into master 2022-06-20 15:34:00 -07:00
jlgraves
a4c80f2bbf added review changes requested
- correctly centred the legacy snippet
- fixed a couple small typos in both files
2022-06-20 15:33:51 -07:00
Trevor Buckner
a76715d2b3 Merge pull request #2224 from jeddai/update-react-router-dom
react-router-dom 5->6 upgrade
2022-06-20 17:27:19 -04:00
Trevor Buckner
9073435ff3 Update package-lock.json 2022-06-20 17:26:52 -04:00
Trevor Buckner
802e798492 Merge branch 'master' into update-react-router-dom 2022-06-20 17:24:59 -04:00
Charlie Humphreys
c0405fae08 add catch-all route 2022-06-20 13:19:43 -05:00
Charlie Humphreys
755b9dcc89 update based on feedback, remove query-string dependency, add/move favicon url 2022-06-20 12:53:26 -05:00
Trevor Buckner
038d0c5b68 Merge pull request #1699 from naturalcrit/v3ClassTableTweaks
Allow wide classTables to bleed into top margin
2022-06-20 11:36:38 -04:00
Trevor Buckner
5ac65245b7 Merge pull request #2226 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.4.0
Bump mongoose from 6.3.8 to 6.4.0
2022-06-19 23:12:53 -04:00
Trevor Buckner
06cbcb047b Merge pull request #2225 from naturalcrit/dependabot/npm_and_yarn/eslint-8.18.0
Bump eslint from 8.17.0 to 8.18.0
2022-06-19 23:12:45 -04:00
dependabot[bot]
60811a3295 Bump mongoose from 6.3.8 to 6.4.0
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.3.8 to 6.4.0.
- [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/6.3.8...6.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-20 03:01:19 +00:00
dependabot[bot]
5ca2899b54 Bump eslint from 8.17.0 to 8.18.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.17.0 to 8.18.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.17.0...v8.18.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-20 03:00:52 +00:00
Charlie Humphreys
60a372de68 update react-router-dom to 6.3.0, add WithRoute function component wrapper 2022-06-18 16:20:51 -05:00
jlgraves
01c16b4a1c Updating legacy class feature
Separated into two commits - one for new, one for legacy
2022-06-18 12:26:07 -07:00
jlgraves
2ebfd19169 Adding in spell-casting ability
Re issue #2215 added spellcasting ability modifier
2022-06-18 11:30:35 -07:00
Trevor Buckner
f7d8c6434f Small tweaks 2022-06-16 22:41:04 -04:00
Trevor Buckner
936fdff871 Update CSS, Shrink vertical border margins slightly 2022-06-16 22:13:52 -04:00
Trevor Buckner
da3460f3bf Merge branch 'master' into v3ClassTableTweaks 2022-06-16 22:08:01 -04:00
Trevor Buckner
8ea58d22ba Merge pull request #2218 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.18.5
Bump @babel/core from 7.18.2 to 7.18.5
2022-06-16 15:31:18 -04:00
dependabot[bot]
4f9ac9cad0 Bump @babel/core from 7.18.2 to 7.18.5
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.18.2 to 7.18.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.5/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-16 03:47:29 +00:00
Trevor Buckner
7dafd3ee77 Merge pull request #2217 from naturalcrit/dependabot/npm_and_yarn/marked-4.0.17
Bump marked from 4.0.16 to 4.0.17
2022-06-15 23:47:06 -04:00
Trevor Buckner
4e403dd0e9 Merge pull request #2220 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.18.5
Bump @babel/plugin-transform-runtime from 7.18.2 to 7.18.5
2022-06-15 23:46:46 -04:00
dependabot[bot]
530d1bee8d Bump marked from 4.0.16 to 4.0.17
Bumps [marked](https://github.com/markedjs/marked) from 4.0.16 to 4.0.17.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v4.0.16...v4.0.17)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-16 03:45:26 +00:00
Trevor Buckner
e8c7bcfee9 Merge pull request #2219 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.3.8
Bump mongoose from 6.3.6 to 6.3.8
2022-06-15 23:44:14 -04:00
Trevor Buckner
6ed12f41f9 Merge pull request #2222 from naturalcrit/dependabot/npm_and_yarn/googleapis-103.0.0
Bump googleapis from 101.0.0 to 103.0.0
2022-06-15 23:44:07 -04:00
dependabot[bot]
a754959a7d Bump googleapis from 101.0.0 to 103.0.0
Bumps [googleapis](https://github.com/googleapis/google-api-nodejs-client) from 101.0.0 to 103.0.0.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/googleapis-v101.0.0...googleapis-v103.0.0)

---
updated-dependencies:
- dependency-name: googleapis
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-16 03:01:32 +00:00
dependabot[bot]
d0334c69a2 Bump @babel/plugin-transform-runtime from 7.18.2 to 7.18.5
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.18.2 to 7.18.5.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.5/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-14 03:02:23 +00:00
dependabot[bot]
2063d12c42 Bump mongoose from 6.3.6 to 6.3.8
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.3.6 to 6.3.8.
- [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/6.3.6...6.3.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-14 03:02:02 +00:00
Trevor Buckner
5601b932c8 Fix Clone to New broken with #2114 2022-06-09 01:09:18 -04:00
Trevor Buckner
204b379fcb Merge pull request #2114 from jeddai/google-document-stubs
Google Drive document stubs
2022-06-09 00:37:49 -04:00
Trevor Buckner
5f7abe2a8f Merge branch 'master' into pr/2114 2022-06-09 00:33:44 -04:00
Trevor Buckner
385a22f199 Merge pull request #2214 from naturalcrit/3.1.1
v3.1.1
2022-06-09 00:27:51 -04:00
Trevor Buckner
1045867d73 Up version to 3.1.1 2022-06-09 00:26:22 -04:00
Trevor Buckner
0061e44339 3.1.1 2022-06-09 00:11:57 -04:00
Trevor Buckner
29eb2fe39e Merge pull request #2211 from naturalcrit/FixOverlappingDecorations
Fix Overlapping ClassTable Decorations
2022-06-09 00:09:35 -04:00
Trevor Buckner
f9af27b159 Merge pull request #2208 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.3.6
Bump mongoose from 6.3.5 to 6.3.6
2022-06-09 00:05:29 -04:00
Trevor Buckner
86f0abbfd1 Merge pull request #2209 from naturalcrit/dependabot/npm_and_yarn/googleapis-101.0.0
Bump googleapis from 100.0.0 to 101.0.0
2022-06-09 00:05:18 -04:00
Trevor Buckner
e2a46c4883 Merge pull request #2210 from naturalcrit/dependabot/npm_and_yarn/jest-28.1.1
Bump jest from 28.1.0 to 28.1.1
2022-06-09 00:04:43 -04:00
Trevor Buckner
389bcf1bbd Use z-index instead of translateZ 2022-06-08 00:44:58 -04:00
dependabot[bot]
b3ccbc183d Bump jest from 28.1.0 to 28.1.1
Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 28.1.0 to 28.1.1.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v28.1.1/packages/jest)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-08 03:02:34 +00:00
dependabot[bot]
362cb4f728 Bump googleapis from 100.0.0 to 101.0.0
Bumps [googleapis](https://github.com/googleapis/google-api-nodejs-client) from 100.0.0 to 101.0.0.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/googleapis-v100.0.0...googleapis-v101.0.0)

---
updated-dependencies:
- dependency-name: googleapis
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-08 03:01:43 +00:00
dependabot[bot]
7bc2e5a71e Bump mongoose from 6.3.5 to 6.3.6
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.3.5 to 6.3.6.
- [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/6.3.5...6.3.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-08 03:00:49 +00:00
Charlie Humphreys
890fbcc250 Merge branch 'master' into google-document-stubs 2022-06-06 15:04:24 +00:00
Charlie Humphreys
18ce232be9 Merge branch 'google-document-stubs' of https://github.com/jeddai/homebrewery into google-document-stubs 2022-06-06 15:01:10 +00:00
Charlie Humphreys
92b3f8252e fix data reuse and add field to projection 2022-06-06 14:59:40 +00:00
Trevor Buckner
b1066a1df5 Merge pull request #2206 from naturalcrit/v3.1.0
Up version to 3.1.0
2022-06-06 00:45:12 -04:00
Trevor Buckner
111ade7719 Merge pull request #2205 from naturalcrit/dependabot/npm_and_yarn/eslint-8.17.0
Bump eslint from 8.16.0 to 8.17.0
2022-06-06 00:44:59 -04:00
Trevor Buckner
a60b8f9acc Up version to 3.1.0 2022-06-06 00:44:29 -04:00
Trevor Buckner
8b55e55277 Merge pull request #2162 from G-Ambatte/fixBrewJump
Brew & Source Navigation
2022-06-06 00:20:58 -04:00
dependabot[bot]
4b57745275 Bump eslint from 8.16.0 to 8.17.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.16.0 to 8.17.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.16.0...v8.17.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 03:01:42 +00:00
G.Ambatte
4f69b1e7e0 Remove unused toTop function 2022-06-05 11:13:35 +12:00
G.Ambatte
2ac9c190a9 Remove commented out shortcut keys 2022-06-05 11:11:58 +12:00
G.Ambatte
d04df9aeb0 Remove redundant isStyle check 2022-06-05 10:10:59 +12:00
G.Ambatte
6bc5edd33f Remove unnecessary isMeta check 2022-06-05 10:03:03 +12:00
G.Ambatte
6c8cdffd8f Fix typo 2022-06-04 19:52:41 +12:00
G.Ambatte
ae6ad1eaff Prune unnecessary styles 2022-06-04 18:40:05 +12:00
G.Ambatte
ee3c521094 Change throttle options 2022-06-04 18:35:22 +12:00
G.Ambatte
ff2268871d Throttle brew move function 2022-06-04 17:54:35 +12:00
G.Ambatte
1d0cceda04 Eliminate unnecessary window.frames calls 2022-06-04 17:09:25 +12:00
G.Ambatte
4e8cbf621b Add brew bounce animation 2022-06-04 16:38:32 +12:00
Trevor Buckner
c9a182f1e2 Add Tooltips to arrow buttons 2022-06-03 15:38:26 -04:00
Trevor Buckner
df41b58441 Smooth scroll editor Panel, and flash target line 2022-06-03 13:32:04 -04:00
Trevor Buckner
bd681dffae Fix scrollpastend not working
Since the `require('codemirror/addon/scroll/scrollpastend.js');` line is inside of an `if()` block, it doesn't get compiled in the same way. We have to specify it in the `libs` array of our build script so our bundler can allow it to be loaded dynamically.
2022-06-02 23:24:41 -04:00
Trevor Buckner
f21d79d4e0 Merge pull request #2200 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.3.5
Bump mongoose from 6.3.4 to 6.3.5
2022-06-02 12:15:34 -04:00
Trevor Buckner
87db57239c Merge pull request #2199 from naturalcrit/dependabot/npm_and_yarn/codemirror-5.65.5
Bump codemirror from 5.65.4 to 5.65.5
2022-06-02 12:15:25 -04:00
G.Ambatte
0dbe84a91a Update style 2022-06-02 14:09:41 +12:00
G.Ambatte
e9adc4de82 Highlight target line during moveSource 2022-06-02 13:50:37 +12:00
G.Ambatte
0c0d817cc2 Add scrollPastEnd to CodeMirror 2022-06-02 13:49:27 +12:00
dependabot[bot]
6c307856e1 Bump mongoose from 6.3.4 to 6.3.5
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.3.4 to 6.3.5.
- [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/6.3.4...6.3.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-31 03:01:45 +00:00
dependabot[bot]
24248c2dc6 Bump codemirror from 5.65.4 to 5.65.5
Bumps [codemirror](https://github.com/codemirror/CodeMirror) from 5.65.4 to 5.65.5.
- [Release notes](https://github.com/codemirror/CodeMirror/releases)
- [Changelog](https://github.com/codemirror/CodeMirror/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codemirror/CodeMirror/compare/5.65.4...5.65.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-31 03:01:02 +00:00
Trevor Buckner
fe374f7de0 Merge pull request #2187 from naturalcrit/dependabot/npm_and_yarn/eslint-8.16.0
Bump eslint from 8.15.0 to 8.16.0
2022-05-29 11:59:22 -04:00
Trevor Buckner
3e9ecc2b34 Merge pull request #2194 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.18.2
Bump @babel/plugin-transform-runtime from 7.18.0 to 7.18.2
2022-05-29 11:59:09 -04:00
dependabot[bot]
bce9cc2586 Bump eslint from 8.15.0 to 8.16.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.15.0 to 8.16.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.15.0...v8.16.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-29 15:58:06 +00:00
dependabot[bot]
7de747b264 Bump @babel/plugin-transform-runtime from 7.18.0 to 7.18.2
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.18.0 to 7.18.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.2/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-29 15:58:02 +00:00
Trevor Buckner
d14466f1d3 Merge pull request #2193 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.18.2
Bump @babel/core from 7.18.0 to 7.18.2
2022-05-29 11:57:24 -04:00
Trevor Buckner
97a0a17149 Merge pull request #2192 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.18.2
Bump @babel/preset-env from 7.18.0 to 7.18.2
2022-05-29 11:57:15 -04:00
G.Ambatte
bb1fba27c2 Set a default userSetDividerPos 2022-05-29 16:26:30 +12:00
G.Ambatte
eff2ec20b2 Fall back to current divider position on resizing 2022-05-29 16:19:58 +12:00
G.Ambatte
4cc3dd93e2 Move state change to handleViewChange 2022-05-29 16:16:48 +12:00
G.Ambatte
ab8dd8ae76 Merge branch 'master' into fixBrewJump 2022-05-29 16:00:41 +12:00
G.Ambatte
08db2e8492 Hide divider arrows when not required 2022-05-29 15:49:37 +12:00
G.Ambatte
7b2486e411 Use RegEx for text.split 2022-05-29 15:31:57 +12:00
G.Ambatte
03bcbee1fc Apply suggested regex
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2022-05-29 15:27:02 +12:00
G.Ambatte
4e5daf583a Remove from snippet bar 2022-05-29 15:24:02 +12:00
G.Ambatte
eca39369de Initial pass at split pane button functionality 2022-05-29 15:18:35 +12:00
Trevor Buckner
45950cb8b4 Merge branch 'google-document-stubs' of https://github.com/jeddai/homebrewery into pr/2114 2022-05-28 23:10:53 -04:00
Trevor Buckner
f1f82abdb4 Merge branch 'master' into pr/2114 2022-05-28 23:10:14 -04:00
Trevor Buckner
69ea9a8f94 Merge pull request #2197 from naturalcrit/FixPublishedPropNotFetched
Fetch `published` prop for brew on user page
2022-05-28 22:59:10 -04:00
Trevor Buckner
7eaec80d96 Fetch published prop for brew on user page 2022-05-28 22:57:31 -04:00
G.Ambatte
3ccd1ebb7b Merge branch 'master' into fixBrewJump 2022-05-29 14:17:11 +12:00
G.Ambatte
db5e4fc36c Fix button position with default divider position 2022-05-29 13:49:08 +12:00
G.Ambatte
160cfcce4d Change for line consistency when moving to page 1 2022-05-29 13:48:36 +12:00
Trevor Buckner
ca8bd448a2 Merge pull request #2196 from naturalcrit/Remove-Duplicate-Column-Break-for-Chrome-102
Remove `break-before: column`
2022-05-27 21:22:40 -04:00
Trevor Buckner
fdaf56b91a Remove break-before: column 2022-05-27 21:19:16 -04:00
Charlie Humphreys
bade09c24c linting 2022-05-26 04:46:07 +00:00
Charlie Humphreys
b54b7e317e pre-filter brews list when finding google brews 2022-05-26 04:45:50 +00:00
Charlie Humphreys
627c52e845 Add comments and adjust google brew for loop 2022-05-26 04:40:33 +00:00
dependabot[bot]
53367579f4 Bump @babel/core from 7.18.0 to 7.18.2
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.18.0 to 7.18.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.2/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-26 03:33:29 +00:00
dependabot[bot]
9ebe5fa989 Bump @babel/preset-env from 7.18.0 to 7.18.2
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.18.0 to 7.18.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.2/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-26 03:32:33 +00:00
Charlie Humphreys
55c91217ab fix deletion, update urls 2022-05-25 03:03:43 +00:00
G.Ambatte
3f852ccff3 Merge branch 'master' into fixBrewJump 2022-05-23 07:59:06 +12:00
Charlie Humphreys
7691e4d24e Merge branch 'master' into google-document-stubs 2022-05-22 00:40:57 +00:00
Trevor Buckner
46853a121c Merge pull request #2183 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.18.0
Bump @babel/plugin-transform-runtime from 7.17.12 to 7.18.0
2022-05-21 18:15:41 -04:00
Trevor Buckner
757ba04d67 Merge pull request #2186 from naturalcrit/dependabot/npm_and_yarn/codemirror-5.65.4
Bump codemirror from 5.65.3 to 5.65.4
2022-05-21 18:15:33 -04:00
dependabot[bot]
fb40817826 Bump codemirror from 5.65.3 to 5.65.4
Bumps [codemirror](https://github.com/codemirror/CodeMirror) from 5.65.3 to 5.65.4.
- [Release notes](https://github.com/codemirror/CodeMirror/releases)
- [Changelog](https://github.com/codemirror/CodeMirror/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codemirror/CodeMirror/compare/5.65.3...5.65.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-20 20:46:15 +00:00
dependabot[bot]
7ca6d362f3 Bump @babel/plugin-transform-runtime from 7.17.12 to 7.18.0
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.17.12 to 7.18.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.0/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-20 20:45:04 +00:00
Trevor Buckner
7e124641e7 Merge pull request #2184 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.18.0
Bump @babel/preset-env from 7.17.12 to 7.18.0
2022-05-20 16:43:33 -04:00
Trevor Buckner
d68c306c95 Merge pull request #2182 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.3.4
Bump mongoose from 6.3.3 to 6.3.4
2022-05-20 16:43:15 -04:00
Trevor Buckner
2e5cfaea1f Merge pull request #2181 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.18.0
Bump @babel/core from 7.17.12 to 7.18.0
2022-05-20 16:43:07 -04:00
dependabot[bot]
87c9650f17 Bump @babel/preset-env from 7.17.12 to 7.18.0
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.17.12 to 7.18.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.0/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-20 03:02:11 +00:00
dependabot[bot]
fbf02c3393 Bump mongoose from 6.3.3 to 6.3.4
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.3.3 to 6.3.4.
- [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/6.3.3...6.3.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-20 03:01:26 +00:00
dependabot[bot]
f5ca950b0b Bump @babel/core from 7.17.12 to 7.18.0
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.17.12 to 7.18.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.18.0/packages/babel-core)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-20 03:01:10 +00:00
Trevor Buckner
aea9b55a01 Merge pull request #2179 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-react-7.30.0
Bump eslint-plugin-react from 7.29.4 to 7.30.0
2022-05-19 11:06:20 -04:00
dependabot[bot]
dc8c1c359d Bump eslint-plugin-react from 7.29.4 to 7.30.0
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.29.4 to 7.30.0.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.29.4...v7.30.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-19 03:01:14 +00:00
Trevor Buckner
c1d8c8f341 Merge pull request #2176 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.17.12
Bump @babel/preset-env from 7.17.10 to 7.17.12
2022-05-18 16:28:47 -04:00
Trevor Buckner
ec07feee80 Merge pull request #2178 from naturalcrit/dependabot/npm_and_yarn/marked-4.0.16
Bump marked from 4.0.14 to 4.0.16
2022-05-18 16:28:37 -04:00
dependabot[bot]
52835a5bbd Bump @babel/preset-env from 7.17.10 to 7.17.12
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.17.10 to 7.17.12.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.17.12/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 20:20:22 +00:00
Trevor Buckner
18d5d96ddb Merge pull request #2174 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.17.12
Bump @babel/plugin-transform-runtime from 7.17.10 to 7.17.12
2022-05-18 16:18:55 -04:00
dependabot[bot]
1323a433d2 Bump marked from 4.0.14 to 4.0.16
Bumps [marked](https://github.com/markedjs/marked) from 4.0.14 to 4.0.16.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v4.0.14...v4.0.16)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 20:18:02 +00:00
Trevor Buckner
4aad03074c Merge pull request #2177 from naturalcrit/dependabot/npm_and_yarn/express-static-gzip-2.1.7
Bump express-static-gzip from 2.1.5 to 2.1.7
2022-05-18 16:17:57 -04:00
dependabot[bot]
cadf0efbd8 Bump @babel/plugin-transform-runtime from 7.17.10 to 7.17.12
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.17.10 to 7.17.12.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.17.12/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 20:17:38 +00:00
Trevor Buckner
53e7c78141 Merge pull request #2173 from naturalcrit/dependabot/npm_and_yarn/babel/preset-react-7.17.12
Bump @babel/preset-react from 7.16.7 to 7.17.12
2022-05-18 16:16:23 -04:00
Trevor Buckner
57687c83e6 Merge pull request #2172 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.17.12
Bump @babel/core from 7.17.10 to 7.17.12
2022-05-18 16:16:14 -04:00
Trevor Buckner
d7fb137263 Merge pull request #2170 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.3.3
Bump mongoose from 6.3.1 to 6.3.3
2022-05-18 16:16:06 -04:00
Trevor Buckner
2493442e3f Merge pull request #2168 from naturalcrit/dependabot/npm_and_yarn/jest-28.1.0
Bump jest from 28.0.3 to 28.1.0
2022-05-18 16:15:56 -04:00
dependabot[bot]
353a438849 Bump jest from 28.0.3 to 28.1.0
Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 28.0.3 to 28.1.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v28.1.0/packages/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 16:24:25 +00:00
dependabot[bot]
37a4d8edca Bump mongoose from 6.3.1 to 6.3.3
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.3.1 to 6.3.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/6.3.1...6.3.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 16:22:58 +00:00
Trevor Buckner
79dff10240 Merge pull request #2167 from naturalcrit/dependabot/npm_and_yarn/eslint-8.15.0
Bump eslint from 8.14.0 to 8.15.0
2022-05-18 12:22:01 -04:00
Trevor Buckner
d7c62b2d38 Merge pull request #2165 from naturalcrit/dependabot/npm_and_yarn/nanoid-3.3.4
Bump nanoid from 3.3.3 to 3.3.4
2022-05-18 12:20:48 -04:00
dependabot[bot]
5f073932ec Bump express-static-gzip from 2.1.5 to 2.1.7
Bumps [express-static-gzip](https://github.com/tkoenig89/express-static-gzip) from 2.1.5 to 2.1.7.
- [Release notes](https://github.com/tkoenig89/express-static-gzip/releases)
- [Commits](https://github.com/tkoenig89/express-static-gzip/compare/v2.1.5...v2.1.7)

---
updated-dependencies:
- dependency-name: express-static-gzip
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 03:00:43 +00:00
dependabot[bot]
63d0d9447f Bump @babel/preset-react from 7.16.7 to 7.17.12
Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.16.7 to 7.17.12.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.17.12/packages/babel-preset-react)

---
updated-dependencies:
- dependency-name: "@babel/preset-react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-17 03:01:18 +00:00
dependabot[bot]
fbd772ecef Bump @babel/core from 7.17.10 to 7.17.12
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.17.10 to 7.17.12.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.17.12/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-17 03:00:48 +00:00
Charlie Humphreys
452aa1feaf lint 2022-05-14 04:19:54 +00:00
Charlie Humphreys
74d22a05d0 swap transferToGoogle to saveToGoogle in a spot I missed 2022-05-14 04:19:36 +00:00
Charlie Humphreys
ac905ddf3f add comments, update query params, adjust code based on feedback 2022-05-14 04:17:39 +00:00
Charlie Humphreys
ff885dc6c2 Merge branch 'master' into google-document-stubs 2022-05-11 23:35:31 -05:00
Charlie Humphreys
01441e0610 adjust code based on feedback 2022-05-11 23:34:48 -05:00
G.Ambatte
80fa48e592 Remove redundant variable
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2022-05-11 15:48:03 +12:00
G.Ambatte
9f7ee39b09 Use BoundingRect.bottom to determine page 2022-05-11 10:46:49 +12:00
G.Ambatte
412ac5f331 Change to getBoundingClientRect().bottom 2022-05-09 23:39:04 +12:00
G.Ambatte
7c0e702ead Remove a loop from sourceJump 2022-05-09 23:20:16 +12:00
G.Ambatte
02c8bf7292 Change to smooth scrolling from auto 2022-05-09 22:21:00 +12:00
G.Ambatte
b26ff9eb00 Shift to getBoundingClientRect().height 2022-05-09 22:20:35 +12:00
G.Ambatte
be0b1abe41 Adjust \page check for renderer 2022-05-09 20:57:43 +12:00
G.Ambatte
3c36b7f328 Limit Style tab source jumping 2022-05-09 20:23:39 +12:00
G.Ambatte
3d9704a392 Fix typo
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2022-05-09 19:47:04 +12:00
dependabot[bot]
d798cb1407 Bump eslint from 8.14.0 to 8.15.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.14.0 to 8.15.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.14.0...v8.15.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 03:08:22 +00:00
dependabot[bot]
ac6af3cbcc Bump nanoid from 3.3.3 to 3.3.4
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.3 to 3.3.4.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.3...3.3.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-04 03:00:53 +00:00
G.Ambatte
e84f68aa15 Minor styling adjustments 2022-05-04 07:54:15 +12:00
G.Ambatte
af3a403971 Add moveBrew and moveSource function calls 2022-05-03 22:33:05 +12:00
G.Ambatte
7034f1d2d5 Add sourceJump function 2022-05-03 22:32:30 +12:00
G.Ambatte
a56601196d Add divider buttons 2022-05-03 17:24:58 +12:00
G.Ambatte
451f06ca74 Fix getCurrentPage 2022-05-03 17:24:37 +12:00
G.Ambatte
f202e45e49 Shift to [].includes 2022-05-03 13:48:19 +12:00
G.Ambatte
010309b04f Add toTop button to SnippetBar 2022-05-03 13:36:27 +12:00
G.Ambatte
f6db66b28c Add brewJump and sourceJump functions 2022-05-03 13:36:03 +12:00
G.Ambatte
cde611eed5 Add ID to iFrame 2022-05-03 11:50:04 +12:00
Trevor Buckner
b9f2517696 Merge pull request #2159 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.17.10
Bump @babel/preset-env from 7.16.11 to 7.17.10
2022-04-29 16:40:11 -04:00
Trevor Buckner
5709a15f52 Merge pull request #2157 from naturalcrit/dependabot/npm_and_yarn/express-4.18.1
Bump express from 4.17.3 to 4.18.1
2022-04-29 16:40:02 -04:00
Trevor Buckner
27d1f6daa6 Merge pull request #2160 from naturalcrit/dependabot/npm_and_yarn/jest-28.0.3
Bump jest from 27.5.1 to 28.0.3
2022-04-29 16:39:53 -04:00
dependabot[bot]
ef6f8b4433 Bump @babel/preset-env from 7.16.11 to 7.17.10
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.16.11 to 7.17.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.17.10/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-29 20:38:34 +00:00
dependabot[bot]
d1e8223843 Bump jest from 27.5.1 to 28.0.3
Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 27.5.1 to 28.0.3.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v28.0.3/packages/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-29 20:37:28 +00:00
Trevor Buckner
85e28c201f Merge pull request #2158 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.17.10
Bump @babel/plugin-transform-runtime from 7.17.0 to 7.17.10
2022-04-29 16:37:27 -04:00
dependabot[bot]
e4a429180d Bump @babel/plugin-transform-runtime from 7.17.0 to 7.17.10
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.17.0 to 7.17.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.17.10/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-29 20:36:20 +00:00
dependabot[bot]
4b953bc264 Bump express from 4.17.3 to 4.18.1
Bumps [express](https://github.com/expressjs/express) from 4.17.3 to 4.18.1.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.3...4.18.1)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-29 20:35:45 +00:00
Trevor Buckner
e28aaf4fd1 Merge pull request #2156 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.17.10
Bump @babel/core from 7.17.9 to 7.17.10
2022-04-29 16:34:51 -04:00
Trevor Buckner
e54f3c46b7 Merge pull request #2153 from naturalcrit/dependabot/npm_and_yarn/supertest-6.2.3
Bump supertest from 6.2.2 to 6.2.3
2022-04-29 16:31:08 -04:00
dependabot[bot]
9a62393df1 Bump @babel/core from 7.17.9 to 7.17.10
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.17.9 to 7.17.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.17.10/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-29 20:30:36 +00:00
Trevor Buckner
8f8b32e873 Merge pull request #2142 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.3.1
Bump mongoose from 6.3.0 to 6.3.1
2022-04-29 16:29:56 -04:00
Trevor Buckner
4465ecd372 Merge pull request #2154 from G-Ambatte/fixUserPageBrews-#2147
Add fields to Mongoose brew query
2022-04-29 16:25:28 -04:00
G.Ambatte
b059bf68b5 Revert change to select method 2022-04-29 10:53:03 +12:00
G.Ambatte
c46c4a9320 Switch to use select method 2022-04-28 20:19:01 +12:00
G.Ambatte
cffe08b785 Add fields to Mongoose query 2022-04-28 11:09:32 +12:00
dependabot[bot]
bac8b53984 Bump supertest from 6.2.2 to 6.2.3
Bumps [supertest](https://github.com/visionmedia/supertest) from 6.2.2 to 6.2.3.
- [Release notes](https://github.com/visionmedia/supertest/releases)
- [Commits](https://github.com/visionmedia/supertest/compare/v6.2.2...v6.2.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-27 03:02:24 +00:00
dependabot[bot]
ee10b10c2d Bump mongoose from 6.3.0 to 6.3.1
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.3.0 to 6.3.1.
- [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/6.3.0...6.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 12:53:03 +00:00
Trevor Buckner
3fb4c5bdd9 Merge pull request #2139 from naturalcrit/dependabot/npm_and_yarn/nanoid-3.3.3
Bump nanoid from 3.3.2 to 3.3.3
2022-04-25 08:52:29 -04:00
dependabot[bot]
08ca061af8 Bump nanoid from 3.3.2 to 3.3.3
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.2...3.3.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 12:26:01 +00:00
Trevor Buckner
fbb092562d Merge pull request #2140 from naturalcrit/dependabot/npm_and_yarn/codemirror-5.65.3
Bump codemirror from 5.65.2 to 5.65.3
2022-04-25 08:25:28 -04:00
Trevor Buckner
1e47f896fe Merge pull request #2148 from naturalcrit/dependabot/npm_and_yarn/eslint-8.14.0
Bump eslint from 8.13.0 to 8.14.0
2022-04-25 08:25:12 -04:00
Trevor Buckner
5d5bf9586e Merge pull request #2138 from naturalcrit/dependabot/npm_and_yarn/fs-extra-10.1.0
Bump fs-extra from 10.0.1 to 10.1.0
2022-04-25 08:24:54 -04:00
Trevor Buckner
f836277f4f Merge pull request #2137 from naturalcrit/dependabot/npm_and_yarn/moment-2.29.3
Bump moment from 2.29.2 to 2.29.3
2022-04-25 08:24:45 -04:00
Trevor Buckner
09e1702dd2 Merge pull request #2133 from naturalcrit/dependabot/npm_and_yarn/nconf-0.12.0
Bump nconf from 0.11.4 to 0.12.0
2022-04-25 08:24:37 -04:00
dependabot[bot]
ac18acc2f4 Bump eslint from 8.13.0 to 8.14.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.13.0 to 8.14.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.13.0...v8.14.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 03:17:04 +00:00
dependabot[bot]
3dbc90b3b8 Bump codemirror from 5.65.2 to 5.65.3
Bumps [codemirror](https://github.com/codemirror/CodeMirror) from 5.65.2 to 5.65.3.
- [Release notes](https://github.com/codemirror/CodeMirror/releases)
- [Changelog](https://github.com/codemirror/CodeMirror/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codemirror/CodeMirror/compare/5.65.2...5.65.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-21 03:01:13 +00:00
dependabot[bot]
504628f59c Bump fs-extra from 10.0.1 to 10.1.0
Bumps [fs-extra](https://github.com/jprichardson/node-fs-extra) from 10.0.1 to 10.1.0.
- [Release notes](https://github.com/jprichardson/node-fs-extra/releases)
- [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jprichardson/node-fs-extra/compare/10.0.1...10.1.0)

---
updated-dependencies:
- dependency-name: fs-extra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-18 03:01:19 +00:00
dependabot[bot]
752430bb59 Bump moment from 2.29.2 to 2.29.3
Bumps [moment](https://github.com/moment/moment) from 2.29.2 to 2.29.3.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/2.29.3/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.2...2.29.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-18 03:01:07 +00:00
dependabot[bot]
8e0e1c5946 Bump nconf from 0.11.4 to 0.12.0
Bumps [nconf](https://github.com/flatiron/nconf) from 0.11.4 to 0.12.0.
- [Release notes](https://github.com/flatiron/nconf/releases)
- [Changelog](https://github.com/indexzero/nconf/blob/master/CHANGELOG.md)
- [Commits](https://github.com/flatiron/nconf/compare/v0.11.4...v0.12.0)

---
updated-dependencies:
- dependency-name: nconf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-15 16:15:51 +00:00
Trevor Buckner
156abe3b9e Merge pull request #2134 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.3.0
Bump mongoose from 6.2.11 to 6.3.0
2022-04-15 12:14:54 -04:00
Charlie Humphreys
2e145e7ff1 Merge branch 'master' into google-document-stubs 2022-04-15 00:23:51 -05:00
Charlie Humphreys
8a5e9aa1f6 update app to better handle google brew stubs 2022-04-15 00:22:51 -05:00
Charlie Humphreys
e7fe68d20c merge master into google-document-stubs 2022-04-14 23:31:07 -05:00
dependabot[bot]
0393fcd5c4 Bump mongoose from 6.2.11 to 6.3.0
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.2.11 to 6.3.0.
- [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/6.2.11...6.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-15 03:01:04 +00:00
Trevor Buckner
784c0ec8f8 Merge pull request #2131 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.2.11
Bump mongoose from 6.2.10 to 6.2.11
2022-04-13 23:56:42 -04:00
Trevor Buckner
e86c24943f Merge pull request #2130 from G-Ambatte/userPublicUrlForLinkGen-#2128
User public url for link gen #2128
2022-04-13 23:56:26 -04:00
Trevor Buckner
2bc3aaf796 Merge pull request #2129 from G-Ambatte/fixMetaTags
Fix meta tags
2022-04-13 23:53:56 -04:00
dependabot[bot]
56d3d38cad Bump mongoose from 6.2.10 to 6.2.11
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.2.10 to 6.2.11.
- [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/6.2.10...6.2.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-14 03:01:21 +00:00
G.Ambatte
b2bcc9ef95 Shift to logical OR operator
(cherry picked from commit 0fb0f4b6b0)
2022-04-14 13:59:42 +12:00
G.Ambatte
0fb0f4b6b0 Shift to logical OR operator 2022-04-14 13:58:51 +12:00
G.Ambatte
a73b3648ae Update editPage links to use publicUrl 2022-04-13 19:40:33 +12:00
G.Ambatte
0e25793f0a Add publicUrl to global.config & update template 2022-04-13 19:35:51 +12:00
G.Ambatte
3ad6f1d794 Switch from nullish coalescing operator to ternary operator to correct unexpected behaviour
Change meta type from website to article based on feedback
2022-04-13 17:19:45 +12:00
G.Ambatte
5f734096d6 Merge branch 'naturalcrit:master' into master 2022-04-13 15:23:37 +12:00
Trevor Buckner
7dbac5d848 Merge pull request #2061 from Gazook89/Nodesto-Caps
Add Nodesto font files to 5e, v3
2022-04-12 23:04:41 -04:00
Trevor Buckner
eac4d4ed94 Merge pull request #2052 from G-Ambatte/addLocalLogin-#269
[LOCAL ONLY] Add passwordless login
2022-04-12 23:04:08 -04:00
G.Ambatte
de977b3b94 Make local login route conditional and rename 2022-04-13 14:49:16 +12:00
G.Ambatte
3787cdf11c Update server/app.js
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2022-04-13 14:39:27 +12:00
G.Ambatte
84bc3d0be2 Update server/app.js
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2022-04-13 14:37:11 +12:00
G.Ambatte
6fdd415fcb Update server/app.js
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2022-04-13 14:37:06 +12:00
G.Ambatte
0999125678 Update client/homebrew/navbar/account.navitem.jsx
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2022-04-13 14:30:49 +12:00
G.Ambatte
ad8d5bd8a0 Merge branch 'master' into addLocalLogin-#269 2022-04-13 14:30:02 +12:00
G.Ambatte
5d3fe719b3 Remove errant semicolon
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2022-04-13 14:26:25 +12:00
Trevor Buckner
b11fe0e760 Merge pull request #2080 from G-Ambatte/addMetadata-#820
Add social metadata tags
2022-04-12 22:23:02 -04:00
G.Ambatte
85312859d2 Change props.publicUrl fallback behavior 2022-04-13 14:15:26 +12:00
G.Ambatte
f8086a098b Add publicUrl to default.json 2022-04-13 14:14:09 +12:00
G.Ambatte
811d1347ea Reduce calls to config.get 2022-04-13 12:57:04 +12:00
G.Ambatte
1bdd08f878 Shift JWT generation to app.js 2022-04-13 12:40:16 +12:00
G.Ambatte
0023e87d54 Whitespace fix 2022-04-13 12:37:50 +12:00
G.Ambatte
42878ea99d Merge branch 'master' into addMetadata-#820 2022-04-13 09:13:37 +12:00
G.Ambatte
16ae32b881 Move default URL check to app.js 2022-04-13 09:12:48 +12:00
G.Ambatte
f3ee95f9db Update client/template.js
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2022-04-13 08:24:33 +12:00
G.Ambatte
af950159e0 Update client/template.js
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2022-04-13 08:24:25 +12:00
G.Ambatte
46eaad1226 Update client/template.js
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2022-04-13 08:24:19 +12:00
G.Ambatte
4600624edf Merge branch 'naturalcrit:master' into master 2022-04-13 08:20:57 +12:00
Trevor Buckner
daa0832740 Merge pull request #2125 from naturalcrit/dependabot/npm_and_yarn/nconf-0.11.4
Bump nconf from 0.11.3 to 0.11.4
2022-04-11 14:23:08 -04:00
Trevor Buckner
c9353c06da Merge pull request #2126 from naturalcrit/dependabot/npm_and_yarn/marked-4.0.14
Bump marked from 4.0.12 to 4.0.14
2022-04-11 14:22:57 -04:00
Trevor Buckner
2a88d143fd Merge pull request #2124 from naturalcrit/dependabot/npm_and_yarn/eslint-8.13.0
Bump eslint from 8.12.0 to 8.13.0
2022-04-11 14:22:46 -04:00
Charlie Humphreys
39d29abb19 update app to list stubbed google docs only once 2022-04-11 12:55:19 -05:00
dependabot[bot]
153802cd5b Bump marked from 4.0.12 to 4.0.14
Bumps [marked](https://github.com/markedjs/marked) from 4.0.12 to 4.0.14.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v4.0.12...v4.0.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 03:01:28 +00:00
dependabot[bot]
b0b39e638a Bump nconf from 0.11.3 to 0.11.4
Bumps [nconf](https://github.com/flatiron/nconf) from 0.11.3 to 0.11.4.
- [Release notes](https://github.com/flatiron/nconf/releases)
- [Changelog](https://github.com/indexzero/nconf/blob/master/CHANGELOG.md)
- [Commits](https://github.com/flatiron/nconf/compare/v0.11.3...v0.11.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 03:01:16 +00:00
dependabot[bot]
39e5f4aaf4 Bump eslint from 8.12.0 to 8.13.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.12.0 to 8.13.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.12.0...v8.13.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 03:00:58 +00:00
Trevor Buckner
2860b8d50a Merge pull request #2120 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.17.9
Bump @babel/core from 7.17.8 to 7.17.9
2022-04-07 09:04:36 -04:00
Trevor Buckner
a9b2e098ac Merge pull request #2118 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.2.10
Bump mongoose from 6.2.9 to 6.2.10
2022-04-07 09:04:28 -04:00
dependabot[bot]
394171ebb7 Bump @babel/core from 7.17.8 to 7.17.9
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.17.8 to 7.17.9.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.17.9/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-07 03:01:31 +00:00
Trevor Buckner
0a05f37774 Merge pull request #2119 from jeddai/google-transfer-api
fix deletion request
2022-04-06 12:18:04 -04:00
Charlie Humphreys
9f69763572 fix deletion request 2022-04-06 11:14:34 -05:00
Charlie Humphreys
4941dbb5bd add exclusions for stub props 2022-04-06 11:11:11 -05:00
dependabot[bot]
9565f1d0ba Bump mongoose from 6.2.9 to 6.2.10
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.2.9 to 6.2.10.
- [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/6.2.9...6.2.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 03:01:28 +00:00
Trevor Buckner
172d2a8bd6 Fixed font spacings/corrupted outlines 2022-04-04 15:47:30 -04:00
Trevor Buckner
c70857af6f Merge pull request #2117 from naturalcrit/dependabot/npm_and_yarn/moment-2.29.2
Bump moment from 2.29.1 to 2.29.2
2022-04-04 04:17:03 -04:00
Trevor Buckner
a98b23411c Merge pull request #2116 from naturalcrit/dependabot/npm_and_yarn/body-parser-1.20.0
Bump body-parser from 1.19.2 to 1.20.0
2022-04-04 04:16:34 -04:00
dependabot[bot]
a734a7da25 Bump moment from 2.29.1 to 2.29.2
Bumps [moment](https://github.com/moment/moment) from 2.29.1 to 2.29.2.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.1...2.29.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 03:00:50 +00:00
dependabot[bot]
6672ec0149 Bump body-parser from 1.19.2 to 1.20.0
Bumps [body-parser](https://github.com/expressjs/body-parser) from 1.19.2 to 1.20.0.
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/1.19.2...1.20.0)

---
updated-dependencies:
- dependency-name: body-parser
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 03:00:40 +00:00
G.Ambatte
6c7eb339f4 Revert "Initial pass at redirecting / to a landing page"
This reverts commit 468ccd748d.
2022-04-02 10:11:59 +13:00
G.Ambatte
468ccd748d Initial pass at redirecting / to a landing page 2022-04-02 10:10:40 +13:00
Trevor Buckner
613b9c4405 Merge pull request #2101 from naturalcrit/dependabot/npm_and_yarn/nanoid-3.3.2
Bump nanoid from 3.3.1 to 3.3.2
2022-03-31 23:09:59 -04:00
Trevor Buckner
6318b1f84c Merge pull request #2115 from naturalcrit/dependabot/npm_and_yarn/googleapis-100.0.0
Bump googleapis from 99.0.0 to 100.0.0
2022-03-31 23:09:44 -04:00
dependabot[bot]
8800808925 Bump googleapis from 99.0.0 to 100.0.0
Bumps [googleapis](https://github.com/googleapis/google-api-nodejs-client) from 99.0.0 to 100.0.0.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/googleapis-v99.0.0...googleapis-v100.0.0)

---
updated-dependencies:
- dependency-name: googleapis
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 03:01:36 +00:00
Trevor Buckner
12670d4d9b Merge pull request #2090 from G-Ambatte/addQueryToUserPageUrl
Add UserPage filtering to/from URL
2022-03-31 22:24:48 -04:00
Trevor Buckner
41c0b7fef9 Formatting 2022-03-31 22:21:58 -04:00
dependabot[bot]
9a4c7da375 Bump nanoid from 3.3.1 to 3.3.2
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.1...3.3.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-01 01:43:02 +00:00
Trevor Buckner
34b4556e5c Merge pull request #2088 from naturalcrit/dependabot/npm_and_yarn/minimist-1.2.6
Bump minimist from 1.2.5 to 1.2.6
2022-03-31 21:42:47 -04:00
Trevor Buckner
bb935f4727 Merge pull request #2097 from naturalcrit/dependabot/npm_and_yarn/ansi-regex-4.1.1
Bump ansi-regex from 4.1.0 to 4.1.1
2022-03-31 21:42:35 -04:00
Trevor Buckner
2719bb8280 Merge pull request #2096 from naturalcrit/dependabot/npm_and_yarn/eslint-8.12.0
Bump eslint from 8.11.0 to 8.12.0
2022-03-31 21:42:17 -04:00
Trevor Buckner
ebfb0d8fcf Merge pull request #2098 from naturalcrit/dependabot/npm_and_yarn/googleapis-99.0.0
Bump googleapis from 98.0.0 to 99.0.0
2022-03-31 21:42:03 -04:00
Trevor Buckner
8a0d74d323 Merge pull request #2102 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.2.9
Bump mongoose from 6.2.8 to 6.2.9
2022-03-31 21:41:48 -04:00
Charlie Humphreys
e5021259bb swap usage of delete on possible Mongoose object for setting the value to undefined 2022-03-30 23:34:39 -05:00
Charlie Humphreys
6791df7f75 Merge branch 'master' into google-document-stubs
# Conflicts:
#	server/homebrew.api.js
2022-03-30 23:26:41 -05:00
Charlie Humphreys
fa8d47400f update API and frontend for google drive document stubs 2022-03-30 23:23:45 -05:00
Trevor Buckner
84d0010702 Merge pull request #2111 from jeddai/logout-fix
update logout logic
2022-03-30 12:58:04 -04:00
Charlie Humphreys
e610c12b2a update logout logic 2022-03-30 10:24:25 -05:00
Trevor Buckner
eeef9dcc1b Merge pull request #2105 from jeddai/add-async-handler
add asyncHandler to async methods in routes
2022-03-29 16:43:00 -04:00
Charlie Humphreys
c17db043ba remove extra slash in regex 2022-03-29 11:54:15 -05:00
Charlie Humphreys
89dbd19556 update response handling for saving google brews 2022-03-29 11:46:50 -05:00
Charlie Humphreys
e9cf7be488 add asyncHandler to async methods in routes 2022-03-28 20:43:45 -05:00
dependabot[bot]
48c05081a4 Bump mongoose from 6.2.8 to 6.2.9
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.2.8 to 6.2.9.
- [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/6.2.8...6.2.9)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 17:37:06 +00:00
Trevor Buckner
36fcce7f1e Merge pull request #2100 from naturalcrit/v3.0.8
Update version to v3.0.8
2022-03-28 13:35:20 -04:00
G.Ambatte
c0b2fb8ed9 Merge branch 'master' into addLocalLogin-#269 2022-03-27 17:15:41 +13:00
G.Ambatte
c8f6dea1e1 Conflict fix for homebrew.jsx 2022-03-27 17:12:15 +13:00
G.Ambatte
a0a02f5375 Merge branch 'master' into addLocalLogin-#269 2022-03-27 17:09:13 +13:00
dependabot[bot]
396a49a16d Bump googleapis from 98.0.0 to 99.0.0
Bumps [googleapis](https://github.com/googleapis/google-api-nodejs-client) from 98.0.0 to 99.0.0.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/googleapis-v98.0.0...googleapis-v99.0.0)

---
updated-dependencies:
- dependency-name: googleapis
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-27 03:47:37 +00:00
dependabot[bot]
3628fb690a Bump ansi-regex from 4.1.0 to 4.1.1
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-27 03:46:44 +00:00
dependabot[bot]
58428fbcc2 Bump eslint from 8.11.0 to 8.12.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.11.0 to 8.12.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.11.0...v8.12.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-27 03:46:44 +00:00
G.Ambatte
b6933406ed Remove test timeout increase 2022-03-26 21:27:48 +13:00
G.Ambatte
47a4c8829c Move publicUrl to local.conf from default.conf 2022-03-25 17:40:53 +13:00
G.Ambatte
4b6fb9f595 Add publicUrl as configuration item 2022-03-25 17:05:35 +13:00
G.Ambatte
17dd738ac1 Shift to history.replaceState 2022-03-25 12:23:01 +13:00
G.Ambatte
32a5e71015 Change verbiage of filter placeholder text 2022-03-25 11:28:30 +13:00
G.Ambatte
1c641e3aff Initial pass at UserPage filtering to/from URL 2022-03-25 11:20:16 +13:00
dependabot[bot]
9c511a6c64 Bump minimist from 1.2.5 to 1.2.6
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-24 04:22:56 +00:00
G.Ambatte
0d8ad50e2a Increase home page test timeout (5s -> 30s) 2022-03-22 10:53:33 +13:00
G.Ambatte
57c5f28938 Merge branch 'master' into addLocalLogin-#269 2022-03-22 09:39:41 +13:00
G.Ambatte
a11e93ef54 Initial pass at social metadata tags 2022-03-15 18:47:46 +13:00
Trevor Buckner
a163e611be Fix Bold Font outlines (union multi-path characters) 2022-03-14 22:23:34 -04:00
Trevor Buckner
222ad3e73e Fixed font files. 2022-03-13 03:32:05 -04:00
Gazook89
5d5d0633ab Add Nodesto font files to 5e, v3. Update fonts.less 2022-03-10 21:12:20 -06:00
G.Ambatte
535291a91a Add local_environments to configuration files
Add `local` parameter to global `config` object to avoid repeating tests
JWT key `secret` only added to global object `config` when local installation detected
2022-03-07 14:14:32 +13:00
G.Ambatte
7c2663fa56 Add passwordless login for local installs 2022-03-07 13:26:54 +13:00
Charlie Humphreys
e2fe77ade7 Update tag keydown handler to allow tags that match a certain pattern
#758
2021-11-18 23:05:39 -06:00
Charlie Humphreys
19c13342c4 Add autoFocus functionality when editing tags and allow for multi-tag entry by comma separation
#758
2021-11-17 23:56:57 -06:00
Charlie Humphreys
330bf20d61 Update UI to support tags
#758
2021-11-17 22:26:25 -06:00
Charlie Humphreys
22f9efd58a Update API to support homebrew tags
#758
2021-11-17 22:22:33 -06:00
Trevor Buckner
4bebdfda79 Allow wide classTables to bleed into top margin 2021-09-18 00:37:21 -04:00
48 changed files with 5506 additions and 4973 deletions

View File

@@ -39,6 +39,121 @@ pre {
## changelog
For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery).
### Friday 08/09/2022 - v3.2.2
{{taskList
##### Jeddai:
* [x] Fix brews not deleting from User page when removed from Google Drive externally.
Fixes issues: [#2325](https://github.com/naturalcrit/homebrewery/issues/2325)
##### G-Ambatte:
* [x] Brew Tags are now searchable on the User page
Fixes issues [#2317](https://github.com/naturalcrit/homebrewery/issues/2317), [#2319](https://github.com/naturalcrit/homebrewery/issues/2319), [#2334](https://github.com/naturalcrit/homebrewery/issues/2334)
* [x] Several tweaks to the User page
Fixes issues: [#1797](https://github.com/naturalcrit/homebrewery/issues/1797), [#2315](https://github.com/naturalcrit/homebrewery/issues/2315), [#2326](https://github.com/naturalcrit/homebrewery/issues/2326), [#2328](https://github.com/naturalcrit/homebrewery/issues/2328)
}}
### Wednesday 31/08/2022 - v3.2.1
{{taskList
##### Calculuschild
* [x] Reference Links should now work inside tables
Fixes issues: [#2307](https://github.com/naturalcrit/homebrewery/issues/2307)
##### Jeddai:
* [x] Fix printing from `/new` not working
Fixes issues: [#1789](https://github.com/naturalcrit/homebrewery/issues/1789), [#1806](https://github.com/naturalcrit/homebrewery/issues/1806)
* [x] Fix broken snippet buttons on `/new`
Fixes issues: [#2311](https://github.com/naturalcrit/homebrewery/issues/2311)
##### G-Ambatte:
* [x] Several small tweaks to the User page
Fixes issues: [#2301](https://github.com/naturalcrit/homebrewery/issues/2301), [#2303](https://github.com/naturalcrit/homebrewery/issues/2303), [#2121](https://github.com/naturalcrit/homebrewery/issues/2121)
}}
\page
### Saturday 27/08/2022 - v3.2.0
{{taskList
##### Calculuschild
* [x] The V3 renderer is now the default for new brews.
* [x] Small tweaks to the spacing around the `classTable` style
##### Jeddai:
* [x] Brew transfers between Homebrewery and Google Drive now keep the same share and edit links! Metadata is now also kept across transfers.
Fixes issues: [#1838](https://github.com/naturalcrit/homebrewery/issues/1838)
* [x] Brews can now be labeled with tags; these will be searchable on the My Brews page in a future update.
Fixes issues: [#758](https://github.com/naturalcrit/homebrewery/issues/758)
##### Jlgraves:
* [x] Small tweaks to the `ClassFeature` snippet
Fixes issues: [#2215](https://github.com/naturalcrit/homebrewery/issues/2215)
}}
### Thursday 09/06/2022 - v3.1.1
{{taskList
##### Calculuschild:
* [x] Fixed class table decorations appearing on top of the table in PDF output.
Fixes issues: [#1784](https://github.com/naturalcrit/homebrewery/issues/1784)
* [x] Fix bottom decoration on half class tables disappearing when the table is too short.
Fixes issues: [#2202](https://github.com/naturalcrit/homebrewery/issues/2202)
}}
### Monday 06/06/2022 - v3.1.0
{{taskList
##### G-Ambatte:
* [x] "Jump to Preview/Editor" buttons added to the divider bar. Easily sync between the editor and preview panels!
Fixes issues: [#1756](https://github.com/naturalcrit/homebrewery/issues/1756)
* [x] Speedups to the user page for users with large and/or many brews.
Fixes issues: [#2147](https://github.com/naturalcrit/homebrewery/issues/2147)
* [x] Search text on the user page is saved to the URL for easy bookmarking in your browser
Fixes issues: [#1858](https://github.com/naturalcrit/homebrewery/issues/1858)
* [x] Added easy login system for offline installs.
Fixes issues: [#269](https://github.com/naturalcrit/homebrewery/issues/269)
* [x] New **THUMBNAIL** option in the {{fa,fa-info-circle}} **Properties** menu. This image will show up in social media links.
Fixes issues: [#820](https://github.com/naturalcrit/homebrewery/issues/820)
}}
### Wednesday 27/03/2022 - v3.0.8
{{taskList
* [x] Style updates to user page.

View File

@@ -188,7 +188,7 @@ const BrewRenderer = createClass({
</div>
: null}
<Frame initialContent={this.state.initialContent}
<Frame id='BrewRenderer' initialContent={this.state.initialContent}
style={{ width: '100%', height: '100%', visibility: this.state.visibility }}
contentDidMount={this.frameDidMount}>
<div className={'brewRenderer'}

View File

@@ -4,7 +4,7 @@ const createClass = require('create-react-class');
const _ = require('lodash');
const cx = require('classnames'); //Unused variable
const DISMISS_KEY = 'dismiss_notification09-9-21';
const DISMISS_KEY = 'dismiss_notification08-27-22';
const NotificationPopup = createClass({
displayName : 'NotificationPopup',
@@ -22,45 +22,45 @@ const NotificationPopup = createClass({
},
notifications : {
psa : function(){
return <li key='psa'>
<em>V3.0.0 Released!</em> <br />
After a long and bumpy road, we decided it was high time we finally release version 3 of the homebrewery into the wild. You can check out a
brief overview and see how to opt-in to the new features here:&nbsp;
<a target='_blank' href='https://homebrewery.naturalcrit.com/v3_preview'>V3 Welcome Page</a> and&nbsp;
<a target='_blank' href='https://homebrewery.naturalcrit.com/changelog'>the Changelog</a>.
<br /><br />
<em>BE WARNED:</em> As we continue to develop V3, expect small tweaks in the styling, fonts, and snippets; your brews may look slightly
different from day-to-day. All of your old documents will continue to work as normal; we are not touching them. If you don't want to deal
with the possibility of slight formatting changes, you may choose to stick with the Legacy renderer on any of your brews for as long as you like.
<br /><br />
With this in mind, if you still wish to try out V3, you can opt-in any of your brews to the the V3 renderer.
This will likely break much of your formatting as a lot of the Markdown code has been updated, and starting from scratch may be cleaner.
(Don't worry, you can always change the renderer back to Legacy for any brew at any time).
</li>;
},
refreshGoogle : function (){
return <li key='refreshGoogle'>
<em>Refresh your Google Drive Credentials!</em> <br />
Currently a lot of people are striking issues with their Google credentials expiring, which happens one year after the last sign in via
Google. This can cause errors when trying to save your brews. If this happens, simply visit the&nbsp;
<a target='_blank' href='https://www.naturalcrit.com/login'>
logout page
</a>
, sign out, and then sign back in "with Google" to refresh your credentials. See&nbsp;
<a target='_blank' href='https://github.com/naturalcrit/homebrewery/discussions/1580'>
this discussion on Github
</a> for more details.
</li>;
},
faq : function(){
return <li key='faq'>
<em>Protect your work! </em> <br />
If you opt not to use your Google Drive, keep in mind that we do not save a history of your projects. Please make frequent backups of your brews!&nbsp;
<a target='_blank' href='https://www.reddit.com/r/homebrewery/comments/adh6lh/faqs_psas_announcements/'>
See the FAQ
</a> to learn how to avoid losing your work!
</li>;
},
return (
<>
<li key='psa'>
<em>V3.2.0 Released!</em> <br />
We are happy to announce that after nearly a year of use by our many users,
we are making the V3 render mode the default setting for all new brews.
This mode has become quite popular, and has proven to be stable and powerful.
Of course, we will always keep the option to use the Legacy renderer for any
brew, which can still be accessed from the Properties menu.
</li>
<li key='stubs'>
<em>Change to Google Drive Storage!</em> <br />
We have made a change to the process of tranferring brews between Google
Drive and the Homebrewery storage. Starting now, any time a brew is
transferred, it will keep the same links instead of generating new ones!
We hope this change will help reduce issues where people "lost" their work
by trying to visit old links.
</li>
<li key='googleDriveFolder'>
<em>Don't delete your Homebrewery folder on Google Drive!</em> <br />
We have had several reports of users losing their brews, not realizing
that they had deleted the files on their Google Drive. If you have a Homebrewery folder
on your Google Drive with *.txt files inside, <em>do not delete it</em>!
We cannot help you recover files that you have deleted from your own
Google Drive.
</li>
<li key='faq'>
<em>Protect your work! </em> <br />
If you opt not to use your Google Drive, keep in mind that we do not save a history of your projects. Please make frequent backups of your brews!&nbsp;
<a target='_blank' href='https://www.reddit.com/r/homebrewery/comments/adh6lh/faqs_psas_announcements/'>
See the FAQ
</a> to learn how to avoid losing your work!
</li>
</>
);
}
},
checkNotifications : function(){
const hideDismiss = localStorage.getItem(DISMISS_KEY);

View File

@@ -61,8 +61,14 @@ const Editor = createClass({
window.removeEventListener('resize', this.updateEditorSize);
},
componentDidUpdate : function() {
componentDidUpdate : function(prevProps, prevState, snapshot) {
this.highlightCustomMarkdown();
if(prevProps.moveBrew !== this.props.moveBrew) {
this.brewJump();
};
if(prevProps.moveSource !== this.props.moveSource) {
this.sourceJump();
};
},
updateEditorSize : function() {
@@ -90,15 +96,20 @@ const Editor = createClass({
},
handleViewChange : function(newView){
this.props.setMoveArrows(newView === 'text');
this.setState({
view : newView
}, this.updateEditorSize); //TODO: not sure if updateeditorsize needed
},
getCurrentPage : function(){
const lines = this.props.brew.text.split('\n').slice(0, this.cursorPosition.line + 1);
const lines = this.props.brew.text.split('\n').slice(0, this.refs.codeEditor.getCursorPosition().line + 1);
return _.reduce(lines, (r, line)=>{
if(line.indexOf('\\page') !== -1) r++;
if(
(this.props.renderer == 'legacy' && line.indexOf('\\page') !== -1)
||
(this.props.renderer == 'V3' && line.match(/^\\page$/))
) r++;
return r;
}, 1);
},
@@ -120,6 +131,7 @@ const Editor = createClass({
//reset custom line styles
codeMirror.removeLineClass(lineNumber, 'background', 'pageLine');
codeMirror.removeLineClass(lineNumber, 'text');
codeMirror.removeLineClass(lineNumber, 'wrap', 'sourceMoveFlash');
// Styling for \page breaks
if((this.props.renderer == 'legacy' && line.includes('\\page')) ||
@@ -174,9 +186,76 @@ const Editor = createClass({
}
},
brewJump : function(){
const currentPage = this.getCurrentPage();
window.location.hash = `p${currentPage}`;
brewJump : function(targetPage=this.getCurrentPage()){
if(!window) return;
// console.log(`Scroll to: p${targetPage}`);
const brewRenderer = window.frames['BrewRenderer'].contentDocument.getElementsByClassName('brewRenderer')[0];
const currentPos = brewRenderer.scrollTop;
const targetPos = window.frames['BrewRenderer'].contentDocument.getElementById(`p${targetPage}`).getBoundingClientRect().top;
const interimPos = targetPos >= 0 ? -30 : 30;
const bounceDelay = 100;
const scrollDelay = 500;
if(!this.throttleBrewMove) {
this.throttleBrewMove = _.throttle((currentPos, interimPos, targetPos)=>{
brewRenderer.scrollTo({ top: currentPos + interimPos, behavior: 'smooth' });
setTimeout(()=>{
brewRenderer.scrollTo({ top: currentPos + targetPos, behavior: 'smooth', block: 'start' });
}, bounceDelay);
}, scrollDelay, { leading: true, trailing: false });
};
this.throttleBrewMove(currentPos, interimPos, targetPos);
// const hashPage = (page != 1) ? `p${page}` : '';
// window.location.hash = hashPage;
},
sourceJump : function(targetLine=null){
if(this.isText()) {
if(targetLine == null) {
targetLine = 0;
const pageCollection = window.frames['BrewRenderer'].contentDocument.getElementsByClassName('page');
const brewRendererHeight = window.frames['BrewRenderer'].contentDocument.getElementsByClassName('brewRenderer').item(0).getBoundingClientRect().height;
let currentPage = 1;
for (const page of pageCollection) {
if(page.getBoundingClientRect().bottom > (brewRendererHeight / 2)) {
currentPage = parseInt(page.id.slice(1)) || 1;
break;
}
}
const textSplit = this.props.renderer == 'V3' ? /^\\page$/gm : /\\page/;
const textString = this.props.brew.text.split(textSplit).slice(0, currentPage-1).join(textSplit);
const textPosition = textString.length;
const lineCount = textString.match('\n') ? textString.slice(0, textPosition).split('\n').length : 0;
targetLine = lineCount - 1; //Scroll to `\page`, which is one line back.
let currentY = this.refs.codeEditor.codeMirror.getScrollInfo().top;
let targetY = this.refs.codeEditor.codeMirror.heightAtLine(targetLine, 'local', true);
//Scroll 1/10 of the way every 10ms until 1px off.
const incrementalScroll = setInterval(()=>{
currentY += (targetY - currentY) / 10;
this.refs.codeEditor.codeMirror.scrollTo(null, currentY);
// Update target: target height is not accurate until within +-10 lines of the visible window
if(Math.abs(targetY - currentY > 100))
targetY = this.refs.codeEditor.codeMirror.heightAtLine(targetLine, 'local', true);
// End when close enough
if(Math.abs(targetY - currentY) < 1) {
this.refs.codeEditor.codeMirror.scrollTo(null, targetY); // Scroll any remaining difference
this.refs.codeEditor.setCursorPosition({ line: targetLine + 1, ch: 0 });
this.refs.codeEditor.codeMirror.addLineClass(targetLine + 1, 'wrap', 'sourceMoveFlash');
clearInterval(incrementalScroll);
}
}, 10);
}
}
},
//Called when there are changes to the editor's dimensions

View File

@@ -1,12 +1,16 @@
/* eslint-disable max-lines */
require('./metadataEditor.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
const cx = require('classnames');
const request = require('superagent');
const StringArrayEditor = require('../stringArrayEditor/stringArrayEditor.jsx');
const SYSTEMS = ['5e', '4e', '3.5e', 'Pathfinder'];
const homebreweryThumbnail = require('../../thumbnail.png');
const MetadataEditor = createClass({
displayName : 'MetadataEditor',
getDefaultProps : function() {
@@ -15,7 +19,7 @@ const MetadataEditor = createClass({
editId : null,
title : '',
description : '',
tags : '',
tags : [],
published : false,
authors : [],
systems : [],
@@ -25,10 +29,28 @@ const MetadataEditor = createClass({
};
},
getInitialState : function(){
return {
showThumbnail : true
};
},
toggleThumbnailDisplay : function(){
this.setState({
showThumbnail : !this.state.showThumbnail
});
},
renderThumbnail : function(){
if(!this.state.showThumbnail) return;
return <img className='thumbnail-preview' src={this.props.metadata.thumbnail || homebreweryThumbnail}></img>;
},
handleFieldChange : function(name, e){
this.props.onChange(_.merge({}, this.props.metadata, {
this.props.onChange({
...this.props.metadata,
[name] : e.target.value
}));
});
},
handleSystem : function(system, e){
if(e.target.checked){
@@ -45,9 +67,10 @@ const MetadataEditor = createClass({
this.props.onChange(this.props.metadata);
},
handlePublish : function(val){
this.props.onChange(_.merge({}, this.props.metadata, {
this.props.onChange({
...this.props.metadata,
published : val
}));
});
},
handleDelete : function(){
@@ -59,7 +82,7 @@ const MetadataEditor = createClass({
if(!confirm('Are you REALLY sure? You will lose editor access to this document.')) return;
}
request.delete(`/api/${this.props.metadata.googleId}${this.props.metadata.editId}`)
request.delete(`/api/${this.props.metadata.googleId ?? ''}${this.props.metadata.editId}`)
.send()
.end(function(err, res){
window.location.href = '/';
@@ -142,8 +165,8 @@ const MetadataEditor = createClass({
V3
</label>
<a href='/v3_preview' target='_blank' rel='noopener noreferrer'>
Click here for a quick intro to V3!
<a href='/legacy' target='_blank' rel='noopener noreferrer'>
Click here to see the demo page for the old Legacy renderer!
</a>
</div>
</div>;
@@ -162,13 +185,23 @@ const MetadataEditor = createClass({
<textarea value={this.props.metadata.description} className='value'
onChange={(e)=>this.handleFieldChange('description', e)} />
</div>
{/*}
<div className='field tags'>
<label>tags</label>
<textarea value={this.props.metadata.tags}
onChange={(e)=>this.handleFieldChange('tags', e)} />
<div className='field thumbnail'>
<label>thumbnail</label>
<input type='text'
value={this.props.metadata.thumbnail}
placeholder='my.thumbnail.url'
className='value'
onChange={(e)=>this.handleFieldChange('thumbnail', e)} />
<button className='display' onClick={this.toggleThumbnailDisplay}>
<i className={`fas fa-caret-${this.state.showThumbnail ? 'right' : 'left'}`} />
</button>
{this.renderThumbnail()}
</div>
*/}
<StringArrayEditor label='tags' valuePatterns={[/^(?:(?:group|meta|system|type):)?[A-Za-z0-9][A-Za-z0-9 \/.\-]{0,40}$/]}
placeholder='add tag' unique={true}
values={this.props.metadata.tags}
onChange={(e)=>this.handleFieldChange('tags', e)}/>
{this.renderAuthors()}

View File

@@ -1,3 +1,4 @@
@import 'naturalcrit/styles/colors.less';
.metadataEditor{
position : absolute;
@@ -24,6 +25,33 @@
flex : 1 1 auto;
min-width : 200px;
}
&.thumbnail{
height : 1.4em;
label{
line-height: 2.0em;
}
.value{
overflow: hidden;
text-overflow: ellipsis;
}
button{
border: 1px solid #999;
color: white;
padding: 0px 5px;
background-color: black;
&:hover{
background-color: #777;
}
}
.thumbnail-preview{
position : relative;
width : 80px;
height : min-content;
border : 2px solid white;
margin-left : 5px;
max-height : 115px;
}
}
}
.description.field textarea.value{
resize : none;
@@ -81,4 +109,86 @@
font-size: 0.8em;
line-height : 1.5em;
}
.field .list {
display: flex;
flex-wrap: wrap;
> * {
flex: 0 0 auto;
}
#groupedIcon {
#backgroundColors;
display: inline-block;
height: ~"calc(100% + 0.6em)";
position: relative;
top: -0.3em;
right: -0.3em;
cursor: pointer;
min-width: 20px;
text-align: center;
color: white;
i {
position: relative;
top: 50%;
transform: translateY(-50%);
}
&:not(:last-child) {
border-right: 1px solid black;
}
&:last-child {
border-radius: 0 0.5em 0.5em 0;
}
}
.badge {
background-color: #dddddd;
border-radius: .5em;
font-size: .9em;
margin: 2px;
padding: .3em;
.icon {
#groupedIcon
}
}
.input-group {
height: ~"calc(.9em + 4px + .6em)";
input {
border-radius: .5em 0 0 .5em;
}
input:last-child {
border-radius: .5em;
}
.value {
width: 7.5vw;
min-width: 75px;
height: 100%;
}
.invalid:focus {
background-color: pink;
}
.icon {
#groupedIcon;
height: 97%;
font-size: .8em;
right: 1px;
top: -.54em;
i {
font-size: 1.125em;
}
}
}
}
}

View File

@@ -9,6 +9,7 @@ module.exports = function(classname){
classname = classname.toLowerCase();
const hitDie = _.sample([4, 6, 8, 10, 12]);
const spellSkill = _.sample(['Wisdom', 'Charisma', 'Intelligence']);
const abilityList = ['Strength', 'Dexerity', 'Constitution', 'Wisdom', 'Charisma', 'Intelligence'];
const skillList = ['Acrobatics', 'Animal Handling', 'Arcana', 'Athletics', 'Deception', 'History', 'Insight', 'Intimidation', 'Investigation', 'Medicine', 'Nature', 'Perception', 'Performance', 'Persuasion', 'Religion', 'Sleight of Hand', 'Stealth', 'Survival'];
@@ -27,11 +28,19 @@ module.exports = function(classname){
**Armor:** :: ${_.sampleSize(['Light armor', 'Medium armor', 'Heavy armor', 'Shields'], _.random(0, 3)).join(', ') || 'None'}
**Weapons:** :: ${_.sampleSize(['Squeegee', 'Rubber Chicken', 'Simple weapons', 'Martial weapons'], _.random(0, 2)).join(', ') || 'None'}
**Tools:** :: ${_.sampleSize(['Artian\'s tools', 'one musical instrument', 'Thieve\'s tools'], _.random(0, 2)).join(', ') || 'None'}
**Tools:** :: ${_.sampleSize(['Artisan\'s tools', 'one musical instrument', 'Thieves\' tools'], _.random(0, 2)).join(', ') || 'None'}
**Saving Throws:** :: ${_.sampleSize(abilityList, 2).join(', ')}
**Skills:** :: Choose two from ${_.sampleSize(skillList, _.random(4, 6)).join(', ')}
#### Spellcasting Ability
{{text-align:center
**Spell save DC**:: = ${_.sample([6, 8, 10])} + your proficiency bonus + your ${spellSkill} modifier
**Spell attack modifier**:: = your proficiency bonus + your ${spellSkill} modifier
}}
#### Equipment
You start with the following equipment, in addition to the equipment granted by your background:
- *(a)* a martial weapon and a shield or *(b)* two martial weapons

View File

@@ -8,6 +8,7 @@ module.exports = function(classname){
classname = classname.toLowerCase();
const hitDie = _.sample([4, 6, 8, 10, 12]);
const spellSkill = _.sample(['Wisdom', 'Charisma', 'Intelligence']);
const abilityList = ['Strength', 'Dexerity', 'Constitution', 'Wisdom', 'Charisma', 'Intelligence'];
const skillList = ['Acrobatics ', 'Animal Handling', 'Arcana', 'Athletics', 'Deception', 'History', 'Insight', 'Intimidation', 'Investigation', 'Medicine', 'Nature', 'Perception', 'Performance', 'Persuasion', 'Religion', 'Sleight of Hand', 'Stealth', 'Survival'];
@@ -26,12 +27,21 @@ module.exports = function(classname){
'___',
`- **Armor:** ${_.sampleSize(['Light armor', 'Medium armor', 'Heavy armor', 'Shields'], _.random(0, 3)).join(', ') || 'None'}`,
`- **Weapons:** ${_.sampleSize(['Squeegee', 'Rubber Chicken', 'Simple weapons', 'Martial weapons'], _.random(0, 2)).join(', ') || 'None'}`,
`- **Tools:** ${_.sampleSize(['Artian\'s tools', 'one musical instrument', 'Thieve\'s tools'], _.random(0, 2)).join(', ') || 'None'}`,
`- **Tools:** ${_.sampleSize(['Artisan\'s tools', 'one musical instrument', 'Thieves\' tools'], _.random(0, 2)).join(', ') || 'None'}`,
'',
'___',
`- **Saving Throws:** ${_.sampleSize(abilityList, 2).join(', ')}`,
`- **Skills:** Choose two from ${_.sampleSize(skillList, _.random(4, 6)).join(', ')}`,
'',
'#### Spellcasting Ability',
'',
`<div style=text-align:center>`,
'___',
`- **Spell save DC** = ${_.sample([6, 8, 10])} + your proficiency bonus + your ${spellSkill} modifier`,
'',
`- **Spell attack modifier** = your proficiency bonus + your ${spellSkill} modifier`,
`</div>`,
'',
'#### Equipment',
'You start with the following equipment, in addition to the equipment granted by your background:',
'- *(a)* a martial weapon and a shield or *(b)* two martial weapons',

View File

@@ -0,0 +1,142 @@
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
const StringArrayEditor = createClass({
displayName : 'StringArrayEditor',
getDefaultProps : function() {
return {
label : '',
values : [],
valuePatterns : null,
placeholder : '',
unique : false,
cannotEdit : [],
onChange : ()=>{}
};
},
getInitialState : function() {
return {
valueContext : !!this.props.values ? this.props.values.map((value)=>({
value,
editing : false
})) : [],
temporaryValue : '',
updateValue : ''
};
},
componentDidUpdate : function(prevProps) {
if(!_.eq(this.props.values, prevProps.values)) {
this.setState({
valueContext : this.props.values ? this.props.values.map((newValue)=>({
value : newValue,
editing : this.state.valueContext.find(({ value })=>value === newValue)?.editing || false
})) : []
});
}
},
handleChange : function(value) {
this.props.onChange({
target : {
value
}
});
},
addValue : function(value){
this.handleChange(_.uniq([...this.props.values, value]));
this.setState({
temporaryValue : ''
});
},
removeValue : function(index){
this.handleChange(this.props.values.filter((_, i)=>i !== index));
},
updateValue : function(value, index){
const valueContext = this.state.valueContext;
valueContext[index].value = value;
valueContext[index].editing = false;
this.handleChange(valueContext.map((context)=>context.value));
this.setState({ valueContext, updateValue: '' });
},
editValue : function(index){
if(!!this.props.cannotEdit && this.props.cannotEdit.includes(this.props.values[index])) {
return;
}
const valueContext = this.state.valueContext.map((context, i)=>{
context.editing = index === i;
return context;
});
this.setState({ valueContext, updateValue: this.props.values[index] });
},
valueIsValid : function(value, index) {
const values = _.clone(this.props.values);
if(index !== undefined) {
values.splice(index, 1);
}
const matchesPatterns = !this.props.valuePatterns || this.props.valuePatterns.some((pattern)=>!!(value || '').match(pattern));
const uniqueIfSet = !this.props.unique || !values.includes(value);
return matchesPatterns && uniqueIfSet;
},
handleValueInputKeyDown : function(event, index) {
if(event.key === 'Enter') {
if(this.valueIsValid(event.target.value, index)) {
if(index !== undefined) {
this.updateValue(event.target.value, index);
} else {
this.addValue(event.target.value);
}
}
} else if(event.key === 'Escape') {
this.closeEditInput(index);
}
},
closeEditInput : function(index) {
const valueContext = this.state.valueContext;
valueContext[index].editing = false;
this.setState({ valueContext, updateValue: '' });
},
render : function() {
const valueElements = Object.values(this.state.valueContext).map((context, i)=>context.editing
? <React.Fragment key={i}>
<div className='input-group'>
<input type='text' className={`value ${this.valueIsValid(this.state.updateValue, i) ? '' : 'invalid'}`} autoFocus placeholder={this.props.placeholder}
value={this.state.updateValue}
onKeyDown={(e)=>this.handleValueInputKeyDown(e, i)}
onChange={(e)=>this.setState({ updateValue: e.target.value })}/>
{<div className='icon steel' onClick={(e)=>{ e.stopPropagation(); this.closeEditInput(i); }}><i className='fa fa-undo fa-fw'/></div>}
{this.valueIsValid(this.state.updateValue, i) ? <div className='icon steel' onClick={(e)=>{ e.stopPropagation(); this.updateValue(this.state.updateValue, i); }}><i className='fa fa-check fa-fw'/></div> : null}
</div>
</React.Fragment>
: <div className='badge' key={i} onClick={()=>this.editValue(i)}>{context.value}
{!!this.props.cannotEdit && this.props.cannotEdit.includes(context.value) ? null : <div className='icon steel' onClick={(e)=>{ e.stopPropagation(); this.removeValue(i); }}><i className='fa fa-times fa-fw'/></div>}
</div>
);
return <div className='field values'>
<label>{this.props.label}</label>
<div className='list'>
{valueElements}
<div className='input-group'>
<input type='text' className={`value ${this.valueIsValid(this.state.temporaryValue) ? '' : 'invalid'}`} placeholder={this.props.placeholder}
value={this.state.temporaryValue}
onKeyDown={(e)=>this.handleValueInputKeyDown(e)}
onChange={(e)=>this.setState({ temporaryValue: e.target.value })}/>
{this.valueIsValid(this.state.temporaryValue) ? <div className='icon steel' onClick={(e)=>{ e.stopPropagation(); this.addValue(this.state.temporaryValue); }}><i className='fa fa-check fa-fw'/></div> : null}
</div>
</div>
</div>;
}
});
module.exports = StringArrayEditor;

View File

@@ -1,8 +1,8 @@
require('./homebrew.less');
const React = require('react');
const createClass = require('create-react-class');
const { StaticRouter:Router, Switch, Route } = require('react-router-dom');
const queryString = require('query-string');
const { StaticRouter:Router } = require('react-router-dom/server');
const { Route, Routes, useParams, useSearchParams } = require('react-router-dom');
const HomePage = require('./pages/homePage/homePage.jsx');
const EditPage = require('./pages/editPage/editPage.jsx');
@@ -12,6 +12,23 @@ const NewPage = require('./pages/newPage/newPage.jsx');
//const ErrorPage = require('./pages/errorPage/errorPage.jsx');
const PrintPage = require('./pages/printPage/printPage.jsx');
const WithRoute = (props)=>{
const params = useParams();
const [searchParams] = useSearchParams();
const queryParams = {};
for (const [key, value] of searchParams?.entries() || []) {
queryParams[key] = value;
}
const Element = props.el;
const allProps = {
...props,
...params,
query : queryParams,
el : undefined
};
return <Element {...allProps} />;
};
const Homebrew = createClass({
displayName : 'Homebrewery',
getDefaultProps : function() {
@@ -33,33 +50,34 @@ const Homebrew = createClass({
};
},
getInitialState : function(){
global.version = this.props.version;
getInitialState : function() {
global.account = this.props.account;
global.version = this.props.version;
global.enable_v3 = this.props.enable_v3;
global.config = this.props.config;
return {};
},
render : function (){
return (
<Router location={this.props.url}>
<div className='homebrew'>
<Switch>
<Route path='/edit/:id' component={(routeProps)=><EditPage id={routeProps.match.params.id} brew={this.props.brew} />}/>
<Route path='/share/:id' component={(routeProps)=><SharePage id={routeProps.match.params.id} brew={this.props.brew} />}/>
<Route path='/new/:id' component={(routeProps)=><NewPage id={routeProps.match.params.id} brew={this.props.brew} />}/>
<Route path='/new' exact component={(routeProps)=><NewPage />}/>
<Route path='/user/:username' component={(routeProps)=><UserPage username={routeProps.match.params.username} brews={this.props.brews} />}/>
<Route path='/print/:id' component={(routeProps)=><PrintPage brew={this.props.brew} query={queryString.parse(routeProps.location.search)} />}/>
<Route path='/print' exact component={(routeProps)=><PrintPage query={queryString.parse(routeProps.location.search)} />}/>
<Route path='/changelog' exact component={()=><SharePage brew={this.props.brew} />}/>
<Route path='/faq' exact component={()=><SharePage brew={this.props.brew} />}/>
<Route path='/v3_preview' exact component={()=><HomePage brew={this.props.brew} />}/>
<Route path='/' component={()=><HomePage brew={this.props.brew} />}/>
</Switch>
</div>
</Router>
);
return <Router location={this.props.url}>
<div className='homebrew'>
<Routes>
<Route path='/edit/:id' element={<WithRoute el={EditPage} brew={this.props.brew} />} />
<Route path='/share/:id' element={<WithRoute el={SharePage} brew={this.props.brew} />} />
<Route path='/new/:id' element={<WithRoute el={NewPage} brew={this.props.brew} />} />
<Route path='/new' element={<WithRoute el={NewPage}/>} />
<Route path='/user/:username' element={<WithRoute el={UserPage} brews={this.props.brews} />} />
<Route path='/print/:id' element={<WithRoute el={PrintPage} brew={this.props.brew} />} />
<Route path='/print' element={<WithRoute el={PrintPage} />} />
<Route path='/changelog' element={<WithRoute el={SharePage} brew={this.props.brew} />} />
<Route path='/faq' element={<WithRoute el={SharePage} brew={this.props.brew} />} />
<Route path='/legacy' element={<WithRoute el={HomePage} brew={this.props.brew} />} />
<Route path='/' element={<WithRoute el={HomePage} brew={this.props.brew} />} />
<Route path='/*' element={<WithRoute el={HomePage} brew={this.props.brew} />} />
</Routes>
</div>
</Router>;
}
});

View File

@@ -1,6 +1,7 @@
const React = require('react');
const createClass = require('create-react-class');
const Nav = require('naturalcrit/nav/nav.jsx');
const request = require('superagent');
const Account = createClass({
displayName : 'AccountNavItem',
@@ -23,12 +24,42 @@ const Account = createClass({
// Reset divider position
window.localStorage.removeItem('naturalcrit-pane-split');
// Clear login cookie
document.cookie = `nc_session=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/;samesite=lax;${window.domain ? `domain=${window.domain}` : ''}`;
let domain = '';
if(window.location?.hostname) {
let domainArray = window.location.hostname.split('.');
if(domainArray.length > 2){
domainArray = [''].concat(domainArray.slice(-2));
}
domain = domainArray.join('.');
}
document.cookie = `nc_session=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/;samesite=lax;${domain ? `domain=${domain}` : ''}`;
window.location = '/';
};
}
},
localLogin : async function(){
const username = prompt('Enter username:');
if(!username) {return;}
const expiry = new Date;
expiry.setFullYear(expiry.getFullYear() + 1);
const token = await request.post('/local/login')
.send({ username })
.then((response)=>{
return response.body;
})
.catch((err)=>{
console.warn(err);
});
if(!token) return;
document.cookie = `nc_session=${token};expires=${expiry};path=/;samesite=lax;${window.domain ? `domain=${window.domain}` : ''}`;
window.location.reload(true);
},
render : function(){
// Logged in
if(global.account){
return <Nav.dropdown>
<Nav.item
@@ -56,6 +87,16 @@ const Account = createClass({
</Nav.dropdown>;
}
// Logged out
// LOCAL ONLY
if(global.config.local) {
return <Nav.item color='teal' icon='fas fa-sign-in-alt' onClick={this.localLogin}>
login
</Nav.item>;
};
// Logged out
// Production site
return <Nav.item href={`https://www.naturalcrit.com/login?redirect=${this.state.url}`} color='teal' icon='fas fa-sign-in-alt'>
login
</Nav.item>;

View File

@@ -91,7 +91,7 @@
&:nth-of-type(2){ background-color: darken(@purple, 30%); }
}
.item{
#backgroundColors;
#backgroundColorsHover;
.animate(background-color);
position : relative;
display : block;

View File

@@ -16,8 +16,8 @@ const BrewItem = createClass({
brew : {
title : '',
description : '',
authors : []
authors : [],
stubbed : true
}
};
},
@@ -31,7 +31,7 @@ const BrewItem = createClass({
if(!confirm('Are you REALLY sure? You will lose editor access to this document.')) return;
}
request.delete(`/api/${this.props.brew.googleId}${this.props.brew.editId}`)
request.delete(`/api/${this.props.brew.googleId ?? ''}${this.props.brew.editId}`)
.send()
.end(function(err, res){
location.reload();
@@ -50,7 +50,7 @@ const BrewItem = createClass({
if(!this.props.brew.editId) return;
let editLink = this.props.brew.editId;
if(this.props.brew.googleId) {
if(this.props.brew.googleId && !this.props.brew.stubbed) {
editLink = this.props.brew.googleId + editLink;
}
@@ -63,7 +63,7 @@ const BrewItem = createClass({
if(!this.props.brew.shareId) return;
let shareLink = this.props.brew.shareId;
if(this.props.brew.googleId) {
if(this.props.brew.googleId && !this.props.brew.stubbed) {
shareLink = this.props.brew.googleId + shareLink;
}
@@ -76,7 +76,7 @@ const BrewItem = createClass({
if(!this.props.brew.shareId) return;
let shareLink = this.props.brew.shareId;
if(this.props.brew.googleId) {
if(this.props.brew.googleId && !this.props.brew.stubbed) {
shareLink = this.props.brew.googleId + shareLink;
}
@@ -86,7 +86,7 @@ const BrewItem = createClass({
},
renderGoogleDriveIcon : function(){
if(!this.props.brew.gDrive) return;
if(!this.props.brew.googleId) return;
return <span>
<img className='googleDriveIcon' src={googleDriveIcon} alt='googleDriveIcon' />
@@ -95,6 +95,9 @@ const BrewItem = createClass({
render : function(){
const brew = this.props.brew;
if(Array.isArray(brew.tags)) { // temporary fix until dud tags are cleaned
brew.tags = brew.tags?.filter(tag => tag); //remove tags that are empty strings
}
const dateFormatString = 'YYYY-MM-DD HH:mm:ss';
return <div className='brewItem'>
@@ -104,8 +107,19 @@ const BrewItem = createClass({
</div>
<hr />
<div className='info'>
<span title={`Authors:\n${brew.authors.join('\n')}`}>
<i className='fas fa-user'/> {brew.authors.join(', ')}
{brew.tags?.length ? <>
<div className='brewTags' title={`Tags:\n${brew.tags.join('\n')}`}>
<i className='fas fa-tags'/>
{brew.tags.map((tag, idx)=>{
let matches = tag.match(/^(?:([^:]+):)?([^:]+)$/);
return <span className={matches[1]}>{matches[2]}</span>;
})}
</div>
</> : <></>
}
<span title={`Authors:\n${brew.authors?.join('\n')}`}>
<i className='fas fa-user'/> {brew.authors?.join(', ')}
</span>
<br />
<span title={`Last viewed: ${moment(brew.lastViewed).local().format(dateFormatString)}`}>

View File

@@ -29,13 +29,23 @@
.info{
position: initial;
bottom: 2px;
font-family : ScalySans;
font-family : ScalySansRemake;
font-size : 1.2em;
&>span{
margin-right : 12px;
line-height : 1.5em;
}
}
.brewTags span {
background-color: #c8ac6e3b;
margin: 2px;
padding: 2px;
border: 1px solid #c8ac6e;
border-radius: 4px;
white-space: nowrap;
display: inline-block;
font-weight: bold;
}
&:hover{
.links{
opacity : 1;

View File

@@ -1,3 +1,4 @@
/*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/
require('./listPage.less');
const React = require('react');
const createClass = require('create-react-class');
@@ -6,6 +7,11 @@ const moment = require('moment');
const BrewItem = require('./brewItem/brewItem.jsx');
const USERPAGE_KEY_PREFIX = 'HOMEBREWERY-LISTPAGE';
const DEFAULT_SORT_TYPE = 'alpha';
const DEFAULT_SORT_DIR = 'asc';
const ListPage = createClass({
displayName : 'ListPage',
getDefaultProps : function() {
@@ -21,13 +27,56 @@ const ListPage = createClass({
};
},
getInitialState : function() {
// HIDE ALL GROUPS UNTIL LOADED
const brewCollection = this.props.brewCollection.map((brewGroup)=>{
brewGroup.visible = false;
return brewGroup;
});
return {
sortType : 'alpha',
sortDir : 'asc',
filterString : ''
filterString : this.props.query?.filter || '',
sortType : this.props.query?.sort || null,
sortDir : this.props.query?.dir || null,
query : this.props.query,
brewCollection : brewCollection
};
},
componentDidMount : function() {
// SAVE TO LOCAL STORAGE WHEN LEAVING PAGE
window.onbeforeunload = this.saveToLocalStorage;
// LOAD FROM LOCAL STORAGE
if(typeof window !== 'undefined') {
const newSortType = (this.state.sortType ?? (localStorage.getItem(`${USERPAGE_KEY_PREFIX}-SORTTYPE`) || DEFAULT_SORT_TYPE));
const newSortDir = (this.state.sortDir ?? (localStorage.getItem(`${USERPAGE_KEY_PREFIX}-SORTDIR`) || DEFAULT_SORT_DIR));
this.updateUrl(this.state.filterString, newSortType, newSortDir);
const brewCollection = this.props.brewCollection.map((brewGroup)=>{
brewGroup.visible = (localStorage.getItem(`${USERPAGE_KEY_PREFIX}-VISIBILITY-${brewGroup.class}`) ?? 'true')=='true';
return brewGroup;
});
this.setState({
brewCollection : brewCollection,
sortType : newSortType,
sortDir : newSortDir
});
};
},
componentWillUnmount : function() {
window.onbeforeunload = function(){};
},
saveToLocalStorage : function() {
this.state.brewCollection.map((brewGroup)=>{
localStorage.setItem(`${USERPAGE_KEY_PREFIX}-VISIBILITY-${brewGroup.class}`, `${brewGroup.visible}`);
});
localStorage.setItem(`${USERPAGE_KEY_PREFIX}-SORTTYPE`, this.state.sortType);
localStorage.setItem(`${USERPAGE_KEY_PREFIX}-SORTDIR`, this.state.sortDir);
},
renderBrews : function(brews){
if(!brews || !brews.length) return <div className='noBrews'>No Brews.</div>;
@@ -49,14 +98,18 @@ const ListPage = createClass({
},
handleSortOptionChange : function(event){
this.updateUrl(this.state.filterString, event.target.value, this.state.sortDir);
this.setState({
sortType : event.target.value
});
},
handleSortDirChange : function(event){
const newDir = this.state.sortDir == 'asc' ? 'desc' : 'asc';
this.updateUrl(this.state.filterString, this.state.sortType, newDir);
this.setState({
sortDir : `${(this.state.sortDir == 'asc' ? 'desc' : 'asc')}`
sortDir : newDir
});
},
@@ -74,19 +127,37 @@ const ListPage = createClass({
handleFilterTextChange : function(e){
this.setState({
filterString : e.target.value
filterString : e.target.value,
});
this.updateUrl(e.target.value, this.state.sortType, this.state.sortDir);
return;
},
updateUrl : function(filterTerm, sortType, sortDir){
const url = new URL(window.location.href);
const urlParams = new URLSearchParams(url.search);
urlParams.set('sort', sortType);
urlParams.set('dir', sortDir);
if(!filterTerm)
urlParams.delete('filter');
else
urlParams.set('filter', filterTerm);
url.search = urlParams;
window.history.replaceState(null, null, url);
},
renderFilterOption : function(){
return <td>
<label>
<i className='fas fa-search'></i>
<input
type='search'
placeholder='search title/description'
placeholder='filter title/description'
onChange={this.handleFilterTextChange}
value={this.state.filterString}
/>
</label>
</td>;
@@ -125,32 +196,48 @@ const ListPage = createClass({
getSortedBrews : function(brews){
const testString = _.deburr(this.state.filterString).toLowerCase();
brews = _.filter(brews, (brew)=>{
return (_.deburr(brew.title).toLowerCase().includes(testString)) ||
(_.deburr(brew.description).toLowerCase().includes(testString));
});
brews = _.filter(brews, (brew)=>{
const brewStrings = _.deburr([
brew.title,
brew.description,
brew.tags].join('\n')
.toLowerCase());
return brewStrings.includes(testString);
});
return _.orderBy(brews, (brew)=>{ return this.sortBrewOrder(brew); }, this.state.sortDir);
},
toggleBrewCollectionState : function(brewGroupClass) {
this.setState((prevState)=>({
brewCollection : prevState.brewCollection.map(
(brewGroup)=>brewGroup.class === brewGroupClass ? { ...brewGroup, visible: !brewGroup.visible } : brewGroup
)
}));
},
renderBrewCollection : function(brewCollection){
if(brewCollection == []) return <div className='brewCollection'>
<h1>No Brews</h1>
</div>;
return _.map(brewCollection, (brewGroup, idx)=>{
return <div key={idx} className={`brewCollection ${brewGroup.class ?? ''}`}>
<h1>{brewGroup.title || 'No Title'}</h1>
{this.renderBrews(this.getSortedBrews(brewGroup.brews))}
<h1 className={brewGroup.visible ? 'active' : 'inactive'} onClick={()=>{this.toggleBrewCollectionState(brewGroup.class);}}>{brewGroup.title || 'No Title'}</h1>
{brewGroup.visible ? this.renderBrews(this.getSortedBrews(brewGroup.brews)) : <></>}
</div>;
});
},
render : function(){
return <div className='listPage sitePage'>
<link href='/themes/5ePhbLegacy.style.css' rel='stylesheet'/>
<link href='/themes/5ePhb.style.css' rel='stylesheet'/>
{this.props.navItems}
<div className='content V3'>
<div className='phb'>
<div className='phb page'>
{this.renderSortOptions()}
{this.renderBrewCollection(this.props.brewCollection)}
{this.renderBrewCollection(this.state.brewCollection)}
</div>
</div>
</div>;

View File

@@ -13,7 +13,7 @@
}
.listPage{
.content{
overflow-y : scroll;
overflow-y : overlay;
.phb{
.noColumns();
height : auto;
@@ -34,7 +34,7 @@
font-family : 'Open Sans', sans-serif;
position : fixed;
top : 35px;
left : calc(50vw - 408px);
left : calc(50vw - 400px);
border : 2px solid #58180D;
width : 800px;
background-color : #EEE5CE;
@@ -74,4 +74,26 @@
}
}
}
h1 {
cursor: pointer;
&.active {
color: #58180D;
}
&.inactive {
color: #707070;
}
&.active::before, &.inactive::before {
font-family: 'Font Awesome 5 Free';
font-weight: 900;
font-size: 0.6cm;
padding-right: 0.5em;
}
&.active::before {
content: '\f107';
}
&.inactive::before {
content: '\f105';
}
}
}

View File

@@ -114,7 +114,7 @@ const EditPage = createClass({
if(htmlErrors.length) htmlErrors = Markdown.validate(text);
this.setState((prevState)=>({
brew : _.merge({}, prevState.brew, { text: text }),
brew : { ...prevState.brew, text: text },
isPending : true,
htmlErrors : htmlErrors
}), ()=>this.trySave());
@@ -122,14 +122,17 @@ const EditPage = createClass({
handleStyleChange : function(style){
this.setState((prevState)=>({
brew : _.merge({}, prevState.brew, { style: style }),
brew : { ...prevState.brew, style: style },
isPending : true
}), ()=>this.trySave());
},
handleMetaChange : function(metadata){
this.setState((prevState)=>({
brew : _.merge({}, prevState.brew, metadata),
brew : {
...prevState.brew,
...metadata
},
isPending : true,
}), ()=>this.trySave());
@@ -200,7 +203,7 @@ const EditPage = createClass({
const brew = this.state.brew;
brew.pageCount = ((brew.renderer=='legacy' ? brew.text.match(/\\page/g) : brew.text.match(/^\\page$/gm)) || []).length + 1;
const params = `${transfer ? `?transfer${this.state.saveGoogle ? 'To' : 'From'}Google=true` : ''}`;
const params = `${transfer ? `?${this.state.saveGoogle ? 'saveToGoogle' : 'removeFromGoogle'}=true` : ''}`;
const res = await request
.put(`/api/update/${brew.editId}${params}`)
.send(brew)
@@ -210,16 +213,14 @@ const EditPage = createClass({
});
this.savedBrew = res.body;
if(transfer) {
history.replaceState(null, null, `/edit/${this.savedBrew.googleId ?? ''}${this.savedBrew.editId}`);
}
history.replaceState(null, null, `/edit/${this.savedBrew.editId}`);
this.setState((prevState)=>({
brew : _.merge({}, prevState.brew, {
brew : { ...prevState.brew,
googleId : this.savedBrew.googleId ? this.savedBrew.googleId : null,
editId : this.savedBrew.editId,
shareId : this.savedBrew.shareId
}),
},
isPending : false,
isSaving : false,
}));
@@ -276,26 +277,26 @@ const EditPage = createClass({
console.log(errMsg);
} catch (e){}
if(this.state.errors.status == '401'){
return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
Oops!
<div className='errorContainer' onClick={this.clearErrors}>
You must be signed in to a Google account
to save this to<br />Google Drive!<br />
<a target='_blank' rel='noopener noreferrer'
href={`https://www.naturalcrit.com/login?redirect=${this.state.url}`}>
<div className='confirm'>
Sign In
</div>
</a>
<div className='deny'>
Not Now
</div>
</div>
</Nav.item>;
}
// if(this.state.errors.status == '401'){
// return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
// Oops!
// <div className='errorContainer' onClick={this.clearErrors}>
// You must be signed in to a Google account
// to save this to<br />Google Drive!<br />
// <a target='_blank' rel='noopener noreferrer'
// href={`https://www.naturalcrit.com/login?redirect=${this.state.url}`}>
// <div className='confirm'>
// Sign In
// </div>
// </a>
// <div className='deny'>
// Not Now
// </div>
// </div>
// </Nav.item>;
// }
if(this.state.errors.response.req.url.match(/^\/api\/.*Google.*$/m)){
if(this.state.errors.response.req.url.match(/^\/api.*Google.*$/m)){
return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
Oops!
<div className='errorContainer' onClick={this.clearErrors}>
@@ -340,7 +341,7 @@ const EditPage = createClass({
},
processShareId : function() {
return this.state.brew.googleId ?
return this.state.brew.googleId && !this.state.brew.stubbed ?
this.state.brew.googleId + this.state.brew.shareId :
this.state.brew.shareId;
},
@@ -352,7 +353,7 @@ const EditPage = createClass({
const title = `${this.props.brew.title} ${systems}`;
const text = `Hey guys! I've been working on this homebrew. I'd love your feedback. Check it out.
**[Homebrewery Link](https://homebrewery.naturalcrit.com/share/${shareLink})**`;
**[Homebrewery Link](${global.config.publicUrl}/share/${shareLink})**`;
return `https://www.reddit.com/r/UnearthedArcana/submit?title=${encodeURIComponent(title)}&text=${encodeURIComponent(text)}`;
},
@@ -387,7 +388,7 @@ const EditPage = createClass({
<Nav.item color='blue' href={`/share/${shareLink}`}>
view
</Nav.item>
<Nav.item color='blue' onClick={()=>{navigator.clipboard.writeText(`https://homebrewery.naturalcrit.com/share/${shareLink}`);}}>
<Nav.item color='blue' onClick={()=>{navigator.clipboard.writeText(`${global.config.publicUrl}/share/${shareLink}`);}}>
copy url
</Nav.item>
<Nav.item color='blue' href={this.getRedditLink()} newTab={true} rel='noopener noreferrer'>

View File

@@ -52,7 +52,7 @@ const HomePage = createClass({
},
handleTextChange : function(text){
this.setState((prevState)=>({
brew : _.merge({}, prevState.brew, { text: text })
brew : { ...prevState.brew, text: text }
}));
},
renderNavbar : function(){

View File

@@ -1,50 +1,68 @@
# The Homebrewery
```css
.page #example + table td {
border:1px dashed #00000030;
}
.page {
padding-bottom : 1.1cm;
}
```
# The Homebrewery *V3*
Welcome traveler from an antique land. Please sit and tell us of what you have seen. The unheard of monsters, who slither and bite. Tell us of the wondrous items and and artifacts you have found, their mysteries yet to be unlocked. Of the vexing vocations and surprising skills you have seen.
### Homebrew D&D made easy
The Homebrewery makes the creation and sharing of authentic looking Fifth-Edition homebrews easy. It uses [Markdown](https://help.github.com/articles/markdown-basics/) with a little CSS magic to make your brews come to life.
**Try it!** Simply edit the text on the left and watch it *update live* on the right.
**Try it!** Simply edit the text on the left and watch it *update live* on the right. Note that not every button is visible on this demo page. Click New {{fas,fa-plus-square}} in the navbar above to start brewing with all the features!
### Editing and Sharing
When you create your own homebrew you will be given a *edit url* and a *share url*. Any changes you make will be automatically saved to the database within a few seconds. Anyone with the edit url will be able to make edits to your homebrew. So be careful about who you share it with.
When you create your own homebrew, you will be given a *edit url* and a *share url*.
Any changes you make while on the *edit url* will be automatically saved to the database within a few seconds. Anyone with the edit url will be able to make edits to your homebrew, so be careful about who you share it with.
Anyone with the *share url* will be able to access a read-only version of your homebrew.
## Helping out
{{note
##### PDF Creation
PDF Printing works best in Google Chrome. If you are having quality/consistency issues, try using Chrome to print instead.
After clicking the "Print" item in the navbar a new page will open and a print dialog will pop-up.
* Set the **Destination** to "Save as PDF"
* Set **Paper Size** to "Letter"
* If you are printing on A4 paper, make sure to have the **PRINT → {{far,fa-file}} A4 Pagesize** snippet in your brew
* In **Options** make sure "Background Images" is selected.
* Hit print and enjoy! You're done!
If you want to save ink or have a monochrome printer, add the **PRINT → {{fas,fa-tint}} Ink Friendly** snippet to your brew!
}}
![homebrew mug](http://i.imgur.com/hMna6G0.png) {position:absolute,bottom:20px,left:130px,width:220px}
{{artist,bottom:160px,left:100px
##### Homebrew Mug
[naturalcrit](https://homebrew.naturalcrit.com)
}}
{{pageNumber 1}}
{{footnote PART 1 | FANCINESS}}
\column
## New in V3.0.0
We've implemented an extended Markdown-like syntax for block and span elements, plus a few other changes, eliminating the need for HTML tags like `div` and `span` in most cases. No raw HTML tags should be needed in a brew (*but can still be used if you insist*).
Much of the syntax and styling has changed in V3, so converting a Legacy brew to V3 (or vice-versa) will require tweaking your document. *However*, all brews made prior to the release of v3.0.0 will still render normally, and you may switch between the "Legacy" brew renderer and the newer "V3" renderer via the {{fa,fa-info-circle}} **Properties** button on your brew at any time.
Scroll down to the next page for a brief summary of the changes and new features available in V3!
#### New Things All The Time!
Check out the latest updates in the full changelog [here](/changelog).
### Helping out
Like this tool? Want to buy me a beer? [Head here](https://www.patreon.com/Naturalcrit) to help me keep the servers running.
This tool will **always** be free, never have ads, and I will never offer any "premium" features or whatever.
>##### PDF Exporting
> PDF Printing works best in Chrome. If you are having quality/consistency issues, try using Chrome to print instead.
>
> After clicking the "Print" item in the navbar a new page will open and a print dialog will pop-up.
> * Set the **Destination** to "Save as PDF"
> * Set **Paper Size** to "Letter"
> * If you are printing on A4 paper, make sure to have the "A4 page size snippet" in your brew
> * In **Options** make sure "Background Images" is selected.
> * Hit print and enjoy! You're done!
>
> If you want to save ink or have a monochrome printer, add the **Ink Friendly** snippet to your brew before you print
```
```
## V3.0.0 Released!
With the latest major update to *The Homebrewery* we've implemented an extended Markdown-like syntax for block and span elements, plus a few other changes, eliminating the need for HTML tags like **div** and **span** in most cases. No raw HTML tags should be needed in a brew, and going forward, raw HTML will no longer receive debugging support (*but can still be used if you insist*).
**You can enable V3 via the <span class="fa fa-info-circle" style="text-indent:0"></span> Properties button!**
## New Things All The Time!
What's new in the latest update? Check out the full changelog [here](/changelog)
### Bugs, Issues, Suggestions?
Take a quick look at our [Frequently Asked Questions page](/faq) to see if your question has a handy answer.
@@ -53,56 +71,105 @@ Need help getting started or just the right look for your brew? Head to [r/Homeb
Have an idea to make The Homebrewery better? Or did you find something that wasn't quite right? Check out the [GitHub Repo](https://github.com/naturalcrit/homebrewery/) to report technical issues.
### Legal Junk
The Homebrewery is licensed using the [MIT License](https://github.com/naturalcrit/homebrewery/blob/master/license). This means you are free to use The Homebrewery codebase any way that you want, except for claiming that you made it yourself.
The Homebrewery is licensed using the [MIT License](https://github.com/naturalcrit/homebrewery/blob/master/license). Which means you are free to use The Homebrewery codebase any way that you want, except for claiming that you made it yourself.
If you wish to sell or in some way gain profit for what you make on this site, it's your responsibility to ensure you have the proper licenses/rights for any images or resources used.
If you wish to sell or in some way gain profit for what's created on this site, it's your responsibility to ensure you have the proper licenses/rights for any images or resources used.
### More Resources
#### Crediting Me
If you'd like to credit me in your brew, I'd be flattered! Just reference that you made it with The Homebrewery.
### More Homebrew Resources
<a href='https://discord.gg/by3deKx' target='_blank'><img src='/assets/discordOfManyThings.svg' alt='Discord of Many Things Logo' title='Discord of Many Things Logo' style='width:50px; float: right; padding-left: 10px;'/></a>
If you are looking for more 5e Homebrew resources check out [r/UnearthedArcana](https://www.reddit.com/r/UnearthedArcana/) and their list of useful resources [here](https://www.reddit.com/r/UnearthedArcana/wiki/resources). The <a href='https://discord.gg/by3deKx' target='_blank' title='Discord of Many Things'>Discord of Many Things</a> is another great resource to connect with fellow homebrewers for help and feedback.
<img src='https://i.imgur.com/hMna6G0.png' style='position:absolute;bottom:40px;right:30px;width:280px' />
<div class='pageNumber'>1</div>
<div class='footnote'>PART 1 | FANCINESS</div>
<div style='position: absolute; top: 20px; right: 20px;'>
<a href='https://discord.gg/by3deKx' target='_blank' title='Discord of Many Things'><img src='/assets/discord.png' style='height:30px'/></a>
{{position:absolute;top:20px;right:20px;width:auto
<a href='https://discord.gg/by3deKx' target='_blank' title='Discord of Many Things' style='color: black;'><img src='/assets/discord.png' style='height:30px'/></a>
<a href='https://github.com/naturalcrit/homebrewery' target='_blank' title='Github' style='color: black; padding-left: 5px;'><img src='/assets/github.png' style='height:30px'/></a>
<a href='https://patreon.com/NaturalCrit' target='_blank' title='Patreon' style='color: black; padding-left: 5px;'><img src='/assets/patreon.png' style='height:30px'/></a>
<a href='https://www.reddit.com/r/homebrewery/' target='_blank' title='Reddit' style='color: black; padding-left: 5px;'><img src='/assets/reddit.png' style='height:30px'/></a>
</div>
}}
\page
# Appendix
## Markdown+
The Homebrewery aims to make homebrewing as simple as possible, providing a live editor with Markdown syntax that is more human-readable and faster to write with than raw HTML.
### Not quite Markdown
Although the Homebrewery uses Markdown, to get all the styling features from the PHB, we had to get a little creative. Some base HTML elements are not used as expected and I've had to include a few new keywords.
In version 3.0.0, with a goal of adding maximum flexibility without users resorting to complex HTML to accomplish simple tasks, Homebrewery provides an extended verision of Markdown with additional syntax.
**You can enable V3 via the {{fa,fa-info-circle}} Properties button!**
___
* **Horizontal Rules** are generally used to *modify* existing elements into a different style. For example, a horizontal rule before a blockquote will give it the style of a Monster Stat Block instead of a note.
* **New Pages** are controlled by the author. It's impossible for the site to detect when the end of a page is reached, so indicate you'd like to start a new page, use the new page snippet to get the syntax.
* **Code Blocks** are used only to indicate column breaks. Since they don't allow for styling within them, they weren't that useful to use.
* **HTML** can be used to get *just* the right look for your homebrew. I've included some examples in the snippet icons above the editor.
### Curly Brackets
The biggest change in V3 is the replacement of `<span></span>` and `<div></div>` with `{{ }}` for a cleaner custom formatting. Inline spans and block elements can be created and given ID's and Classes, as well as css properties, each of which are comma separated with no spaces. Use double quotes if a value requires spaces. Spans and Blocks start the same:
#### Span
My favorite author is {{pen,#author,color:orange,font-family:"trebuchet ms" Brandon Sanderson}}. The orange text has a class of `pen`, an id of `author`, is colored orange, and given a new font. The first space outside of quotes marks the beginning of the content.
#### Block
{{purple,#book,text-align:center,background:#aa88aa55
My favorite book is Wheel of Time. This block has a class of `purple`, an id of `book`, and centered text with a colored background. The opening and closing brackets are on lines separate from the block contents.
}}
```
```
#### Injection
For any element not inside a span or block, you can *inject* attributes using the same syntax but with single brackets in a single line immediately after the element.
Inline elements like *italics* {color:#D35400} or images require the injection on the same line.
### Images
Images must be hosted online somewhere, like imgur. You use the address to that image to reference it in your brew. Images can be included 'inline' with the text using Markdown-style images. However for background images more control is needed.
Block elements like headers require the injection to start on the line immediately following.
Background images should be included as HTML-style img tags. Using inline CSS you can precisely position your image where you'd like it to be. I have added both a inflow image snippet and a background image snippet to give you exmaples of how to do it.
##### A Purple Header
{color:purple,text-align:center}
\* *this does not currently work for tables yet*
### Vertical Spacing
A blank line can be achieved with a run of one or more `:` alone on a line. More `:`'s will create more space.
### Crediting Me
If you'd like to credit The Homebrewery in your brew, I'd be flattered! Just reference that you made it with The Homebrewery.
::
Much nicer than `<br><br><br><br><br>`
### Definition Lists
**Example** :: V3 uses HTML *definition lists* to create "lists" with hanging indents.
<div class='pageNumber'>2</div>
<div class='footnote'>PART 2 | BORING STUFF</div>
### Column Breaks
Column and page breaks with `\column` and `\page`.
\column
### Tables
Tables now allow column & row spanning between cells. This is included in some updated snippets, but a simplified example is given below.
A cell can be spanned across columns by grouping multiple pipe `|` characters at the end of a cell.
Row spanning is achieved by adding a `^` at the end of a cell just before the `|`.
These can be combined to span a cell across both columns and rows. Cells must have the same colspan if they are to be rowspan'd.
##### Example
| Head A | Spanned Header ||
| Head B | Head C | Head D |
|:-------|:------:|:------:|
| 1A | 1B | 1C |
| 2A ^| 2B | 2C |
| 3A ^| 3B 3C ||
| 4A | 4B 4C^||
| 5A ^| 5B | 5C |
| 6A | 6B ^| 6C |
## Images
Images must be hosted online somewhere, like [Imgur](https://www.imgur.com). You use the address to that image to reference it in your brew\*.
Using *Curly Injection* you can assign an id, classes, or inline CSS properties to the Markdown image syntax.
![alt-text](https://s-media-cache-ak0.pinimg.com/736x/4a/81/79/4a8179462cfdf39054a418efd4cb743e.jpg) {width:100px,border:"2px solid",border-radius:10px}
\* *When using Imgur-hosted images, use the "direct link", which can be found when you click into your image in the Imgur interace.*
## Snippets
Homebrewery comes with a series of *code snippets* found at the top of the editor pane that make it easy to create brews as quickly as possible. Just set your cursor where you want the code to appear in the editor pane, choose a snippet, and make the adjustments you need.
## Style Editor Panel
{{fa,fa-paint-brush}} Technically released prior to v3 but still new to many users, check out the new **Style Editor** located on the right side of the Snippet bar. This editor accepts CSS for styling without requiring `<style>` tags-- anything that would have gone inside style tags before can now be placed here, and snippets that insert CSS styles are now located on that tab.
{{pageNumber 2}}
{{footnote PART 2 | BORING STUFF}}

View File

@@ -0,0 +1,108 @@
# The Homebrewery
Welcome traveler from an antique land. Please sit and tell us of what you have seen. The unheard of monsters, who slither and bite. Tell us of the wondrous items and and artifacts you have found, their mysteries yet to be unlocked. Of the vexing vocations and surprising skills you have seen.
### Homebrew D&D made easy
The Homebrewery makes the creation and sharing of authentic looking Fifth-Edition homebrews easy. It uses [Markdown](https://help.github.com/articles/markdown-basics/) with a little CSS magic to make your brews come to life.
**Try it!** Simply edit the text on the left and watch it *update live* on the right.
### Editing and Sharing
When you create your own homebrew you will be given a *edit url* and a *share url*. Any changes you make will be automatically saved to the database within a few seconds. Anyone with the edit url will be able to make edits to your homebrew. So be careful about who you share it with.
Anyone with the *share url* will be able to access a read-only version of your homebrew.
## Helping out
Like this tool? Want to buy me a beer? [Head here](https://www.patreon.com/Naturalcrit) to help me keep the servers running.
This tool will **always** be free, never have ads, and I will never offer any "premium" features or whatever.
>##### PDF Exporting
> PDF Printing works best in Chrome. If you are having quality/consistency issues, try using Chrome to print instead.
>
> After clicking the "Print" item in the navbar a new page will open and a print dialog will pop-up.
> * Set the **Destination** to "Save as PDF"
> * Set **Paper Size** to "Letter"
> * If you are printing on A4 paper, make sure to have the "A4 page size snippet" in your brew
> * In **Options** make sure "Background Images" is selected.
> * Hit print and enjoy! You're done!
>
> If you want to save ink or have a monochrome printer, add the **Ink Friendly** snippet to your brew before you print
```
```
## V3.0.0 Released!
With the latest major update to *The Homebrewery* we've implemented an extended Markdown-like syntax for block and span elements, plus a few other changes, eliminating the need for HTML tags like **div** and **span** in most cases. No raw HTML tags should be needed in a brew, and going forward, raw HTML will no longer receive debugging support (*but can still be used if you insist*).
**You can enable V3 via the <span class="fa fa-info-circle" style="text-indent:0"></span> Properties button!**
## New Things All The Time!
What's new in the latest update? Check out the full changelog [here](/changelog)
### Bugs, Issues, Suggestions?
Take a quick look at our [Frequently Asked Questions page](/faq) to see if your question has a handy answer.
Need help getting started or just the right look for your brew? Head to [r/Homebrewery](https://www.reddit.com/r/homebrewery/submit?selftext=true&title=%5BIssue%5D%20Describe%20Your%20Issue%20Here) and let us know!
Have an idea to make The Homebrewery better? Or did you find something that wasn't quite right? Check out the [GitHub Repo](https://github.com/naturalcrit/homebrewery/) to report technical issues.
### Legal Junk
The Homebrewery is licensed using the [MIT License](https://github.com/naturalcrit/homebrewery/blob/master/license). This means you are free to use The Homebrewery codebase any way that you want, except for claiming that you made it yourself.
If you wish to sell or in some way gain profit for what you make on this site, it's your responsibility to ensure you have the proper licenses/rights for any images or resources used.
### More Resources
<a href='https://discord.gg/by3deKx' target='_blank'><img src='/assets/discordOfManyThings.svg' alt='Discord of Many Things Logo' title='Discord of Many Things Logo' style='width:50px; float: right; padding-left: 10px;'/></a>
If you are looking for more 5e Homebrew resources check out [r/UnearthedArcana](https://www.reddit.com/r/UnearthedArcana/) and their list of useful resources [here](https://www.reddit.com/r/UnearthedArcana/wiki/resources). The <a href='https://discord.gg/by3deKx' target='_blank' title='Discord of Many Things'>Discord of Many Things</a> is another great resource to connect with fellow homebrewers for help and feedback.
<img src='https://i.imgur.com/hMna6G0.png' style='position:absolute;bottom:40px;right:30px;width:280px' />
<div class='pageNumber'>1</div>
<div class='footnote'>PART 1 | FANCINESS</div>
<div style='position: absolute; top: 20px; right: 20px;'>
<a href='https://discord.gg/by3deKx' target='_blank' title='Discord of Many Things'><img src='/assets/discord.png' style='height:30px'/></a>
<a href='https://github.com/naturalcrit/homebrewery' target='_blank' title='Github' style='color: black; padding-left: 5px;'><img src='/assets/github.png' style='height:30px'/></a>
<a href='https://patreon.com/NaturalCrit' target='_blank' title='Patreon' style='color: black; padding-left: 5px;'><img src='/assets/patreon.png' style='height:30px'/></a>
<a href='https://www.reddit.com/r/homebrewery/' target='_blank' title='Reddit' style='color: black; padding-left: 5px;'><img src='/assets/reddit.png' style='height:30px'/></a>
</div>
\page
# Appendix
### Not quite Markdown
Although the Homebrewery uses Markdown, to get all the styling features from the PHB, we had to get a little creative. Some base HTML elements are not used as expected and I've had to include a few new keywords.
___
* **Horizontal Rules** are generally used to *modify* existing elements into a different style. For example, a horizontal rule before a blockquote will give it the style of a Monster Stat Block instead of a note.
* **New Pages** are controlled by the author. It's impossible for the site to detect when the end of a page is reached, so indicate you'd like to start a new page, use the new page snippet to get the syntax.
* **Code Blocks** are used only to indicate column breaks. Since they don't allow for styling within them, they weren't that useful to use.
* **HTML** can be used to get *just* the right look for your homebrew. I've included some examples in the snippet icons above the editor.
```
```
### Images
Images must be hosted online somewhere, like imgur. You use the address to that image to reference it in your brew. Images can be included 'inline' with the text using Markdown-style images. However for background images more control is needed.
Background images should be included as HTML-style img tags. Using inline CSS you can precisely position your image where you'd like it to be. I have added both a inflow image snippet and a background image snippet to give you exmaples of how to do it.
### Crediting Me
If you'd like to credit The Homebrewery in your brew, I'd be flattered! Just reference that you made it with The Homebrewery.
<div class='pageNumber'>2</div>
<div class='footnote'>PART 2 | BORING STUFF</div>

View File

@@ -1,175 +0,0 @@
```css
.page #example + table td {
border:1px dashed #00000030;
}
.page {
padding-bottom : 1.1cm;
}
```
# The Homebrewery *V3*
Welcome traveler from an antique land. Please sit and tell us of what you have seen. The unheard of monsters, who slither and bite. Tell us of the wondrous items and and artifacts you have found, their mysteries yet to be unlocked. Of the vexing vocations and surprising skills you have seen.
### Homebrew D&D made easy
The Homebrewery makes the creation and sharing of authentic looking Fifth-Edition homebrews easy. It uses [Markdown](https://help.github.com/articles/markdown-basics/) with a little CSS magic to make your brews come to life.
**Try it!** Simply edit the text on the left and watch it *update live* on the right. Note that not every button is visible on this demo page. Click New {{fas,fa-plus-square}} in the navbar above to start brewing with all the features!
### Editing and Sharing
When you create your own homebrew, you will be given a *edit url* and a *share url*.
Any changes you make while on the *edit url* will be automatically saved to the database within a few seconds. Anyone with the edit url will be able to make edits to your homebrew, so be careful about who you share it with.
Anyone with the *share url* will be able to access a read-only version of your homebrew.
{{note
##### PDF Creation
PDF Printing works best in Google Chrome. If you are having quality/consistency issues, try using Chrome to print instead.
After clicking the "Print" item in the navbar a new page will open and a print dialog will pop-up.
* Set the **Destination** to "Save as PDF"
* Set **Paper Size** to "Letter"
* If you are printing on A4 paper, make sure to have the **PRINT → {{far,fa-file}} A4 Pagesize** snippet in your brew
* In **Options** make sure "Background Images" is selected.
* Hit print and enjoy! You're done!
If you want to save ink or have a monochrome printer, add the **PRINT → {{fas,fa-tint}} Ink Friendly** snippet to your brew!
}}
![homebrew mug](http://i.imgur.com/hMna6G0.png) {position:absolute,bottom:20px,left:130px,width:220px}
{{artist,bottom:160px,left:100px
##### Homebrew Mug
[naturalcrit](https://homebrew.naturalcrit.com)
}}
{{pageNumber 1}}
{{footnote PART 1 | FANCINESS}}
\column
## New in V3.0.0
We've implemented an extended Markdown-like syntax for block and span elements, plus a few other changes, eliminating the need for HTML tags like `div` and `span` in most cases. No raw HTML tags should be needed in a brew (*but can still be used if you insist*).
Much of the syntax and styling has changed in V3, so converting a Legacy brew to V3 (or vice-versa) will require tweaking your document. *However*, all brews made prior to the release of v3.0.0 will still render normally, and you may switch between the "Legacy" brew renderer and the newer "V3" renderer via the {{fa,fa-info-circle}} **Properties** button on your brew at any time.
Scroll down to the next page for a brief summary of the changes and new features available in V3!
#### New Things All The Time!
Check out the latest updates in the full changelog [here](/changelog).
### Helping out
Like this tool? Want to buy me a beer? [Head here](https://www.patreon.com/Naturalcrit) to help me keep the servers running.
This tool will **always** be free, never have ads, and I will never offer any "premium" features or whatever.
### Bugs, Issues, Suggestions?
Take a quick look at our [Frequently Asked Questions page](/faq) to see if your question has a handy answer.
Need help getting started or just the right look for your brew? Head to [r/Homebrewery](https://www.reddit.com/r/homebrewery/submit?selftext=true&title=%5BIssue%5D%20Describe%20Your%20Issue%20Here) and let us know!
Have an idea to make The Homebrewery better? Or did you find something that wasn't quite right? Check out the [GitHub Repo](https://github.com/naturalcrit/homebrewery/) to report technical issues.
### Legal Junk
The Homebrewery is licensed using the [MIT License](https://github.com/naturalcrit/homebrewery/blob/master/license). Which means you are free to use The Homebrewery codebase any way that you want, except for claiming that you made it yourself.
If you wish to sell or in some way gain profit for what's created on this site, it's your responsibility to ensure you have the proper licenses/rights for any images or resources used.
#### Crediting Me
If you'd like to credit me in your brew, I'd be flattered! Just reference that you made it with The Homebrewery.
### More Homebrew Resources
<a href='https://discord.gg/by3deKx' target='_blank'><img src='/assets/discordOfManyThings.svg' alt='Discord of Many Things Logo' title='Discord of Many Things Logo' style='width:50px; float: right; padding-left: 10px;'/></a>
If you are looking for more 5e Homebrew resources check out [r/UnearthedArcana](https://www.reddit.com/r/UnearthedArcana/) and their list of useful resources [here](https://www.reddit.com/r/UnearthedArcana/wiki/resources). The <a href='https://discord.gg/by3deKx' target='_blank' title='Discord of Many Things'>Discord of Many Things</a> is another great resource to connect with fellow homebrewers for help and feedback.
{{position:absolute;top:20px;right:20px;width:auto
<a href='https://discord.gg/by3deKx' target='_blank' title='Discord of Many Things' style='color: black;'><img src='/assets/discord.png' style='height:30px'/></a>
<a href='https://github.com/naturalcrit/homebrewery' target='_blank' title='Github' style='color: black; padding-left: 5px;'><img src='/assets/github.png' style='height:30px'/></a>
<a href='https://patreon.com/NaturalCrit' target='_blank' title='Patreon' style='color: black; padding-left: 5px;'><img src='/assets/patreon.png' style='height:30px'/></a>
<a href='https://www.reddit.com/r/homebrewery/' target='_blank' title='Reddit' style='color: black; padding-left: 5px;'><img src='/assets/reddit.png' style='height:30px'/></a>
}}
\page
## Markdown+
The Homebrewery aims to make homebrewing as simple as possible, providing a live editor with Markdown syntax that is more human-readable and faster to write with than raw HTML.
In version 3.0.0, with a goal of adding maximum flexibility without users resorting to complex HTML to accomplish simple tasks, Homebrewery provides an extended verision of Markdown with additional syntax.
**You can enable V3 via the {{fa,fa-info-circle}} Properties button!**
### Curly Brackets
The biggest change in V3 is the replacement of `<span></span>` and `<div></div>` with `{{ }}` for a cleaner custom formatting. Inline spans and block elements can be created and given ID's and Classes, as well as css properties, each of which are comma separated with no spaces. Use double quotes if a value requires spaces. Spans and Blocks start the same:
#### Span
My favorite author is {{pen,#author,color:orange,font-family:"trebuchet ms" Brandon Sanderson}}. The orange text has a class of `pen`, an id of `author`, is colored orange, and given a new font. The first space outside of quotes marks the beginning of the content.
#### Block
{{purple,#book,text-align:center,background:#aa88aa55
My favorite book is Wheel of Time. This block has a class of `purple`, an id of `book`, and centered text with a colored background. The opening and closing brackets are on lines separate from the block contents.
}}
#### Injection
For any element not inside a span or block, you can *inject* attributes using the same syntax but with single brackets in a single line immediately after the element.
Inline elements like *italics* {color:#D35400} or images require the injection on the same line.
Block elements like headers require the injection to start on the line immediately following.
##### A Purple Header
{color:purple,text-align:center}
\* *this does not currently work for tables yet*
### Vertical Spacing
A blank line can be achieved with a run of one or more `:` alone on a line. More `:`'s will create more space.
::
Much nicer than `<br><br><br><br><br>`
### Definition Lists
**Example** :: V3 uses HTML *definition lists* to create "lists" with hanging indents.
### Column Breaks
Column and page breaks with `\column` and `\page`.
\column
### Tables
Tables now allow column & row spanning between cells. This is included in some updated snippets, but a simplified example is given below.
A cell can be spanned across columns by grouping multiple pipe `|` characters at the end of a cell.
Row spanning is achieved by adding a `^` at the end of a cell just before the `|`.
These can be combined to span a cell across both columns and rows. Cells must have the same colspan if they are to be rowspan'd.
##### Example
| Head A | Spanned Header ||
| Head B | Head C | Head D |
|:-------|:------:|:------:|
| 1A | 1B | 1C |
| 2A ^| 2B | 2C |
| 3A ^| 3B 3C ||
| 4A | 4B 4C^||
| 5A ^| 5B | 5C |
| 6A | 6B ^| 6C |
## Images
Images must be hosted online somewhere, like [Imgur](https://www.imgur.com). You use the address to that image to reference it in your brew\*.
Using *Curly Injection* you can assign an id, classes, or inline CSS properties to the Markdown image syntax.
![alt-text](https://s-media-cache-ak0.pinimg.com/736x/4a/81/79/4a8179462cfdf39054a418efd4cb743e.jpg) {width:100px,border:"2px solid",border-radius:10px}
\* *When using Imgur-hosted images, use the "direct link", which can be found when you click into your image in the Imgur interace.*
## Snippets
Homebrewery comes with a series of *code snippets* found at the top of the editor pane that make it easy to create brews as quickly as possible. Just set your cursor where you want the code to appear in the editor pane, choose a snippet, and make the adjustments you need.
## Style Editor Panel
{{fa,fa-paint-brush}} Technically released prior to v3 but still new to many users, check out the new **Style Editor** located on the right side of the Snippet bar. This editor accepts CSS for styling without requiring `<style>` tags-- anything that would have gone inside style tags before can now be placed here, and snippets that insert CSS styles are now located on that tab.
{{pageNumber 2}}
{{footnote PART 2 | BORING STUFF}}

View File

@@ -27,55 +27,30 @@ const NewPage = createClass({
getDefaultProps : function() {
return {
brew : {
text : '',
style : undefined,
shareId : null,
editId : null,
createdAt : null,
updatedAt : null,
gDrive : false,
text : '',
style : undefined,
title : '',
description : '',
tags : '',
published : false,
authors : [],
systems : []
renderer : 'V3'
}
};
},
getInitialState : function() {
const brew = this.props.brew;
let brew = this.props.brew;
if(typeof window !== 'undefined') { //Load from localStorage if in client browser
const brewStorage = localStorage.getItem(BREWKEY);
const styleStorage = localStorage.getItem(STYLEKEY);
const metaStorage = JSON.parse(localStorage.getItem(METAKEY));
if(!brew.text || !brew.style){
brew.text = brew.text || (brewStorage ?? '');
brew.style = brew.style || (styleStorage ?? undefined);
// brew.title = metaStorage?.title || this.state.brew.title;
// brew.description = metaStorage?.description || this.state.brew.description;
brew.renderer = metaStorage?.renderer || brew.renderer;
}
if(this.props.brew.shareId) {
brew = {
text : brew.text ?? '',
style : brew.style ?? undefined,
title : brew.title ?? '',
description : brew.description ?? '',
renderer : brew.renderer ?? 'legacy'
};
}
return {
brew : {
text : brew.text || '',
style : brew.style || undefined,
gDrive : false,
title : brew.title || '',
description : brew.description || '',
tags : brew.tags || '',
published : false,
authors : [],
systems : brew.systems || [],
renderer : brew.renderer || 'legacy'
},
brew : brew,
isSaving : false,
saveGoogle : (global.account && global.account.googleId ? true : false),
errors : null,
@@ -85,6 +60,28 @@ const NewPage = createClass({
componentDidMount : function() {
document.addEventListener('keydown', this.handleControlKeys);
const brew = this.state.brew;
if(!this.props.brew.shareId && typeof window !== 'undefined') { //Load from localStorage if in client browser
const brewStorage = localStorage.getItem(BREWKEY);
const styleStorage = localStorage.getItem(STYLEKEY);
const metaStorage = JSON.parse(localStorage.getItem(METAKEY));
brew.text = brewStorage ?? brew.text;
brew.style = styleStorage ?? brew.style;
// brew.title = metaStorage?.title || this.state.brew.title;
// brew.description = metaStorage?.description || this.state.brew.description;
brew.renderer = metaStorage?.renderer ?? brew.renderer;
this.setState({
brew : brew
});
}
localStorage.setItem(BREWKEY, brew.text);
localStorage.setItem(STYLEKEY, brew.style);
localStorage.setItem(METAKEY, JSON.stringify({ 'renderer': brew.renderer }));
},
componentWillUnmount : function() {
document.removeEventListener('keydown', this.handleControlKeys);
@@ -112,7 +109,7 @@ const NewPage = createClass({
if(htmlErrors.length) htmlErrors = Markdown.validate(text);
this.setState((prevState)=>({
brew : _.merge({}, prevState.brew, { text: text }),
brew : { ...prevState.brew, text: text },
htmlErrors : htmlErrors
}));
localStorage.setItem(BREWKEY, text);
@@ -120,14 +117,14 @@ const NewPage = createClass({
handleStyleChange : function(style){
this.setState((prevState)=>({
brew : _.merge({}, prevState.brew, { style: style }),
brew : { ...prevState.brew, style: style },
}));
localStorage.setItem(STYLEKEY, style);
},
handleMetaChange : function(metadata){
this.setState((prevState)=>({
brew : _.merge({}, prevState.brew, metadata),
brew : { ...prevState.brew, ...metadata },
}));
localStorage.setItem(METAKEY, JSON.stringify({
// 'title' : this.state.brew.title,
@@ -162,7 +159,7 @@ const NewPage = createClass({
brew.pageCount=((brew.renderer=='legacy' ? brew.text.match(/\\page/g) : brew.text.match(/^\\page$/gm)) || []).length + 1;
const res = await request
.post(`/api${this.state.saveGoogle ? '?transferToGoogle=true' : ''}`)
.post(`/api${this.state.saveGoogle ? '?saveToGoogle=true' : ''}`)
.send(brew)
.catch((err)=>{
console.log(err);
@@ -174,7 +171,7 @@ const NewPage = createClass({
localStorage.removeItem(BREWKEY);
localStorage.removeItem(STYLEKEY);
localStorage.removeItem(METAKEY);
window.location = `/edit/${brew.googleId ?? ''}${brew.editId}`;
window.location = `/edit/${brew.editId}`;
},
renderSaveButton : function(){
@@ -187,26 +184,26 @@ const NewPage = createClass({
console.log(errMsg);
} catch (e){}
if(this.state.errors.status == '401'){
return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
Oops!
<div className='errorContainer' onClick={this.clearErrors}>
You must be signed in to a Google account
to save this to<br />Google Drive!<br />
<a target='_blank' rel='noopener noreferrer'
href={`https://www.naturalcrit.com/login?redirect=${this.state.url}`}>
<div className='confirm'>
Sign In
</div>
</a>
<div className='deny'>
Not Now
</div>
</div>
</Nav.item>;
}
// if(this.state.errors.status == '401'){
// return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
// Oops!
// <div className='errorContainer' onClick={this.clearErrors}>
// You must be signed in to a Google account
// to save this to<br />Google Drive!<br />
// <a target='_blank' rel='noopener noreferrer'
// href={`https://www.naturalcrit.com/login?redirect=${this.state.url}`}>
// <div className='confirm'>
// Sign In
// </div>
// </a>
// <div className='deny'>
// Not Now
// </div>
// </div>
// </Nav.item>;
// }
if(this.state.errors.response.req.url.match(/^\/api\/.*Google.*$/m)){
if(this.state.errors.response.req.url.match(/^\/api.*Google.*$/m)){
return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
Oops!
<div className='errorContainer' onClick={this.clearErrors}>

View File

@@ -45,7 +45,7 @@ const PrintPage = createClass({
brew : {
text : brewStorage,
style : styleStorage,
renderer : metaStorage.renderer || 'legacy'
renderer : metaStorage?.renderer || 'legacy'
}
};
});

View File

@@ -49,7 +49,7 @@ const SharePage = createClass({
},
processShareId : function() {
return this.props.brew.googleId ?
return this.props.brew.googleId && !this.props.brew.stubbed ?
this.props.brew.googleId + this.props.brew.shareId :
this.props.brew.shareId;
},

View File

@@ -19,10 +19,11 @@ const UserPage = createClass({
return {
username : '',
brews : [],
query : ''
};
},
getInitialState : function() {
const usernameWithS = this.props.username + (this.props.username.endsWith('s') ? `'` : `'s`);
const usernameWithS = this.props.username + (this.props.username.endsWith('s') ? `` : `s`);
const brews = _.groupBy(this.props.brews, (brew)=>{
return (brew.published ? 'published' : 'private');
@@ -62,7 +63,7 @@ const UserPage = createClass({
},
render : function(){
return <ListPage brewCollection={this.state.brewCollection} navItems={this.navItems()}></ListPage>;
return <ListPage brewCollection={this.state.brewCollection} navItems={this.navItems()} query={this.props.query}></ListPage>;
}
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@@ -1,4 +1,6 @@
module.exports = async(name, title = '', props = {})=>{
const HOMEBREWERY_PUBLIC_URL=props.config.publicUrl;
return `
<!DOCTYPE html>
<html>
@@ -6,7 +8,14 @@ module.exports = async(name, title = '', props = {})=>{
<link href="//use.fontawesome.com/releases/v5.15.1/css/all.css" rel="stylesheet" />
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700" rel="stylesheet" type="text/css" />
<link href=${`/${name}/bundle.css`} rel='stylesheet' />
<link rel="icon" href="/assets/homebrew/favicon.ico" type="image/x-icon" />
<link rel="icon" href="/assets/favicon.ico" type="image/x-icon" />
<meta property="og:title" content="${props.brew?.title || 'Homebrewery - Untitled Brew'}">
<meta property="og:url" content="${HOMEBREWERY_PUBLIC_URL}/${props.brew?.shareId ? `share/${props.brew.shareId}` : ''}">
<meta property="og:image" content="${props.brew?.thumbnail || `${HOMEBREWERY_PUBLIC_URL}/thumbnail.png`}">
<meta property="og:description" content="${props.brew?.description || 'No description.'}">
<meta property="og:site_name" content="The Homebrewery - Make your Homebrew content look legit!">
<meta property="og:type" content="article">
<meta name="twitter:card" content="summary_large_image">
<title>${title.length ? `${title} - The Homebrewery`: 'The Homebrewery - NaturalCrit'}</title>
</head>
<body>

View File

@@ -3,5 +3,7 @@
"naturalcrit_url" : "local.naturalcrit.com:8010",
"secret" : "secret",
"web_port" : 8000,
"enable_v3" : true
"enable_v3" : true,
"local_environments" : ["docker", "local"],
"publicUrl" : "https://homebrewery.naturalcrit.com"
}

7931
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"name": "homebrewery",
"description": "Create authentic looking D&D homebrews using only markdown",
"version": "3.0.8",
"version": "3.2.2",
"engines": {
"node": "16.11.x"
},
@@ -34,7 +34,7 @@
"build/*"
],
"jest": {
"testTimeout" : 15000,
"testTimeout": 15000,
"modulePaths": [
"mode_modules",
"shared",
@@ -51,45 +51,44 @@
]
},
"dependencies": {
"@babel/core": "^7.17.8",
"@babel/plugin-transform-runtime": "^7.17.0",
"@babel/preset-env": "^7.16.11",
"@babel/preset-react": "^7.16.7",
"body-parser": "^1.19.2",
"@babel/core": "^7.19.0",
"@babel/plugin-transform-runtime": "^7.18.10",
"@babel/preset-env": "^7.19.0",
"@babel/preset-react": "^7.18.6",
"body-parser": "^1.20.0",
"classnames": "^2.3.1",
"codemirror": "^5.65.2",
"codemirror": "^5.65.6",
"cookie-parser": "^1.4.6",
"create-react-class": "^15.7.0",
"dedent-tabs": "^0.10.1",
"express": "^4.17.3",
"express": "^4.18.1",
"express-async-handler": "^1.2.0",
"express-static-gzip": "2.1.5",
"fs-extra": "10.0.1",
"googleapis": "98.0.0",
"express-static-gzip": "2.1.7",
"fs-extra": "10.1.0",
"googleapis": "107.0.0",
"js-yaml": "^4.1.0",
"jwt-simple": "^0.5.6",
"less": "^3.13.1",
"lodash": "^4.17.21",
"marked": "4.0.12",
"marked-extended-tables": "^1.0.3",
"marked": "4.1.0",
"marked-extended-tables": "^1.0.5",
"markedLegacy": "npm:marked@^0.3.19",
"moment": "^2.29.1",
"mongoose": "^6.2.8",
"nanoid": "3.3.1",
"nconf": "^0.11.3",
"query-string": "7.1.1",
"moment": "^2.29.4",
"mongoose": "^6.5.5",
"nanoid": "3.3.4",
"nconf": "^0.12.0",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-frame-component": "4.1.3",
"react-router-dom": "5.3.0",
"react-router-dom": "6.3.0",
"sanitize-filename": "1.6.3",
"superagent": "^6.1.0",
"vitreum": "git+https://git@github.com/calculuschild/vitreum.git"
},
"devDependencies": {
"eslint": "^8.11.0",
"eslint-plugin-react": "^7.29.4",
"jest": "^27.5.1",
"supertest": "^6.2.2"
"eslint": "^8.23.0",
"eslint-plugin-react": "^7.31.7",
"jest": "^29.0.2",
"supertest": "^6.2.4"
}
}

View File

@@ -26,6 +26,7 @@ const build = async ({ bundle, render, ssr })=>{
await fs.outputFile('./build/homebrew/ssr.js', ssr);
await fs.copy('./themes/fonts', './build/fonts');
await fs.copy('./themes/assets', './build/assets');
await fs.copy('./client/homebrew/favicon.ico', './build/assets/favicon.ico');
let src = './themes/5ePhbLegacy.style.less';
//Parse brew theme files
less.render(fs.readFileSync(src).toString(), {

View File

@@ -15,6 +15,7 @@
"codemirror/addon/fold/foldcode.js",
"codemirror/addon/fold/foldgutter.js",
"codemirror/addon/fold/xml-fold.js",
"codemirror/addon/scroll/scrollpastend.js",
"codemirror/addon/search/search.js",
"codemirror/addon/search/searchcursor.js",
"codemirror/addon/search/jump-to-line.js",

View File

@@ -9,47 +9,12 @@ const yaml = require('js-yaml');
const app = express();
const config = require('./config.js');
const homebrewApi = require('./homebrew.api.js');
const { homebrewApi, getBrew } = require('./homebrew.api.js');
const GoogleActions = require('./googleActions.js');
const serveCompressedStaticAssets = require('./static-assets.mv.js');
const sanitizeFilename = require('sanitize-filename');
const asyncHandler = require('express-async-handler');
const brewAccessTypes = ['edit', 'share', 'raw'];
//Get the brew object from the HB database or Google Drive
const getBrewFromId = asyncHandler(async (id, accessType)=>{
if(!brewAccessTypes.includes(accessType))
throw ('Invalid Access Type when getting brew');
let brew;
if(id.length > 12) {
const googleId = id.slice(0, -12);
id = id.slice(-12);
brew = await GoogleActions.getGoogleBrew(googleId, id, accessType);
} else {
brew = await HomebrewModel.get(accessType == 'edit' ? { editId: id } : { shareId: id });
brew = brew.toObject(); // Convert MongoDB object to standard Javascript Object
}
brew = sanitizeBrew(brew, accessType === 'edit' ? false : true);
//Split brew.text into text and style
//unless the Access Type is RAW, in which case return immediately
if(accessType == 'raw') {
return brew;
}
splitTextStyleAndMetadata(brew);
return brew;
});
const sanitizeBrew = (brew, full=false)=>{
delete brew._id;
delete brew.__v;
if(full){
delete brew.editId;
}
return brew;
};
const splitTextStyleAndMetadata = (brew)=>{
brew.text = brew.text.replaceAll('\r\n', '\n');
if(brew.text.startsWith('```metadata')) {
@@ -66,6 +31,15 @@ const splitTextStyleAndMetadata = (brew)=>{
}
};
const sanitizeBrew = (brew, accessType)=>{
brew._id = undefined;
brew.__v = undefined;
if(accessType !== 'edit'){
brew.editId = undefined;
}
return brew;
};
app.use('/', serveCompressedStaticAssets(`build`));
//app.use(express.static(`${__dirname}/build`));
@@ -93,12 +67,12 @@ app.use((req, res, next)=>{
app.use(homebrewApi);
app.use(require('./admin.api.js'));
const HomebrewModel = require('./homebrew.model.js').model;
const welcomeText = require('fs').readFileSync('client/homebrew/pages/homePage/welcome_msg.md', 'utf8');
const welcomeTextV3 = require('fs').readFileSync('client/homebrew/pages/homePage/welcome_msg_v3.md', 'utf8');
const migrateText = require('fs').readFileSync('client/homebrew/pages/homePage/migrate.md', 'utf8');
const changelogText = require('fs').readFileSync('changelog.md', 'utf8');
const faqText = require('fs').readFileSync('faq.md', 'utf8');
const HomebrewModel = require('./homebrew.model.js').model;
const welcomeText = require('fs').readFileSync('client/homebrew/pages/homePage/welcome_msg.md', 'utf8');
const welcomeTextLegacy = require('fs').readFileSync('client/homebrew/pages/homePage/welcome_msg_legacy.md', 'utf8');
const migrateText = require('fs').readFileSync('client/homebrew/pages/homePage/migrate.md', 'utf8');
const changelogText = require('fs').readFileSync('changelog.md', 'utf8');
const faqText = require('fs').readFileSync('faq.md', 'utf8');
String.prototype.replaceAll = function(s, r){return this.split(s).join(r);};
@@ -108,63 +82,60 @@ app.get('/robots.txt', (req, res)=>{
});
//Home page
app.get('/', async (req, res, next)=>{
const brew = {
text : welcomeText
app.get('/', (req, res, next)=>{
req.brew = {
text : welcomeText,
renderer : 'V3'
};
req.brew = brew;
splitTextStyleAndMetadata(req.brew);
return next();
});
//Home page v3
app.get('/v3_preview', async (req, res, next)=>{
const brew = {
text : welcomeTextV3,
renderer : 'V3'
app.get('/legacy', (req, res, next)=>{
req.brew = {
text : welcomeTextLegacy,
renderer : 'legacy'
};
splitTextStyleAndMetadata(brew);
req.brew = brew;
splitTextStyleAndMetadata(req.brew);
return next();
});
//Legacy/Other Document -> v3 Migration Guide
app.get('/migrate', async (req, res, next)=>{
const brew = {
app.get('/migrate', (req, res, next)=>{
req.brew = {
text : migrateText,
renderer : 'V3'
};
splitTextStyleAndMetadata(brew);
req.brew = brew;
splitTextStyleAndMetadata(req.brew);
return next();
});
//Changelog page
app.get('/changelog', async (req, res, next)=>{
const brew = {
req.brew = {
title : 'Changelog',
text : changelogText,
renderer : 'V3'
};
splitTextStyleAndMetadata(brew);
req.brew = brew;
splitTextStyleAndMetadata(req.brew);
return next();
});
//FAQ page
app.get('/faq', async (req, res, next)=>{
const brew = {
req.brew = {
title : 'FAQ',
text : faqText,
renderer : 'V3'
};
splitTextStyleAndMetadata(brew);
req.brew = brew;
splitTextStyleAndMetadata(req.brew);
return next();
});
//Source page
app.get('/source/:id', asyncHandler(async (req, res)=>{
const brew = await getBrewFromId(req.params.id, 'raw');
app.get('/source/:id', asyncHandler(getBrew('share')), (req, res)=>{
const { brew } = req;
const replaceStrings = { '&': '&amp;', '<': '&lt;', '>': '&gt;' };
let text = brew.text;
@@ -173,11 +144,12 @@ app.get('/source/:id', asyncHandler(async (req, res)=>{
}
text = `<code><pre style="white-space: pre-wrap;">${text}</pre></code>`;
res.status(200).send(text);
}));
});
//Download brew source page
app.get('/download/:id', asyncHandler(async (req, res)=>{
const brew = await getBrewFromId(req.params.id, 'raw');
app.get('/download/:id', asyncHandler(getBrew('share')), (req, res)=>{
const { brew } = req;
sanitizeBrew(brew, 'share');
const prefix = 'HB - ';
let fileName = sanitizeFilename(`${prefix}${brew.title}`).replaceAll(' ', '');
@@ -188,13 +160,29 @@ app.get('/download/:id', asyncHandler(async (req, res)=>{
'Content-Disposition' : `attachment; filename="${fileName}.txt"`
});
res.status(200).send(brew.text);
}));
});
//User Page
app.get('/user/:username', async (req, res, next)=>{
const ownAccount = req.account && (req.account.username == req.params.username);
let brews = await HomebrewModel.getByUser(req.params.username, ownAccount)
const fields = [
'googleId',
'title',
'pageCount',
'description',
'authors',
'published',
'views',
'shareId',
'editId',
'createdAt',
'updatedAt',
'lastViewed',
'tags'
];
let brews = await HomebrewModel.getByUser(req.params.username, ownAccount, fields)
.catch((err)=>{
console.log(err);
});
@@ -206,62 +194,97 @@ app.get('/user/:username', async (req, res, next)=>{
console.error(err);
});
if(googleBrews) {
if(googleBrews && googleBrews.length > 0) {
for (const brew of brews.filter((brew)=>brew.googleId)) {
const match = googleBrews.findIndex((b)=>b.editId === brew.editId);
if(match !== -1) {
brew.googleId = googleBrews[match].googleId;
brew.stubbed = true;
brew.pageCount = googleBrews[match].pageCount;
brew.renderer = googleBrews[match].renderer;
brew.version = googleBrews[match].version;
googleBrews.splice(match, 1);
}
}
googleBrews = googleBrews.map((brew)=>({ ...brew, authors: [req.account.username] }));
brews = _.concat(brews, googleBrews);
}
}
req.brews = _.map(brews, (brew)=>{
return sanitizeBrew(brew, !ownAccount);
return sanitizeBrew(brew, ownAccount ? 'edit' : 'share');
});
return next();
});
//Edit Page
app.get('/edit/:id', asyncHandler(async (req, res, next)=>{
app.get('/edit/:id', asyncHandler(getBrew('edit')), (req, res, next)=>{
req.brew = req.brew.toObject ? req.brew.toObject() : req.brew;
sanitizeBrew(req.brew, 'edit');
splitTextStyleAndMetadata(req.brew);
res.header('Cache-Control', 'no-cache, no-store'); //reload the latest saved brew when pressing back button, not the cached version before save.
const brew = await getBrewFromId(req.params.id, 'edit');
req.brew = brew;
return next();
}));
});
//New Page
app.get('/new/:id', asyncHandler(async (req, res, next)=>{
const brew = await getBrewFromId(req.params.id, 'share');
brew.title = `CLONE - ${brew.title}`;
req.brew = brew;
app.get('/new/:id', asyncHandler(getBrew('share')), (req, res, next)=>{
sanitizeBrew(req.brew, 'share');
splitTextStyleAndMetadata(req.brew);
req.brew.title = `CLONE - ${req.brew.title}`;
return next();
}));
});
//Share Page
app.get('/share/:id', asyncHandler(async (req, res, next)=>{
const brew = await getBrewFromId(req.params.id, 'share');
app.get('/share/:id', asyncHandler(getBrew('share')), asyncHandler(async (req, res, next)=>{
const { brew } = req;
if(req.params.id.length > 12) {
if(req.params.id.length > 12 && !brew._id) {
const googleId = req.params.id.slice(0, -12);
const shareId = req.params.id.slice(-12);
await GoogleActions.increaseView(googleId, shareId, 'share', brew)
.catch((err)=>{next(err);});
.catch((err)=>{next(err);});
} else {
await HomebrewModel.increaseView({ shareId: brew.shareId });
}
req.brew = brew;
sanitizeBrew(req.brew, 'share');
splitTextStyleAndMetadata(req.brew);
return next();
}));
//Print Page
app.get('/print/:id', asyncHandler(async (req, res, next)=>{
const brew = await getBrewFromId(req.params.id, 'share');
req.brew = brew;
return next();
}));
app.get('/print/:id', asyncHandler(getBrew('share')), (req, res, next)=>{
sanitizeBrew(req.brew, 'share');
splitTextStyleAndMetadata(req.brew);
next();
});
const nodeEnv = config.get('node_env');
const isLocalEnvironment = config.get('local_environments').includes(nodeEnv);
// Local only
if(isLocalEnvironment){
// Login
app.post('/local/login', (req, res)=>{
const username = req.body.username;
if(!username) return;
const payload = jwt.encode({ username: username, issued: new Date }, config.get('secret'));
return res.json(payload);
});
}
//Render the page
const templateFn = require('./../client/template.js');
app.use((req, res)=>{
app.use(asyncHandler(async (req, res, next)=>{
// Create configuration object
const configuration = {
local : isLocalEnvironment,
publicUrl : config.get('publicUrl') ?? '',
environment : nodeEnv
};
const props = {
version : require('./../package.json').version,
url : req.originalUrl,
@@ -269,16 +292,18 @@ app.use((req, res)=>{
brews : req.brews,
googleBrews : req.googleBrews,
account : req.account,
enable_v3 : config.get('enable_v3')
enable_v3 : config.get('enable_v3'),
config : configuration
};
const title = req.brew ? req.brew.title : '';
templateFn('homebrew', title, props)
.then((page)=>{ res.send(page); })
.catch((err)=>{
console.log(err);
return res.sendStatus(500);
});
});
const page = await templateFn('homebrew', title, props)
.catch((err)=>{
console.log(err);
return res.sendStatus(500);
});
if(!page) return;
res.send(page);
}));
//v=====----- Error-Handling Middleware -----=====v//
//Format Errors so all fields will be sent
@@ -302,6 +327,13 @@ app.use((err, req, res, next)=>{
console.error(err);
res.status(status).send(getPureError(err));
});
app.use((req, res)=>{
if(!res.headersSent) {
console.error('Headers have not been sent, responding with a server error.', req.url);
res.status(500).send('An error occurred and the server did not send a response. The error has been logged, please note the time this occurred and report this issue.');
}
});
//^=====--------------------------------------=====^//
module.exports = {

View File

@@ -124,9 +124,9 @@ const GoogleActions = {
title : file.properties.title,
description : file.description,
views : parseInt(file.properties.views),
tags : '',
published : file.properties.published ? file.properties.published == 'true' : false,
systems : []
systems : [],
thumbnail : file.properties.thumbnail
};
});
return brews;
@@ -142,12 +142,12 @@ const GoogleActions = {
description : `${brew.description}`,
properties : {
title : brew.title,
published : brew.published,
version : brew.version,
renderer : brew.renderer,
tags : brew.tags,
shareId : brew.shareId || nanoid(12),
editId : brew.editId || nanoid(12),
pageCount : brew.pageCount,
systems : brew.systems.join()
renderer : brew.renderer || 'legacy',
isStubbed : true,
thumbnail : brew.thumbnail
}
},
media : {
@@ -159,10 +159,9 @@ const GoogleActions = {
console.log('Error saving to google');
console.error(err);
throw (err);
//return res.status(500).send('Error while saving');
});
return (brew);
return true;
},
newGoogleBrew : async (auth, brew)=>{
@@ -176,16 +175,18 @@ const GoogleActions = {
const folderId = await GoogleActions.getGoogleFolder(auth);
const fileMetadata = {
'name' : `${brew.title}.txt`,
'description' : `${brew.description}`,
'parents' : [folderId],
'properties' : { //AppProperties is not accessible
'shareId' : brew.shareId || nanoid(12),
'editId' : brew.editId || nanoid(12),
'title' : brew.title,
'views' : '0',
'pageCount' : brew.pageCount,
'renderer' : brew.renderer || 'legacy'
name : `${brew.title}.txt`,
description : `${brew.description}`,
parents : [folderId],
properties : { //AppProperties is not accessible
shareId : brew.shareId || nanoid(12),
editId : brew.editId || nanoid(12),
title : brew.title,
pageCount : brew.pageCount,
renderer : brew.renderer || 'legacy',
isStubbed : true,
version : 1,
thumbnail : brew.thumbnail || ''
}
};
@@ -212,26 +213,7 @@ const GoogleActions = {
console.error(err);
});
const newHomebrew = {
text : brew.text,
shareId : fileMetadata.properties.shareId,
editId : fileMetadata.properties.editId,
createdAt : new Date(),
updatedAt : new Date(),
gDrive : true,
googleId : obj.data.id,
pageCount : fileMetadata.properties.pageCount,
title : brew.title,
description : brew.description,
tags : '',
published : brew.published,
renderer : brew.renderer,
authors : [],
systems : []
};
return newHomebrew;
return obj.data.id;
},
getGoogleBrew : async (id, accessId, accessType)=>{
@@ -244,7 +226,6 @@ const GoogleActions = {
.catch((err)=>{
console.log('Error loading from Google');
throw (err);
return;
});
if(obj) {
@@ -254,9 +235,7 @@ const GoogleActions = {
throw ('Share ID does not match');
}
const serviceDrive = google.drive({ version: 'v3' });
const file = await serviceDrive.files.get({
const file = await drive.files.get({
fileId : id,
fields : 'description, properties',
alt : 'media'
@@ -273,7 +252,7 @@ const GoogleActions = {
text : file.data,
description : obj.data.description,
tags : obj.data.properties.tags ? obj.data.properties.tags : '',
tags : obj.data.properties.tags ? obj.data.properties.tags : '',
systems : obj.data.properties.systems ? obj.data.properties.systems.split(',') : [],
authors : [],
published : obj.data.properties.published ? obj.data.properties.published == 'true' : false,
@@ -286,8 +265,8 @@ const GoogleActions = {
views : parseInt(obj.data.properties.views) || 0, //brews with no view parameter will return undefined
version : parseInt(obj.data.properties.version) || 0,
renderer : obj.data.properties.renderer ? obj.data.properties.renderer : 'legacy',
thumbnail : obj.data.properties.thumbnail || '',
gDrive : true,
googleId : id
};
@@ -295,14 +274,11 @@ const GoogleActions = {
}
},
deleteGoogleBrew : async (auth, id)=>{
deleteGoogleBrew : async (auth, id, accessId)=>{
const drive = google.drive({ version: 'v3', auth });
const googleId = id.slice(0, -12);
const accessId = id.slice(-12);
const obj = await drive.files.get({
fileId : googleId,
fileId : id,
fields : 'properties'
})
.catch((err)=>{
@@ -311,11 +287,11 @@ const GoogleActions = {
});
if(obj && obj.data.properties.editId != accessId) {
throw ('Not authorized to delete this Google brew');
throw { status: 403, message: 'Not authorized to delete this Google brew' };
}
await drive.files.update({
fileId : googleId,
fileId : id,
resource : { trashed: true }
})
.catch((err)=>{

View File

@@ -1,3 +1,4 @@
/* eslint-disable max-lines */
const _ = require('lodash');
const HomebrewModel = require('./homebrew.model.js').model;
const router = require('express').Router();
@@ -5,6 +6,8 @@ const zlib = require('zlib');
const GoogleActions = require('./googleActions.js');
const Markdown = require('../shared/naturalcrit/markdown.js');
const yaml = require('js-yaml');
const asyncHandler = require('express-async-handler');
const { nanoid } = require('nanoid');
// const getTopBrews = (cb) => {
// HomebrewModel.find().sort({ views: -1 }).limit(5).exec(function(err, brews) {
@@ -12,6 +15,63 @@ const yaml = require('js-yaml');
// });
// };
const getId = (req)=>{
// Set the id and initial potential google id, where the google id is present on the existing brew.
let id = req.params.id, googleId = req.body?.googleId;
// If the id is longer than 12, then it's a google id + the edit id. This splits the longer id up.
if(id.length > 12) {
googleId = id.slice(0, -12);
id = id.slice(-12);
}
return { id, googleId };
};
const getBrew = (accessType)=>{
// Create middleware with the accessType passed in as part of the scope
return async (req, res, next)=>{
// Get relevant IDs for the brew
const { id, googleId } = getId(req);
// Try to find the document in the Homebrewery database -- if it doesn't exist, that's fine.
let stub = await HomebrewModel.get(accessType === 'edit' ? { editId: id } : { shareId: id })
.catch((err)=>{
if(googleId) {
console.warn(`Unable to find document stub for ${accessType}Id ${id}`);
} else {
console.warn(err);
}
});
stub = stub?.toObject();
// If there is a google id, try to find the google brew
if(googleId || stub?.googleId) {
let googleError;
const googleBrew = await GoogleActions.getGoogleBrew(googleId || stub?.googleId, id, accessType)
.catch((err)=>{
console.warn(err);
googleError = err;
});
// If we can't find the google brew and there is a google id for the brew, throw an error.
if(!googleBrew) throw googleError;
// Combine the Homebrewery stub with the google brew, or if the stub doesn't exist just use the google brew
stub = stub ? _.assign({ ...excludeStubProps(stub), stubbed: true }, excludeGoogleProps(googleBrew)) : googleBrew;
}
// If after all of that we still don't have a brew, throw an exception
if(!stub) {
throw 'Brew not found in Homebrewery database or Google Drive';
}
if(typeof stub.tags === 'string') {
stub.tags = [];
}
req.brew = stub;
next();
};
};
const mergeBrewText = (brew)=>{
let text = brew.text;
if(brew.style !== undefined) {
@@ -32,15 +92,33 @@ const MAX_TITLE_LENGTH = 100;
const getGoodBrewTitle = (text)=>{
const tokens = Markdown.marked.lexer(text);
return (tokens.find((token)=>token.type == 'heading' || token.type == 'paragraph')?.text || 'No Title')
return (tokens.find((token)=>token.type === 'heading' || token.type === 'paragraph')?.text || 'No Title')
.slice(0, MAX_TITLE_LENGTH);
};
const excludePropsFromUpdate = (brew)=>{
// Remove undesired properties
const propsToExclude = ['views', 'lastViewed'];
const modified = _.clone(brew);
const propsToExclude = ['_id', 'views', 'lastViewed', 'editId', 'shareId', 'googleId'];
for (const prop of propsToExclude) {
delete brew[prop];
delete modified[prop];
}
return modified;
};
const excludeGoogleProps = (brew)=>{
const modified = _.clone(brew);
const propsToExclude = ['tags', 'systems', 'published', 'authors', 'owner', 'views'];
for (const prop of propsToExclude) {
delete modified[prop];
}
return modified;
};
const excludeStubProps = (brew)=>{
const propsToExclude = ['text', 'textBin', 'renderer', 'pageCount', 'version'];
for (const prop of propsToExclude) {
brew[prop] = undefined;
}
return brew;
};
@@ -54,33 +132,17 @@ const beforeNewSave = (account, brew)=>{
brew.text = mergeBrewText(brew);
};
const newLocalBrew = async (brew)=>{
const newHomebrew = new HomebrewModel(brew);
// Compress brew text to binary before saving
newHomebrew.textBin = zlib.deflateRawSync(newHomebrew.text);
// Delete the non-binary text field since it's not needed anymore
newHomebrew.text = undefined;
let saved = await newHomebrew.save()
.catch((err)=>{
console.error(err, err.toString(), err.stack);
throw `Error while creating new brew, ${err.toString()}`;
});
saved = saved.toObject();
saved.gDrive = false;
return saved;
};
const newGoogleBrew = async (account, brew, res)=>{
const oAuth2Client = GoogleActions.authCheck(account, res);
return await GoogleActions.newGoogleBrew(oAuth2Client, brew);
const newBrew = excludeGoogleProps(brew);
return await GoogleActions.newGoogleBrew(oAuth2Client, newBrew);
};
const newBrew = async (req, res)=>{
const brew = req.body;
const { transferToGoogle } = req.query;
const { saveToGoogle } = req.query;
delete brew.editId;
delete brew.shareId;
@@ -88,148 +150,189 @@ const newBrew = async (req, res)=>{
beforeNewSave(req.account, brew);
let saved;
if(transferToGoogle) {
saved = await newGoogleBrew(req.account, brew, res)
const newHomebrew = new HomebrewModel(brew);
newHomebrew.editId = nanoid(12);
newHomebrew.shareId = nanoid(12);
let googleId, saved;
if(saveToGoogle) {
googleId = await newGoogleBrew(req.account, newHomebrew, res)
.catch((err)=>{
res.status(err.status || err.response.status).send(err.message || err);
console.error(err);
res.status(err?.status || err?.response?.status || 500).send(err?.message || err);
});
if(!googleId) return;
excludeStubProps(newHomebrew);
newHomebrew.googleId = googleId;
} else {
saved = await newLocalBrew(brew)
.catch((err)=>{
res.status(500).send(err);
});
// Compress brew text to binary before saving
newHomebrew.textBin = zlib.deflateRawSync(newHomebrew.text);
// Delete the non-binary text field since it's not needed anymore
newHomebrew.text = undefined;
}
saved = await newHomebrew.save()
.catch((err)=>{
console.error(err, err.toString(), err.stack);
throw `Error while creating new brew, ${err.toString()}`;
});
if(!saved) return;
return res.status(200).send(saved);
saved = saved.toObject();
res.status(200).send(saved);
};
const updateBrew = async (req, res)=>{
let brew = excludePropsFromUpdate(req.body);
const { transferToGoogle, transferFromGoogle } = req.query;
// Initialize brew from request and body, destructure query params, set a constant for the google id, and set the initial value for the after-save method
let brew = _.assign(req.brew, excludePropsFromUpdate(req.body));
const { saveToGoogle, removeFromGoogle } = req.query;
const googleId = brew.googleId;
let afterSave = async ()=>true;
let saved;
if(brew.googleId && transferFromGoogle) {
beforeNewSave(req.account, brew);
brew.text = mergeBrewText(brew);
saved = await newLocalBrew(brew)
.catch((err)=>{
console.error(err);
res.status(500).send(err);
});
if(!saved) return;
if(brew.googleId && removeFromGoogle) {
// If the google id exists and we're removing it from google, set afterSave to delete the google brew and mark the brew's google id as undefined
afterSave = async ()=>{
return await deleteGoogleBrew(req.account, googleId, brew.editId, res)
.catch((err)=>{
console.error(err);
res.status(err?.status || err?.response?.status || 500).send(err.message || err);
});
};
await deleteGoogleBrew(req.account, `${brew.googleId}${brew.editId}`, res)
brew.googleId = undefined;
} else if(!brew.googleId && saveToGoogle) {
// If we don't have a google id and the user wants to save to google, create the google brew and set the google id on the brew
brew.googleId = await newGoogleBrew(req.account, excludeGoogleProps(brew), res)
.catch((err)=>{
console.error(err);
res.status(err.status || err.response.status).send(err.message || err);
});
} else if(!brew.googleId && transferToGoogle) {
saved = await newGoogleBrew(req.account, brew, res)
.catch((err)=>{
console.error(err);
res.status(err.status || err.response.status).send(err.message || err);
});
if(!saved) return;
await deleteLocalBrew(req.account, brew.editId)
.catch((err)=>{
console.error(err);
res.status(err.status).send(err.message);
});
if(!brew.googleId) return;
} else if(brew.googleId) {
brew.text = mergeBrewText(brew);
saved = await GoogleActions.updateGoogleBrew(brew)
// If the google id exists and no other actions are being performed, update the google brew
const updated = await GoogleActions.updateGoogleBrew(excludeGoogleProps(brew))
.catch((err)=>{
console.error(err);
res.status(err.response?.status || 500).send(err);
res.status(err?.response?.status || 500).send(err);
});
if(!updated) return;
}
if(brew.googleId) {
// If the google id exists after all those actions, exclude the props that are stored in google and aren't needed for rendering the brew items
excludeStubProps(brew);
} else {
const dbBrew = await HomebrewModel.get({ editId: req.params.id })
.catch((err)=>{
console.error(err);
return res.status(500).send('Error while saving');
});
brew = _.merge(dbBrew, brew);
brew.text = mergeBrewText(brew);
// Compress brew text to binary before saving
brew.textBin = zlib.deflateRawSync(brew.text);
// Delete the non-binary text field since it's not needed anymore
brew.text = undefined;
brew.updatedAt = new Date();
if(req.account) {
brew.authors = _.uniq(_.concat(brew.authors, req.account.username));
}
brew.markModified('authors');
brew.markModified('systems');
saved = await brew.save();
}
brew.updatedAt = new Date();
if(req.account) {
brew.authors = _.uniq(_.concat(brew.authors, req.account.username));
}
// Fetch the brew from the database again (if it existed there to begin with), and assign the existing brew to it
brew = _.assign(await HomebrewModel.findOne({ _id: brew._id }), brew);
if(!brew.markModified) {
// If it wasn't in the database, create a new db brew
brew = new HomebrewModel(brew);
}
brew.markModified('authors');
brew.markModified('systems');
// Save the database brew
const saved = await brew.save()
.catch((err)=>{
console.error(err);
res.status(err.status || 500).send(err.message || 'Unable to save brew to Homebrewery database');
});
if(!saved) return;
// Call and wait for afterSave to complete
const after = await afterSave();
if(!after) return;
if(!res.headersSent) return res.status(200).send(saved);
res.status(200).send(saved);
};
const deleteBrew = async (req, res)=>{
if(req.params.id.length > 12) {
const deleted = await deleteGoogleBrew(req.account, req.params.id, res)
.catch((err)=>{
res.status(500).send(err);
});
if(deleted) return res.status(200).send();
} else {
const deleted = await deleteLocalBrew(req.account, req.params.id)
.catch((err)=>{
res.status(err.status).send(err.message);
});
if(deleted) return res.status(200).send(deleted);
return res.status(200).send();
}
};
const deleteLocalBrew = async (account, id)=>{
const brew = await HomebrewModel.findOne({ editId: id });
if(!brew) {
throw { status: 404, message: 'Can not find homebrew with that id' };
}
if(account) {
// Remove current user as author
brew.authors = _.pull(brew.authors, account.username);
brew.markModified('authors');
}
if(brew.authors.length === 0) {
// Delete brew if there are no authors left
await brew.remove()
.catch((err)=>{
console.error(err);
throw { status: 500, message: 'Error while removing' };
});
} else {
// Otherwise, save the brew with updated author list
return await brew.save()
.catch((err)=>{
throw { status: 500, message: err };
});
}
};
const deleteGoogleBrew = async (account, id, res)=>{
const deleteGoogleBrew = async (account, id, editId, res)=>{
const auth = await GoogleActions.authCheck(account, res);
await GoogleActions.deleteGoogleBrew(auth, id);
await GoogleActions.deleteGoogleBrew(auth, id, editId);
return true;
};
router.post('/api', newBrew);
router.put('/api/:id', updateBrew);
router.put('/api/update/:id', updateBrew);
router.delete('/api/:id', deleteBrew);
router.get('/api/remove/:id', deleteBrew);
const deleteBrew = async (req, res, next)=>{
// Delete an orphaned stub if its Google brew doesn't exist
try {
await getBrew('edit')(req, res, ()=>{});
} catch (err) {
const { id, googleId } = getId(req);
console.warn(`No google brew found for id ${googleId}, the stub with id ${id} will be deleted.`);
await HomebrewModel.deleteOne({ editId: id });
return next();
}
module.exports = router;
let brew = req.brew;
const { googleId, editId } = brew;
const account = req.account;
const isOwner = account && (brew.authors.length === 0 || brew.authors[0] === account.username);
// If the user is the owner and the file is saved to google, mark the google brew for deletion
const shouldDeleteGoogleBrew = googleId && isOwner;
if(brew._id) {
brew = _.assign(await HomebrewModel.findOne({ _id: brew._id }), brew);
if(account) {
// Remove current user as author
brew.authors = _.pull(brew.authors, account.username);
brew.markModified('authors');
}
if(brew.authors.length === 0) {
// Delete brew if there are no authors left
await brew.remove()
.catch((err)=>{
console.error(err);
throw { status: 500, message: 'Error while removing' };
});
} else {
if(shouldDeleteGoogleBrew) {
// When there are still authors remaining, we delete the google brew but store the full brew in the Homebrewery database
brew.googleId = undefined;
brew.textBin = zlib.deflateRawSync(brew.text);
brew.text = undefined;
}
// Otherwise, save the brew with updated author list
await brew.save()
.catch((err)=>{
throw { status: 500, message: err };
});
}
}
if(shouldDeleteGoogleBrew) {
const deleted = await deleteGoogleBrew(account, googleId, editId, res)
.catch((err)=>{
console.error(err);
res.status(500).send(err);
});
if(!deleted) return;
}
res.status(204).send();
};
router.post('/api', asyncHandler(newBrew));
router.put('/api/:id', asyncHandler(getBrew('edit')), asyncHandler(updateBrew));
router.put('/api/update/:id', asyncHandler(getBrew('edit')), asyncHandler(updateBrew));
router.delete('/api/:id', asyncHandler(deleteBrew));
router.get('/api/remove/:id', asyncHandler(deleteBrew));
module.exports = {
homebrewApi : router,
getBrew
};

View File

@@ -6,17 +6,19 @@ const zlib = require('zlib');
const HomebrewSchema = mongoose.Schema({
shareId : { type: String, default: ()=>{return nanoid(12);}, index: { unique: true } },
editId : { type: String, default: ()=>{return nanoid(12);}, index: { unique: true } },
googleId : { type: String },
title : { type: String, default: '' },
text : { type: String, default: '' },
textBin : { type: Buffer },
pageCount : { type: Number, default: 1 },
description : { type: String, default: '' },
tags : { type: String, default: '' },
tags : [String],
systems : [String],
renderer : { type: String, default: '' },
authors : [String],
published : { type: Boolean, default: false },
thumbnail : { type: String, default: '' },
createdAt : { type: Date, default: Date.now },
updatedAt : { type: Date, default: Date.now },
@@ -36,9 +38,9 @@ HomebrewSchema.statics.increaseView = async function(query) {
return brew;
};
HomebrewSchema.statics.get = function(query){
HomebrewSchema.statics.get = function(query, fields=null){
return new Promise((resolve, reject)=>{
Homebrew.find(query, (err, brews)=>{
Homebrew.find(query, fields, null, (err, brews)=>{
if(err || !brews.length) return reject('Can not find brew');
if(!_.isNil(brews[0].textBin)) { // Uncompress zipped text field
unzipped = zlib.inflateRawSync(brews[0].textBin);
@@ -51,13 +53,13 @@ HomebrewSchema.statics.get = function(query){
});
};
HomebrewSchema.statics.getByUser = function(username, allowAccess=false){
HomebrewSchema.statics.getByUser = function(username, allowAccess=false, fields=null){
return new Promise((resolve, reject)=>{
const query = { authors: username, published: true };
if(allowAccess){
delete query.published;
}
Homebrew.find(query).lean().exec((err, brews)=>{ //lean() converts results to JSObjects
Homebrew.find(query, fields).lean().exec((err, brews)=>{ //lean() converts results to JSObjects
if(err) return reject('Can not find brew');
return resolve(brews);
});

View File

@@ -30,6 +30,8 @@ if(typeof navigator !== 'undefined'){
// require('codemirror/addon/edit/trailingspace.js');
//Active line highlighting
// require('codemirror/addon/selection/active-line.js');
//Scroll past last line
require('codemirror/addon/scroll/scrollpastend.js');
//Auto-closing
//XML code folding is a requirement of the auto-closing tag feature and is not enabled
require('codemirror/addon/fold/xml-fold.js');
@@ -98,6 +100,7 @@ const CodeEditor = createClass({
indentWithTabs : true,
tabSize : 2,
historyEventDelay : 250,
scrollPastEnd : true,
extraKeys : {
'Ctrl-B' : this.makeBold,
'Cmd-B' : this.makeBold,

View File

@@ -3,6 +3,11 @@
@import (less) 'codemirror/addon/search/matchesonscrollbar.css';
@import (less) 'codemirror/addon/dialog/dialog.css';
@keyframes sourceMoveAnimation {
50% {background-color: red; color: white;}
100% {background-color: unset; color: unset;}
}
.codeEditor{
.CodeMirror-foldmarker {
font-family: inherit;
@@ -10,6 +15,11 @@
font-weight: 600;
}
.sourceMoveFlash .CodeMirror-line{
animation-name: sourceMoveAnimation;
animation-duration: 0.4s;
}
//.cm-tab {
// background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAQAAACOs/baAAAARUlEQVR4nGJgIAG8JkXxUAcCtDWemcGR1lY4MvgzCEKY7jSBjgxBDAG09UEQzAe0AMwMHrSOAwEGRtpaMIwAAAAA//8DAG4ID9EKs6YqAAAAAElFTkSuQmCC) no-repeat right;
//}
@@ -19,4 +29,4 @@
// background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAQAgMAAABW5NbuAAAACVBMVEVHcEwAAAAAAAAWawmTAAAAA3RSTlMAPBJ6PMxpAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAFUlEQVQI12NgwACcCQysASAEZGAAACMuAX06aCQUAAAAAElFTkSuQmCC) no-repeat right;
// }
//}
}
}

View File

@@ -50,7 +50,7 @@ nav{
}
}
.navItem{
#backgroundColors;
#backgroundColorsHover;
.animate(background-color);
padding : 8px 12px;
cursor : pointer;

View File

@@ -17,7 +17,10 @@ const SplitPane = createClass({
return {
currentDividerPos : null,
windowWidth : 0,
isDragging : false
isDragging : false,
moveSource : false,
moveBrew : false,
showMoveArrows : true
};
},
@@ -29,6 +32,11 @@ const SplitPane = createClass({
userSetDividerPos : dividerPos,
windowWidth : window.innerWidth
});
} else {
this.setState({
currentDividerPos : window.innerWidth / 2,
userSetDividerPos : window.innerWidth / 2
});
}
window.addEventListener('resize', this.handleWindowResize);
},
@@ -83,20 +91,58 @@ const SplitPane = createClass({
window.getSelection().removeAllRanges();
}
},
*/
*/
setMoveArrows : function(newState) {
if(this.state.showMoveArrows != newState){
this.setState({
showMoveArrows : newState
});
}
},
renderMoveArrows : function(){
if(this.state.showMoveArrows) {
return <>
<div className='arrow left'
style={{ left: this.state.currentDividerPos-4 }}
onClick={()=>this.setState({ moveSource: !this.state.moveSource })} >
<i className='fas fa-arrow-left' />
</div>
<div className='arrow right'
style={{ left: this.state.currentDividerPos-4 }}
onClick={()=>this.setState({ moveBrew: !this.state.moveBrew })} >
<i className='fas fa-arrow-right' />
</div>
</>;
}
},
renderDivider : function(){
return <div className='divider' onMouseDown={this.handleDown} >
<div className='dots'>
<i className='fas fa-circle' />
<i className='fas fa-circle' />
<i className='fas fa-circle' />
return <>
{this.renderMoveArrows()}
<div className='divider' onMouseDown={this.handleDown} >
<div className='dots'>
<i className='fas fa-circle' />
<i className='fas fa-circle' />
<i className='fas fa-circle' />
</div>
</div>
</div>;
</>;
},
render : function(){
return <div className='splitPane' onMouseMove={this.handleMove} onMouseUp={this.handleUp}>
<Pane ref='pane1' width={this.state.currentDividerPos}>{this.props.children[0]}</Pane>
<Pane
ref='pane1'
width={this.state.currentDividerPos}
>
{React.cloneElement(this.props.children[0], {
moveBrew : this.state.moveBrew,
moveSource : this.state.moveSource,
setMoveArrows : this.setMoveArrows
})}
</Pane>
{this.renderDivider()}
<Pane ref='pane2' isDragging={this.state.isDragging}>{this.props.children[1]}</Pane>
</div>;

View File

@@ -13,7 +13,7 @@
.divider{
display : table;
height : 100%;
width : 12px;
width : 15px;
cursor : ew-resize;
background-color : #bbb;
text-align : center;
@@ -32,4 +32,28 @@
background-color: #999;
}
}
.arrow{
position : absolute;
width : 25px;
height : 25px;
border : 2px solid #bbb;
border-radius : 15px;
text-align : center;
font-size : 1.2em;
cursor : pointer;
background-color : #ddd;
z-index : 999;
box-shadow : 0 4px 5px #0000007f;
&.left{
.tooltipLeft('Jump to location in Editor');
top : 30px;
}
&.right{
.tooltipRight('Jump to location in Preview');
top : 60px;
}
&:hover{
background-color: #666;
}
}
}

View File

@@ -23,6 +23,29 @@
@grey : #7F8C8D;
#backgroundColors {
&.tealLight{ background-color : @tealLight };
&.teal{ background-color : @teal };
&.greenLight{ background-color : @greenLight };
&.green{ background-color : @green };
&.blueLight{ background-color : @blueLight };
&.blue{ background-color : @blue };
&.purpleLight{ background-color : @purpleLight };
&.purple{ background-color : @purple };
&.steelLight{ background-color : @steelLight };
&.steel{ background-color : @steel };
&.yellowLight{ background-color : @yellowLight };
&.yellow{ background-color : @yellow };
&.orangeLight{ background-color : @orangeLight };
&.orange{ background-color : @orange };
&.redLight{ background-color : @redLight };
&.red{ background-color : @red };
&.silverLight{ background-color : @silverLight };
&.silver{ background-color : @silver };
&.greyLight{ background-color : @greyLight };
&.grey{ background-color : @grey };
}
#backgroundColorsHover {
&.tealLight:hover{ background-color : @tealLight };
&.teal:hover{ background-color : @teal };
&.greenLight:hover{ background-color : @greenLight };

View File

@@ -545,7 +545,6 @@ body {
-webkit-column-break-after : always;
break-after : always;
-moz-column-break-after : always;
break-before : column;
}
//Avoid breaking up
blockquote,table{
@@ -604,8 +603,8 @@ body {
white-space : nowrap;
}
&.frame {
margin-top : 0.66cm;
margin-bottom : 1.05cm;
margin-top : 0.7cm;
margin-bottom : 0.9cm;
margin-left : -0.1cm;
margin-right : -0.1cm;
width : calc(100% + 0.2cm);
@@ -613,34 +612,38 @@ body {
background-color : white;
border : initial;
border-style : solid;
border-image-outset : 0.55cm 0.3cm;
border-image-outset : 0.4cm 0.3cm;
border-image-repeat : stretch;
border-image-slice : 200;
border-image-source : @frameBorderImage;
border-image-width : 47px;
&.wide:first-child {
margin-top: 0.12cm;
}
}
&.decoration {
transform-style : preserve-3d;
z-index: -1;
position:relative;
}
&.decoration::before {
content :'';
position : absolute;
background-image : @classTableDecoration;
background-size : contain;
background-repeat : space;
width : 7.75cm;
height : calc(100% + 3.3cm);
top : 50%;
left : 50%;
transform : translateY(-50%) translateX(-50%) translateZ(-1px);
filter : drop-shadow(0px 0px 1px #C8C5C080)
content :'';
position : absolute;
background-image : @classTableDecoration,
@classTableDecoration;
background-size : contain, contain;
background-repeat : no-repeat, no-repeat;
background-position : top, bottom;
width : 7.75cm;
height : calc(100% + 3.3cm);
top : 50%;
left : 50%;
transform : translateY(-50%) translateX(-50%);
filter : drop-shadow(0px 0px 1px #C8C5C080);
z-index : -1;
}
&.decoration.wide::before {
width : calc(100% + 3.3cm);
height : 7.75cm;
top : calc(50% + 0.4cm);
width : calc(100% + 3.3cm);
height : 7.75cm;
background-position : left, right;
}
h5 + table{
margin-top : 0.2cm;

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -77,3 +77,32 @@
font-weight: normal;
font-style: normal;
}
/* Cover Page */
@font-face {
font-family: NodestoCapsCondensed;
src: url('../fonts/5e/Nodesto Caps Condensed.woff2');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: NodestoCapsCondensed;
src: url('../fonts/5e/Nodesto Caps Condensed Bold.woff2');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: NodestoCapsCondensed;
src: url('../fonts/5e/Nodesto Caps Condensed Italic.woff2');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: NodestoCapsCondensed;
src: url('../fonts/5e/Nodesto Caps Condensed Bold Italic.woff2');
font-weight: bold;
font-style: italic;
}