mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 04:45:17 +00:00
Fix calendar.js missing default symbol prefix (#3007)
Symbols provided in customEvents don't get the "fas fa-fw fa-" prefix, which according to the docs they should. This fixes that. Hello and thank you for wanting to contribute to the MagicMirror² project **Please make sure that you have followed these 4 rules before submitting your Pull Request:** > 1. Base your pull requests against the `develop` branch. > > 2. Include these infos in the description: > > - Does the pull request solve a **related** issue? > - If so, can you reference the issue like this `Fixes #<issue_number>`? > - What does the pull request accomplish? Use a list if needed. > - If it includes major visual changes please add screenshots. > > 3. Please run `npm run lint:prettier` before submitting so that > style issues are fixed. > > 4. Don't forget to add an entry about your changes to > the CHANGELOG.md file. **Note**: Sometimes the development moves very fast. It is highly recommended that you update your branch of `develop` before creating a pull request to send us your changes. This makes everyone's lives easier (including yours) and helps us out on the development team. Thanks again and have a nice day! Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
@@ -665,7 +665,9 @@ Module.register("calendar", {
|
||||
if (typeof ev.symbol !== "undefined" && ev.symbol !== "") {
|
||||
let needle = new RegExp(ev.keyword, "gi");
|
||||
if (needle.test(event.title)) {
|
||||
symbols[0] = ev.symbol;
|
||||
// Get the default prefix for this class name and add to the custom symbol provided
|
||||
const className = this.getCalendarProperty(event.url, "symbolClassName", this.config.defaultSymbolClassName);
|
||||
symbols[0] = className + ev.symbol;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user