Skip to content

Commit 829dc04

Browse files
Merge pull request #5 from Gerenuk-LTD/dev
Dev
2 parents d2009d1 + 7e93f9a commit 829dc04

File tree

4 files changed

+35
-22
lines changed

4 files changed

+35
-22
lines changed

README.md

+32-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
1-
# This is my package filament-utc-dts
1+
<img src="https://banners.beyondco.de/Filament%20UTC%20DTS.png?theme=light&packageManager=composer+require&packageName=gerenuk%2Ffilament-utc-dts&pattern=brickWall&style=style_1&description=See+UTC+time+in+your+Filament+panel&md=1&showWatermark=0&fontSize=100px&images=clock" alt="Project banner">
2+
3+
# Filament UTC DTS
24

35
[![Latest Version on Packagist](https://img.shields.io/packagist/v/gerenuk/filament-utc-dts.svg?style=flat-square)](https://packagist.org/packages/gerenuk/filament-utc-dts)
4-
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/gerenuk/filament-utc-dts/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/gerenuk/filament-utc-dts/actions?query=workflow%3Arun-tests+branch%3Amain)
5-
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/gerenuk/filament-utc-dts/fix-php-code-styling.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/gerenuk/filament-utc-dts/actions?query=workflow%3A"Fix+PHP+code+styling"+branch%3Amain)
6+
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/gerenuk-ltd/filament-utc-dts/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/gerenuk-ltd/filament-utc-dts/actions?query=workflow%3Arun-tests+branch%3Amain)
7+
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/gerenuk-ltd/filament-utc-dts/fix-php-code-styling.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/gerenuk-ltd/filament-utc-dts/actions?query=workflow%3A"Fix+PHP+code+styling"+branch%3Amain)
68
[![Total Downloads](https://img.shields.io/packagist/dt/gerenuk/filament-utc-dts.svg?style=flat-square)](https://packagist.org/packages/gerenuk/filament-utc-dts)
79

8-
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
10+
This package adds a UTC indicator badge to your Filament panel.
11+
12+
## Table of Contents
13+
1. [Introduction](#filament-utc-dts)
14+
2. [Version Compatibility](#version-compatibility)
15+
3. [Installation](#installation)
16+
4. [Usage](#usage)
17+
- [Registering the Plugin](#usage)
18+
5. [Testing](#testing)
19+
6. [Screenshots](#screenshots)
20+
- [UTC Indicator](#utc-indicator)
21+
7. [Changelog](#changelog)
22+
8. [Contributing](#contributing)
23+
9. [Security Vulnerabilities](#security-vulnerabilities)
24+
10. [Credits](#credits)
25+
11. [License](#license)
926

1027
## Version Compatibility
1128

@@ -39,12 +56,7 @@ This is the contents of the published config file:
3956
```php
4057
return [
4158
/*
42-
* Whether a border should be shown.
43-
*/
44-
'show_border' => false,
45-
46-
/*
47-
* The format of the datestamp.
59+
* The Carbon format which should be used to display the UTC timestamp.
4860
*/
4961
'format' => 'd M Hi\Z',
5062
];
@@ -80,6 +92,16 @@ class AdminPanelProvider extends PanelProvider
8092
composer test
8193
```
8294

95+
## Screenshots
96+
97+
### UTC Indicator
98+
99+
![UTC Indicator](https://raw.githubusercontent.com/Gerenuk-LTD/filament-utc-dts/main/screenshots/utc-indicator.png)
100+
101+
### UTC Indicator & Date
102+
103+
![UTC Indicator & Date](https://raw.githubusercontent.com/Gerenuk-LTD/filament-utc-dts/main/screenshots/utc-indicator-date.png)
104+
83105
## Changelog
84106

85107
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

config/filament-utc-dts.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,7 @@
33
// config for Gerenuk/FilamentUtcDts
44
return [
55
/*
6-
* Whether a border should be shown.
7-
*/
8-
'show_border' => false,
9-
10-
/*
11-
* The format of the datestamp.
6+
* The Carbon format which should be used to display the UTC timestamp.
127
*/
138
'format' => 'd M Hi\Z',
149
];

resources/views/badge.blade.php

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
<div @class([
2-
'hidden sm:flex items-center h-9 px-3 text-sm font-medium
3-
rounded-lg shadow-sm text-gray-900',
4-
'ring-1 ring-inset ring-gray-200' => $showBorder,
5-
])>{{ $datestamp }}</div>
1+
<span
2+
class="inline-flex items-center rounded-md bg-gray-50 dark:bg-gray-400/10 px-2 py-1 text-sm font-medium text-gray-600 dark:text-gray-400 ring-1 ring-inset ring-gray-500/10 dark:ring-gray-400/20">{{ $datestamp }}</span>

src/FilamentUtcDtsPlugin.php

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public function register(Panel $panel): void
2020
$timestamp = Carbon::now()->utc()->format(config('filament-utc-dts.format'));
2121

2222
return View::make('filament-utc-dts::badge', [
23-
'showBorder' => config('filament-utc-dts.show_border'),
2423
'datestamp' => $timestamp,
2524
]);
2625
});

0 commit comments

Comments
 (0)