forked from rrze-mmz/Tides
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request rrze-mmz#84 from rrze-mmz/83-migrate-all-the-exist…
…ing-settings Migrate portal settings
- Loading branch information
Showing
17 changed files
with
163 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ | |
use Illuminate\Contracts\View\Factory; | ||
use Illuminate\Contracts\View\View; | ||
use Illuminate\Http\RedirectResponse; | ||
use Illuminate\Support\Facades\Artisan; | ||
|
||
class PortalSettingsController extends Controller | ||
{ | ||
|
@@ -22,12 +21,7 @@ public function show(): Application|Factory|View | |
['name' => 'portal'], | ||
[ | ||
'name' => 'portal', | ||
'data' => [ | ||
'maintenance_mode' => config('tides.maintenance_mode'), | ||
'allow_user_registration' => config('tides.allow_user_registration'), | ||
'feeds_default_owner_name' => config('tides.feeds_default_owner_name'), | ||
'feeds_default_owner_email' => config('tides.feeds_default_owner_email'), | ||
], | ||
'data' => [config('settings.portal')], | ||
] | ||
); | ||
|
||
|
@@ -36,6 +30,11 @@ public function show(): Application|Factory|View | |
'allow_user_registration' => $setting->data['allow_user_registration'] ?? false, | ||
'feeds_default_owner_name' => $setting->data['feeds_default_owner_name'] ?? 'Tides', | ||
'feeds_default_owner_email' => $setting->data['feeds_default_owner_email'] ?? '[email protected]', | ||
'player_show_article_link_in_player' => $setting->data['player_show_article_link_in_player'] ?? false, | ||
'player_article_link_url' => $setting->data['player_article_link_url'] ?? 1, | ||
'player_article_link_text' => $setting->data['player_article_link_text'] ?? '', | ||
'clip_generic_poster_image_name' => $setting->data['clip_generic_poster_image_name'] ?? '', | ||
'show_dropbox_files_in_dashboard' => $setting->data['show_dropbox_files_in_dashboard'] ?? true, | ||
]; | ||
|
||
return view('backend.settings.portal', ['setting' => $setting->data]); | ||
|
@@ -52,13 +51,6 @@ public function update(UpdatePortalSettings $request) | |
$setting = Setting::portal(); | ||
$validated = $request->validated(); | ||
|
||
//user updated setting | ||
// if ($setting->data['maintenance_mode'] !== $validated['maintenance_mode']) { | ||
// //temporary disabled because not working as expected | ||
// $call = $validated['maintenance_mode'] ? 'down' : 'up'; | ||
// Artisan::call($call); | ||
// } | ||
|
||
$setting->data = $validated; | ||
$setting->save(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
'portal' => [ | ||
'maintenance_mode' => false, | ||
'allow_user_registration' => false, | ||
'show_dropbox_files_in_dashboard' => true, | ||
'feeds_default_owner_name' => 'Tides', | ||
'feeds_default_owner_email' => '[email protected]', | ||
'default_image_id' => env('DEFAULT_IMAGE_ID', 1), | ||
|
@@ -15,6 +16,10 @@ | |
'admin_main_address' => env('ADMIN_MAIL_ADDRESS', '[email protected]'), | ||
'cdn_server_url' => env('CDN_SERVER_URL', 'http://localhost/'), | ||
'cdn_server_secret' => env('CDN_SERVER_SECRET', 'dsnJ23fjeq!'), | ||
'player_show_article_link_in_player' => false, | ||
'player_article_link_id' => 1, | ||
'player_article_link_text' => '', | ||
'clip_generic_poster_image_name' => 'generic_clip_poster_image.png', | ||
], | ||
'user' => [ | ||
'accept_use_terms' => false, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div class="py-5 flex "> | ||
<div class="w-full text-center px-4 py-2 border | ||
border-transparent rounded-md font-medium text-xl tracking-wider | ||
active:bg-white-900 focus:outline-none focus:border-white-900 bg-green-400 text-gray-800 | ||
focus:ring ring-gray-300 disabled:opacity-25 | ||
transition ease-in-out duration-150"> | ||
<a href="{{ $playerSetting->data['player_article_link_url'] }}"> | ||
{{ $playerSetting->data['player_article_link_text'] }} | ||
</a> | ||
</div> | ||
</div> |
Oops, something went wrong.