diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Resources/FOSOAuthServerBundle/views/Authorize/authorize.html.twig | 7 | ||||
-rw-r--r-- | app/Resources/FOSOAuthServerBundle/views/Authorize/authorize_content.html.twig | 53 | ||||
-rw-r--r-- | app/Resources/static/themes/material/css/various.scss | 27 | ||||
-rwxr-xr-x | app/Resources/static/themes/material/index.js | 6 | ||||
-rw-r--r-- | app/config/config.yml | 42 | ||||
-rw-r--r-- | app/config/routing.yml | 3 | ||||
-rw-r--r-- | app/config/security.yml | 1 |
7 files changed, 138 insertions, 1 deletions
diff --git a/app/Resources/FOSOAuthServerBundle/views/Authorize/authorize.html.twig b/app/Resources/FOSOAuthServerBundle/views/Authorize/authorize.html.twig new file mode 100644 index 00000000..42566a05 --- /dev/null +++ b/app/Resources/FOSOAuthServerBundle/views/Authorize/authorize.html.twig | |||
@@ -0,0 +1,7 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{{ 'developer.client.page_title'|trans }}{% endblock %} | ||
4 | |||
5 | {% block content %} | ||
6 | {% include "FOSOAuthServerBundle:Authorize:authorize_content.html.twig" %} | ||
7 | {% endblock content %} | ||
diff --git a/app/Resources/FOSOAuthServerBundle/views/Authorize/authorize_content.html.twig b/app/Resources/FOSOAuthServerBundle/views/Authorize/authorize_content.html.twig new file mode 100644 index 00000000..d7f2dbe0 --- /dev/null +++ b/app/Resources/FOSOAuthServerBundle/views/Authorize/authorize_content.html.twig | |||
@@ -0,0 +1,53 @@ | |||
1 | <div class="row"> | ||
2 | <div class="col s12"> | ||
3 | <h4>A new application would like to connect to your account</h4> | ||
4 | |||
5 | <div class="center-align col l6 offset-l3"> | ||
6 | <div class="row"> | ||
7 | <ul class="collection"> | ||
8 | <li class="collection-item avatar"> | ||
9 | {% if client.image %} | ||
10 | <img src="{{ client.image }}" alt="Client icon" class="circle"> | ||
11 | {% endif %} | ||
12 | <span class="title">{{ client.name }}</span> | ||
13 | <p>{{ client.description }}</p> | ||
14 | </li> | ||
15 | </ul> | ||
16 | {% set scopes = form.scope.vars.value | split(' ') %} | ||
17 | {# TODO : Fix me when https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/issues/309 is ok #} | ||
18 | <ul class="collapsible col s12 m12 l6 offset-l3" data-collapsible="accordion"> | ||
19 | {% for scope in scopes %} | ||
20 | {% if scope == 'read' %} | ||
21 | <li> | ||
22 | <div class="collapsible-header"><i class="material-icons">visibility</i>Read Permission</div> | ||
23 | <div class="collapsible-body"><span>{{ client.name }} will be able to access the list and contents of your entries, tags and annotations.</span></div> | ||
24 | </li> | ||
25 | {% endif %} | ||
26 | {% if scope == 'write' %} | ||
27 | <li> | ||
28 | <div class="collapsible-header"><i class="material-icons">edit</i>Edit Permission</div> | ||
29 | <div class="collapsible-body"><span>{{ client.name }} will be able to edit and manage (including deleting) your entries, tags and annotations.</span></div> | ||
30 | </li> | ||
31 | {% endif %} | ||
32 | {% if scope == 'user' %} | ||
33 | <li> | ||
34 | <div class="collapsible-header"><i class="material-icons">person</i>User Permission</div> | ||
35 | <div class="collapsible-body"><span>{{ client.name }} will be able to manage your user account.</span></div> | ||
36 | </li> | ||
37 | {% endif %} | ||
38 | {% endfor %} | ||
39 | </ul> | ||
40 | </div> | ||
41 | {{ form_start(form, {'method': 'POST', 'action': path('fos_oauth_server_authorize'), 'label_attr': {'class': 'fos_oauth_server_authorize'} }) }} | ||
42 | <input class="waves-effect waves-light btn red" type="submit" name="rejected" value="{{ 'authorize.reject'|trans({}, 'FOSOAuthServerBundle') }}" /> | ||
43 | <input class="waves-effect waves-light btn" type="submit" name="accepted" value="{{ 'authorize.accept'|trans({}, 'FOSOAuthServerBundle') }}" /> | ||
44 | {{ form_row(form.client_id) }} | ||
45 | {{ form_row(form.response_type) }} | ||
46 | {{ form_row(form.redirect_uri) }} | ||
47 | {{ form_row(form.state) }} | ||
48 | {{ form_row(form.scope) }} | ||
49 | {{ form_rest(form) }} | ||
50 | </form> | ||
51 | </div> | ||
52 | </div> | ||
53 | </div> | ||
diff --git a/app/Resources/static/themes/material/css/various.scss b/app/Resources/static/themes/material/css/various.scss index 7daf40ec..5ff18038 100644 --- a/app/Resources/static/themes/material/css/various.scss +++ b/app/Resources/static/themes/material/css/various.scss | |||
@@ -30,3 +30,30 @@ nav .input-field input { | |||
30 | .tab { | 30 | .tab { |
31 | flex: 1; | 31 | flex: 1; |
32 | } | 32 | } |
33 | |||
34 | .slider .slides { | ||
35 | background: #00acc1; | ||
36 | |||
37 | li { | ||
38 | img { | ||
39 | background: no-repeat; | ||
40 | background-size: contain; | ||
41 | background-position: unset; | ||
42 | } | ||
43 | |||
44 | .icon { | ||
45 | width: auto; | ||
46 | height: 180px; | ||
47 | } | ||
48 | |||
49 | .icon.browser { | ||
50 | width: auto; | ||
51 | height: 100px; | ||
52 | } | ||
53 | |||
54 | .caption { | ||
55 | width: 85%; | ||
56 | left: 10%; | ||
57 | } | ||
58 | } | ||
59 | } | ||
diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js index d6afbb8a..74f64f9e 100755 --- a/app/Resources/static/themes/material/index.js +++ b/app/Resources/static/themes/material/index.js | |||
@@ -75,4 +75,10 @@ $(document).ready(() => { | |||
75 | const scrollPercent = (s / (d - c)) * 100; | 75 | const scrollPercent = (s / (d - c)) * 100; |
76 | $('.progress .determinate').css('width', `${scrollPercent}%`); | 76 | $('.progress .determinate').css('width', `${scrollPercent}%`); |
77 | }); | 77 | }); |
78 | |||
79 | if ($('.slider')) { | ||
80 | $('.slider').slider({ | ||
81 | height: 500, | ||
82 | }); | ||
83 | } | ||
78 | }); | 84 | }); |
diff --git a/app/config/config.yml b/app/config/config.yml index 2bc5e3b3..112fa012 100644 --- a/app/config/config.yml +++ b/app/config/config.yml | |||
@@ -35,6 +35,42 @@ framework: | |||
35 | http_method_override: true | 35 | http_method_override: true |
36 | assets: ~ | 36 | assets: ~ |
37 | 37 | ||
38 | wallabag_core: | ||
39 | version: 2.2.3 | ||
40 | paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb" | ||
41 | languages: | ||
42 | en: 'English' | ||
43 | fr: 'Français' | ||
44 | de: 'Deutsch' | ||
45 | tr: 'Türkçe' | ||
46 | fa: 'فارسی' | ||
47 | ro: 'Română' | ||
48 | pl: 'Polish' | ||
49 | da: 'Dansk' | ||
50 | es: 'Español' | ||
51 | oc: 'Occitan' | ||
52 | it: 'Italiano' | ||
53 | pt: 'Português' | ||
54 | items_on_page: 12 | ||
55 | theme: material | ||
56 | language: '%locale%' | ||
57 | rss_limit: 50 | ||
58 | reading_speed: 1 | ||
59 | cache_lifetime: 10 | ||
60 | action_mark_as_read: 1 | ||
61 | list_mode: 0 | ||
62 | fetching_error_message_title: 'No title found' | ||
63 | fetching_error_message: | | ||
64 | wallabag can't retrieve contents for this article. Please <a href="http://doc.wallabag.org/en/user/errors_during_fetching.html#how-can-i-help-to-fix-that">troubleshoot this issue</a>. | ||
65 | api_limit_mass_actions: 10 | ||
66 | |||
67 | wallabag_user: | ||
68 | registration_enabled: "%fosuser_registration%" | ||
69 | |||
70 | wallabag_import: | ||
71 | allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain', 'text/csv'] | ||
72 | resource_dir: "%kernel.root_dir%/../web/uploads/import" | ||
73 | |||
38 | # Twig Configuration | 74 | # Twig Configuration |
39 | twig: | 75 | twig: |
40 | debug: "%kernel.debug%" | 76 | debug: "%kernel.debug%" |
@@ -194,7 +230,11 @@ fos_oauth_server: | |||
194 | service: | 230 | service: |
195 | user_provider: fos_user.user_provider.username_email | 231 | user_provider: fos_user.user_provider.username_email |
196 | options: | 232 | options: |
197 | refresh_token_lifetime: 1209600 | 233 | access_token_lifetime: 31536000 |
234 | refresh_token_lifetime: 63072000 | ||
235 | supported_scopes: read write user | ||
236 | enforce_state: true | ||
237 | auth_code_lifetime: 60 | ||
198 | 238 | ||
199 | scheb_two_factor: | 239 | scheb_two_factor: |
200 | trusted_computer: | 240 | trusted_computer: |
diff --git a/app/config/routing.yml b/app/config/routing.yml index 0bd2d130..5d26f944 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml | |||
@@ -44,6 +44,9 @@ fos_user: | |||
44 | fos_oauth_server_token: | 44 | fos_oauth_server_token: |
45 | resource: "@FOSOAuthServerBundle/Resources/config/routing/token.xml" | 45 | resource: "@FOSOAuthServerBundle/Resources/config/routing/token.xml" |
46 | 46 | ||
47 | fos_oauth_server_authorize: | ||
48 | resource: "@FOSOAuthServerBundle/Resources/config/routing/authorize.xml" | ||
49 | |||
47 | craue_config_settings_modify: | 50 | craue_config_settings_modify: |
48 | path: /settings | 51 | path: /settings |
49 | defaults: | 52 | defaults: |
diff --git a/app/config/security.yml b/app/config/security.yml index ffb1d356..0ce37661 100644 --- a/app/config/security.yml +++ b/app/config/security.yml | |||
@@ -57,6 +57,7 @@ security: | |||
57 | - { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY } | 57 | - { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY } |
58 | - { path: ^/api/version, roles: IS_AUTHENTICATED_ANONYMOUSLY } | 58 | - { path: ^/api/version, roles: IS_AUTHENTICATED_ANONYMOUSLY } |
59 | - { path: ^/api/user, roles: IS_AUTHENTICATED_ANONYMOUSLY } | 59 | - { path: ^/api/user, roles: IS_AUTHENTICATED_ANONYMOUSLY } |
60 | - { path: ^/api/apps, roles: IS_AUTHENTICATED_ANONYMOUSLY } | ||
60 | - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } | 61 | - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } |
61 | - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } | 62 | - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } |
62 | - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } | 63 | - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } |