Skip to content

Commit 8065736

Browse files
committed
improve anonymous segment list
1 parent c6aa638 commit 8065736

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

plugins/SegmentEditor/javascripts/Segmentation.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,13 @@ Segmentation = (function($) {
163163
+ ' ' + self.translations['General_DefaultAppended']
164164
+ '</span>';
165165
var comparisonService = window.CoreHome.ComparisonsStoreInstance;
166-
if (comparisonService.isComparisonEnabled()
167-
|| comparisonService.isComparisonEnabled() === null // may not be initialized since this code is outside of Vue
166+
if (
167+
comparisonService.isComparisonEnabled() ||
168+
comparisonService.isComparisonEnabled() === null // may not be initialized since this code is outside of Vue
168169
) {
169-
listHtml += '<span class="compareSegment allVisitsCompareSegment" title="' + _pk_translate('SegmentEditor_CompareThisSegment') + '"></span>';
170+
const className = 'compareSegment allVisitsCompareSegment ' + (self.segmentAccess === 'write' ? 'allVisitsCompareSegment--write' : '');
171+
const title = _pk_translate('SegmentEditor_CompareThisSegment');
172+
listHtml += '<span class="' + className + '" title="' + title + '"></span>';
170173
}
171174
listHtml += '</li>';
172175

plugins/SegmentEditor/stylesheets/segmentation.less

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ div.scrollable {
232232
min-width: 206px;
233233
}
234234

235+
.segmentationContainer hr {
236+
margin: 10px 0;
237+
}
238+
235239
.segmentationContainer .submenu ul {
236240
display: flex;
237241
flex-direction: column;
@@ -387,7 +391,9 @@ div.scrollable {
387391

388392
&.allVisitsCompareSegment {
389393
margin-left: 20px;
390-
margin-right: 20px;
394+
}
395+
&.allVisitsCompareSegment--write {
396+
margin-right: 20px;
391397
}
392398
}
393399

0 commit comments

Comments
 (0)