Skip to content

Commit

Permalink
Merge pull request #12 from camptocamp/fix-icons
Browse files Browse the repository at this point in the history
Fix icons
  • Loading branch information
tkohr authored Feb 8, 2024
2 parents a155970 + 7d3cbc8 commit b351dac
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
8 changes: 4 additions & 4 deletions apps/datahub-e2e/src/e2e/dataset.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('datasets', () => {
cy.get('mel-datahub-text-expand')
.find('mel-datahub-button-primary')
.find('img')
.should('have.attr', 'src', '/assets/icons/arrow.svg')
.should('have.attr', 'src', 'assets/icons/arrow.svg')
cy.get('mel-datahub-text-expand')
.find('.bg-gradient-to-b')
.should('have.css', 'max-height', '72px')
Expand All @@ -63,7 +63,7 @@ describe('datasets', () => {
cy.get('mel-datahub-text-expand')
.find('mel-datahub-button-primary')
.find('img')
.should('have.attr', 'src', '/assets/icons/arrow-up.svg')
.should('have.attr', 'src', 'assets/icons/arrow-up.svg')
cy.get('mel-datahub-text-expand')
.find('.bg-gradient-to-b')
.should('not.exist')
Expand All @@ -83,11 +83,11 @@ describe('datasets', () => {
cy.get('mel-datahub-button-primary').eq(0).as('favoriteButton')
cy.get('@favoriteButton')
.find('img')
.should('have.attr', 'src', '/assets/icons/heart.svg')
.should('have.attr', 'src', 'assets/icons/heart.svg')
cy.get('@favoriteButton').click()
cy.get('@favoriteButton')
.find('img')
.should('have.attr', 'src', '/assets/icons/heart-filled.svg')
.should('have.attr', 'src', 'assets/icons/heart-filled.svg')
})
})
})
5 changes: 5 additions & 0 deletions apps/datahub/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
FeatureCatalogModule,
FeatureRecordModule,
FeatureSearchModule,
LOGIN_URL,
provideGn4,
provideRepositoryUrl,
RouterService,
Expand Down Expand Up @@ -123,6 +124,10 @@ import { TextExpandComponent } from './common/text-expand/text-expand.component'
importProvidersFrom(FeatureAuthModule),
provideGn4(),
provideRepositoryUrl(() => '/geonetwork/srv/api'),
{
provide: LOGIN_URL,
useFactory: () => '${current_url}?login',
},
{ provide: RouterService, useClass: AppRouterService },
],
bootstrap: [AppComponent],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<button
class="h-11 flex justify-center items-center gap-2 text-white text-[15px] font-extrabold leading-[18px] py-2 px-[18px] rounded border hover:bg-primary-dark"
[class]="disabled ? 'bg-primary-light' : 'bg-primary'"
class="h-11 flex justify-center items-center gap-2 text-white text-[15px] font-extrabold leading-[18px] py-2 px-[18px] rounded border"
[class]="disabled ? 'bg-primary-light' : 'bg-primary hover:bg-primary-dark'"
[disabled]="disabled"
>
{{ label }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class ButtonPrimaryComponent {
@Input() label: string
@Input() set icon(fileName: string) {
if (fileName) {
this.src = `/assets/icons/${fileName}.svg`
this.src = `assets/icons/${fileName}.svg`
this.placeholder = fileName
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<span class="text-[12px] font-bold">{{
(qualityScore / 10).toFixed(1)
}}</span>
<img [src]="'/assets/info.svg'" [alt]="'info'" />
<img [src]="'assets/icons/info.svg'" [alt]="'info'" />
</div>

<div
Expand Down
File renamed without changes

0 comments on commit b351dac

Please sign in to comment.