Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
happytodev authored and github-actions[bot] committed Jun 29, 2022
1 parent 23a75a3 commit 7d12379
Showing 1 changed file with 28 additions and 25 deletions.
53 changes: 28 additions & 25 deletions src/Resources/SocialNetworkResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

namespace Happytodev\FilamentSocialNetworks\Resources;

use App\Models\SocialNetwork;
use Filament\Forms;
use Filament\Tables;
use Illuminate\Support\Str;
use Filament\Resources\Form;
use App\Models\SocialNetwork;
use Filament\Resources\Table;
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables;
use Happytodev\FilamentSocialNetworks\Resources\SocialNetworkResource\Pages;

class SocialNetworkResource extends Resource
Expand All @@ -23,27 +22,27 @@ public static function form(Form $form): Form
->schema([
Forms\Components\Select::make('name')
->options([
'devianart' => 'DevianArt',
'discord' => 'Discord',
'facebook' => 'Facebook',
'github' => 'Github',
'instagram' => 'Instagram',
'linkedin' => 'LinkedIn',
'medium' => 'Medium',
'pinterest' => 'Pinterest',
'reddit' => 'Reddit',
'skype' => 'Skype',
'snapchat' => 'Snapchat',
'soundcloud' => 'SoundCloud',
'telegram' => 'Telegram',
'tiktok' => 'TikTok',
'tumblr' => 'Tumblr',
'twitch' => 'Twitch',
'twitter' => 'Twitter',
'vimeo' => 'Vimeo',
'wattpad' => 'WattPad',
'whatsapp' => 'WhatsApp',
'youtube' => 'Youtube',
'devianart' => 'DevianArt',
'discord' => 'Discord',
'facebook' => 'Facebook',
'github' => 'Github',
'instagram' => 'Instagram',
'linkedin' => 'LinkedIn',
'medium' => 'Medium',
'pinterest' => 'Pinterest',
'reddit' => 'Reddit',
'skype' => 'Skype',
'snapchat' => 'Snapchat',
'soundcloud' => 'SoundCloud',
'telegram' => 'Telegram',
'tiktok' => 'TikTok',
'tumblr' => 'Tumblr',
'twitch' => 'Twitch',
'twitter' => 'Twitter',
'vimeo' => 'Vimeo',
'wattpad' => 'WattPad',
'whatsapp' => 'WhatsApp',
'youtube' => 'Youtube',
])
->searchable()
->reactive()
Expand All @@ -52,18 +51,22 @@ public static function form(Form $form): Form
case 'discord':
# code...
$set('url', 'https://discord.gg/{YourChannel}');

break;
case 'telegram':
# code...
$set('url', 'https://t.me/{YourUsername}');

break;
case 'tumblr':
# code...
$set('url', '{YourUsername}.tumblr.com');

break;
default:
# code...
$set('url', 'https://www.' . $state . '.com/');

break;
}
})
Expand Down

0 comments on commit 7d12379

Please sign in to comment.