build: 💄 use toastify instead of dialogs
This commit is contained in:
parent
6456ccc3d0
commit
04ed6b101a
1557
package-lock.json
generated
1557
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -17,7 +17,6 @@
|
||||
"prettier": "@nextcloud/prettier-config",
|
||||
"dependencies": {
|
||||
"@nextcloud/axios": "^2.5.0",
|
||||
"@nextcloud/dialogs": "github:nextcloud-libraries/nextcloud-dialogs#vue3",
|
||||
"@nextcloud/initial-state": "^2.2.0",
|
||||
"@nextcloud/l10n": "^3.1.0",
|
||||
"@nextcloud/router": "^3.0.1",
|
||||
@ -26,6 +25,7 @@
|
||||
"dompurify": "^3.1.6",
|
||||
"linkify-html": "^4.1.3",
|
||||
"pinia": "^2.2.1",
|
||||
"toastify-js": "^1.12.0",
|
||||
"vue": "^3.4.37",
|
||||
"vue-material-design-icons": "^5.3.0",
|
||||
"vue-router": "^4.4.3"
|
||||
|
@ -8,7 +8,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import '@nextcloud/dialogs/style.css'
|
||||
import 'toastify-js/src/toastify.css'
|
||||
import Bar from './components/Player/Bar.vue'
|
||||
import GPodder from './views/GPodder.vue'
|
||||
import { NcContent } from '@nextcloud/vue'
|
||||
|
@ -42,7 +42,7 @@ import axios from '@nextcloud/axios'
|
||||
import { debounce } from '../../utils/debounce.js'
|
||||
import { formatLocaleDate } from '../../utils/time.js'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import { showError } from '@nextcloud/dialogs'
|
||||
import { showError } from '../../utils/toast.js'
|
||||
import { toUrl } from '../../utils/url.js'
|
||||
|
||||
export default {
|
||||
|
@ -16,7 +16,7 @@
|
||||
import Loading from '../Atoms/Loading.vue'
|
||||
import axios from '@nextcloud/axios'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import { showError } from '@nextcloud/dialogs'
|
||||
import { showError } from '../../utils/toast.js'
|
||||
import { toUrl } from '../../utils/url.js'
|
||||
|
||||
export default {
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
<script>
|
||||
import { NcAppNavigationNew, NcAvatar } from '@nextcloud/vue'
|
||||
import { showError, showSuccess } from '@nextcloud/dialogs'
|
||||
import { showError, showSuccess } from '../../utils/toast.js'
|
||||
import PlusIcon from 'vue-material-design-icons/Plus.vue'
|
||||
import RssIcon from 'vue-material-design-icons/Rss.vue'
|
||||
import SafeHtml from '../Atoms/SafeHtml.vue'
|
||||
|
@ -134,7 +134,7 @@ import StopIcon from 'vue-material-design-icons/Stop.vue'
|
||||
import axios from '@nextcloud/axios'
|
||||
import { decodeUrl } from '../../utils/url.js'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import { showError } from '@nextcloud/dialogs'
|
||||
import { showError } from '../../utils/toast.js'
|
||||
|
||||
export default {
|
||||
name: 'Episodes',
|
||||
|
@ -31,7 +31,7 @@ import AlertIcon from 'vue-material-design-icons/Alert.vue'
|
||||
import DeleteIcon from 'vue-material-design-icons/Delete.vue'
|
||||
import axios from '@nextcloud/axios'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import { showError } from '@nextcloud/dialogs'
|
||||
import { showError } from '../../utils/toast.js'
|
||||
import { toUrl } from '../../utils/url.js'
|
||||
|
||||
export default {
|
||||
|
@ -35,7 +35,7 @@ import Item from './Item.vue'
|
||||
import Loading from '../Atoms/Loading.vue'
|
||||
import PlusIcon from 'vue-material-design-icons/Plus.vue'
|
||||
import Settings from '../Settings/Settings.vue'
|
||||
import { showError } from '@nextcloud/dialogs'
|
||||
import { showError } from '../../utils/toast.js'
|
||||
|
||||
export default {
|
||||
name: 'Subscriptions',
|
||||
|
@ -9,5 +9,4 @@ const Vue = createApp(App)
|
||||
Vue.mixin({ methods: { t, n } })
|
||||
Vue.use(router)
|
||||
Vue.use(store)
|
||||
|
||||
Vue.mount('#content')
|
||||
|
15
src/utils/toast.js
Normal file
15
src/utils/toast.js
Normal file
@ -0,0 +1,15 @@
|
||||
import toastify from 'toastify-js'
|
||||
|
||||
export const showMessage = (text, backgroundColor) =>
|
||||
toastify({
|
||||
text,
|
||||
backgroundColor,
|
||||
})
|
||||
|
||||
export const showError = (text) => showMessage(text, '--color-error')
|
||||
|
||||
export const showWarning = (text) => showMessage(text, '--color-warning')
|
||||
|
||||
export const showInfo = (text) => showMessage(text, '--color-primary')
|
||||
|
||||
export const showSuccess = (text) => showMessage(text, '--color-success')
|
Loading…
Reference in New Issue
Block a user