summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonas Sulzer <jonas@violoncello.ch>2019-11-05 16:41:02 +0100
committerMaxence Lange <maxence@artificial-owl.com>2020-06-19 13:47:03 -0100
commite4194be71bbfc6e1f99f87ed50bf652f318be0b1 (patch)
tree9dff792d96180ad7ed5312555070465c6042b05b /src
parentfd224527545bcbd01fc219c3f7acf1a39e379c17 (diff)
👌 IMPROVE: update nextcloud npm dependencies to the new @nextcloud namespace versions && update the AppNavigation to the work with the new component
Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>
Diffstat (limited to 'src')
-rw-r--r--src/App.vue57
-rw-r--r--src/components/ActorAvatar.vue2
-rw-r--r--src/components/Composer.vue6
-rw-r--r--src/components/PostAttachment.vue2
-rw-r--r--src/components/ProfileInfo.vue2
-rw-r--r--src/components/Search.vue2
-rw-r--r--src/components/TimelinePost.vue2
-rw-r--r--src/components/UserEntry.vue2
-rw-r--r--src/logger.js4
-rw-r--r--src/main.js2
-rw-r--r--src/mixins/follow.js2
-rw-r--r--src/mixins/popoverMenu.js2
-rw-r--r--src/store/account.js2
-rw-r--r--src/store/timeline.js2
-rw-r--r--src/views/OStatus.vue4
15 files changed, 44 insertions, 49 deletions
diff --git a/src/App.vue b/src/App.vue
index 8f9fa008..ead2d496 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,10 +1,10 @@
<template>
<div v-if="!serverData.setup" id="app-social" :class="{public: serverData.public}">
- <div v-if="!serverData.public" id="app-navigation">
- <ul>
- <app-navigation-item v-for="item in menu.items" :key="item.key" :item="item" />
+ <app-navigation v-if="!serverData.public" id="app-navigation">
+ <ul id="app-social-navigation">
+ <app-navigation-item v-for="item in menu.items" :key="item.key" :to="item.to" :title="item.title" :icon="item.icon" :exact="true" />
</ul>
- </div>
+ </app-navigation>
<div id="app-content">
<div v-if="serverData.isAdmin && !serverData.checks.success" class="setup social__wrapper">
<h3 v-if="!serverData.checks.checks.wellknown">
@@ -91,14 +91,16 @@
</style>
<script>
-import AppNavigationItem from 'nextcloud-vue/dist/Components/AppNavigationItem'
-import axios from 'nextcloud-axios'
+import { AppNavigation } from '@nextcloud/vue/dist/Components/AppNavigation'
+import { AppNavigationItem } from '@nextcloud/vue/dist/Components/AppNavigationItem'
+import axios from '@nextcloud/axios'
import Search from './components/Search.vue'
import currentuserMixin from './mixins/currentUserMixin'
export default {
name: 'App',
components: {
+ AppNavigation,
AppNavigationItem,
Search
},
@@ -119,69 +121,62 @@ export default {
let defaultCategories = [
{
id: 'social-timeline',
- classes: [],
icon: 'icon-home',
- text: t('social', 'Home'),
- router: {
+ title: t('social', 'Home'),
+ to: {
name: 'timeline'
}
},
{
id: 'social-direct-messages',
- classes: [],
- router: {
+ icon: 'icon-comment',
+ title: t('social', 'Direct messages'),
+ to: {
name: 'timeline',
params: { type: 'direct' }
- },
- icon: 'icon-comment',
- text: t('social', 'Direct messages')
+ }
},
{
id: 'social-notifications',
- classes: [],
- router: {
+ icon: 'icon-notifications',
+ title: t('social', 'Notifications'),
+ to: {
name: 'timeline',
params: { type: 'notifications' }
- },
- icon: 'icon-notifications',
- text: t('social', 'Notifications')
+ }
},
{
id: 'social-account',
- classes: [],
icon: 'icon-user',
- text: t('social', 'Profile'),
- router: {
+ title: t('social', 'Profile'),
+ to: {
name: 'profile',
params: { account: this.currentUser.uid }
}
},
{
id: 'social-liked',
- classes: [],
icon: 'icon-favorite',
- text: t('social', 'Liked'),
- router: {
+ title: t('social', 'Liked'),
+ to: {
name: 'timeline',
params: { type: 'liked' }
}
},
{
id: 'social-local',
- classes: [],
icon: 'icon-category-monitoring',
- text: t('social', 'Local timeline'),
- router: {
+ title: t('social', 'Local timeline'),
+ to: {
name: 'timeline',
params: { type: 'timeline' }
}
},
{
id: 'social-global',
- classes: [],
icon: 'icon-link',
- text: t('social', 'Global timeline'),
- router: {
+ title: t('social', 'Global timeline'),
+ to: {
name: 'timeline',
params: { type: 'federated' }
}
diff --git a/src/components/ActorAvatar.vue b/src/components/ActorAvatar.vue
index 6f6dac39..d45954dd 100644
--- a/src/components/ActorAvatar.vue
+++ b/src/components/ActorAvatar.vue
@@ -28,7 +28,7 @@
</template>
<script>
-import Avatar from 'nextcloud-vue/dist/Components/Avatar'
+import Avatar from '@nextcloud/vue/dist/Components/Avatar'
export default {
name: 'ActorAvatar',
diff --git a/src/components/Composer.vue b/src/components/Composer.vue
index e34f2d37..d9b9cf3c 100644
--- a/src/components/Composer.vue
+++ b/src/components/Composer.vue
@@ -388,14 +388,14 @@
</style>
<script>
-import Avatar from 'nextcloud-vue/dist/Components/Avatar'
-import PopoverMenu from 'nextcloud-vue/dist/Components/PopoverMenu'
+import Avatar from '@nextcloud/vue/dist/Components/Avatar'
+import PopoverMenu from '@nextcloud/vue/dist/Components/PopoverMenu'
import EmojiPicker from 'vue-emoji-picker'
import VueTribute from 'vue-tribute'
import he from 'he'
import CurrentUserMixin from './../mixins/currentUserMixin'
import FocusOnCreate from '../directives/focusOnCreate'
-import axios from 'nextcloud-axios'
+import axios from '@nextcloud/axios'
import ActorAvatar from './ActorAvatar.vue'
export default {
diff --git a/src/components/PostAttachment.vue b/src/components/PostAttachment.vue
index 471f6e69..bd6cbb27 100644
--- a/src/components/PostAttachment.vue
+++ b/src/components/PostAttachment.vue
@@ -15,7 +15,7 @@
<script>
-import Modal from 'nextcloud-vue/dist/Components/Modal'
+import Modal from '@nextcloud/vue/dist/Components/Modal'
export default {
name: 'PostAttachment',
diff --git a/src/components/ProfileInfo.vue b/src/components/ProfileInfo.vue
index 467f7213..e51b2409 100644
--- a/src/components/ProfileInfo.vue
+++ b/src/components/ProfileInfo.vue
@@ -96,7 +96,7 @@
}
</style>
<script>
-import Avatar from 'nextcloud-vue/dist/Components/Avatar'
+import Avatar from '@nextcloud/vue/dist/Components/Avatar'
import serverData from '../mixins/serverData'
import currentUser from '../mixins/currentUserMixin'
import follow from '../mixins/follow'
diff --git a/src/components/Search.vue b/src/components/Search.vue
index 113fbf1e..060880e6 100644
--- a/src/components/Search.vue
+++ b/src/components/Search.vue
@@ -79,7 +79,7 @@
<script>
import UserEntry from './UserEntry.vue'
-import axios from 'nextcloud-axios'
+import axios from '@nextcloud/axios'
import Trend from 'vuetrend'
export default {
diff --git a/src/components/TimelinePost.vue b/src/components/TimelinePost.vue
index d70a8f20..f3c24164 100644
--- a/src/components/TimelinePost.vue
+++ b/src/components/TimelinePost.vue
@@ -55,7 +55,7 @@
</template>
<script>
-import Avatar from 'nextcloud-vue/dist/Components/Avatar'
+import Avatar from '@nextcloud/vue/dist/Components/Avatar'
import * as linkify from 'linkifyjs'
import pluginMention from 'linkifyjs/plugins/mention'
import 'linkifyjs/string'
diff --git a/src/components/UserEntry.vue b/src/components/UserEntry.vue
index d0210751..1bb3c95e 100644
--- a/src/components/UserEntry.vue
+++ b/src/components/UserEntry.vue
@@ -55,7 +55,7 @@
</template>
<script>
-import Avatar from 'nextcloud-vue/dist/Components/Avatar'
+import Avatar from '@nextcloud/vue/dist/Components/Avatar'
import follow from '../mixins/follow'
import currentUser from '../mixins/currentUserMixin'
import FollowButton from './FollowButton.vue'
diff --git a/src/logger.js b/src/logger.js
index 3b159426..710ad369 100644
--- a/src/logger.js
+++ b/src/logger.js
@@ -19,8 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-import { getLoggerBuilder } from 'nextcloud-logger'
-import { getCurrentUser } from 'nextcloud-auth'
+import { getLoggerBuilder } from '@nextcloud/logger'
+import { getCurrentUser } from '@nextcloud/auth'
export default getLoggerBuilder()
.setApp('social')
diff --git a/src/main.js b/src/main.js
index 3787992f..273e84cd 100644
--- a/src/main.js
+++ b/src/main.js
@@ -29,7 +29,7 @@ import router from './router'
import vuetwemoji from 'vue-twemoji'
import contenteditableDirective from 'vue-contenteditable-directive'
import ClickOutside from 'vue-click-outside'
-import VTooltip from 'nextcloud-vue/dist/Directives/Tooltip'
+import VTooltip from '@nextcloud/vue/dist/Directives/Tooltip'
import VueMasonry from 'vue-masonry-css'
sync(store, router)
diff --git a/src/mixins/follow.js b/src/mixins/follow.js
index 43e5e541..608011fe 100644
--- a/src/mixins/follow.js
+++ b/src/mixins/follow.js
@@ -20,7 +20,7 @@
*
*/
-import axios from 'nextcloud-axios'
+import axios from '@nextcloud/axios'
class FollowException {
diff --git a/src/mixins/popoverMenu.js b/src/mixins/popoverMenu.js
index 3330cb91..b79df7b5 100644
--- a/src/mixins/popoverMenu.js
+++ b/src/mixins/popoverMenu.js
@@ -20,7 +20,7 @@
*
*/
-import PopoverMenu from 'nextcloud-vue/dist/Components/PopoverMenu'
+import PopoverMenu from '@nextcloud/vue/dist/Components/PopoverMenu'
export default {
components: {
diff --git a/src/store/account.js b/src/store/account.js
index 0c27f40e..2ece11e0 100644
--- a/src/store/account.js
+++ b/src/store/account.js
@@ -20,7 +20,7 @@
*
*/
-import axios from 'nextcloud-axios'
+import axios from '@nextcloud/axios'
import Vue from 'vue'
const state = {
diff --git a/src/store/timeline.js b/src/store/timeline.js
index a89b85b2..5275ea55 100644
--- a/src/store/timeline.js
+++ b/src/store/timeline.js
@@ -22,7 +22,7 @@
*/
import Logger from '../logger'
-import axios from 'nextcloud-axios'
+import axios from '@nextcloud/axios'
import Vue from 'vue'
const state = {
diff --git a/src/views/OStatus.vue b/src/views/OStatus.vue
index 6ec69eaf..d7724b2b 100644
--- a/src/views/OStatus.vue
+++ b/src/views/OStatus.vue
@@ -60,8 +60,8 @@
</style>
<script>
-import Avatar from 'nextcloud-vue/dist/Components/Avatar'
-import axios from 'nextcloud-axios'
+import Avatar from '@nextcloud/vue/dist/Components/Avatar'
+import axios from '@nextcloud/axios'
import currentuserMixin from './../mixins/currentUserMixin'
export default {