Compare commits

..

19 Commits

Author SHA1 Message Date
055d304bc9 Merge pull request #6291 from wallabag/release/2.5.4
Prepare 2.5.4
2023-02-07 22:20:00 +01:00
812d6ac376 Prepare 2.5.4 2023-02-07 22:03:20 +01:00
268372dbbd Merge pull request #6289 from wallabag/2.5/fix-csrf-user-deletion
Fix CSRF on user deletion
2023-02-07 21:52:51 +01:00
4e023bddc3 Merge pull request #6288 from wallabag/2.5/xss-username-share-page
Fix XSS on username on share page
2023-02-07 21:43:04 +01:00
acd285dcbb Merge pull request #6290 from wallabag/2.5/fix-add-tag-other-entries
Fix adding tag to entries from other people
2023-02-07 21:42:46 +01:00
f1b3d5cdd7 Fix CSRF on user deletion 2023-02-07 21:41:52 +01:00
242e3feac9 Fix adding tag to entries from other people
I've also limited tag length to 20 chars (and limit adding more than 5 tags at once)
2023-02-07 21:25:57 +01:00
bd4c71682e Fix XSS on username on share page 2023-02-07 19:58:06 +01:00
784bc1393c Merge pull request #6275 from wallabag/2.x/fix-release-script
Fix release script
2023-02-06 10:13:57 +01:00
42b03d2834 Fix release script
The release script cloned the master branch by default because we never have to clone something else from now.
The script will now clone the tag using the given VERSION parameter.
2023-02-03 10:10:35 +01:00
8954100779 Merge pull request #6267 from wallabag/release/2.5.3
Prepare 2.5.3
2023-02-01 10:15:18 +01:00
b795622f06 Prepare 2.5.3 2023-02-01 09:51:02 +01:00
5ac6b6bff9 Merge pull request from GHSA-mrqx-mjc4-vfh3
AnnotationController: fix improper authorization vulnerability
2023-02-01 09:32:22 +01:00
0f7460dbab Merge pull request from GHSA-qwx8-mxxx-mg96
ExportController: fix improper authorization vulnerability
2023-02-01 09:30:43 +01:00
3ed7f2b751 AnnotationController: fix improper authorization vulnerability
This PR is based on 2.5.x branch.

We fix the improper authorization by retrieving the annotation using id
and user id.

We also replace the ParamConverter used to get the requested Annotation
on put and delete actions with an explicit call to AnnotationRepository
in order to prevent a resource enumeration through response discrepancy.

Fixes GHSA-mrqx-mjc4-vfh3

Co-authored-by: Jeremy Benoist <jeremy.benoist@gmail.com>
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2023-01-27 23:34:14 +01:00
0fdd9aa991 ExportController: fix improper authorization vulnerability
We fix the improper authorization by duplicating the check done by
the private method EntryController::checkUserAction().

We also replace the ParamConverter used to get the requested Entry with
an explicit call to EntryRepository in order to prevent a resource
enumeration through response discrepancy. Thus, we get the same
exception whether the requested resource does not exist or is not owned
by the requester.

Fixes GHSA-qwx8-mxxx-mg96

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2023-01-20 15:09:38 +01:00
9e9aedee94 Merge pull request #6241 from wallabag/fix/2.5/update-deps
Update deps before 2.5.3
2023-01-16 10:26:47 +01:00
ea189503de Fix tests 2023-01-16 10:21:37 +01:00
b50197664e Update deps before 2.5.3
At least, site config will be up to date.
2023-01-16 10:07:06 +01:00
353 changed files with 10039 additions and 4254 deletions

1
.github/release.yml vendored
View File

@ -4,4 +4,3 @@ changelog:
- Dependencies
authors:
- dependabot
- weblate

View File

@ -1,42 +0,0 @@
name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '22 9 * * 2'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@ -12,7 +12,7 @@ permissions:
jobs:
coding-standards:
name: "CS Fixer, PHPStan & TwigCS"
name: "CS Fixer & PHPStan"
runs-on: "ubuntu-20.04"
steps:
@ -24,7 +24,7 @@ jobs:
with:
coverage: "none"
php-version: "7.4"
tools: cs2pr, pecl
tools: cs2pr, pecl, composer:2.2
extensions: pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, curl, imagick, pgsql, gd, tidy
ini-values: "date.timezone=Europe/Paris"
env:
@ -46,6 +46,3 @@ jobs:
- name: "Run PHPStan"
run: "php bin/phpstan analyse --no-progress --error-format=checkstyle | cs2pr"
- name: "Run TwigCS"
run: "php bin/twigcs --severity=error --display=blocking --reporter checkstyle app/ src/ | cs2pr"

View File

@ -48,7 +48,7 @@ jobs:
with:
php-version: "${{ matrix.php }}"
coverage: none
tools: pecl
tools: pecl, composer:2.2
extensions: json, pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, curl, imagick, pgsql, gd, tidy
ini-values: "date.timezone=Europe/Paris"

View File

@ -29,7 +29,7 @@ jobs:
with:
coverage: "none"
php-version: "${{ matrix.php }}"
tools: pecl
tools: pecl, composer:2.2
extensions: pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, curl, imagick, pgsql, gd, tidy
ini-values: "date.timezone=Europe/Paris"
env:

5
.gitignore vendored
View File

@ -9,10 +9,11 @@
!/var/sessions
/var/sessions/*
!var/sessions/.gitkeep
!var/SymfonyRequirements.php
/bin/*
!/bin/console
.php-cs-fixer.php
.php-cs-fixer.cache
!/bin/symfony_requirements
.php_cs.cache
.phpunit.result.cache
phpunit.xml

View File

@ -1,7 +1,6 @@
<?php
$config = new PhpCsFixer\Config();
return $config
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
@ -11,18 +10,16 @@ return $config
],
'combine_consecutive_unsets' => true,
'heredoc_to_nowdoc' => true,
'no_extra_blank_lines' => [
'tokens' => [
'break',
'continue',
'extra',
'return',
'throw',
'use',
'parenthesis_brace_block',
'square_brace_block',
'curly_brace_block'
],
'no_extra_consecutive_blank_lines' => [
'break',
'continue',
'extra',
'return',
'throw',
'use',
'parenthesis_brace_block',
'square_brace_block',
'curly_brace_block'
],
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
@ -31,7 +28,7 @@ return $config
'ordered_imports' => true,
'php_unit_strict' => true,
'phpdoc_order' => true,
// 'psr_autoloading' => true,
// 'psr4' => true,
'strict_comparison' => true,
'strict_param' => true,
'concat_space' => [
@ -48,5 +45,4 @@ return $config
])
->in(__DIR__)
)
->setCacheFile('.php-cs-fixer.cache')
;

View File

@ -1,5 +1,26 @@
# Changelog
## [2.5.4](https://github.com/wallabag/wallabag/tree/2.5.4)
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.5.3...2.5.4)
### Security fixes
* Fix adding tag to entries from other people by @j0k3r in https://github.com/wallabag/wallabag/pull/6290
* Fix XSS on username on share page by @j0k3r in https://github.com/wallabag/wallabag/pull/6288
* Fix CSRF on user deletion by @j0k3r in https://github.com/wallabag/wallabag/pull/6289
### Meta
* Fix release script by @j0k3r in https://github.com/wallabag/wallabag/pull/6275
## [2.5.3](https://github.com/wallabag/wallabag/tree/2.5.3)
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.5.2...2.5.3)
### Security fixes
* Fix GHSA-qwx8-mxxx-mg96 https://github.com/wallabag/wallabag/commit/0f7460dbab9e29f4f7d2944aca20210f828b6abb by @Kdecherf, thanks to @bAuh0lz
* Fix GHSA-mrqx-mjc4-vfh3 https://github.com/wallabag/wallabag/commit/5ac6b6bff9e2e3a87fd88c2904ff3c6aac40722e by @Kdecherf, thanks to @bAuh0lz
### Meta
* Update deps before 2.5.3 by @j0k3r in https://github.com/wallabag/wallabag/pull/6241
## [2.5.2](https://github.com/wallabag/wallabag/tree/2.5.2)
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.5.1...2.5.2)

View File

@ -46,7 +46,7 @@ fixtures: ## Load fixtures into database
php bin/console doctrine:fixtures:load --no-interaction --env=test
test: prepare fixtures ## Launch wallabag testsuite
XDEBUG_MODE=off php -dmemory_limit=-1 bin/simple-phpunit -v
XDEBUG_MODE=off bin/simple-phpunit -v
release: ## Create a package. Need a VERSION parameter (eg: `make release VERSION=master`).
ifndef VERSION

View File

@ -48,6 +48,7 @@ class AppKernel extends Kernel
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
if ('test' === $this->getEnvironment()) {

View File

@ -1,23 +0,0 @@
<?php
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\SkipMigrationException;
use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/**
* Remove baggy theme.
*/
final class Version20200414120227 extends WallabagMigration
{
public function up(Schema $schema): void
{
$this->addSql('UPDATE ' . $this->getTable('config', true) . " SET theme = 'material';");
}
public function down(Schema $schema): void
{
throw new SkipMigrationException('Not possible ... ');
}
}

View File

@ -1,8 +1,10 @@
matomo_enabled: Povolit Matomo
unmark_url: Adresa URL Unmark, pokud je služba povolena
scuttle_url: Adresa URL Scuttle, pokud je služba povolena
shaarli_url: Adresa URL Shaarli, pokud je služba povolena
share_unmark: Povolit sdílení na Unmark.it
share_twitter: Povolit sdílení na Twitteru
share_scuttle: Povolit sdílení na Scuttle
share_shaarli: Povolit sdílení na Shaarli
share_mail: Povolit sdílení e-mailem
share_diaspora: Povolit sdílení na diaspora*
@ -14,6 +16,7 @@ export_csv: Povolit export do CSV
export_pdf: Povolit export do PDF
export_mobi: Povolit export do .mobi
diaspora_url: Adresa URL diaspora*, pokud je služba povolena
carrot: Povolit sdílení na Carrot
download_pictures: Stáhnout obrázky na váš server
settings_changed: Konfigurace byla aktualizována
shaarli_share_origin_url: Povolit sdílení původní adresy URL na Shaarli, pokud je služba povolena

View File

@ -1,4 +1,5 @@
download_pictures: Download billeder på din server
carrot: Aktiver deling til Carrot
diaspora_url: diaspora* URL, hvis tjenesten er aktiv
export_epub: Aktiver eksport til ePub
export_mobi: Aktiver eksport til .mobi
@ -8,10 +9,12 @@ export_json: Aktiver eksport til JSON
export_txt: Aktiver eksport til TXT
export_xml: Aktiver eksport til XML
shaarli_url: Shaarli-URL, hvis tjenesten er aktiv
scuttle_url: Scuttle-URL, hvis tjenesten er aktiv
unmark_url: Unmark-URL, hvis tjenesten er aktiv
share_diaspora: Aktiver deling til diaspora*
share_mail: Aktiver deling med email
share_shaarli: Aktiver deling gennem Shaarli
share_scuttle: Aktiver deling gennem Scuttle
share_twitter: Aktiver deling gennem Twitter
share_unmark: Aktiver deling gennem Unmark.it
show_printlink: Vis et link til print-indhold

View File

@ -1,5 +1,6 @@
settings_changed: Konfiguration aktualisiert
download_pictures: Bilder auf den Server herunterladen
carrot: Teilen zu Carrot aktivieren
diaspora_url: diaspora*-URL, sofern der Service aktiviert ist
export_epub: ePUB-Export aktivieren
export_mobi: mobi-Export aktivieren
@ -11,6 +12,7 @@ export_xml: XML-Export aktivieren
import_with_rabbitmq: Aktiviere RabbitMQ, um Artikel asynchron zu importieren
import_with_redis: Aktiviere Redis, um Artikel asynchron zu importieren
shaarli_url: Shaarli-URL, sofern der Service aktiviert ist
scuttle_url: Scuttle-URL, sofern der Service aktiviert ist
unmark_url: Unmark-URL, sofern der Service aktiviert ist
share_diaspora: Freigabe für diaspora* aktivieren
share_mail: Freigabe per E-Mail aktivieren
@ -38,3 +40,4 @@ api_user_registration: Registrierung eines Benutzers über die API ermöglichen
store_article_headers: Speichern von HTTP-Headern für jeden Artikel aktivieren
shaarli_share_origin_url: Original-URL mit Shaarli teilen, wenn der Service aktiviert
ist
share_scuttle: Freigabe für Scuttle aktivieren

View File

@ -18,10 +18,12 @@ wallabag_support_url: Υποστήριξη URL για wallabag
show_printlink: Προβολή συνδέσμου για εκτύπωση περιεχομένου
share_unmark: Ενεργοποίηση κοινοποίησης στο Unmark.it
share_twitter: Ενεργοποίηση κοινοποίησης στο Twitter
share_scuttle: Ενεργοποίηση κοινοποίησης στο Scuttle
share_shaarli: Ενεργοποίηση κοινοποίησης στο Shaarli
share_mail: Ενεργοποίηση κοινοποίησης με ηλεκτρονικό ταχυδρομείο
share_diaspora: Ενεργοποίηση κοινοποίησης στο diaspora*
unmark_url: URL του Unmark, αν είναι ενεργοποιημένη η υπηρεσία
scuttle_url: URL του Scuttle, αν είναι ενεργοποιημένη η υπηρεσία
shaarli_url: URL του Shaarli, αν είναι ενεργοποιημένη η υπηρεσία
import_with_redis: Ενεργοποίηση Redis για την ασύγχρονη εισαγωγή δεδομένων
import_with_rabbitmq: Ενεργοποίηση RabbitMQ για την ασύγχρονη εισαγωγή δεδομένων
@ -33,5 +35,6 @@ export_pdf: Ενεργοποίηση εξαγωγής PDF
export_mobi: Ενεργοποίηση εξαγωγής .mobi
export_epub: Ενεργοποίηση εξαγωγής ePub
diaspora_url: URL του diaspora*, αν είναι ενεργοποιημένη η υπηρεσία
carrot: Ενεργοποίηση κοινοποίησης στο Carrot
download_pictures: Λήψη των εικόνων στον διακομιστή σας
settings_changed: Η ρύθμιση παραμέτρων ενημερώθηκε

View File

@ -1,5 +1,6 @@
settings_changed: Configuration updated
download_pictures: Download pictures onto your server
carrot: Enable share to Carrot
diaspora_url: diaspora* URL, if the service is enabled
export_epub: Enable ePub export
export_mobi: Enable .mobi export (deprecated, will be removed soon)
@ -11,10 +12,12 @@ export_xml: Enable XML export
import_with_rabbitmq: Enable RabbitMQ to import data asynchronously
import_with_redis: Enable Redis to import data asynchronously
shaarli_url: Shaarli URL, if the service is enabled
scuttle_url: Scuttle URL, if the service is enabled
unmark_url: Unmark URL, if the service is enabled
share_diaspora: Enable share to diaspora*
share_mail: Enable share by e-mail
share_shaarli: Enable sharing to Shaarli
share_scuttle: Enable sharing to Scuttle
share_twitter: Enable sharing to Twitter
share_unmark: Enable sharing to Unmark.it
show_printlink: Display a link to print content

View File

@ -1,5 +1,6 @@
settings_changed: Configuración actualizada
download_pictures: Descargar imágenes en el servidor
carrot: Activar compartir en Carrot
diaspora_url: URL de diaspora*, si el servicio está activado
export_epub: Activar exportación a ePub
export_mobi: Activar exportación a .mobi
@ -11,10 +12,12 @@ export_xml: Activar exportación a XML
import_with_rabbitmq: Activar RabbitMQ para importar datos de forma asíncrona
import_with_redis: Activar Redis para importar datos de forma asíncrona
shaarli_url: URL de Shaarli, si el servicio está activado
scuttle_url: URL de Scuttle, si el servicio está activado
unmark_url: URL de Unmark, si el servicio está activado
share_diaspora: Activar compartir en diaspora*
share_mail: Activar compartir por correo electrónico
share_shaarli: Activar compartir en Shaarli
share_scuttle: Activar compartir en Scuttle
share_twitter: Activar compartir en Twitter
share_unmark: Activar compartir en Unmark.it
show_printlink: Mostrar un enlace para imprimir el contenido

View File

