55 -->
66
77 <div
8- class =" block cursor-pointer space-y-2 px-3 py-2 text-sm hover:bg-gray-50 dark:hover:bg-gray-900 "
8+ class =" relative block cursor-pointer space-y-2 px-3 py-2 text-sm hover:[ & _.revision-message]:underline "
99 :class =" {
10- 'status-working-copy': revision.working,
10+ 'status-working-copy': revision.action === ' working' ,
1111 'status-published': revision.attributes.published,
12+ 'border border-ui-accent-bg dark:border-dark-ui-accent-bg/90 rounded-lg py-2.5 bg-[hsl(from_var(--theme-color-ui-accent-bg)_h_s_97)] dark:bg-[hsl(from_var(--theme-color-dark-ui-accent-bg)_h_40_20)]': revision.attributes.current,
13+ 'bg-gradient-to-b from-transparent from-60% to-white dark:to-gray-800 -mt-1': isLast,
1214 }"
15+ v-tooltip =" revision.attributes.current ? __('Current Revision') : null"
1316 @click =" open"
1417 >
15- <div v-if =" revision.message" class =" revision-item-note truncate" v-text =" revision.message" />
18+ <div class =" flex gap-3" >
19+ <Avatar v-if =" revision.user" :user =" revision.user" class =" size-6 shrink-0 mt-1" />
1620
17- <div class =" flex items-center gap-2" >
18- <avatar v-if =" revision.user" :user =" revision.user" class =" size-6 shrink-0" />
21+ <div class =" grid gap-1" >
22+ <div v-if =" revision.message" class =" revision-message font-medium" v-text =" revision.message" />
23+ <Subheading class =" text-xs text-gray-500! dark:text-gray-400!" :class =" { 'text-gray-800! dark:text-white!': revision.attributes.current }" >
24+ {{ time }}
25+ <template v-if =" revision .user " >
26+ by {{ revision.user.name || revision.user.email }}
27+ </template >
28+ </Subheading >
29+ </div >
1930
20- <div class =" revision-item-content flex w-full" >
21- <div class =" flex-1" >
22- <Subheading >
23- <template v-if =" revision .user " >
24- {{ revision.user.name || revision.user.email }} &ndash ;
25- </template >
26- {{ time }}
27- </Subheading >
28- </div >
31+ <div class =" flex items-center gap-1 ml-auto" >
32+ <Badge
33+ size =" sm"
34+ :color ="
35+ revision.action === 'working'
36+ ? 'gray'
37+ : {
38+ publish: 'green',
39+ revision: 'gray',
40+ restore: 'gray',
41+ unpublish: 'red',
42+ }[revision.action]
43+ "
44+ :text ="
45+ revision.action === 'working'
46+ ? __('Working Copy')
47+ : {
48+ publish: __('Published'),
49+ revision: __('Revision'),
50+ restore: __('Restored'),
51+ unpublish: __('Unpublished'),
52+ }[revision.action]
53+ "
54+ />
55+ </div >
2956
30- <div class =" flex items-center gap-1" >
31- <Badge
32- size =" sm"
33- :color ="
34- revision.working
35- ? 'gray'
36- : {
37- publish: 'green',
38- revision: 'gray',
39- restore: 'gray',
40- unpublish: 'red',
41- }[revision.action]
42- "
43- :text ="
44- revision.working
45- ? __('Working Copy')
46- : {
47- publish: __('Published'),
48- revision: __('Revision'),
49- restore: __('Restored'),
50- unpublish: __('Unpublished'),
51- }[revision.action]
52- "
57+ <revision-preview
58+ v-if =" showDetails"
59+ :revision =" revision"
60+ component =" runway-publish-form"
61+ :component-props =" componentProps"
62+ @closed =" showDetails = false"
63+ >
64+ <template #action-buttons-right >
65+ <restore-revision
66+ v-if =" canRestoreRevisions"
67+ :revision =" revision"
68+ :url =" restoreUrl"
69+ :reference =" reference"
70+ class =" ltr:ml-4 rtl:mr-4"
5371 />
54- <Badge size =" sm" color =" orange" v-if =" revision.attributes.current" v-text =" __('Current')" />
55- </div >
56-
57- <revision-preview
58- v-if =" showDetails"
59- :revision =" revision"
60- component =" runway-publish-form"
61- :component-props =" componentProps"
62- @closed =" showDetails = false"
63- >
64- <template slot="action-buttons-right">
65- <restore-revision
66- v-if =" canRestoreRevisions"
67- :revision =" revision"
68- :url =" restoreUrl"
69- :reference =" reference"
70- class =" ltr:ml-4 rtl:mr-4"
71- />
72- </template >
73- </revision-preview >
74- </div >
72+ </template >
73+ </revision-preview >
7574 </div >
7675 </div >
7776</template >
7877
7978<script >
8079import { DateFormatter } from ' @statamic/cms' ;
8180import { RestoreRevision , RevisionPreview } from ' @statamic/cms/temporary' ;
82- import { Subheading , Badge } from ' @statamic/cms/ui' ;
81+ import { Subheading , Badge , Avatar } from ' @statamic/cms/ui' ;
8382
8483export default {
8584 components: {
8685 RevisionPreview,
8786 RestoreRevision,
8887 Subheading,
8988 Badge,
89+ Avatar,
9090 },
9191
9292 props: {
9393 revision: Object ,
9494 restoreUrl: String ,
9595 reference: String ,
9696 canRestoreRevisions: Boolean ,
97+ isLast: Boolean ,
9798 },
9899
99100 data () {
@@ -111,7 +112,6 @@ export default {
111112 initialPublished: ' published' ,
112113 initialPermalink: ' permalink' ,
113114 initialIsWorkingCopy: ' hasWorkingCopy' ,
114- initialIsRoot: ' isRoot' ,
115115 initialReadOnly: ' readOnly' ,
116116 canManagePublishState: ' canManagePublishState' ,
117117 resourceHasRoutes: ' resourceHasRoutes' ,
@@ -128,7 +128,7 @@ export default {
128128
129129 methods: {
130130 open () {
131- if (this .revision .working ) {
131+ if (this .revision .action === ' working' ) {
132132 this .$emit (' working-copy-selected' );
133133 return ;
134134 }
0 commit comments