Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
/gems
/auto_generated
.eslintcache
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarn lint-staged
pnpm lint-staged
3 changes: 2 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
engine-strict=true
engine-strict = true
auto-install-peers = false
1 change: 0 additions & 1 deletion .template-lintrc.cjs

This file was deleted.

125 changes: 72 additions & 53 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,80 +1,99 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.1.3.3)
activesupport (8.1.3)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
json
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
ast (2.4.2)
base64 (0.2.0)
bigdecimal (3.1.8)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
drb (2.2.1)
i18n (1.14.5)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
ast (2.4.3)
base64 (0.3.0)
bigdecimal (4.1.2)
concurrent-ruby (1.3.7)
connection_pool (3.0.2)
drb (2.2.3)
i18n (1.15.2)
concurrent-ruby (~> 1.0)
json (2.7.2)
language_server-protocol (3.17.0.3)
minitest (5.23.1)
mutex_m (0.2.0)
parallel (1.24.0)
parser (3.3.1.0)
json (2.20.0)
language_server-protocol (3.17.0.6)
lint_roller (1.1.0)
logger (1.7.0)
minitest (6.0.6)
drb (~> 2.0)
prism (~> 1.5)
parallel (2.1.0)
parser (3.3.11.1)
ast (~> 2.4.1)
racc
prettier_print (1.2.1)
racc (1.8.0)
rack (3.0.12)
prism (1.9.0)
racc (1.8.1)
rack (3.2.6)
rainbow (3.1.1)
regexp_parser (2.9.2)
rexml (3.3.9)
rubocop (1.64.0)
regexp_parser (2.12.0)
rubocop (1.88.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (>= 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.49.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
parser (>= 3.3.1.0)
rubocop-capybara (2.20.0)
rubocop (~> 1.41)
rubocop-discourse (3.8.0)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.50.0)
parser (>= 3.3.7.2)
prism (~> 1.7)
rubocop-capybara (3.0.0)
lint_roller (~> 1.1)
rubocop (~> 1.81)
rubocop-discourse (3.18.0)
activesupport (>= 6.1)
rubocop (>= 1.59.0)
rubocop-capybara (>= 2.0.0)
rubocop-factory_bot (>= 2.0.0)
rubocop-rails (>= 2.25.0)
rubocop-rspec (>= 2.25.0)
rubocop-factory_bot (2.25.1)
rubocop (~> 1.41)
rubocop-rails (2.25.0)
lint_roller (>= 1.1.0)
rubocop-capybara (>= 2.23.0)
rubocop-discourse-base (>= 1.0.0)
rubocop-factory_bot (>= 2.27.0)
rubocop-rails (>= 2.30.3)
rubocop-rspec (>= 3.0.1)
rubocop-rspec_rails (>= 2.31.0)
rubocop-discourse-base (1.0.0)
rubocop (>= 1.80.0)
rubocop-factory_bot (2.28.0)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rails (2.35.5)
activesupport (>= 4.2.0)
lint_roller (~> 1.1)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (2.29.2)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
rubocop-rspec_rails (~> 2.28)
rubocop-rspec_rails (2.28.3)
rubocop (~> 1.40)
rubocop (>= 1.75.0, < 2.0)
rubocop-ast (>= 1.44.0, < 2.0)
rubocop-rspec (3.10.2)
lint_roller (~> 1.1)
regexp_parser (>= 2.0)
rubocop (~> 1.86, >= 1.86.2)
rubocop-rspec_rails (2.32.0)
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rspec (~> 3.5)
ruby-progressbar (1.13.0)
syntax_tree (6.2.0)
securerandom (0.4.1)
syntax_tree (6.3.0)
prettier_print (>= 1.2.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.2.0)
uri (1.1.1)

PLATFORMS
ruby
Expand All @@ -84,4 +103,4 @@ DEPENDENCIES
syntax_tree

BUNDLED WITH
2.5.10
4.0.15
4 changes: 2 additions & 2 deletions app/controllers/bb_code/admin/refresh_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ def index
begin
# Skip warmup in development mode - it makes boot take ~2s longer
PrettyText.cook("warm up **pretty text**")
render json: nil, status: 200
render json: nil, status: :ok
rescue => e
Rails.logger.error("Failed to warm up pretty text: #{e}")
render json: nil, status: 500
render json: nil, status: :internal_server_error
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class AdminPluginsBBCodeController extends Controller {
this.resetEnabled = false;
this.success = false;
this.error = false;
ajax("/BbCode/admin/refresh")
ajax("/BbCode/admin/refresh", { type: "POST" })
.then(() => {
// success
this.resetEnabled = true;
Expand Down
27 changes: 27 additions & 0 deletions assets/javascripts/discourse/templates/admin/plugins-bbcode.gjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import DButton from "discourse/ui-kit/d-button";
import { i18n } from "discourse-i18n";

export default <template>
<h3>{{i18n "bbcode.title"}}</h3>
<p>{{i18n "bbcode.resetDesc"}}</p>

<div class="buttons">
{{#if @controller.resetEnabled}}
<DButton
@label="bbcode.reset"
@action={{@controller.resetServerJSContext}}
@icon="arrows-rotate"
id="reset-bbcode"
/>
{{#if @controller.success}}
<span style="color: var(--success-medium)">{{i18n "bbcode.success"}}</span>
{{/if}}
{{#if @controller.error}}
<span style="color: var(--danger-medium)">{{i18n "bbcode.error"}}</span>
{{/if}}
{{else}}
<div class="spinner small"></div>
{{i18n "bbcode.reseting"}}
{{/if}}
</div>
</template>
22 changes: 0 additions & 22 deletions assets/javascripts/discourse/templates/admin/plugins-bbcode.hbs

This file was deleted.

4 changes: 3 additions & 1 deletion assets/stylesheets/common/accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ div.bb-accordion {
&:hover {
background: $title-hover-bg-color;
}

&::before {
display: none;
}
}

&[open=""] summary.bb-slide-title {
border-bottom: 1px solid $border-color;
}
Expand All @@ -46,9 +48,9 @@ div.bb-accordion {
background-color: $content-bg-color;
border-right: 1px solid $border-color;
border-left: 1px solid $border-color;

padding: 6px;
}

&:last-child {
border-bottom: unset;
}
Expand Down
14 changes: 2 additions & 12 deletions assets/stylesheets/common/block.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ table.bb-block {
td.bb-block-content {
border-color: $color;
}

td.bb-block-icon {
background-image: url($image);

Expand All @@ -90,62 +91,51 @@ table.bb-block {
}

@include block-builder("dice", "Dice", #0a941d, "/plugins/bbcode/images/colordice.png");

@include block-builder("dice10", "Dice", #0a941d, "/plugins/bbcode/images/colordice10.png");

@include block-builder("setting", "Setting", #0a941d, "/plugins/bbcode/images/colorsetting.png");

@include block-builder(
"important",
"Important",
#94920a,
"/plugins/bbcode/images/colorexclaim.png"
);

@include block-builder(
"treasure",
"Treasure",
#cbc939,
"/plugins/bbcode/images/colortreasure.png"
);

@include block-builder(
"announcement",
"Announcement",
#940a0a,
"/plugins/bbcode/images/colorannounce.png"
);

@include block-builder("warning", "Warning", #940a0a, "/plugins/bbcode/images/colorwarning.png");

@include block-builder(
"encounter",
"Encounter",
#940a0a,
"/plugins/bbcode/images/colorencounter.png"
);

@include block-builder(
"storyteller",
"Storyteller",
#bf7e00,
"/plugins/bbcode/images/colorpencil.png"
);

@include block-builder(
"question",
"Question",
#5e0a94,
"/plugins/bbcode/images/colorquestion.png"
);

@include block-builder(
"information",
"Information",
#0a1694,
"/plugins/bbcode/images/colorinfo.png"
);

@include block-builder(
"character",
"Character",
Expand All @@ -154,7 +144,7 @@ table.bb-block {
);
}

@media screen and (max-width: 600px) {
@media screen and (width <= 600px) {
table.bb-block td.bb-block-icon {
height: 75px;
background-size: 50px;
Expand Down
3 changes: 2 additions & 1 deletion assets/stylesheets/common/border-bg.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
border-style: solid;
border-width: 1px;
border-color: var(--tertiary);

> .bb-background {
margin: -10px;
}
}

.bb-background {
padding: 10px;
color: currentColor;
color: currentcolor;
}
1 change: 1 addition & 0 deletions assets/stylesheets/common/divide.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ span.bb-divide {
width: 100%;
display: block;
text-align: center;

&[data-type="thick"] {
border-bottom: 3px solid var(--tertiary);
}
Expand Down
2 changes: 1 addition & 1 deletion assets/stylesheets/common/fieldset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
color: var(--tertiary);
}

@media screen and (max-width: 800px) {
@media screen and (width <= 800px) {
width: 90%;
}
}
Expand Down
2 changes: 1 addition & 1 deletion assets/stylesheets/common/heightrestrict.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ div.bb-height-restrict {
.image-wrapper,
.lightbox-wrapper,
img {
height: 100% !important; //this is needed in order to overcome the sizing that discourse does on its own to images
height: 100% !important; // this is needed in order to overcome the sizing that discourse does on its own to images
width: auto !important;
}
}
Loading
Loading