@ -1,4 +1,5 @@
download_pictures: تصاویر را در کارگزار خودتان باربگیرید
carrot: فعال‌سازی هم‌رسانی به Carrot
diaspora_url: نشانی Diaspora، اگر فعال بود
export_epub: فعال‌سازی برون‌سپاری به ePub
export_mobi: فعال‌سازی برون‌سپاری به mobi
@ -8,10 +9,12 @@ export_json: فعال‌سازی برون‌سپاری به JSON
export_txt: فعال‌سازی برون‌سپاری به TXT
export_xml: فعال‌سازی برون‌سپاری به XML
shaarli_url: نشانی Shaarli، اگر فعال بود
scuttle_url: نشانی Scuttle، اگر فعال بود
unmark_url: نشانی Unmark، اگر فعال بود
share_diaspora: فعال‌سازی هم‌رسانی به Diaspora
share_mail: فعال‌سازی هم‌رسانی با ایمیل
share_shaarli: فعال‌سازی هم‌رسانی به Shaarli
share_scuttle: فعال‌سازی هم‌رسانی به Scuttle
share_twitter: فعال‌سازی هم‌رسانی به Twitter
share_unmark: فعال‌سازی هم‌رسانی به Unmark.it
show_printlink: نمایش پیوندی برای چاپ مطلب

View File

@ -1,5 +1,6 @@
settings_changed: Configuration mise à jour
download_pictures: Télécharger les images sur le serveur
carrot: Activer le partage vers Carrot
diaspora_url: URL de diaspora*, si le service est activé
export_epub: Activer l'export ePub
export_mobi: Activer l'export .mobi (déprécié, sera supprimé prochainement)
@ -11,10 +12,12 @@ export_xml: Activer l'export XML
import_with_rabbitmq: Activer RabbitMQ pour gérer les imports de façon asynchrone
import_with_redis: Activer Redis pour gérer les imports de façon asynchrone
shaarli_url: URL de Shaarli, si le service Shaarli est activé
scuttle_url: URL de Scuttle, si le service Scuttle est activé
unmark_url: URL de Unmark, si le service Unmark est activé
share_diaspora: Activer le partage vers diaspora*
share_mail: Activer le partage par courriel
share_shaarli: Activer le partage vers Shaarli
share_scuttle: Activer le partage vers Scuttle
share_twitter: Activer le partage vers Twitter
share_unmark: Activer le partage vers Unmark.it
show_printlink: Afficher un lien pour imprimer

View File

@ -18,10 +18,12 @@ wallabag_support_url: URL de axuda de wallabag
show_printlink: Mostrar unha ligazón para imprimir o contido
share_unmark: Activar a compartición en Unmark.it
share_twitter: Activar a compartición en Twitter
share_scuttle: Activar a compartición en Scuttle
share_shaarli: Activar a compartición en Shaarli
share_mail: Activar a compartición por email
share_diaspora: Activar a compartición en diaspora*
unmark_url: URL Unmark, se o servizo está activo
scuttle_url: URL Scuttle, se o servizo está activo
shaarli_url: URL Shaarli, se o servizo está activo
import_with_redis: Activar a importación asíncrona con Redis
import_with_rabbitmq: Activar a importación asíncrona con RabbitMQ
@ -33,5 +35,6 @@ export_pdf: Activar exportación PDF
export_mobi: Activar exportación .mobi (xa non se usa, vai ser eliminada)
export_epub: Activar exportación ePub
diaspora_url: URL de diaspora*, se o servizo está activo
carrot: Activar compartir en Carrot
download_pictures: Descargar imaxes no teu servidor
settings_changed: Configuración actualizada

View File

@ -20,6 +20,7 @@ import_with_redis: Aktiviraj Redis za asinkroni uvoz podataka
restricted_access: Aktiviraj autentifikaciju za naplatne web-stranice
export_mobi: Aktiviraj .mobi izvoz (zastarjelo, uskoro će se ukloniti)
demo_mode_enabled: Aktivirati demo modus? (Koristi se samo za javnu wallabag demonstraciju)
carrot: Aktiviraj dijeljenje na Carrot
diaspora_url: diaspora* URL, ako je usluga aktivirana
import_with_rabbitmq: Aktiviraj RabbitMQ za asinkroni uvoz podataka
api_user_registration: Aktiviraj korisničku registraciju putem sučelja

View File

@ -1,5 +1,6 @@
settings_changed: Beállítások frissítve
download_pictures: Képek letöltése a kiszolgálóra
carrot: Megosztás engedélyezése a Carrot-ra
diaspora_url: diaspora* URL, ha a szolgáltatás engedélyezett
export_epub: ePub-ba exportálás engedélyezése
export_mobi: .mobi-ba exportálás engedélyezése
@ -11,10 +12,12 @@ export_xml: XML-be exportálás engedélyezése
import_with_rabbitmq: A RabbitMQ aszinkron adatimportálásának engedélyezése
import_with_redis: A Redis aszinkron adatimportálásának engedélyezése
shaarli_url: Shaarli URL, ha a szolgáltatás engedélyezett
scuttle_url: Scuttle URL, ha a szolgáltatás engedélyezett
unmark_url: Unmark URL, ha a szolgáltatás engedélyezett
share_diaspora: Megosztás engedélyezése a diaspora*-ra
share_mail: Megosztás engedélyezése e-mail-ben
share_shaarli: Megosztás engedélyezése a Shaarli-ra
share_scuttle: Megosztás engedélyezése a Scuttle-ra
share_twitter: Megosztás engedélyezése a Twitter-re
share_unmark: Megosztás engedélyezése az Unmark.it-ra
show_printlink: Hivatkozás mutatása a tartalom nyomtatására

View File

@ -5,10 +5,12 @@ export_pdf: Aktifkan pengeksporan PDF
export_mobi: Aktifkan pengeksporan .mobi
export_epub: Aktifkan pengeksporan ePub
diaspora_url: URL diaspora*, jika layanan diaktifkan
carrot: Aktifkan bagikan ke Carrot
settings_changed: Konfigurasi diperbarui
share_unmark: Aktifkan berbagi ke Unmark.it
shaarli_share_origin_url: Aktifkan berbagi URL asal ke Shaarli, jika layanan diaktifkan
share_public: Izinkan URL publik untuk entri
share_scuttle: Aktifkan berbagi ke Scuttle
restricted_access: Aktifkan otentikasi untuk situs web berbayar
share_twitter: Aktifkan berbagi ke Twitter
demo_mode_enabled: Aktifkan mode demo? (Hanya digunakan untuk demo wallabag publik)
@ -16,6 +18,7 @@ download_images_enabled: Unduh gambar secara lokal
store_article_headers: Aktifkan jika wallabag menyimpan header HTTP untuk setiap artikel
api_user_registration: Aktifkan pendaftaran pengguna melalui API
demo_mode_username: Pengguna demo
scuttle_url: Scuttle URL, jika layanan diaktifkan
download_pictures: Unduh gambar ke server Anda
export_xml: Aktifkan ekspor XML
import_with_rabbitmq: Aktifkan RabbitMQ untuk mengimpor data secara asinkron

View File

@ -1,4 +1,5 @@
download_pictures: Scarica le immagini sul tuo server
carrot: Abilita condivisione con Carrot
diaspora_url: URL di diaspora*, se il servizio è abilitato
export_epub: Abilita esportazione ePub
export_mobi: Abilita esportazione .mobi (deprecato, verrà rimosso presto)
@ -8,10 +9,12 @@ export_json: Abilita esportazione JSON
export_txt: Abilita esportazione TXT
export_xml: Abilita esportazione XML
shaarli_url: URL Shaarli, se il servizio è abilitato
scuttle_url: URL Scuttle, se il servizio è abilitato
unmark_url: URL Unmark, se il servizio è abilitato
share_diaspora: Abilita la condivisione con diaspora*
share_mail: Abilita la condivisione via e-mail
share_shaarli: Abilita la condivisione con Shaarli
share_scuttle: Abilita la condivisione con Scuttle
share_twitter: Abilita la condivisione con Twitter
share_unmark: Abilita la condivisione con Unmark.it
show_printlink: Mostra un collegamento per stampare il contenuto

View File

@ -1,5 +1,6 @@
settings_changed: 設定を更新しました
download_pictures: サーバー上の画像をダウンロード
carrot: Carrot への共有を有効にする
diaspora_url: diaspora* URL、サービスが有効になっている場合
export_epub: ePub のエクスポートを有効にする
export_mobi: .mobi のエクスポートを有効にする(非推奨、近日中に削除されます)
@ -11,10 +12,12 @@ export_xml: XML のエクスポートを有効にする
import_with_rabbitmq: RabbitMQ を有効にして、データを非同期的にインポートする
import_with_redis: Redis を有効にして、データを非同期的にインポートする
shaarli_url: サービスが有効になっている場合、Shaarli URL
scuttle_url: Scuttle URL、サービスが有効になっている場合
unmark_url: Unmark URL、サービスが有効な場合
share_diaspora: diaspora* に共有を有効にする
share_mail: メールで共有を有効にする
share_shaarli: Shaarli に共有を有効にする
share_scuttle: Scuttle に共有を有効にする
share_twitter: Twitter に共有を有効にする
share_unmark: Unmark.it に共有を有効にする
show_printlink: 印刷するコンテンツへのリンクを表示

View File

@ -19,11 +19,13 @@ wallabag_support_url: Wallabag 지원 URL
show_printlink: 콘텐츠 인쇄 링크 표시
share_unmark: Unmark.it 공유 활성화
diaspora_url: Diaspora* URL (서비스가 활성화 된 경우)
share_scuttle: Scuttle 공유 활성화
share_shaarli: Shaarli 공유 활성화
share_mail: 이메일 공유 활성화
share_diaspora: Diaspora* 공유 활성화
share_twitter: Twitter 공유 활성화
unmark_url: Unmark URL (서비스가 활성화 된 경우)
scuttle_url: Scuttle URL (서비스가 활성화 된 경우)
shaarli_url: Shaarli URL (서비스가 활성화 된 경우)
import_with_redis: Redis가 데이터를 비동기적으로 가져오도록 설정
import_with_rabbitmq: RabbitMQ가 데이터를 비동기적으로 가져오도록 설정
@ -34,4 +36,5 @@ export_csv: CSV 내보내기 활성화
export_pdf: PDF 내보내기 활성화
export_mobi: .mobi 내보내기 활성화
export_epub: ePub 내보내기 활성화
carrot: Carrot에 공유 활성화
settings_changed: 설정을 업데이트했습니다

View File

@ -1,5 +1,6 @@
settings_changed: Oppsett oppdatert
download_pictures: Last ned bilder til tjeneren din
carrot: Skru på deling til Carrot
diaspora_url: diaspora*-nettadresse, hvis tjenesten er avskrudd
export_epub: Skru på ePub-eksport
export_mobi: Skru på .mobi-eksport
@ -31,7 +32,9 @@ demo_mode_username: Demo-bruker
share_public: Tillat offentlige nettadresser for oppføringer
download_images_enabled: Last ned bilder lokalt
restricted_access: Skru på identitetsbekreftelse for nettsider med betalingsmur
scuttle_url: Scuttle-nettadresse, hvis tjenesten er påskrudd
unmark_url: Unmark-nettadresse, hvis tjenesten er påskrudd
share_scuttle: Skru på deling til Scuttle
api_user_registration: Skru på brukerregistrering via API-et
store_article_headers: Skru på hvis wallabag lagrer HTTP-hoder for hver artikkel
shaarli_share_origin_url: Skru på deling av opprinnelsesnettadresse til Shaarli, hvis tjenesten er påskrudd

View File

@ -17,6 +17,7 @@ wallabag_support_url: Hulp URL voor wallabag
show_printlink: Toon een link naar de print inhoud
share_unmark: Schakel delen met Unmark.it in
share_twitter: Schakel delen met Twitter in
share_scuttle: Schakel delen met Scuttle in
share_shaarli: Schakel delen met Shaarli in
share_mail: Schakel delen naar e-mail in
share_diaspora: Schakel deel naar diaspora* in
@ -32,6 +33,7 @@ export_csv: Schakel CSV-export in
export_pdf: Schakel PDF-export in
export_mobi: Schakel .mobi-export in
export_epub: Schakel ePub-export in
carrot: Schakel delen naar Carrot in
download_pictures: Download foto's naar jouw server
settings_changed: Instellingen bijgewerkt
diaspora_url: diaspora* URL, als de dienst is aangezet

View File

@ -1,5 +1,6 @@
settings_changed: Configuracion mesa a jorn
download_pictures: Telecargar los imatges sul servidor
carrot: Activar lo partatge cap a Carrot
diaspora_url: URL de diaspora*, se lo servici diaspora* es activat
export_epub: Activar l'expòrt ePub
export_mobi: Activar l'expòrt .mobi
@ -11,6 +12,7 @@ export_xml: Activar l'expòrt XML
import_with_rabbitmq: Activar RabbitMQ per importar de donadas de manièra asincròna
import_with_redis: Activar Redis per importar de donadas de manièra asincròna
shaarli_url: URL de Shaarli, se lo servici Shaarli es activat
scuttle_url: URL de Scuttle, se lo servici Scuttle es activat
unmark_url: URL de Unmark, se lo servici Scuttle es activat
share_diaspora: Activar lo partatge cap a Diaspora*
share_mail: Activar lo partatge per corrièl

View File

@ -1,5 +1,6 @@
settings_changed: Konfiguracja zaktualizowana
download_pictures: Pobierz obrazy na swój serwer
carrot: Włącz udostępnianie dla Carrot
diaspora_url: Adres URL Diaspora, jeżeli usługa jest włączona
export_epub: Włącz eksport do ePub
export_mobi: Włącz eksport do plików .mobi (przestarzałe, zostanie wkrótce usunięte)
@ -11,9 +12,11 @@ export_xml: Włącz eksport do XML
import_with_rabbitmq: Włącz RabbitMQ dla asynchronicznego importu danych
import_with_redis: Włącz Redis dla asynchronicznego importu danych
shaarli_url: Adress URL Shaarli, jeżeli usługa jest włączona
scuttle_url: Adress URL Scuttle, jeżeli usługa jest włączona
share_diaspora: Włącz udostępnianie dla Diaspora
share_mail: Włącz udostępnianie przez e-mail
share_shaarli: Włącz udostępnianie dla Shaarli
share_scuttle: Włącz udostępnianie dla Scuttle
share_twitter: Włącz udostępnianie dla Twitter
share_unmark: Włącz udostępnianie dla Unmark.it
show_printlink: Pokaż link do wydrukowania zawartości

View File

