framework
framework copied to clipboard
feat(emoji): allow the user to set the cdn address
- add cdn mirror address configuration items
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
- [x] Has the problem that is being solved here been clearly explained?
- [x] If applicable, have various options for solving this problem been considered?
- [x] For core PRs, does this need to be in core, or could it be in an extension?
- [x] Are we willing to maintain this for years / potentially forever?
Confirmed
- [x] Frontend changes: tested on a local Flarum installation.
- [x] Backend changes: tests are green (run
composer test
). - [x] Core developer confirmed locally this works as intended.
- [x] Tests have been added, or are not appropriate here.
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. However, the best solution here may be to add a' reset' button to the input box with a' default' configuration, which may be the logic of core.