Skip to content

Commit 7877d6d

Browse files
committed
Merge branch 'dev'
2 parents c231182 + e1774e8 commit 7877d6d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+979
-1035
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
<a name="1.1.0"></a>
2+
# [1.1.0](https://github.com/flextype-plugins/admin) (2020-08-05)
3+
4+
### Features
5+
6+
* **core** update code base for new Flextype 0.9.9
7+
* **core** perfomance impromevents!
8+
19
<a name="1.0.10"></a>
210
# [1.0.10](https://github.com/flextype-plugins/admin) (2020-06-23)
311

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<h1 align="center">Admin Plugin for <a href="https://flextype.org/">Flextype</a></h1>
22

3-
![preview](preview.png)
3+
![preview](https://github.com/flextype-plugins/admin/raw/dev/preview.png)
44

55
<p align="center">
6-
<a href="https://github.com/flextype-plugins/admin/releases"><img alt="Version" src="https://img.shields.io/github/release/flextype-plugins/admin.svg?label=version&color=black"></a> <a href="https://github.com/flextype-plugins/admin"><img src="https://img.shields.io/badge/license-MIT-blue.svg?color=black" alt="License"></a> <a href="https://github.com/flextype-plugins/admin"><img src="https://img.shields.io/github/downloads/flextype-plugins/admin/total.svg?color=black" alt="Total downloads"></a> <a href="https://github.com/flextype/flextype"><img src="https://img.shields.io/badge/Flextype-0.9.8-green.svg?color=black" alt="Flextype"></a> <a href="https://crowdin.com/project/flextype-plugin-admin"><img src="https://d322cqt584bo4o.cloudfront.net/flextype-plugin-admin/localized.svg?color=black" alt="Crowdin"></a> <a href="https://scrutinizer-ci.com/g/flextype-plugins/admin?branch=dev&color=black"><img src="https://img.shields.io/scrutinizer/g/flextype-plugins/admin.svg?branch=dev&color=black" alt="Quality Score"></a> <a href=""><img src="https://img.shields.io/discord/423097982498635778.svg?logo=discord&colorB=728ADA&label=Discord%20Chat" alt="Discord"></a>
6+
<a href="https://github.com/flextype-plugins/admin/releases"><img alt="Version" src="https://img.shields.io/github/release/flextype-plugins/admin.svg?label=version&color=black"></a> <a href="https://github.com/flextype-plugins/admin"><img src="https://img.shields.io/badge/license-MIT-blue.svg?color=black" alt="License"></a> <a href="https://github.com/flextype-plugins/admin"><img src="https://img.shields.io/github/downloads/flextype-plugins/admin/total.svg?color=black" alt="Total downloads"></a> <a href="https://github.com/flextype/flextype"><img src="https://img.shields.io/badge/Flextype-0.9.9-green.svg?color=black" alt="Flextype"></a> <a href="https://crowdin.com/project/flextype-plugin-admin"><img src="https://d322cqt584bo4o.cloudfront.net/flextype-plugin-admin/localized.svg?color=black" alt="Crowdin"></a> <a href="https://scrutinizer-ci.com/g/flextype-plugins/admin?branch=dev&color=black"><img src="https://img.shields.io/scrutinizer/g/flextype-plugins/admin.svg?branch=dev&color=black" alt="Quality Score"></a> <a href=""><img src="https://img.shields.io/discord/423097982498635778.svg?logo=discord&colorB=728ADA&label=Discord%20Chat" alt="Discord"></a>
77
</p>
88

99
Admin Panel plugin for Flextype.
@@ -14,7 +14,7 @@ The following dependencies need to be installed for Form Admin Plugin.
1414

1515
| Item | Version | Download |
1616
|---|---|---|
17-
| [flextype](https://github.com/flextype/flextype) | 0.9.8 | [download](https://github.com/flextype/flextype/releases) |
17+
| [flextype](https://github.com/flextype/flextype) | 0.9.9 | [download](https://github.com/flextype/flextype/releases) |
1818
| [twig](https://github.com/flextype-plugins/twig) | >=1.0.0 | [download](https://github.com/flextype-plugins/twig/releases) |
1919
| [form](https://github.com/flextype-plugins/form) | >=1.0.0 | [download](https://github.com/flextype-plugins/form/releases) |
2020
| [form-admin](https://github.com/flextype-plugins/form-admin) | >=1.0.0 | [download](https://github.com/flextype-plugins/form-admin/releases) |

app/Controllers/ApiAccessController.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Flextype;
5+
namespace Flextype\Plugin\Admin\Controllers;
66

77
use Flextype\Component\Filesystem\Filesystem;
88
use Flextype\Component\Session\Session;
@@ -14,6 +14,7 @@
1414
use function Flextype\Component\I18n\__;
1515
use function random_bytes;
1616
use function time;
17+
use Flextype\App\Foundation\Container;
1718

1819
class ApiAccessController extends Container
1920
{
@@ -125,7 +126,7 @@ public function addProcess(Request $request, Response $response) : Response
125126
// Create API Token account
126127
if (Filesystem::write(
127128
$api_token_file_path,
128-
$this->serializer->encode([
129+
$this->yaml->encode([
129130
'title' => $post_data['title'],
130131
'icon' => $post_data['icon'],
131132
'limit_calls' => (int) $post_data['limit_calls'],
@@ -136,7 +137,7 @@ public function addProcess(Request $request, Response $response) : Response
136137
'created_at' => $time,
137138
'updated_by' => Session::get('uuid'),
138139
'updated_at' => $time,
139-
], 'yaml')
140+
])
140141
)) {
141142
$this->flash->addMessage('success', __('admin_message_access_api_token_created'));
142143
} else {
@@ -162,7 +163,7 @@ public function addProcess(Request $request, Response $response) : Response
162163
public function edit(Request $request, Response $response) : Response
163164
{
164165
$token = $request->getQueryParams()['token'];
165-
$token_data = $this->serializer->decode(Filesystem::read(PATH['project'] . '/tokens' . '/access/' . $token . '/token.yaml'), 'yaml');
166+
$token_data = $this->yaml->decode(Filesystem::read(PATH['project'] . '/tokens' . '/access/' . $token . '/token.yaml'));
166167

167168
return $this->twig->render(
168169
$response,
@@ -208,7 +209,7 @@ public function editProcess(Request $request, Response $response) : Response
208209
if (Filesystem::has($api_token_file_path)) {
209210
if (Filesystem::write(
210211
$api_token_file_path,
211-
$this->serializer->encode([
212+
$this->yaml->encode([
212213
'title' => $post_data['title'],
213214
'icon' => $post_data['icon'],
214215
'limit_calls' => (int) $post_data['limit_calls'],
@@ -219,7 +220,7 @@ public function editProcess(Request $request, Response $response) : Response
219220
'created_at' => $post_data['created_at'],
220221
'updated_by' => Session::get('uuid'),
221222
'updated_at' => date($this->registry->get('flextype.settings.date_format'), time()),
222-
], 'yaml')
223+
])
223224
)) {
224225
$this->flash->addMessage('success', __('admin_message_access_api_token_updated'));
225226
}

app/Controllers/ApiController.php

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Flextype;
5+
namespace Flextype\Plugin\Admin\Controllers;
66

77
use Flextype\Component\Filesystem\Filesystem;
88
use Flextype\Component\Session\Session;
@@ -14,6 +14,7 @@
1414
use function Flextype\Component\I18n\__;
1515
use function random_bytes;
1616
use function time;
17+
use Flextype\App\Foundation\Container;
1718

1819
class ApiController extends Container
1920
{
@@ -31,17 +32,25 @@ public function index(Request $request, Response $response) : Response
3132
[
3233
'menu_item' => 'api',
3334
'api_list' => [
34-
'delivery' => [
35-
'title' => __('admin_delivery'),
36-
'icon' => 'fas fa-truck'
35+
'entries' => [
36+
'title' => __('admin_entries'),
37+
'icon' => 'fas fa-database'
38+
],
39+
'registry' => [
40+
'title' => __('admin_registry'),
41+
'icon' => 'fas fa-archive'
3742
],
3843
'images' => [
3944
'title' => __('admin_images'),
4045
'icon' => 'far fa-images'
4146
],
42-
'management' => [
43-
'title' => __('admin_management'),
44-
'icon' => 'fas fa-user-cog'
47+
'files' => [
48+
'title' => __('admin_files'),
49+
'icon' => 'fas fa-file'
50+
],
51+
'folders' => [
52+
'title' => __('admin_folders'),
53+
'icon' => 'fas fa-folder'
4554
],
4655
'access' => [
4756
'title' => __('admin_access'),

app/Controllers/ApiDeliveryController.php

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)