-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #981 from geonetwork/ME/polish-ui
[Editor] : Polish editor form
- Loading branch information
Showing
81 changed files
with
697 additions
and
438 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
62 changes: 26 additions & 36 deletions
62
apps/metadata-editor/src/app/edit/components/page-selector/page-selector.component.html
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,46 +1,36 @@ | ||
<div | ||
class="w-full flex flex-row p-8 items-center gap-6" | ||
class="w-full flex flex-row items-center gap-[8px]" | ||
data-test="pageSelectorButtons" | ||
> | ||
<ng-container | ||
*ngFor="let page of pages$ | async; let index = index; let isLast = last" | ||
> | ||
<div class="flex flex-row items-center gap-4"> | ||
<div class="flex flex-row items-center gap-4 hover:cursor-pointer"> | ||
<gn-ui-button | ||
(buttonClick)="pageSectionClickHandler(index)" | ||
class="flex flex-row items-center" | ||
[type]=" | ||
(facade.currentPage$ | async) === index ? 'primary' : 'default' | ||
" | ||
extraClass="bg-transparent border-none" | ||
> | ||
<div | ||
class="w-10 h-10 rounded-[8px] pt-3 text-center" | ||
[ngClass]=" | ||
(facade.currentPage$ | async) === index | ||
? 'bg-primary font-bold' | ||
: 'bg-gray-200' | ||
" | ||
> | ||
{{ index + 1 }} | ||
</div> | ||
<div | ||
class="ms-4" | ||
[ngClass]=" | ||
(facade.currentPage$ | async) === index | ||
? 'text-center text-black font-bold' | ||
: 'text-gray-400' | ||
" | ||
translate | ||
> | ||
{{ page.labelKey }} | ||
</div> | ||
</gn-ui-button> | ||
<gn-ui-button | ||
(buttonClick)="pageSectionClickHandler(index)" | ||
class="flex flex-row items-center" | ||
type="light" | ||
extraClass="bg-transparent border-none" | ||
style="--gn-ui-button-padding: 0 16px 0 0" | ||
*ngrxLet="isCurrentPage(index) as isCurrentPage" | ||
> | ||
<div | ||
class="w-[40px] h-[40px] rounded-[8px] grid items-center font-bold transition-colors" | ||
data-test="page-number" | ||
[ngClass]="isCurrentPage ? 'bg-primary text-white' : 'bg-gray-200'" | ||
> | ||
{{ index + 1 }} | ||
</div> | ||
<div *ngIf="!isLast" class="w-10"> | ||
<hr class="border-t-[2px]" /> | ||
<div | ||
class="ms-[16px] transition-colors" | ||
[ngClass]="isCurrentPage ? 'text-black font-bold' : 'text-gray-600'" | ||
translate | ||
> | ||
{{ page.labelKey }} | ||
</div> | ||
</div> | ||
</gn-ui-button> | ||
<div | ||
*ngIf="!isLast" | ||
class="w-10 mr-[8px] border-t-[2px] border-gray-500" | ||
></div> | ||
</ng-container> | ||
</div> |
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
69 changes: 39 additions & 30 deletions
69
apps/metadata-editor/src/app/edit/edit-page.component.html
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,33 +1,42 @@ | ||
<div class="flex flex-col h-full"> | ||
<div class="w-full h-auto shrink-0"> | ||
<md-editor-top-toolbar></md-editor-top-toolbar> | ||
<md-editor-page-selector></md-editor-page-selector> | ||
</div> | ||
<div class="grow overflow-auto relative"> | ||
<div class="absolute top-0 left-0 w-2/3 z-10 pointer-events-none"> | ||
<gn-ui-notifications-container></gn-ui-notifications-container> | ||
<div class="flex flex-row h-full"> | ||
<aside class="w-[370px] shrink-0 border-r"> | ||
<md-editor-sidebar></md-editor-sidebar> | ||
</aside> | ||
<div class="flex flex-col h-full w-full"> | ||
<div class="w-full h-auto shrink-0 relative"> | ||
<md-editor-top-toolbar></md-editor-top-toolbar> | ||
<div class="absolute top-full left-0 w-2/3 z-10 pointer-events-none"> | ||
<gn-ui-notifications-container></gn-ui-notifications-container> | ||
</div> | ||
</div> | ||
<div class="grow overflow-auto p-[32px]" #scrollContainer> | ||
<div class="container-lg mx-auto flex flex-col gap-[32px]"> | ||
<md-editor-page-selector></md-editor-page-selector> | ||
<gn-ui-record-form></gn-ui-record-form> | ||
<div | ||
data-test="previousNextPageButtons" | ||
class="mt-auto flex flex-row justify-between" | ||
> | ||
<gn-ui-button | ||
type="gray" | ||
(buttonClick)="previousPageButtonHandler()" | ||
translate | ||
> | ||
{{ | ||
(currentPage$ | async) === 0 | ||
? ('editor.record.form.bottomButtons.comeBackLater' | translate) | ||
: ('editor.record.form.bottomButtons.previous' | translate) | ||
}} | ||
</gn-ui-button> | ||
<gn-ui-button | ||
type="primary" | ||
(buttonClick)="nextPageButtonHandler()" | ||
[disabled]="isLastPage$ | async" | ||
> | ||
<span translate>editor.record.form.bottomButtons.next</span> | ||
</gn-ui-button> | ||
</div> | ||
</div> | ||
</div> | ||
<gn-ui-record-form></gn-ui-record-form> | ||
</div> | ||
<div | ||
data-test="previousNextPageButtons" | ||
class="p-8 mt-auto flex flex-row justify-between" | ||
> | ||
<gn-ui-button | ||
type="secondary" | ||
(buttonClick)="previousPageButtonHandler()" | ||
translate | ||
> | ||
{{ | ||
(currentPage$ | async) === 0 | ||
? ('editor.record.form.bottomButtons.comeBackLater' | translate) | ||
: ('editor.record.form.bottomButtons.previous' | translate) | ||
}} | ||
</gn-ui-button> | ||
<gn-ui-button type="primary" (buttonClick)="nextPageButtonHandler()" | ||
><span translate | ||
>editor.record.form.bottomButtons.next</span | ||
></gn-ui-button | ||
> | ||
</div> | ||
</div> |
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.