Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
cannycookie authored and github-actions[bot] committed Sep 4, 2023
1 parent 594d020 commit b1785da
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 19 deletions.
13 changes: 6 additions & 7 deletions src/Components/Iframe.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,18 @@ public function __construct($name, $src = null, $height = '800px', $width = '100
$this->setUp();
}


protected function setUp(): void
{
parent::setUp();

}

// protected function setUp(): void
// {
// $this->afterStateHydrated(function ($record) {
// $this->src = route('email-template.preview', $record);
// });
// }
// protected function setUp(): void
// {
// $this->afterStateHydrated(function ($record) {
// $this->src = route('email-template.preview', $record);
// });
// }

public static function make($name, $src = null, $height = '800px', $width = '100%')
{
Expand Down
2 changes: 0 additions & 2 deletions src/EmailTemplatesServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Visualbuilder\EmailTemplates\Helpers\FormHelper;
use Visualbuilder\EmailTemplates\Helpers\TokenHelper;
use Visualbuilder\EmailTemplates\Http\Controllers\EmailTemplateController;
use Visualbuilder\EmailTemplates\Resources\EmailTemplateResource;

class EmailTemplatesServiceProvider extends PackageServiceProvider
{
Expand All @@ -34,7 +33,6 @@ public function configurePackage(Package $package): void
]);
}


public function packageRegistered(): void
{
parent::packageRegistered();
Expand Down
5 changes: 2 additions & 3 deletions src/Helpers/FormHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@

namespace Visualbuilder\EmailTemplates\Helpers;

use Illuminate\Support\Facades\File;
use Visualbuilder\EmailTemplates\Contracts\FormHelperInterface;
use Visualbuilder\EmailTemplates\Models\EmailTemplate;

class FormHelper implements FormHelperInterface
{
public function getLanguageOptions()
{
return collect(config('email-templates.languages'))->mapWithKeys(function ($langVal, $langKey) {
return [
$langKey => '<span class="flag-icon flag-icon-'.$langVal["flag-icon"].'"></span> '.$langVal["display"]
$langKey => '<span class="flag-icon flag-icon-'.$langVal["flag-icon"].'"></span> '.$langVal["display"],
];
})->toArray();
}
Expand Down Expand Up @@ -88,6 +86,7 @@ public function getRecipientOptions()
return collect(config('email-templates.recipients'))->mapWithKeys(function ($recipient) {
$splitNamespace = explode('\\', $recipient);
$className = end($splitNamespace); // Get the class name without namespace

return [$className => $recipient]; // Use class name as key and full class name as value
})->toArray();
}
Expand Down
1 change: 0 additions & 1 deletion src/Listeners/PasswordResetListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Illuminate\Auth\Events\PasswordReset;

use Visualbuilder\EmailTemplates\Notifications\UserPasswordResetNotification;
use Visualbuilder\EmailTemplates\Notifications\UserVerifiedNotification;

class PasswordResetListener
{
Expand Down
1 change: 0 additions & 1 deletion src/Listeners/UserRegisteredListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Visualbuilder\EmailTemplates\Listeners;

use Illuminate\Auth\Events\Registered;
use Visualbuilder\EmailTemplates\Notifications\UserLoginNotification;
use Visualbuilder\EmailTemplates\Notifications\UserRegisteredNotification;

class UserRegisteredListener
Expand Down
2 changes: 1 addition & 1 deletion src/Models/EmailTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,6 @@ public function viewPath(): Attribute

public function previewUrl()
{
return route('email-template.preview',$this);
return route('email-template.preview', $this);
}
}
2 changes: 0 additions & 2 deletions src/Resources/EmailTemplateResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public static function getPluralModelLabel(): string
return __('vb-email-templates::email-templates.resource_name.plural');
}


public static function form(Form $form): Form
{
$mailHelper = app(CreateMailableInterface::class);
Expand Down Expand Up @@ -124,7 +123,6 @@ public static function form(Form $form): Form
);
}


public static function table(Table $table): Table
{
return $table->columns(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public function __construct()
$this->tokenHelper = app(\Visualbuilder\EmailTemplates\Contracts\TokenHelperInterface::class);
}


public function form(Form $form): Form
{

Expand Down Expand Up @@ -85,7 +84,7 @@ public function form(Form $form): Form
Grid::make(['default' => 1])
->schema(
[
Iframe::make('preview', route('email-template.preview', $this->getRecord()))
Iframe::make('preview', route('email-template.preview', $this->getRecord())),
]
),

Expand Down

0 comments on commit b1785da

Please sign in to comment.