feat: move fontawesome icons import to dedicated file (#742)
Co-authored-by: Dominik Pschenitschni <mail@celement.de> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/742 Reviewed-by: konrad <k@knt.li> Co-authored-by: dpschen <dpschen@noreply.kolaente.de> Co-committed-by: dpschen <dpschen@noreply.kolaente.de>
This commit is contained in:
parent
728dfc52e5
commit
9122a184d6
2 changed files with 128 additions and 126 deletions
127
src/icons.js
Normal file
127
src/icons.js
Normal file
|
@ -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
|
127
src/main.ts
127
src/main.ts
|
@ -19,72 +19,6 @@ import Modal from './components/modal/modal'
|
||||||
import './styles/vikunja.scss'
|
import './styles/vikunja.scss'
|
||||||
// Notifications
|
// Notifications
|
||||||
import Notifications from 'vue-notification'
|
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
|
// PWA
|
||||||
import './registerServiceWorker'
|
import './registerServiceWorker'
|
||||||
|
|
||||||
|
@ -122,66 +56,7 @@ Vue.config.productionTip = false
|
||||||
|
|
||||||
Vue.use(Notifications)
|
Vue.use(Notifications)
|
||||||
|
|
||||||
library.add(faSignOutAlt)
|
import FontAwesomeIcon from './icons'
|
||||||
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)
|
|
||||||
|
|
||||||
Vue.component('icon', FontAwesomeIcon)
|
Vue.component('icon', FontAwesomeIcon)
|
||||||
|
|
||||||
Vue.use(vueShortkey, {prevent: ['input', 'textarea', '.input']})
|
Vue.use(vueShortkey, {prevent: ['input', 'textarea', '.input']})
|
||||||
|
|
Loading…
Reference in a new issue