More app settings work
This commit is contained in:
parent
f289c647ab
commit
59cf7ad8d9
3 changed files with 42 additions and 2 deletions
|
|
@ -29,6 +29,17 @@ export default Em.Component.extend({
|
||||||
|
|
||||||
toggleAppSettings: function(){
|
toggleAppSettings: function(){
|
||||||
this.toggleProperty('appSettingsDisplayed');
|
this.toggleProperty('appSettingsDisplayed');
|
||||||
|
},
|
||||||
|
|
||||||
|
clearBridge: function() {
|
||||||
|
delete localStorage['huegasm.bridgeUsername'];
|
||||||
|
delete localStorage['huegasm.bridgeIp'];
|
||||||
|
location.reload();
|
||||||
|
},
|
||||||
|
|
||||||
|
clearAllSettings: function() {
|
||||||
|
localStorage.clear();
|
||||||
|
location.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,15 @@ body {
|
||||||
position: static;
|
position: static;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.triangle {
|
||||||
|
position: absolute;
|
||||||
|
right: 11px;
|
||||||
|
top: -16px;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 0 15px 15px 15px;
|
||||||
|
border-color: transparent transparent #AFAFAF transparent;
|
||||||
|
}
|
||||||
|
|
||||||
#settings {
|
#settings {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
@ -40,6 +49,25 @@ body {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.appSettingsItem {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.appSettingsItem.warn {
|
||||||
|
text-transform: uppercase;
|
||||||
|
background: rgba(255, 0, 0, 0.20);
|
||||||
|
}
|
||||||
|
|
||||||
|
.appSettingsItem.warn:hover {
|
||||||
|
text-transform: uppercase;
|
||||||
|
background: rgba(255, 0, 0, 0.70);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.appSettingsItem:hover {
|
||||||
|
background: darken(white, 10%);
|
||||||
|
}
|
||||||
|
|
||||||
.settingsItem.on md-icon.md-default-theme {
|
.settingsItem.on md-icon.md-default-theme {
|
||||||
color: #F12B24 !important;
|
color: #F12B24 !important;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,9 @@
|
||||||
|
|
||||||
{{#if appSettingsDisplayed}}
|
{{#if appSettingsDisplayed}}
|
||||||
<div id="appSettings">
|
<div id="appSettings">
|
||||||
<p {{action "clearBridge"}}>Switch bridge</p>
|
<span class="triangleWrapper"><div class="triangle"></div></span>
|
||||||
<p class="warn" {{action "clearAllSettings"}}>Clear application settings</p>
|
<div class="appSettingsItem" {{action "clearBridge"}}>Switch bridge</div>
|
||||||
|
<div class="warn appSettingsItem" {{action "clearAllSettings"}}>Clear application settings</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
Reference in a new issue