-
Notifications
You must be signed in to change notification settings - Fork 7
/
SequentConfig.js
258 lines (204 loc) · 6.86 KB
/
SequentConfig.js
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
/**
* This file is part of common-ui.
* Copyright (C) 2015-2016 Sequent Tech Inc <[email protected]>
* common-ui is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License.
* common-ui is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public License
* along with common-ui. If not, see <http://www.gnu.org/licenses/>.
**/
/*
* ConfigService is a function that returns the configuration that exists
* in this same file, which you might want to edit and tune if needed.
*/
var SEQUENT_CONFIG_VERSION = 'master';
var SequentConfigData = {
// the base url path for ajax requests, for example for sending ballots or
// getting info about an election. This url is usually in the form of
// 'https://foo/api/v3/' and always ends in '/'.
base: '',
theme: "default",
baseUrl: "https://sequent/elections/api/",
freeAuthId: 1,
// Webpage title
webTitle: "Sequent Tech",
// Show 'Success Action' tab in admin sequent_ui
showSuccessAction: false,
// Configurable Sign Up link
signupLink: "/admin/signup",
// AuthApi base url
authAPI: "https://sequent/iam/api/",
dnieUrl: "https://sequent.dev/iam/api/authmethod/dnie/auth/",
// Agora Elections base url
electionsAPI: "https://sequent/elections/api/",
// Agora Admin help url
helpUrl: "https://sequentech.io/help",
authorities: ['local-auth2'],
director: "local-auth1",
// For admins:
// Allow editing the json description of the election before creating it
// Allowed values: true|false
allowEditElectionJson: true,
// For admins:
// Allow sending custom html in the email messages sent from the admin console.
// Allowed values: true|false
allowHtmlEmails: false,
// For admins:
// Allow editing the election.presentation.theme_css so that any election
// Admin can highly customize the election directly with CSS.
// Allowed values: true|false
allowCustomElectionThemeCss: false,
// show the documentation links after successfully casting a vote
// allowed values: true| false
showDocOnVoteCast: false,
resourceUrlWhitelist: [
// Allow same origin resource loads.
'self',
// Allow loading from our assets domain. Notice the difference between * and **.
// Uncomment the following to allow youtube videos
//
// 'https://www.youtube.com/**',
// 'https://youtube.com/**'
],
// i18next language options, see http://i18next.com/pages/doc_init.html for
// details
i18nextInitOptions: {
// Default language of the application.
//
// Default: 'en'
//
language: "es",
// Forces a specific language.
//
// Default: not set
//
lng: "es",
// specifies the set language query string.
//
// Default: "lang"
//
detectLngQS: 'lang',
// Specifies what translations will be available.
//
// Default: ['en', 'es', 'gl', 'ca']
//
// lngWhitelist: ['en', 'es', 'gl', 'ca'],
},
// specifies the language cookie options,
// see https://github.com/ivpusic/angular-cookie#options
i18nextCookieOptions: {
// Expiration in days
//
// Default: 360
//
// expires: 360,
// Cookie domain
//
// Default: not set
//
// domain: 'foobar',
},
// configure $locationProvider.html5Mode
// see https://code.angularjs.org/1.2.28/docs/guide/$location
//
// Default: false
// locationHtml5mode: false,
locationHtml5mode: true,
// If no Route is set, this is the route that will be loaded
//
// Default: '/admin/login'
defaultRoute: '/admin/login',
publicURL: "https://sequent/elections/public/",
// if we are in debug mode or not
debug: true,
// Information regarding OpenID Connect authentication
openIDConnectProviders: [],
//Minimum loading time (milliseconds)
minLoadingTime: 12000,
// Server timeout (seconds)
serverTimeoutSeconds: 200,
// contact data where users can reach to a human when they need it
contact: {
// Support contact email displayed in the footer links
email: "[email protected]",
// Sales contact email displayed in the footer links
sales: "[email protected]",
tlf: "-no tlf-"
},
// social networks footer links
social: {
facebook: "https://www.facebook.com/AgoraVoting",
twitter: "https://twitter.com/sequent",
twitterHandle: "sequent",
googleplus: "https://plus.google.com/101939665794445172389/posts",
youtube: "https://www.youtube.com/results?search_query=Agora+Voting",
github: "https://github.com/sequent/"
},
// technology footer links
technology: {
aboutus: "https://sequentech.io/#aboutus",
pricing: "https://sequentech.io/#pricing",
overview: "https://sequentech.io/overview/",
solutions: "https://sequentech.io/solutions/",
documentation: "https://bit.ly/avguiadeuso"
},
// legality footer links
legal: {
terms_of_service: "https://sequentech.io/tos/",
cookies: "https://sequentech.io/cookies/",
privacy: "https://sequentech.io/privacy/",
security_contact: "https://sequentech.io/security_contact/",
community_website: "https://sequent.org"
},
documentation: {
show_help: true,
faq: 'https://sequentech.io/doc/en/',
overview: 'https://sequentech.io/overview/',
technical: 'https://sequentech.io/static/generic_tech_overview_20_08_15.pdf',
security_contact: "https://sequentech.io/security_contact/"
},
documentation_html_include: '',
legal_html_include: '',
// Details pertaining to the organization that runs the software
organization: {
// Name of the organization, appears in the logo mouse hover, in the login
// page ("Login into __NAME__ admin account"), in the poweredBy, etc
orgName: 'Sequent Tech',
// Subtitle of the organization, used in the ballot ticket PDF
orgSubtitle: '',
// Big logo of the organization, used in the ballot ticket PDF
orgBigLogo: '',
// URL that the logo links to
orgUrl: 'https://sequentech.io'
},
verifier: {
link: "",
hash: ""
},
success: {
text: ""
},
tos: {
text:"",
title: ""
},
mainVersion: "master",
repoVersions: [],
// Number of seconds after which an authentication token expires.
authTokenExpirationSeconds: 600
};
angular.module('SequentConfig', [])
.factory('ConfigService', function() {
return SequentConfigData;
});
angular.module('SequentConfig')
.provider('ConfigService', function ConfigServiceProvider() {
_.extend(this, SequentConfigData);
this.$get = [function ConfigServiceProviderFactory() {
return new ConfigServiceProvider();
}];
});