Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Polish the spot modal to look more like the Primer dialog. Therefore also the option for an closing icon is added

Henriette Darge5be9e46a6acd
diff --git a/frontend/src/app/features/work-packages/components/wp-share-modal/wp-share.modal.html b/frontend/src/app/features/work-packages/components/wp-share-modal/wp-share.modal.html
index e6d05b3abe4..8adbb26e306 100644
--- a/frontend/src/app/features/work-packages/components/wp-share-modal/wp-share.modal.html
+++ b/frontend/src/app/features/work-packages/components/wp-share-modal/wp-share.modal.html
@@ -3,8 +3,18 @@
>
<div
class="spot-modal--header"
- [textContent]="this.text.title"
>
+ <div
+ class="spot-modal--header-title"
+ [textContent]="this.text.title">
+ </div>
+ <svg
+ x-icon
+ class="spot-modal--header-close"
+ size="small"
+ (click)="closeMe($event)"
+ [attr.title]="text.button_close"
+ ></svg>
</div>
<div class="spot-modal--body spot-container">
diff --git a/frontend/src/app/shared/components/icon/icon.module.ts b/frontend/src/app/shared/components/icon/icon.module.ts
index 228c3994808..2ec8b235bec 100644
--- a/frontend/src/app/shared/components/icon/icon.module.ts
+++ b/frontend/src/app/shared/components/icon/icon.module.ts
@@ -1,13 +1,17 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { OpIconComponent } from './icon.component';
-import { ShareAndroidIconComponent } from '@openproject/octicons-angular';
+import {
+ ShareAndroidIconComponent,
+ XIconComponent,
+} from '@openproject/octicons-angular';
@NgModule({
imports: [
CommonModule,
ShareAndroidIconComponent,
+ XIconComponent,
],
declarations: [
OpIconComponent,
@@ -18,6 +22,7 @@ import { ShareAndroidIconComponent } from '@openproject/octicons-angular';
OpIconComponent,
ShareAndroidIconComponent,
+ XIconComponent,
],
})
export class IconModule {}
diff --git a/frontend/src/app/spot/styles/sass/components/action-bar.sass b/frontend/src/app/spot/styles/sass/components/action-bar.sass
index 53c71cf3d54..89f88adc337 100644
--- a/frontend/src/app/spot/styles/sass/components/action-bar.sass
+++ b/frontend/src/app/spot/styles/sass/components/action-bar.sass
@@ -1,7 +1,6 @@
.spot-action-bar
display: grid
grid-template-columns: 1fr
- background-color: $spot-color-basic-gray-6
padding: 0 $spot-spacing-1
a.button
diff --git a/frontend/src/app/spot/styles/sass/components/modal-close-button.sass b/frontend/src/app/spot/styles/sass/components/modal-close-button.sass
deleted file mode 100644
index a024bd60aa9..00000000000
--- a/frontend/src/app/spot/styles/sass/components/modal-close-button.sass
+++ /dev/null
@@ -1,9 +0,0 @@
-.spot-modal-close-button
- display: block
- margin: 1rem
-
- @media (min-width: 680px)
- display: none
-
- @media (max-height: 480px)
- align-self: end
diff --git a/frontend/src/app/spot/styles/sass/components/modal-overlay.sass b/frontend/src/app/spot/styles/sass/components/modal-overlay.sass
index ccaee58d232..d17d0842ed0 100644
--- a/frontend/src/app/spot/styles/sass/components/modal-overlay.sass
+++ b/frontend/src/app/spot/styles/sass/components/modal-overlay.sass
@@ -5,7 +5,7 @@
right: 0
bottom: 0
@include spot-z-index("drop-modal")
- background: rgba(0, 0, 0, 0.75)
+ background: rgba(0, 0, 0, 0.5)
justify-content: center
align-items: center
display: none
diff --git a/frontend/src/app/spot/styles/sass/components/modal.sass b/frontend/src/app/spot/styles/sass/components/modal.sass
index 46741adc7a4..6f8bbaaca5f 100644
--- a/frontend/src/app/spot/styles/sass/components/modal.sass
+++ b/frontend/src/app/spot/styles/sass/components/modal.sass
@@ -1,4 +1,3 @@
-@import './modal-close-button'
@import './modal-overlay'
@import './modal-overrides'
@@ -11,7 +10,7 @@
background: white
pointer-events: all
- border-radius: $spot-spacing-0-25
+ border-radius: $spot-spacing-0-75
width: 40rem
max-width: calc(100vw - 2rem)
@@ -44,12 +43,13 @@
> .spot-icon
margin-right: $spot-spacing-0-5
- &-button
- font-weight: normal
-
&-title
flex-grow: 1
+ &-close
+ &:hover
+ cursor: pointer
+
&_highlight
background-color: var(--header-bg-color)
border-bottom-width: var(--header-border-bottom-width)