Browse Source
Merge pull request #12926 from nextcloud/fix/raise-hand-animation
Merge pull request #12926 from nextcloud/fix/raise-hand-animation
fix(TopBar): hand raised button animationpull/12925/head
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 103 additions and 65 deletions
-
9src/components/MediaSettings/MediaSettingsTabs.vue
-
78src/components/MediaSettings/TransitionExpand.vue
-
49src/components/MediaSettings/TransitionExpandDown.vue
-
32src/components/TopBar/TopBarMenu.vue
@ -0,0 +1,78 @@ |
|||
<!-- |
|||
- SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors |
|||
- SPDX-License-Identifier: AGPL-3.0-or-later |
|||
--> |
|||
|
|||
<script setup lang="ts"> |
|||
defineProps<{ |
|||
show: boolean, |
|||
direction: 'vertical' | 'horizontal', |
|||
}>() |
|||
|
|||
const emit = defineEmits<{ |
|||
(event: 'after-enter'): void, |
|||
(event: 'after-leave'): void, |
|||
}>() |
|||
</script> |
|||
|
|||
<template> |
|||
<Transition :name="`expand-${direction}`" |
|||
@after-enter="emit('after-enter')" |
|||
@after-leave="emit('after-leave')"> |
|||
<div v-show="show" class="expand-wrapper"> |
|||
<div class="expand-wrapper__content"> |
|||
<slot /> |
|||
</div> |
|||
</div> |
|||
</Transition> |
|||
</template> |
|||
|
|||
<style lang="scss" scoped> |
|||
.expand-wrapper { |
|||
display: grid; |
|||
grid-template-rows: 1fr; |
|||
grid-template-columns: 1fr; |
|||
|
|||
&__content { |
|||
overflow: hidden; |
|||
} |
|||
} |
|||
|
|||
/* |
|||
* Vertical expand transition |
|||
*/ |
|||
|
|||
.expand-vertical-enter-active, |
|||
.expand-vertical-leave-active { |
|||
transition: grid-template-rows ease var(--animation-slow); |
|||
} |
|||
|
|||
.expand-vertical-enter, |
|||
.expand-vertical-leave-to { |
|||
grid-template-rows: 0fr; |
|||
} |
|||
|
|||
.expand-vertical-enter-to, |
|||
.expand-vertical-leave { |
|||
grid-template-rows: 1fr; |
|||
} |
|||
|
|||
/* |
|||
* Horizontal expand transition |
|||
*/ |
|||
|
|||
.expand-horizontal-enter-active, |
|||
.expand-horizontal-leave-active { |
|||
transition: grid-template-columns ease var(--animation-slow); |
|||
} |
|||
|
|||
.expand-horizontal-enter, |
|||
.expand-horizontal-leave-to { |
|||
grid-template-columns: 0fr; |
|||
} |
|||
|
|||
.expand-horizontal-enter-to, |
|||
.expand-horizontal-leave { |
|||
grid-template-columns: 1fr; |
|||
} |
|||
</style> |
|||
@ -1,49 +0,0 @@ |
|||
<!-- |
|||
- SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors |
|||
- SPDX-License-Identifier: AGPL-3.0-or-later |
|||
--> |
|||
|
|||
<script setup lang="ts"> |
|||
defineProps<{ |
|||
show: boolean, |
|||
}>() |
|||
|
|||
const emit = defineEmits<{ |
|||
(event: 'after-enter'): void, |
|||
(event: 'after-leave'): void, |
|||
}>() |
|||
</script> |
|||
|
|||
<template> |
|||
<Transition name="expand-down" |
|||
@after-enter="emit('after-enter')" |
|||
@after-leave="emit('after-leave')"> |
|||
<div v-show="show" class="expand-down-wrapper"> |
|||
<slot /> |
|||
</div> |
|||
</Transition> |
|||
</template> |
|||
|
|||
<style scoped> |
|||
.expand-down-wrapper { |
|||
display: grid; |
|||
grid-template-rows: 1fr; |
|||
grid-template-columns: 1fr; |
|||
overflow: hidden; |
|||
} |
|||
|
|||
.expand-down-enter-active, |
|||
.expand-down-leave-active { |
|||
transition: grid-template-rows ease var(--animation-slow); |
|||
} |
|||
|
|||
.expand-down-enter, |
|||
.expand-down-leave-to { |
|||
grid-template-rows: 0fr; |
|||
} |
|||
|
|||
.expand-down-enter-to, |
|||
.expand-down-leave { |
|||
grid-template-rows: 1fr; |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue