diff --git a/src/App.vue b/src/App.vue index b45820b6b21df309dee4b1368a6b29b23238866e..56520c47cf02a578d7bc5d8d768073dcd549b360 100644 --- a/src/App.vue +++ b/src/App.vue @@ -66,71 +66,4 @@ export default { ]) }, }; -</script> - -<style> -.vertical { - flex-direction: column; - justify-content: center; -} - -.leaflet-container { - background: white !important; -} - -.flex { - display: flex; -} - -/* keep above loader */ -#menu-dropdown { - z-index: 1001; -} - -@media screen and (max-width: 985px) { - .abstract{ - display: none !important; - } -} - -@media screen and (min-width: 560px) { - .mobile { - display: none !important; - } - #app-header { - min-width: 560px; - } - .menu.container { - width: auto !important; - } - .push-right-desktop { - margin-left: auto; - } -} - -@media screen and (max-width: 590px) { - .desktop { - display: none !important; - } - div.dropdown-list { - width: 100vw; - left: -70px !important; /* should be the same than belows */ - } - .menu.container a.header { - width: 70px; - } - .menu.container a.header > img { - margin: 0; - } - #menu-dropdown { - width: calc(100vw - 70px); - justify-content: space-between; - } - #menu-dropdown > span { - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - } -} - -</style> +</script> \ No newline at end of file diff --git a/src/components/AppHeader.vue b/src/components/AppHeader.vue index 77f4c4ac316b16c6c5882abf6238d3b3775ac210..ec2a5d07f5d4fa8812cd2b2d8da1dedcca000a10 100644 --- a/src/components/AppHeader.vue +++ b/src/components/AppHeader.vue @@ -22,8 +22,15 @@ :class="['ui dropdown item', { 'active visible': menuIsOpen }]" @click="menuIsOpen = !menuIsOpen" > - <!-- empty span to occupy space for style if no project --> - <span> + <div + v-if="!isOnline" + class="crossed-out mobile" + > + <i + class="wifi icon" + /> + </div> + <span class="expand-center"> <span v-if="project"> Projet : {{ project.title }} </span> </span> <i @@ -155,6 +162,20 @@ </span> </div> <div class="desktop flex push-right-desktop"> + <div + v-if="!isOnline" + class="item" + > + <span + data-tooltip="Vous êtes hors-ligne, + vos changements pourront être envoyés au serveur au retour de la connexion" + data-position="bottom right" + > + <div class="crossed-out"> + <i class="wifi icon"/> + </div> + </span> + </div> <router-link :is="isOnline ? 'router-link' : 'span'" v-if="user" @@ -301,6 +322,86 @@ export default { </script> <style lang="less" scoped> +.vertical { + flex-direction: column; + justify-content: center; +} + +.flex { + display: flex; +} + +/* keep above loader */ +#menu-dropdown { + z-index: 1001; +} + +.expand-center { + width: 100%; + text-align: center; +} + +.crossed-out { + position: relative; + padding: .2em; + &::before { + content: ""; + position: absolute; + top: 45%; + left: -8%; + width: 100%; + border-top: 2px solid #ee2e24; + transform: rotate(45deg); + box-shadow: 0px 0px 0px 1px #373636; + border-radius: 3px; + } +} + +@media screen and (max-width: 985px) { + .abstract{ + display: none !important; + } +} + +@media screen and (min-width: 560px) { + .mobile { + display: none !important; + } + #app-header { + min-width: 560px; + } + .menu.container { + width: auto !important; + } + .push-right-desktop { + margin-left: auto; + } +} + +@media screen and (max-width: 590px) { + .desktop { + display: none !important; + } + div.dropdown-list { + width: 100vw; + left: -70px !important; /* should be the same than belows */ + } + .menu.container a.header { + width: 70px; + } + .menu.container a.header > img { + margin: 0; + } + #menu-dropdown { + width: calc(100vw - 70px); + //justify-content: space-between; + } + #menu-dropdown > span { + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; + } +} .menu.container { position: relative; @@ -348,4 +449,4 @@ export default { height: 100% !important; } -</style> +</style> \ No newline at end of file