Disabling experimental features

This commit is contained in:
Piotr Pekala 2019-10-10 06:55:19 -07:00
parent 63987f5df8
commit 8def343892
4 changed files with 3 additions and 21 deletions

View File

@ -3,7 +3,6 @@
<div class="row">
<h1 class="col">Projects</h1>
<button
*ngIf="settings.experimental_features"
class="col"
mat-raised-button
color="primary"
@ -13,7 +12,6 @@
Add blank project
</button>
<button
*ngIf="settings.experimental_features"
class="col"
mat-raised-button
color="primary"

View File

@ -15,11 +15,11 @@
>
</div>
<div>
<!-- <div>
<mat-checkbox [(ngModel)]="settings.experimental_features"
>Enable experimental features (WARNING: IT CAN BREAK YOU LABS!)</mat-checkbox
>
</div>
</div> -->
<!-- <div>
<mat-checkbox [(ngModel)]="settings.angular_map"

View File

@ -158,20 +158,4 @@ describe('ProjectService', () => {
expect(service.isReadOnly(project)).toEqual(true);
});
it('project should be readonly when experimentalFeatures disabled ', () => {
const project = new Project();
project.readonly = false;
spyOn(settingsService, 'isExperimentalEnabled').and.returnValue(false);
expect(service.isReadOnly(project)).toEqual(true);
});
it('project should not be readonly when experimentalFeatures enabled ', () => {
const project = new Project();
project.readonly = false;
spyOn(settingsService, 'isExperimentalEnabled').and.returnValue(true);
expect(service.isReadOnly(project)).toEqual(false);
});
});

View File

@ -91,6 +91,6 @@ export class ProjectService {
if (project.readonly) {
return project.readonly;
}
return !this.settingsService.isExperimentalEnabled();
return false;
}
}