= svg('logo-castopod', 'text-3xl mr-2') ?>
Admin
diff --git a/app/Views/admin/_sidenav.php b/app/Views/admin/_sidenav.php
index fa349177..dad00549 100644
--- a/app/Views/admin/_sidenav.php
+++ b/app/Views/admin/_sidenav.php
@@ -1,6 +1,6 @@
['icon' => 'dashboard', 'items' => ['admin_home']],
+ 'dashboard' => ['icon' => 'dashboard', 'items' => ['admin']],
'podcasts' => [
'icon' => 'mic',
'items' => ['my_podcasts', 'podcast_list', 'podcast_create'],
diff --git a/app/Views/install/_layout.php b/app/Views/install/_layout.php
new file mode 100644
index 00000000..81f634ff
--- /dev/null
+++ b/app/Views/install/_layout.php
@@ -0,0 +1,26 @@
+
+
+
+
+
+ Castopod
+
+
+
+
+
+
+
+
+
+ Castopod installer
+
+
+
+ = view('_message_block') ?>
+ = $this->renderSection('content') ?>
+
+
+
diff --git a/app/Views/install/env.php b/app/Views/install/env.php
new file mode 100644
index 00000000..d41eff3f
--- /dev/null
+++ b/app/Views/install/env.php
@@ -0,0 +1,89 @@
+= $this->extend('install/_layout') ?>
+
+= $this->section('content') ?>
+
+= form_open(route_to('install_generate_env'), [
+ 'class' => 'flex flex-col max-w-sm mx-auto',
+]) ?>
+
+= form_fieldset('', ['class' => 'flex flex-col mb-6']) ?>
+
+ = form_label(lang('Install.form.hostname'), 'hostname') ?>
+ = form_input([
+ 'id' => 'hostname',
+ 'name' => 'hostname',
+ 'class' => 'form-input mb-4',
+ 'value' => config('App')->baseURL,
+ ]) ?>
+
+ = form_label(lang('Install.form.admin_gateway'), 'admin_gateway') ?>
+ = form_input([
+ 'id' => 'admin_gateway',
+ 'name' => 'admin_gateway',
+ 'class' => 'form-input mb-4',
+ 'value' => config('App')->adminGateway,
+ ]) ?>
+
+ = form_label(lang('Install.form.auth_gateway'), 'auth_gateway') ?>
+ = form_input([
+ 'id' => 'auth_gateway',
+ 'name' => 'auth_gateway',
+ 'class' => 'form-input',
+ 'value' => config('App')->authGateway,
+ ]) ?>
+= form_fieldset_close() ?>
+
+= form_fieldset('', ['class' => 'flex flex-col mb-6']) ?>
+
+ = form_label(lang('Install.form.db_hostname'), 'db_hostname') ?>
+ = form_input([
+ 'id' => 'db_hostname',
+ 'name' => 'db_hostname',
+ 'class' => 'form-input mb-4',
+ 'value' => config('Database')->default['hostname'],
+ ]) ?>
+
+ = form_label(lang('Install.form.db_name'), 'db_name') ?>
+ = form_input([
+ 'id' => 'db_name',
+ 'name' => 'db_name',
+ 'class' => 'form-input mb-4',
+ 'value' => config('Database')->default['database'],
+ ]) ?>
+
+ = form_label(lang('Install.form.db_username'), 'db_username') ?>
+ = form_input([
+ 'id' => 'db_username',
+ 'name' => 'db_username',
+ 'class' => 'form-input mb-4',
+ 'value' => config('Database')->default['username'],
+ ]) ?>
+
+ = form_label(lang('Install.form.db_password'), 'db_password') ?>
+ = form_input([
+ 'id' => 'db_password',
+ 'name' => 'db_password',
+ 'class' => 'form-input mb-4',
+ 'value' => config('Database')->default['password'],
+ ]) ?>
+
+ = form_label(lang('Install.form.db_prefix'), 'db_prefix') ?>
+ = form_input([
+ 'id' => 'db_prefix',
+ 'name' => 'db_prefix',
+ 'class' => 'form-input',
+ 'value' => config('Database')->default['DBPrefix'],
+ ]) ?>
+= form_fieldset_close() ?>
+
+= form_button([
+ 'content' => lang('Install.form.submit_install'),
+ 'type' => 'submit',
+ 'class' => 'self-end px-4 py-2 bg-gray-200',
+]) ?>
+
+= form_close() ?>
+
+= $this->endSection() ?>
diff --git a/app/Views/install/error.php b/app/Views/install/error.php
new file mode 100644
index 00000000..b4f8bf0a
--- /dev/null
+++ b/app/Views/install/error.php
@@ -0,0 +1,9 @@
+= $this->extend('install/_layout') ?>
+
+= $this->section('content') ?>
+
+
+ = lang('Install.messages.error', ['message' => $error]) ?>
+
+
+= $this->endSection() ?>
diff --git a/app/Views/install/superadmin.php b/app/Views/install/superadmin.php
new file mode 100644
index 00000000..37858097
--- /dev/null
+++ b/app/Views/install/superadmin.php
@@ -0,0 +1,45 @@
+= $this->extend('install/_layout') ?>
+
+= $this->section('content') ?>
+
+= form_open(route_to('install_create_superadmin'), [
+ 'class' => 'flex flex-col max-w-sm mx-auto',
+]) ?>
+
+= form_fieldset('', ['class' => 'flex flex-col mb-6']) ?>
+
+ = form_label(lang('Install.form.email'), 'email') ?>
+ = form_input([
+ 'id' => 'email',
+ 'name' => 'email',
+ 'class' => 'form-input mb-4',
+ 'type' => 'email',
+ ]) ?>
+
+ = form_label(lang('Install.form.username'), 'username') ?>
+ = form_input([
+ 'id' => 'username',
+ 'name' => 'username',
+ 'class' => 'form-input mb-4',
+ ]) ?>
+
+ = form_label(lang('Install.form.password'), 'password') ?>
+ = form_input([
+ 'id' => 'password',
+ 'name' => 'password',
+ 'class' => 'form-input',
+ 'type' => 'password',
+ ]) ?>
+= form_fieldset_close() ?>
+
+= form_button([
+ 'content' => lang('Install.form.submit_create_superadmin'),
+ 'type' => 'submit',
+ 'class' => 'self-end px-4 py-2 bg-gray-200',
+]) ?>
+
+= form_close() ?>
+
+= $this->endSection() ?>
diff --git a/composer.json b/composer.json
index c5f29a4a..44be1c8c 100644
--- a/composer.json
+++ b/composer.json
@@ -11,7 +11,8 @@
"geoip2/geoip2": "~2.0",
"myth/auth": "dev-develop",
"codeigniter4/codeigniter4": "dev-develop",
- "league/commonmark": "^1.5"
+ "league/commonmark": "^1.5",
+ "vlucas/phpdotenv": "^5.1"
},
"require-dev": {
"mikey179/vfsstream": "1.6.*",
diff --git a/composer.lock b/composer.lock
index 1d5b5b7c..bdeba108 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "1fe52c47fa9834960fdb1cf37f2f2776",
+ "content-hash": "a6be291e1c7f73b73182cd7b49234688",
"packages": [
{
"name": "codeigniter4/codeigniter4",
@@ -186,6 +186,68 @@
],
"time": "2019-12-12T18:48:39+00:00"
},
+ {
+ "name": "graham-campbell/result-type",
+ "version": "v1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/GrahamCampbell/Result-Type.git",
+ "reference": "7e279d2cd5d7fbb156ce46daada972355cea27bb"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/7e279d2cd5d7fbb156ce46daada972355cea27bb",
+ "reference": "7e279d2cd5d7fbb156ce46daada972355cea27bb",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0|^8.0",
+ "phpoption/phpoption": "^1.7.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.5|^7.5|^8.5|^9.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "GrahamCampbell\\ResultType\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "graham@alt-three.com"
+ }
+ ],
+ "description": "An Implementation Of The Result Type",
+ "keywords": [
+ "Graham Campbell",
+ "GrahamCampbell",
+ "Result Type",
+ "Result-Type",
+ "result"
+ ],
+ "funding": [
+ {
+ "url": "https://github.com/GrahamCampbell",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-04-13T13:17:36+00:00"
+ },
{
"name": "james-heinrich/getid3",
"version": "v2.0.0-beta3",
@@ -705,6 +767,71 @@
],
"time": "2020-07-16T14:00:14+00:00"
},
+ {
+ "name": "phpoption/phpoption",
+ "version": "1.7.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/php-option.git",
+ "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/994ecccd8f3283ecf5ac33254543eb0ac946d525",
+ "reference": "994ecccd8f3283ecf5ac33254543eb0ac946d525",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.5.9 || ^7.0 || ^8.0"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.4.1",
+ "phpunit/phpunit": "^4.8.35 || ^5.7.27 || ^6.5.6 || ^7.0 || ^8.0 || ^9.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.7-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PhpOption\\": "src/PhpOption/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "Apache-2.0"
+ ],
+ "authors": [
+ {
+ "name": "Johannes M. Schmitt",
+ "email": "schmittjoh@gmail.com"
+ },
+ {
+ "name": "Graham Campbell",
+ "email": "graham@alt-three.com"
+ }
+ ],
+ "description": "Option Type for PHP",
+ "keywords": [
+ "language",
+ "option",
+ "php",
+ "type"
+ ],
+ "funding": [
+ {
+ "url": "https://github.com/GrahamCampbell",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-07-20T17:29:33+00:00"
+ },
{
"name": "psr/cache",
"version": "1.0.1",
@@ -798,6 +925,315 @@
],
"time": "2020-03-23T09:12:05+00:00"
},
+ {
+ "name": "symfony/polyfill-ctype",
+ "version": "v1.18.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-ctype.git",
+ "reference": "1c302646f6efc070cd46856e600e5e0684d6b454"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454",
+ "reference": "1c302646f6efc070cd46856e600e5e0684d6b454",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-ctype": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.18-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Ctype\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Gert de Pagter",
+ "email": "BackEndTea@gmail.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for ctype functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "ctype",
+ "polyfill",
+ "portable"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-07-14T12:35:20+00:00"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.18.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a",
+ "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.18-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-07-14T12:35:20+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php80",
+ "version": "v1.18.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php80.git",
+ "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981",
+ "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.0.8"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.18-dev"
+ },
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Php80\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ],
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ion Bazan",
+ "email": "ion.bazan@gmail.com"
+ },
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-07-14T12:35:20+00:00"
+ },
+ {
+ "name": "vlucas/phpdotenv",
+ "version": "v5.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/vlucas/phpdotenv.git",
+ "reference": "448c76d7a9e30c341ff5bc367a923af74ae18467"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/448c76d7a9e30c341ff5bc367a923af74ae18467",
+ "reference": "448c76d7a9e30c341ff5bc367a923af74ae18467",
+ "shasum": ""
+ },
+ "require": {
+ "ext-pcre": "*",
+ "graham-campbell/result-type": "^1.0.1",
+ "php": "^7.1.3 || ^8.0",
+ "phpoption/phpoption": "^1.7.4",
+ "symfony/polyfill-ctype": "^1.17",
+ "symfony/polyfill-mbstring": "^1.17",
+ "symfony/polyfill-php80": "^1.17"
+ },
+ "require-dev": {
+ "bamarni/composer-bin-plugin": "^1.4.1",
+ "ext-filter": "*",
+ "phpunit/phpunit": "^7.5.20 || ^8.5.2 || ^9.0"
+ },
+ "suggest": {
+ "ext-filter": "Required to use the boolean validator."
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Dotenv\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Graham Campbell",
+ "email": "graham@alt-three.com",
+ "homepage": "https://gjcampbell.co.uk/"
+ },
+ {
+ "name": "Vance Lucas",
+ "email": "vance@vancelucas.com",
+ "homepage": "https://vancelucas.com/"
+ }
+ ],
+ "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.",
+ "keywords": [
+ "dotenv",
+ "env",
+ "environment"
+ ],
+ "funding": [
+ {
+ "url": "https://github.com/GrahamCampbell",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2020-07-14T19:26:25+00:00"
+ },
{
"name": "whichbrowser/parser",
"version": "v2.0.42",
@@ -2351,82 +2787,6 @@
],
"time": "2020-04-17T01:09:41+00:00"
},
- {
- "name": "symfony/polyfill-ctype",
- "version": "v1.18.1",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "1c302646f6efc070cd46856e600e5e0684d6b454"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454",
- "reference": "1c302646f6efc070cd46856e600e5e0684d6b454",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "suggest": {
- "ext-ctype": "For best performance"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.18-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Ctype\\": ""
- },
- "files": [
- "bootstrap.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Gert de Pagter",
- "email": "BackEndTea@gmail.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for ctype functions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "ctype",
- "polyfill",
- "portable"
- ],
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2020-07-14T12:35:20+00:00"
- },
{
"name": "theseer/tokenizer",
"version": "1.2.0",
diff --git a/public/favicon.ico b/public/favicon.ico
index aa74302f..3a7011d3 100644
Binary files a/public/favicon.ico and b/public/favicon.ico differ