forked from codefoxes/firebase-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.html
146 lines (146 loc) · 4.61 KB
/
settings.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<base href="local">
<title>Preferences</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body ng-app="fba-p" ng-controller="settingsController" class="{{os}} settings">
<div id="adminmenumain">
<aside id="admin-menu" class="hidden-print">
<ul class="menu-list">
<li class="list-item" ng-repeat="item in items track by $index" ng-class="{'active': activeUrl == item.url}">
<div ng-click="changeView(item.url)">{{item.name}}</div>
</li>
</ul>
</aside>
</div>
<div class="admin-content">
<form class="form" ng-submit="save()" name="settings">
<section class="general" ng-show="view.general">
<div class="panel">
<div class="panel-heading">Query Method</div>
<div>Choose what method to use when retrieving data from a database reference object. Using <code>once</code> will retrieve the value once, while using <code>on</code> will continue to monitor changes to this reference and will reload the results if the real-time database detects a change.</div>
<div class="radio">
<div class="radio" ng-repeat="qType in ['on', 'once']" >
<input type="radio" name="queryMethod" ng-attr-id="queryMethod-{{qType}}" ng-model="form.queryMethod" ng-value="qType">
<label ng-attr-for="queryMethod-{{qType}}">{{qType}}</label>
</div>
</div>
</div>
</section>
<section class="theme" ng-show="view.theme">
<div class="panel">
<div class="panel-heading">Main Theme</div>
<div class="radio">
<input type="radio" name="theme" id="theme-light" ng-model="form.theme" value="light">
<label for="theme-light">Light</label>
</div>
<div class="radio">
<input type="radio" name="theme" id="theme-dark" ng-model="form.theme" value="dark">
<label for="theme-dark">Dark</label>
</div>
</div>
<div class="panel">
<div class="panel-heading">Json Theme</div>
<div class="radio">
<input type="radio" name="jsonTheme" id="json-default" ng-model="form.jsonTheme" value="default">
<label for="json-default">Default</label>
</div>
<div class="radio inline">
<input type="radio" name="jsonTheme" id="json-custom" ng-model="form.jsonTheme" value="custom">
<label for="json-custom">Custom</label>
</div>
<div class="theme inline">
<select ng-model="form.customTheme" ng-show="form.jsonTheme === 'custom'">
<option ng-selected="{{theme === form.customTheme}}" ng-repeat="theme in jsonThemes" value="{{theme}}">{{theme}}</option>
</select>
</div>
</div>
</section>
<section class="fonts" ng-show="view.fonts">
<div class="radio">
<input type="radio" name="fonts" id="fonts-system" ng-model="form.fonts" value="system">
<label for="fonts-system">System</label>
</div>
<div class="radio">
<input type="radio" name="fonts" id="fonts-monospace" ng-model="form.fonts" value="monospace">
<label for="fonts-monospace">Monospace</label>
</div>
<div class="radio">
<input type="radio" name="fonts" id="fonts-serif" ng-model="form.fonts" value="serif">
<label for="fonts-serif">Serif</label>
</div>
</section>
<div class="saved" ng-class="{'now': saved}">Saved</div>
<footer class="toolbar toolbar-footer">
<div class="toolbar-actions">
<button class="button button-primary pull-right">Save</button>
<button class="button button-light" ng-click="close()">Cancel</button>
</div>
</footer>
</form>
</div>
</body>
<style type="text/css">
body{
font-size: 13px;
border-top: 1px solid var(--color-border);
}
#adminmenumain, .admin-content{
height: 100%;
}
#adminmenumain{
width: 150px;
}
section{
padding: 10px;
}
.menu-list{
padding-top: 10px;
}
.list-item.active{
border-bottom: 1px solid #e6e6e6;
background: rgba(45,140,255,0.6);
color: #fff;
}
.list-item div{
padding: 4px 10px;
cursor: default;
}
.saved{
background: #329c32;
color: #fff;
padding: 4px 10px;
position: absolute;
left: 150px;
right: 0;
bottom: 0;
height: 66px;
max-height: 0;
transition: all .2s;
overflow: hidden;
}
.saved.now{
max-height: 66px;
}
.panel{
padding-bottom: 10px;
}
.panel-heading{
border-bottom: 1px solid #ccc;
}
.inline{
display: inline-block;
}
</style>
<script>
const electron = require('electron').remote
const ipc = require('electron').ipcRenderer
const writeFile = require('write-file-atomic')
require('electron').webFrame.setZoomLevelLimits(1, 1)
</script>
<script type="text/javascript" src="js/angular.min.js"></script>
<script type="text/javascript" src="js/settings.js"></script>
</html>