Skip to content

Commit

Permalink
Making improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
tnylea committed May 10, 2024
1 parent b8b08db commit b4e88e3
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 45 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"livewire/livewire": "^3.0",
"livewire/volt": "^1.0",
"codeat3/blade-phosphor-icons": "^2.0",
"winter/laravel-config-writer": "^1.0",
"devdojo/config-writer": "^0.0.7",
"laravel/socialite": "^5.0",
"calebporzio/sushi": "^2.5",
"pragmarx/google2fa": "^8.0",
Expand Down
2 changes: 1 addition & 1 deletion public/app.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#auth-body{
opacity:80;
}
}
9 changes: 3 additions & 6 deletions resources/views/pages/auth/setup/appearance.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
use Livewire\Volt\Component;
use Livewire\Attributes\Validate;
use Devdojo\Auth\Helper;
use Winter\LaravelConfigWriter\ArrayFile;
name('auth.setup.appearance');
Expand All @@ -21,11 +20,9 @@ public function mount(){
$this->descriptions = (object)config('devdojo.auth.descriptions');
}
public function update($key, $value){
$this->config = ArrayFile::open(base_path('config/devdojo/auth/appearance.php'));
$this->config->set($key, $value);
$this->config->write();
$this->appearance = (object)config('devdojo.auth.appearance');
private function update($key, $value){
\Config::write('devdojo.auth.appearance.' . $key, $value);
Artisan::call('config:clear');
$this->js('savedMessageOpen()');
}
};
Expand Down
1 change: 0 additions & 1 deletion resources/views/pages/auth/setup/language.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
use Livewire\Volt\Component;
use Livewire\Attributes\Validate;
use Devdojo\Auth\Helper;
use Winter\LaravelConfigWriter\ArrayFile;
name('auth.setup.language');
Expand Down
7 changes: 3 additions & 4 deletions resources/views/pages/auth/setup/providers.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Livewire\Volt\Component;
use Livewire\Attributes\Validate;
use Devdojo\Auth\Helper;
use Winter\LaravelConfigWriter\ArrayFile;
use Devdojo\ConfigWriter\ArrayFile;
name('auth.setup.providers');
Expand All @@ -20,9 +20,8 @@ public function mount(){
}
public function update($slug, $checked){
$this->config = ArrayFile::open(base_path('config/devdojo/auth/providers.php'));
$this->config->set($slug . '.active', $checked);
$this->config->write();
\Config::write('devdojo.auth.providers.' . $slug . '.active', $checked);
Artisan::call('config:clear');
$this->providers = (object)config('devdojo.auth.providers');
$this->js('savedMessageOpen()');
}
Expand Down
8 changes: 4 additions & 4 deletions resources/views/pages/auth/setup/settings.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Livewire\Volt\Component;
use Livewire\Attributes\Validate;
use Devdojo\Auth\Helper;
use Winter\LaravelConfigWriter\ArrayFile;
use Devdojo\ConfigWriter\ArrayFile;
name('auth.setup.settings');
Expand All @@ -20,9 +20,9 @@ public function mount(){
}
public function update($key, $value){
$this->config = ArrayFile::open(base_path('config/devdojo/auth/settings.php'));
$this->config->set($key, $value);
$this->config->write();
\Config::write('devdojo.auth.settings.' . $key, $value);
Artisan::call('config:clear');
$this->settings = (object)config('devdojo.auth.settings');
$this->js('savedMessageOpen()');
}
Expand Down
2 changes: 2 additions & 0 deletions src/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ public function boot()
Livewire::component('auth.setup.favicon', \Devdojo\Auth\Livewire\Setup\Favicon::class);
Livewire::component('auth.setup.css', \Devdojo\Auth\Livewire\Setup\Css::class);
}

//app()->register(\October\Rain\Config\ServiceProvider::class);
}

