Commit 52f6b6d1 authored by Christian Hansen's avatar Christian Hansen Committed by Anton Koch
Browse files

new navigation for mobile view - mosys (#227)

parent 0a880f42
...@@ -7,14 +7,20 @@ ...@@ -7,14 +7,20 @@
.cell-item(:style="getAnnotationStyle(annotation)") .cell-item(:style="getAnnotationStyle(annotation)")
cell(:annotation="annotation", display="display") cell(:annotation="annotation", display="display")
q-page-sticky(position="top-right", :offset="[18, 18]", v-if="$store.state.auth.user") template(v-if="!isMobile")
q-btn(round, color="primary", small, @click="$router.push(`/mosys/grids/${$route.params.uuid}/annotate`)") q-page-sticky(position="top-right", :offset="[18, 18]", v-if="$store.state.auth.user")
q-icon(name="edit") q-btn(round, color="primary", small, @click="$router.push(`/mosys/grids/${$route.params.uuid}/annotate`)")
q-icon(name="edit")
template(v-if="isMobile")
.fixed-top-right.q-mt-sm.q-mr-md(v-if="$store.state.auth.user", style="z-index: 1000000000; padding-top: 3px;")
q-btn(round, color="primary", size="sm", @click="$router.push(`/mosys/grids/${$route.params.uuid}/annotate`)")
q-icon(name="edit")
style-tag(v-if="styles || stylesheetUrl", :styles="styles", :url="stylesheetUrl") style-tag(v-if="styles || stylesheetUrl", :styles="styles", :url="stylesheetUrl")
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'
import Cell from './Cell' import Cell from './Cell'
import StyleTag from '../../shared/elements/StyleTag' import StyleTag from '../../shared/elements/StyleTag'
import { DateTime } from 'luxon' import { DateTime } from 'luxon'
...@@ -36,6 +42,9 @@ ...@@ -36,6 +42,9 @@
} }
}, },
computed: { computed: {
...mapGetters({
isMobile: 'globalSettings/getIsMobile'
}),
queryPositionX () { queryPositionX () {
if (this.$route.query.x) return parseInt(this.$route.query.x) if (this.$route.query.x) return parseInt(this.$route.query.x)
else return null else return null
...@@ -57,6 +66,7 @@ ...@@ -57,6 +66,7 @@
}, },
async mounted () { async mounted () {
await this.loadGrid(this.$route.params.uuid) await this.loadGrid(this.$route.params.uuid)
this.$root.$emit('setBackButton', '/mosys/grids')
}, },
methods: { methods: {
onScroll () { onScroll () {
......
...@@ -63,11 +63,18 @@ ...@@ -63,11 +63,18 @@
@dragexit="event => {handleGridResizerDragEnd(event)}") @dragexit="event => {handleGridResizerDragEnd(event)}")
q-icon(name="network cell") q-icon(name="network cell")
div.fixed-top-right(style="right:18px; top:68px", v-if="!$store.state.mosys.showSources") template(v-if="!isMobile")
q-btn(round, color="primary", small, @click="handleGridButtonClickEdit", style="margin-right: 0.5em") .fixed-top-right(style="right:18px; top:68px", v-if="!$store.state.mosys.showSources")
q-icon(name="add") q-btn(round, color="primary", small, @click="handleGridButtonClickEdit", style="margin-right: 0.5em")
q-btn(round, color="primary", small, @click="$router.push(`/mosys/grids/${$route.params.uuid}`)") q-icon(name="add")
q-icon(name="remove red eye") q-btn(round, color="primary", small, @click="$router.push(`/mosys/grids/${$route.params.uuid}`)")
q-icon(name="remove red eye")
template(v-if="isMobile")
.fixed-top-right.q-mt-sm(v-if="!$store.state.mosys.showSources", style="z-index: 10000; padding-top: 3px;")
q-btn.q-mr-sm(round, color="primary", size="sm", @click="handleGridButtonClickEdit")
q-icon(name="add")
q-btn.q-mr-md(round, color="primary", size="sm", @click="$router.push(`/mosys/grids/${$route.params.uuid}`)")
q-icon(name="remove red eye")
</template> </template>
...@@ -119,7 +126,8 @@ ...@@ -119,7 +126,8 @@
}, },
computed: { computed: {
...mapGetters({ ...mapGetters({
user: 'auth/getUserState' user: 'auth/getUserState',
isMobile: 'globalSettings/getIsMobile'
}), }),
cellContextMenuActions () { cellContextMenuActions () {
const actions = { const actions = {
...@@ -163,6 +171,7 @@ ...@@ -163,6 +171,7 @@
}, },
async mounted () { async mounted () {
await this.fetchData() await this.fetchData()
this.$root.$emit('setBackButton', '/mosys/grids')
}, },
watch: { watch: {
annotations () { annotations () {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment