-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MS] Improve file viewer specific components
- replace FileViewerActionBar by new FileControls - replace MsActionBarButton by new FileControlsButton - replace actions prop by slot usage
- Loading branch information
Showing
10 changed files
with
150 additions
and
85 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- Parsec Cloud (https://parsec.cloud) Copyright (c) BUSL-1.1 2016-present Scille SAS --> | ||
|
||
<template> | ||
<ion-item-divider class="toolbar ion-margin-bottom secondary file-controls"> | ||
<slot /> | ||
</ion-item-divider> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { IonItemDivider } from '@ionic/vue'; | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
.file-controls { | ||
padding: 0.5rem 1rem; | ||
width: fit-content; | ||
background: var(--parsec-color-light-primary-100); | ||
border-radius: 5em; | ||
box-shadow: var(--parsec-shadow-light); | ||
border-bottom: 1px solid var(--parsec-color-light-secondary-medium); | ||
--inner-padding-end: 0; | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<!-- Parsec Cloud (https://parsec.cloud) Copyright (c) BUSL-1.1 2016-present Scille SAS --> | ||
|
||
<template> | ||
<ion-button | ||
class="file-controls-button button-medium" | ||
size="default" | ||
> | ||
<ion-icon | ||
class="file-controls-button-icon" | ||
v-if="icon" | ||
slot="start" | ||
:icon="icon" | ||
/> | ||
<ms-image | ||
class="file-controls-button-icon" | ||
v-if="!icon && image" | ||
:image="image" | ||
/> | ||
{{ $msTranslate(label) }} | ||
</ion-button> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { MsImage, Translatable } from 'megashark-lib'; | ||
import { IonButton, IonIcon } from '@ionic/vue'; | ||
|
||
defineProps<{ | ||
label?: Translatable; | ||
icon?: string; | ||
image?: string; | ||
}>(); | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.file-controls-button { | ||
--background: none !important; | ||
--background-hover: none !important; | ||
margin-inline: 0px; | ||
margin-top: 0px; | ||
margin-bottom: 0px; | ||
--padding-top: 0.25rem; | ||
--padding-end: 0.5rem; | ||
--padding-bottom: 0.25rem; | ||
--padding-start: 0.5rem; | ||
height: 3em; | ||
width: fit-content; | ||
border-radius: 100%; | ||
color: var(--parsec-color-light-primary-600); | ||
opacity: 0.6; | ||
scale: 1; | ||
transition: all 0.2s ease-in-out; | ||
|
||
&:hover { | ||
scale: 1.1; | ||
opacity: 1; | ||
} | ||
|
||
&-icon { | ||
margin-inline: 0em; | ||
margin-right: 0.375rem; | ||
} | ||
} | ||
</style> |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
// Parsec Cloud (https://parsec.cloud) Copyright (c) BUSL-1.1 2016-present Scille SAS | ||
|
||
import FileViewerActionBar from '@/components/viewers/FileViewerActionBar.vue'; | ||
import FileControls from '@/components/viewers/FileControls.vue'; | ||
import FileControlsButton from '@/components/viewers/FileControlsButton.vue'; | ||
|
||
export { FileViewerActionBar }; | ||
export { FileControls, FileControlsButton }; |
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
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