2020-11-01 18:36:00 +01:00
|
|
|
<template>
|
2022-01-16 18:05:12 +01:00
|
|
|
<aside :class="{'is-active': menuActive}" class="namespace-container">
|
|
|
|
<nav class="menu top-menu">
|
2020-11-01 18:36:00 +01:00
|
|
|
<router-link :to="{name: 'home'}" class="logo">
|
2022-01-19 07:57:45 +01:00
|
|
|
<Logo width="164" height="48"/>
|
2020-11-01 18:36:00 +01:00
|
|
|
</router-link>
|
|
|
|
<ul class="menu-list">
|
|
|
|
<li>
|
2022-03-02 21:59:51 +01:00
|
|
|
<router-link :to="{ name: 'home'}" v-shortcut="'g o'">
|
2020-11-01 18:36:00 +01:00
|
|
|
<span class="icon">
|
|
|
|
<icon icon="calendar"/>
|
|
|
|
</span>
|
2021-06-24 01:24:57 +02:00
|
|
|
{{ $t('navigation.overview') }}
|
2020-11-01 18:36:00 +01:00
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
<li>
|
2022-03-02 21:59:51 +01:00
|
|
|
<router-link :to="{ name: 'tasks.range'}" v-shortcut="'g u'">
|
2020-11-01 18:36:00 +01:00
|
|
|
<span class="icon">
|
|
|
|
<icon :icon="['far', 'calendar-alt']"/>
|
|
|
|
</span>
|
2021-06-24 01:24:57 +02:00
|
|
|
{{ $t('navigation.upcoming') }}
|
2020-11-01 18:36:00 +01:00
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
<li>
|
2022-03-02 21:59:51 +01:00
|
|
|
<router-link :to="{ name: 'namespaces.index'}" v-shortcut="'g n'">
|
2020-11-01 18:36:00 +01:00
|
|
|
<span class="icon">
|
|
|
|
<icon icon="layer-group"/>
|
|
|
|
</span>
|
2021-06-24 01:24:57 +02:00
|
|
|
{{ $t('namespace.title') }}
|
2020-11-01 18:36:00 +01:00
|
|
|
</router-link>
|
|
|
|
</li>
|
|
|
|
<li>
|
2022-03-02 21:59:51 +01:00
|
|
|
<router-link :to="{ name: 'labels.index'}" v-shortcut="'g a'">
|
2020-11-01 18:36:00 +01:00
|
|
|
<span class="icon">
|
|
|
|
<icon icon="tags"/>
|
|
|
|
</span>
|
2021-06-24 01:24:57 +02:00
|
|
|
{{ $t('label.title') }}
|
2020-11-01 18:36:00 +01:00
|
|
|
</router-link>
|
|
|
|
</li>
|
2020-12-23 21:28:32 +01:00
|
|
|
<li>
|
2022-03-02 21:59:51 +01:00
|
|
|
<router-link :to="{ name: 'teams.index'}" v-shortcut="'g m'">
|
2020-12-23 21:28:32 +01:00
|
|
|
<span class="icon">
|
|
|
|
<icon icon="users"/>
|
|
|
|
</span>
|
2021-06-24 01:24:57 +02:00
|
|
|
{{ $t('team.title') }}
|
2020-12-23 21:28:32 +01:00
|
|
|
</router-link>
|
|
|
|
</li>
|
2020-11-01 18:36:00 +01:00
|
|
|
</ul>
|
2022-01-16 18:05:12 +01:00
|
|
|
</nav>
|
2020-11-01 18:36:00 +01:00
|
|
|
|
2022-01-16 18:05:12 +01:00
|
|
|
<nav class="menu namespaces-lists loader-container is-loading-small" :class="{'is-loading': loading}">
|
2022-01-19 07:57:45 +01:00
|
|
|
<template v-for="(n, nk) in namespaces" :key="n.id">
|
2021-08-19 21:10:29 +02:00
|
|
|
<div class="namespace-title" :class="{'has-menu': n.id > 0}">
|
2022-05-11 01:15:08 +02:00
|
|
|
<BaseButton
|
2021-02-20 16:28:45 +01:00
|
|
|
@click="toggleLists(n.id)"
|
2020-11-01 18:36:00 +01:00
|
|
|
class="menu-label"
|
2022-01-19 07:57:45 +01:00
|
|
|
v-tooltip="namespaceTitles[nk]"
|
|
|
|
>
|
2022-09-15 13:56:14 +02:00
|
|
|
<ColorBubble
|
2022-01-19 07:57:45 +01:00
|
|
|
v-if="n.hexColor !== ''"
|
2022-09-15 13:56:14 +02:00
|
|
|
:color="n.hexColor"
|
|
|
|
class="mr-1"
|
2022-01-19 07:57:45 +01:00
|
|
|
/>
|
2022-05-11 01:15:08 +02:00
|
|
|
<span class="name">{{ namespaceTitles[nk] }}</span>
|
|
|
|
<div
|
2022-01-19 07:57:45 +01:00
|
|
|
class="icon is-small toggle-lists-icon pl-2"
|
|
|
|
:class="{'active': typeof listsVisible[n.id] !== 'undefined' ? listsVisible[n.id] : true}"
|
|
|
|
>
|
|
|
|
<icon icon="chevron-down"/>
|
2022-05-11 01:15:08 +02:00
|
|
|
</div>
|
2022-01-19 07:57:45 +01:00
|
|
|
<span class="count" :class="{'ml-2 mr-0': n.id > 0}">
|
|
|
|
({{ namespaceListsCount[nk] }})
|
|
|
|
</span>
|
2022-05-11 01:15:08 +02:00
|
|
|
</BaseButton>
|
2021-01-30 17:17:04 +01:00
|
|
|
<namespace-settings-dropdown :namespace="n" v-if="n.id > 0"/>
|
2020-11-01 18:36:00 +01:00
|
|
|
</div>
|
2021-08-23 21:24:52 +02:00
|
|
|
<!--
|
|
|
|
NOTE: a v-model / computed setter is not possible, since the updateActiveLists function
|
|
|
|
triggered by the change needs to have access to the current namespace
|
2022-01-19 07:57:45 +01:00
|
|
|
-->
|
2021-07-28 22:58:12 +02:00
|
|
|
<draggable
|
2022-05-11 01:15:08 +02:00
|
|
|
v-if="listsVisible[n.id] ?? true"
|
2021-09-08 11:59:46 +02:00
|
|
|
v-bind="dragOptions"
|
2021-08-23 21:18:12 +02:00
|
|
|
:modelValue="activeLists[nk]"
|
|
|
|
@update:modelValue="(lists) => updateActiveLists(n, lists)"
|
2022-01-29 22:12:46 +01:00
|
|
|
group="namespace-lists"
|
2021-07-28 22:58:12 +02:00
|
|
|
@start="() => drag = true"
|
2022-01-29 22:12:46 +01:00
|
|
|
@end="saveListPosition"
|
2021-07-28 22:58:12 +02:00
|
|
|
handle=".handle"
|
2022-05-22 17:08:37 +02:00
|
|
|
:disabled="n.id < 0 || undefined"
|
2022-07-19 16:32:12 +02:00
|
|
|
tag="ul"
|
2021-08-20 15:46:41 +02:00
|
|
|
item-key="id"
|
2022-01-29 22:12:46 +01:00
|
|
|
:data-namespace-id="n.id"
|
|
|
|
:data-namespace-index="nk"
|
2021-08-20 15:46:41 +02:00
|
|
|
:component-data="{
|
2022-07-19 16:32:12 +02:00
|
|
|
type: 'transition-group',
|
2021-08-20 15:46:41 +02:00
|
|
|
name: !drag ? 'flip-list' : null,
|
|
|
|
class: [
|
|
|
|
'menu-list can-be-hidden',
|
|
|
|
{ 'dragging-disabled': n.id < 0 }
|
|
|
|
]
|
|
|
|
}"
|
2021-07-28 22:58:12 +02:00
|
|
|
>
|
2021-08-20 15:46:41 +02:00
|
|
|
<template #item="{element: l}">
|
2021-07-28 22:58:12 +02:00
|
|
|
<li
|
2022-05-11 01:15:08 +02:00
|
|
|
class="list-menu loader-container is-loading-small"
|
2021-07-28 22:58:12 +02:00
|
|
|
:class="{'is-loading': listUpdating[l.id]}"
|
|
|
|
>
|
2022-05-11 01:15:08 +02:00
|
|
|
<BaseButton
|
2021-07-28 22:58:12 +02:00
|
|
|
:to="{ name: 'list.index', params: { listId: l.id} }"
|
2022-05-11 01:15:08 +02:00
|
|
|
class="list-menu-link"
|
|
|
|
:class="{'router-link-exact-active': currentList.id === l.id}"
|
|
|
|
>
|
|
|
|
<span class="icon handle">
|
|
|
|
<icon icon="grip-lines"/>
|
|
|
|
</span>
|
2022-09-15 13:56:14 +02:00
|
|
|
<ColorBubble
|
|
|
|
v-if="l.hexColor !== ''"
|
|
|
|
:color="l.hexColor"
|
|
|
|
class="mr-1"
|
|
|
|
/>
|
2022-05-11 01:15:08 +02:00
|
|
|
<span class="list-menu-title">{{ getListTitle(l) }}</span>
|
|
|
|
</BaseButton>
|
|
|
|
<BaseButton
|
|
|
|
class="favorite"
|
|
|
|
:class="{'is-favorite': l.isFavorite}"
|
2022-09-21 18:21:25 +02:00
|
|
|
@click="listStore.toggleListFavorite(l)"
|
2020-11-01 18:36:00 +01:00
|
|
|
>
|
2022-05-11 01:15:08 +02:00
|
|
|
<icon :icon="l.isFavorite ? 'star' : ['far', 'star']"/>
|
|
|
|
</BaseButton>
|
2021-07-28 22:58:12 +02:00
|
|
|
<list-settings-dropdown :list="l" v-if="l.id > 0"/>
|
|
|
|
<span class="list-setting-spacer" v-else></span>
|
|
|
|
</li>
|
2021-08-20 15:46:41 +02:00
|
|
|
</template>
|
2021-07-28 22:58:12 +02:00
|
|
|
</draggable>
|
2020-11-01 18:36:00 +01:00
|
|
|
</template>
|
2022-01-16 18:05:12 +01:00
|
|
|
</nav>
|
2022-01-19 07:57:45 +01:00
|
|
|
<PoweredByLink/>
|
2022-01-16 18:05:12 +01:00
|
|
|
</aside>
|
2020-11-01 18:36:00 +01:00
|
|
|
</template>
|
|
|
|
|
2022-02-13 18:11:26 +01:00
|
|
|
<script setup lang="ts">
|
|
|
|
import {ref, computed, onMounted, onBeforeMount} from 'vue'
|
2022-07-21 18:45:58 +02:00
|
|
|
import {useStore} from '@/store'
|
2022-05-22 19:53:21 +02:00
|
|
|
import draggable from 'zhyswan-vuedraggable'
|
2022-06-23 03:08:35 +02:00
|
|
|
import type {SortableEvent} from 'sortablejs'
|
2021-11-13 15:16:14 +01:00
|
|
|
|
2022-05-11 01:14:38 +02:00
|
|
|
import BaseButton from '@/components/base/BaseButton.vue'
|
2021-07-25 15:27:15 +02:00
|
|
|
import ListSettingsDropdown from '@/components/list/list-settings-dropdown.vue'
|
2021-01-30 17:17:04 +01:00
|
|
|
import NamespaceSettingsDropdown from '@/components/namespace/namespace-settings-dropdown.vue'
|
2021-11-13 15:16:14 +01:00
|
|
|
import PoweredByLink from '@/components/home/PoweredByLink.vue'
|
|
|
|
import Logo from '@/components/home/Logo.vue'
|
|
|
|
|
2022-02-13 18:11:26 +01:00
|
|
|
import {MENU_ACTIVE} from '@/store/mutation-types'
|
2021-07-28 21:56:29 +02:00
|
|
|
import {calculateItemPosition} from '@/helpers/calculateItemPosition'
|
2022-02-13 18:11:26 +01:00
|
|
|
import {getNamespaceTitle} from '@/helpers/getNamespaceTitle'
|
2022-06-23 03:08:35 +02:00
|
|
|
import {getListTitle} from '@/helpers/getListTitle'
|
2022-04-02 23:09:28 +02:00
|
|
|
import {useEventListener} from '@vueuse/core'
|
2022-09-06 11:36:01 +02:00
|
|
|
import type {IList} from '@/modelTypes/IList'
|
|
|
|
import type {INamespace} from '@/modelTypes/INamespace'
|
2022-09-15 13:56:14 +02:00
|
|
|
import ColorBubble from '@/components/misc/colorBubble.vue'
|
2022-09-21 18:21:25 +02:00
|
|
|
import {useListStore} from '@/stores/lists'
|
2020-11-01 18:36:00 +01:00
|
|
|
|
2022-02-13 18:11:26 +01:00
|
|
|
const drag = ref(false)
|
|
|
|
const dragOptions = {
|
|
|
|
animation: 100,
|
|
|
|
ghostClass: 'ghost',
|
|
|
|
}
|
2021-10-03 20:48:02 +02:00
|
|
|
|
2022-02-13 18:11:26 +01:00
|
|
|
const store = useStore()
|
|
|
|
const currentList = computed(() => store.state.currentList)
|
|
|
|
const menuActive = computed(() => store.state.menuActive)
|
|
|
|
const loading = computed(() => store.state.loading && store.state.loadingModule === 'namespaces')
|
2021-11-13 15:16:14 +01:00
|
|
|
|
|
|
|
|
2022-02-13 18:11:26 +01:00
|
|
|
const namespaces = computed(() => {
|
2022-07-21 00:42:36 +02:00
|
|
|
return (store.state.namespaces.namespaces as INamespace[]).filter(n => !n.isArchived)
|
2022-02-13 18:11:26 +01:00
|
|
|
})
|
|
|
|
const activeLists = computed(() => {
|
|
|
|
return namespaces.value.map(({lists}) => {
|
|
|
|
return lists?.filter(item => {
|
|
|
|
return typeof item !== 'undefined' && !item.isArchived
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
2022-04-02 23:09:28 +02:00
|
|
|
|
2022-02-13 18:11:26 +01:00
|
|
|
const namespaceTitles = computed(() => {
|
|
|
|
return namespaces.value.map((namespace) => getNamespaceTitle(namespace))
|
|
|
|
})
|
|
|
|
|
|
|
|
const namespaceListsCount = computed(() => {
|
|
|
|
return namespaces.value.map((_, index) => activeLists.value[index]?.length ?? 0)
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
useEventListener('resize', resize)
|
|
|
|
onMounted(() => resize())
|
2021-08-23 21:24:52 +02:00
|
|
|
|
2022-09-21 18:21:25 +02:00
|
|
|
const listStore = useListStore()
|
2021-10-11 19:37:20 +02:00
|
|
|
|
2022-02-13 18:11:26 +01:00
|
|
|
function resize() {
|
|
|
|
// Hide the menu by default on mobile
|
|
|
|
store.commit(MENU_ACTIVE, window.innerWidth >= 770)
|
|
|
|
}
|
2021-07-28 21:56:29 +02:00
|
|
|
|
2022-07-21 00:42:36 +02:00
|
|
|
function toggleLists(namespaceId: INamespace['id']) {
|
2022-02-13 18:11:26 +01:00
|
|
|
listsVisible.value[namespaceId] = !listsVisible.value[namespaceId]
|
|
|
|
}
|
2021-07-28 21:56:29 +02:00
|
|
|
|
2022-07-21 00:42:36 +02:00
|
|
|
const listsVisible = ref<{ [id: INamespace['id']]: boolean }>({})
|
2022-02-13 18:11:26 +01:00
|
|
|
// FIXME: async action will be unfinished when component mounts
|
|
|
|
onBeforeMount(async () => {
|
2022-07-21 00:42:36 +02:00
|
|
|
const namespaces = await store.dispatch('namespaces/loadNamespaces') as INamespace[]
|
2022-02-13 18:11:26 +01:00
|
|
|
namespaces.forEach(n => {
|
|
|
|
if (typeof listsVisible.value[n.id] === 'undefined') {
|
|
|
|
listsVisible.value[n.id] = true
|
|
|
|
}
|
|
|
|
})
|
2022-02-15 13:07:59 +01:00
|
|
|
})
|
2022-02-13 18:11:26 +01:00
|
|
|
|
2022-07-21 00:42:36 +02:00
|
|
|
function updateActiveLists(namespace: INamespace, activeLists: IList[]) {
|
2022-02-13 18:11:26 +01:00
|
|
|
// This is a bit hacky: since we do have to filter out the archived items from the list
|
|
|
|
// for vue draggable updating it is not as simple as replacing it.
|
|
|
|
// To work around this, we merge the active lists with the archived ones. Doing so breaks the order
|
|
|
|
// because now all archived lists are sorted after the active ones. This is fine because they are sorted
|
|
|
|
// later when showing them anyway, and it makes the merging happening here a lot easier.
|
|
|
|
const lists = [
|
|
|
|
...activeLists,
|
|
|
|
...namespace.lists.filter(l => l.isArchived),
|
|
|
|
]
|
|
|
|
|
|
|
|
store.commit('namespaces/setNamespaceById', {
|
|
|
|
...namespace,
|
|
|
|
lists,
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2022-07-21 00:42:36 +02:00
|
|
|
const listUpdating = ref<{ [id: INamespace['id']]: boolean }>({})
|
2022-04-02 23:09:28 +02:00
|
|
|
|
2022-02-13 18:11:26 +01:00
|
|
|
async function saveListPosition(e: SortableEvent) {
|
2022-08-16 23:21:34 +02:00
|
|
|
if (!e.newIndex && e.newIndex !== 0) return
|
2022-02-13 18:11:26 +01:00
|
|
|
|
|
|
|
const namespaceId = parseInt(e.to.dataset.namespaceId as string)
|
|
|
|
const newNamespaceIndex = parseInt(e.to.dataset.namespaceIndex as string)
|
2022-04-02 23:09:28 +02:00
|
|
|
|
2022-02-13 18:11:26 +01:00
|
|
|
const listsActive = activeLists.value[newNamespaceIndex]
|
2022-09-07 23:11:44 +02:00
|
|
|
// If the list was dragged to the last position, Safari will report e.newIndex as the size of the listsActive
|
|
|
|
// array instead of using the position. Because the index is wrong in that case, dragging the list will fail.
|
|
|
|
// To work around that we're explicitly checking that case here and decrease the index.
|
|
|
|
const newIndex = e.newIndex === listsActive.length ? e.newIndex - 1 : e.newIndex
|
|
|
|
|
|
|
|
const list = listsActive[newIndex]
|
|
|
|
const listBefore = listsActive[newIndex - 1] ?? null
|
|
|
|
const listAfter = listsActive[newIndex + 1] ?? null
|
2022-02-13 18:11:26 +01:00
|
|
|
listUpdating.value[list.id] = true
|
|
|
|
|
|
|
|
const position = calculateItemPosition(
|
|
|
|
listBefore !== null ? listBefore.position : null,
|
|
|
|
listAfter !== null ? listAfter.position : null,
|
|
|
|
)
|
|
|
|
|
|
|
|
try {
|
|
|
|
// create a copy of the list in order to not violate vuex mutations
|
2022-09-21 18:21:25 +02:00
|
|
|
await listStore.updateList({
|
2022-02-13 18:11:26 +01:00
|
|
|
...list,
|
|
|
|
position,
|
|
|
|
namespaceId,
|
|
|
|
})
|
|
|
|
} finally {
|
|
|
|
listUpdating.value[list.id] = false
|
|
|
|
}
|
|
|
|
}
|
2020-11-01 18:36:00 +01:00
|
|
|
</script>
|
2021-05-19 17:26:05 +02:00
|
|
|
|
2021-10-18 14:33:23 +02:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
$navbar-padding: 2rem;
|
2021-11-22 22:12:54 +01:00
|
|
|
$vikunja-nav-background: var(--site-background);
|
|
|
|
$vikunja-nav-color: var(--grey-700);
|
2021-10-18 14:33:23 +02:00
|
|
|
$vikunja-nav-selected-width: 0.4rem;
|
|
|
|
|
|
|
|
.namespace-container {
|
2021-11-02 19:20:14 +01:00
|
|
|
background: $vikunja-nav-background;
|
2021-10-18 14:33:23 +02:00
|
|
|
color: $vikunja-nav-color;
|
2021-11-02 19:20:14 +01:00
|
|
|
padding: 0 0 1rem;
|
|
|
|
transition: transform $transition-duration ease-in;
|
2021-10-18 14:33:23 +02:00
|
|
|
position: fixed;
|
|
|
|
top: $navbar-height;
|
2021-11-02 19:20:14 +01:00
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
transform: translateX(-100%);
|
2021-10-18 14:33:23 +02:00
|
|
|
overflow-x: auto;
|
|
|
|
width: $navbar-width;
|
|
|
|
|
|
|
|
@media screen and (max-width: $tablet) {
|
|
|
|
top: 0;
|
|
|
|
width: 70vw;
|
2022-04-02 23:09:28 +02:00
|
|
|
z-index: 20;
|
2021-10-18 14:33:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
&.is-active {
|
2021-11-02 19:20:14 +01:00
|
|
|
transform: translateX(0);
|
|
|
|
transition: transform $transition-duration ease-out;
|
2021-10-18 14:33:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.menu {
|
|
|
|
.menu-label {
|
|
|
|
font-size: 1rem;
|
|
|
|
font-weight: 700;
|
|
|
|
font-weight: bold;
|
|
|
|
font-family: $vikunja-font;
|
|
|
|
color: $vikunja-nav-color;
|
|
|
|
font-weight: 500;
|
|
|
|
min-height: 2.5rem;
|
|
|
|
padding-top: 0;
|
|
|
|
padding-left: $navbar-padding;
|
|
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.menu-label,
|
2022-05-11 01:15:08 +02:00
|
|
|
.menu-list .list-menu-link,
|
2021-10-18 14:33:23 +02:00
|
|
|
.menu-list a {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
.list-menu-title {
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.color-bubble {
|
|
|
|
height: 12px;
|
|
|
|
flex: 0 0 12px;
|
|
|
|
}
|
|
|
|
|
2022-05-11 01:15:08 +02:00
|
|
|
}
|
|
|
|
.favorite {
|
|
|
|
margin-left: .25rem;
|
|
|
|
transition: opacity $transition, color $transition;
|
|
|
|
opacity: 0;
|
|
|
|
|
|
|
|
&:hover,
|
|
|
|
&.is-favorite {
|
|
|
|
color: var(--warning);
|
2021-10-18 14:33:23 +02:00
|
|
|
}
|
2022-05-11 01:15:08 +02:00
|
|
|
}
|
2022-05-06 22:16:54 +02:00
|
|
|
|
2022-05-11 01:15:08 +02:00
|
|
|
.favorite.is-favorite,
|
|
|
|
.list-menu:hover .favorite {
|
|
|
|
opacity: 1;
|
2021-10-18 14:33:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.menu-label {
|
|
|
|
.color-bubble {
|
2022-01-19 07:57:45 +01:00
|
|
|
width: 14px;
|
|
|
|
height: 14px;
|
|
|
|
flex-basis: auto;
|
2021-10-18 14:33:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.is-archived {
|
|
|
|
min-width: 85px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.namespace-title {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
2022-05-11 01:15:08 +02:00
|
|
|
color: $vikunja-nav-color;
|
|
|
|
padding: 0 .25rem;
|
2021-10-18 14:33:23 +02:00
|
|
|
|
|
|
|
.menu-label {
|
|
|
|
margin-bottom: 0;
|
|
|
|
flex: 1 1 auto;
|
|
|
|
|
|
|
|
.name {
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
2022-01-19 07:57:45 +01:00
|
|
|
margin-right: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.count {
|
|
|
|
color: var(--grey-500);
|
|
|
|
margin-right: .5rem;
|
2021-10-18 14:33:23 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-20 14:33:36 +02:00
|
|
|
:deep(.dropdown-trigger) {
|
2021-10-18 14:33:23 +02:00
|
|
|
padding: .5rem;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
.toggle-lists-icon {
|
|
|
|
svg {
|
|
|
|
transition: all $transition;
|
|
|
|
transform: rotate(90deg);
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.active svg {
|
|
|
|
transform: rotate(0deg);
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover .toggle-lists-icon svg {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:not(.has-menu) .toggle-lists-icon {
|
|
|
|
padding-right: 1rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.menu-label,
|
|
|
|
.nsettings,
|
2022-05-11 01:15:08 +02:00
|
|
|
.menu-list .list-menu-link,
|
2021-10-18 14:33:23 +02:00
|
|
|
.menu-list a {
|
|
|
|
color: $vikunja-nav-color;
|
|
|
|
}
|
|
|
|
|
|
|
|
.menu-list {
|
|
|
|
li {
|
|
|
|
height: 44px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
2021-10-20 14:33:36 +02:00
|
|
|
&:hover {
|
2021-11-22 22:12:54 +01:00
|
|
|
background: var(--white);
|
2021-10-20 14:33:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
:deep(.dropdown-trigger) {
|
2021-10-18 14:33:23 +02:00
|
|
|
opacity: 0;
|
|
|
|
padding: .5rem;
|
|
|
|
cursor: pointer;
|
|
|
|
transition: $transition;
|
|
|
|
}
|
|
|
|
|
2021-10-20 14:33:36 +02:00
|
|
|
&:hover :deep(.dropdown-trigger) {
|
|
|
|
opacity: 1;
|
2021-10-18 14:33:23 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.flip-list-move {
|
|
|
|
transition: transform $transition-duration;
|
|
|
|
}
|
|
|
|
|
|
|
|
.ghost {
|
2021-11-22 22:12:54 +01:00
|
|
|
background: var(--grey-200);
|
2021-10-18 14:33:23 +02:00
|
|
|
|
|
|
|
* {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-11 01:15:08 +02:00
|
|
|
a:hover {
|
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
.list-menu-link, li > a {
|
2021-10-18 14:33:23 +02:00
|
|
|
padding: 0.75rem .5rem 0.75rem ($navbar-padding * 1.5 - 1.75rem);
|
|
|
|
transition: all 0.2s ease;
|
|
|
|
|
|
|
|
border-radius: 0;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
width: 100%;
|
|
|
|
border-left: $vikunja-nav-selected-width solid transparent;
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
height: 1rem;
|
|
|
|
vertical-align: middle;
|
|
|
|
padding-right: 0.5rem;
|
2022-01-19 07:57:45 +01:00
|
|
|
|
2021-10-18 14:33:23 +02:00
|
|
|
&.handle {
|
|
|
|
opacity: 0;
|
|
|
|
transition: opacity $transition;
|
|
|
|
margin-right: .25rem;
|
|
|
|
cursor: grab;
|
|
|
|
}
|
|
|
|
}
|
2022-01-19 07:57:45 +01:00
|
|
|
|
2021-10-18 14:33:23 +02:00
|
|
|
&:hover .icon.handle {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.router-link-exact-active {
|
2021-11-22 22:12:54 +01:00
|
|
|
color: var(--primary);
|
|
|
|
border-left: $vikunja-nav-selected-width solid var(--primary);
|
2021-10-18 14:33:23 +02:00
|
|
|
|
|
|
|
.icon {
|
2021-11-22 22:12:54 +01:00
|
|
|
color: var(--primary);
|
2021-10-18 14:33:23 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
2021-11-22 22:12:54 +01:00
|
|
|
border-left: $vikunja-nav-selected-width solid var(--primary);
|
2021-10-18 14:33:23 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.logo {
|
2021-11-13 15:16:14 +01:00
|
|
|
display: block;
|
|
|
|
|
2022-06-08 22:55:00 +02:00
|
|
|
padding-left: 1rem;
|
2021-11-13 15:16:14 +01:00
|
|
|
margin-right: 1rem;
|
2022-06-08 22:55:00 +02:00
|
|
|
margin-bottom: 1rem;
|
2021-10-18 14:33:23 +02:00
|
|
|
|
2021-11-13 15:16:14 +01:00
|
|
|
@media screen and (min-width: $tablet) {
|
|
|
|
display: none;
|
2021-10-18 14:33:23 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.namespaces-lists {
|
|
|
|
padding-top: math.div($navbar-padding, 2);
|
|
|
|
}
|
|
|
|
|
|
|
|
.icon {
|
2021-11-22 22:12:54 +01:00
|
|
|
color: var(--grey-400) !important;
|
2021-10-18 14:33:23 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.top-menu {
|
|
|
|
margin-top: math.div($navbar-padding, 2);
|
|
|
|
|
|
|
|
.menu-list {
|
|
|
|
li {
|
|
|
|
font-weight: 500;
|
|
|
|
font-family: $vikunja-font;
|
|
|
|
}
|
|
|
|
|
2022-05-11 01:15:08 +02:00
|
|
|
.list-menu-link, li > a {
|
2021-10-18 14:33:23 +02:00
|
|
|
padding-left: 2rem;
|
|
|
|
display: inline-block;
|
2022-01-19 07:57:45 +01:00
|
|
|
|
2021-10-18 14:33:23 +02:00
|
|
|
.icon {
|
|
|
|
padding-bottom: .25rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-19 17:26:05 +02:00
|
|
|
.list-setting-spacer {
|
2022-05-06 22:07:31 +02:00
|
|
|
width: 2.5rem;
|
2021-05-19 17:26:05 +02:00
|
|
|
flex-shrink: 0;
|
|
|
|
}
|
2022-01-05 13:46:33 +01:00
|
|
|
|
|
|
|
.namespaces-list.loader-container.is-loading {
|
|
|
|
min-height: calc(100vh - #{$navbar-height + 1.5rem + 1rem + 1.5rem});
|
|
|
|
}
|
2021-05-19 17:26:05 +02:00
|
|
|
</style>
|