Added the ability to open up the mobile app, this is getting ready for some alpha tests with users still a !wip

pull/2081/head
Jamie 7 years ago
parent 3f04c9a365
commit f09dc5832a

@ -9,6 +9,7 @@ namespace Ombi.Settings.Settings.Models
{ {
public string ApplicationName { get; set; } public string ApplicationName { get; set; }
public string ApplicationUrl { get; set; } public string ApplicationUrl { get; set; }
public bool Mobile { get; set; }
public string CustomCssLink { get; set; } public string CustomCssLink { get; set; }
public bool EnableCustomDonations { get; set; } public bool EnableCustomDonations { get; set; }
public string CustomDonationUrl { get; set; } public string CustomDonationUrl { get; set; }

@ -84,7 +84,7 @@
<a [routerLink]="['/usermanagement/updatedetails']"> <a [routerLink]="['/usermanagement/updatedetails']">
<i class="fa fa-key"></i>{{ 'NavigationBar.UpdateDetails' | translate }}</a> <i class="fa fa-key"></i>{{ 'NavigationBar.UpdateDetails' | translate }}</a>
</li> </li>
<li *ngIf="showMobileLink" [routerLinkActive]="['active']"> <li *ngIf="customizationSettings.mobile" [routerLinkActive]="['active']">
<a href="#" (click)="openMobileApp($event)"> <a href="#" (click)="openMobileApp($event)">
<i class="fa fa-mobile"></i>{{ 'NavigationBar.OpenMobileApp' | translate }}</a> <i class="fa fa-mobile"></i>{{ 'NavigationBar.OpenMobileApp' | translate }}</a>
</li> </li>

@ -23,7 +23,6 @@ export class AppComponent implements OnInit {
public updateAvailable: boolean; public updateAvailable: boolean;
public currentUrl: string; public currentUrl: string;
public userAccessToken: string; public userAccessToken: string;
public showMobileLink = false;
private checkedForUpdate: boolean; private checkedForUpdate: boolean;

@ -97,6 +97,7 @@ export interface ICustomizationSettings extends ISettings {
applicationName: string; applicationName: string;
applicationUrl: string; applicationUrl: string;
logo: string; logo: string;
mobile: boolean;
customCssLink: string; customCssLink: string;
enableCustomDonations: boolean; enableCustomDonations: boolean;
customDonationUrl: string; customDonationUrl: string;

@ -3,6 +3,12 @@
<fieldset *ngIf="settings"> <fieldset *ngIf="settings">
<legend>Customization</legend> <legend>Customization</legend>
<div class="row">
<div class="col-md-2 col-md-push-10">
<span style="vertical-align: top;">Advanced</span>
<p-inputSwitch id="customInputSwitch" [(ngModel)]="advanced"></p-inputSwitch>
</div>
</div>
<div class="col-md-5"> <div class="col-md-5">
<div class="form-group"> <div class="form-group">
<label for="applicationName" class="control-label">Application Name</label> <label for="applicationName" class="control-label">Application Name</label>
@ -20,6 +26,13 @@
</div> </div>
</div> </div>
<div class="form-group" *ngIf="advanced">
<div class="checkbox">
<input type="checkbox" id="enable" [(ngModel)]="settings.mobile" [checked]="settings.mobile">
<label for="enable">Enable Mobile</label>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label for="logo" class="control-label">Custom Logo</label> <label for="logo" class="control-label">Custom Logo</label>
<div> <div>

@ -11,6 +11,7 @@ export class CustomizationComponent implements OnInit {
public settings: ICustomizationSettings; public settings: ICustomizationSettings;
public themes: IThemes[]; public themes: IThemes[];
public advanced: boolean;
constructor(private settingsService: SettingsService, private notificationService: NotificationService) { } constructor(private settingsService: SettingsService, private notificationService: NotificationService) { }

@ -5140,6 +5140,7 @@
"resolved": "https://registry.npmjs.org/npm/-/npm-5.6.0.tgz", "resolved": "https://registry.npmjs.org/npm/-/npm-5.6.0.tgz",
"integrity": "sha512-mt839mCsI5hzdBJLf1iRBwt610P35iUfvqLVuL7VFdanUwRBAmGtbsjdGIuzegplR95xx+fTHE0vBMuMJp1sLQ==", "integrity": "sha512-mt839mCsI5hzdBJLf1iRBwt610P35iUfvqLVuL7VFdanUwRBAmGtbsjdGIuzegplR95xx+fTHE0vBMuMJp1sLQ==",
"requires": { "requires": {
"JSONStream": "1.3.1",
"abbrev": "1.1.1", "abbrev": "1.1.1",
"ansi-regex": "3.0.0", "ansi-regex": "3.0.0",
"ansicolors": "0.3.2", "ansicolors": "0.3.2",
@ -5174,7 +5175,6 @@
"ini": "1.3.4", "ini": "1.3.4",
"init-package-json": "1.10.1", "init-package-json": "1.10.1",
"is-cidr": "1.0.0", "is-cidr": "1.0.0",
"JSONStream": "1.3.1",
"lazy-property": "1.0.0", "lazy-property": "1.0.0",
"libnpx": "9.7.1", "libnpx": "9.7.1",
"lockfile": "1.0.3", "lockfile": "1.0.3",
@ -5248,6 +5248,24 @@
"write-file-atomic": "2.1.0" "write-file-atomic": "2.1.0"
}, },
"dependencies": { "dependencies": {
"JSONStream": {
"version": "1.3.1",
"bundled": true,
"requires": {
"jsonparse": "1.3.1",
"through": "2.3.8"
},
"dependencies": {
"jsonparse": {
"version": "1.3.1",
"bundled": true
},
"through": {
"version": "2.3.8",
"bundled": true
}
}
},
"abbrev": { "abbrev": {
"version": "1.1.1", "version": "1.1.1",
"bundled": true "bundled": true
@ -5650,24 +5668,6 @@
} }
} }
}, },
"JSONStream": {
"version": "1.3.1",
"bundled": true,
"requires": {
"jsonparse": "1.3.1",
"through": "2.3.8"
},
"dependencies": {
"jsonparse": {
"version": "1.3.1",
"bundled": true
},
"through": {
"version": "2.3.8",
"bundled": true
}
}
},
"lazy-property": { "lazy-property": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true "bundled": true
@ -10843,14 +10843,6 @@
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=" "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
}, },
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"safe-buffer": "5.1.1"
}
},
"string-width": { "string-width": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
@ -10861,6 +10853,14 @@
"strip-ansi": "3.0.1" "strip-ansi": "3.0.1"
} }
}, },
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"safe-buffer": "5.1.1"
}
},
"stringstream": { "stringstream": {
"version": "0.0.5", "version": "0.0.5",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",

Loading…
Cancel
Save