fix(ui): remove fomantic
This commit is contained in:
parent
54bbb355b1
commit
b726b27a7e
|
@ -17,8 +17,7 @@
|
|||
"test:unit": "vitest run --coverage",
|
||||
"test:generate-mock-server": "msw-auto-mock ../docs/schema.yml -o test/msw-server.ts --node",
|
||||
"lint": "eslint --cache --cache-strategy content --ext .ts,.js,.vue,.json,.html src test cypress public/embed.html",
|
||||
"lint:tsc": "vue-tsc --noEmit --incremental && tsc --noEmit --incremental -p cypress",
|
||||
"postinstall": "yarn run fix-fomantic-css"
|
||||
"lint:tsc": "vue-tsc --noEmit --incremental && tsc --noEmit --incremental -p cypress"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sentry/tracing": "7.47.0",
|
||||
|
@ -39,6 +38,7 @@
|
|||
"dompurify": "3.0.8",
|
||||
"focus-trap": "7.2.0",
|
||||
"idb-keyval": "6.2.1",
|
||||
"jquery": "3.7.1",
|
||||
"jsmediatags": "3.9.7",
|
||||
"lodash-es": "4.17.21",
|
||||
"lru-cache": "10.2.0",
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
import type { InitModule } from '~/types'
|
||||
|
||||
import { setupDropdown } from '~/utils/fomantic'
|
||||
|
||||
export const install: InitModule = ({ app, store }) => {
|
||||
app.directive('title', function (el, binding) {
|
||||
store.commit('ui/pageTitle', binding.value)
|
||||
})
|
||||
|
||||
app.directive('dropdown', (element) => setupDropdown(element))
|
||||
}
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
// import 'fomantic-ui-css/components/accordion.min.js'
|
||||
import 'fomantic-ui-css/components/api.min.js'
|
||||
import 'fomantic-ui-css/components/checkbox.min.js'
|
||||
// import 'fomantic-ui-css/components/colorize.min.js'
|
||||
import 'fomantic-ui-css/components/dimmer.min.js'
|
||||
import 'fomantic-ui-css/components/dropdown.min.js'
|
||||
// import 'fomantic-ui-css/components/embed.min.js'
|
||||
// import 'fomantic-ui-css/components/form.min.js'
|
||||
import 'fomantic-ui-css/components/modal.min.js'
|
||||
// import 'fomantic-ui-css/components/nag.min.js'
|
||||
// import 'fomantic-ui-css/components/popup.min.js'
|
||||
import 'fomantic-ui-css/components/progress.min.js'
|
||||
// import 'fomantic-ui-css/components/rating.min.js'
|
||||
import 'fomantic-ui-css/components/search.min.js'
|
||||
// import 'fomantic-ui-css/components/shape.min.js'
|
||||
// import 'fomantic-ui-css/components/sidebar.min.js'
|
||||
import 'fomantic-ui-css/components/site.min.js'
|
||||
import 'fomantic-ui-css/components/state.min.js'
|
||||
import 'fomantic-ui-css/components/sticky.min.js'
|
||||
// import 'fomantic-ui-css/components/tab.min.js'
|
||||
import 'fomantic-ui-css/components/toast.min.js'
|
||||
import 'fomantic-ui-css/components/transition.min.js'
|
||||
// import 'fomantic-ui-css/components/video.min.js'
|
||||
import 'fomantic-ui-css/components/visibility.min.js'
|
||||
// import 'fomantic-ui-css/components/visit.min.js'
|
|
@ -1,22 +0,0 @@
|
|||
/// <reference types="semantic-ui" />
|
||||
|
||||
import $ from 'jquery'
|
||||
|
||||
export const setupDropdown = (selector: string | HTMLElement = '.ui.dropdown', el: Element = document.body) => {
|
||||
const $dropdown = typeof selector === 'string'
|
||||
? $(el).find(selector)
|
||||
: $(selector)
|
||||
|
||||
$dropdown.dropdown({
|
||||
selectOnKeydown: false,
|
||||
action (text: unknown, value: unknown, $el: JQuery) {
|
||||
// used to ensure focusing the dropdown and clicking via keyboard
|
||||
// works as expected
|
||||
$el[0]?.click()
|
||||
|
||||
$dropdown.dropdown('hide')
|
||||
}
|
||||
})
|
||||
|
||||
return $dropdown
|
||||
}
|
|
@ -2151,14 +2151,6 @@
|
|||
resolved "https://registry.yarnpkg.com/@faker-js/faker/-/faker-8.4.1.tgz#5d5e8aee8fce48f5e189bf730ebd1f758f491451"
|
||||
integrity sha512-XQ3cU+Q8Uqmrbf2e0cIC/QN43sTBSC8KF12u29Mb47tWrt2hAgBXSgpZMj4Ao8Uk0iJcU99QsOCaIL8934obCg==
|
||||
|
||||
"@funkwhale/ui@https://dev.funkwhale.audio/funkwhale/ui.git#feature/layout":
|
||||
version "0.3.0"
|
||||
resolved "https://dev.funkwhale.audio/funkwhale/ui.git#ab7c0f650f353e37babc4a2d230490fe6c1dcbc4"
|
||||
dependencies:
|
||||
dompurify "^2.4.3 || ^3.0.0"
|
||||
showdown "^2.1.0"
|
||||
transliteration "^2.3.5"
|
||||
|
||||
"@humanwhocodes/config-array@^0.11.14":
|
||||
version "0.11.14"
|
||||
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b"
|
||||
|
@ -6186,11 +6178,6 @@ dompurify@3.0.8:
|
|||
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.0.8.tgz#e0021ab1b09184bc8af7e35c7dd9063f43a8a437"
|
||||
integrity sha512-b7uwreMYL2eZhrSCRC4ahLTeZcPZxSmYfmcQGXGkXiZSNW1X85v+SDM5KsWcpivIiUBH47Ji7NtyUdpLeF5JZQ==
|
||||
|
||||
"dompurify@^2.4.3 || ^3.0.0":
|
||||
version "3.1.7"
|
||||
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.1.7.tgz#711a8c96479fb6ced93453732c160c3c72418a6a"
|
||||
integrity sha512-VaTstWtsneJY8xzy7DekmYWEOZcmzIe3Qb3zPd4STve1OBTa+e+WmS1ITQec1fZYXI3HCsOZZiSMpG6oxoWMWQ==
|
||||
|
||||
domutils@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.1.0.tgz#c47f551278d3dc4b0b1ab8cbb42d751a6f0d824e"
|
||||
|
@ -7052,13 +7039,6 @@ follow-redirects@^1.15.6:
|
|||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b"
|
||||
integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==
|
||||
|
||||
fomantic-ui-css@2.9.3:
|
||||
version "2.9.3"
|
||||
resolved "https://registry.yarnpkg.com/fomantic-ui-css/-/fomantic-ui-css-2.9.3.tgz#5ee927654be50b77abfaff77bc0b6735e1d7a09c"
|
||||
integrity sha512-7bM6p3QRpfZFofg7Fd3crzox2E/nBsPyyWDN+N4lnTjNMxgKltSaXJTfhLoK5xBA+wEoNtcmm6w6FQ5Drj+27A==
|
||||
dependencies:
|
||||
jquery "^3.4.0"
|
||||
|
||||
for-each@^0.3.3:
|
||||
version "0.3.3"
|
||||
resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e"
|
||||
|
@ -7966,7 +7946,7 @@ jiti@^1.20.0:
|
|||
resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.0.tgz#7c97f8fe045724e136a397f7340475244156105d"
|
||||
integrity sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==
|
||||
|
||||
jquery@^3.4.0:
|
||||
jquery@3.7.1:
|
||||
version "3.7.1"
|
||||
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de"
|
||||
integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==
|
||||
|
@ -10006,7 +9986,7 @@ should@^13.2.1:
|
|||
should-type-adaptors "^1.0.1"
|
||||
should-util "^1.0.0"
|
||||
|
||||
showdown@2.1.0, showdown@^2.1.0:
|
||||
showdown@2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/showdown/-/showdown-2.1.0.tgz#1251f5ed8f773f0c0c7bfc8e6fd23581f9e545c5"
|
||||
integrity sha512-/6NVYu4U819R2pUIk79n67SYgJHWCce0a5xTP979WbNp0FL9MN1I1QK662IDU1b6JzKTvmhgI7T7JYIxBi3kMQ==
|
||||
|
@ -10617,7 +10597,7 @@ tr46@~0.0.3:
|
|||
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
|
||||
integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==
|
||||
|
||||
transliteration@2.3.5, transliteration@^2.3.5:
|
||||
transliteration@2.3.5:
|
||||
version "2.3.5"
|
||||
resolved "https://registry.yarnpkg.com/transliteration/-/transliteration-2.3.5.tgz#8f92309575f69e4a8a525dab4ff705ebcf961c45"
|
||||
integrity sha512-HAGI4Lq4Q9dZ3Utu2phaWgtm3vB6PkLUFqWAScg/UW+1eZ/Tg6Exo4oC0/3VUol/w4BlefLhUUSVBr/9/ZGQOw==
|
||||
|
|
Loading…
Reference in New Issue