From 67ff46880af4376c0cca623e39a2601f9eaf608e Mon Sep 17 00:00:00 2001
From: Phan An
Date: Fri, 15 Jul 2022 09:23:55 +0200
Subject: [PATCH] feat: use FontAwesome as components
---
package.json | 7 +-
resources/assets/js/app.ts | 2 +
.../assets/js/components/album/AlbumCard.vue | 13 +--
.../assets/js/components/album/AlbumInfo.vue | 5 +-
.../js/components/artist/ArtistCard.vue | 6 +-
.../js/components/artist/ArtistInfo.vue | 5 +-
.../assets/js/components/layout/AppHeader.vue | 7 +-
.../layout/app-footer/FooterExtraControls.vue | 7 +-
.../app-footer/FooterPlayerControls.vue | 26 +++--
.../layout/main-wrapper/ExtraPanel.vue | 3 +-
.../layout/main-wrapper/Sidebar.vue | 102 +++++++++---------
.../js/components/meta/AboutKoelModal.vue | 2 +-
.../playlist/PlaylistSidebarItem.vue | 24 ++---
.../playlist/PlaylistSidebarList.vue | 23 ++--
.../SmartPlaylistCreateForm.vue | 4 +-
.../smart-playlist/SmartPlaylistEditForm.vue | 3 +-
.../smart-playlist/SmartPlaylistRule.vue | 5 +-
.../smart-playlist/SmartPlaylistRuleGroup.vue | 3 +-
.../profile-preferences/LastfmIntegration.vue | 7 +-
.../profile-preferences/PreferencesForm.vue | 8 +-
.../js/components/screens/FavoritesScreen.vue | 6 +-
.../js/components/screens/HomeScreen.vue | 4 +-
.../js/components/screens/PlaylistScreen.vue | 3 +-
.../js/components/screens/QueueScreen.vue | 3 +-
.../screens/RecentlyPlayedScreen.vue | 3 +-
.../js/components/screens/UploadScreen.vue | 18 ++--
.../js/components/screens/UserListScreen.vue | 3 +-
.../js/components/screens/YouTubeScreen.vue | 3 +-
.../screens/search/SearchExcerptsScreen.vue | 3 +-
.../assets/js/components/song/SongCard.vue | 17 +--
.../js/components/song/SongLikeButton.vue | 8 +-
.../assets/js/components/song/SongList.vue | 25 +++--
.../js/components/song/SongListControls.vue | 16 ++-
.../js/components/song/SongListItem.vue | 5 +-
.../js/components/ui/AlbumArtistThumbnail.vue | 38 ++++---
resources/assets/js/components/ui/Btn.vue | 3 +
.../assets/js/components/ui/BtnCloseModal.vue | 5 +-
.../js/components/ui/BtnScrollToTop.vue | 8 +-
.../assets/js/components/ui/CheckBox.vue | 37 +++++++
.../assets/js/components/ui/Equalizer.vue | 12 +--
.../assets/js/components/ui/LyricsPane.vue | 2 +-
resources/assets/js/components/ui/Overlay.vue | 13 +--
.../js/components/ui/RepeatModeSwitch.vue | 39 ++++---
.../js/components/ui/ScreenControlsToggle.vue | 6 +-
.../js/components/ui/ScreenEmptyState.vue | 4 +-
.../assets/js/components/ui/TextMagnifier.vue | 5 +-
.../assets/js/components/ui/TooltipIcon.vue | 3 +-
.../js/components/ui/ViewModeSwitch.vue | 13 ++-
resources/assets/js/components/ui/Volume.vue | 43 ++++++--
.../js/components/ui/upload/UploadItem.vue | 5 +-
.../assets/js/components/user/UserBadge.vue | 3 +-
.../assets/js/components/user/UserCard.vue | 10 +-
resources/assets/js/remote/App.vue | 26 +++--
resources/assets/js/themes.ts | 2 -
resources/assets/sass/app.scss | 1 -
resources/assets/sass/partials/_mixins.scss | 15 ---
resources/assets/sass/partials/_shared.scss | 61 ++---------
resources/assets/sass/remote.scss | 1 -
vite.config.js | 2 +-
yarn.lock | 43 +++++++-
60 files changed, 432 insertions(+), 347 deletions(-)
create mode 100644 resources/assets/js/components/ui/CheckBox.vue
diff --git a/package.json b/package.json
index c7374bca..90c2557e 100644
--- a/package.json
+++ b/package.json
@@ -14,11 +14,15 @@
"url": "https://github.com/koel/koel"
},
"dependencies": {
+ "@fortawesome/fontawesome-svg-core": "^6.1.1",
+ "@fortawesome/free-brands-svg-icons": "^6.1.1",
+ "@fortawesome/free-regular-svg-icons": "^6.1.1",
+ "@fortawesome/free-solid-svg-icons": "^6.1.1",
+ "@fortawesome/vue-fontawesome": "^3.0.1",
"alertify.js": "^1.0.12",
"axios": "^0.21.1",
"blueimp-md5": "^2.3.0",
"compare-versions": "^3.5.1",
- "font-awesome": "^4.7.0",
"ismobilejs": "^0.4.0",
"local-storage": "^2.0.0",
"lodash": "^4.17.19",
@@ -64,7 +68,6 @@
"eslint-plugin-vue": "^8.7.1",
"factoria": "^4.0.0",
"file-loader": "^1.1.6",
- "font-awesome": "^4.7.0",
"husky": "^4.2.5",
"jest-serializer-vue": "^2.0.2",
"jsdom": "^19.0.0",
diff --git a/resources/assets/js/app.ts b/resources/assets/js/app.ts
index df9c09d8..758f790f 100644
--- a/resources/assets/js/app.ts
+++ b/resources/assets/js/app.ts
@@ -2,8 +2,10 @@ import './staticLoader'
import { createApp } from 'vue'
import App from './App.vue'
import { clickaway, droppable, focus } from '@/directives'
+import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
createApp(App)
+ .component('icon', FontAwesomeIcon)
.directive('koel-focus', focus)
.directive('koel-clickaway', clickaway)
.directive('koel-droppable', droppable)
diff --git a/resources/assets/js/components/album/AlbumCard.vue b/resources/assets/js/components/album/AlbumCard.vue
index 7fc6176b..73d556a1 100644
--- a/resources/assets/js/components/album/AlbumCard.vue
+++ b/resources/assets/js/components/album/AlbumCard.vue
@@ -36,7 +36,7 @@
role="button"
@click.prevent="shuffle"
>
-
+
-
+
@@ -56,6 +56,7 @@
diff --git a/resources/assets/js/components/album/AlbumInfo.vue b/resources/assets/js/components/album/AlbumInfo.vue
index e6d03d5f..a2b4bbfd 100644
--- a/resources/assets/js/components/album/AlbumInfo.vue
+++ b/resources/assets/js/components/album/AlbumInfo.vue
@@ -2,8 +2,8 @@
{{ album.name }}
-
@@ -32,6 +32,7 @@
diff --git a/resources/assets/js/components/screens/FavoritesScreen.vue b/resources/assets/js/components/screens/FavoritesScreen.vue
index bfc056b2..31cd5039 100644
--- a/resources/assets/js/components/screens/FavoritesScreen.vue
+++ b/resources/assets/js/components/screens/FavoritesScreen.vue
@@ -39,12 +39,12 @@
-
+
No favorites yet.
Click the
-
+
icon to mark a song as favorite.
@@ -52,6 +52,8 @@
+
diff --git a/resources/assets/js/components/ui/Equalizer.vue b/resources/assets/js/components/ui/Equalizer.vue
index 5163738b..e838b19e 100644
--- a/resources/assets/js/components/ui/Equalizer.vue
+++ b/resources/assets/js/components/ui/Equalizer.vue
@@ -6,6 +6,7 @@
+
@@ -30,6 +31,7 @@
diff --git a/resources/assets/js/components/ui/ScreenControlsToggle.vue b/resources/assets/js/components/ui/ScreenControlsToggle.vue
index 7b8df9f4..75b3f0b4 100644
--- a/resources/assets/js/components/ui/ScreenControlsToggle.vue
+++ b/resources/assets/js/components/ui/ScreenControlsToggle.vue
@@ -1,11 +1,11 @@
-
-
-
+
+