Migrate to vue3 (fix #126) #127

Merged
Xefir merged 32 commits from vue3 into main 2024-08-17 12:24:28 +00:00
11 changed files with 151 additions and 1438 deletions
Showing only changes of commit 04ed6b101a - Show all commits

1557
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -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"

View File

@ -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'

View File

@ -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 {

View File

@ -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 {

View File

@ -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'

View File

@ -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',

View File

@ -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 {

View File

@ -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',

View File

@ -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
View 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')