FEATURE: Add Settings to right fold out menu

This commit is contained in:
jason.wall 2017-08-07 16:30:03 -04:00
parent 433da00bf4
commit 4be73ab2a6
2 changed files with 42 additions and 1 deletions

View File

@ -9,6 +9,7 @@
<ion-list-header> <ion-list-header>
Current Page: {{title}} Current Page: {{title}}
</ion-list-header> </ion-list-header>
<ion-list> <ion-list>
<button ion-item menuClose="actions" (click)="addPage()"> <button ion-item menuClose="actions" (click)="addPage()">
<ion-icon name="bookmarks" item-left></ion-icon>Save Current Results as New Page <ion-icon name="bookmarks" item-left></ion-icon>Save Current Results as New Page
@ -17,6 +18,37 @@
<ion-icon name="arrow-up" item-left></ion-icon>Update Page with current Results <ion-icon name="arrow-up" item-left></ion-icon>Update Page with current Results
</button> </button>
</ion-list> </ion-list>
<ion-list-header>Search Settings</ion-list-header>
<ion-item>
<ion-label>Show Strongs as Modal</ion-label>
<ion-toggle color="dark" [(ngModel)]="userProfile.user.strongs_modal" (ionChange)="save()"></ion-toggle>
</ion-item>
<ion-item>
<ion-label>Clear Search after Query</ion-label>
<ion-toggle color="dark" [(ngModel)]="userProfile.user.clear_search_after_query" (ionChange)="save()"></ion-toggle>
</ion-item>
<ion-item>
<ion-label>Append Results Below</ion-label>
<ion-toggle color="dark" [(ngModel)]="userProfile.user.append_to_bottom" (ionChange)="save()"></ion-toggle>
</ion-item>
<ion-item>
<ion-label>Insert Result Next to Item</ion-label>
<ion-toggle color="dark" [(ngModel)]="userProfile.user.insert_next_to_item" (ionChange)="save()"></ion-toggle>
</ion-item>
<ion-item>
<ion-label>Each Verse on New Line</ion-label>
<ion-toggle color="dark" [(ngModel)]="userProfile.user.verses_on_new_line" (ionChange)="save()"></ion-toggle>
</ion-item>
<ion-list-header>Adjust Text</ion-list-header>
<ion-list>
<ion-item>
<ion-range min="6" max="20" step="1" snaps="true" [(ngModel)]="userProfile.user.font_size" (ionChange)="textSizeChanged()">
<ion-label range-left class="small-text">A</ion-label>
<ion-label range-right>A</ion-label>
</ion-range>
</ion-item>
</ion-list>
</ion-content> </ion-content>
</ion-menu> </ion-menu>

View File

@ -114,7 +114,16 @@ export class SearchPage implements OnInit
if (has_migrated) if (has_migrated)
this.userProfile.save(this.local); this.userProfile.save(this.local);
} }
save()
{
this.userProfile.save(this.local);
}
textSizeChanged()
{
this.userProfile.textSizeChanged();
this.save();
}
actionsMenu() actionsMenu()
{ {
this.menu.open('actions'); this.menu.open('actions');