Skip to content

Commit

Permalink
Dipendenze aggiornate. Menu mobile. Start_url. Corretti errori.
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard1984 committed Nov 2, 2018
1 parent cee8fcd commit e59d1b7
Show file tree
Hide file tree
Showing 8 changed files with 1,759 additions and 3,094 deletions.
4,746 changes: 1,722 additions & 3,024 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
"dependencies": {
"axios": "^0.18.0",
"compression-webpack-plugin": "^2.0.0",
"register-service-worker": "^1.5.2",
"socket.io-client": "^2.1.1",
"style-resources-loader": "^1.2.1",
Expand All @@ -25,10 +26,10 @@
"vuex": "^3.0.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.0.5",
"@vue/cli-plugin-eslint": "^3.0.5",
"@vue/cli-plugin-pwa": "^3.0.5",
"@vue/cli-service": "^3.0.5",
"@vue/cli-plugin-babel": "^3.1.0",
"@vue/cli-plugin-eslint": "^3.1.3",
"@vue/cli-plugin-pwa": "^3.1.0",
"@vue/cli-service": "^3.1.1",
"@vue/eslint-config-standard": "^3.0.5",
"node-sass": "^4.9.4",
"sass-loader": "^7.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/menuHeader.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<header class="menu-header u-noselect">
<img src="logo/itisFermi_white.svg" class="menu-header__logo" alt="ITIS Enrico Fermi">
<img src="/logo/itisFermi_white.svg" class="menu-header__logo" alt="ITIS Enrico Fermi">
<p class="menu-header__bar" @click="changeMenu"><i class="fas fa-bars"></i></p>
</header>
</template>
Expand Down
48 changes: 15 additions & 33 deletions src/components/menu/menuMobile.vue
Original file line number Diff line number Diff line change
@@ -1,62 +1,44 @@
<template>
<div class="menu-header-container">
<ul class="menu-header-container__main">
<li class="menu-header-container__li menu-header-container__li--active" data-tab="panel__dashboard" @click.stop="changePanel('appPanelDashboard')">
<router-link tag="li" to="/dashboard/" class="menu-header-container__li" active-class="menu-header-container__li--active">
<span><i class="fas fa-tachometer-alt"></i></span>
<span>Dashboard</span>
</li>
<li class="menu-header-container__li" data-tab="panel__search" @click.stop="changePanel('appPanelSearch')">
</router-link>
<router-link tag="li" to="/search/" class="menu-header-container__li" active-class="menu-header-container__li--active">
<span><i class="fa fa-search" aria-hidden="true"></i></span>
<span>Ricerca</span>
</li>
<li class="menu-header-container__li" data-tab="panel__upload" @click.stop="changePanel('appPanelUpload')">
</router-link>
<router-link tag="li" to="/upload/" class="menu-header-container__li" active-class="menu-header-container__li--active">
<span><i class="fas fa-pencil-alt"></i></span>
<span>Inserisci</span>
</li>
<li class="menu-header-container__li" data-tab="panel__admin" @click.stop="changePanel('appPanelAdmin')" v-if="privileges._id == 'admin'">
</router-link>
<router-link tag="li" to="/admin/" class="menu-header-container__li" active-class="menu-header-container__li--active" v-if="privileges._id == 'admin'">
<span><i class="fa fa-user-secret" aria-hidden="true"></i></span>
<span>Admin</span>
</li>
<li class="menu-header-container__li" data-tab="panel__profile" @click.stop="changePanel('appPanelProfile')">
</router-link>
<router-link tag="li" to="/user/" class="menu-header-container__li" active-class="menu-header-container__li--active">
<span><i class="fa fa-user" aria-hidden="true"></i></span>
<span>Profilo</span>
</li>
<li class="menu-header-container__li" data-tab="panel__settings" @click.stop="changePanel('appPanelSettings')">
</router-link>
<router-link tag="li" to="/settings/" class="menu-header-container__li" active-class="menu-header-container__li--active">
<span><i class="fa fa-cog" aria-hidden="true"></i></span>
<span>Impostazioni</span>
</li>
<li class="menu-header-container__li" data-tab="panel--logout" @click.stop="logout">
</router-link>
<router-link tag="li" to="/logout/" class="menu-header-container__li" active-class="menu-header-container__li--active">
<span><i class="fas fa-sign-out-alt"></i></span>
<span>Logout</span>
</li>
</router-link>
</ul>
</div>
</template>

<script>
import axios from 'axios'
export default {
name: 'menuMobile',
props: ['privileges'],
methods: {
changePanel (panel) {
document.getElementsByClassName('menu-header-container__li--active')[0].classList.remove('menu-header-container__li--active')
if (event.srcElement.tagName === 'LI') {
event.target.classList.add('menu-header-container__li--active')
} else {
event.srcElement.parentNode.classList.add('menu-header-container__li--active')
}
this.$emit('panelChanged', panel)
},
async logout () {
await axios.get('/logout')
window.location.reload()
}
}
props: ['privileges']
}
</script>

Expand Down
5 changes: 5 additions & 0 deletions src/routes/root.route/root.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ export default {
}
}
},
watch: {
$route (to, from) {
this.menu = false
}
},
created () {
eventBus.$on('openPopUp', (entity, component, width) => {
this.popup.entity = entity
Expand Down
6 changes: 2 additions & 4 deletions src/views/admin.root.view/components/users.add.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,8 @@ export default {
async createUser () {
try {
await v1.put('/admin/users/', {
user: {
...this.user,
...this.computedAccesses
}
...this.user,
...this.computedAccesses
})
this.user.firstname = undefined
Expand Down
2 changes: 0 additions & 2 deletions src/views/upload.root.view/components/documents.add.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ export default {
formData.append('document', document)
formData.append('file', file)
console.log(document)
v1.put('/documents/', formData, config)
.then((response) => {
this.document.name = undefined
Expand Down
35 changes: 9 additions & 26 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// vue.config.js
const CompressionWebpackPlugin = require('compression-webpack-plugin')

module.exports = {
devServer: {
// https : true,
Expand All @@ -23,33 +25,13 @@ module.exports = {
}
}
},
// pages: {
// index: {
// // entry for the page
// entry: 'src/pages/index/main.js',
// // the source template
// template: 'public/index.html',
// // output as dist/index.html
// filename: 'index.html'
// // when using title option,
// // template title tag needs to be <title><%= htmlWebpackPlugin.options.title %></title>
// // title: 'Index Page',
// // chunks to include on this page, by default includes
// // extracted common chunks and vendor chunks.
// // chunks: ['chunk-vendors', 'chunk-common', 'index']
// },
// home: {
// // entry for the page
// entry: 'src/pages/home/main.js',
// // the source template
// template: 'public/index.html',
// // output as dist/index.html
// filename: 'home.html'
// }
// },
configureWebpack: {
plugins: [
new CompressionWebpackPlugin()
]
},
css: {
loaderOptions: {
// pass options to sass-loader
sass: {
data: `@import "@/scss/main.scss";`
}
Expand All @@ -59,6 +41,7 @@ module.exports = {
name: 'Archivio Digitale',
themeColor: '#1A8D4C',
msTileColor: '#1A8D4C',
appleMobileWebAppStatusBarStyle: 'black-translucent'
appleMobileWebAppStatusBarStyle: 'black-translucent',
start_url: '/dashboard'
}
}

0 comments on commit e59d1b7

Please sign in to comment.