Skip to content

Commit

Permalink
refactor(spie-ui): standardise position of modals
Browse files Browse the repository at this point in the history
  • Loading branch information
robsonos committed Dec 24, 2024
1 parent 921738d commit 83da0b3
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@
</ion-col>
</ion-row>
</ion-grid>

<app-connection-advanced-modal-component
[reconnectSubject]="reconnectSubject"
/>
</ion-card-content>
</ion-card>
</ion-accordion>
</ion-accordion-group>

<app-connection-advanced-modal-component
[reconnectSubject]="reconnectSubject"
/>
11 changes: 7 additions & 4 deletions apps/spie-ui/src/app/components/plotter/plotter.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
isPausedSubject.getValue() && isOpen() ? 'danger' : 'secondary'
"
[disabled]="!isOpen()"
(click)="onClickPauseTerminal()"
(click)="onClickPauseSeries()"
>
<ion-icon
slot="start"
Expand All @@ -44,7 +44,7 @@
<ion-button
expand="block"
color="secondary"
(click)="onClickClearTerminal()"
(click)="onClickClearSeries()"
>
<ion-icon slot="start" name="trash-outline"></ion-icon>
Clear
Expand All @@ -54,7 +54,7 @@
<ion-button
fill="clear"
color="secondary"
(click)="onClickTerminalAdvancedModal()"
(click)="onClickPlotterAdvancedModal()"
>
<ion-icon name="settings-outline"></ion-icon>
</ion-button>
Expand All @@ -64,4 +64,7 @@
</ion-card-content>
</ion-card>

<!-- <pre>{{ series()[0].data.length }}</pre> -->
<app-plotter-advanced-modal-component
[(plotterOptions)]="plotterOptions"
(clearChart)="onClickClearSeries()"
/>
6 changes: 3 additions & 3 deletions apps/spie-ui/src/app/components/plotter/plotter.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,16 +238,16 @@ export class PlotterComponent {
},
}));

onClickClearTerminal(): void {
onClickClearSeries(): void {
this.clearSeriesSubject.next();
}

onClickPauseTerminal(): void {
onClickPauseSeries(): void {
const currentValue = this.isPausedSubject.getValue();
this.isPausedSubject.next(!currentValue);
}

async onClickTerminalAdvancedModal() {
async onClickPlotterAdvancedModal(): Promise<void> {
// this.terminalAdvancedComponent().terminalAdvancedModal().present(); // TODO
}
}
4 changes: 2 additions & 2 deletions apps/spie-ui/src/app/components/send/send.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</ion-col>
</ion-row>
</ion-grid>

<app-send-advanced-modal-component />
</ion-card-content>
</ion-card>

<app-send-advanced-modal-component />
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
</ion-col>
</ion-row>
</ion-grid>

<app-terminal-advanced-modal-component
[clearTerminalSubject]="clearTerminalSubject"
/>
</ion-card-content>
</ion-card>

<app-terminal-advanced-modal-component
[clearTerminalSubject]="clearTerminalSubject"
/>

0 comments on commit 83da0b3

Please sign in to comment.