From 1ad46c1ba920d382cba1102922dad798c2e44901 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Sun, 2 May 2021 22:08:25 -0400 Subject: [PATCH] Update changelog, update v3 snippets for tables --- changelog.md | 26 +++--- .../editor/snippetbar/snippets/snippets.js | 93 +++++++++---------- package-lock.json | 2 +- package.json | 2 +- 4 files changed, 62 insertions(+), 61 deletions(-) diff --git a/changelog.md b/changelog.md index 43426fbe3..1bd6ad97a 100644 --- a/changelog.md +++ b/changelog.md @@ -6,6 +6,11 @@ h5 { # changelog +### Saturday, 02/5/2021 - v2.11.2 + +- Fix for edge case where brews could accidentally transfer from Google Drive back to Homebrewery. +- Move cursor to end of snippet after insertion + ### Saturday, 20/3/2021 - v2.11.1 - Warning when opening brew in your Google Drive trash @@ -52,10 +57,6 @@ h5 { ### Monday, 19/10/2020 - v2.10.2 - Fixed issue with "recent" item links not updating when transferring between Google Drive. - -``` -``` - ### Monday, 12/10/2020 - v2.10.1 - Fixed issue with users unable to create new brews - Fixing brews being lost when loaded via back button @@ -73,6 +74,13 @@ h5 { ### Wednesday, 20/05/2020 - v2.9.0 - Major refactoring of site backend to work with updated dependencies for security (should be invisible to users) + + + + + +\page + ### Wednesday, 11/03/2020 - v2.8.2 - Fixed delete button removing everyone's copy for brews with multiple authors - Compressed homebrew text in database @@ -100,9 +108,6 @@ h5 { ### Saturday, 22/04/2017 - v2.7.4 - Give ability to hide the render warning notification - -\page - ### Friday, 03/03/2017 - v2.7.3 - Increasing the range on the Partial Page Rendering for a quick-fix for it getting out of sync on long brews. @@ -144,9 +149,6 @@ h5 { - Added in a snippet for a split table - Added an account nav item to new page -``` -``` - ### Sunday, 27/11/2016 - v2.5.1 - Fixed the column rendering on the new user page. Really should have tested that better - Added a hover tooltip to fully read the brew description @@ -167,6 +169,8 @@ h5 { - You can now print from a new page without saving - Added the ability to use ctrl+p and ctrl+s to print and save respectively. +\page + ### Monday, 07/11/2016 - Added final touches to the html validator and updating the rest of the branch - If anyone finds issues with the new HTML validator, please let me know. I hope this will bring a more consistent feel to Homebrewery rendering. @@ -186,8 +190,6 @@ h5 { - Fixed the noteblock overlapping into titles (thanks u/dsompura!) - Fixed a bad search route in the admin panel (thanks u/SnappyTom!) -\page - ### Friday, 29/07/2016 - v2.2.7 - Adding in descriptive note blocks. (Thanks calculuschild!) diff --git a/client/homebrew/editor/snippetbar/snippets/snippets.js b/client/homebrew/editor/snippetbar/snippets/snippets.js index 6a0345381..99fe62572 100644 --- a/client/homebrew/editor/snippetbar/snippets/snippets.js +++ b/client/homebrew/editor/snippetbar/snippets/snippets.js @@ -6,6 +6,7 @@ const MonsterBlockGen = require('./monsterblock.gen.js'); const ClassFeatureGen = require('./classfeature.gen.js'); const CoverPageGen = require('./coverpage.gen.js'); const TableOfContentsGen = require('./tableOfContents.gen.js'); +const dedent = require('dedent-tabs').default; module.exports = [ @@ -201,63 +202,61 @@ module.exports = [ name : 'Table', icon : 'fas fa-th-list', gen : function(){ - return [ - '##### Cookie Tastiness', - '| Tastiness | Cookie Type |', - '|:----:|:-------------|', - '| -5 | Raisin |', - '| 8th | Chocolate Chip |', - '| 11th | 2 or lower |', - '| 14th | 3 or lower |', - '| 17th | 4 or lower |\n\n', - ].join('\n'); - }, + return dedent` + ##### Character Advancement + | Experience Points | Level | Proficiency Bonus | + |:------------------|:-----:|:-----------------:| + | 0 | 1 | +2 | + | 300 | 2 | +2 | + | 900 | 3 | +2 | + | 2,700 | 4 | +2 | + | 6,500 | 5 | +3 | + | 14,000 | 6 | +3 | + \n`; + } }, { name : 'Wide Table', icon : 'fas fa-list', gen : function(){ - return [ - '
', - '##### Cookie Tastiness', - '| Tastiness | Cookie Type |', - '|:----:|:-------------|', - '| -5 | Raisin |', - '| 8th | Chocolate Chip |', - '| 11th | 2 or lower |', - '| 14th | 3 or lower |', - '| 17th | 4 or lower |', - '
\n\n' - ].join('\n'); - }, + return dedent` + {{wide + ##### Weapons + | Name | Cost | Damage | Weight | Properties | + |:------------------------|:-----:|:----------------|--------:|:-----------| + | *Simple Melee Weapons* | | | | | + |   Club | 1 sp | 1d4 bludgeoning | 2 lb. | Light | + |   Dagger | 2 gp | 1d4 piercing | 1 lb. | Finesse | + |   Spear | 1 gp | 1d6 piercing | 3 lb. | Thrown | + | *Simple Ranged Weapons* | | | | | + |   Dart | 5 cp | 1d4 piercig | 1/4 lb. | Finesse | + |   Shortbow | 25 gp | 1d6 piercing | 2 lb. | Ammunition | + |   Sling | 1 sp | 1d4 bludgeoning | — | Ammunition | + }} + \n`; + } }, { name : 'Split Table', icon : 'fas fa-th-large', gen : function(){ - return [ - '
', - '| d10 | Damage Type |', - '|:---:|:------------|', - '| 1 | Acid |', - '| 2 | Cold |', - '| 3 | Fire |', - '| 4 | Force |', - '| 5 | Lightning |', - '', - '```', - '```', - '', - '| d10 | Damage Type |', - '|:---:|:------------|', - '| 6 | Necrotic |', - '| 7 | Poison |', - '| 8 | Psychic |', - '| 9 | Radiant |', - '| 10 | Thunder |', - '
\n\n', - ].join('\n'); - }, + return dedent` + ##### Typical Difficulty Classes + {{column-count="2" + | Task Difficulty | DC | + |:----------------|:--:| + | Very easy | 5 | + | Easy | 10 | + | Medium | 15 | + + | Task Difficulty | DC | + |:------------------|:--:| + | Hard | 20 | + | Very hard | 25 | + | Nearly impossible | 30 | + }} + \n`; + } } ] }, diff --git a/package-lock.json b/package-lock.json index f02817db6..9cefb757d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "homebrewery", - "version": "2.11.1", + "version": "2.11.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 50757950a..1147cedb7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "homebrewery", "description": "Create authentic looking D&D homebrews using only markdown", - "version": "2.11.1", + "version": "2.11.2", "engines": { "node": "14.15.x" },