Version 5.1 - All the GraphQL #32

Closed
timw4mail wants to merge 1160 commits from develop into master
9 changed files with 14 additions and 19 deletions
Showing only changes of commit 26c6df74e4 - Show all commits

View File

@ -30,6 +30,7 @@ return function(array $config_array = []) {
$app_logger = new Logger('animeclient');
$app_logger->pushHandler(new RotatingFileHandler(__DIR__ . '/logs/app.log', Logger::NOTICE));
$app_logger->pushHandler(new BrowserConsoleHandler(Logger::INFO));
$container->setLogger($app_logger, 'default');
// -------------------------------------------------------------------------

View File

@ -1,4 +1,6 @@
template {
template,
[hidden="hidden"],
.media[hidden] {
display: none;
}

View File

@ -9,7 +9,7 @@
--edit-link-color: #12db18;
}
template {display:none}
template, [hidden="hidden"], .media[hidden] {display:none}
body {margin: 0.5em;}

View File

@ -17,9 +17,6 @@ details {
display: block;
}
/*input[type="number"] {
width: auto; }*/
input[type="search"] {
-webkit-appearance: textfield;
}

View File

@ -15,8 +15,6 @@ audio:not([controls]) {
details {
display: block; }
/*input[type="number"] {
width: auto; }*/
input[type="search"] {
-webkit-appearance: textfield; }
input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration {

View File

@ -7,9 +7,7 @@
// Action to increment episode count
_.on('body.anime.list', 'click', '.plus_one', function(e) {
let this_sel = this;
let parent_sel = _.closestParent(this, 'article');
let watched_count = parseInt(_.$('.completed_number', parent_sel)[0].textContent, 10);
let total_count = parseInt(_.$('.total_number', parent_sel)[0].textContent, 10);
let title = _.$('.name a', parent_sel)[0].textContent;
@ -27,7 +25,7 @@
}
// If you increment at the last episode, mark as completed
if (( ! isNaN(watched_count)) && (watched_count + 1) === total_count) {
if (( ! isNaN(watched_count)) && (watched_count + 1) == total_count) {
delete data.increment_episodes;
data.status = 'completed';
}
@ -39,7 +37,7 @@
type: 'POST',
mimeType: 'application/json',
success: (res) => {
if (res.status === 'completed') {
if (data.status == 'completed') {
_.hide(parent_sel);
}

View File

@ -1,4 +1,5 @@
<?php
/**
* Hummingbird Anime Client
*
@ -16,7 +17,6 @@ namespace Aviat\AnimeClient\Controller;
use Aviat\Ion\Di\ContainerInterface;
use Aviat\AnimeClient\Controller as BaseController;
use Aviat\AnimeClient\Hummingbird\Enum\AnimeWatchingStatus;
use Aviat\AnimeClient\Model\Anime as AnimeModel;
use Aviat\AnimeClient\Hummingbird\Transformer\AnimeListTransformer;
/**
@ -122,7 +122,7 @@ class Anime extends BaseController {
foreach ($raw_status_list as $status_item)
{
$statuses[$status_item] = (string)$this->string($status_item)
$statuses[$status_item] = (string) $this->string($status_item)
->underscored()
->humanize()
->titleize();
@ -180,7 +180,7 @@ class Anime extends BaseController {
foreach ($raw_status_list as $status_item)
{
$statuses[$status_item] = (string)$this->string($status_item)
$statuses[$status_item] = (string) $this->string($status_item)
->underscored()
->humanize()
->titleize();
@ -216,12 +216,12 @@ class Anime extends BaseController {
*/
public function form_update()
{
$post_data = $this->request->getParsedBody();
$data = $this->request->getParsedBody();
// Do some minor data manipulation for
// large form-based updates
$transformer = new AnimeListTransformer();
$post_data = $transformer->untransform($post_data);
$post_data = $transformer->untransform($data);
$full_result = $this->model->update($post_data);
$result = $full_result['body'];
@ -275,5 +275,7 @@ class Anime extends BaseController {
'data' => $data,
]);
}
}
// End of AnimeController.php

View File

@ -15,7 +15,6 @@ namespace Aviat\AnimeClient\Controller;
use Aviat\Ion\Json;
use Aviat\Ion\Di\ContainerInterface;
use Aviat\AnimeClient\Controller;
use Aviat\AnimeClient\Config;
use Aviat\AnimeClient\Model\Manga as MangaModel;
use Aviat\AnimeClient\Hummingbird\Enum\MangaReadingStatus;
use Aviat\AnimeClient\Hummingbird\Transformer\MangaListTransformer;

View File

@ -15,8 +15,6 @@ namespace Aviat\AnimeClient\Model;
use Aviat\Ion\Json;
use Aviat\Ion\Di\ContainerInterface;
use Aviat\AnimeClient\AnimeClient;
use Aviat\AnimeClient\Model\Anime as AnimeModel;
/**
* Model for getting anime collection data