diff --git a/front/Dockerfile b/front/Dockerfile
index 0bbf71f40..d6fe5d4f8 100644
--- a/front/Dockerfile
+++ b/front/Dockerfile
@@ -13,6 +13,5 @@ COPY front/nginx.conf sites-available/salix
RUN rm sites-enabled/default && ln -s ../sites-available/salix sites-enabled/salix
COPY dist /salix/dist
-COPY front/salix/manifest.json /salix/dist/
CMD ["nginx", "-g", "daemon off;"]
diff --git a/front/core/locale/es.yml b/front/core/locale/es.yml
index 10d172444..3cd6428f3 100644
--- a/front/core/locale/es.yml
+++ b/front/core/locale/es.yml
@@ -37,4 +37,5 @@ September: Septiembre
October: Octubre
November: Noviembre
December: Diciembre
-Has delivery: Hay reparto
\ No newline at end of file
+Has delivery: Hay reparto
+Loading: Cargando
\ No newline at end of file
diff --git a/front/salix/components/app/app.html b/front/salix/components/app/app.html
index 922b48ce8..c69d07375 100644
--- a/front/salix/components/app/app.html
+++ b/front/salix/components/app/app.html
@@ -3,10 +3,10 @@
{{$ctrl.$state.current.description}}
@@ -14,20 +14,15 @@
+ ng-class="{padding: $ctrl.showTopbar}">
-
-
\ No newline at end of file
diff --git a/front/salix/components/app/app.js b/front/salix/components/app/app.js
index 6a8ecb247..edf482712 100644
--- a/front/salix/components/app/app.js
+++ b/front/salix/components/app/app.js
@@ -1,19 +1,18 @@
import ngModule from '../../module';
import './style.scss';
+/**
+ * The main graphical application component.
+ *
+ * @property {SideMenu} leftMenu The left menu, if it's present
+ * @property {SideMenu} rightMenu The left menu, if it's present
+ */
export default class App {
- constructor($, $element, vnApp, $state, $transitions) {
+ constructor($, $state, vnApp) {
Object.assign(this, {
$,
- $element,
- vnApp,
- $state
- });
-
- $transitions.onStart({}, transition => {
- let state = transition.targetState().name();
- this.showLeftMenuButton = state.split('.').length >= 3;
- this.hideMenus();
+ $state,
+ vnApp
});
}
@@ -30,33 +29,6 @@ export default class App {
return state && state != 'login';
}
- get leftMenu() {
- return this.$element[0].querySelector('.left-menu');
- }
-
- showLeftMenu() {
- if (!this.leftMenu) return;
- this.leftMenu.classList.add('shown');
- this.leftMenuShown = true;
- }
-
- showRightMenu() {
- if (!this.rightMenu) return;
- this.rightMenu.classList.add('shown');
- this.rightMenuShown = true;
- }
-
- hideMenus() {
- if (this.leftMenuShown) {
- this.leftMenu.classList.remove('shown');
- this.leftMenuShown = false;
- }
- if (this.rightMenuShown) {
- this.rightMenu.classList.remove('shown');
- this.rightMenuShown = false;
- }
- }
-
showMessage(message) {
this.$.snackbar.show({message: message});
}
@@ -69,7 +41,7 @@ export default class App {
this.$.snackbar.showError({message: message});
}
}
-App.$inject = ['$scope', '$element', 'vnApp', '$state', '$transitions'];
+App.$inject = ['$scope', '$state', 'vnApp'];
ngModule.component('vnApp', {
template: require('./app.html'),
diff --git a/front/salix/components/app/style.scss b/front/salix/components/app/style.scss
index 2103c4251..6cb07e4aa 100644
--- a/front/salix/components/app/style.scss
+++ b/front/salix/components/app/style.scss
@@ -1,9 +1,6 @@
@import "background";
@import "margin";
-
-$menu-width: 16em;
-$topbar-height: 4em;
-$mobile-width: 800px;
+@import "variables";
body {
@extend .bg-content;
@@ -72,27 +69,6 @@ vn-app {
margin: 0 auto;
padding-left: $menu-width;
- %side-menu {
- display: block;
- position: fixed;
- z-index: 5;
- bottom: 0;
- width: $menu-width;
- min-width: $menu-width;
- background-color: white;
- box-shadow: 0 .1em .2em rgba(1, 1, 1, .2);
- overflow: auto;
- }
- .left-menu {
- @extend %side-menu;
- top: $topbar-height;
- left: 0;
- }
- .right-menu {
- @extend %side-menu;
- top: $topbar-height;
- right: 0;
- }
}
.main-with-right-menu {
padding-right: $menu-width;
@@ -102,18 +78,6 @@ vn-app {
}
}
}
- & > .background {
- display: none;
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background-color: black;
- z-index: 14;
- opacity: 0;
- transition: opacity 200ms ease-out;
- }
@media screen and (max-width: $mobile-width) {
& > vn-topbar > header {
@@ -135,32 +99,10 @@ vn-app {
}
vn-main-block {
padding-left: 0;
-
- %side-menu-mobile {
- top: 0;
- transition: transform 200ms ease-out;
- z-index: 15;
-
- &.shown {
- transform: translateZ(0) translateX(0);
- }
- }
- .left-menu {
- @extend %side-menu-mobile;
- transform: translateZ(0) translateX(-$menu-width);
- }
- .right-menu {
- @extend %side-menu-mobile;
- transform: translateZ(0) translateX($menu-width);
- }
}
.main-with-right-menu {
padding-right: 0;
}
}
- & > .background.shown {
- display: block;
- opacity: .3;
- }
}
}
diff --git a/front/salix/components/background/background.js b/front/salix/components/background/background.js
new file mode 100644
index 000000000..423b033ce
--- /dev/null
+++ b/front/salix/components/background/background.js
@@ -0,0 +1 @@
+import './style.scss';
diff --git a/front/salix/components/background/style.scss b/front/salix/components/background/style.scss
new file mode 100644
index 000000000..c75b69c52
--- /dev/null
+++ b/front/salix/components/background/style.scss
@@ -0,0 +1,26 @@
+@import "variables";
+
+@keyframes fadein {
+ from {
+ opacity: 0;
+ }
+}
+
+vn-background {
+ display: none;
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: black;
+ z-index: 14;
+
+ @media screen and (max-width: $mobile-width) {
+ &.shown {
+ display: block;
+ opacity: .3;
+ animation: 500ms ease-out fadein;
+ }
+ }
+}
diff --git a/front/salix/components/index.js b/front/salix/components/index.js
index b90b221a4..a5ce18e4c 100644
--- a/front/salix/components/index.js
+++ b/front/salix/components/index.js
@@ -2,6 +2,8 @@ import './app/app';
import './login/login';
import './home/home';
import './main-menu/main-menu';
+import './background/background';
+import './side-menu/side-menu';
import './left-menu/left-menu';
import './topbar/topbar';
import './user-configuration-popover';
diff --git a/front/salix/components/main-menu/main-menu.html b/front/salix/components/main-menu/main-menu.html
index b607450b8..188f854eb 100644
--- a/front/salix/components/main-menu/main-menu.html
+++ b/front/salix/components/main-menu/main-menu.html
@@ -5,26 +5,31 @@
class="unselectable">
{{currentUserName}}
-