Finished adding preset themes

pull/1654/head
Jamie 7 years ago
parent 33177b9c08
commit 1813b45fb3

@ -53,20 +53,22 @@
</div>
<div class="col-md-7">
<!-- <div *ngIf="themes">
<div *ngIf="themes">
<div class="form-group">
<label for="presetTheme" class="control-label">Preset Themes</label>
<div id="presetTheme">
<select class="form-control form-control-custom" (change)="dropDownChange($event)">
<option *ngFor="let theme of themes" value="{{theme.fullName}}">{{theme.displayName}} {{theme.version}}</option>
<option *ngFor="let theme of themes" value="{{theme.fullName}}" [selected]="settings.presetThemeName === theme.fullName">{{theme.displayName}} {{theme.version}}</option>
</select>
</div>
</div>
<div class="form-group" *ngIf="settings.presetThemeContent">
<textarea rows="25" type="text" class="form-control-custom form-control " id="themeContent" name="themeContent" [(ngModel)]="settings.presetThemeContent"> {{settings.presetThemeContent}} </textarea>
</div>
</div> -->
<small>Preset themes are powered by
<a href="https://github.com/leram84/layer.Cake" target="_blank">layer#Cake</a>.
</small>
</div>
</div>

@ -30,7 +30,6 @@ export class CustomizationComponent implements OnInit {
this.themes.splice(index, 1);
}
}
if(x.hasPresetTheme) {
this.themes.unshift({displayName: x.presetThemeDisplayName, fullName: x.presetThemeName, url: "", version: x.presetThemeVersion});
this.themes.unshift({displayName: "None", fullName: "None", url: "", version: ""});
@ -69,7 +68,7 @@ export class CustomizationComponent implements OnInit {
}
this.settings.presetThemeName = selectedThemeFullName;
this.settingsService.getThemeContent(selectedTheme[0].url).subscribe(x => {
this.settingsService.getThemeContent(selectedTheme.url).subscribe(x => {
this.settings.presetThemeContent = x;
});
}

Loading…
Cancel
Save