Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding payment support to the emulator #176

Merged
merged 15 commits into from
May 4, 2017
17 changes: 17 additions & 0 deletions src/client/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,20 @@ export const botFrameworkIcon = (className: string, size: number) => {
</svg>
`;
}

export const removeIcon = (className: string, size: number) => {
return `
<svg class="${className}" width="${size}px" height="${size}px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="Page-1">
<g id="x-large">
<g id="refresh">
<g id="close" transform="translate(6.000000, 6.000000)" stroke-width="1">
<path d="M0.486851205,0.486851205 L11.8005597,11.8005597" id="Line"></path>
<path d="M0.486851205,0.486851205 L11.8005597,11.8005597" id="Line" transform="translate(6.143705, 6.143705) scale(-1, 1) translate(-6.143705, -6.143705) "></path>
</g>
</g>
</g>
</g>
</svg>
`;
}
311 changes: 311 additions & 0 deletions src/client/css/emulator.css
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,16 @@
text-align: center;
}

.addressbar-payment {
position: absolute;
width: 42px;
height: 42px;
right: 84px;
top: 0;
line-height: 37px;
text-align: center;
}

.addressbar-menu {
position: absolute;
width: 42px;
Expand Down Expand Up @@ -522,6 +532,307 @@
color: #999;
}

/* checkout window */
.checkout-index {
height: 100%;
display: flex;
flex-direction: column;
}

.checkout-container {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
flex-grow: 1;
display: flex;
flex-direction: column;
padding: 20px;
border-top-color: darkgray;
border-top-style: solid;
border-top-width: 1px;
}

.checkout-table {
flex-grow: 1;
display: flex;
flex-direction: column;
}

.checkout-table .title-container {
display: flex;
}

.checkout-table .title {
font-size: 16px;
font-weight: 500;
margin-bottom: 10px;
flex-grow: 1;
}

.checkout-table .fixed-right {
margin-left: 132px;
}

.checkout-table .checkout-form {
flex-grow: 1;
}

.checkout-table .checkout-field {
display: flex;
flex-direction: row;
}

.checkout-table .checkout-label {
color: #666;
font-size: 13px;
align-self: center;
min-width: 120px;
text-align: right;
margin-right: 8px;
}

.checkout-table .checkout-input {
background-color: #EEE;
font-size: 14px;
margin-top: 4px;
margin-bottom: 4px;
margin-left: 4px;
min-height: 40px;
flex-grow: 1;
border-width: 0px;
border-radius: 0;
padding-left: 10px;
padding-right: 10px;
text-overflow: ellipsis;
}

.checkout-table .checkout-button-bar {
display: flex;
flex-direction: row;
}

.checkout-table .button {
min-height: 28px;
text-align: center;
font-size: 14px;
display: flex;
flex-direction: column;
justify-content: center;
margin-top: 10px;
flex-grow: 1;
cursor: pointer;
}

.checkout-table .primary-button {
color: white;
background: #3A96DD;
}

.checkout-table .primary-button:hover {
background: #0063B1;
}

.checkout-table .primary-button:active {
background: #4C4C4C;
}

.checkout-table .secondary-button {
color: white;
background: #ababab;
}

.checkout-table .secondary-button:hover {
background: #0063B1;
}

.checkout-table .secondary-button:active {
background: #4C4C4C;
}

.checkout-table .cancel-button {
margin-right: 20px;
}

.checkout-table .total-line {
display: flex;
align-items: center;
}

.checkout-table .total-label-container {
flex-grow: 1;
display: flex;
}

.checkout-table .total-label {
font-weight: 600;
margin-right: 8px;
}

.checkout-table .total-value {
font-size: 20px;
}

.checkout-table .show-details {
color: #3A96DD;
cursor: pointer;
}

.checkout-table .show-details:hover {
color: #0063B1;
}

.checkout-table .show-details:active {
color: #4C4C4C;
}

.checkout-table .line-items {
border-top-style: solid;
border-top-width: 1px;
border-top-color: #999;
border-bottom-style: solid;
border-bottom-width: 1px;
border-bottom-color: #999;
margin-top: 10px;
margin-bottom: 10px;
}

.checkout-table .line-item {
display: flex;
align-items: center;
margin-top: 4px;
margin-bottom: 4px;
flex-grow: 1;
}

.checkout-table .item-label {
flex-grow: 1;
}

.checkout-table .not-final {
font-size: 12px;
}

.checkout-table .checkout-selector {
cursor: pointer;
display: flex;
align-items: center;
background-color: #EEE;
font-size: 14px;
margin-top: 4px;
margin-bottom: 4px;
margin-left: 4px;
min-height: 40px;
flex-grow: 1;
border-width: 0px;
border-radius: 0;
text-overflow: ellipsis;
}

.checkout-table .selected-item-label-container {
flex-grow: 1;
display: flex;
flex-direction: row;
}

.checkout-table .placeholder-text {
color: #666;
margin-left: 10px;
}

.checkout-table .selected-item-label {
flex-grow: 1;
}

.checkout-table .down-chevron {
margin-right: 10px;
width: 20px;
align-self: center;
color: #666;
font-size: 10px;
}

.checkout-table .selector-items {
border-color: #BBB;
border-style: solid;
border-width: 1px;
z-index: 10;
animation-duration: 0.25s;
animation-timing-function: ease-out;
transform-origin: top;
position: absolute;
background: white;
max-height: 300px;
overflow-y: auto;
}

.checkout-table .selector-item-container {
display: flex;
}

.checkout-table .selector-item {
display: flex;
flex-grow: 1;
align-items: center;
min-height: 40px;
}

.checkout-table .selector-item-container:hover {
background-color: #EEE;
}

.checkout-table .selector-item-container:active {
background-color: #BBB;
}

.checkout-table .remove-item {
display: flex;
align-items: center;
stroke: black;
margin-right: 10px
}

.checkout-table .grow {
animation-name: show;
}

@keyframes show {
0% {transform: scaleY(0); offset: 0;}
100% {transform: scaleY(-100%); offset: 1; }
}

.checkout-table .add-item {
color: #3A96DD;
margin-left: 10px;
margin-right: 10px;
}

.checkout-table .validation-error {
color: #FF4444;
margin-left: 10px;
margin-right: 10px;
}

.checkout-table .invalid-input {
background-color: pink;
}

.shipping-method {
margin-left: 10px;
margin-right: 10px;
}

.credit-card {
margin-left: 10px;
margin-right: 10px;
}

.shipping-address {
margin: 10px;
}

.postal-code-input {
width: 140px;
flex-grow: 0;
}

/* base classes */

.fill-parent {
Expand Down
Loading