@ -1,4 +1,5 @@
download_pictures: Descarregar imagens ao seu servidor
carrot: Habilitar compartilhamento para o Carrot
diaspora_url: URL de diaspora* caso o serviço esteja ativado
export_epub: Habilita exportação para ePub
export_mobi: Habilita exportação para .mobi
@ -8,11 +9,13 @@ export_json: Habilita exportação para JSON
export_txt: Habilita exportação para TXT
export_xml: Habilita exportação para XML
shaarli_url: URL de Shaarli caso o serviço esteja ativado
scuttle_url: URL de Scuttle caso o serviço esteja ativado
unmark_url: URL de Unmark caso o serviço esteja ativado
pocket_consumer_key: Chave de consumidor do Pocket para importar conteúdo (https://getpocket.com/developer/docs/authentication)
share_diaspora: Habilitar compartilhamento para o diaspora*
share_mail: Habilitar compartilhamento por e-mail
share_shaarli: Habilitar compartilhamento para o Shaarli
share_scuttle: Habilitar compartilhamento para o Scuttle
share_twitter: Habilitar compartilhamento para o Twitter
share_unmark: Habilitar compartilhamento para o Unmark.it
show_printlink: Mostrar um link para imprimir o conteúdo

View File

@ -1,4 +1,5 @@
download_pictures: Descarcă poze pe server
carrot: Permite share către Carrot
diaspora_url: diaspora* URL, dacă serviciul este permis
export_epub: Permite exportare ePub
export_mobi: Permite exportare .mobi
@ -8,10 +9,12 @@ export_json: Permite exportare JSON
export_txt: Permite exportare TXT
export_xml: Permite exportare XML
shaarli_url: Shaarli URL, dacă serviciul este permis
scuttle_url: Scuttle URL, dacă serviciul este permis
unmark_url: Unmark URL, dacă serviciul este permis
share_diaspora: Permite share către diaspora*
share_mail: Permite share prin email
share_shaarli: Permite share către Shaarli
share_scuttle: Permite share către Scuttle
share_twitter: Permite share către Twitter
share_unmark: Permite share către Unmark.it
show_printlink: Afișează un link pentru a printa content-ul

View File

@ -1,5 +1,6 @@
settings_changed: "Настройки обновлены"
download_pictures: "Скачивать картинки на Ваш сервер"
carrot: "Включить возможность отслеживания событий через Carrot"
diaspora_url: "Diaspora URL, если сервис включен"
export_epub: "Включить ePub экспорт"
export_mobi: "Включить .mobi экспорт"
@ -11,6 +12,7 @@ export_xml: "Включить XML экспорт"
import_with_rabbitmq: "Включить RabbitMQ для импорта данных(асинхронно)"
import_with_redis: "Включить Redis для импорта данных(асинхронно)"
shaarli_url: "Shaarli URL, если сервис включен"
scuttle_url: "Scuttle URL, если сервис включен"
unmark_url: "Unmark URL, если сервис включен"
share_diaspora: "Включить возможность поделиться в соц.сети Diaspora"
share_mail: "Включить возможность поделиться по email"
@ -36,3 +38,4 @@ restricted_access: "Включить авторизацию на сайте с
shaarli_share_origin_url: Включите отправку URL-адреса источника для Shaarli, если услуга включена
store_article_headers: Включите, если wallabag хранит заголовки HTTP для каждой статьи
api_user_registration: Разрешить пользователю регистрироваться с помощью API
share_scuttle: Включить возможность поделиться в Shaarli

View File

@ -1,5 +1,6 @@
settings_changed: ปรับปรุงองค์ประกอบ
download_pictures: ดาวน์โหลดรูปภาพผ่านเซิฟเวอร์ของคุณ
carrot: เปิดการแชร์ Carrot
diaspora_url: Diaspora-URL, ถ้าเซิฟเวอร์ถูกเปิดใช้งาน
export_epub: เปิดใช้งานการนำเข้าข้อมูลแบบ ePub
export_mobi: เปิดใช้งานการนำเข้าข้อมูลแบบ .mobi
@ -14,6 +15,7 @@ shaarli_url: Shaarli-URL, ถ้าเซิฟเวอร์ถูกเปิ
share_diaspora: เปิดการแชร์ Diaspora
share_mail: เปิดการแชร์ผ่าน email
share_shaarli: เปิดการแชร์ Shaarli
share_scuttle: เปิดการแชร์ Scuttle
share_twitter: เปิดการแชร์ Twitter
share_unmark: เปิดการแชร์ Unmark.it
show_printlink: แสดงลิงค์เพื่อปรินท์เนื้อหา

View File

@ -1,5 +1,6 @@
settings_changed: Ayarlar güncellendi
download_pictures: Resimleri sunucuya indir
carrot: Carrot'a paylaşımı etkinleştir
diaspora_url: hizmet etkinse diaspora* URL'si
export_epub: ePub dışa aktarımını etkinleştir
export_mobi: .mobi dışa aktarımını etkinleştir (kullanım dışı, yakında kaldırılacak)
@ -11,10 +12,12 @@ export_xml: XML dışa aktarımını etkinleştir
import_with_rabbitmq: Verileri eşzamansız olarak içe aktarmak için RabbitMQ'yu etkinleştir
import_with_redis: Verileri eşzamansız olarak içe aktarmak için Redis'i etkinleştir
shaarli_url: Hizmet etkinse Shaarli URL'si
scuttle_url: Hizmet etkinse Scuttle URL'si
unmark_url: Hizmet etkinse Unmark URL'si
share_diaspora: diaspora*'ya paylaşımı etkinleştir
share_mail: E-posta ile paylaşımı etkinleştir
share_shaarli: Shaarli'ye paylaşımı etkinleştir
share_scuttle: Scuttle'a paylaşımı etkinleştir
share_twitter: Twitter'a paylaşımı etkinleştir
share_unmark: Unmark.it'e paylaşımı etkinleştir
show_printlink: İçeriği yazdırabilmek için bir bağlantı görüntüle

View File

@ -1,5 +1,6 @@
settings_changed: Конфігурацію оновлено
download_pictures: Завантажити картинки на ваш сервер
carrot: Дозволити ділитися в Carrot
diaspora_url: diaspora* адреса, якщо сервіс увімкнено
export_epub: Увімкнути експорт в ePub
export_mobi: Увімкнути експорт в .mobi
@ -11,10 +12,12 @@ export_xml: Увімкнути експорт в XML
import_with_rabbitmq: Увімкнути можливість асинхронного імпорту через RabbitMQ
import_with_redis: Увімкнути можливість асинхронного імпорту через Redis
shaarli_url: Shaarli URL, якщо сервіс увімкнено
scuttle_url: Scuttle URL, якщо сервіс увімкнено
unmark_url: Unmark URL, якщо сервіс увімкнено
share_diaspora: Дозволити ділитися в diaspora*
share_mail: Дозволити ділитись електронною поштою
share_shaarli: Дозволити ділитися в Shaarli
share_scuttle: Дозволити ділитися в Scuttle
share_twitter: Дозволити ділитися в Twitter
share_unmark: Дозволити ділитися в Unmark.it
show_printlink: Показувати лінк для друку

View File

@ -1,5 +1,6 @@
settings_changed: 配置已更新
download_pictures: 在你的服务器上缓存图片
carrot: 启用分享到 Carrot
diaspora_url: diaspora* 链接,如果该服务已被启用
export_epub: 启用 ePub 导出
export_mobi: 启用 .mobi 导出(已废弃,不久后将移除)
@ -11,10 +12,12 @@ export_xml: 启用 XML 导出
import_with_rabbitmq: 启用 RabbitMQ 来异步导入数据
import_with_redis: 启用 Redis 来异步导入数据
shaarli_url: Shaarli 链接,如果该服务已被启用
scuttle_url: Scuttle 链接,如果该服务已被启用
unmark_url: Unmark 链接,如果该服务已被启用
share_diaspora: 启用分享到 diaspora*
share_mail: 启用邮件分享
share_shaarli: 启用分享到 Shaarli
share_scuttle: 启用分享到 Scuttle
share_twitter: 启用分享到 Twitter
share_unmark: 启用分享到 Unmark.it
show_printlink: 展示一个用于打印内容的链接

View File

@ -2,3 +2,4 @@ download_pictures: 下載圖片至你的服務器上
diaspora_url: diaspora* URL(如果該服務已啟用)
settings_changed: 已更新設定
export_epub: 啟用 ePub 輸出
carrot: 啟用分享至 Carrot

View File

@ -1,4 +1,4 @@
{% extends "@WallabagCore/layout.html.twig" %}
{% extends "WallabagCoreBundle::layout.html.twig" %}
{% block title %}{{ 'menu.left.internal_settings'|trans }}{% endblock %}
@ -12,17 +12,17 @@
<div class="row">
<div class="div_tabs col s12">
<ul class="tabs">
{% for section in sections|craue_sortSections %}
<li class="tab col s12 m6 l3"><a href="#set-{{ section }}">{{ section|trans({}, 'CraueConfigBundle') }}</a></li>
{% for section in sections | craue_sortSections %}
<li class="tab col s12 m6 l3"><a href="#set-{{ section }}">{{ section | trans({}, 'CraueConfigBundle') }}</a></li>
{% endfor %}
</ul>
</div>
{% for section in sections|craue_sortSections %}
{% for section in sections | craue_sortSections %}
<div id="set-{{ section }}" class="col s12">
{% for setting in form.settings if setting.vars.value.section == section %}
{{ form_row(setting.value, {
'label': setting.vars.value.name|trans({}, 'CraueConfigBundle'),
'label': setting.vars.value.name | trans({}, 'CraueConfigBundle'),
}) }}
{% endfor %}
</div>
@ -30,7 +30,7 @@
</div>
<button class="btn waves-effect waves-light" type="submit" name="action">
{{ 'modify_settings'|trans({}, 'CraueConfigBundle') }}
{{ 'modify_settings' | trans({}, 'CraueConfigBundle') }}
</button>
{{ form_widget(form._token) }}

View File

@ -1,6 +1,6 @@
{% trans_default_domain 'FOSUserBundle' %}
{{ form_start(form, {'action': path('fos_user_change_password'), 'attr': {'class': 'fos_user_change_password'}}) }}
{{ form_start(form, { 'action': path('fos_user_change_password'), 'attr': { 'class': 'fos_user_change_password' } }) }}
<div class="card-content">
<div class="row">
{{ form_widget(form) }}

View File

@ -1,4 +1,4 @@
{% extends "@FOSUser/layout.html.twig" %}
{% extends "FOSUserBundle::layout.html.twig" %}
{% trans_default_domain 'FOSUserBundle' %}

View File

@ -1,4 +1,4 @@
{% extends "@FOSUser/layout.html.twig" %}
{% extends "FOSUserBundle::layout.html.twig" %}
{% trans_default_domain 'FOSUserBundle' %}
@ -11,7 +11,7 @@
{% endif %}
</div>
<div class="card-action center">
<a href="{{ path('homepage') }}" class="waves-effect waves-light btn">{{ 'security.register.go_to_account'|trans({}, 'messages') }}</a>
<a href="{{ path('homepage') }}" class="waves-effect waves-light btn">{{ 'security.register.go_to_account'|trans({},'messages') }}</a>
</div>
</div>
{% endblock fos_user_content %}

View File

@ -5,8 +5,8 @@
<div class="row">
{{ form_widget(form._token) }}
{% for flash_message in app.session.flashbag.get('notice') %}
<span class="black-text"><p>{{ flash_message }}</p></span>
{% for flashMessage in app.session.flashbag.get('notice') %}
<span class="black-text"><p>{{ flashMessage }}</p></span>
{% endfor %}
<div class="input-field col s12">

View File

@ -1,4 +1,4 @@
{% extends "@FOSUser/layout.html.twig" %}
{% extends "FOSUserBundle::layout.html.twig" %}
{% trans_default_domain 'FOSUserBundle' %}

View File

@ -5,8 +5,8 @@
<div class="row">
<p>{{ 'security.resetting.description'|trans({}, "messages") }}</p>
{% for flash_message in app.session.flashbag.get('notice') %}
<span class="black-text"><p>{{ flash_message }}</p></span>
{% for flashMessage in app.session.flashbag.get('notice') %}
<span class="black-text"><p>{{ flashMessage }}</p></span>
{% endfor %}
{% if invalid_username is defined %}

View File

@ -1,6 +1,6 @@
{% trans_default_domain 'FOSUserBundle' %}
{{ form_start(form, {'action': path('fos_user_resetting_reset', {'token': token}), 'attr': {'class': 'fos_user_resetting_reset'}}) }}
{{ form_start(form, { 'action': path('fos_user_resetting_reset', {'token': token}), 'attr': { 'class': 'fos_user_resetting_reset' } }) }}
<div class="card-content">
<div class="row">
{{ form_widget(form) }}

View File

@ -1,4 +1,4 @@
{% extends "@FOSUser/layout.html.twig" %}
{% extends "FOSUserBundle::layout.html.twig" %}
{% block fos_user_content %}
<form action="{{ path('fos_user_security_check') }}" method="post" name="loginform">
@ -8,8 +8,8 @@
<script>Materialize.toast('{{ error.messageKey|trans(error.messageData, 'security') }}', 4000)</script>
{% endif %}
{% for flash_message in app.session.flashbag.get('notice') %}
<script>Materialize.toast('{{ flash_message }}')</script>
{% for flashMessage in app.session.flashbag.get('notice') %}
<script>Materialize.toast('{{ flashMessage }}')</script>
{% endfor %}
<div class="row">

View File

@ -1,4 +1,4 @@
{% extends "@WallabagCore/layout.html.twig" %}
{% extends "WallabagCoreBundle::layout.html.twig" %}
{% block title %}{{ 'security.login.page_title'|trans }}{% endblock %}

Binary file not shown.

After

Width:  |  Height:  |  Size: 530 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

View File

@ -0,0 +1,164 @@
#article {
width: 70%;
margin-bottom: 3em;
text-align: justify;
.tags {
margin-bottom: 1em;
}
i {
font-style: normal;
}
h1 {
text-align: left;
}
h2::after {
content: none;
}
h2,
h3,
h4 {
text-transform: none;
}
}
blockquote {
border: 1px solid #999;
background-color: #fff;
padding: 1em;
margin: 0;
}
.topPosF {
position: fixed;
right: 20%;
bottom: 2em;
font-size: 1.5em;
}
#article_toolbar {
margin-bottom: 1em;
li {
display: inline-block;
margin: 3px auto;
}
a {
background-color: #000;
padding: 0.3em 0.5em 0.2em;
color: #fff;
text-decoration: none;
&:hover,
&:focus {
background-color: #999;
}
}
}
#nav-btn-add-tag {
cursor: pointer;
}
.shaarli::before {
content: "*";
}
.return {
text-decoration: none;
margin-top: 1em;
display: block;
}
.return::before {
margin-right: 0.5em;
}
.notags {
font-style: italic;
color: #999;
}
.icon-feed {
background-color: #000;
color: #fff;
padding: 0.2em 0.5em;
&::before {
position: relative;
top: 2px;
}
}
.list-tags {
li {
margin-bottom: 0.5em;
}
.icon-feed:hover,
.icon-feed:focus {
background-color: #fff;
color: #000;
text-decoration: none;
}
a {
text-decoration: none;
&:hover,
&:focus {
text-decoration: underline;
}
}
}
pre code {
font-family: "Courier New", Courier, monospace;
}
#filters {
position: fixed;
width: 20%;
height: 100%;
top: 0;
right: 0;
background-color: #fff;
padding: 30px 30px 15px 15px;
border-left: 1px #333 solid;
z-index: 12;
min-width: 300px;
form .filter-group {
margin: 5px;
}
}
#download-form {
position: fixed;
width: 10%;
height: 100%;
top: 0;
right: 0;
background-color: #fff;
padding: 30px 30px 15px 15px;
border-left: 1px #333 solid;
z-index: 12;
min-width: 200px;
li {
display: block;
padding: 0.5em 2em 0.5em 1em;
color: #fff;
position: relative;
text-transform: uppercase;
text-decoration: none;
font-weight: 400;
font-family: "PT Sans", sans-serif;
transition: all 0.5s ease;
}
}

View File

@ -0,0 +1,258 @@
::selection {
color: #fff;
background-color: #000;
}
.desktopHide {
display: none;
}
.logo {
position: fixed;
z-index: 20;
top: 0.4em;
left: 0.6em;
}
h2,
h3,
h4 {
font-family: "PT Sans", sans-serif;
text-transform: uppercase;
}
p,
li,
label {
color: #666;
}
a {
color: #000;
font-weight: bold;
&.nostyle {
text-decoration: none;
}
&:hover,
&:focus {
text-decoration: none;
}
}
form fieldset {
border: 0;
padding: 0;
margin: 0;
}
form input[type="text"],
form input[type="number"],
select,
form input[type="password"],
form input[type="url"],
form input[type="email"] {
border: 1px solid #999;
padding: 0.5em 1em;
min-width: 12em;
color: #666;
}
@media screen {
select {
appearance: none;
border-radius: 0;
background: #fff url("../../_global/img/bg-select.png") no-repeat right center;
}
}
.inline {
.row {
display: inline-block;
margin-right: 0.5em;
}
label {
min-width: 6em;
}
}
fieldset label {
display: inline-block;
min-width: 12.5em;
color: #666;
}
label {
margin-right: 0.5em;
}
form .row {
margin-bottom: 0.5em;
}
form button,
input[type="submit"] {
cursor: pointer;
background-color: #000;
color: #fff;
padding: 0.5em 1em;
display: inline-block;
border: 1px solid #000;
}
form button:hover,
form button:focus,
input[type="submit"]:hover,
input[type="submit"]:focus {
background-color: #fff;
color: #000;
transition: all 0.5s ease;
}
#bookmarklet {
cursor: move;
}
h2::after {
content: "";
height: 4px;
width: 20%;
background-color: #000;
display: block;
}
.links {
padding: 0;
margin: 0;
li {
list-style: none;
margin: 0;
padding: 0;
}
}
#links {
position: fixed;
top: 0;
width: 10em;
left: 0;
text-align: right;
background-color: #333;
padding-top: 9.5em;
height: 100%;
box-shadow: inset -4px 0 20px rgb(0 0 0 / 60%);
z-index: 15;
> li > a {
display: block;
padding: 0.5em 2em 0.5em 1em;
color: #fff;
position: relative;
text-transform: uppercase;
text-decoration: none;
font-weight: normal;
font-family: "PT Sans", sans-serif;
transition: all 0.5s ease;
&:hover,
&:focus {
background-color: #999;
color: #000;
}
}
.current::after {
content: "";
width: 0;
height: 0;
position: absolute;
border: 10px solid transparent;
border-right-color: #eee;
right: 0;
top: 50%;
margin-top: -10px;
}
li:last-child {
position: fixed;
bottom: 1em;
width: 10em;
a::before {
font-size: 1.2em;
position: relative;
top: 2px;
}
}
}
#main {
margin-left: 12em;
position: relative;
z-index: 10;
padding-right: 5%;
padding-bottom: 1em;
}
#sort {
padding: 0;
list-style-type: none;
opacity: 0.5;
display: inline-block;
li {
display: inline;
font-size: 0.9em;
& + li {
margin-left: 10px;
}
}
a {
padding: 2px 2px 0;
vertical-align: middle;
}
img {
vertical-align: baseline;
:hover {
cursor: pointer;
}
}
}
#display-mode {
float: right;
margin-top: 10px;
margin-bottom: 10px;
opacity: 0.5;
}
#listmode {
width: 16px;
display: inline-block;
text-decoration: none;
&.tablemode {
background: url("../../_global/img/table.png") no-repeat bottom;
}
.listmode {
background: url("../../_global/img/list.png") no-repeat bottom;
}
}
#warning_message {
position: fixed;
background-color: #ff6347;
z-index: 1000;
bottom: 0;
left: 0;
width: 100%;
color: #000;
}

View File

@ -0,0 +1,13 @@
/* Style */
@import "guide";
@import "layout";
@import "article";
@import "pictos";
@import "login";
@import "save";
@import "messages";
/* Tools */
@import "media_queries";
@import "print";
@import "ratatouille";

View File

@ -0,0 +1,309 @@
#content {
margin-top: 2em;
min-height: 30em;
}
footer {
text-align: right;
position: relative;
bottom: 0;
right: 5em;
color: #999;
font-size: 0.8em;
font-style: italic;
z-index: 20;
a {
color: #999;
font-weight: normal;
}
}
.list-entries {
letter-spacing: -5px;
}
.listmode.entry {
width: 100%;
height: inherit;
}
.card-entry-tags {
max-height: 2em;
overflow-y: hidden;
padding: 0;
margin: 0;
}
.card-entry-tags li,
.card-entry-tags span {
display: inline-block;
margin: 0 5px;
padding: 5px 12px;
background-color: rgb(0 0 0 / 60%);
border-radius: 3px;
max-height: 2em;
overflow: hidden;
text-overflow: ellipsis;
}
.card-entry-tags a,
.card-entry-labels a {
text-decoration: none;
font-weight: normal;
color: #fff;
}
.nav-panel-add-tag {
margin-top: 10px;
}
.list-entries + .results {
margin-bottom: 2em;
}
.reading-time,
.created-at {
color: #999;
font-style: italic;
font-weight: normal;
font-size: 0.9em;
}
.estimatedTime small {
position: relative;
top: -1px;
}
.entry {
background-color: #fff;
letter-spacing: normal;
box-shadow: 0 3px 7px rgb(0 0 0 / 30%);
display: inline-block;
width: 32%;
margin-bottom: 1.5em;
vertical-align: top;
margin-right: 1%;
position: relative;
overflow: hidden;
padding: 1.5em 0 3em;
height: 440px;
img.preview {
width: 100%;
object-fit: cover;
height: 100%;
}
&::before {
content: "";
width: 0;
height: 0;
border: 10px solid transparent;
border-bottom-color: #000;
position: absolute;
bottom: 0.7em;
z-index: 10;
right: 1.5em;
transition: all 0.5s ease;
}
&::after {
content: "";
position: absolute;
height: 7px;
width: 100%;
bottom: 0;
left: 0;
background-color: #000;
transition: all 0.5s ease;
}
&:hover {
box-shadow: 0 3px 10px rgb(0 0 0 / 100%);
&::after {
height: 40px;
}
&::before {
bottom: 2.3em;
}
h2 a {
color: #666;
}
.tools {
bottom: 0;
}
}
h2 {
text-transform: none;
margin-bottom: 0;
line-height: 1.2;
margin-left: 5px;
}
&::after {
content: none;
}
a {
display: block;
text-decoration: none;
color: #000;
word-wrap: break-word;
transition: all 0.5s ease;
}
p {
color: #666;
font-size: 0.9em;
line-height: 1.7;
margin: 5px 5px auto;
}
h2 a::first-letter {
text-transform: uppercase;
}
.tools {
position: absolute;
bottom: -40px;
left: 0;
background: #000;
width: 100%;
z-index: 10;
padding-right: 0.5em;
text-align: right;
transition: all 0.5s ease;
a {
color: #666;
text-decoration: none;
display: block;
padding: 0.4em;
&:hover {
color: #fff;
}
}
li {
display: inline-block;
margin-top: 10px;
}
li:first-child {
float: left;
font-size: 0.9em;
max-width: calc(100% - 40px * 4);
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
max-height: 2em;
margin-left: 10px;
}
}
.card-entry-labels {
position: absolute;
top: 100px;
left: -1em;
z-index: 90;
max-width: 50%;
padding-left: 0;
li {
margin: 10px 10px 10px auto;
padding: 5px 12px 5px 25px;
background-color: rgb(0 0 0 / 60%);
border-radius: 0 3px 3px 0;
color: #fff;
cursor: default;
max-height: 2em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
a {
color: #fff;
}
}
}
}
.entry:nth-child(3n+1) {
margin-left: 0;
}
.results {
letter-spacing: -5px;
padding: 0 0 0.5em;
> * {
display: inline-block;
vertical-align: top;
letter-spacing: normal;
width: 50%;
text-align: right;
}
}
div.pagination ul {
text-align: right;
}
.nb-results {
text-align: left;
font-style: italic;
color: #999;
display: inline-flex;
}
div.pagination ul {
a {
color: #999;
text-decoration: none;
&:hover,
&:focus {
text-decoration: underline;
}
}
> * {
display: inline-block;
margin-left: 0.5em;
}
.prev.disabled,
.next.disabled {
display: none;
}
.current {
height: 25px;
padding: 4px 8px;
border: 1px solid #d5d5d5;
text-decoration: none;
font-weight: bold;
color: #000;
background-color: #ccc;
}
}
.card-tag-form {
display: inline-block;
}
.card-tag-form input[type="text"] {
min-width: 20em;
}
.hide,
.hidden {
display: none;
}

View File

@ -0,0 +1,26 @@
.login {
background-color: #333;
#main {
padding: 0;
margin: 0;
}
form {
background-color: #fff;
padding: 1.5em;
box-shadow: 0 1px 8px rgb(0 0 0 / 90%);
width: 20em;
position: absolute;
top: 8em;
left: 50%;
margin-left: -10em;
}
.logo {
position: absolute;
top: 2em;
left: 50%;
margin-left: -55px;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,177 @@
@media screen and (max-width: 1050px) {
.entry {
width: 49%;
}
.entry:nth-child(3n+1) {
margin-left: 1.5%;
}
.entry:nth-child(2n+1) {
margin-left: 0;
}
}
@media screen and (max-width: 900px) {
#article {
width: 80%;
}
.topPosF {
right: 2.5em;
}
}
@media screen and (max-width: 700px) {
.entry {
width: 100%;
margin-left: 0;
}
#display-mode {
display: none;
}
}
@media screen and (max-height: 770px) {
.menu.users,
.menu.internal,
.menu.developer {
display: none;
}
}
@media screen and (max-width: 500px) {
.entry {
width: 100%;
margin-left: 0;
}
body > header {
background-color: #333;
position: fixed;
top: 0;
width: 100%;
height: 3em;
z-index: 11;
}
#links li:last-child {
position: static;
width: auto;
}
#links li:last-child a::before {
content: none;
}
.logo {
width: 1.25em;
height: 1.25em;
left: 0;
top: 0;
}
.login > header {
position: static;
}
.login form {
width: 100%;
position: static;
margin-left: 0;
}
.login .logo {
height: auto;
top: 0.5em;
width: 75px;
margin-left: -37.5px;
}
.desktopHide {
display: block;
position: fixed;
z-index: 20;
top: 0;
right: 0;
border: 0;
width: 2.5em;
height: 2.5em;
cursor: pointer;
background-color: #999;
font-size: 1.2em;
}
.desktopHide:hover,
.desktopHide:focus {
background-color: #fff;
}
#links {
display: none;
width: 100%;
height: auto;
padding-top: 3em;
}
#links.menu--open {
display: block;
}
footer {
position: static;
margin-right: 3em;
}
#main {
margin-left: 1.5em;
padding-right: 1.5em;
position: static;
margin-top: 3em;
}
.card-entry-labels {
display: none;
}
#article_toolbar .topPosF {
display: none;
}
#article {
width: 100%;
}
#article h1 {
font-size: 1.5em;
}
#article_toolbar a {
padding: 0.3em 0.4em 0.2em;
}
#display-mode {
display: none;
}
.popup-form,
#bagit-form,
#search-form {
left: 0;
width: 100%;
border-left: none;
}
.popup-form form,
#bagit-form form,
#search-form form {
width: 100%;
}
}
@media only print {
header h1.logo {
display: none;
}
}

View File

@ -0,0 +1,50 @@
/* ==========================================================================
Messages
========================================================================== */
.messages {
text-align: left;
width: 60%;
margin: auto 17%;
> * {
display: inline-block;
}
.install {
text-align: left;
&.error {
border: 1px solid #c42608;
color: #c00 !important;
background: #fff0ef;
}
&.notice {
border: 1px solid #ebcd41;
color: #000;
background: #fffcd3;
}
&.success {
border: 1px solid #6dc70c;
background: #e0fbcc !important;
}
}
}
.warning {
font-weight: bold;
display: block;
width: 100%;
}
.more-info {
font-size: 0.85em;
line-height: 1.5;
color: #aaa;
a {
color: #aaa;
}
}

View File

@ -0,0 +1,205 @@
/* ==========================================================================
Pictos
========================================================================== */
@font-face {
font-family: icomoon;
src: url("~icomoon-free-npm/Font/IcoMoon-Free.ttf");
font-weight: normal;
font-style: normal;
}
.material-icons {
font-family: "Material Icons";
font-weight: normal;
font-style: normal;
font-size: 1em; /* Preferred icon size */
width: 1em;
height: 1em;
display: inline-block;
line-height: 1;
text-transform: none;
letter-spacing: normal;
word-wrap: normal;
white-space: nowrap;
direction: ltr;
/* Support for all WebKit browsers. */
-webkit-font-smoothing: antialiased;
/* Support for Safari and Chrome. */
text-rendering: optimizeLegibility;
/* Support for Firefox. */
-moz-osx-font-smoothing: grayscale;
/* Support for IE. */
font-feature-settings: "liga";
.md-18 { font-size: 18px; }
.md-24 { font-size: 24px; }
.md-36 { font-size: 36px; }
.md-48 { font-size: 48px; }
.vertical-align-middle {
vertical-align: middle !important;
}
}
.icon span,
.icon-image span {
position: absolute;
top: -9999px;
}
[class^="icon-"]::before,
[class*=" icon-"]::before {
font-family: icomoon;
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Enable Ligatures ================ */
letter-spacing: 0;
font-feature-settings: "liga";
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-flattr::before {
content: "\ead4";
}
.icon-mail::before {
content: "\ea86";
}
.icon-up-open::before {
content: "\e80b";
}
.icon-star::before {
content: "\e9d9";
}
.icon-check::before {
content: "\ea10";
}
.icon-link::before {
content: "\e9cb";
}
.icon-reply::before {
content: "\e806";
}
.icon-menu::before {
content: "\e9bd";
}
.icon-clock::before {
content: "\e803";
}
.icon-twitter::before {
content: "\ea96";
}
.icon-down-open::before {
content: "\e809";
}
.icon-trash::before {
content: "\e9ac";
}
.icon-delete::before {
content: "\ea0d";
}
.icon-power::before {
content: "\ea14";
}
.icon-arrow-up-thick::before {
content: "\ea3a";
}
.icon-feed::before {
content: "\e808";
}
.icon-print::before {
content: "\e954";
}
.icon-reload::before {
content: "\ea2e";
}
.icon-price-tags::before {
content: "\e936";
}
.icon-eye::before {
content: "\e9ce";
}
.icon-no-eye::before {
content: "\e9d1";
}
.icon-calendar::before {
content: "\e953";
}
.icon-time::before {
content: "\e952";
}
/* .icon-image class, for image-based icons
========================================================================== */
.icon-image {
background: no-repeat center/80%;
padding-right: 1em !important;
padding-left: 1em !important;
}
/* Carrot (http://carrot.org) */
.icon-image--carrot {
background-image: url("../../_global/img/icons/carrot-icon--white.png");
}
/* Diaspora */
.icon-image--diaspora {
background-image: url("../../_global/img/icons/Diaspora-asterisk.svg");
}
/* Unmark.it */
.icon-image--unmark {
background-image: url("../../_global/img/icons/unmark-icon--black.png");
}
/* shaarli */
.icon-image--shaarli {
background-image: url("../../_global/img/icons/shaarli.png");
}
/* ==========================================================================
Icon selected
========================================================================== */
.icon-star.fav::before {
color: #fff;
}
.icon-check.archive::before {
color: #fff;
}

View File

@ -0,0 +1,63 @@
@media print {
/* ### Layout ### */
body {
font-family: serif;
background-color: #fff;
}
@page {
margin: 1cm;
}
img {
max-width: 100% !important;
}
/* ### Content ### */
/* Hide useless blocks */
body > .logo,
#article_toolbar,
#links,
#sort,
body > footer,
.top_link,
div.tools,
header div,
.messages,
.entrie + .results,
#article .mbm a,
#article-informations {
display: none !important;
}
article {
border: none !important;
}
/* Add URL after links */
.vieworiginal a::after {
content: " (" attr(href) ")";
}
/* Add explanation after abbr */
abbr[title]::after {
content: " (" attr(title) ")";
}
/* Change border on current pager item */
.pagination span.current {
border-style: dashed;
}
#main {
width: 100%;
margin: 0;
padding: 0;
}
#article {
width: 100%;
}
}

View File

@ -0,0 +1,223 @@
/*
Ratatouille mini Framework css by Thomas LEBEAU
Base on KNACSS => www.KNACSS.com (2013-10) @author: Raphael Goetter, Alsacreations
and normalize.css
*/
* {
box-sizing: border-box;
}
html {
font-family: sans-serif; /* 1 */
text-size-adjust: 100%; /* 2 */
}
body {
font-size: 1em;
line-height: 1.5;
margin: 0;
}
/* ==========================================================================
Mise en forme
========================================================================== */
h1:first-child,
h2:first-child,
h3:first-child,
h4:first-child,
h5:first-child,
h6:first-child,
p:first-child,
ul:first-child,
ol:first-child,
dl:first-child {
margin-top: 0;
}
code,
kbd,
pre,
samp {
font-family: monospace, serif;
}
pre {
white-space: pre-wrap;
}
.upper {
text-transform: uppercase;
}
.bold {
font-weight: bold;
}
.inner {
margin: 0 auto;
max-width: 61.25em; /* 980px */
}
table,
img,
figure {
max-width: 100%;
height: auto;
}
iframe {
max-width: 100%;
}
.fl {
float: left;
}
.fr {
float: right;
}
table {
border-collapse: collapse;
}
figure {
margin: 0;
}
button,
input,
select,
textarea {
font-family: inherit;
font-size: 100%;
margin: 0;
}
input[type="search"] {
appearance: textfield;
}
/* ==========================================================================
Mise en page
========================================================================== */
.dib {
display: inline-block;
vertical-align: middle;
}
.dnone {
display: none;
}
.dtable {
display: table;
}
.dtable > * {
display: table-row;
}
.dtable > * > * {
display: table-cell;
}
.element-invisible {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.small {
font-size: 0.8em;
}
.big {
font-size: 1.2em;
}
/* Width */
.w100 {
width: 100%;
}
.w90 {
width: 90%;
}
.w80 {
width: 80%;
}
.w70 {
width: 70%;
}
.w60 {
width: 60%;
}
.w50 {
width: 50%;
}
.w40 {
width: 40%;
}
.w30 {
width: 30%;
}
.w20 {
width: 20%;
}
.w10 {
width: 10%;
}
/* ==========================================================================
Internet Explorer
========================================================================== */
/* IE8 and IE9 */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
display: block;
}
/* IE8 and IE9 */
audio,
canvas,
video {
display: inline-block;
}
@media screen {
select {
appearance: none;
border-radius: 0;
}
}

View File

@ -0,0 +1,115 @@
/* ==========================================================================
"save a link" related styles
========================================================================== */
.popup-form {
background: rgb(0 0 0 / 50%);
position: absolute;
top: 0;
left: 10em;
z-index: 20;
height: 100%;
width: 100%;
margin: 0;
margin-top: -30% !important;
padding: 2em;
display: none;
border-left: 1px #eee solid;
form {
background-color: #fff;
position: absolute;
top: 0;
left: 0;
z-index: 20;
border: 10px solid #000;
width: 400px;
height: 200px;
padding: 2em;
}
}
#bagit-form-form .addurl {
margin-left: 0;
}
.closeMessage,
.close-button {
background-color: #000;
color: #fff;
font-size: 1.2em;
line-height: 1.6;
width: 1.6em;
height: 1.6em;
text-align: center;
text-decoration: none;
&:hover,
&:focus {
background-color: #999;
color: #000;
}
}
.close-button--popup {
display: inline-block;
position: absolute;
top: 0;
right: 0;
font-size: 1.4em;
}
.active-current {
background-color: #999;
&::after {
content: "";
width: 0;
height: 0;
position: absolute;
border: 10px solid transparent;
border-right-color: #eee;
right: 0;
top: 50%;
margin-top: -10px;
}
}
.opacity03 {
opacity: 0.3;
}
.add-to-wallabag-link-after {
background-color: #000;
color: #fff;
padding: 0 3px 2px;
}
a.add-to-wallabag-link-after {
visibility: hidden;
position: absolute;
opacity: 0;
transition-duration: 2s;
transition-timing-function: ease-out;
}
#article article a:hover + a.add-to-wallabag-link-after,
a.add-to-wallabag-link-after:hover {
opacity: 1;
visibility: visible;
transition-duration: 0.3s;
transition-timing-function: ease-in;
}
a.add-to-wallabag-link-after::after {
content: "w";
}
#add-link-result {
font-weight: bold;
font-size: 0.9em;
}
.btn-clickable {
cursor: pointer;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 B

View File

@ -0,0 +1,266 @@
import $ from 'jquery';
/* Global imports */
import '../_global/index';
/* Shortcuts */
import './js/shortcuts/main';
import './js/shortcuts/entry';
/* Tools */
import toggleSaveLinkForm from './js/uiTools';
/* Theme style */
import './css/index.scss';
$(document).ready(() => {
/* ==========================================================================
Menu
========================================================================== */
$('#menu').click(() => {
$('#links').toggleClass('menu--open');
const content = $('#content');
if (content.hasClass('opacity03')) {
content.removeClass('opacity03');
}
});
/* ==========================================================================
Add tag panel
========================================================================== */
$('#nav-btn-add-tag').on('click', () => {
$('.baggy-add-tag').toggle(100);
$('.nav-panel-menu').addClass('hidden');
$('#tag_label').focus();
return false;
});
/**
* Filters & Export
*/
// no display if filters not available
if ($('div').is('#filters')) {
$('#button_filters').show();
$('#clear_form_filters').on('click', () => {
$('#filters input').val('');
$('#filters :checked').removeAttr('checked');
return false;
});
}
/**
* Close window after adding entry if popup
*/
const currentUrl = window.location.href;
if (currentUrl.match('&closewin=true')) {
window.close();
}
/**
if ($('article').size() > 0) {
const waypoint = new Waypoint({
element: $('.wallabag-title').get(0),
handler: (direction) => {
console.log(direction);
if (direction === 'down') {
$('aside.tags').fadeIn('slow');
} else {
$('aside.tags').fadeOut('slow');
}
},
offset: 250,
});
}
*/
/**
* Tags autocomplete
*/
/**
* Not working on v2
*
$('#value').bind('keydown', (event) => {
if (event.keyCode === $.ui.keyCode.TAB && $(this).data('ui-autocomplete').menu.active) {
event.preventDefault();
}
}).autocomplete({
source: function source(request, response) {
$.getJSON('./?view=tags', {
term: extractLast(request.term),
//id: $(':hidden#entry_id').val()
}, response);
},
search: function search() {
// custom minLength
const term = extractLast(this.value);
return term.length >= 1;
},
focus: function focus() {
// prevent value inserted on focus
return false;
},
select: function select(event, ui) {
const terms = split(this.value);
// remove the current input
terms.pop();
// add the selected item
terms.push(ui.item.value);
// add placeholder to get the comma-and-space at the end
terms.push('');
this.value = terms.join(', ');
return false;
},
});
*/
//---------------------------------------------------------------------------
// Close the message box when the user clicks the close icon
//---------------------------------------------------------------------------
$('a.closeMessage').on('click', () => {
$(this).parents('div.messages').slideUp(300, () => { $(this).remove(); });
return false;
});
$('#search-form').hide();
$('#bagit-form').hide();
$('#filters').hide();
$('#download-form').hide();
//---------------------------------------------------------------------------
// Toggle the 'Search' popup in the sidebar
//---------------------------------------------------------------------------
function toggleSearch() {
$('#search-form').toggle();
$('#search').toggleClass('current');
$('#search').toggleClass('active-current');
$('#search-arrow').toggleClass('arrow-down');
if ($('#search').hasClass('current')) {
$('#content').addClass('opacity03');
} else {
$('#content').removeClass('opacity03');
}
}
//---------------------------------------------------------------------------
// Toggle the 'Filter' popup on entries list
//---------------------------------------------------------------------------
function toggleFilter() {
$('#filters').toggle();
}
//---------------------------------------------------------------------------
// Toggle the 'Download' popup on entries list
//---------------------------------------------------------------------------
function toggleDownload() {
$('#download-form').toggle();
}
//---------------------------------------------------------------------------
// Toggle the 'Save a Link' popup in the sidebar
//---------------------------------------------------------------------------
function toggleBagit() {
$('#bagit-form').toggle();
$('#bagit').toggleClass('current');
$('#bagit').toggleClass('active-current');
$('#bagit-arrow').toggleClass('arrow-down');
if ($('#bagit').hasClass('current')) {
$('#content').addClass('opacity03');
} else {
$('#content').removeClass('opacity03');
}
}
//---------------------------------------------------------------------------
// Close all #links popups in the sidebar
//---------------------------------------------------------------------------
function closePopups() {
$('#links .messages').hide();
$('#links > li > a').removeClass('active-current');
$('#links > li > a').removeClass('current');
$('[id$=-arrow]').removeClass('arrow-down');
$('#content').removeClass('opacity03');
}
$('#search').click(() => {
closePopups();
toggleSearch();
$('#searchfield').focus();
});
$('.filter-btn').click(() => {
closePopups();
toggleFilter();
});
$('.download-btn').click(() => {
closePopups();
toggleDownload();
});
$('#bagit').click(() => {
closePopups();
toggleBagit();
$('#plainurl').focus();
});
$('#search-form-close').click(() => {
toggleSearch();
});
$('#filter-form-close').click(() => {
toggleFilter();
});
$('#download-form-close').click(() => {
toggleDownload();
});
$('#bagit-form-close').click(() => {
toggleBagit();
});
const bagitFormForm = $('#bagit-form-form');
/* ==========================================================================
bag it link and close button
========================================================================== */
// send 'bag it link' form request via ajax
bagitFormForm.submit((event) => {
$('body').css('cursor', 'wait');
$('#add-link-result').empty();
$.ajax({
type: bagitFormForm.attr('method'),
url: bagitFormForm.attr('action'),
data: bagitFormForm.serialize(),
success: function success() {
$('#add-link-result').html('Done!');
$('#plainurl').val('').blur('');
$('body').css('cursor', 'auto');
},
error: function error() {
$('#add-link-result').html('Failed!');
$('body').css('cursor', 'auto');
},
});
event.preventDefault();
});
/* ==========================================================================
Process all links inside an article
========================================================================== */
$('article a[href^="http"]').after(
() => `<a href="${$(this).attr('href')}" class="add-to-wallabag-link-after" title="add to wallabag"></a>`,
);
$('.add-to-wallabag-link-after').click((event) => {
toggleSaveLinkForm($(this).attr('href'), event);
event.preventDefault();
});
});

View File

@ -0,0 +1,8 @@
function split(val) {
return val.split(/,\s*/);
}
function extractLast(term) {
return split(term).pop();
}
export default { split, extractLast };

View File

@ -0,0 +1,26 @@
import Mousetrap from 'mousetrap';
import $ from 'jquery';
$(document).ready(() => {
if ($('#article').length > 0) {
/* Article view */
Mousetrap.bind('o', () => {
$('div#article_toolbar ul.links a.original')[0].click();
});
/* mark as favorite */
Mousetrap.bind('f', () => {
$('div#article_toolbar ul.links a.favorite')[0].click();
});
/* mark as read */
Mousetrap.bind('a', () => {
$('div#article_toolbar ul.links a.markasread')[0].click();
});
/* delete */
Mousetrap.bind('del', () => {
$('div#article_toolbar ul.links a.delete')[0].click();
});
}
});

View File

@ -0,0 +1,10 @@
import $ from 'jquery';
import Mousetrap from 'mousetrap';
$(document).ready(() => {
Mousetrap.bind('s', () => {
$('#search').trigger('click');
$('#search_entry_term').focus();
return false;
});
});

View File

@ -0,0 +1,35 @@
import $ from 'jquery';
function toggleSaveLinkForm(url, event) {
$('#add-link-result').empty();
const $bagit = $('#bagit');
const $bagitForm = $('#bagit-form');
$bagit.toggleClass('active-current');
// only if bag-it link is not presented on page
if ($bagit.length === 0) {
if (event !== 'undefined' && event) {
$bagitForm.css({ position: 'absolute', top: event.pageY, left: event.pageX - 200 });
} else {
$bagitForm.css({ position: 'relative', top: 'auto', left: 'auto' });
}
}
const searchForm = $('#search-form');
const plainUrl = $('#plainurl');
if (searchForm.length !== 0) {
$('#search').removeClass('current');
$('#search-arrow').removeClass('arrow-down');
searchForm.hide();
}
$bagitForm.toggle();
$('#content').toggleClass('opacity03');
if (url !== 'undefined' && url) {
plainUrl.val(url);
}
plainUrl.focus();
}
export default toggleSaveLinkForm;

View File

@ -211,10 +211,6 @@ a.original:not(.waves-effect) {
display: flex;
}
.card-tag-delete {
margin-left: 10px;
}
.card-tag-labels {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));

View File

@ -123,6 +123,10 @@ a.icon-image {
margin: 7px 1.5px 0 0;
}
&.carrot::before {
background: url("../../_global/img/icons/carrot-icon--black.png") no-repeat center/90%;
}
&.diaspora::before {
background: url("../../_global/img/icons/diaspora-icon--black.png") no-repeat center/80%;
}

View File

@ -222,10 +222,4 @@ $(document).ready(() => {
});
});
}
$('form[name="form_mass_action"] input[name="tags"]').on('keydown', (e) => {
if (e.key === 'Enter') {
e.preventDefault();
$('form[name="form_mass_action"] button[name="tag"]').trigger('click');
}
});
});

View File

@ -39,10 +39,8 @@ twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
form_themes:
- "@LexikFormFilter/Form/form_div_layout.html.twig"
exception_controller: Wallabag\CoreBundle\Controller\ExceptionController:showAction
globals:
registration_enabled: '%fosuser_registration%'
- "LexikFormFilterBundle:Form:form_div_layout.html.twig"
exception_controller: wallabag_core.exception_controller:showAction
# Doctrine Configuration
doctrine:
@ -169,8 +167,9 @@ nelmio_cors:
liip_theme:
load_controllers: false
themes:
- baggy
- material
autodetect_theme: Wallabag\CoreBundle\Helper\DetectActiveTheme
autodetect_theme: wallabag_core.helper.detect_active_theme
path_patterns:
bundle_resource:
@ -211,14 +210,14 @@ scheb_two_factor:
google:
enabled: "%twofactor_auth%"
issuer: "%server_name%"
template: "@WallabagUser/Authentication/form.html.twig"
template: WallabagUserBundle:Authentication:form.html.twig
email:
enabled: "%twofactor_auth%"
sender_email: "%twofactor_sender%"
digits: 6
template: "@WallabagUser/Authentication/form.html.twig"
mailer: Wallabag\UserBundle\Mailer\AuthCodeMailer
template: WallabagUserBundle:Authentication:form.html.twig
mailer: wallabag_user.auth_code_mailer
kphoen_rulerz:
targets:
@ -405,7 +404,7 @@ sensio_framework_extra:
httplug:
clients:
wallabag_core:
factory: Wallabag\CoreBundle\Helper\HttpClientFactory
factory: 'wallabag_core.http_client_factory'
config:
defaults:
timeout: 10

View File

@ -33,7 +33,7 @@ rest :
homepage:
path: "/{page}"
defaults:
_controller: 'Wallabag\CoreBundle\Controller\EntryController::showUnreadAction'
_controller: WallabagCoreBundle:Entry:showUnread
page : 1
requirements:
page: \d+
@ -41,13 +41,25 @@ homepage:
fos_user:
resource: "@FOSUserBundle/Resources/config/routing/all.xml"
fos_user_security_login:
path: /login
defaults:
_controller: Wallabag\UserBundle\Controller\SecurityController::loginAction
methods: [GET, POST]
fos_user_registration_register:
path: /register
defaults:
_controller: Wallabag\UserBundle\Controller\RegistrationController::registerAction
methods: [GET, POST]
fos_oauth_server_token:
resource: "@FOSOAuthServerBundle/Resources/config/routing/token.xml"
craue_config_settings_modify:
path: /settings
defaults:
_controller: 'Craue\ConfigBundle\Controller\SettingsController::modifyAction'
_controller: CraueConfigBundle:Settings:modify
fos_js_routing:
resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml"
@ -64,34 +76,34 @@ fos_js_routing:
rss_to_atom_unread:
path: /{username}/{token}/unread.xml
defaults:
_controller: 'Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction'
_controller: FrameworkBundle:Redirect:redirect
route: unread_feed
permanent: true
rss_to_atom_archive:
path: /{username}/{token}/archive.xml
defaults:
_controller: 'Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction'
_controller: FrameworkBundle:Redirect:redirect
route: archive_feed
permanent: true
rss_to_atom_starred:
path: /{username}/{token}/starred.xml
defaults:
_controller: 'Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction'
_controller: FrameworkBundle:Redirect:redirect
route: starred_feed
permanent: true
rss_to_atom_all:
path: /{username}/{token}/all.xml
defaults:
_controller: 'Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction'
_controller: FrameworkBundle:Redirect:redirect
route: all_feed
permanent: true
rss_to_atom_tags:
path: /{username}/{token}/tags/{slug}.xml
defaults:
_controller: 'Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction'
_controller: FrameworkBundle:Redirect:redirect
route: tag_feed
permanent: true

View File

@ -9,7 +9,7 @@ security:
providers:
administrators:
entity:
class: 'Wallabag\UserBundle\Entity\User'
class: WallabagUserBundle:User
property: username
fos_userbundle:
id: fos_user.user_provider.username_email

View File

@ -1,113 +1,40 @@
imports:
- { resource: services_rabbit.yml }
- { resource: services_redis.yml }
- { resource: parameters_addons.yml }
parameters:
lexik_form_filter.get_filter.doctrine_orm.class: Wallabag\CoreBundle\Event\Subscriber\CustomDoctrineORMSubscriber
services:
_defaults:
autowire: true
autoconfigure: true
public: true
bind:
$rootDir: '%kernel.root_dir%'
$debug: '%kernel.debug%'
$defaultLocale: '%kernel.default_locale%'
$wallabagUrl: '%domain_name%'
$tablePrefix: "%database_table_prefix%"
$defaultTheme: '%wallabag_core.theme%'
$encryptionKeyPath: "%wallabag_core.site_credentials.encryption_key_path%"
$fetchingErrorMessageTitle: "%wallabag_core.fetching_error_message_title%"
$fetchingErrorMessage: '%wallabag_core.fetching_error_message%'
$languages: '%wallabag_core.languages%'
$lifeTime: '%wallabag_core.cache_lifetime%'
$cookieFile: "%kernel.cache_dir%/cookiejar.json"
$logoPath: 'web/img/appicon/apple-touch-icon-152.png'
$registrationEnabled: '%fosuser_registration%'
$restrictedAccess: '@=service(''craue_config'').get(''restricted_access'')'
$senderEmail: "%scheb_two_factor.email.sender_email%"
$senderName: "%scheb_two_factor.email.sender_name%"
$storeArticleHeaders: '@=service(''craue_config'').get(''store_article_headers'')'
$supportUrl: '@=service(''craue_config'').get(''wallabag_support_url'')'
$themes: '%liip_theme.themes%'
Wallabag\AnnotationBundle\:
resource: '../../src/Wallabag/AnnotationBundle/*'
exclude: '../../src/Wallabag/AnnotationBundle/{Controller,Entity}'
Wallabag\ApiBundle\:
resource: '../../src/Wallabag/ApiBundle/*'
exclude: '../../src/Wallabag/ApiBundle/{Controller,Entity}'
Wallabag\CoreBundle\:
resource: '../../src/Wallabag/CoreBundle/*'
exclude: '../../src/Wallabag/CoreBundle/{Controller,Entity}'
Wallabag\ImportBundle\:
resource: '../../src/Wallabag/ImportBundle/*'
exclude: '../../src/Wallabag/ImportBundle/{Consumer,Controller,Redis}'
Wallabag\UserBundle\:
resource: '../../src/Wallabag/UserBundle/*'
exclude: '../../src/Wallabag/UserBundle/{Controller,Entity}'
Doctrine\DBAL\Connection:
alias: doctrine.dbal.default_connection
Doctrine\ORM\EntityManagerInterface:
alias: doctrine.orm.entity_manager
Doctrine\Persistence\ManagerRegistry:
alias: doctrine
Craue\ConfigBundle\Util\Config:
alias: craue_config
JMS\Serializer\SerializerInterface:
alias: jms_serializer
Lexik\Bundle\FormFilterBundle\Filter\FilterBuilderUpdaterInterface:
alias: lexik_form_filter.query_builder_updater
Liip\ThemeBundle\ActiveTheme:
alias: liip_theme.active_theme
Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Google\GoogleAuthenticatorInterface:
alias: scheb_two_factor.security.google_authenticator
Symfony\Component\HttpFoundation\Session\SessionInterface:
alias: session
Symfony\Component\EventDispatcher\EventDispatcherInterface:
alias: event_dispatcher
Symfony\Component\Form\FormFactoryInterface:
alias: form.factory
Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface:
alias: security.token_storage
Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface:
alias: security.authorization_checker
Symfony\Component\Translation\TranslatorInterface:
alias: translator
Symfony\Component\Validator\Validator\ValidatorInterface:
alias: validator
FOS\UserBundle\Model\UserManagerInterface:
alias: fos_user.user_manager
Twig_Extensions_Extension_Text:
twig.extension.text:
class: Twig_Extensions_Extension_Text
tags:
- { name: twig.extension }
MatomoTwigExtension\MatomoTwigExtension:
wallabag.twig_extension:
class: Wallabag\CoreBundle\Twig\WallabagExtension
public: false
arguments:
- "@wallabag_core.entry_repository"
- "@wallabag_core.tag_repository"
- "@security.token_storage"
- "%wallabag_core.cache_lifetime%"
- "@translator"
- "%kernel.root_dir%"
tags:
- { name: twig.extension }
Wallabag\CoreBundle\Event\Listener\UserLocaleListener:
wallabag.twig_matomo_extension:
class: MatomoTwigExtension\MatomoTwigExtension
public: false
tags:
- { name: twig.extension }
wallabag.locale_listener:
class: Wallabag\CoreBundle\Event\Listener\LocaleListener
arguments: ["%kernel.default_locale%"]
tags:
- { name: kernel.event_subscriber }
wallabag.user_locale_listener:
class: Wallabag\CoreBundle\Event\Listener\UserLocaleListener
arguments: ["@session"]
tags:
- { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin }
@ -115,148 +42,6 @@ services:
class: Symfony\Component\Cache\Adapter\FilesystemAdapter
public: false
arguments:
$namespace: 'craue_config'
$defaultLifetime: 0
$directory: '%kernel.cache_dir%'
Wallabag\CoreBundle\ParamConverter\UsernameFeedTokenConverter:
tags:
- { name: request.param_converter, converter: username_feed_token_converter }
Wallabag\CoreBundle\Event\Subscriber\TablePrefixSubscriber:
tags:
- { name: doctrine.event_subscriber }
Graby\Graby:
arguments:
$config:
error_message: '%wallabag_core.fetching_error_message%'
error_message_title: '%wallabag_core.fetching_error_message_title%'
calls:
- [ setLogger, [ "@logger" ] ]
tags:
- { name: monolog.logger, channel: graby }
Graby\SiteConfig\ConfigBuilder:
arguments:
$config: {}
wallabag_core.http_client:
alias: 'httplug.client.wallabag_core'
Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder:
tags:
- { name: monolog.logger, channel: graby }
# service alias override
bd_guzzle_site_authenticator.site_config_builder:
alias: Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder
Wallabag\CoreBundle\Helper\HttpClientFactory:
calls:
- ["addSubscriber", ["@bd_guzzle_site_authenticator.authenticator_subscriber"]]
Wallabag\CoreBundle\Operator\PHP\Matches:
tags:
- { name: rulerz.operator, target: native, operator: matches }
Wallabag\CoreBundle\Operator\Doctrine\Matches:
tags:
- { name: rulerz.operator, target: doctrine, operator: matches, inline: true }
Wallabag\CoreBundle\Operator\PHP\NotMatches:
tags:
- { name: rulerz.operator, target: native, operator: notmatches }
Wallabag\CoreBundle\Operator\Doctrine\NotMatches:
tags:
- { name: rulerz.operator, target: doctrine, operator: notmatches, inline: true }
Wallabag\CoreBundle\Operator\PHP\PatternMatches:
tags:
- { name: rulerz.operator, target: native, operator: "~" }
Predis\Client:
arguments:
$parameters:
scheme: '%redis_scheme%'
host: '%redis_host%'
port: '%redis_port%'
path: '%redis_path%'
password: '%redis_password%'
Wallabag\CoreBundle\Controller\ExceptionController: ~
Wallabag\CoreBundle\Event\Subscriber\SQLiteCascadeDeleteSubscriber:
tags:
- { name: doctrine.event_subscriber }
Wallabag\CoreBundle\Event\Subscriber\DownloadImagesSubscriber:
arguments:
$enabled: '@=service(''craue_config'').get(''download_images_enabled'')'
Wallabag\CoreBundle\Helper\DownloadImages:
arguments:
$baseFolder: "%kernel.project_dir%/web/assets/images"
wallabag_core.entry.download_images.client:
alias: 'httplug.client.wallabag_core.entry.download_images'
Wallabag\UserBundle\EventListener\CreateConfigListener:
arguments:
$theme: "%wallabag_core.theme%"
$itemsOnPage: "%wallabag_core.items_on_page%"
$feedLimit: "%wallabag_core.feed_limit%"
$language: "%wallabag_core.language%"
$readingSpeed: "%wallabag_core.reading_speed%"
$actionMarkAsRead: "%wallabag_core.action_mark_as_read%"
$listMode: "%wallabag_core.list_mode%"
Wallabag\UserBundle\EventListener\AuthenticationFailureListener:
tags:
- { name: kernel.event_listener, event: security.authentication.failure, method: onAuthenticationFailure }
wallabag_import.pocket.client:
alias: 'httplug.client.wallabag_import.pocket.client'
Wallabag\ImportBundle\Import\PocketImport:
calls:
- [ setClient, [ "@wallabag_import.pocket.client" ] ]
tags:
- { name: wallabag_import.import, alias: pocket }
Wallabag\ImportBundle\Import\WallabagV1Import:
tags:
- { name: wallabag_import.import, alias: wallabag_v1 }
Wallabag\ImportBundle\Import\WallabagV2Import:
tags:
- { name: wallabag_import.import, alias: wallabag_v2 }
Wallabag\ImportBundle\Import\ElcuratorImport:
tags:
- { name: wallabag_import.import, alias: elcurator }
Wallabag\ImportBundle\Import\ReadabilityImport:
tags:
- { name: wallabag_import.import, alias: readability }
Wallabag\ImportBundle\Import\InstapaperImport:
tags:
- { name: wallabag_import.import, alias: instapaper }
Wallabag\ImportBundle\Import\PinboardImport:
tags:
- { name: wallabag_import.import, alias: pinboard }
Wallabag\ImportBundle\Import\DeliciousImport:
tags:
- { name: wallabag_import.import, alias: delicious }
Wallabag\ImportBundle\Import\FirefoxImport:
tags:
- { name: wallabag_import.import, alias: firefox }
Wallabag\ImportBundle\Import\ChromeImport:
tags:
- { name: wallabag_import.import, alias: chrome }
- 'craue_config'
- 0
- '%kernel.cache_dir%'

View File

@ -1,56 +0,0 @@
# RabbitMQ stuff
services:
_defaults:
autowire: true
autoconfigure: true
public: true
wallabag_import.consumer.amqp.pocket:
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
arguments:
$import: '@Wallabag\ImportBundle\Import\PocketImport'
wallabag_import.consumer.amqp.readability:
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
arguments:
$import: '@Wallabag\ImportBundle\Import\ReadabilityImport'
wallabag_import.consumer.amqp.instapaper:
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
arguments:
$import: '@Wallabag\ImportBundle\Import\InstapaperImport'
wallabag_import.consumer.amqp.pinboard:
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
arguments:
$import: '@Wallabag\ImportBundle\Import\PinboardImport'
wallabag_import.consumer.amqp.delicious:
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
arguments:
$import: '@Wallabag\ImportBundle\Import\DeliciousImport'
wallabag_import.consumer.amqp.wallabag_v1:
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
arguments:
$import: '@Wallabag\ImportBundle\Import\WallabagV1Import'
wallabag_import.consumer.amqp.wallabag_v2:
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
arguments:
$import: '@Wallabag\ImportBundle\Import\WallabagV2Import'
wallabag_import.consumer.amqp.elcurator:
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
arguments:
$import: '@Wallabag\ImportBundle\Import\ElcuratorImport'
wallabag_import.consumer.amqp.firefox:
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
arguments:
$import: '@Wallabag\ImportBundle\Import\FirefoxImport'
wallabag_import.consumer.amqp.chrome:
class: Wallabag\ImportBundle\Consumer\AMQPEntryConsumer
arguments:
$import: '@Wallabag\ImportBundle\Import\ChromeImport'

View File

@ -9,11 +9,11 @@ services:
public: true
wallabag_core.entry_repository.test:
alias: Wallabag\CoreBundle\Repository\EntryRepository
alias: wallabag_core.entry_repository
public: true
wallabag_user.user_repository.test:
alias: Wallabag\UserBundle\Repository\UserRepository
alias: wallabag_user.user_repository
public: true
filesystem_cache:

View File

@ -1,5 +1,5 @@
wallabag_core:
version: 2.5.2
version: 2.5.4
paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb"
languages:
en: 'English'
@ -41,6 +41,10 @@ wallabag_core:
name: share_public
value: 1
section: entry
-
name: carrot
value: 1
section: entry
-
name: share_diaspora
value: 1
@ -61,10 +65,18 @@ wallabag_core:
name: share_shaarli
value: 1
section: entry
-
name: share_scuttle
value: 1
section: entry
-
name: shaarli_url
value: https://myshaarli.com
section: entry
-
name: scuttle_url
value: https://scuttle.org
section: entry
-
name: share_mail
value: 1
@ -166,6 +178,9 @@ wallabag_core:
-
rule: _all ~ "https?://www\.lemonde\.fr/tiny.*"
wallabag_user:
registration_enabled: "%fosuser_registration%"
wallabag_import:
allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain', 'text/csv']
resource_dir: "%kernel.project_dir%/web/uploads/import"

View File

@ -7,6 +7,7 @@ const rootDir = path.resolve(__dirname, '../../../');
module.exports = {
entry: {
material: path.join(rootDir, './app/Resources/static/themes/material/index.js'),
baggy: path.join(rootDir, './app/Resources/static/themes/baggy/index.js'),
public: path.join(rootDir, './app/Resources/static/themes/_global/share.js'),
},
output: {

146
bin/symfony_requirements Executable file
View File

@ -0,0 +1,146 @@
#!/usr/bin/env php
<?php
require_once dirname(__FILE__).'/../var/SymfonyRequirements.php';
$lineSize = 70;
$symfonyRequirements = new SymfonyRequirements();
$iniPath = $symfonyRequirements->getPhpIniConfigPath();
echo_title('Symfony Requirements Checker');
echo '> PHP is using the following php.ini file:'.PHP_EOL;
if ($iniPath) {
echo_style('green', ' '.$iniPath);
} else {
echo_style('yellow', ' WARNING: No configuration file (php.ini) used by PHP!');
}
echo PHP_EOL.PHP_EOL;
echo '> Checking Symfony requirements:'.PHP_EOL.' ';
$messages = array();
foreach ($symfonyRequirements->getRequirements() as $req) {
if ($helpText = get_error_message($req, $lineSize)) {
echo_style('red', 'E');
$messages['error'][] = $helpText;
} else {
echo_style('green', '.');
}
}
$checkPassed = empty($messages['error']);
foreach ($symfonyRequirements->getRecommendations() as $req) {
if ($helpText = get_error_message($req, $lineSize)) {
echo_style('yellow', 'W');
$messages['warning'][] = $helpText;
} else {
echo_style('green', '.');
}
}
if ($checkPassed) {
echo_block('success', 'OK', 'Your system is ready to run Symfony projects');
} else {
echo_block('error', 'ERROR', 'Your system is not ready to run Symfony projects');
echo_title('Fix the following mandatory requirements', 'red');
foreach ($messages['error'] as $helpText) {
echo ' * '.$helpText.PHP_EOL;
}
}
if (!empty($messages['warning'])) {
echo_title('Optional recommendations to improve your setup', 'yellow');
foreach ($messages['warning'] as $helpText) {
echo ' * '.$helpText.PHP_EOL;
}
}
echo PHP_EOL;
echo_style('title', 'Note');
echo ' The command console could use a different php.ini file'.PHP_EOL;
echo_style('title', '~~~~');
echo ' than the one used with your web server. To be on the'.PHP_EOL;
echo ' safe side, please check the requirements from your web'.PHP_EOL;
echo ' server using the ';
echo_style('yellow', 'web/config.php');
echo ' script.'.PHP_EOL;
echo PHP_EOL;
exit($checkPassed ? 0 : 1);
function get_error_message(Requirement $requirement, $lineSize)
{
if ($requirement->isFulfilled()) {
return;
}
$errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL;
$errorMessage .= ' > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.' > ').PHP_EOL;
return $errorMessage;
}
function echo_title($title, $style = null)
{
$style = $style ?: 'title';
echo PHP_EOL;
echo_style($style, $title.PHP_EOL);
echo_style($style, str_repeat('~', strlen($title)).PHP_EOL);
echo PHP_EOL;
}
function echo_style($style, $message)
{
// ANSI color codes
$styles = array(
'reset' => "\033[0m",
'red' => "\033[31m",
'green' => "\033[32m",
'yellow' => "\033[33m",
'error' => "\033[37;41m",
'success' => "\033[37;42m",
'title' => "\033[34m",
);
$supports = has_color_support();
echo($supports ? $styles[$style] : '').$message.($supports ? $styles['reset'] : '');
}
function echo_block($style, $title, $message)
{
$message = ' '.trim($message).' ';
$width = strlen($message);
echo PHP_EOL.PHP_EOL;
echo_style($style, str_repeat(' ', $width));
echo PHP_EOL;
echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT));
echo PHP_EOL;
echo_style($style, $message);
echo PHP_EOL;
echo_style($style, str_repeat(' ', $width));
echo PHP_EOL;
}
function has_color_support()
{
static $support;
if (null === $support) {
if (DIRECTORY_SEPARATOR == '\\') {
$support = false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI');
} else {
$support = function_exists('posix_isatty') && @posix_isatty(STDOUT);
}
}
return $support;
}

View File

