Skip to content

Commit f306a1b

Browse files
committed
new diff helper
1 parent 309b544 commit f306a1b

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

plugins/sdk/frontend/public/templates/config.html

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,34 @@ <h3 v-if="group.label" class="bu-mb-4" data-test-id="sdk-control-label">
172172
</form>
173173
</div>
174174
</div>
175-
<cly-diff-helper :diff="diff" @discard="unpatch" @save="save"></cly-diff-helper>
175+
<cly-diff-helper :diff="diff" :is-modal="true" :disabled="isSaving" :emit-save-when-disabled="false" @discard="unpatch"
176+
@save="save">
177+
<template v-slot:main>
178+
<div class="bu-mr-0 bu-is-flex bu-is-justify-content-flex-end bu-is-align-items-center cly-vue-user-selected"
179+
style="height: 100%;">
180+
<span class="selected-count-blue bu-pl-1 text-medium">
181+
<span
182+
style="background-color:#0166D6; color:white; padding:3px 7px; border-radius:4px;">{{diff.length}}</span>
183+
<span v-if="diff.length>1" class="bu-is-lowercase text-medium color-cool-gray-50 bu-pl-1">{{
184+
i18n("common.diff-helper.changes-made") }}</span>
185+
<span v-else class="bu-is-lowercase text-medium color-cool-gray-50 bu-pl-1">{{
186+
i18n("common.diff-helper.changes-made-single") }}</span>
187+
<span v-if="diff.length>1" class="text-medium color-cool-gray-50">{{ i18n("common.diff-helper.keep")
188+
}}</span>
189+
<span v-else class="text-medium color-cool-gray-50">{{ i18n("common.diff-helper.keep-single") }}</span>
190+
</span>
191+
<span class="vertical-divider bu-mr-4 bu-ml-4"></span>
192+
<el-button skin="red" class="bu-mr-2" size="small" type="default" @click="save()">
193+
<i class="cly-io-16 cly-io cly-io-save-disc" style="font-size: larger;"></i>
194+
<span class="bu-ml-1">
195+
{{ i18n('dashboards.save-changes') }}
196+
</span>
197+
</el-button>
198+
<el-button class="x-button" @click="unpatch()">
199+
<i class="cly-io-16 cly-io cly-io-x color-cool-gray-50"></i>
200+
</el-button>
201+
</div>
202+
</template>
203+
</cly-diff-helper>
176204
</cly-main>
177205
</div>

0 commit comments

Comments
 (0)