mirror of
https://gitnet.fr/deblan/side_menu.git
synced 2025-12-18 05:10:50 +01:00
fix build: remove ts, replace hash with chunkhash on webpack conf
This commit is contained in:
parent
894e4408f9
commit
6ea1a4e6c6
4 changed files with 16 additions and 20 deletions
|
|
@ -7,16 +7,16 @@ when:
|
|||
branch: [master, develop, feature/*, fix/*, bugfix/*, translations]
|
||||
|
||||
steps:
|
||||
# "Install dependencies":
|
||||
# image: node:20
|
||||
# pull: true
|
||||
# commands:
|
||||
# - npm i
|
||||
"Install dependencies":
|
||||
image: node:20
|
||||
pull: true
|
||||
commands:
|
||||
- npm i
|
||||
|
||||
"Build JS":
|
||||
image: node:20
|
||||
commands:
|
||||
- make build
|
||||
- npm run build
|
||||
|
||||
"Build translations":
|
||||
image: deblan/php:8.3
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
"@nextcloud/event-bus": "^3.3.1",
|
||||
"@nextcloud/initial-state": "^2.2.0",
|
||||
"@nextcloud/l10n": "^3.1.0",
|
||||
"@nextcloud/vue": "^8.19.0",
|
||||
"@vueuse/core": "^11.1.0",
|
||||
"axios": "^1.6.7",
|
||||
"trim": "^1.0.1"
|
||||
|
|
|
|||
|
|
@ -70,9 +70,7 @@
|
|||
</nav>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import type { INavigationEntry } from '../types/navigation'
|
||||
|
||||
<script>
|
||||
import { subscribe, unsubscribe } from '@nextcloud/event-bus'
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
import { n, t } from '@nextcloud/l10n'
|
||||
|
|
@ -80,7 +78,6 @@ import { useElementSize } from '@vueuse/core'
|
|||
import { defineComponent, ref } from 'vue'
|
||||
import axios from '@nextcloud/axios'
|
||||
import { generateOcsUrl } from '@nextcloud/router'
|
||||
|
||||
import NcActions from '@nextcloud/vue/dist/Components/NcActions.js'
|
||||
import NcActionLink from '@nextcloud/vue/dist/Components/NcActionLink.js'
|
||||
|
||||
|
|
@ -88,7 +85,8 @@ export default defineComponent({
|
|||
name: 'AppMenu',
|
||||
|
||||
components: {
|
||||
NcActions, NcActionLink,
|
||||
NcActions,
|
||||
NcActionLink,
|
||||
},
|
||||
|
||||
setup() {
|
||||
|
|
@ -111,7 +109,8 @@ export default defineComponent({
|
|||
|
||||
mounted() {
|
||||
axios.get(generateOcsUrl('core/navigation', 2) + '/apps?format=json')
|
||||
.then(({ data }) => {
|
||||
.then((response) => response.data)
|
||||
.then((data) => {
|
||||
if (data.ocs.meta.statuscode !== 200) {
|
||||
return
|
||||
}
|
||||
|
|
@ -128,10 +127,6 @@ export default defineComponent({
|
|||
})
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
unsubscribe('nextcloud:app-menu.refresh', this.setApps)
|
||||
},
|
||||
|
||||
methods: {
|
||||
update() {
|
||||
++this.state
|
||||
|
|
@ -156,7 +151,7 @@ export default defineComponent({
|
|||
return maxApps
|
||||
},
|
||||
|
||||
setNavigationCounter(id: string, counter: number) {
|
||||
setNavigationCounter(id, counter) {
|
||||
const app = this.appList.find(({ app }) => app === id)
|
||||
if (app) {
|
||||
this.$set(app, 'unread', counter)
|
||||
|
|
@ -187,7 +182,7 @@ export default defineComponent({
|
|||
return app.name
|
||||
+ (app.active ? ' (' + t('core', 'Currently open') + ')' : '')
|
||||
+ (app.unread > 0 ? ' (' + n('core', '{count} notification', '{count} notifications', app.unread, { count: app.unread }) + ')' : '')
|
||||
}
|
||||
},
|
||||
|
||||
makeStyle(app) {
|
||||
if (app.order !== null) {
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ module.exports = {
|
|||
output: {
|
||||
path: path.resolve(__dirname, './js'),
|
||||
publicPath: '/js',
|
||||
filename: '[name].js?v=[hash]',
|
||||
chunkFilename: 'chunks/[name]-[hash].js',
|
||||
filename: '[name].js?v=[chunkhash]',
|
||||
chunkFilename: 'chunks/[name]-[chunkhash].js',
|
||||
},
|
||||
module: {
|
||||
rules: [{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue