forked from sequentech/common-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
avConfig.js
215 lines (172 loc) · 5.67 KB
/
avConfig.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
/**
* This file is part of agora-gui-common.
* Copyright (C) 2015-2016 Agora Voting SL <[email protected]>
* agora-gui-common 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.
* agora-gui-common 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 agora-gui-common. 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 AV_CONFIG_VERSION = '3.3.0';
var avConfigData = {
// 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://agora/elections/api/",
freeAuthId: 1,
// Webpage title
webTitle: "Agora Voting",
// Show 'Success Action' tab in admin agora_gui
showSuccessAction: false,
// AuthApi base url
authAPI: "https://agora/authapi/api/",
dnieUrl: "https://agora.dev/authapi/api/authmethod/dnie/auth/",
// Agora Elections base url
electionsAPI: "https://agora/elections/api/",
// Agora Admin help url
helpUrl: "https://agoravoting.com/help",
authorities: ['local-auth2'],
director: "local-auth1",
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',
timeoutSeconds: 3600,
publicURL: "https://agora/elections/public/",
// if we are in debug mode or not
debug: true,
// 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/agoravoting",
twitterHandle: "agoravoting",
googleplus: "https://plus.google.com/101939665794445172389/posts",
youtube: "https://www.youtube.com/results?search_query=Agora+Voting",
github: "https://github.com/agoravoting/"
},
// technology footer links
technology: {
aboutus: "https://agoravoting.com/#aboutus",
pricing: "https://agoravoting.com/#pricing",
overview: "https://agoravoting.com/overview/",
solutions: "https://agoravoting.com/solutions/",
admin_manual: "https://bit.ly/avguiadeuso"
},
// legality footer links
legal: {
terms_of_service: "https://agoravoting.com/tos/",
cookies: "https://agoravoting.com/cookies/",
privacy: "https://agoravoting.com/privacy/",
security_contact: "https://agoravoting.com/security_contact/",
community_website: "https://agoravoting.org"
},
documentation: {
faq: 'https://nvotes.com/doc/en/',
overview: 'https://agoravoting.com/overview/',
technical: 'https://agoravoting.com/static/generic_tech_overview_20_08_15.pdf',
security_contact: "https://agoravoting.com/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: 'Agora Voting',
// URL that the logo links to
orgUrl: 'https://agoravoting.com'
},
verifier: {
link: "",
hash: ""
},
success: {
text: ""
},
tos: {
text:"",
title: ""
}
};
angular.module('avConfig', [])
.factory('ConfigService', function() {
return avConfigData;
});
angular.module('avConfig')
.provider('ConfigService', function ConfigServiceProvider() {
_.extend(this, avConfigData);
this.$get = [function ConfigServiceProviderFactory() {
return new ConfigServiceProvider();
}];
});