Skip to content

Commit

Permalink
IVYPORTAL-17306 Welcome Widget Dark Mode Support
Browse files Browse the repository at this point in the history
- Handle feedback
  • Loading branch information
chnam-axonivy committed Jan 13, 2025
1 parent 1c16022 commit 4465bae
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,10 @@ private void updateWelcomeWidget(DashboardWidget widget) {
tempImageFileDarkMode.delete();
}
}
if (!welcomeWidget.isGreeting()) {
welcomeWidget.setWelcomeTexts(new ArrayList<>());
welcomeWidget.setWelcomeText("");
}
}

private void updateCaseWidget(DashboardWidget widget) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
onvalidationfailure="handleUploadFileFail();"/>
</div>
<div class="ui-g-12">
<p:outputPanel id="image-light-upload-file-panel" styleClass="ui-document-upload-file-panel">
<p:outputPanel id="image-light-upload-file-panel" styleClass="ui-welcome-upload-file-panel">
<span class="ui-document-upload-file-label">
<i class="si si-file-code-upload-1" id="image-light-upload-file-icon" />
<p:outputLabel value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/taskDetails/addDocumentHelpText')}">
Expand Down Expand Up @@ -126,7 +126,7 @@
onvalidationfailure="handleUploadFileFail();"/>
</div>
<div class="ui-g-12">
<p:outputPanel id="image-dark-upload-file-panel" styleClass="ui-document-upload-file-panel">
<p:outputPanel id="image-dark-upload-file-panel" styleClass="ui-welcome-upload-file-panel">
<span class="ui-document-upload-file-label">
<i class="si si-file-code-upload-1" id="image-dark-upload-file-icon" />
<p:outputLabel value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/taskDetails/addDocumentHelpText')}">
Expand Down Expand Up @@ -218,19 +218,21 @@
value="#{dashboardWelcomeWidgetConfigurationBean.widget.welcomeTexts}" varStatus="status">
<c:set var="isApplicationDefaultEmailLanguage"
value="#{dashboardWelcomeWidgetConfigurationBean.isApplicationDefaultEmailLanguage(text.locale.toLanguageTag())}" />
<div class="ui-g-3 ui-md-4">
<p:outputLabel
value="#{text.locale.getDisplayName()} #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/dashboard/configuration/WelcomeWidget/DisplayedText')}"
for="welcome-text-input" styleClass="welcome-text-label" />
</div>
<h:panelGroup id="welcome-text-input-panel" styleClass="ui-g-9 ui-md-8 welcome-text-input-panel"
layout="block">
<h:panelGroup id="welcome-text-input-panel" styleClass=""
layout="block" rendered="#{dashboardWelcomeWidgetConfigurationBean.widget.isGreeting()}">
<div class="ui-g-3 ui-md-4">
<p:outputLabel
value="#{text.locale.getDisplayName()} #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/dashboard/configuration/WelcomeWidget/DisplayedText')}"
for="welcome-text-input" styleClass="welcome-text-label" />
</div>
<div class="ui-g-9 ui-md-8 welcome-text-input-panel">
<h:outputText value="#{dashboardWelcomeWidgetConfigurationBean.generateGreetingText(text.locale)}"
rendered="#{dashboardWelcomeWidgetConfigurationBean.widget.greeting}"
styleClass="js-greeting-text greeting-text #{isApplicationDefaultEmailLanguage ? 'language-to-preview' : ''}" />
<p:inputText id="welcome-text-input" value="#{text.value}"
styleClass="#{isApplicationDefaultEmailLanguage ? 'language-to-preview' : ''} js-welcome-text-input welcome-text-input"
onkeyup="#{isApplicationDefaultEmailLanguage ? 'WelcomeWidgetConfiguration.updatePreviewText();' : ''}" />
</div>
</h:panelGroup>
</ui:repeat>
</h:panelGroup>
Expand Down
13 changes: 12 additions & 1 deletion AxonIvyPortal/portal/webContent/resources/css/module.css
Original file line number Diff line number Diff line change
Expand Up @@ -5633,7 +5633,18 @@ a.dashboard-action-container label {
display: flex;
}

.ui-external-link-preview-image-panel > .ui-external-link-preview-image-label, .ui-dashboard-upload-file-panel > .ui-dashboard-upload-file-label, .ui-document-upload-file-panel > .ui-document-upload-file-label {
.ui-welcome-upload-file-panel {
width: 100%;
border: 1px solid var(--process-list-item-border-color);
background-color: var(--ui-fileupload-buttonbar-background-color);
border-radius: 10px;
height: 8em;
align-items: center;
display: flex;

}

.ui-external-link-preview-image-panel > .ui-external-link-preview-image-label, .ui-dashboard-upload-file-panel > .ui-dashboard-upload-file-label, .ui-document-upload-file-panel > .ui-document-upload-file-label, .ui-welcome-upload-file-panel > .ui-document-upload-file-label {
width: 42%;
display: block;
text-align: center;
Expand Down

0 comments on commit 4465bae

Please sign in to comment.