Skip to content

Commit 7a4ea90

Browse files
committed
Cleanup.
1 parent b169339 commit 7a4ea90

File tree

4 files changed

+63
-12
lines changed

4 files changed

+63
-12
lines changed

demo/bb.css

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,9 +735,47 @@
735735
}
736736

737737
.bb-feedback-dialog-success svg {
738-
width: 30px;
739-
height: 30px;
740-
object-fit: contain;
738+
width: 56px;
739+
height: 56px;
740+
border-radius: 50%;
741+
display: block;
742+
stroke-width: 2;
743+
stroke: #fff;
744+
stroke-miterlimit: 10;
745+
animation: bb-suc-fill 0.4s ease-in-out 0.4s forwards,
746+
bb-suc-scale 0.3s ease-in-out 0.9s both;
747+
}
748+
749+
.bb-feedback-dialog-success svg path {
750+
transform-origin: 50% 50%;
751+
stroke-dasharray: 48;
752+
stroke-dashoffset: 48;
753+
animation: bb-suc-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
754+
}
755+
756+
.bb-feedback-dialog-success svg circle {
757+
stroke-dasharray: 166;
758+
stroke-dashoffset: 166;
759+
stroke-width: 3;
760+
stroke-miterlimit: 10;
761+
fill: none;
762+
animation: bb-suc-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
763+
}
764+
765+
@keyframes bb-suc-stroke {
766+
100% {
767+
stroke-dashoffset: 0;
768+
}
769+
}
770+
771+
@keyframes bb-suc-scale {
772+
0%,
773+
100% {
774+
transform: none;
775+
}
776+
50% {
777+
transform: scale3d(1.1, 1.1, 1);
778+
}
741779
}
742780

743781
.bb-feedback-dialog-body {

demo/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const Gleap = window.Gleap;
22

3-
Gleap.setApiUrl("http://localhost:9000");
4-
Gleap.setWidgetUrl("http://localhost:9002");
3+
//Gleap.setApiUrl("http://localhost:9000");
4+
//Gleap.setWidgetUrl("http://localhost:9002");
55
Gleap.initialize("TRiC1FmOEt2N6KCUiLIetFHyyGyxfXYV");

src/Gleap.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,13 +1165,7 @@ class Gleap {
11651165
</svg>
11661166
</div>
11671167
<div class="bb-feedback-dialog-success">
1168-
<svg width="120px" height="92px" viewBox="0 0 120 92" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
1169-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
1170-
<g fill="${this.mainColor}" fill-rule="nonzero">
1171-
<path d="M107.553103,1.03448276 L101.669379,6.85344828 C81.2141379,27.3490345 62.5845517,47.5706897 42.7038621,67.7596552 L17.5535172,47.6517931 L11.088,42.4793793 L0.743172414,55.4104138 L38.2431724,85.4104138 L44.0621379,90.0010345 L49.2991034,84.764069 C71.5404828,62.4751034 91.5349655,40.4985517 113.437034,18.5571724 L119.256,12.6734483 L107.553103,1.03448276 Z" id="Path"></path>
1172-
</g>
1173-
</g>
1174-
</svg>
1168+
${loadIcon("success", this.mainColor)}
11751169
<div class="bb-feedback-dialog-info-text">${translateText(
11761170
feedbackOptions.thanksMessage
11771171
? feedbackOptions.thanksMessage

src/UI.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,18 @@ export const injectStyledCSS = (
7272
color: ${contrastBackgroundColor};
7373
border-radius: ${buttonBorderRadius}px;
7474
}
75+
.bb-feedback-dialog-success svg {
76+
box-shadow: inset 0px 0px 0px ${primaryColor};
77+
}
78+
79+
@keyframes bb-suc-fill {
80+
100% {
81+
box-shadow: inset 0px 0px 0px 30px ${primaryColor};
82+
}
83+
}
84+
.bb-feedback-dialog-success svg circle {
85+
stroke: ${primaryColor};
86+
}
7587
.bb-capture-preview-retrybutton:hover {
7688
background-color: ${backgroundColorHover};
7789
}
@@ -588,6 +600,13 @@ export const loadIcon = function (name, color) {
588600
</svg>`;
589601
}
590602

603+
if (name === "success") {
604+
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52">
605+
<circle cx="26" cy="26" r="25" fill="none"/>
606+
<path fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8"/>
607+
</svg>`;
608+
}
609+
591610
if (name === "blur") {
592611
return `<svg width="1200pt" height="1200pt" version="1.1" viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">
593612
<path class="bb-svg-path" d="m602.25 1200c238.2 0 435.95-193.26 435.95-435.95 0-269.66-220.23-615.73-435.95-764.05-220.23 161.8-440.45 485.39-440.45 764.05 0 242.7 197.75 435.95 440.45 435.95zm-260.68-382.02c0 112.36 89.887 206.74 206.74 206.74v62.922c-148.32 0-274.16-121.35-274.16-269.66z" fill="#333"/>

0 commit comments

Comments
 (0)