From f50e94825a097c1b1fd0d82e4365f8477360d474 Mon Sep 17 00:00:00 2001 From: matthieu-crouzet Date: Wed, 10 Apr 2024 08:05:14 +0200 Subject: [PATCH] feat(chrome-ext): toggle button for placeholder --- .../debug-panel/debug-panel-pres.component.ts | 10 ++++++++++ .../debug-panel-pres.template.html | 8 +++++++- .../localization-panel-pres.template.html | 2 +- .../config-form/config-form.component.html | 2 +- .../src/style/dark-theme/dark-theme.scss | 14 +------------ package.json | 1 + .../src/devkit/components-devkit.interface.ts | 15 ++++++++++++-- .../components-devtools.message.service.ts | 12 +++++++++-- .../src/devkit/components-devtools.module.ts | 4 +++- .../placeholder-template.actions.ts | 3 +++ .../placeholder-template.reducer.ts | 10 +++++++++- .../placeholder-template.selectors.ts | 3 +++ .../placeholder-template.state.ts | 1 + .../placeholder/placeholder.component.ts | 20 +++++++++++++------ .../tools/placeholder/placeholder.style.scss | 13 ++++++++++++ .../placeholder/placeholder.template.html | 9 +++++++++ yarn.lock | 1 + 17 files changed, 100 insertions(+), 28 deletions(-) create mode 100644 packages/@o3r/components/src/tools/placeholder/placeholder.style.scss create mode 100644 packages/@o3r/components/src/tools/placeholder/placeholder.template.html diff --git a/apps/chrome-devtools/src/app-devtools/debug-panel/debug-panel-pres.component.ts b/apps/chrome-devtools/src/app-devtools/debug-panel/debug-panel-pres.component.ts index 3f7ea24a46..f6cc3f9f32 100644 --- a/apps/chrome-devtools/src/app-devtools/debug-panel/debug-panel-pres.component.ts +++ b/apps/chrome-devtools/src/app-devtools/debug-panel/debug-panel-pres.component.ts @@ -35,4 +35,14 @@ export class DebugPanelPresComponent { toggle: (event.target as HTMLInputElement).checked }); } + + /** + * Toggle placeholder debug mode + * @param event + */ + public togglePlaceholder(event: UIEvent) { + this.connection.sendMessage('placeholderDebug', { + debug: (event.target as HTMLInputElement).checked + }); + } } diff --git a/apps/chrome-devtools/src/app-devtools/debug-panel/debug-panel-pres.template.html b/apps/chrome-devtools/src/app-devtools/debug-panel/debug-panel-pres.template.html index ddd9071e8a..404d4ae1f9 100644 --- a/apps/chrome-devtools/src/app-devtools/debug-panel/debug-panel-pres.template.html +++ b/apps/chrome-devtools/src/app-devtools/debug-panel/debug-panel-pres.template.html @@ -20,11 +20,17 @@

Information

Actions

-
+
+
+ + +
diff --git a/apps/chrome-devtools/src/app-devtools/localization-panel/localization-panel-pres.template.html b/apps/chrome-devtools/src/app-devtools/localization-panel/localization-panel-pres.template.html index c265d81ccd..9dcf483eeb 100644 --- a/apps/chrome-devtools/src/app-devtools/localization-panel/localization-panel-pres.template.html +++ b/apps/chrome-devtools/src/app-devtools/localization-panel/localization-panel-pres.template.html @@ -14,7 +14,7 @@
} -
+