Merge pull request 'develop' (#364) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/364
This commit is contained in:
@@ -7,16 +7,18 @@ when:
|
|||||||
branch: [master, develop, feature/*, fix/*, bugfix/*, translations]
|
branch: [master, develop, feature/*, fix/*, bugfix/*, translations]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
"Install dependencies":
|
# "Install dependencies":
|
||||||
image: node:16
|
# image: node:20
|
||||||
pull: true
|
# pull: true
|
||||||
commands:
|
# commands:
|
||||||
- npm i
|
# - npm i
|
||||||
|
|
||||||
"Build JS":
|
"Build JS":
|
||||||
image: node:16
|
image: node:20
|
||||||
commands:
|
commands:
|
||||||
- npm run build
|
- make dep
|
||||||
|
- ls -l node_modules/@nextcloud/vue/dist/Components
|
||||||
|
- make build
|
||||||
|
|
||||||
"Build translations":
|
"Build translations":
|
||||||
image: deblan/php:8.3
|
image: deblan/php:8.3
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
"@nextcloud/event-bus": "^3.3.1",
|
"@nextcloud/event-bus": "^3.3.1",
|
||||||
"@nextcloud/initial-state": "^2.2.0",
|
"@nextcloud/initial-state": "^2.2.0",
|
||||||
"@nextcloud/l10n": "^3.1.0",
|
"@nextcloud/l10n": "^3.1.0",
|
||||||
|
"@nextcloud/vue": "^8.19.0",
|
||||||
"@vueuse/core": "^11.1.0",
|
"@vueuse/core": "^11.1.0",
|
||||||
"axios": "^1.6.7",
|
"axios": "^1.6.7",
|
||||||
"trim": "^1.0.1"
|
"trim": "^1.0.1"
|
||||||
|
|||||||
@@ -84,9 +84,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NcModal from '@nextcloud/vue/dist/Components/NcModal'
|
import NcModal from '@nextcloud/vue/dist/Components/NcModal.js'
|
||||||
import NcActions from '@nextcloud/vue/dist/Components/NcActions'
|
import NcActions from '@nextcloud/vue/dist/Components/NcActions.js'
|
||||||
import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton'
|
import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AdminCategoriesCustom',
|
name: 'AdminCategoriesCustom',
|
||||||
|
|||||||
+7
-12
@@ -70,9 +70,7 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import type { INavigationEntry } from '../types/navigation'
|
|
||||||
|
|
||||||
import { subscribe, unsubscribe } from '@nextcloud/event-bus'
|
import { subscribe, unsubscribe } from '@nextcloud/event-bus'
|
||||||
import { loadState } from '@nextcloud/initial-state'
|
import { loadState } from '@nextcloud/initial-state'
|
||||||
import { n, t } from '@nextcloud/l10n'
|
import { n, t } from '@nextcloud/l10n'
|
||||||
@@ -80,7 +78,6 @@ import { useElementSize } from '@vueuse/core'
|
|||||||
import { defineComponent, ref } from 'vue'
|
import { defineComponent, ref } from 'vue'
|
||||||
import axios from '@nextcloud/axios'
|
import axios from '@nextcloud/axios'
|
||||||
import { generateOcsUrl } from '@nextcloud/router'
|
import { generateOcsUrl } from '@nextcloud/router'
|
||||||
|
|
||||||
import NcActions from '@nextcloud/vue/dist/Components/NcActions.js'
|
import NcActions from '@nextcloud/vue/dist/Components/NcActions.js'
|
||||||
import NcActionLink from '@nextcloud/vue/dist/Components/NcActionLink.js'
|
import NcActionLink from '@nextcloud/vue/dist/Components/NcActionLink.js'
|
||||||
|
|
||||||
@@ -88,7 +85,8 @@ export default defineComponent({
|
|||||||
name: 'AppMenu',
|
name: 'AppMenu',
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
NcActions, NcActionLink,
|
NcActions,
|
||||||
|
NcActionLink,
|
||||||
},
|
},
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
@@ -111,7 +109,8 @@ export default defineComponent({
|
|||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
axios.get(generateOcsUrl('core/navigation', 2) + '/apps?format=json')
|
axios.get(generateOcsUrl('core/navigation', 2) + '/apps?format=json')
|
||||||
.then(({ data }) => {
|
.then((response) => response.data)
|
||||||
|
.then((data) => {
|
||||||
if (data.ocs.meta.statuscode !== 200) {
|
if (data.ocs.meta.statuscode !== 200) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -128,10 +127,6 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
|
||||||
unsubscribe('nextcloud:app-menu.refresh', this.setApps)
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
update() {
|
update() {
|
||||||
++this.state
|
++this.state
|
||||||
@@ -156,7 +151,7 @@ export default defineComponent({
|
|||||||
return maxApps
|
return maxApps
|
||||||
},
|
},
|
||||||
|
|
||||||
setNavigationCounter(id: string, counter: number) {
|
setNavigationCounter(id, counter) {
|
||||||
const app = this.appList.find(({ app }) => app === id)
|
const app = this.appList.find(({ app }) => app === id)
|
||||||
if (app) {
|
if (app) {
|
||||||
this.$set(app, 'unread', counter)
|
this.$set(app, 'unread', counter)
|
||||||
@@ -187,7 +182,7 @@ export default defineComponent({
|
|||||||
return app.name
|
return app.name
|
||||||
+ (app.active ? ' (' + t('core', 'Currently open') + ')' : '')
|
+ (app.active ? ' (' + t('core', 'Currently open') + ')' : '')
|
||||||
+ (app.unread > 0 ? ' (' + n('core', '{count} notification', '{count} notifications', app.unread, { count: app.unread }) + ')' : '')
|
+ (app.unread > 0 ? ' (' + n('core', '{count} notification', '{count} notifications', app.unread, { count: app.unread }) + ')' : '')
|
||||||
}
|
},
|
||||||
|
|
||||||
makeStyle(app) {
|
makeStyle(app) {
|
||||||
if (app.order !== null) {
|
if (app.order !== null) {
|
||||||
|
|||||||
+2
-2
@@ -14,8 +14,8 @@ module.exports = {
|
|||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, './js'),
|
path: path.resolve(__dirname, './js'),
|
||||||
publicPath: '/js',
|
publicPath: '/js',
|
||||||
filename: '[name].js?v=[hash]',
|
filename: '[name].js?v=[chunkhash]',
|
||||||
chunkFilename: 'chunks/[name]-[hash].js',
|
chunkFilename: 'chunks/[name]-[chunkhash].js',
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [{
|
rules: [{
|
||||||
|
|||||||
Reference in New Issue
Block a user