-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 4754-notebook-re-run-notifications
- Loading branch information
Showing
29 changed files
with
448 additions
and
224 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
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
64 changes: 64 additions & 0 deletions
64
packages/client/hmi-client/src/components/widgets/tera-pdf-panel.vue
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,64 @@ | ||
<template> | ||
<TabView v-if="pdfs?.length" class="container"> | ||
<TabPanel :header="pdf.name" v-for="pdf in pdfs" :key="pdf.name"> | ||
<tera-pdf-embed v-if="pdf.isPdf" :pdf-link="pdf.data" :title="pdf.name || ''" /> | ||
<tera-text-editor v-else :initial-text="pdf.data" /> | ||
</TabPanel> | ||
</TabView> | ||
</template> | ||
<script setup lang="ts"> | ||
import { ref } from 'vue'; | ||
import TabView from 'primevue/tabview'; | ||
import TabPanel from 'primevue/tabpanel'; | ||
import TeraPdfEmbed from '@/components/widgets/tera-pdf-embed.vue'; | ||
import TeraTextEditor from '@/components/documents/tera-text-editor.vue'; | ||
import type { DocumentAsset } from '@/types/Types'; | ||
interface PdfData { | ||
document: DocumentAsset; | ||
data: string; | ||
isPdf: boolean; | ||
name: string; | ||
} | ||
const props = defineProps<{ | ||
pdfs: PdfData[]; | ||
}>(); | ||
const pdfs = ref<PdfData[]>(props.pdfs); | ||
</script> | ||
<style scoped> | ||
.container { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1; | ||
} | ||
:deep(.p-tabview) { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1; | ||
} | ||
:deep(.p-tabview-panels) { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1; | ||
} | ||
:deep(.p-tabview-panel) { | ||
flex: 1; | ||
} | ||
:deep(.p-tabview-header) { | ||
max-width: 150px; | ||
} | ||
:deep(.p-tabview-title) { | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
} | ||
</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
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
Oops, something went wrong.