private function registerAuthFolioDirectory(){
Expand Down
7 changes: 1 addition & 6 deletions src/Livewire/Setup/Alignment.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Livewire\Component;
use Illuminate\Support\Facades\Artisan;
use Winter\LaravelConfigWriter\ArrayFile;

class Alignment extends Component
{
Expand Down Expand Up @@ -33,12 +32,8 @@ public function updatingContainer($value){
}

private function updateConfigKeyValue($key, $value){
$config = ArrayFile::open(base_path('config/devdojo/auth/appearance.php'));
$config->set($key, $value);
$config->write();

\Config::write('devdojo.auth.appearance.' . $key, $value);
Artisan::call('config:clear');

$this->js('savedMessageOpen()');
}

Expand Down
6 changes: 1 addition & 5 deletions src/Livewire/Setup/Background.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Livewire\Component;
use Livewire\WithFileUploads;
use Illuminate\Support\Facades\Artisan;
use Winter\LaravelConfigWriter\ArrayFile;

class Background extends Component
{
Expand Down Expand Up @@ -53,10 +52,7 @@ public function updated($property, $value){
}

private function updateConfigKeyValue($key, $value){
$config = ArrayFile::open(base_path('config/devdojo/auth/appearance.php'));
$config->set($key, $value);
$config->write();

\Config::write('devdojo.auth.appearance.' . $key, $value);
Artisan::call('config:clear');

$this->js('savedMessageOpen()');
Expand Down
7 changes: 1 addition & 6 deletions src/Livewire/Setup/Color.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Livewire\Component;
use Livewire\WithFileUploads;
use Illuminate\Support\Facades\Artisan;
use Winter\LaravelConfigWriter\ArrayFile;

class Color extends Component
{
Expand Down Expand Up @@ -46,12 +45,8 @@ public function updatingInputBorderColor($value){
}

private function updateConfigKeyValue($key, $value){
$config = ArrayFile::open(base_path('config/devdojo/auth/appearance.php'));
$config->set($key, $value);
$config->write();

\Config::write('devdojo.auth.appearance.' . $key, $value);
Artisan::call('config:clear');

$this->js('savedMessageOpen()');
}

Expand Down
1 change: 0 additions & 1 deletion src/Livewire/Setup/Css.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Livewire\Component;
use Illuminate\Support\Facades\Artisan;
use Winter\LaravelConfigWriter\ArrayFile;

class Css extends Component
{
Expand Down
7 changes: 1 addition & 6 deletions src/Livewire/Setup/Favicon.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Livewire\Component;
use Livewire\WithFileUploads;
use Illuminate\Support\Facades\Artisan;
use Winter\LaravelConfigWriter\ArrayFile;

class Favicon extends Component
{
Expand Down Expand Up @@ -46,12 +45,8 @@ public function updated($property, $value){
}

private function updateConfigKeyValue($key, $value){
$config = ArrayFile::open(base_path('config/devdojo/auth/appearance.php'));
$config->set($key, $value);
$config->write();

\Config::write('devdojo.auth.appearance.' . $key, $value);
Artisan::call('config:clear');

$this->js('savedMessageOpen()');
}

Expand Down
9 changes: 5 additions & 4 deletions src/Livewire/Setup/Logo.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Devdojo\Auth\Livewire\Setup;

use Livewire\Component;
use Winter\LaravelConfigWriter\ArrayFile;
use Livewire\WithFileUploads;
use Illuminate\Support\Facades\Artisan;

class Logo extends Component
{
Expand Down Expand Up @@ -68,10 +68,11 @@ public function updating($property, $value)
}
}


private function updateConfigKeyValue($key, $value){
$config = ArrayFile::open(base_path('config/devdojo/auth/appearance.php'));
$config->set($key, $value);
$config->write();
\Config::write('devdojo.auth.appearance.' . $key, $value);
Artisan::call('config:clear');

$this->js('savedMessageOpen()');
}

Expand Down

0 comments on commit b4e88e3

Please sign in to comment.