From 09338e91326774e156b384a5a4d0ab1a708dd8b8 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Thu, 5 Jan 2017 13:41:32 -0500 Subject: [PATCH] Authentication, show edit forms for Anime --- app/bootstrap.php | 6 +- app/config/minify_css_groups.php | 1 - app/views/anime/cover.php | 19 +- app/views/anime/list.php | 18 +- app/views/header.php | 2 +- app/views/main-menu.php | 4 +- public/css/base.css | 751 +++++++++++++++++- public/css/base.myth.css | 2 + public/css/marx.css | 673 ---------------- public/js.php | 4 +- public/js/anime_collection.js | 2 +- public/package.json | 11 +- .../templates/anime-ajax-search-results.html | 17 +- src/API/Kitsu.php | 36 + src/API/Kitsu/Auth.php | 36 +- src/API/Kitsu/Enum/AnimeWatchingStatus.php | 10 +- src/API/Kitsu/KitsuModel.php | 122 ++- src/API/Kitsu/KitsuTrait.php | 43 +- .../Transformer/AnimeListTransformer.php | 7 +- .../Kitsu/Transformer/AnimeTransformer.php | 105 +-- src/AnimeClient.php | 1 - src/Controller.php | 2 +- src/Controller/Anime.php | 27 +- src/Controller/Manga.php | 6 +- src/Model/API.php | 2 +- src/Model/Anime.php | 33 +- src/Model/AnimeCollection.php | 13 +- src/Model/Collection.php | 5 +- src/Model/Manga.php | 81 +- 29 files changed, 1074 insertions(+), 965 deletions(-) delete mode 100644 public/css/marx.css mode change 100755 => 100644 public/js/anime_collection.js create mode 100644 src/API/Kitsu.php diff --git a/app/bootstrap.php b/app/bootstrap.php index 5229f433..53848110 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -121,9 +121,9 @@ return function(array $config_array = []) { }); // Miscellaneous Classes - /* $container->set('auth', function($container) { - return new HummingbirdAuth($container); - }); */ + $container->set('auth', function($container) { + return new KitsuAuth($container); + }); $container->set('url-generator', function($container) { return new UrlGenerator($container); }); diff --git a/app/config/minify_css_groups.php b/app/config/minify_css_groups.php index ee678a2d..1242b592 100644 --- a/app/config/minify_css_groups.php +++ b/app/config/minify_css_groups.php @@ -33,7 +33,6 @@ return [ ), */ 'base' => [ - 'marx.css', 'base.css' ] ]; diff --git a/app/views/anime/cover.php b/app/views/anime/cover.php index 5ca19c9d..c0fa5869 100644 --- a/app/views/anime/cover.php +++ b/app/views/anime/cover.php @@ -1,21 +1,20 @@
-is_authenticated()): ?> +is_authenticated()): ?> Add Item - +

There's nothing here!

$items): ?> - */ ?>

html($name) ?>

- is_authenticated()*/) continue; ?> + is_authenticated()) continue; ?>
- is_authenticated()): ?> + is_authenticated()): ?> - + img($item['anime']['image']); ?>
- is_authenticated()): ?> + is_authenticated()): ?> - +
@@ -65,6 +64,6 @@
-is_authenticated()): ?> +is_authenticated()): ?> - \ No newline at end of file + \ No newline at end of file diff --git a/app/views/anime/list.php b/app/views/anime/list.php index 488feab3..cafeb586 100644 --- a/app/views/anime/list.php +++ b/app/views/anime/list.php @@ -1,7 +1,7 @@
-is_authenticated()): ?> +is_authenticated()): ?> Add Item - +

There's nothing here!

@@ -10,9 +10,9 @@ - is_authenticated()): ?> + is_authenticated()): ?> - + @@ -26,13 +26,13 @@ - is_authenticated()) continue; ?> + is_authenticated()) continue; ?> - is_authenticated()): ?> + is_authenticated()): ?> - +
  Title Airing Status Score
">Edit @@ -73,5 +73,5 @@ -is_authenticated()) ? 'table_edit' :*/ 'table' ?> - +is_authenticated()) ? 'table_edit' : 'table' ?> + \ No newline at end of file diff --git a/app/views/header.php b/app/views/header.php index d5dd4835..4326beb3 100644 --- a/app/views/header.php +++ b/app/views/header.php @@ -6,7 +6,7 @@ - + diff --git a/app/views/main-menu.php b/app/views/main-menu.php index ae0045ea..be89435e 100644 --- a/app/views/main-menu.php +++ b/app/views/main-menu.php @@ -17,7 +17,7 @@ [Manga List] - is_authenticated()): ?> + is_authenticated()): ?>   @@ -29,7 +29,7 @@ Logout [get('whose_list') ?>'s Login] - +