-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4362 from manuelmeister/feature/admin-activity-im…
…prove Improve admin activity section
- Loading branch information
Showing
31 changed files
with
986 additions
and
600 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<template> | ||
<v-tooltip bottom> | ||
<template #activator="{ on }"> | ||
<v-btn | ||
text | ||
icon | ||
class="ec-paper-size-toggle d-none d-md-block" | ||
:aria-label=" | ||
value | ||
? $tc('components.activity.togglePaperSize.switchToFullSize') | ||
: $tc('components.activity.togglePaperSize.switchToPaperSize') | ||
" | ||
v-bind="buttonProps" | ||
@click="$emit('input', !value)" | ||
v-on="on" | ||
> | ||
<v-icon v-if="value" class="resize-icon">$vuetify.icons.bigScreen </v-icon> | ||
<v-icon v-else class="resize-icon">$vuetify.icons.paperSize</v-icon> | ||
</v-btn> | ||
</template> | ||
{{ | ||
value | ||
? $tc('components.activity.togglePaperSize.switchToFullSize') | ||
: $tc('components.activity.togglePaperSize.switchToPaperSize') | ||
}} | ||
</v-tooltip> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'TogglePaperSize', | ||
props: { | ||
value: { type: Boolean, default: false }, | ||
buttonProps: { type: Object, default: () => ({}) }, | ||
}, | ||
} | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
.resize-icon, | ||
.resize-icon :deep(svg) { | ||
width: 28px !important; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { ref, onMounted, nextTick } from 'vue' | ||
|
||
export function useDisplaySize() { | ||
const isPaperDisplaySize = ref( | ||
localStorage.getItem('activityIsPaperDisplaySize') !== 'false' | ||
) | ||
|
||
const isLocalPaperDisplaySize = ref(isPaperDisplaySize.value) | ||
|
||
onMounted(() => { | ||
isPaperDisplaySize.value = | ||
localStorage.getItem('activityIsPaperDisplaySize') !== 'false' | ||
isLocalPaperDisplaySize.value = isPaperDisplaySize.value | ||
}) | ||
|
||
function toggleDisplaySize() { | ||
isPaperDisplaySize.value = !isPaperDisplaySize.value | ||
nextTick(() => { | ||
isLocalPaperDisplaySize.value = isPaperDisplaySize.value | ||
}) | ||
localStorage.setItem('activityIsPaperDisplaySize', `${isPaperDisplaySize.value}`) | ||
} | ||
|
||
return { | ||
isPaperDisplaySize, | ||
isLocalPaperDisplaySize, | ||
toggleDisplaySize, | ||
} | ||
} |
Oops, something went wrong.