File tree Expand file tree Collapse file tree 3 files changed +32
-26
lines changed Expand file tree Collapse file tree 3 files changed +32
-26
lines changed Original file line number Diff line number Diff line change 10
10
"homepage" : " https://github.com/aryehraber/statamic-logbook" ,
11
11
"license" : " MIT" ,
12
12
"require" : {
13
- "rap2hpoutre/laravel-log-viewer" : " ^2.2 .0" ,
14
- "statamic/cms" : " ^3.3 "
13
+ "rap2hpoutre/laravel-log-viewer" : " ^2.3 .0" ,
14
+ "statamic/cms" : " ^4.0 "
15
15
},
16
16
"autoload" : {
17
17
"psr-4" : {
30
30
"statamic" : {
31
31
"name" : " Logbook" ,
32
32
"description" : " Manage and view log files in the CP." ,
33
- "version" : " 2.2 .0"
33
+ "version" : " 3.0 .0"
34
34
},
35
35
"laravel" : {
36
36
"providers" : [
39
39
}
40
40
},
41
41
"minimum-stability" : " dev" ,
42
- "prefer-stable" : true
42
+ "prefer-stable" : true ,
43
+ "config" : {
44
+ "allow-plugins" : {
45
+ "pixelfear/composer-dist-plugin" : true
46
+ }
47
+ }
43
48
}
Original file line number Diff line number Diff line change 16
16
<div class =" card mb-2" >
17
17
<div class =" flex items-center justify-between" >
18
18
<form class =" flex" method =" GET" action =" {{ cp_route (' utilities.logbook.show' ) } }" >
19
- <div class =" select-input-container relative " >
20
- <select class =" pr-4 " name =" log" >
19
+ <div class =" select-input-container" >
20
+ <select class =" select-input " name =" log" >
21
21
@foreach ($files as $file )
22
22
<option value =" {{ urlencode ($file ) } }" @if ($file === $currentFile ) selected @endif >{{ $file } } </option >
23
23
@endforeach
24
24
</select >
25
25
26
- <svg-icon name =" chevron-down-xs" class =" absolute inset-y-0 right-0 w-2 h-full mr-1.5 pointer-events-none" ></svg-icon >
26
+ <div class =" select-input-toggle" >
27
+ <svg-icon name =" micro/chevron-down-xs" class =" w-2" ></svg-icon >
28
+ </div >
27
29
</div >
28
30
</form >
29
31
42
44
@method (' delete' )
43
45
44
46
@if (count ($files ) > 1 )
45
- <dropdown-list class =" inline-block ml-1 " >
47
+ <dropdown-list class =" inline-block ml-2 " >
46
48
<template #trigger >
47
- <button class =" btn-danger flex items-center pr-2 " type =" button" >
48
- {{ __ (' Delete Log' ) } } <svg-icon name =" chevron-down-xs" class =" w-2 ml-1 " ></svg-icon >
49
+ <button class =" btn-danger flex items-center pr-3 hover:text-white " type =" button" >
50
+ {{ __ (' Delete Log' ) } } <svg-icon name =" micro/ chevron-down-xs" class =" w-2 ml-2 " ></svg-icon >
49
51
</button >
50
52
</template >
51
53
54
56
<button name =" log" value =" all" data-delete >{{ __ (' Delete All Logs' ) } } </button >
55
57
</dropdown-list >
56
58
@else
57
- <button class =" btn-danger ml-1 " name =" log" value =" {{ urlencode ($currentFile ) } }" data-delete >{{ __ (' Delete Log' ) } } </button >
59
+ <button class =" btn-danger ml-2 " name =" log" value =" {{ urlencode ($currentFile ) } }" data-delete >{{ __ (' Delete Log' ) } } </button >
58
60
@endif
59
61
</form >
60
62
</div >
Original file line number Diff line number Diff line change 2
2
3
3
namespace AryehRaber \Logbook ;
4
4
5
- use Statamic \Facades \Utility ;
6
5
use Illuminate \Routing \Router ;
6
+ use Statamic \Facades \Utility ;
7
7
use Statamic \Providers \AddonServiceProvider ;
8
8
9
9
class LogbookServiceProvider extends AddonServiceProvider
10
10
{
11
+ protected $ viewNamespace = 'logbook ' ;
12
+
11
13
protected $ scripts = [
12
14
__DIR__ .'/../resources/js/logbook.js '
13
15
];
14
16
15
- public function boot ()
17
+ public function bootAddon ()
16
18
{
17
- parent ::boot ();
18
-
19
- $ this ->loadViewsFrom (__DIR__ .'/../resources/views ' , 'logbook ' );
20
-
21
- Utility::make ('logbook ' )
22
- ->title (__ ('Logbook ' ))
23
- ->icon ('book-pages ' )
24
- ->description (__ ('Manage and view log files. ' ))
25
- ->routes (function (Router $ router ) {
26
- $ router ->get ('/ ' , [LogbookController::class, 'show ' ])->name ('show ' );
27
- $ router ->delete ('/delete ' , [LogbookController::class, 'destroy ' ])->name ('destroy ' );
28
- })
29
- ->register ();
19
+ Utility::extend (function () {
20
+ Utility::register ('logbook ' )
21
+ ->title (__ ('Logbook ' ))
22
+ ->icon ('book-pages ' )
23
+ ->description (__ ('Manage and view log files. ' ))
24
+ ->routes (function (Router $ router ) {
25
+ $ router ->get ('/ ' , [LogbookController::class, 'show ' ])->name ('show ' );
26
+ $ router ->delete ('/delete ' , [LogbookController::class, 'destroy ' ])->name ('destroy ' );
27
+ });
28
+ });
30
29
}
31
30
}
You can’t perform that action at this time.
0 commit comments