Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions server/mergin/sync/public_api_v2_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ def get_project(id, files_at_version=None):
"""Get project info. Include list of files at specific version if requested."""
project = require_project_by_uuid(id, ProjectPermissions.Read, expose=False)
data = ProjectSchemaV2().dump(project)

if files_at_version:
pv = ProjectVersion.query.filter_by(
project_id=project.id, name=ProjectVersion.from_v_name(files_at_version)
Expand Down
43 changes: 29 additions & 14 deletions web-app/packages/lib/src/common/components/AppPanelToggleable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,40 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-MerginMaps-Commercial

<script lang="ts" setup>
import { PanelProps } from 'primevue/panel'
import { ref, computed } from 'vue'
import { ref, computed, useSlots } from 'vue'

const props = defineProps<PanelProps>()
const collapsed = ref(props.collapsed)
const slots = useSlots()

const pt = computed(() => ({
header: {
class: [
'surface-section border-none cursor-pointer',
// Toggle border radius by open / closed panel
collapsed.value ? 'border-round-2xl' : 'border-round-top-2xl',
props.pt?.header?.class ?? 'p-4'
],
onclick: headerClick
},
content: {
class: 'border-none border-round-bottom-2xl p-4 pt-0'
const pt = computed(() => {
const hasFooterSlot = Boolean(slots.footer)

return {
header: {
class: [
'surface-section border-none cursor-pointer',
// Toggle border radius by open / closed panel
collapsed.value ? 'border-round-2xl' : 'border-round-top-2xl',
props.pt?.header?.class ?? 'p-4'
],
onclick: headerClick
},
content: {
class: [
'border-none p-4 pt-0',
hasFooterSlot ? '' : 'border-round-bottom-2xl'
]
},
...(hasFooterSlot
? {
footer: {
class: 'border-none border-round-bottom-2xl p-4 pt-0'
}
}
: {})
}
}))
})

function headerClick() {
collapsed.value = !collapsed.value
Expand Down
Loading