-
-
Notifications
You must be signed in to change notification settings - Fork 836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(emoji): allow the user to set the cdn address #3908
feat(emoji): allow the user to set the cdn address #3908
Conversation
* add cdn mirror address configuration items
@@ -0,0 +1,19 @@ | |||
import app from 'flarum/admin/app'; | |||
import {version} from "../forum/cdn"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is needed from both forum
and admin
could you please move it to common
and update import paths?
extensions/emoji/extend.php
Outdated
@@ -30,4 +33,7 @@ | |||
}), | |||
|
|||
new Extend\Locales(__DIR__.'/locale'), | |||
|
|||
(new Extend\Settings) | |||
->serializeToForum('flarum-emoji.cdn', 'flarum-emoji.cdn'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's drop the cdn
const from cdn.js
and instead add a default value here with that value ->default(key, value)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok,I will process it a few days later, have a nice weekend^_^
* Move cdn files to common * add cdn default values to configuration
The cdn.js file has been moved to common , which should be done because it is common. And the default address has been set to the default value of the configuration item, and the default setting has been removed from the js code. But this change may have a potential problem: The user sets up a cdn and then clears the settings to try to restore to the default configuration. Then at this time, the page may report an error because it obtains a blank string. Of course, there is a default value from the beginning and there is no description of blank items. |
# Conflicts: # extensions/emoji/js/src/forum/addComposerAutocomplete.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes proposed in this pull request:
Modified extension emoji, the cdn mirror address configuration item is added to the extended emoji settings page of the management interface.
This option affects the Preview address of emoji in the Post, Reply, and Reply edit box Autocomplete.
Reviewers should focus on:
Some cdn only provide version 14.0.2 and do not provide a short address of 14, and if the user enters the wrong address, it cannot be displayed.
In addition, non-native English speakers, such as translation documents or comments unreasonable please understand
Screenshot
QA
Necessity
Confirmed
composer test
).