From 0b66f365b2ea4f8194c46e63d16ab2b64d0553ca Mon Sep 17 00:00:00 2001 From: Phan An Date: Thu, 4 Apr 2024 22:13:35 +0200 Subject: [PATCH] chore: replace Sass with PostCSS --- cypress/plugins/index.ts | 2 +- docs/.vitepress/components/CaptionedImage.vue | 2 +- .../components/MobileAppScreenshots.vue | 2 +- docs/.vitepress/components/PlusBadge.vue | 2 +- docs/.vitepress/components/SponsorLogo.vue | 2 +- docs/.vitepress/components/Sponsors.vue | 2 +- docs/.vitepress/components/Themes.vue | 2 +- docs/.vitepress/layout/Layout.vue | 2 +- docs/plus/purchase-activation.md | 2 +- package.json | 4 +- postcss.config.cjs | 6 + .../partials/_mixins.scss => css/app.pcss} | 35 +- .../_hacks.scss => css/partials/hack.pcss} | 0 .../_shared.scss => css/partials/shared.pcss} | 11 +- .../partials/skeleton.pcss} | 9 +- .../partials/tooltip.pcss} | 0 .../_vars.scss => css/partials/vars.pcss} | 0 resources/assets/css/remote.pcss | 4 + .../vendor/alertify.pcss} | 0 .../vendor/nprogress.pcss} | 0 resources/assets/css/vendor/plyr.pcss | 583 ++++++++++++++ resources/assets/css/vendor/reset.pcss | 34 + resources/assets/js/App.vue | 6 +- resources/assets/js/app.ts | 1 + .../assets/js/components/album/AlbumInfo.vue | 16 +- .../js/components/album/AlbumTrackList.vue | 15 +- .../components/album/AlbumTrackListItem.vue | 2 +- .../js/components/artist/ArtistInfo.vue | 6 +- .../js/components/auth/ForgotPasswordForm.vue | 2 +- .../assets/js/components/auth/LoginForm.vue | 2 +- .../js/components/auth/ResetPasswordForm.vue | 6 +- .../auth/__snapshots__/LoginForm.spec.ts.snap | 4 +- .../components/auth/sso/GoogleLoginButton.vue | 2 +- .../invitation/AcceptInvitation.vue | 6 +- .../koel-plus/ActivateLicenseForm.vue | 2 +- .../components/koel-plus/BtnUpgradeToPlus.vue | 8 +- .../js/components/koel-plus/KoelPlusModal.vue | 2 +- .../js/components/layout/ModalWrapper.vue | 2 +- .../layout/app-footer/AudioPlayer.vue | 4 +- .../layout/app-footer/FooterExtraControls.vue | 2 +- .../app-footer/FooterPlaybackControls.vue | 2 +- .../layout/app-footer/FooterSongInfo.vue | 2 +- .../FooterExtraControls.spec.ts.snap | 2 +- .../js/components/layout/app-footer/index.vue | 2 +- .../layout/main-wrapper/ExtraDrawer.vue | 12 +- .../layout/main-wrapper/MainContent.vue | 6 +- .../components/layout/main-wrapper/index.vue | 4 +- .../sidebar/PlaylistFolderSidebarItem.vue | 2 +- .../sidebar/PlaylistSidebarItem.vue | 2 +- .../sidebar/PlaylistSidebarList.vue | 4 +- .../layout/main-wrapper/sidebar/Sidebar.vue | 13 +- .../js/components/meta/AboutKoelModal.vue | 2 +- .../assets/js/components/meta/SponsorList.vue | 2 +- .../assets/js/components/meta/SupportKoel.vue | 2 +- .../__snapshots__/AboutKoelModal.spec.ts.snap | 2 +- .../playlist/CreatePlaylistForm.vue | 2 +- .../components/playlist/EditPlaylistForm.vue | 2 +- .../playlist/InvitePlaylistCollaborators.vue | 2 +- .../playlist/PlaylistCollaborationModal.vue | 2 +- .../playlist/PlaylistCollaboratorList.vue | 2 +- .../playlist/PlaylistCollaboratorListItem.vue | 2 +- .../playlist/PlaylistCollaboratorsBadge.vue | 2 +- .../PlaylistCollaborationModal.spec.ts.snap | 2 +- .../smart-playlist/SmartPlaylistFormBase.vue | 2 +- .../smart-playlist/SmartPlaylistRule.vue | 2 +- .../smart-playlist/SmartPlaylistRuleGroup.vue | 2 +- .../smart-playlist/SmartPlaylistRuleInput.vue | 2 +- .../EditableProfileAvatar.vue | 2 +- .../profile-preferences/Integrations.vue | 2 +- .../profile-preferences/LastfmIntegration.vue | 4 +- .../profile-preferences/PreferencesForm.vue | 2 +- .../profile-preferences/ProfileForm.vue | 2 +- .../profile-preferences/QRLogin.vue | 2 +- .../SpotifyIntegration.vue | 4 +- .../profile-preferences/ThemeCard.vue | 2 +- .../profile-preferences/ThemeList.vue | 2 +- .../js/components/screens/AlbumListScreen.vue | 11 +- .../js/components/screens/AlbumScreen.vue | 12 +- .../js/components/screens/AllSongsScreen.vue | 4 +- .../components/screens/ArtistListScreen.vue | 10 +- .../js/components/screens/ArtistScreen.vue | 14 +- .../js/components/screens/GenreListScreen.vue | 36 +- .../js/components/screens/HomeScreen.vue | 4 +- .../js/components/screens/SettingsScreen.vue | 2 +- .../js/components/screens/UploadScreen.vue | 2 +- .../js/components/screens/UserListScreen.vue | 2 +- .../components/screens/VisualizerScreen.vue | 2 +- .../js/components/screens/YouTubeScreen.vue | 2 +- .../__snapshots__/AllSongsScreen.spec.ts.snap | 12 +- .../__snapshots__/SettingsScreen.spec.ts.snap | 2 +- .../screens/search/SearchExcerptsScreen.vue | 2 +- .../assets/js/components/song/AddToMenu.vue | 2 +- .../js/components/song/EditSongForm.vue | 2 +- .../assets/js/components/song/SongCard.vue | 4 +- .../js/components/song/SongContextMenu.vue | 4 +- .../assets/js/components/song/SongList.vue | 4 +- .../js/components/song/SongListControls.vue | 6 +- .../js/components/song/SongListFilter.vue | 2 +- .../js/components/song/SongListItem.vue | 4 +- .../js/components/song/SongListSorter.vue | 4 +- .../js/components/song/SongThumbnail.vue | 2 +- .../song/__snapshots__/AddToMenu.spec.ts.snap | 2 +- .../__snapshots__/EditSongForm.spec.ts.snap | 4 +- .../assets/js/components/ui/AlertBox.vue | 8 +- .../js/components/ui/AppleMusicButton.vue | 2 +- .../js/components/ui/ArtistAlbumCard.vue | 2 +- .../components/ui/ArtistAlbumScreenTabs.vue | 4 +- .../js/components/ui/ArtistAlbumThumbnail.vue | 6 +- resources/assets/js/components/ui/Btn.vue | 6 +- .../assets/js/components/ui/BtnCloseModal.vue | 2 +- .../assets/js/components/ui/BtnGroup.vue | 2 +- .../js/components/ui/BtnScrollToTop.vue | 2 +- .../assets/js/components/ui/CheckBox.vue | 2 +- .../js/components/ui/ContextMenuBase.vue | 2 +- .../assets/js/components/ui/DialogBox.vue | 2 +- .../assets/js/components/ui/Equalizer.vue | 2 +- .../js/components/ui/FooterPlayButton.vue | 2 +- .../assets/js/components/ui/LyricsPane.vue | 2 +- .../assets/js/components/ui/Magnifier.vue | 8 +- .../assets/js/components/ui/MessageToast.vue | 2 +- .../js/components/ui/MessageToaster.vue | 2 +- .../js/components/ui/OfflineNotification.vue | 2 +- resources/assets/js/components/ui/Overlay.vue | 2 +- .../assets/js/components/ui/PasswordField.vue | 2 +- .../js/components/ui/PlaylistThumbnail.vue | 2 +- .../assets/js/components/ui/ProfileAvatar.vue | 2 +- .../js/components/ui/RepeatModeSwitch.vue | 2 +- .../js/components/ui/ScreenControlsToggle.vue | 2 +- .../js/components/ui/ScreenEmptyState.vue | 4 +- .../assets/js/components/ui/ScreenHeader.vue | 2 +- .../assets/js/components/ui/SearchForm.vue | 2 +- .../assets/js/components/ui/SoundBars.vue | 2 +- .../js/components/ui/ThumbnailStack.vue | 4 +- .../js/components/ui/ViewModeSwitch.vue | 2 +- .../js/components/ui/VirtualScroller.vue | 2 +- .../assets/js/components/ui/VolumeSlider.vue | 4 +- .../js/components/ui/YouTubeVideoItem.vue | 2 +- .../js/components/ui/YouTubeVideoList.vue | 2 +- .../AlbumArtOverlay.spec.ts.snap | 12 +- .../ui/__snapshots__/Btn.spec.ts.snap | 2 +- .../ui/__snapshots__/BtnGroup.spec.ts.snap | 2 +- .../ui/__snapshots__/LyricsPane.spec.ts.snap | 2 +- .../ui/__snapshots__/Magnifier.spec.ts.snap | 2 +- .../__snapshots__/VolumeSlider.spec.ts.snap | 6 +- .../ui/skeletons/ArtistAlbumCardSkeleton.vue | 2 +- .../ui/skeletons/GenreItemSkeleton.vue | 2 +- .../PlaylistCollaboratorListSkeleton.vue | 2 +- .../ui/skeletons/ScreenHeaderSkeleton.vue | 2 +- .../ui/skeletons/SongCardSkeleton.vue | 2 +- .../ui/skeletons/SongListSkeleton.vue | 2 +- .../js/components/ui/upload/DropZone.vue | 2 +- .../js/components/ui/upload/UploadItem.vue | 2 +- .../__snapshots__/UploadItem.spec.ts.snap | 2 +- .../assets/js/components/user/AddUserForm.vue | 2 +- .../js/components/user/EditUserForm.vue | 2 +- .../js/components/user/InviteUserForm.vue | 2 +- .../assets/js/components/user/UserAvatar.vue | 2 +- .../js/components/user/UserBadge.spec.ts | 27 - .../assets/js/components/user/UserBadge.vue | 73 -- .../assets/js/components/user/UserCard.vue | 2 +- .../js/components/utils/ImageCropper.vue | 2 +- resources/assets/js/remote/App.vue | 8 +- resources/assets/js/remote/app.ts | 1 + resources/assets/sass/app.scss | 15 - resources/assets/sass/remote.scss | 8 - resources/assets/sass/vendor/_plyr.scss | 736 ------------------ resources/assets/sass/vendor/_reset.scss | 1 - vite.config.js | 8 - yarn.lock | 165 ++-- 169 files changed, 1005 insertions(+), 1245 deletions(-) create mode 100644 postcss.config.cjs rename resources/assets/{sass/partials/_mixins.scss => css/app.pcss} (82%) rename resources/assets/{sass/partials/_hacks.scss => css/partials/hack.pcss} (100%) rename resources/assets/{sass/partials/_shared.scss => css/partials/shared.pcss} (98%) rename resources/assets/{sass/partials/_skeleton.scss => css/partials/skeleton.pcss} (82%) rename resources/assets/{sass/partials/_tooltip.scss => css/partials/tooltip.pcss} (100%) rename resources/assets/{sass/partials/_vars.scss => css/partials/vars.pcss} (100%) create mode 100644 resources/assets/css/remote.pcss rename resources/assets/{sass/vendor/_alertify.scss => css/vendor/alertify.pcss} (100%) rename resources/assets/{sass/vendor/_nprogress.scss => css/vendor/nprogress.pcss} (100%) create mode 100644 resources/assets/css/vendor/plyr.pcss create mode 100644 resources/assets/css/vendor/reset.pcss delete mode 100644 resources/assets/js/components/user/UserBadge.spec.ts delete mode 100644 resources/assets/js/components/user/UserBadge.vue delete mode 100644 resources/assets/sass/app.scss delete mode 100644 resources/assets/sass/remote.scss delete mode 100644 resources/assets/sass/vendor/_plyr.scss delete mode 100644 resources/assets/sass/vendor/_reset.scss diff --git a/cypress/plugins/index.ts b/cypress/plugins/index.ts index 9e26b947..65f94113 100644 --- a/cypress/plugins/index.ts +++ b/cypress/plugins/index.ts @@ -11,6 +11,6 @@ export default (on: () => void, config: Record): Record => { return Object.assign({}, config, { - supportFile: 'cypress/support/index.ts' + supportFile: 'cypress/support/main.ts' }) } diff --git a/docs/.vitepress/components/CaptionedImage.vue b/docs/.vitepress/components/CaptionedImage.vue index 9a098a37..cb341e3d 100644 --- a/docs/.vitepress/components/CaptionedImage.vue +++ b/docs/.vitepress/components/CaptionedImage.vue @@ -13,7 +13,7 @@ defineOptions({ - diff --git a/resources/assets/js/components/album/AlbumTrackList.vue b/resources/assets/js/components/album/AlbumTrackList.vue index f4e60415..194d22cc 100644 --- a/resources/assets/js/components/album/AlbumTrackList.vue +++ b/resources/assets/js/components/album/AlbumTrackList.vue @@ -1,13 +1,13 @@ - diff --git a/resources/assets/js/components/koel-plus/KoelPlusModal.vue b/resources/assets/js/components/koel-plus/KoelPlusModal.vue index f184d536..c89d5970 100644 --- a/resources/assets/js/components/koel-plus/KoelPlusModal.vue +++ b/resources/assets/js/components/koel-plus/KoelPlusModal.vue @@ -55,7 +55,7 @@ const hideActivateLicenseForm = () => (showingActivateLicenseForm.value = false) onMounted(() => window.createLemonSqueezy?.()) - diff --git a/resources/assets/js/components/layout/main-wrapper/sidebar/PlaylistFolderSidebarItem.vue b/resources/assets/js/components/layout/main-wrapper/sidebar/PlaylistFolderSidebarItem.vue index 89a47663..f4e59884 100644 --- a/resources/assets/js/components/layout/main-wrapper/sidebar/PlaylistFolderSidebarItem.vue +++ b/resources/assets/js/components/layout/main-wrapper/sidebar/PlaylistFolderSidebarItem.vue @@ -107,7 +107,7 @@ const onContextMenu = (event: MouseEvent) => eventBus.emit( ) - diff --git a/resources/assets/js/components/profile-preferences/ThemeCard.vue b/resources/assets/js/components/profile-preferences/ThemeCard.vue index 846f9916..80179c3a 100644 --- a/resources/assets/js/components/profile-preferences/ThemeCard.vue +++ b/resources/assets/js/components/profile-preferences/ThemeCard.vue @@ -31,7 +31,7 @@ if (theme.value.thumbnailUrl) { } - -` diff --git a/resources/assets/js/components/screens/AlbumScreen.vue b/resources/assets/js/components/screens/AlbumScreen.vue index 841c384e..b299b4b2 100644 --- a/resources/assets/js/components/screens/AlbumScreen.vue +++ b/resources/assets/js/components/screens/AlbumScreen.vue @@ -1,5 +1,5 @@