Mercurial > gemma
view client/src/components/splitscreen/MinimizedSplitscreens.vue @ 2676:906e9a13592f
sidebar: only update staging info for appropriate usergroups
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 15 Mar 2019 11:14:21 +0100 |
parents | 1686ec185155 |
children |
line wrap: on
line source
<template> <transition-group name="fade" tag="div" class="minimizedSplitscreens ui-element" > <UIBoxHeader v-for="splitscreen in splitscreens" :key="splitscreen.id" :icon="splitscreen.icon" :title="splitscreen.title" :closeCallback="close(splitscreen)" :expandCallback="expand(splitscreen)" :collapsed="true" class="mt-2" /> </transition-group> </template> <style lang="sass" scoped> .minimizedSplitscreens position: absolute bottom: $small-offset right: $small-offset </style> <script> /* This is Free Software under GNU Affero General Public License v >= 3.0 * without warranty, see README.md and license for details. * * SPDX-License-Identifier: AGPL-3.0-or-later * License-Filename: LICENSES/AGPL-3.0.txt * * Copyright (C) 2018 by via donau * – Österreichische Wasserstraßen-Gesellschaft mbH * Software engineering by Intevation GmbH * * Author(s): * Markus Kottländer <markus@intevation.de> */ import { mapState } from "vuex"; export default { computed: { ...mapState("application", ["splitscreens"]) }, methods: { close(splitscreen) { return () => { if (splitscreen.closeCallback) splitscreen.closeCallback(); this.$store.commit("application/removeSplitscreen", splitscreen.id); }; }, expand(splitscreen) { return () => { if (splitscreen.expandCallback) splitscreen.expandCallback(); this.$store.commit("application/activeSplitscreenId", splitscreen.id); this.$store.commit("application/showSplitscreen", true); }; } } }; </script>