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

chore(explorer): enable warning for mixed-content explorers #2765

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Changes from all commits
Commits
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
16 changes: 8 additions & 8 deletions explorerAdminClient/ExplorerCreatePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ export class ExplorerCreatePage extends React.Component<{
return this.programOnDisk.toString() !== this.program.toString()
}

@computed get whyIsExplorerProgramInvalid() {
return this.program.whyIsExplorerProgramInvalid
}

@observable gitCmsBranchName = this.props.gitCmsBranchName

@action.bound private onSave() {
Expand All @@ -211,7 +215,7 @@ export class ExplorerCreatePage extends React.Component<{
render() {
if (!this.isReady) return <LoadingIndicator />

const { program, isModified } = this
const { program, isModified, whyIsExplorerProgramInvalid } = this
const { isNewFile, slug } = program
const previewLink = `/admin/${EXPLORERS_PREVIEW_ROUTE}/${slug}`

Expand Down Expand Up @@ -288,15 +292,11 @@ export class ExplorerCreatePage extends React.Component<{
<a className="PreviewLink" href={previewLink}>
Visit preview
</a>
{/* Disabled for now since this piece of code causes an issue where
the HotTable's context menu disappears right after opening it.
The reason for that is that program.whyIsExplorerProgramInvalid
refreshes every few seconds, which causes the HotTable to re-render. */}
{/* {program.whyIsExplorerProgramInvalid && (
{whyIsExplorerProgramInvalid && (
<div className="WhyIsExplorerProgramInvalid">
{program.whyIsExplorerProgramInvalid}
{whyIsExplorerProgramInvalid}
</div>
)} */}
)}
</main>
</>
)
Expand Down
Loading