diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/DoctrineMigrations/Version20190510141130.php | 96 | ||||
-rw-r--r-- | app/Resources/static/themes/material/css/cards.scss | 52 | ||||
-rw-r--r-- | app/Resources/static/themes/material/css/media_queries.scss | 4 | ||||
-rw-r--r-- | app/config/wallabag.yml | 2 |
4 files changed, 139 insertions, 15 deletions
diff --git a/app/DoctrineMigrations/Version20190510141130.php b/app/DoctrineMigrations/Version20190510141130.php new file mode 100644 index 00000000..524aa452 --- /dev/null +++ b/app/DoctrineMigrations/Version20190510141130.php | |||
@@ -0,0 +1,96 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Application\Migrations; | ||
4 | |||
5 | use Doctrine\DBAL\Migrations\SkipMigrationException; | ||
6 | use Doctrine\DBAL\Schema\Schema; | ||
7 | use Wallabag\CoreBundle\Doctrine\WallabagMigration; | ||
8 | |||
9 | /** | ||
10 | * Enable cascade delete when deleting a user on: | ||
11 | * - oauth2_access_tokens | ||
12 | * - oauth2_clients | ||
13 | * - oauth2_refresh_tokens | ||
14 | * - oauth2_auth_codes. | ||
15 | */ | ||
16 | final class Version20190510141130 extends WallabagMigration | ||
17 | { | ||
18 | public function up(Schema $schema): void | ||
19 | { | ||
20 | switch ($this->connection->getDatabasePlatform()->getName()) { | ||
21 | case 'sqlite': | ||
22 | $this->addSql('DROP INDEX IDX_368A4209A76ED395'); | ||
23 | $this->addSql('DROP INDEX IDX_368A420919EB6921'); | ||
24 | $this->addSql('DROP INDEX UNIQ_368A42095F37A13B'); | ||
25 | $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_access_tokens', true) . ' AS SELECT id, client_id, user_id, token, expires_at, scope FROM ' . $this->getTable('oauth2_access_tokens', true)); | ||
26 | $this->addSql('DROP TABLE ' . $this->getTable('oauth2_access_tokens', true)); | ||
27 | $this->addSql('CREATE TABLE ' . $this->getTable('oauth2_access_tokens', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, expires_at INTEGER DEFAULT NULL, token VARCHAR(191) NOT NULL, scope VARCHAR(191) NULL, CONSTRAINT FK_368A420919EB6921 FOREIGN KEY (client_id) REFERENCES ' . $this->getTable('oauth2_clients', true) . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)'); | ||
28 | $this->addSql('INSERT INTO ' . $this->getTable('oauth2_access_tokens', true) . ' (id, client_id, user_id, token, expires_at, scope) SELECT id, client_id, user_id, token, expires_at, scope FROM __temp__' . $this->getTable('oauth2_access_tokens', true)); | ||
29 | $this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_access_tokens', true)); | ||
30 | $this->addSql('CREATE INDEX IDX_368A4209A76ED395 ON ' . $this->getTable('oauth2_access_tokens', true) . ' (user_id)'); | ||
31 | $this->addSql('CREATE INDEX IDX_368A420919EB6921 ON ' . $this->getTable('oauth2_access_tokens', true) . ' (client_id)'); | ||
32 | |||
33 | $this->addSql('DROP INDEX IDX_635D765EA76ED395'); | ||
34 | $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_clients', true) . ' AS SELECT id, user_id, random_id, secret, redirect_uris, allowed_grant_types, name FROM ' . $this->getTable('oauth2_clients', true)); | ||
35 | $this->addSql('DROP TABLE ' . $this->getTable('oauth2_clients', true)); | ||
36 | $this->addSql('CREATE TABLE ' . $this->getTable('oauth2_clients', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER DEFAULT NULL, random_id VARCHAR(255) NOT NULL COLLATE BINARY, secret VARCHAR(255) NOT NULL COLLATE BINARY, name CLOB NOT NULL COLLATE BINARY, redirect_uris CLOB NOT NULL, allowed_grant_types CLOB NOT NULL, CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE)'); | ||
37 | $this->addSql('INSERT INTO ' . $this->getTable('oauth2_clients', true) . ' (id, user_id, random_id, secret, redirect_uris, allowed_grant_types, name) SELECT id, user_id, random_id, secret, redirect_uris, allowed_grant_types, name FROM __temp__' . $this->getTable('oauth2_clients', true)); | ||
38 | $this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_clients', true)); | ||
39 | $this->addSql('CREATE INDEX IDX_635D765EA76ED395 ON ' . $this->getTable('oauth2_clients', true) . ' (user_id)'); | ||
40 | |||
41 | $this->addSql('DROP INDEX IDX_20C9FB24A76ED395'); | ||
42 | $this->addSql('DROP INDEX IDX_20C9FB2419EB6921'); | ||
43 | $this->addSql('DROP INDEX UNIQ_20C9FB245F37A13B'); | ||
44 | $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_refresh_tokens', true) . ' AS SELECT id, client_id, user_id, token, expires_at, scope FROM ' . $this->getTable('oauth2_refresh_tokens', true)); | ||
45 | $this->addSql('DROP TABLE ' . $this->getTable('oauth2_refresh_tokens', true)); | ||
46 | $this->addSql('CREATE TABLE ' . $this->getTable('oauth2_refresh_tokens', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, expires_at INTEGER DEFAULT NULL, token VARCHAR(191) NOT NULL, scope VARCHAR(191) NULL, CONSTRAINT FK_20C9FB2419EB6921 FOREIGN KEY (client_id) REFERENCES ' . $this->getTable('oauth2_clients', true) . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)'); | ||
47 | $this->addSql('INSERT INTO ' . $this->getTable('oauth2_refresh_tokens', true) . ' (id, client_id, user_id, token, expires_at, scope) SELECT id, client_id, user_id, token, expires_at, scope FROM __temp__' . $this->getTable('oauth2_refresh_tokens', true)); | ||
48 | $this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_refresh_tokens', true)); | ||
49 | $this->addSql('CREATE INDEX IDX_20C9FB24A76ED395 ON ' . $this->getTable('oauth2_refresh_tokens', true) . ' (user_id)'); | ||
50 | $this->addSql('CREATE INDEX IDX_20C9FB2419EB6921 ON ' . $this->getTable('oauth2_refresh_tokens', true) . ' (client_id)'); | ||
51 | |||
52 | $this->addSql('DROP INDEX IDX_EE52E3FAA76ED395'); | ||
53 | $this->addSql('DROP INDEX IDX_EE52E3FA19EB6921'); | ||
54 | $this->addSql('DROP INDEX UNIQ_EE52E3FA5F37A13B'); | ||
55 | $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('oauth2_auth_codes', true) . ' AS SELECT id, client_id, user_id, token, redirect_uri, expires_at, scope FROM ' . $this->getTable('oauth2_auth_codes', true)); | ||
56 | $this->addSql('DROP TABLE ' . $this->getTable('oauth2_auth_codes', true)); | ||
57 | $this->addSql('CREATE TABLE ' . $this->getTable('oauth2_auth_codes', true) . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, client_id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, redirect_uri CLOB NOT NULL COLLATE BINARY, expires_at INTEGER DEFAULT NULL, token VARCHAR(191) NOT NULL, scope VARCHAR(191) NULL, CONSTRAINT FK_EE52E3FA19EB6921 FOREIGN KEY (client_id) REFERENCES ' . $this->getTable('oauth2_clients', true) . ' (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE)'); | ||
58 | $this->addSql('INSERT INTO ' . $this->getTable('oauth2_auth_codes', true) . ' (id, client_id, user_id, token, redirect_uri, expires_at, scope) SELECT id, client_id, user_id, token, redirect_uri, expires_at, scope FROM __temp__' . $this->getTable('oauth2_auth_codes', true)); | ||
59 | $this->addSql('DROP TABLE __temp__' . $this->getTable('oauth2_auth_codes', true)); | ||
60 | $this->addSql('CREATE INDEX IDX_EE52E3FAA76ED395 ON ' . $this->getTable('oauth2_auth_codes', true) . ' (user_id)'); | ||
61 | $this->addSql('CREATE INDEX IDX_EE52E3FA19EB6921 ON ' . $this->getTable('oauth2_auth_codes', true) . ' (client_id)'); | ||
62 | break; | ||
63 | case 'mysql': | ||
64 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' DROP FOREIGN KEY FK_368A4209A76ED395'); | ||
65 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id) ON DELETE CASCADE'); | ||
66 | |||
67 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' DROP FOREIGN KEY IDX_user_oauth_client'); | ||
68 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' ADD CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id)'); | ||
69 | |||
70 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' DROP FOREIGN KEY FK_20C9FB24A76ED395'); | ||
71 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id) ON DELETE CASCADE'); | ||
72 | |||
73 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' DROP FOREIGN KEY FK_EE52E3FAA76ED395'); | ||
74 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES `wallabag_user` (id) ON DELETE CASCADE'); | ||
75 | break; | ||
76 | case 'postgresql': | ||
77 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' DROP CONSTRAINT FK_368A4209A76ED395'); | ||
78 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); | ||
79 | |||
80 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' DROP CONSTRAINT idx_user_oauth_client'); | ||
81 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_clients') . ' ADD CONSTRAINT FK_635D765EA76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); | ||
82 | |||
83 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' DROP CONSTRAINT FK_20C9FB24A76ED395'); | ||
84 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_refresh_tokens') . ' ADD CONSTRAINT FK_20C9FB24A76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); | ||
85 | |||
86 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' DROP CONSTRAINT FK_EE52E3FAA76ED395'); | ||
87 | $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES "wallabag_user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); | ||
88 | break; | ||
89 | } | ||
90 | } | ||
91 | |||
92 | public function down(Schema $schema): void | ||
93 | { | ||
94 | throw new SkipMigrationException('Too complex ...'); | ||
95 | } | ||
96 | } | ||
diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss index c893b376..9ae1be82 100644 --- a/app/Resources/static/themes/material/css/cards.scss +++ b/app/Resources/static/themes/material/css/cards.scss | |||
@@ -18,6 +18,24 @@ main { | |||
18 | overflow: hidden; | 18 | overflow: hidden; |
19 | } | 19 | } |
20 | 20 | ||
21 | @mixin mixin-reading-time { | ||
22 | .reading-time { | ||
23 | display: inline-flex; | ||
24 | vertical-align: middle; | ||
25 | |||
26 | .card-reading-time, | ||
27 | .card-created-at { | ||
28 | display: inline-flex; | ||
29 | } | ||
30 | |||
31 | span { | ||
32 | margin-right: 5px; | ||
33 | } | ||
34 | |||
35 | @content; | ||
36 | } | ||
37 | } | ||
38 | |||
21 | .card { | 39 | .card { |
22 | .card-content .card-title, | 40 | .card-content .card-title, |
23 | .card-reveal .card-title { | 41 | .card-reveal .card-title { |
@@ -98,19 +116,7 @@ main { | |||
98 | margin-right: 5px !important; | 116 | margin-right: 5px !important; |
99 | } | 117 | } |
100 | 118 | ||
101 | .reading-time { | 119 | @include mixin-reading-time; |
102 | display: inline-flex; | ||
103 | vertical-align: middle; | ||
104 | |||
105 | .card-reading-time, | ||
106 | .card-created-at { | ||
107 | display: inline-flex; | ||
108 | } | ||
109 | |||
110 | span { | ||
111 | margin-right: 5px; | ||
112 | } | ||
113 | } | ||
114 | } | 120 | } |
115 | 121 | ||
116 | .card-image { | 122 | .card-image { |
@@ -235,10 +241,18 @@ a.original:not(.waves-effect) { | |||
235 | } | 241 | } |
236 | 242 | ||
237 | div.metadata { | 243 | div.metadata { |
244 | overflow: hidden; | ||
245 | height: 1.5em; | ||
246 | display: flex; | ||
247 | |||
248 | ul.tags { | ||
249 | margin-left: 4px; | ||
250 | } | ||
251 | |||
238 | .chip { | 252 | .chip { |
239 | background-color: $blueAccentColor; | 253 | background-color: $blueAccentColor; |
240 | padding: 0 7px; | 254 | padding: 0 7px; |
241 | margin: auto 2px; | 255 | margin: auto 1px; |
242 | border-radius: 6px; | 256 | border-radius: 6px; |
243 | line-height: 22px; | 257 | line-height: 22px; |
244 | height: 22px; | 258 | height: 22px; |
@@ -255,6 +269,16 @@ a.original:not(.waves-effect) { | |||
255 | padding-left: 8px; | 269 | padding-left: 8px; |
256 | } | 270 | } |
257 | } | 271 | } |
272 | |||
273 | @include mixin-reading-time { | ||
274 | padding: 0 5px; | ||
275 | flex-wrap: wrap; | ||
276 | margin-left: auto; | ||
277 | |||
278 | i.material-icons { | ||
279 | font-size: 20px; | ||
280 | } | ||
281 | } | ||
258 | } | 282 | } |
259 | 283 | ||
260 | div.card-content { | 284 | div.card-content { |
diff --git a/app/Resources/static/themes/material/css/media_queries.scss b/app/Resources/static/themes/material/css/media_queries.scss index 491eedce..6f9d2a95 100644 --- a/app/Resources/static/themes/material/css/media_queries.scss +++ b/app/Resources/static/themes/material/css/media_queries.scss | |||
@@ -173,6 +173,10 @@ | |||
173 | .row .col { | 173 | .row .col { |
174 | padding: 0; | 174 | padding: 0; |
175 | } | 175 | } |
176 | |||
177 | .card-stacked div.metadata .reading-time { | ||
178 | display: none; | ||
179 | } | ||
176 | } | 180 | } |
177 | 181 | ||
178 | @media screen and (max-width: 310px), | 182 | @media screen and (max-width: 310px), |
diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml index 96dfacf9..99088a6f 100644 --- a/app/config/wallabag.yml +++ b/app/config/wallabag.yml | |||
@@ -1,5 +1,5 @@ | |||
1 | wallabag_core: | 1 | wallabag_core: |
2 | version: 2.3.8-dev | 2 | version: 2.3.8 |
3 | paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb" | 3 | paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb" |
4 | languages: | 4 | languages: |
5 | en: 'English' | 5 | en: 'English' |