mirror of
https://github.com/azlux/botamusique
synced 2024-11-23 13:56:17 +00:00
ff5b1cb1ee
* Update assets * Upgrade linting and other improvments * Correct linting * Correction and type check improvements * Correct type check lib * Fix lint pathing for VSCode * Remove duplicate babel config * Remove editorconfig root attribute from web subdir * Use double quotes around message * Simplify ESLint config * Update web assets * Allow AMD loader in WebPack * Bump web dependencies * Only include FA icons in-use
34 lines
1.1 KiB
JavaScript
34 lines
1.1 KiB
JavaScript
import {library, dom} from '@fortawesome/fontawesome-svg-core/index.es.js';
|
|
import {
|
|
faTimesCircle, faPlus, faCheck, faUpload, faTimes, faTrash, faPlay, faPause, faFastForward, faPlayCircle, faLightbulb,
|
|
faTrashAlt, faDownload, faSyncAlt, faEdit, faVolumeUp, faVolumeDown, faRobot, faRedo, faRandom, faTasks
|
|
} from '@fortawesome/free-solid-svg-icons/index.es.js';
|
|
import {faFileAlt} from '@fortawesome/free-regular-svg-icons/index.es.js';
|
|
|
|
library.add(
|
|
// Solid
|
|
faTimesCircle, faPlus, faCheck, faUpload, faTimes, faTrash, faPlay, faPause, faFastForward, faPlayCircle, faLightbulb,
|
|
faTrashAlt, faDownload, faSyncAlt, faEdit, faVolumeUp, faVolumeDown, faRobot, faRedo, faRandom, faTasks,
|
|
// Regular
|
|
faFileAlt
|
|
);
|
|
|
|
// Old application code
|
|
import './main.mjs';
|
|
|
|
// New application code
|
|
import Theme from './lib/theme.mjs';
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
Theme.init();
|
|
|
|
// Replace any existing <i> tags with <svg> and set up a MutationObserver to
|
|
// continue doing this as the DOM changes.
|
|
dom.watch();
|
|
|
|
document.getElementById('theme-switch-btn').addEventListener('click', () => {
|
|
Theme.swap();
|
|
});
|
|
});
|
|
|