@ -37,7 +37,6 @@
"ext-ctype": "*",
"ext-curl": "*",
"ext-dom": "*",
"ext-filter": "*",
"ext-gd": "*",
"ext-hash": "*",
"ext-iconv": "*",
@ -51,34 +50,26 @@
"ext-tidy": "*",
"ext-tokenizer": "*",
"ext-xml": "*",
"composer": "< 2.3",
"babdev/pagerfanta-bundle": "^2.5",
"bdunogier/guzzle-site-authenticator": "^1.0.0",
"craue/config-bundle": "^2.3.0",
"defuse/php-encryption": "^2.1",
"doctrine/collections": "^1.6",
"doctrine/common": "^2.13",
"doctrine/dbal": "^2.13",
"doctrine/doctrine-bundle": "^1.9",
"doctrine/doctrine-cache-bundle": "^1.3",
"doctrine/doctrine-migrations-bundle": "^1.3",
"doctrine/event-manager": "^1.1",
"doctrine/migrations": "^1.8",
"doctrine/orm": "^2.6",
"doctrine/persistence": "^1.3",
"enshrined/svg-sanitize": "^0.15.4",
"friendsofsymfony/jsrouting-bundle": "^2.2",
"friendsofsymfony/oauth-server-bundle": "^1.5",
"friendsofsymfony/rest-bundle": "~2.1",
"friendsofsymfony/user-bundle": "2.1.*",
"friendsofsymfony/user-bundle": "2.0.*",
"guzzlehttp/guzzle": "^5.3.1",
"guzzlehttp/psr7": "^1.8",
"html2text/html2text": "^4.1",
"incenteev/composer-parameter-handler": "^2.1",
"j0k3r/graby": "^2.0",
"javibravo/simpleue": "^2.0",
"jms/serializer": "^3.17",
"jms/serializer-bundle": "~3.6",
"kphoen/rulerz": "^0.21",
"kphoen/rulerz-bundle": "~0.13",
"laminas/laminas-code": "^3.4",
"laminas/laminas-diactoros": "^2.3",
@ -90,41 +81,31 @@
"nelmio/cors-bundle": "~1.5",
"ocramius/proxy-manager": "^2.1.1",
"pagerfanta/pagerfanta": "^2.4",
"php-amqplib/php-amqplib": "^2.12",
"php-amqplib/rabbitmq-bundle": "^1.14",
"php-http/client-common": "^2.4",
"php-http/discovery": "^1.14",
"php-http/guzzle5-adapter": "^2.0",
"php-http/httplug": "^2.3",
"php-http/httplug-bundle": "^1.14",
"php-http/message": "^1.13",
"php-http/message-factory": "^1.0",
"pragmarx/recovery": "^0.2.0",
"predis/predis": "^1.1.3",
"psr/http-message": "^1.0",
"psr/log": "^1.1",
"scheb/two-factor-bundle": "^4.11.0",
"sensio/distribution-bundle": "^5.0",
"sensio/framework-extra-bundle": "^5.2",
"sentry/sentry-symfony": "3.5.3",
"stof/doctrine-extensions-bundle": "^1.2",
"swiftmailer/swiftmailer": "^6.3",
"symfony/dom-crawler": "^3.4",
"symfony/monolog-bundle": "^3.1",
"symfony/swiftmailer-bundle": "^3.2",
"symfony/symfony": "3.4.*",
"tecnickcom/tcpdf": "^6.3.0",
"twig/extensions": "^1.5",
"twig/twig": "^2.15",
"wallabag/php-mobi": "~1.0",
"wallabag/phpepub": "^4.0.10",
"willdurand/hateoas": "^3.8",
"willdurand/hateoas-bundle": "~2.1"
},
"require-dev": {
"dama/doctrine-test-bundle": "^6.0",
"doctrine/doctrine-fixtures-bundle": "~3.0",
"friendsofphp/php-cs-fixer": "~2.13",
"friendsoftwig/twigcs": "^4.1",
"guzzlehttp/psr7": "^1.0",
"m6web/redis-mock": "^5.0",
"php-http/mock-client": "^1.0",
"phpstan/extension-installer": "^1.0",
@ -141,8 +122,10 @@
"scripts": {
"post-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"bin/console cache:clear --no-warmup",
"bin/console assets:install web --symlink --relative"
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-install-cmd": [
"@post-cmd"
@ -152,6 +135,12 @@
]
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
}

672
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -65,7 +65,7 @@ RUN npm install -g yarn
RUN curl -L -o /usr/local/bin/envsubst https://github.com/a8m/envsubst/releases/download/v1.1.0/envsubst-`uname -s`-`uname -m`; \
chmod +x /usr/local/bin/envsubst
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
COPY --from=composer:2.2.12 /usr/bin/composer /usr/local/bin/composer
COPY entrypoint.sh /entrypoint.sh
COPY config/ /opt/wallabag/config/

View File

@ -36,34 +36,34 @@
"url": "https://github.com/wallabag/wallabag/issues"
},
"devDependencies": {
"@babel/core": "^7.19.6",
"@babel/core": "^7.20.12",
"@babel/eslint-parser": "^7.19.1",
"@babel/preset-env": "^7.19.4",
"@babel/preset-env": "^7.20.2",
"autoprefixer": "^10.4.13",
"babel-loader": "^9.0.0",
"css-loader": "^6.7.1",
"eslint": "^8.26.0",
"babel-loader": "^9.1.2",
"css-loader": "^6.7.3",
"eslint": "^8.32.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-import": "^2.27.4",
"eslint-webpack-plugin": "^3.2.0",
"file-loader": "^6.2.0",
"lato-font": "^3.0.0",
"mini-css-extract-plugin": "^2.6.1",
"node-sass": "^7.0.3",
"postcss": "^8.4.18",
"postcss-loader": "^7.0.1",
"postcss-scss": "^4.0.5",
"sass": "^1.55.0",
"sass-loader": "^13.1.0",
"mini-css-extract-plugin": "^2.7.2",
"node-sass": "^8.0.0",
"postcss": "^8.4.21",
"postcss-loader": "^7.0.2",
"postcss-scss": "^4.0.6",
"sass": "^1.57.1",
"sass-loader": "^13.2.0",
"style-loader": "^3.3.1",
"stylelint": "^14.14.0",
"stylelint": "^14.16.1",
"stylelint-config-standard": "^29.0.0",
"stylelint-scss": "^4.3.0",
"stylelint-webpack-plugin": "^3.3.0",
"terser-webpack-plugin": "^5.3.6",
"url-loader": "^4.1.1",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.11.1",
"webpack-manifest-plugin": "^5.0.0",
"webpack-merge": "^5.7.3"
@ -72,9 +72,9 @@
"annotator": "wallabag/annotator#master",
"clipboard": "^2.0.11",
"hammerjs": "^2.0.8",
"highlight.js": "^11.6.0",
"highlight.js": "^11.7.0",
"icomoon-free-npm": "^0.0.0",
"jquery": "^3.6.1",
"jquery": "^3.6.3",
"jquery.cookie": "^1.4.1",
"jr-qrcode": "^1.0.7",
"material-design-icons-iconfont": "^6.7.0",

View File

@ -9,7 +9,7 @@ ENV=$4
rm -rf "${TMP_FOLDER:?}"/"$RELEASE_FOLDER"
mkdir "$TMP_FOLDER"/"$RELEASE_FOLDER"
git clone https://github.com/wallabag/wallabag.git "$TMP_FOLDER"/"$RELEASE_FOLDER"/"$VERSION"
git clone https://github.com/wallabag/wallabag.git --single-branch --depth 1 --branch $1 "$TMP_FOLDER"/"$RELEASE_FOLDER"/"$VERSION"
cd "$TMP_FOLDER"/"$RELEASE_FOLDER"/"$VERSION" && SYMFONY_ENV="$ENV" COMPOSER_MEMORY_LIMIT=-1 composer install -n --no-dev
cd "$TMP_FOLDER"/"$RELEASE_FOLDER"/"$VERSION" && php bin/console wallabag:install --env="$ENV" -n
cd "$TMP_FOLDER"/"$RELEASE_FOLDER"/"$VERSION" && php bin/console assets:install --env="$ENV" --symlink --relative

View File

@ -2,18 +2,16 @@
namespace Wallabag\AnnotationBundle\Controller;
use FOS\RestBundle\Controller\AbstractFOSRestController;
use JMS\Serializer\SerializerInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Component\Form\FormFactoryInterface;
use FOS\RestBundle\Controller\FOSRestController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Wallabag\AnnotationBundle\Entity\Annotation;
use Wallabag\AnnotationBundle\Form\EditAnnotationType;
use Wallabag\AnnotationBundle\Form\NewAnnotationType;
use Wallabag\CoreBundle\Entity\Entry;
class WallabagAnnotationController extends AbstractFOSRestController
class WallabagAnnotationController extends FOSRestController
{
/**
* Retrieve annotations for an entry.
@ -26,12 +24,12 @@ class WallabagAnnotationController extends AbstractFOSRestController
{
$annotationRows = $this
->getDoctrine()
->getRepository(Annotation::class)
->findAnnotationsByPageId($entry->getId(), $this->getUser()->getId());
->getRepository('WallabagAnnotationBundle:Annotation')
->findByEntryIdAndUserId($entry->getId(), $this->getUser()->getId());
$total = \count($annotationRows);
$annotations = ['total' => $total, 'rows' => $annotationRows];
$json = $this->get(SerializerInterface::class)->serialize($annotations, 'json');
$json = $this->get('jms_serializer')->serialize($annotations, 'json');
return (new JsonResponse())->setJson($json);
}
@ -51,7 +49,7 @@ class WallabagAnnotationController extends AbstractFOSRestController
$annotation = new Annotation($this->getUser());
$annotation->setEntry($entry);
$form = $this->get(FormFactoryInterface::class)->createNamed('', NewAnnotationType::class, $annotation, [
$form = $this->get('form.factory')->createNamed('', NewAnnotationType::class, $annotation, [
'csrf_protection' => false,
'allow_extra_fields' => true,
]);
@ -61,7 +59,7 @@ class WallabagAnnotationController extends AbstractFOSRestController
$em->persist($annotation);
$em->flush();
$json = $this->get(SerializerInterface::class)->serialize($annotation, 'json');
$json = $this->get('jms_serializer')->serialize($annotation, 'json');
return JsonResponse::fromJsonString($json);
}
@ -74,31 +72,35 @@ class WallabagAnnotationController extends AbstractFOSRestController
*
* @see Wallabag\ApiBundle\Controller\WallabagRestController
*
* @ParamConverter("annotation", class="Wallabag\AnnotationBundle\Entity\Annotation")
*
* @return JsonResponse
*/
public function putAnnotationAction(Annotation $annotation, Request $request)
public function putAnnotationAction(Request $request, int $annotation)
{
$data = json_decode($request->getContent(), true);
try {
$annotation = $this->validateAnnotation($annotation, $this->getUser()->getId());
$form = $this->get(FormFactoryInterface::class)->createNamed('', EditAnnotationType::class, $annotation, [
'csrf_protection' => false,
'allow_extra_fields' => true,
]);
$form->submit($data);
$data = json_decode($request->getContent(), true, 512, \JSON_THROW_ON_ERROR);
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->persist($annotation);
$em->flush();
$form = $this->get('form.factory')->createNamed('', EditAnnotationType::class, $annotation, [
'csrf_protection' => false,
'allow_extra_fields' => true,
]);
$form->submit($data);
$json = $this->get(SerializerInterface::class)->serialize($annotation, 'json');
if ($form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->persist($annotation);
$em->flush();
return JsonResponse::fromJsonString($json);
$json = $this->get('jms_serializer')->serialize($annotation, 'json');
return JsonResponse::fromJsonString($json);
}
return $form;
} catch (\InvalidArgumentException $e) {
throw new NotFoundHttpException($e);
}
return $form;
}
/**
@ -106,18 +108,35 @@ class WallabagAnnotationController extends AbstractFOSRestController
*
* @see Wallabag\ApiBundle\Controller\WallabagRestController
*
* @ParamConverter("annotation", class="Wallabag\AnnotationBundle\Entity\Annotation")
*
* @return JsonResponse
*/
public function deleteAnnotationAction(Annotation $annotation)
public function deleteAnnotationAction(int $annotation)
{
try {
$annotation = $this->validateAnnotation($annotation, $this->getUser()->getId());
$em = $this->getDoctrine()->getManager();
$em->remove($annotation);
$em->flush();
$json = $this->get('jms_serializer')->serialize($annotation, 'json');
return (new JsonResponse())->setJson($json);
} catch (\InvalidArgumentException $e) {
throw new NotFoundHttpException($e);
}
}
private function validateAnnotation(int $annotationId, int $userId)
{
$em = $this->getDoctrine()->getManager();
$em->remove($annotation);
$em->flush();
$json = $this->get(SerializerInterface::class)->serialize($annotation, 'json');
$annotation = $em->getRepository('WallabagAnnotationBundle:Annotation')->findOneByIdAndUserId($annotationId, $userId);
return (new JsonResponse())->setJson($json);
if (null === $annotation) {
throw new NotFoundHttpException();
}
return $annotation;
}
}

View File

@ -34,6 +34,15 @@ class AnnotationFixtures extends Fixture implements DependentFixtureInterface
$this->addReference('annotation2', $annotation2);
$annotation3 = new Annotation($this->getReference('bob-user'));
$annotation3->setEntry($this->getReference('entry3'));
$annotation3->setText('This is my first annotation !');
$annotation3->setQuote('content');
$manager->persist($annotation3);
$this->addReference('annotation3', $annotation3);
$manager->flush();
}

View File

