diff --git a/src/icons.js b/src/icons.js new file mode 100644 index 00000000..f0f59e80 --- /dev/null +++ b/src/icons.js @@ -0,0 +1,127 @@ +import {library} from '@fortawesome/fontawesome-svg-core' +import { + faAlignLeft, + faAngleRight, + faArchive, + faBars, + faBell, + faCalendar, + faCalendarWeek, + faCheck, + faCheckDouble, + faChessKnight, + faChevronDown, + faCloudDownloadAlt, + faCloudUploadAlt, + faCocktail, + faCoffee, + faCog, + faEllipsisH, + faEllipsisV, + faExclamation, + faFillDrip, + faFilter, + faForward, + faGripLines, + faHistory, + faImage, + faKeyboard, + faLayerGroup, + faList, + faListOl, + faLock, + faPaperclip, + faPaste, + faPen, + faPencilAlt, + faPercent, + faPlus, + faPowerOff, + faSearch, + faShareAlt, + faSignOutAlt, + faSort, + faSortUp, + faStar as faStarSolid, + faTachometerAlt, + faTags, + faTasks, + faTh, + faTimes, + faTrashAlt, + faUser, + faUsers, +} from '@fortawesome/free-solid-svg-icons' +import { + faBellSlash, + faCalendarAlt, + faClock, + faComments, + faSave, + faStar, + faSun, + faTimesCircle, +} from '@fortawesome/free-regular-svg-icons' +import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome' + +library.add(faAlignLeft) +library.add(faAngleRight) +library.add(faArchive) +library.add(faBars) +library.add(faBell) +library.add(faBellSlash) +library.add(faCalendar) +library.add(faCalendarAlt) +library.add(faCalendarWeek) +library.add(faCheck) +library.add(faCheckDouble) +library.add(faChessKnight) +library.add(faChevronDown) +library.add(faClock) +library.add(faCloudDownloadAlt) +library.add(faCloudUploadAlt) +library.add(faCocktail) +library.add(faCoffee) +library.add(faCog) +library.add(faComments) +library.add(faEllipsisH) +library.add(faEllipsisV) +library.add(faExclamation) +library.add(faFillDrip) +library.add(faFilter) +library.add(faForward) +library.add(faGripLines) +library.add(faHistory) +library.add(faImage) +library.add(faKeyboard) +library.add(faLayerGroup) +library.add(faList) +library.add(faListOl) +library.add(faLock) +library.add(faPaperclip) +library.add(faPaste) +library.add(faPen) +library.add(faPencilAlt) +library.add(faPercent) +library.add(faPlus) +library.add(faPowerOff) +library.add(faSave) +library.add(faSearch) +library.add(faShareAlt) +library.add(faSignOutAlt) +library.add(faSort) +library.add(faSortUp) +library.add(faStar) +library.add(faStarSolid) +library.add(faSun) +library.add(faTachometerAlt) +library.add(faTags) +library.add(faTasks) +library.add(faTh) +library.add(faTimes) +library.add(faTimesCircle) +library.add(faTrashAlt) +library.add(faUser) +library.add(faUsers) + +export default FontAwesomeIcon \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 2303d428..43870d19 100644 --- a/src/main.ts +++ b/src/main.ts @@ -19,72 +19,6 @@ import Modal from './components/modal/modal' import './styles/vikunja.scss' // Notifications import Notifications from 'vue-notification' -// Icons -import {library} from '@fortawesome/fontawesome-svg-core' -import { - faAlignLeft, - faAngleRight, - faBars, - faCalendar, - faCalendarWeek, - faCheck, - faCheckDouble, - faChevronDown, - faCloudDownloadAlt, - faCloudUploadAlt, - faCog, - faEllipsisV, - faExclamation, - faFillDrip, - faFilter, - faHistory, - faKeyboard, - faLayerGroup, - faList, - faListOl, - faLock, - faPaperclip, - faPaste, - faPen, - faPencilAlt, - faPercent, - faPlus, - faPowerOff, - faSearch, - faSignOutAlt, - faSort, - faSortUp, - faStar as faStarSolid, - faTachometerAlt, - faTags, - faTasks, - faTh, - faTimes, - faTrashAlt, - faUser, - faUsers, - faForward, - faChessKnight, - faCoffee, - faCocktail, - faEllipsisH, - faArchive, - faShareAlt, - faImage, - faBell, - faGripLines, -} from '@fortawesome/free-solid-svg-icons' -import { - faCalendarAlt, - faClock, - faComments, - faSave, - faStar, - faTimesCircle, - faSun, - faBellSlash, -} from '@fortawesome/free-regular-svg-icons' -import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome' // PWA import './registerServiceWorker' @@ -122,66 +56,7 @@ Vue.config.productionTip = false Vue.use(Notifications) -library.add(faSignOutAlt) -library.add(faPlus) -library.add(faListOl) -library.add(faTasks) -library.add(faCog) -library.add(faAngleRight) -library.add(faLayerGroup) -library.add(faTrashAlt) -library.add(faUsers) -library.add(faUser) -library.add(faLock) -library.add(faPen) -library.add(faTimes) -library.add(faTachometerAlt) -library.add(faCalendar) -library.add(faTimesCircle) -library.add(faBars) -library.add(faPowerOff) -library.add(faCalendarWeek) -library.add(faCalendarAlt) -library.add(faExclamation) -library.add(faTags) -library.add(faChevronDown) -library.add(faCheck) -library.add(faPaste) -library.add(faPencilAlt) -library.add(faCloudDownloadAlt) -library.add(faCloudUploadAlt) -library.add(faPercent) -library.add(faStar) -library.add(faAlignLeft) -library.add(faPaperclip) -library.add(faClock) -library.add(faHistory) -library.add(faSearch) -library.add(faCheckDouble) -library.add(faComments) -library.add(faTh) -library.add(faSort) -library.add(faSortUp) -library.add(faList) -library.add(faEllipsisV) -library.add(faFilter) -library.add(faFillDrip) -library.add(faKeyboard) -library.add(faSave) -library.add(faStarSolid) -library.add(faForward) -library.add(faSun) -library.add(faChessKnight) -library.add(faCoffee) -library.add(faCocktail) -library.add(faEllipsisH) -library.add(faArchive) -library.add(faShareAlt) -library.add(faImage) -library.add(faBell) -library.add(faBellSlash) -library.add(faGripLines) - +import FontAwesomeIcon from './icons' Vue.component('icon', FontAwesomeIcon) Vue.use(vueShortkey, {prevent: ['input', 'textarea', '.input']})