From 0f31a5e10ad20b3c322bd59675268943e69b8c5b Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Thu, 27 Sep 2018 16:45:12 -0400 Subject: [PATCH] Ugly progress commit --- app/views/manga/cover.php | 1 + app/views/settings.php | 51 ++++- composer.json | 1 + console | 3 +- public/js/scripts-authed.min.js | 12 +- public/js/scripts-authed.min.js.map | 2 +- public/js/src/manga.js | 2 +- public/js/src/template-helpers.js | 10 +- .../GraphQL/Queries/SyncUserList.graphql | 1 + .../Transformer/AnimeListTransformer.php | 15 +- .../Transformer/MangaListTransformer.php | 13 +- src/API/Kitsu/Auth.php | 20 +- .../Transformer/AnimeListTransformer.php | 10 +- .../Transformer/MangaListTransformer.php | 12 +- src/AnimeClient.php | 20 ++ src/Command/MALIDCheck.php | 192 ++++++++++++++++++ src/Command/SyncLists.php | 112 +++++----- src/Controller/Anime.php | 6 +- src/Controller/Index.php | 10 + src/Controller/Manga.php | 6 +- src/Model/Anime.php | 10 +- src/Model/Manga.php | 10 +- src/Types/AbstractType.php | 6 +- src/Types/AnimeFormItem.php | 27 --- src/Types/AnimeFormItemData.php | 22 -- src/Types/FormItem.php | 7 +- src/Types/FormItemData.php | 5 +- src/Types/MangaFormItem.php | 28 --- src/Types/MangaFormItemData.php | 19 -- 29 files changed, 411 insertions(+), 222 deletions(-) create mode 100644 src/Command/MALIDCheck.php delete mode 100644 src/Types/AnimeFormItem.php delete mode 100644 src/Types/AnimeFormItemData.php delete mode 100644 src/Types/MangaFormItem.php delete mode 100644 src/Types/MangaFormItemData.php diff --git a/app/views/manga/cover.php b/app/views/manga/cover.php index 346d5a76..3398699c 100644 --- a/app/views/manga/cover.php +++ b/app/views/manga/cover.php @@ -49,6 +49,7 @@
+
Rating: / 10
diff --git a/app/views/settings.php b/app/views/settings.php index 3a0177aa..15aa5ecd 100644 --- a/app/views/settings.php +++ b/app/views/settings.php @@ -1,12 +1,61 @@ get('config_dir')); if ( ! $auth->isAuthenticated()) { echo '

Not Authorized

'; + return; } + + +function render_settings_form ($data, $file) +{ + ob_start(); + foreach ($data as $key => $value) + { + ?> + + + + + + +
+ + + + +
+ + $properties): ?> +
+ + + + + +
+ +
+ + diff --git a/composer.json b/composer.json index 3d22556e..cbfe1046 100644 --- a/composer.json +++ b/composer.json @@ -24,6 +24,7 @@ "aura/session": "^2.0", "aviat/banker": "^1.0.0", "aviat/ion": "^2.3.0", + "ext-json": "*", "ext-gd":"*", "ext-pdo": "*", "maximebf/consolekit": "^1.0", diff --git a/console b/console index 6a8ed0fa..a6be0347 100755 --- a/console +++ b/console @@ -17,7 +17,8 @@ try (new Console([ 'cache:clear' => Command\CacheClear::class, 'cache:refresh' => Command\CachePrime::class, - // 'lists:sync' => Command\SyncLists::class, + 'lists:sync' => Command\SyncLists::class, + 'mal_id:check' => Command\MALIDCheck::class, ]))->run(); } catch (\Exception $e) diff --git a/public/js/scripts-authed.min.js b/public/js/scripts-authed.min.js index 792bb545..4ffbe0fa 100644 --- a/public/js/scripts-authed.min.js +++ b/public/js/scripts-authed.min.js @@ -365,12 +365,10 @@ }); } - // Wire up mal checkbox + // Click on hidden MAL checkbox so + // that MAL id is passed AnimeClient.on('main', 'change', '.big-check', (e) => { const id = e.target.id; - AnimeClient.$('.mal-check').forEach(el => { - el.checked = false; - }); document.getElementById(`mal_${id}`).checked = true; }); @@ -386,7 +384,7 @@ results.push(`