Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Settings modal incorrect behaviour #2361

Merged
merged 43 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
db5b5ba
Boostrapped React-based admin panel.
alzaslon Feb 9, 2023
3eaab4a
Merge branch 'master' of https://github.com/Azure/api-management-deve…
jsorohova Feb 12, 2023
0334e9d
Navigation top level
jsorohova Feb 13, 2023
cf371f0
Navigation - pages
jsorohova Feb 14, 2023
ee7cda7
Pages navigation item
jsorohova Feb 28, 2023
c1cdb69
Delete confirmation code improvement
jsorohova Feb 28, 2023
bf3c7bd
Navigation 'Navigation' item
jsorohova Mar 6, 2023
c0c1f39
Settings and Help navigation items, Top panel
jsorohova Mar 7, 2023
181e80c
Page/Layout modals
jsorohova Mar 14, 2023
b42d75a
Media modal
jsorohova Mar 29, 2023
8842df5
Media modals
jsorohova May 19, 2023
9f3d2a6
Merge conflict fixes
jsorohova May 19, 2023
ca13e11
Merge branch 'master' of https://github.com/Azure/api-management-deve…
jsorohova May 23, 2023
9b94bde
Focused layout
jsorohova May 25, 2023
90b2aa7
Merge branch 'master' of https://github.com/Azure/api-management-deve…
jsorohova May 28, 2023
cfa92de
Styles and Custom widgets items
jsorohova May 31, 2023
c0a2bca
Mobile styles
jsorohova Jun 3, 2023
522b60c
URLs navigation item
jsorohova Jun 10, 2023
62475bc
Toast notifications
jsorohova Jun 12, 2023
38b82fd
Site menu
jsorohova Jun 14, 2023
803daa1
Favicon upload
jsorohova Jun 14, 2023
7e4b65e
Popups item
jsorohova Jun 14, 2023
027dab9
Merged master
jsorohova Jun 19, 2023
39b0929
Onboarding modal
jsorohova Jun 27, 2023
6c6fcea
Components updates
jsorohova Jul 14, 2023
01e6114
Merge branch 'master' of https://github.com/Azure/api-management-deve…
jsorohova Jul 17, 2023
2b11227
Merged master branch
jsorohova Aug 14, 2023
6a74d90
Anchors and bug fixes
jsorohova Sep 6, 2023
85b7fb7
Content changes
jsorohova Sep 9, 2023
c1ea0c7
Merged master branch
jsorohova Sep 20, 2023
42213f2
Merge branch 'master' of https://github.com/Azure/api-management-deve…
jsorohova Sep 20, 2023
8f329d9
Validation implementation
jsorohova Sep 28, 2023
446a915
Reset content flow restyling
jsorohova Sep 28, 2023
06ec0f6
Pagination support
jsorohova Sep 28, 2023
9e21876
Loaders and content changes
jsorohova Oct 6, 2023
8b836fc
Permalink validation fixes
jsorohova Oct 6, 2023
403190d
Merge branch 'master' of https://github.com/Azure/api-management-deve…
jsorohova Oct 6, 2023
2c87b7d
Feedback link change
jsorohova Oct 10, 2023
a78d254
Merge branch 'master' of https://github.com/Azure/api-management-deve…
jsorohova Nov 15, 2023
523be48
Merge branch 'master' of https://github.com/Azure/api-management-deve…
jsorohova Nov 24, 2023
807006c
Accessibility fixes
jsorohova Nov 27, 2023
27700a3
Merge branch 'master' of https://github.com/Azure/api-management-deve…
jsorohova Dec 14, 2023
3ffe9ff
Fixed Settings modal incorrect behaviour
jsorohova Dec 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/admin/media/mediaSelectionItemModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class MediaSelectionItemModal extends React.Component<MediaSelectionItemM
const thumbnailUrl: string = this.getThumbnailUrl(mediaItem);

return (
<div className="media-box media-selection-block" onClick={() => this.props.selectMedia(mediaItem)}>
<div className="media-box media-selection-block" onClick={() => this.props.selectMedia(mediaItem)} key={mediaItem.key}>
<Image
src={thumbnailUrl ?? '/assets/images/no-preview.png'}
imageFit={ImageFit.centerCover}
Expand Down
9 changes: 6 additions & 3 deletions src/admin/settings/settingsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,13 @@ export class SettingsModal extends React.Component<SettingsModalProps, SettingsM
}

loadSettings = async (): Promise<void> => {
const settings = await this.siteService.getSetting<SiteSettingsContract>('site');
const faviconFile = await this.mediaService.getMediaByKey(settings.faviconSourceKey);
const settings = await this.siteService.getSetting<SiteSettingsContract>('site');
this.setState({ initialSettings: settings, settings: settings });
this.getFaviconThumbnailUrl(faviconFile);

if (settings.faviconSourceKey) {
const faviconFile = await this.mediaService.getMediaByKey(settings.faviconSourceKey);
this.getFaviconThumbnailUrl(faviconFile);
}
}

getFaviconThumbnailUrl = async (faviconFile: MediaContract): Promise<void> => {
Expand Down