diff --git a/CHANGELOG.md b/CHANGELOG.md index ed11991..e1ba498 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -#Version 1.6.3 +# Version 1.6.4 +* Include new seat plugin service pattern. +* Use proper form-id to subscribe to notifications + +# Version 1.6.3 This version attempts to resolve major outages in using seat-groups >1.6.0 if not used with seat-notifications installed. * Refactored GroupSync job to use events for missing refreshtoken, successful attaches/detached role updates and failed syncs diff --git a/src/GroupsServiceProvider.php b/src/GroupsServiceProvider.php index 39edae7..45026da 100644 --- a/src/GroupsServiceProvider.php +++ b/src/GroupsServiceProvider.php @@ -13,10 +13,10 @@ use Herpaderpaldent\Seat\SeatGroups\Listeners\MissingRefreshTokenNotification; use Herpaderpaldent\Seat\SeatGroups\Observers\RefreshTokenObserver; use Illuminate\Support\Arr; -use Illuminate\Support\ServiceProvider; use Seat\Eveapi\Models\RefreshToken; +use Seat\Services\AbstractSeatPlugin; -class GroupsServiceProvider extends ServiceProvider +class GroupsServiceProvider extends AbstractSeatPlugin { /** * Bootstrap the application services. @@ -139,4 +139,70 @@ protected function mergeConfigs(array $original, array $merging) return $array; } + + /** + * Return an URI to a CHANGELOG.md file or an API path which will be providing changelog history. + * + * @return string|null + */ + public function getChangelogUri(): ?string + { + + return 'https://raw.githubusercontent.com/herpaderpaldent/seat-groups/master/CHANGELOG.md'; + } + + /** + * Return the plugin public name as it should be displayed into settings. + * + * @return string + */ + public function getName(): string + { + + return 'seat-groups'; + } + + /** + * Return the plugin repository address. + * + * @return string + */ + public function getPackageRepositoryUrl(): string + { + + return 'https://github.com/herpaderpaldent/seat-groups'; + } + + /** + * Return the plugin technical name as published on package manager. + * + * @return string + */ + public function getPackagistPackageName(): string + { + + return 'seat-groups'; + } + + /** + * Return the plugin vendor tag as published on package manager. + * + * @return string + */ + public function getPackagistVendorName(): string + { + + return 'herpaderpaldent'; + } + + /** + * Return the plugin installed version. + * + * @return string + */ + public function getVersion(): string + { + + return config('seatgroups.config.version'); + } } diff --git a/src/config/seatgroups.config.php b/src/config/seatgroups.config.php index ba208fc..1bc46bc 100644 --- a/src/config/seatgroups.config.php +++ b/src/config/seatgroups.config.php @@ -6,7 +6,7 @@ * Time: 10:24. */ return [ - 'version' => '1.6.3', + 'version' => '1.6.4', ]; //TODO: Update Version diff --git a/src/resources/views/notification/channel.blade.php b/src/resources/views/notification/channel.blade.php index bc3653f..275ae68 100644 --- a/src/resources/views/notification/channel.blade.php +++ b/src/resources/views/notification/channel.blade.php @@ -1,9 +1,9 @@ @inject('SeatGroupNotificationController', 'Herpaderpaldent\Seat\SeatGroups\Http\Controllers\SeatGroupNotificationController') @if( $SeatGroupNotificationController->isDisabledButton('discord') ) - - Discord - + + Discord + @elseif(! $SeatGroupNotificationController->isSubscribed('discord') ) Discord @@ -31,46 +31,47 @@ @endif - + × - Discord channel selection + SeAt groups update notification (Discord) - {{ csrf_field() }} - - - Select delivery channel: - - - @foreach($available_channels as $channel) - @if(!array_key_exists('discord', $channel)) - @continue - @endif - @foreach($channel['discord'] as $channel_id => $channel_name) - {{ $channel_name }} - @endforeach + + Select delivery channel: + + + @foreach($available_channels as $channel) + @if(!array_key_exists('discord', $channel)) + @continue + @endif + @foreach($channel['discord'] as $channel_id => $channel_name) + {{ $channel_name }} @endforeach - - + + @endforeach + + Although you might chose the right channel here you need to make sure that the bot has the appropriate channel permission to post a message. @@ -79,51 +80,52 @@ - + × - Slack channel selection + SeAt groups update notification (Slack) - {{ csrf_field() }} - - - Select delivery channel: - - - @foreach($available_channels as $channel) - @if(!array_key_exists('slack', $channel)) - @continue - @endif - - @foreach($channel['slack'] as $channel) - - {{ $channel['name'] }} - @if($channel['private_channel']) - (private channel) - @endif - - @endforeach + + Select delivery channel: + + + @foreach($available_channels as $channel) + @if(!array_key_exists('slack', $channel)) + @continue + @endif + + @foreach($channel['slack'] as $channel) + + {{ $channel['name'] }} + @if($channel['private_channel']) + (private channel) + @endif + @endforeach - - + + @endforeach + + If do not see the wished channel, invite the bot to it and try again later.