diff --git a/package.json b/package.json index c8311e51..45d95d58 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "@babel/polyfill": "^7.8.7", "@babel/preset-env": "^7.9.6", "@faker-js/faker": "^6.2.0", + "@floating-ui/dom": "^1.0.3", "@testing-library/cypress": "^8.0.2", "@testing-library/vue": "^6.5.1", "@types/axios": "^0.14.0", diff --git a/resources/assets/js/__tests__/UnitTestCase.ts b/resources/assets/js/__tests__/UnitTestCase.ts index de8e275d..81b511d3 100644 --- a/resources/assets/js/__tests__/UnitTestCase.ts +++ b/resources/assets/js/__tests__/UnitTestCase.ts @@ -2,7 +2,6 @@ import isMobile from 'ismobilejs' import { isObject, mergeWith } from 'lodash' import { cleanup, render, RenderOptions } from '@testing-library/vue' import { afterEach, beforeEach, vi } from 'vitest' -import { clickaway, focus } from '@/directives' import { defineComponent, nextTick } from 'vue' import { commonStore, userStore } from '@/stores' import { http } from '@/services' @@ -87,8 +86,9 @@ export default abstract class UnitTestCase { return render(component, deepMerge({ global: { directives: { - 'koel-clickaway': clickaway, - 'koel-focus': focus + 'koel-clickaway': {}, + 'koel-focus': {}, + 'koel-tooltip': {} }, components: { icon: this.stub('icon') diff --git a/resources/assets/js/app.ts b/resources/assets/js/app.ts index 34048ba6..2e31c90a 100644 --- a/resources/assets/js/app.ts +++ b/resources/assets/js/app.ts @@ -1,5 +1,5 @@ import { createApp } from 'vue' -import { clickaway, focus } from '@/directives' +import { clickaway, focus, tooltip } from '@/directives' import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome' import { RouterKey } from '@/symbols' import { routes } from '@/config' @@ -11,6 +11,7 @@ createApp(App) .component('icon', FontAwesomeIcon) .directive('koel-focus', focus) .directive('koel-clickaway', clickaway) + .directive('koel-tooltip', tooltip) /** * For Ancelot, the ancient cross of war * for the holy town of Gods diff --git a/resources/assets/js/components/layout/app-footer/FooterExtraControls.vue b/resources/assets/js/components/layout/app-footer/FooterExtraControls.vue index aa8cdf46..bf84da97 100644 --- a/resources/assets/js/components/layout/app-footer/FooterExtraControls.vue +++ b/resources/assets/js/components/layout/app-footer/FooterExtraControls.vue @@ -5,9 +5,10 @@ +
diff --git a/resources/assets/js/components/layout/app-footer/__snapshots__/FooterPlaybackControls.spec.ts.snap b/resources/assets/js/components/layout/app-footer/__snapshots__/FooterPlaybackControls.spec.ts.snap index 9ffb8f64..ec22a71c 100644 --- a/resources/assets/js/components/layout/app-footer/__snapshots__/FooterPlaybackControls.spec.ts.snap +++ b/resources/assets/js/components/layout/app-footer/__snapshots__/FooterPlaybackControls.spec.ts.snap @@ -2,7 +2,7 @@ exports[`renders with a current song 1`] = `
-




- - diff --git a/resources/assets/js/components/playlist/smart-playlist/CreateSmartPlaylistForm.vue b/resources/assets/js/components/playlist/smart-playlist/CreateSmartPlaylistForm.vue index 505613ff..544fbb7a 100644 --- a/resources/assets/js/components/playlist/smart-playlist/CreateSmartPlaylistForm.vue +++ b/resources/assets/js/components/playlist/smart-playlist/CreateSmartPlaylistForm.vue @@ -20,7 +20,7 @@ :isFirstGroup="index === 0" @input="onGroupChanged" /> - + Group diff --git a/resources/assets/js/components/playlist/smart-playlist/EditSmartPlaylistForm.vue b/resources/assets/js/components/playlist/smart-playlist/EditSmartPlaylistForm.vue index 15f8ac40..95f296a7 100644 --- a/resources/assets/js/components/playlist/smart-playlist/EditSmartPlaylistForm.vue +++ b/resources/assets/js/components/playlist/smart-playlist/EditSmartPlaylistForm.vue @@ -26,7 +26,7 @@ :isFirstGroup="index === 0" @input="onGroupChanged" /> - +
diff --git a/resources/assets/js/components/playlist/smart-playlist/SmartPlaylistRule.vue b/resources/assets/js/components/playlist/smart-playlist/SmartPlaylistRule.vue index 535a1887..106165f0 100644 --- a/resources/assets/js/components/playlist/smart-playlist/SmartPlaylistRule.vue +++ b/resources/assets/js/components/playlist/smart-playlist/SmartPlaylistRule.vue @@ -1,6 +1,6 @@ diff --git a/resources/assets/js/components/ui/RepeatModeSwitch.vue b/resources/assets/js/components/ui/RepeatModeSwitch.vue index 9edfb672..e6b455d1 100644 --- a/resources/assets/js/components/ui/RepeatModeSwitch.vue +++ b/resources/assets/js/components/ui/RepeatModeSwitch.vue @@ -1,7 +1,8 @@