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

Update 10 files #12

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion apps/demo/src/app/home/home.page.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
<sio-page title="Home">
<sio-page title="Home">

<sio-input name="app_title"></sio-input>

</sio-page>
3 changes: 2 additions & 1 deletion apps/demo/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"M_HOME": "Home",
"M_ABOUT": "About",
"M_SETTINGS": "Settings"
"M_SETTINGS": "Settings",
"LABEL_APP_TITLE" : "Titolo App"
}
3 changes: 2 additions & 1 deletion apps/demo/src/assets/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"M_HOME": "Home",
"M_ABOUT": "Info",
"M_SETTINGS": "Opzioni",
"L_LANGUAGE": "test"
"L_LANGUAGE": "test",
"LABEL_APP_TITLE" : "Titolo App"
}
2 changes: 2 additions & 0 deletions libs/core/src/i18n/it.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export const it = {
'L_LANGUAGE' : 'Lingua',
'L_DARKMODE_ON': 'Modalità Scura',
'L_DARKMODE_OFF': 'Modalità Chiara',
'PAGE_TITLE' : 'Titolo Pagina',
'PAGE_COMPONENT_DEFAULT_1' : 'Pagina Vuota',
'PAGE_COMPONENT_DEFAULT_2' : 'Crea i Tuoi contenuti',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<ion-list inset="true">
<ion-item lines="none" button>
<sio-icon [name]="this.icon" slot="start"></sio-icon>
<ion-toggle #darkmode_toggle (ionChange)="this.onChange($event)" slot="end"></ion-toggle>
<label>{{ this.label | translate }}</label>
</ion-item>
</ion-list>
<ion-item lines="none" button color="primary">
<sio-icon [name]="this.icon" slot="start"></sio-icon>
<ion-toggle #darkmode_toggle (ionChange)="this.onChange($event)" slot="end" color="warning"></ion-toggle>
<label>{{ this.label | translate }}</label>
</ion-item>
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export class SioCoreDarkModeToggleComponent implements OnInit {

@ViewChild('darkmode_toggle', { static: true }) ionToggle!: IonToggle;

// eslint-disable-next-line @typescript-eslint/no-empty-function
constructor(
private sioCoreLoggerService: SioCoreLoggerService,
public sioCoreAppComponentState: SioCoreAppComponentState
Expand All @@ -35,6 +34,7 @@ export class SioCoreDarkModeToggleComponent implements OnInit {
document.body.classList.toggle('dark', value);
this.ionToggle.checked = value;
this.label = this.caption + ((value)?'_ON':'_OFF');
this.icon = (value)?'moon':'sunny';
});
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand All @@ -43,11 +43,9 @@ export class SioCoreDarkModeToggleComponent implements OnInit {
if (event.detail.checked) {
this.sioCoreLoggerService.debug('[SioCoreDarkModeToggleComponent][onChange] - New Style is Dark Mode');
this.sioCoreAppComponentState.setDark(true);
this.icon = 'moon';
} else {
this.sioCoreLoggerService.debug('[SioCoreDarkModeToggleComponent][onChange] - New Style is Light Mode');
this.sioCoreAppComponentState.setDark(false);
this.icon = 'sunny';
}
}
}
9 changes: 2 additions & 7 deletions libs/core/src/lib/components/input/input.component.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<ion-item
[class.invalid]="this.invalid"
[color]="this.color"
>
<ion-input
<ion-input
label = "{{ this.label | translate }}"
[labelPlacement] = "this.position"
fill="outline"
[fill]="this.fill"
[(ngModel)]="this.valueInput"
[autocapitalize]="this.autocapitalize"
[autocomplete]="this.autocomplete"
Expand All @@ -20,4 +16,3 @@
[errorText]="this.error"
[helperText]="this.label"
></ion-input>
</ion-item>
4 changes: 2 additions & 2 deletions libs/core/src/lib/components/input/input.component.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:host {
/*ion-text {
ion-text {
text-align: left important;
}*/
}
.invalid {
--highlight-color-valid: red; // valid underline color
}
Expand Down
5 changes: 3 additions & 2 deletions libs/core/src/lib/components/input/input.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export class SioCoreInputComponent implements OnInit {
}

@Input() public set name(value: string) {
if (!this.label) {
this._label = `auth.L_${value?.toUpperCase()}`;
if (this.label !== '') {
this._label = `LABEL_${value?.toUpperCase()}`;
}
this._name = value;
}
Expand All @@ -49,6 +49,7 @@ export class SioCoreInputComponent implements OnInit {
}

@Input() public position: 'stacked' | 'fixed' | 'floating' = 'floating';
@Input() public fill: 'outline' | 'solid' | 'none' = 'outline';
@Input() public autocapitalize: 'on' | 'off' = 'off';
@Input() public autocomplete: 'on' | 'off' = 'off';
@Input() public autocorrect: 'on' | 'off' = 'off';
Expand Down
Loading
Loading