@ -2,21 +2,15 @@
namespace Wallabag\AnnotationBundle\Repository;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\QueryBuilder;
use Doctrine\Persistence\ManagerRegistry;
use Wallabag\AnnotationBundle\Entity\Annotation;
/**
* AnnotationRepository.
*/
class AnnotationRepository extends ServiceEntityRepository
class AnnotationRepository extends EntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Annotation::class);
}
/**
* Retrieves all annotations for a user.
*
@ -47,6 +41,24 @@ class AnnotationRepository extends ServiceEntityRepository
;
}
/**
* Find annotation by id and user.
*
* @param int $annotationId
* @param int $userId
*
* @return Annotation
*/
public function findOneByIdAndUserId($annotationId, $userId)
{
return $this->createQueryBuilder('a')
->where('a.id = :annotationId')->setParameter('annotationId', $annotationId)
->andWhere('a.user = :userId')->setParameter('userId', $userId)
->setMaxResults(1)
->getQuery()
->getOneOrNullResult();
}
/**
* Find annotations for entry id.
*
@ -55,7 +67,7 @@ class AnnotationRepository extends ServiceEntityRepository
*
* @return array
*/
public function findAnnotationsByPageId($entryId, $userId)
public function findByEntryIdAndUserId($entryId, $userId)
{
return $this->createQueryBuilder('a')
->where('a.entry = :entryId')->setParameter('entryId', $entryId)
@ -72,7 +84,7 @@ class AnnotationRepository extends ServiceEntityRepository
*
* @return array
*/
public function findLastAnnotationByPageId($entryId, $userId)
public function findLastAnnotationByUserId($entryId, $userId)
{
return $this->createQueryBuilder('a')
->where('a.entry = :entryId')->setParameter('entryId', $entryId)

View File

@ -1,4 +1,4 @@
annotations:
type: rest
resource: 'Wallabag\AnnotationBundle\Controller\WallabagAnnotationController'
name_prefix: annotations_
resource: "WallabagAnnotationBundle:WallabagAnnotation"
name_prefix: annotations_

View File

@ -3,7 +3,6 @@
namespace Wallabag\ApiBundle\Controller;
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Wallabag\AnnotationBundle\Entity\Annotation;
@ -26,7 +25,7 @@ class AnnotationRestController extends WallabagRestController
{
$this->validateAuthentication();
return $this->forward('Wallabag\AnnotationBundle\Controller\WallabagAnnotationController::getAnnotationsAction', [
return $this->forward('WallabagAnnotationBundle:WallabagAnnotation:getAnnotations', [
'entry' => $entry,
]);
}
@ -48,7 +47,7 @@ class AnnotationRestController extends WallabagRestController
{
$this->validateAuthentication();
return $this->forward('Wallabag\AnnotationBundle\Controller\WallabagAnnotationController::postAnnotationAction', [
return $this->forward('WallabagAnnotationBundle:WallabagAnnotation:postAnnotation', [
'request' => $request,
'entry' => $entry,
]);
@ -63,15 +62,13 @@ class AnnotationRestController extends WallabagRestController
* }
* )
*
* @ParamConverter("annotation", class="Wallabag\AnnotationBundle\Entity\Annotation")
*
* @return JsonResponse
*/
public function putAnnotationAction(Annotation $annotation, Request $request)
public function putAnnotationAction(int $annotation, Request $request)
{
$this->validateAuthentication();
return $this->forward('Wallabag\AnnotationBundle\Controller\WallabagAnnotationController::putAnnotationAction', [
return $this->forward('WallabagAnnotationBundle:WallabagAnnotation:putAnnotation', [
'annotation' => $annotation,
'request' => $request,
]);
@ -86,15 +83,13 @@ class AnnotationRestController extends WallabagRestController
* }
* )
*
* @ParamConverter("annotation", class="Wallabag\AnnotationBundle\Entity\Annotation")
*
* @return JsonResponse
*/
public function deleteAnnotationAction(Annotation $annotation)
public function deleteAnnotationAction(int $annotation)
{
$this->validateAuthentication();
return $this->forward('Wallabag\AnnotationBundle\Controller\WallabagAnnotationController::deleteAnnotationAction', [
return $this->forward('WallabagAnnotationBundle:WallabagAnnotation:deleteAnnotation', [
'annotation' => $annotation,
]);
}

View File

@ -3,7 +3,6 @@
namespace Wallabag\ApiBundle\Controller;
use JMS\Serializer\SerializationContext;
use JMS\Serializer\SerializerInterface;
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
use Symfony\Component\HttpFoundation\JsonResponse;
@ -20,7 +19,7 @@ class ConfigRestController extends WallabagRestController
{
$this->validateAuthentication();
$json = $this->get(SerializerInterface::class)->serialize(
$json = $this->get('jms_serializer')->serialize(
$this->getUser()->getConfig(),
'json',
SerializationContext::create()->setGroups(['config_api'])

View File

@ -3,12 +3,8 @@
namespace Wallabag\ApiBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Translation\TranslatorInterface;
use Wallabag\ApiBundle\Entity\Client;
use Wallabag\ApiBundle\Form\Type\ClientType;
@ -19,11 +15,11 @@ class DeveloperController extends Controller
*
* @Route("/developer", name="developer")
*
* @return Response
* @return \Symfony\Component\HttpFoundation\Response
*/
public function indexAction()
{
$clients = $this->getDoctrine()->getRepository(Client::class)->findByUser($this->getUser()->getId());
$clients = $this->getDoctrine()->getRepository('WallabagApiBundle:Client')->findByUser($this->getUser()->getId());
return $this->render('@WallabagCore/themes/common/Developer/index.html.twig', [
'clients' => $clients,
@ -35,7 +31,7 @@ class DeveloperController extends Controller
*
* @Route("/developer/client/create", name="developer_create_client")
*
* @return Response
* @return \Symfony\Component\HttpFoundation\Response
*/
public function createClientAction(Request $request)
{
@ -49,9 +45,9 @@ class DeveloperController extends Controller
$em->persist($client);
$em->flush();
$this->get(SessionInterface::class)->getFlashBag()->add(
$this->get('session')->getFlashBag()->add(
'notice',
$this->get(TranslatorInterface::class)->trans('flashes.developer.notice.client_created', ['%name%' => $client->getName()])
$this->get('translator')->trans('flashes.developer.notice.client_created', ['%name%' => $client->getName()])
);
return $this->render('@WallabagCore/themes/common/Developer/client_parameters.html.twig', [
@ -71,7 +67,7 @@ class DeveloperController extends Controller
*
* @Route("/developer/client/delete/{id}", requirements={"id" = "\d+"}, name="developer_delete_client")
*
* @return RedirectResponse
* @return \Symfony\Component\HttpFoundation\RedirectResponse
*/
public function deleteClientAction(Client $client)
{
@ -83,9 +79,9 @@ class DeveloperController extends Controller
$em->remove($client);
$em->flush();
$this->get(SessionInterface::class)->getFlashBag()->add(
$this->get('session')->getFlashBag()->add(
'notice',
$this->get(TranslatorInterface::class)->trans('flashes.developer.notice.client_deleted', ['%name%' => $client->getName()])
$this->get('translator')->trans('flashes.developer.notice.client_deleted', ['%name%' => $client->getName()])
);
return $this->redirect($this->generateUrl('developer'));
@ -96,7 +92,7 @@ class DeveloperController extends Controller
*
* @Route("/developer/howto/first-app", name="developer_howto_firstapp")
*
* @return Response
* @return \Symfony\Component\HttpFoundation\Response
*/
public function howtoFirstAppAction()
{

View File

@ -5,8 +5,6 @@ namespace Wallabag\ApiBundle\Controller;
use Hateoas\Configuration\Route;
use Hateoas\Representation\Factory\PagerfantaFactory;
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
use Pagerfanta\Pagerfanta;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@ -16,11 +14,7 @@ use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\Tag;
use Wallabag\CoreBundle\Event\EntryDeletedEvent;
use Wallabag\CoreBundle\Event\EntrySavedEvent;
use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Helper\EntriesExport;
use Wallabag\CoreBundle\Helper\TagsAssigner;
use Wallabag\CoreBundle\Helper\UrlHasher;
use Wallabag\CoreBundle\Repository\EntryRepository;
class EntryRestController extends WallabagRestController
{
@ -46,7 +40,7 @@ class EntryRestController extends WallabagRestController
public function getEntriesExistsAction(Request $request)
{
$this->validateAuthentication();
$repo = $this->getDoctrine()->getRepository(Entry::class);
$repo = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entry');
$returnId = (null === $request->query->get('return_id')) ? false : (bool) $request->query->get('return_id');
@ -142,8 +136,8 @@ class EntryRestController extends WallabagRestController
$domainName = (null === $request->query->get('domain_name')) ? '' : (string) $request->query->get('domain_name');
try {
/** @var Pagerfanta $pager */
$pager = $this->get(EntryRepository::class)->findEntries(
/** @var \Pagerfanta\Pagerfanta $pager */
$pager = $this->get('wallabag_core.entry_repository')->findEntries(
$this->getUser()->getId(),
$isArchived,
$isStarred,
@ -221,7 +215,7 @@ class EntryRestController extends WallabagRestController
$this->validateAuthentication();
$this->validateUserAccess($entry->getUser()->getId());
return $this->get(EntriesExport::class)
return $this->get('wallabag_core.helper.entries_export')
->setEntries($entry)
->updateTitle('entry')
->updateAuthor('entry')
@ -253,7 +247,7 @@ class EntryRestController extends WallabagRestController
// handle multiple urls
foreach ($urls as $key => $url) {
$entry = $this->get(EntryRepository::class)->findByUrlAndUserId(
$entry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId(
$url,
$this->getUser()->getId()
);
@ -262,7 +256,7 @@ class EntryRestController extends WallabagRestController
if (false !== $entry) {
// entry deleted, dispatch event about it!
$this->get(EventDispatcherInterface::class)->dispatch(EntryDeletedEvent::NAME, new EntryDeletedEvent($entry));
$this->get('event_dispatcher')->dispatch(EntryDeletedEvent::NAME, new EntryDeletedEvent($entry));
$em = $this->getDoctrine()->getManager();
$em->remove($entry);
@ -307,7 +301,7 @@ class EntryRestController extends WallabagRestController
// handle multiple urls
foreach ($urls as $key => $url) {
$entry = $this->get(EntryRepository::class)->findByUrlAndUserId(
$entry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId(
$url,
$this->getUser()->getId()
);
@ -317,7 +311,7 @@ class EntryRestController extends WallabagRestController
if (false === $entry) {
$entry = new Entry($this->getUser());
$this->get(ContentProxy::class)->updateEntry($entry, $url);
$this->get('wallabag_core.content_proxy')->updateEntry($entry, $url);
}
$em = $this->getDoctrine()->getManager();
@ -327,7 +321,7 @@ class EntryRestController extends WallabagRestController
$results[$key]['entry'] = $entry instanceof Entry ? $entry->getId() : false;
// entry saved, dispatch event about it!
$this->get(EventDispatcherInterface::class)->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry));
$this->get('event_dispatcher')->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry));
}
return $this->sendResponse($results);
@ -364,7 +358,7 @@ class EntryRestController extends WallabagRestController
$url = $request->request->get('url');
$entry = $this->get(EntryRepository::class)->findByUrlAndUserId(
$entry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId(
$url,
$this->getUser()->getId()
);
@ -377,7 +371,7 @@ class EntryRestController extends WallabagRestController
$data = $this->retrieveValueFromRequest($request);
try {
$this->get(ContentProxy::class)->updateEntry(
$this->get('wallabag_core.content_proxy')->updateEntry(
$entry,
$entry->getUrl(),
[
@ -407,7 +401,7 @@ class EntryRestController extends WallabagRestController
}
if (!empty($data['tags'])) {
$this->get(TagsAssigner::class)->assignTagsToEntry($entry, $data['tags']);
$this->get('wallabag_core.tags_assigner')->assignTagsToEntry($entry, $data['tags']);
}
if (!empty($data['origin_url'])) {
@ -423,11 +417,11 @@ class EntryRestController extends WallabagRestController
}
if (empty($entry->getDomainName())) {
$this->get(ContentProxy::class)->setEntryDomainName($entry);
$this->get('wallabag_core.content_proxy')->setEntryDomainName($entry);
}
if (empty($entry->getTitle())) {
$this->get(ContentProxy::class)->setDefaultEntryTitle($entry);
$this->get('wallabag_core.content_proxy')->setDefaultEntryTitle($entry);
}
$em = $this->getDoctrine()->getManager();
@ -435,7 +429,7 @@ class EntryRestController extends WallabagRestController
$em->flush();
// entry saved, dispatch event about it!
$this->get(EventDispatcherInterface::class)->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry));
$this->get('event_dispatcher')->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry));
return $this->sendResponse($entry);
}
@ -469,7 +463,7 @@ class EntryRestController extends WallabagRestController
$this->validateAuthentication();
$this->validateUserAccess($entry->getUser()->getId());
$contentProxy = $this->get(ContentProxy::class);
$contentProxy = $this->get('wallabag_core.content_proxy');
$data = $this->retrieveValueFromRequest($request);
@ -524,7 +518,7 @@ class EntryRestController extends WallabagRestController
if (!empty($data['tags'])) {
$entry->removeAllTags();
$this->get(TagsAssigner::class)->assignTagsToEntry($entry, $data['tags']);
$this->get('wallabag_core.tags_assigner')->assignTagsToEntry($entry, $data['tags']);
}
if (null !== $data['isPublic']) {
@ -540,11 +534,11 @@ class EntryRestController extends WallabagRestController
}
if (empty($entry->getDomainName())) {
$this->get(ContentProxy::class)->setEntryDomainName($entry);
$this->get('wallabag_core.content_proxy')->setEntryDomainName($entry);
}
if (empty($entry->getTitle())) {
$this->get(ContentProxy::class)->setDefaultEntryTitle($entry);
$this->get('wallabag_core.content_proxy')->setDefaultEntryTitle($entry);
}
$em = $this->getDoctrine()->getManager();
@ -552,7 +546,7 @@ class EntryRestController extends WallabagRestController
$em->flush();
// entry saved, dispatch event about it!
$this->get(EventDispatcherInterface::class)->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry));
$this->get('event_dispatcher')->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry));
return $this->sendResponse($entry);
}
@ -575,7 +569,7 @@ class EntryRestController extends WallabagRestController
$this->validateUserAccess($entry->getUser()->getId());
try {
$this->get(ContentProxy::class)->updateEntry($entry, $entry->getUrl());
$this->get('wallabag_core.content_proxy')->updateEntry($entry, $entry->getUrl());
} catch (\Exception $e) {
$this->get('logger')->error('Error while saving an entry', [
'exception' => $e,
@ -595,7 +589,7 @@ class EntryRestController extends WallabagRestController
$em->flush();
// entry saved, dispatch event about it!
$this->get(EventDispatcherInterface::class)->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry));
$this->get('event_dispatcher')->dispatch(EntrySavedEvent::NAME, new EntrySavedEvent($entry));
return $this->sendResponse($entry);
}
@ -633,7 +627,7 @@ class EntryRestController extends WallabagRestController
}
// entry deleted, dispatch event about it!
$this->get(EventDispatcherInterface::class)->dispatch(EntryDeletedEvent::NAME, new EntryDeletedEvent($entry));
$this->get('event_dispatcher')->dispatch(EntryDeletedEvent::NAME, new EntryDeletedEvent($entry));
$em = $this->getDoctrine()->getManager();
$em->remove($entry);
@ -682,7 +676,7 @@ class EntryRestController extends WallabagRestController
$tags = $request->request->get('tags', '');
if (!empty($tags)) {
$this->get(TagsAssigner::class)->assignTagsToEntry($entry, $tags);
$this->get('wallabag_core.tags_assigner')->assignTagsToEntry($entry, $tags);
}
$em = $this->getDoctrine()->getManager();
@ -742,7 +736,7 @@ class EntryRestController extends WallabagRestController
$results = [];
foreach ($list as $key => $element) {
$entry = $this->get(EntryRepository::class)->findByUrlAndUserId(
$entry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId(
$element->url,
$this->getUser()->getId()
);
@ -758,7 +752,7 @@ class EntryRestController extends WallabagRestController
$label = trim($label);
$tag = $this->getDoctrine()
->getRepository(Tag::class)
->getRepository('WallabagCoreBundle:Tag')
->findOneByLabel($label);
if (false !== $tag) {
@ -800,7 +794,7 @@ class EntryRestController extends WallabagRestController
// handle multiple urls
foreach ($list as $key => $element) {
$entry = $this->get(EntryRepository::class)->findByUrlAndUserId(
$entry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId(
$element->url,
$this->getUser()->getId()
);
@ -811,7 +805,7 @@ class EntryRestController extends WallabagRestController
$tags = $element->tags;
if (false !== $entry && !(empty($tags))) {
$this->get(TagsAssigner::class)->assignTagsToEntry($entry, $tags);
$this->get('wallabag_core.tags_assigner')->assignTagsToEntry($entry, $tags);
$em = $this->getDoctrine()->getManager();
$em->persist($entry);

View File

@ -9,7 +9,6 @@ use Pagerfanta\Doctrine\ORM\QueryAdapter as DoctrineORMAdapter;
use Pagerfanta\Pagerfanta;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Wallabag\CoreBundle\Repository\EntryRepository;
class SearchRestController extends WallabagRestController
{
@ -34,7 +33,7 @@ class SearchRestController extends WallabagRestController
$page = (int) $request->query->get('page', 1);
$perPage = (int) $request->query->get('perPage', 30);
$qb = $this->get(EntryRepository::class)
$qb = $this->get('wallabag_core.entry_repository')
->getBuilderForSearchByUser(
$this->getUser()->getId(),
$term,

View File

@ -2,7 +2,6 @@
namespace Wallabag\ApiBundle\Controller;
use JMS\Serializer\SerializerInterface;
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
@ -23,10 +22,10 @@ class TagRestController extends WallabagRestController
$this->validateAuthentication();
$tags = $this->getDoctrine()
->getRepository(Tag::class)
->getRepository('WallabagCoreBundle:Tag')
->findAllFlatTagsWithNbEntries($this->getUser()->getId());
$json = $this->get(SerializerInterface::class)->serialize($tags, 'json');
$json = $this->get('jms_serializer')->serialize($tags, 'json');
return (new JsonResponse())->setJson($json);
}
@ -47,7 +46,7 @@ class TagRestController extends WallabagRestController
$this->validateAuthentication();
$label = $request->get('tag', '');
$tags = $this->getDoctrine()->getRepository(Tag::class)->findByLabelsAndUser([$label], $this->getUser()->getId());
$tags = $this->getDoctrine()->getRepository('WallabagCoreBundle:Tag')->findByLabelsAndUser([$label], $this->getUser()->getId());
if (empty($tags)) {
throw $this->createNotFoundException('Tag not found');
@ -56,12 +55,12 @@ class TagRestController extends WallabagRestController
$tag = $tags[0];
$this->getDoctrine()
->getRepository(Entry::class)
->getRepository('WallabagCoreBundle:Entry')
->removeTag($this->getUser()->getId(), $tag);
$this->cleanOrphanTag($tag);
$json = $this->get(SerializerInterface::class)->serialize($tag, 'json');
$json = $this->get('jms_serializer')->serialize($tag, 'json');
return (new JsonResponse())->setJson($json);
}
@ -83,19 +82,19 @@ class TagRestController extends WallabagRestController
$tagsLabels = $request->get('tags', '');
$tags = $this->getDoctrine()->getRepository(Tag::class)->findByLabelsAndUser(explode(',', $tagsLabels), $this->getUser()->getId());
$tags = $this->getDoctrine()->getRepository('WallabagCoreBundle:Tag')->findByLabelsAndUser(explode(',', $tagsLabels), $this->getUser()->getId());
if (empty($tags)) {
throw $this->createNotFoundException('Tags not found');
}
$this->getDoctrine()
->getRepository(Entry::class)
->getRepository('WallabagCoreBundle:Entry')
->removeTags($this->getUser()->getId(), $tags);
$this->cleanOrphanTag($tags);
$json = $this->get(SerializerInterface::class)->serialize($tags, 'json');
$json = $this->get('jms_serializer')->serialize($tags, 'json');
return (new JsonResponse())->setJson($json);
}
@ -115,19 +114,19 @@ class TagRestController extends WallabagRestController
{
$this->validateAuthentication();
$tagFromDb = $this->getDoctrine()->getRepository(Tag::class)->findByLabelsAndUser([$tag->getLabel()], $this->getUser()->getId());
$tagFromDb = $this->getDoctrine()->getRepository('WallabagCoreBundle:Tag')->findByLabelsAndUser([$tag->getLabel()], $this->getUser()->getId());
if (empty($tagFromDb)) {
throw $this->createNotFoundException('Tag not found');
}
$this->getDoctrine()
->getRepository(Entry::class)
->getRepository('WallabagCoreBundle:Entry')
->removeTag($this->getUser()->getId(), $tag);
$this->cleanOrphanTag($tag);
$json = $this->get(SerializerInterface::class)->serialize($tag, 'json');
$json = $this->get('jms_serializer')->serialize($tag, 'json');
return (new JsonResponse())->setJson($json);
}

Some files were not shown because too many files have changed in this diff Show More