Skip to content

Commit 46146ff

Browse files
authored
Merge pull request #5576 from Countly/anna/next
new diff for plugins/configurations and apps
2 parents 47f28a6 + 47ec1bf commit 46146ff

File tree

4 files changed

+63
-4
lines changed

4 files changed

+63
-4
lines changed

frontend/express/public/core/app-management/templates/app-management.html

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,27 @@ <h2 class="bu-mb-4" data-test-id="selected-app-name-title"> {{apps[selectedApp]
202202
@discard="discardForm()"
203203
@save="save(formScope.editedObject)"
204204
:disabled="isSaveDisabled(formScope.editedObject)"
205+
:isModal="true"
205206
>
207+
<template v-slot:main>
208+
<div class="bu-mr-0 bu-is-flex bu-is-justify-content-flex-end bu-is-align-items-center cly-vue-user-selected" style="height: 100%;">
209+
<span class="selected-count-blue bu-pl-1 text-medium">
210+
<span style="background-color:#0166D6; color:white; padding:3px 7px; border-radius:4px;">{{compare(formScope.editedObject,apps[selectedApp]).length}}</span>
211+
<span class="bu-is-lowercase text-medium color-cool-gray-50 bu-pl-1">{{ i18n("common.diff-helper.changes-made") }}</span>
212+
<span class="text-medium color-cool-gray-50">{{ i18n("common.diff-helper.keep") }}</span>
213+
</span>
214+
<span class="vertical-divider bu-mr-4 bu-ml-4"></span>
215+
<el-button skin="red" class="bu-mr-2" size="small" type="default" @click="save(formScope.editedObject)">
216+
<i class="cly-io-16 cly-io cly-io-save" style="font-size: larger;"></i>
217+
<span class="bu-ml-1">
218+
{{ i18n('dashboards.save-changes') }}
219+
</span>
220+
</el-button>
221+
<el-button class="x-button" @click="discardForm">
222+
<i class="cly-io-16 cly-io cly-io-x color-cool-gray-50"></i>
223+
</el-button>
224+
</div>
225+
</template>
206226
</cly-diff-helper>
207227
</template>
208228
</cly-form>
@@ -364,7 +384,7 @@ <h3 class="bu-mb-2" v-if="!newApp && hasAppAdminRights">{{i18n('management-appli
364384
</cly-inline-form-field>
365385
</el-collapse-item>
366386
</el-collapse>
367-
<cly-diff-helper :diff="changeKeys" @discard="onDiscard" @save="saveSettings" :disabled="v.invalid" :emitSaveWhenDisabled="true" :isModal=true>
387+
<cly-diff-helper :diff="changeKeys" @discard="onDiscard" @save="saveSettings" :disabled="v.invalid" :emitSaveWhenDisabled="true" :isModal="true">
368388
<template v-slot:main>
369389
<div class="bu-mr-0 bu-is-flex bu-is-justify-content-flex-end bu-is-align-items-center cly-vue-user-selected" style="height: 100%;">
370390
<span class="selected-count-blue bu-pl-1 text-medium">

plugins/crashes/frontend/public/templates/overview.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<el-dropdown-item command="resolving" icon="cly-io cly-io-clock">{{ i18n('crashes.action-resolving') }}</el-dropdown-item>
5252
<el-dropdown-item command="unresolved" icon="cly-io cly-io-x-circle">{{ i18n('crashes.action-unresolved') }}</el-dropdown-item>
5353
</cly-more-options>
54-
<cly-more-options v-if="canUserUpdate" size="small" :text=" i18n('data-manager.change-visibility') " type="default" icon="cly-io cly-io-eye bu-mr-2" :showArrows=true @command="setSelectedAs($event)">
54+
<cly-more-options v-if="canUserUpdate" size="small" :text=" i18n('data-manager.change-visibility') " :widthSameAsTrigger="true" type="default" icon="cly-io cly-io-eye bu-mr-2" :showArrows=true @command="setSelectedAs($event)">
5555
<el-dropdown-item command="show"><i class="cly-io cly-io-eye"></i>{{ i18n('crashes.action-view') }}</el-dropdown-item>
5656
<el-dropdown-item command="hide"><i class="cly-io cly-io-eye-off"></i>{{ i18n('crashes.action-hide') }}</el-dropdown-item>
5757
</cly-more-options>

plugins/plugins/frontend/public/templates/configurations.html

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,26 @@ <h3 v-if="config.groups.length > 1 || group.label" class="bu-my-4">
296296
</div>
297297
</div>
298298
</div>
299-
<cly-diff-helper :diff="diff" @discard="unpatch" @save="save"></cly-diff-helper>
299+
<cly-diff-helper :diff="diff" @discard="unpatch" @save="save" :isModal="true">
300+
<template v-slot:main>
301+
<div class="bu-mr-0 bu-is-flex bu-is-justify-content-flex-end bu-is-align-items-center cly-vue-user-selected" style="height: 100%;">
302+
<span class="selected-count-blue bu-pl-1 text-medium">
303+
<span style="background-color:#0166D6; color:white; padding:3px 7px; border-radius:4px;">{{diff.length}}</span>
304+
<span class="bu-is-lowercase text-medium color-cool-gray-50 bu-pl-1">{{ i18n("common.diff-helper.changes-made") }}</span>
305+
<span class="text-medium color-cool-gray-50">{{ i18n("common.diff-helper.keep") }}</span>
306+
</span>
307+
<span class="vertical-divider bu-mr-4 bu-ml-4"></span>
308+
<el-button skin="red" class="bu-mr-2" size="small" type="default" @click="save">
309+
<i class="cly-io-16 cly-io cly-io-save" style="font-size: larger;"></i>
310+
<span class="bu-ml-1">
311+
{{ i18n('dashboards.save-changes') }}
312+
</span>
313+
</el-button>
314+
<el-button class="x-button" @click="unpatch">
315+
<i class="cly-io-16 cly-io cly-io-x color-cool-gray-50"></i>
316+
</el-button>
317+
</div>
318+
</template>
319+
</cly-diff-helper>
300320
</cly-main>
301321
</div>

plugins/plugins/frontend/public/templates/plugins.html

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,26 @@
3939
</el-radio-group>
4040
</template>
4141
<template v-slot:bottomline="scope">
42-
<cly-diff-helper v-if="!loading" :diff="scope.diff" @discard="scope.unpatch()" @save="updateStatus(scope)">
42+
<cly-diff-helper v-if="!loading" :diff="scope.diff" @discard="scope.unpatch()" @save="updateStatus(scope)" :isModal="true">
43+
<template v-slot:main>
44+
<div class="bu-mr-0 bu-is-flex bu-is-justify-content-flex-end bu-is-align-items-center cly-vue-user-selected" style="height: 100%;">
45+
<span class="selected-count-blue bu-pl-1 text-medium">
46+
<span style="background-color:#0166D6; color:white; padding:3px 7px; border-radius:4px;">{{scope.diff.length}}</span>
47+
<span class="bu-is-lowercase text-medium color-cool-gray-50 bu-pl-1">{{ i18n("common.diff-helper.changes-made") }}</span>
48+
<span class="text-medium color-cool-gray-50">{{ i18n("common.diff-helper.keep") }}</span>
49+
</span>
50+
<span class="vertical-divider bu-mr-4 bu-ml-4"></span>
51+
<el-button skin="red" class="bu-mr-2" size="small" type="default" @click="updateStatus(scope)">
52+
<i class="cly-io-16 cly-io cly-io-save" style="font-size: larger;"></i>
53+
<span class="bu-ml-1">
54+
{{ i18n('dashboards.save-changes') }}
55+
</span>
56+
</el-button>
57+
<el-button class="x-button" @click="scope.unpatch()">
58+
<i class="cly-io-16 cly-io cly-io-x color-cool-gray-50"></i>
59+
</el-button>
60+
</div>
61+
</template>
4362
</cly-diff-helper>
4463
</template>
4564
</cly-datatable-n>

0 commit comments

Comments
 (0)