Skip to content

Commit

Permalink
chore: code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rjvelazco committed Jan 2, 2025
1 parent 157d588 commit bbdecde
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ export class DotUveDeviceSelectorComponent implements OnInit {
onDeviceSelect(device: DotDevice): void {
if (this.#store.socialMedia()) {
this.#store.setSEO(null);
this.#store.reloadCurrentPage();

// Bug Importante
// this.#store.reloadCurrentPage();
}

const currentDevice = this.$currentDevice();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@let ogTagsResults = ogTagsResults$;
@let showSEOTool = $editorProps().seoResults && ogTagsResults;

@if ($previewMode()) {
<dot-uve-toolbar (translatePage)="translatePage($event)" />
} @else {
Expand All @@ -6,70 +9,71 @@
(editUrlContentMap)="editContentMap($event)" />
}

@let ogTagsResults = ogTagsResults$;

@if ($editorProps().seoResults && ogTagsResults) {
@if (showSEOTool) {
<dot-results-seo-tool
[seoMedia]="$editorProps().seoResults.socialMedia"
[seoOGTags]="$editorProps().seoResults.ogTags"
[seoOGTagsResults]="ogTagsResults"
data-testId="results-seo-tool"></dot-results-seo-tool>
}
@if ($editorProps().showEditorContent) {

<div
class="editor-content"
[ngStyle]="{
display: $editorProps().showEditorContent ? 'block' : 'none'
}"
[ngClass]="{ 'editor-content-preview': $isPreviewMode() }"
data-testId="editor-content">
<div
class="editor-content"
[ngClass]="{ 'editor-content-preview': $isPreviewMode() }"
data-testId="editor-content">
<div
[ngClass]="{
'iframe-wrapper--device': $editorProps().iframe.wrapper
}"
[ngClass]="{
'iframe-wrapper--device': $editorProps().iframe.wrapper
}"
[ngStyle]="{
width: $editorProps().iframe?.wrapper?.width,
height: $editorProps().iframe?.wrapper?.height
}"
class="iframe-wrapper">
<iframe
(load)="onIframePageLoad()"
[src]="uveStore.$iframeURL() | safeUrl"
[title]="host"
[ngStyle]="{
width: $editorProps().iframe?.wrapper?.width,
height: $editorProps().iframe?.wrapper?.height
pointerEvents: $editorProps().iframe.pointerEvents,
opacity: $editorProps().iframe.opacity
}"
class="iframe-wrapper">
<iframe
(load)="onIframePageLoad()"
[src]="uveStore.$iframeURL() | safeUrl"
[title]="host"
[ngStyle]="{
pointerEvents: $editorProps().iframe.pointerEvents,
opacity: $editorProps().iframe.opacity
}"
#iframe
data-testId="iframe"
width="100%"
height="100%"></iframe>
@if ($editorProps().progressBar) {
<p-progressBar
[ngStyle]="{ position: 'absolute', top: '0', left: '0', width: '100%' }"
[style]="{ height: '6px' }"
data-testId="progress-bar"
mode="indeterminate" />
}
@if ($editorProps().contentletTools; as contentletTools) {
<dot-ema-contentlet-tools
(edit)="handleEditContentlet($event)"
(editVTL)="handleEditVTL($event)"
(delete)="deleteContentlet($event)"
(addWidget)="dialog.addWidget($event)"
(addForm)="dialog.addForm($event)"
(addContent)="dialog.addContentlet($event)"
[hide]="contentletTools.hide"
[contentletArea]="contentletTools.contentletArea"
[isEnterprise]="contentletTools.isEnterprise"
data-testId="contentlet-tools" />
}
@if ($editorProps().dropzone; as dropzone) {
<dot-ema-page-dropzone
[containers]="dropzone.bounds"
[dragItem]="dropzone.dragItem"
data-testId="dropzone" />
}
</div>
#iframe
data-testId="iframe"
width="100%"
height="100%"></iframe>
@if ($editorProps().progressBar) {
<p-progressBar
[ngStyle]="{ position: 'absolute', top: '0', left: '0', width: '100%' }"
[style]="{ height: '6px' }"
data-testId="progress-bar"
mode="indeterminate" />
}
@if ($editorProps().contentletTools; as contentletTools) {
<dot-ema-contentlet-tools
(edit)="handleEditContentlet($event)"
(editVTL)="handleEditVTL($event)"
(delete)="deleteContentlet($event)"
(addWidget)="dialog.addWidget($event)"
(addForm)="dialog.addForm($event)"
(addContent)="dialog.addContentlet($event)"
[hide]="contentletTools.hide"
[contentletArea]="contentletTools.contentletArea"
[isEnterprise]="contentletTools.isEnterprise"
data-testId="contentlet-tools" />
}
@if ($editorProps().dropzone; as dropzone) {
<dot-ema-page-dropzone
[containers]="dropzone.bounds"
[dragItem]="dropzone.dragItem"
data-testId="dropzone" />
}
</div>
}
</div>

@if ($editorProps().palette; as palette) {
<dot-edit-ema-palette
[languageId]="palette.languageId"
Expand Down

0 comments on commit bbdecde

Please sign in to comment.