Skip to content

Commit

Permalink
feat(OrganisationLogo): Add a size option for OrganisationLogo in app…
Browse files Browse the repository at this point in the history
…lication metadata
  • Loading branch information
mikaelrss committed Sep 14, 2023
1 parent 5317f22 commit e5cca57
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/Altinn.App.Core/Models/Logo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,11 @@ public class Logo
[JsonProperty(PropertyName = "source")]
public string? Source { get; set; }

/// <summary>
/// Specifies from where the logo url should be fetched
/// Can have the values 'small', 'medium', or 'large'
/// </summary>
[JsonProperty(PropertyName = "size")]
public string Size { get; set; } = "small";
}
}
3 changes: 2 additions & 1 deletion test/Altinn.App.Core.Tests/Internal/App/AppMedataTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@ public async Task GetApplicationMetadata_logo_can_intstantiate_with_source_and_D
Logo = new Logo
{
Source = "org",
DisplayAppOwnerNameInHeader = true
DisplayAppOwnerNameInHeader = true,
Size = "medium"
},
Features = enabledFrontendFeatures
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
"logo": {
"displayAppOwnerNameInHeader": true,
"source": "org"
"source": "org",
"size": "medium"
}
}

0 comments on commit e5cca57

Please sign in to comment.