Skip to content

Commit

Permalink
Merge pull request #3 from mansoorkhan96/feat/improve-ui
Browse files Browse the repository at this point in the history
Feat/Improve UI
  • Loading branch information
mansoorkhan96 authored Mar 10, 2024
2 parents 026d6c4 + 473085d commit d7ca8df
Show file tree
Hide file tree
Showing 12 changed files with 173 additions and 138 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

A Filament plugin and a wrapper around [Laravel Versionable](https://github.com/overtrue/laravel-versionable) to create versions Laravel Models. When ever you save a model, it would store the specified `$versionable` fields to the Database and then you can revert to any target model state any time.

![](./image.jpg)
![](./screenshot.png)

## Installation

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"filament/filament": "^3.0",
"spatie/laravel-package-tools": "^1.15.0",
"illuminate/contracts": "^10.0",
"overtrue/laravel-versionable": "^5.0"
"overtrue/laravel-versionable": "^5.1"
},
"require-dev": {
"laravel/pint": "^1.0",
Expand Down
Binary file removed image.jpg
Binary file not shown.
55 changes: 21 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
},
"devDependencies": {
"@awcodes/filament-plugin-purge": "^1.1.1",
"@tailwindcss/forms": "^0.5.4",
"@tailwindcss/typography": "^0.5.9",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.26",
"postcss-import": "^15.1.0",
"prettier": "^2.7.1",
"prettier-plugin-tailwindcss": "^0.1.13",
"tailwindcss": "^3.3.3"
"tailwindcss": "^3.4.1"
}
}
12 changes: 11 additions & 1 deletion resources/dist/filament-versionable.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion resources/lang/en/actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'restore_version' => 'Restore This Revision',
'restore' => [
'label' => 'Restore This Revision',
'modal_description' => 'Are you sure you\'d like to revert to this revision?',
'modal_description' => 'Are you sure you\'d like to restore this version?',
'modal_submit_action_label' => 'Yes, restore it',
],
'revisions' => 'Revisions',
Expand Down
28 changes: 28 additions & 0 deletions resources/views/components/diff-stats.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@props(['diffStats'])

<div {{ $attributes->merge(['class' => 'flex items-center gap-x-2']) }}>
<div class="flex items-center gap-x-1">
<x-filament::icon-button
icon="heroicon-m-plus-circle"
tag="a"
label="Insertions"
/>

<span class="text-sm font-semibold">
{{ Arr::get($diffStats, 'inserted') }}
</span>
</div>

<div class="flex items-center gap-x-1">
<x-filament::icon-button
icon="heroicon-m-minus-circle"
tag="a"
color="danger"
label="Deletions"
/>

<span class="text-sm font-semibold">
{{ Arr::get($diffStats, 'deleted') }}
</span>
</div>
</div>
Loading

0 comments on commit d7ca8df

Please sign in to comment.