Skip to content

Commit

Permalink
Merge pull request #2111 from solliancenet/ah-ui-chat-print-improvement
Browse files Browse the repository at this point in the history
Improved Print Functionality for User Portal
  • Loading branch information
ciprianjichici authored Jan 3, 2025
2 parents cc4f95b + 1c9950f commit 404ea9a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/ui/UserPortal/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,16 @@ main {
display: none !important;
}
.message-row, .message__body {
page-break-inside: avoid;
page-break-after: auto;
.message-row {
// page-break-inside: avoid;
// page-break-after: auto;
margin-bottom: 1rem;
}
.message__body {
overflow-wrap: break-word !important;
word-break: break-word !important;
}
}
</style>
26 changes: 26 additions & 0 deletions src/ui/UserPortal/components/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@
aria-activedescendant="selected-agent-{{ agentSelection?.label }}"
@change="handleAgentChange"
/>
<Button
class="print-button"
@click="handlePrint"
aria-label="Print"
icon="pi pi-print"
/>
</span>
</template>
</div>
Expand Down Expand Up @@ -193,6 +199,10 @@ export default {
await this.$authStore.logout();
},
handlePrint() {
window.print();
},
async setAgentOptions() {
this.agentOptions = this.$appStore.agents.map((agent) => ({
label: agent.resource.name,
Expand Down Expand Up @@ -371,6 +381,10 @@ export default {
box-shadow: 0 0 0 0.1rem #fff;
}
.print-button {
margin-left: 8px;
}
.no-agents {
position: fixed;
top: 60px;
Expand Down Expand Up @@ -418,6 +432,18 @@ export default {
}
}
@media only screen and (max-width: 500px) {
.dropdown--agent {
max-width: 200px;
}
}
@media only screen and (max-width: 450px) {
.dropdown--agent {
max-width: 160px;
}
}
.p-dropdown-items-wrapper {
max-height: 300px !important;
}
Expand Down

0 comments on commit 404ea9a

Please sign in to comment.