Styled auth and login endpoints

This commit is contained in:
Mike Jolley 2015-05-14 16:58:34 +01:00
parent 9a30f40d69
commit d53f78ed56
18 changed files with 260 additions and 45 deletions

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
body{margin:100px auto 24px;box-shadow:none;background:#f1f1f1;padding:0}#wc-logo{border:0;margin:0 0 24px;padding:0;text-align:center}#wc-logo img{max-width:50%}.wc-auth-content{box-shadow:0 1px 3px rgba(0,0,0,.13);padding:24px 24px 0;background:#fff;overflow:hidden;zoom:1}.wc-auth-content h1,.wc-auth-content h2,.wc-auth-content h3,.wc-auth-content table{margin:0 0 24px;border:0;padding:0;color:#666;clear:none}.wc-auth-content p,.wc-auth-content ul{margin:0 0 24px;font-size:1em;line-height:1.75em;color:#666}.wc-auth-content p{padding:0}.wc-auth-content a{color:#A16696}.wc-auth-content a:focus,.wc-auth-content a:hover{color:#111}.wc-auth-content .wc-auth-login label{display:block;margin-bottom:.5em;color:#999}.wc-auth-content .wc-auth-login input{font-size:1.3em;padding:.5em;width:100%;box-sizing:border-box}.wc-auth-content .wc-auth-login .wc-auth-actions{padding:0}.wc-auth-content .wc-auth-login .wc-auth-actions .wc-auth-login-button{width:100%;float:none}.wc-auth-permissions{padding:0;list-style:disc inside}.wc-auth-permissions li{font-size:1em}.wc-auth-logged-in-as{border-bottom:2px solid #eee;background:#f5f5f5;padding:0 1em 0 0;margin:0 0 24px;line-height:70px}.wc-auth-logged-in-as p{margin:0;line-height:70px}.wc-auth-logged-in-as img{float:left;height:70px;margin:0 1em 0 0}.wc-auth-logged-in-as .wc-auth-logout{float:right}.wc-auth .wc-auth-actions{overflow:hidden;padding-left:24px}.wc-auth .wc-auth-actions .button{float:right;font-size:1.25em;padding:1em 2em;line-height:1em;height:auto;width:50%;box-sizing:border-box;text-align:center;background:#f7f7f7;border:1px solid #d7d7d7;color:#777;border-bottom-width:2px}.wc-auth .wc-auth-actions .button:focus,.wc-auth .wc-auth-actions .button:hover{background:#fcfcfc}.wc-auth .wc-auth-actions .button-primary{float:right;opacity:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 rgba(0,0,0,.15);background:#AD6EA1;border-color:#A16696;color:#fff}.wc-auth .wc-auth-actions .button-primary:focus,.wc-auth .wc-auth-actions .button-primary:hover{background:#B472A8;color:#fff}.wc-auth .wc-auth-actions .wc-auth-approve{float:right}.wc-auth .wc-auth-actions .wc-auth-deny{float:left;margin-left:-24px}

View File

@ -0,0 +1,131 @@
body {
margin: 100px auto 24px;
box-shadow: none;
background: #f1f1f1;
padding: 0;
}
#wc-logo {
border: 0;
margin: 0 0 24px;
padding: 0;
text-align: center;
img {
max-width: 50%;
}
}
.wc-auth-content {
box-shadow: 0 1px 3px rgba(0,0,0,0.13);
padding: 24px 24px 0;
background: #fff;
overflow: hidden;
zoom: 1;
h1, h2, h3, table {
margin: 0 0 24px;
border: 0;
padding: 0;
color: #666;
clear: none;
}
p, ul {
margin: 0 0 24px;
font-size: 1em;
line-height: 1.75em;
color: #666;
}
p {
padding: 0;
}
a {
color: #A16696;
&:hover, &:focus {
color: #111;
}
}
.wc-auth-login {
label {
display: block;
margin-bottom: .5em;
color: #999;
}
input {
font-size: 1.3em;
padding: .5em;
width: 100%;
box-sizing: border-box;
}
.wc-auth-actions {
padding: 0;
.wc-auth-login-button {
width: 100%;
float: none;
}
}
}
}
.wc-auth-permissions {
padding: 0;
list-style: disc inside;
li {
font-size: 1em;
}
}
.wc-auth-logged-in-as {
border-bottom: 2px solid #eee;
background: #f5f5f5;
padding: 0 1em 0 0;
margin: 0 0 24px;
line-height: 70px;
p {
margin: 0;
line-height: 70px;
}
img {
float: left;
height: 70px;
margin: 0 1em 0 0;
}
.wc-auth-logout {
float: right;
}
}
.wc-auth .wc-auth-actions {
overflow: hidden;
padding-left: 24px;
.button {
float: right;
font-size: 1.25em;
padding: 1em 2em;
line-height: 1em;
height: auto;
width: 50%;
box-sizing: border-box;
text-align: center;
background: #f7f7f7;
border: 1px solid #d7d7d7;
color: #777;
border-bottom-width: 2px;
&:hover, &:focus {
background: #fcfcfc;
}
}
.button-primary {
float: right;
opacity: 1;
-webkit-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 0 rgba( 0, 0, 0, 0.15 );
box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 0 rgba( 0, 0, 0, 0.15 );
background: #AD6EA1;
border-color: #A16696;
color: #fff;
&:hover, &:focus {
background: #B472A8;
color: #fff;
}
}
.wc-auth-approve {
float: right;
}
.wc-auth-deny {
float: left;
margin-left: -24px;
}
}

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}ul.woocommerce_stats{overflow:hidden;zoom:1}ul.woocommerce_stats li{width:25%;padding:0 1em;float:left;font-size:.8em;border-left:1px solid #fff;border-right:1px solid #ececec;text-align:center;box-sizing:border-box}ul.woocommerce_stats li:first-child{border-left:0}ul.woocommerce_stats li:last-child{border-right:0}ul.woocommerce_stats strong{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:4em;line-height:1.2em;font-weight:400;text-align:center;display:block}#woocommerce_dashboard_status .inside{padding:0;margin:0}#woocommerce_dashboard_status .wc_status_list{overflow:hidden;margin:0}#woocommerce_dashboard_status .wc_status_list li{width:50%;float:left;padding:0;box-sizing:border-box;margin:0;border-top:1px solid #ececec;color:#aaa}#woocommerce_dashboard_status .wc_status_list li a{display:block;color:#aaa;padding:9px 12px;-webkit-transition:all ease .5s;position:relative;font-size:12px}#woocommerce_dashboard_status .wc_status_list li a .wc_sparkline{width:4em;height:2em;display:block;float:right;position:absolute;right:0;top:50%;margin-right:12px;margin-top:-1.25em}#woocommerce_dashboard_status .wc_status_list li a strong{font-size:18px;line-height:1.2em;font-weight:400;display:block;color:#21759b}#woocommerce_dashboard_status .wc_status_list li a:hover{color:#2ea2cc}#woocommerce_dashboard_status .wc_status_list li a:hover strong,#woocommerce_dashboard_status .wc_status_list li a:hover:before{color:#2ea2cc!important}#woocommerce_dashboard_status .wc_status_list li a:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0 12px 12px 0;text-indent:0;top:0;left:0;height:100%;text-align:center;content:"";font-size:2em;position:relative;width:auto;line-height:1.2em;color:#464646;float:left}#woocommerce_dashboard_status .wc_status_list li:first-child{border-top:0}#woocommerce_dashboard_status .wc_status_list li.sales-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li.sales-this-month a:before{content:"\e01f"}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month a:before{content:"\e006"}#woocommerce_dashboard_status .wc_status_list li.processing-orders{border-right:1px solid #ececec}#woocommerce_dashboard_status .wc_status_list li.processing-orders a:before{content:"\e011";color:#7ad03a}#woocommerce_dashboard_status .wc_status_list li.on-hold-orders a:before{content:"\e033";color:#999}#woocommerce_dashboard_status .wc_status_list li.low-in-stock{border-right:1px solid #ececec}#woocommerce_dashboard_status .wc_status_list li.low-in-stock a:before{content:"\e02c";color:#ffba00}#woocommerce_dashboard_status .wc_status_list li.out-of-stock a:before{content:"\e02c";color:#a00}#woocommerce_dashboard_recent_reviews li{line-height:1.5em;margin-bottom:12px}#woocommerce_dashboard_recent_reviews h4.meta{line-height:1.4;margin:-.2em 0 0;font-weight:400;color:#999}#woocommerce_dashboard_recent_reviews blockquote{padding:0;margin:0}#woocommerce_dashboard_recent_reviews .avatar{float:left;margin:0 10px 5px 0}#woocommerce_dashboard_recent_reviews .star-rating{float:right;overflow:hidden;position:relative;height:1.5em;line-height:1.5;margin-left:.5em;width:5.4em;font-family:WooCommerce!important}#woocommerce_dashboard_recent_reviews .star-rating:before{content:"\e021\e021\e021\e021\e021";color:#b3b3b3;float:left;top:0;left:0;position:absolute;letter-spacing:.1em}#woocommerce_dashboard_recent_reviews .star-rating span{overflow:hidden;float:left;top:0;left:0;position:absolute;padding-top:1.5em}#woocommerce_dashboard_recent_reviews .star-rating span:before{content:"\e020\e020\e020\e020\e020";top:0;position:absolute;left:0;letter-spacing:.1em;color:#9c5d90}#dash-right-now li.product-count a:before{font-family:WooCommerce;content:"\e01d"}
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix)format("embedded-opentype"),url(../fonts/star.woff)format("woff"),url(../fonts/star.ttf)format("truetype"),url(../fonts/star.svg#star)format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix)format("embedded-opentype"),url(../fonts/WooCommerce.woff)format("woff"),url(../fonts/WooCommerce.ttf)format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce)format("svg");font-weight:400;font-style:normal}ul.woocommerce_stats{overflow:hidden;zoom:1}ul.woocommerce_stats li{width:25%;padding:0 1em;float:left;font-size:.8em;border-left:1px solid #fff;border-right:1px solid #ececec;text-align:center;box-sizing:border-box}ul.woocommerce_stats li:first-child{border-left:0}ul.woocommerce_stats li:last-child{border-right:0}#woocommerce_dashboard_status .wc_status_list li.low-in-stock,#woocommerce_dashboard_status .wc_status_list li.processing-orders{border-right:1px solid #ececec}ul.woocommerce_stats strong{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:4em;line-height:1.2em;font-weight:400;text-align:center;display:block}#woocommerce_dashboard_status .inside{padding:0;margin:0}#woocommerce_dashboard_status .wc_status_list{overflow:hidden;margin:0}#woocommerce_dashboard_status .wc_status_list li{width:50%;float:left;padding:0;box-sizing:border-box;margin:0;border-top:1px solid #ececec;color:#aaa}#woocommerce_dashboard_status .wc_status_list li a{display:block;color:#aaa;padding:9px 12px;-webkit-transition:all ease .5s;position:relative;font-size:12px}#woocommerce_dashboard_status .wc_status_list li a .wc_sparkline{width:4em;height:2em;display:block;float:right;position:absolute;right:0;top:50%;margin-right:12px;margin-top:-1.25em}#woocommerce_dashboard_status .wc_status_list li a strong{font-size:18px;line-height:1.2em;font-weight:400;display:block;color:#21759b}#woocommerce_dashboard_status .wc_status_list li a:hover{color:#2ea2cc}#woocommerce_dashboard_status .wc_status_list li a:hover strong,#woocommerce_dashboard_status .wc_status_list li a:hover:before{color:#2ea2cc!important}#woocommerce_dashboard_status .wc_status_list li a:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0 12px 12px 0;text-indent:0;top:0;left:0;height:100%;text-align:center;content:"";font-size:2em;position:relative;width:auto;line-height:1.2em;color:#464646;float:left}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month,#woocommerce_dashboard_status .wc_status_list li.sales-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li:first-child{border-top:0}#woocommerce_dashboard_status .wc_status_list li.sales-this-month a:before{content:"\e01f"}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month a:before{content:"\e006"}#woocommerce_dashboard_status .wc_status_list li.processing-orders a:before{content:"\e011";color:#7ad03a}#woocommerce_dashboard_status .wc_status_list li.on-hold-orders a:before{content:"\e033";color:#999}#woocommerce_dashboard_status .wc_status_list li.low-in-stock a:before{content:"\e02c";color:#ffba00}#woocommerce_dashboard_status .wc_status_list li.out-of-stock a:before{content:"\e02c";color:#a00}#woocommerce_dashboard_recent_reviews li{line-height:1.5em;margin-bottom:12px}#woocommerce_dashboard_recent_reviews h4.meta{line-height:1.4;margin:-.2em 0 0;font-weight:400;color:#999}#woocommerce_dashboard_recent_reviews blockquote{padding:0;margin:0}#woocommerce_dashboard_recent_reviews .avatar{float:left;margin:0 10px 5px 0}#woocommerce_dashboard_recent_reviews .star-rating{float:right;overflow:hidden;position:relative;height:1.5em;line-height:1.5;margin-left:.5em;width:5.4em;font-family:WooCommerce!important}#woocommerce_dashboard_recent_reviews .star-rating:before{content:"\e021\e021\e021\e021\e021";color:#b3b3b3;float:left;top:0;left:0;position:absolute;letter-spacing:.1em}#woocommerce_dashboard_recent_reviews .star-rating span{overflow:hidden;float:left;top:0;left:0;position:absolute;padding-top:1.5em}#woocommerce_dashboard_recent_reviews .star-rating span:before{content:"\e020\e020\e020\e020\e020";top:0;position:absolute;left:0;letter-spacing:.1em;color:#9c5d90}#dash-right-now li.product-count a:before{font-family:WooCommerce;content:"\e01d"}

View File

@ -1 +1 @@
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}#adminmenu #toplevel_page_woocommerce .menu-icon-generic div.wp-menu-image:before{font-family:WooCommerce!important;content:"\e03d";font-size:1.3em!important}#adminmenu #menu-posts-product .menu-icon-post div.wp-menu-image:before{font-family:WooCommerce!important;content:"\e01d";font-size:1.3em!important}#adminmenu #toplevel_page_wc-reports .menu-icon-generic div.wp-menu-image:before{font-family:WooCommerce!important;content:"\e023";font-size:1.3em!important}span.mce_woocommerce_shortcodes_button{background-image:none!important;display:block;text-indent:-9999px;position:relative;height:1em;width:1em}span.mce_woocommerce_shortcodes_button:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";font-size:.9em;line-height:1.2}.wc_plugin_upgrade_notice{font-weight:400;color:#fff;background:#d54d21;padding:1em;margin:9px 0}.wc_plugin_upgrade_notice a{color:#fff;text-decoration:underline}.wc_plugin_upgrade_notice:before{content:"\f348";display:inline-block;font:400 18px/1 dashicons;speak:none;margin:0 8px 0 -2px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix)format("embedded-opentype"),url(../fonts/star.woff)format("woff"),url(../fonts/star.ttf)format("truetype"),url(../fonts/star.svg#star)format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix)format("embedded-opentype"),url(../fonts/WooCommerce.woff)format("woff"),url(../fonts/WooCommerce.ttf)format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce)format("svg");font-weight:400;font-style:normal}#adminmenu #toplevel_page_woocommerce .menu-icon-generic div.wp-menu-image:before{font-family:WooCommerce!important;content:"\e03d";font-size:1.3em!important}#adminmenu #menu-posts-product .menu-icon-post div.wp-menu-image:before{font-family:WooCommerce!important;content:"\e01d";font-size:1.3em!important}#adminmenu #toplevel_page_wc-reports .menu-icon-generic div.wp-menu-image:before{font-family:WooCommerce!important;content:"\e023";font-size:1.3em!important}span.mce_woocommerce_shortcodes_button{background-image:none!important;display:block;text-indent:-9999px;position:relative;height:1em;width:1em}span.mce_woocommerce_shortcodes_button:before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";font-size:.9em;line-height:1.2}.wc_plugin_upgrade_notice{font-weight:400;color:#fff;background:#d54d21;padding:1em;margin:9px 0}.wc_plugin_upgrade_notice a{color:#fff;text-decoration:underline}.wc_plugin_upgrade_notice:before{content:"\f348";display:inline-block;font:400 18px/1 dashicons;speak:none;margin:0 8px 0 -2px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 998 810" enable-background="new 0 0 998 810" xml:space="preserve">
<g>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#9B5C8F" d="M160.7,331.2h199.1c12.6,0,22.8,10.2,22.8,22.8V430
c0,12.6-10.2,22.8-22.8,22.8h-71.4l9.8,24l-43.1-24h-94.3c-12.6,0-22.8-10.2-22.8-22.8V354C137.9,341.5,148.1,331.2,160.7,331.2z"
/>
<path fill="#FFFFFF" d="M150.2,351.9c1.4-1.9,3.5-2.9,6.3-3.1c5.1-0.4,8,2,8.7,7.2c3.1,20.9,6.5,38.6,10.1,53.1l21.9-41.7
c2-3.8,4.5-5.8,7.5-6c4.4-0.3,7.1,2.5,8.2,8.4c2.5,13.3,5.7,24.6,9.5,34.2c2.6-25.4,7-43.7,13.2-55c1.5-2.8,3.7-4.2,6.6-4.4
c2.3-0.2,4.4,0.5,6.3,2c1.9,1.5,2.9,3.4,3.1,5.7c0.1,1.8-0.2,3.3-1,4.8c-3.9,7.2-7.1,19.3-9.7,36.1c-2.5,16.3-3.4,29-2.8,38.1
c0.2,2.5-0.2,4.7-1.2,6.6c-1.2,2.2-3,3.4-5.3,3.6c-2.6,0.2-5.3-1-7.9-3.7c-9.3-9.5-16.7-23.7-22.1-42.6
c-6.5,12.8-11.3,22.4-14.4,28.8c-5.9,11.3-10.9,17.1-15.1,17.4c-2.7,0.2-5-2.1-7-6.9c-5.1-13.1-10.6-38.4-16.5-75.9
C148.3,356,148.8,353.7,150.2,351.9z"/>
<path fill="#FFFFFF" d="M365.2,367.6c-3.6-6.3-8.9-10.1-16-11.6c-1.9-0.4-3.7-0.6-5.4-0.6c-9.6,0-17.4,5-23.5,15
c-5.2,8.5-7.8,17.9-7.8,28.2c0,7.7,1.6,14.3,4.8,19.8c3.6,6.3,8.9,10.1,16,11.6c1.9,0.4,3.7,0.6,5.4,0.6c9.7,0,17.5-5,23.5-15
c5.2-8.6,7.8-18,7.8-28.3C370,379.5,368.4,373,365.2,367.6L365.2,367.6z M352.6,395.3c-1.4,6.6-3.9,11.5-7.6,14.8
c-2.9,2.6-5.6,3.7-8.1,3.2c-2.4-0.5-4.4-2.6-5.9-6.5c-1.2-3.1-1.8-6.2-1.8-9.1c0-2.5,0.2-5,0.7-7.3c0.9-4.1,2.6-8.1,5.3-11.9
c3.3-4.9,6.8-6.9,10.4-6.2c2.4,0.5,4.4,2.6,5.9,6.5c1.2,3.1,1.8,6.2,1.8,9.1C353.3,390.5,353,393,352.6,395.3L352.6,395.3z"/>
<path fill="#FFFFFF" d="M302.5,367.6c-3.6-6.3-9-10.1-16-11.6c-1.9-0.4-3.7-0.6-5.4-0.6c-9.6,0-17.4,5-23.5,15
c-5.2,8.5-7.8,17.9-7.8,28.2c0,7.7,1.6,14.3,4.8,19.8c3.6,6.3,8.9,10.1,16,11.6c1.9,0.4,3.7,0.6,5.4,0.6c9.7,0,17.5-5,23.5-15
c5.2-8.6,7.8-18,7.8-28.3C307.3,379.5,305.7,373,302.5,367.6L302.5,367.6z M289.9,395.3c-1.4,6.6-3.9,11.5-7.6,14.8
c-2.9,2.6-5.6,3.7-8.1,3.2c-2.4-0.5-4.4-2.6-5.9-6.5c-1.2-3.1-1.8-6.2-1.8-9.1c0-2.5,0.2-5,0.7-7.3c0.9-4.1,2.6-8.1,5.3-11.9
c3.3-4.9,6.8-6.9,10.4-6.2c2.4,0.5,4.4,2.6,5.9,6.5c1.2,3.1,1.8,6.2,1.8,9.1C290.6,390.5,290.4,393,289.9,395.3L289.9,395.3z"/>
<g>
<g>
<path d="M407.9,366.7c-6.7,6.6-10,15-10,25.2c0,10.9,3.3,19.8,9.9,26.5c6.6,6.7,15.2,10.1,25.9,10.1c3.1,0,6.6-0.5,10.4-1.6
v-16.2c-3.5,1-6.5,1.5-9.1,1.5c-5.3,0-9.5-1.8-12.7-5.3c-3.2-3.6-4.8-8.4-4.8-14.5c0-5.7,1.6-10.4,4.7-14
c3.2-3.7,7.1-5.5,11.9-5.5c3.1,0,6.4,0.5,10,1.5v-16.2c-3.3-0.9-7-1.3-10.9-1.3C423,356.8,414.6,360.1,407.9,366.7z M477.3,356.8
c-9.2,0-16.4,3.1-21.6,9.2c-5.2,6.1-7.7,14.7-7.7,25.7c0,11.9,2.6,21,7.7,27.3c5.1,6.3,12.6,9.5,22.4,9.5
c9.5,0,16.8-3.2,21.9-9.5c5.1-6.3,7.7-15.2,7.7-26.6c0-11.4-2.6-20.2-7.8-26.4C494.6,359.9,487.1,356.8,477.3,356.8z
M485.2,408.8c-1.8,2.8-4.5,4.2-7.9,4.2c-3.2,0-5.6-1.4-7.3-4.2c-1.7-2.8-2.5-8.4-2.5-16.9c0-13.1,3.3-19.6,10-19.6
c7,0,10.6,6.6,10.6,19.9C488,400.4,487,406,485.2,408.8z M557.1,358.7l-3.6,15.3c-0.9,3.9-1.8,7.9-2.6,12l-2,10.6
c-1.9-10.6-4.5-23.2-7.8-37.9h-23.2l-8.7,68.1h17.4l4.7-46.9l11.9,46.9h12.4L567,380l4.9,46.8h18.2l-9.2-68.1H557.1z
M640.4,358.7l-3.6,15.3c-0.9,3.9-1.8,7.9-2.6,12l-2,10.6c-1.9-10.6-4.5-23.2-7.8-37.9h-23.2l-8.7,68.1h17.4l4.7-46.9l11.9,46.9
h12.4l11.3-46.8l4.9,46.8h18.2l-9.2-68.1H640.4z M697,399.9h16.3v-14.1H697v-12.5h18.8v-14.5h-37.2v68.1h37.3v-14.5H697V399.9z
M767.7,389.1c1.9-3.1,2.9-6.3,2.9-9.6c0-6.4-2.5-11.5-7.5-15.2c-5-3.7-11.9-5.6-20.5-5.6h-21.4v68.1h18.4v-31h0.3l14.9,31h19.4
l-14.7-30.7C763,394.5,765.8,392.2,767.7,389.1z M739.5,388v-16.2c4.4,0.1,7.5,0.8,9.4,2.2c1.9,1.4,2.8,3.6,2.8,6.8
C751.7,385.5,747.6,387.9,739.5,388z M781.4,366.7c-6.7,6.6-10,15-10,25.2c0,10.9,3.3,19.8,9.9,26.5c6.6,6.7,15.2,10.1,25.9,10.1
c3.1,0,6.6-0.5,10.4-1.6v-16.2c-3.5,1-6.5,1.5-9.1,1.5c-5.3,0-9.5-1.8-12.7-5.3c-3.2-3.6-4.8-8.4-4.8-14.5c0-5.7,1.6-10.4,4.7-14
c3.2-3.7,7.1-5.5,11.9-5.5c3.1,0,6.4,0.5,10,1.5v-16.2c-3.3-0.9-7-1.3-10.9-1.3C796.6,356.8,788.1,360.1,781.4,366.7z
M841.1,412.2v-12.4h16.3v-14.1h-16.3v-12.5H860v-14.5h-37.2v68.1h37.3v-14.5H841.1z"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -51,7 +51,6 @@ class WC_Auth {
public function add_query_vars( $vars ) {
$vars[] = 'wc-auth-version';
$vars[] = 'wc-auth-route';
return $vars;
}
@ -83,6 +82,38 @@ class WC_Auth {
return $permissions[ $scope ];
}
/**
* Return a list of permissions a scope allows
* @param string $scope
* @return array
*/
protected function get_permissions_in_scope( $scope ) {
$permissions = array();
switch ( $scope ) {
case 'read' :
$permissions[] = __( 'View coupons', 'woocommerce' );
$permissions[] = __( 'View customers', 'woocommerce' );
$permissions[] = __( 'View orders and sales reports', 'woocommerce' );
$permissions[] = __( 'View products', 'woocommerce' );
break;
case 'write' :
$permissions[] = __( 'Create webhooks', 'woocommerce' );
$permissions[] = __( 'Create coupons', 'woocommerce' );
$permissions[] = __( 'Create customers', 'woocommerce' );
$permissions[] = __( 'Create orders', 'woocommerce' );
$permissions[] = __( 'Create products', 'woocommerce' );
break;
case 'read_write' :
$permissions[] = __( 'Create webhooks', 'woocommerce' );
$permissions[] = __( 'View and manage coupons', 'woocommerce' );
$permissions[] = __( 'View and manage customers', 'woocommerce' );
$permissions[] = __( 'View and manage orders and sales reports', 'woocommerce' );
$permissions[] = __( 'View and manage products', 'woocommerce' );
break;
}
return $permissions;
}
/**
* Build auth urls
*
@ -285,10 +316,11 @@ class WC_Auth {
'app_name' => $_REQUEST['app_name'],
'return_url' => add_query_arg( array( 'success' => 0, 'user_id' => wc_clean( $_REQUEST['user_id'] ) ), urldecode( $_REQUEST['return_url'] ) ),
'scope' => $this->get_i18n_scope( wc_clean( $_REQUEST['scope'] ) ),
'permissions' => $this->get_permissions_in_scope( wc_clean( $_REQUEST['scope'] ) ),
'granted_url' => wp_nonce_url( $this->build_url( $_REQUEST, 'access_granted' ), 'wc_auth_grant_access', 'wc_auth_nonce' ),
'logout_url' => wp_logout_url( $this->build_url( $_REQUEST, 'login' ) )
'logout_url' => wp_logout_url( $this->build_url( $_REQUEST, 'login' ) ),
'user' => wp_get_current_user()
) );
exit;
// Granted access endpoint

View File

@ -12,6 +12,6 @@ if ( ! defined( 'ABSPATH' ) ) {
}
?>
</div>
</body>
</html>

View File

@ -6,29 +6,33 @@
* @package WooCommerce/Templates/Auth
* @version 2.4.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$user = wp_get_current_user();
?>
<?php do_action( 'woocommerce_auth_page_header' ); ?>
<h1><?php printf( __( 'Grant "%s" permissions to "%s".', 'woocommerce' ), esc_html( $scope ), wc_clean( $app_name ) ); ?></h1>
<h1><?php printf( __( '%s would like to connect to your store' , 'woocommerce' ), esc_html( $app_name ) ); ?></h1>
<?php wc_print_notices(); ?>
<?php wc_print_notices(); ?>
<p><?php printf( __( 'This will give "%s" <strong>%s</strong> access which will allow it to:' , 'woocommerce' ), esc_html( $app_name ), esc_html( $scope ) ); ?></p>
<ul class="wc-auth-permissions">
<?php foreach ( $permissions as $permission ) : ?>
<li><?php echo esc_html( $permission ); ?></li>
<?php endforeach; ?>
</ul>
<div class="wc-auth-logged-in-as">
<?php echo get_avatar( $user->ID, 70 ); ?>
<p><?php printf( __( 'Logged in as %s', 'woocommerce' ), esc_html( $user->display_name ) ); ?> <a href="<?php echo esc_url( $logout_url ); ?>" class="wc-auth-logout"><?php _e( 'Logout', 'woocommerce' ); ?></a>
</div>
<p><?php printf( __( 'Logged in as %s.', 'woocommerce' ), wc_clean( $user->display_name ) ); ?></p>
<a href="<?php echo esc_url( $granted_url ); ?>" class="button button-primary"><?php _e( 'Authorize', 'woocommerce' ); ?></a>
<p><?php printf( __( 'Not %s? %s', 'woocommerce' ), wc_clean( $user->display_name ), '<a href="' . esc_url( $logout_url ) . '">' . __( 'Logout', 'woocommerce' ) . '</a>' ); ?></p>
<a href="<?php echo esc_url( $return_url ); ?>"><?php printf( __( 'Return To %s', 'woocommerce' ), wc_clean( $app_name ) ); ?></a>
<p class="wc-auth-actions">
<a href="<?php echo esc_url( $granted_url ); ?>" class="button button-primary wc-auth-approve"><?php _e( 'Approve', 'woocommerce' ); ?></a>
<a href="<?php echo esc_url( $return_url ); ?>" class="button wc-auth-deny"><?php _e( 'Deny', 'woocommerce' ); ?></a>
</p>
<?php do_action( 'woocommerce_auth_page_footer' ); ?>

View File

@ -15,28 +15,26 @@ if ( ! defined( 'ABSPATH' ) ) {
<?php do_action( 'woocommerce_auth_page_header' ); ?>
<h1><?php printf( __( 'Login To %s', 'woocommerce' ), esc_html( get_bloginfo( 'name' ) ) ); ?></h1>
<h1><?php printf( __( '%s would like to connect to your store' , 'woocommerce' ), esc_html( $app_name ) ); ?></h1>
<?php wc_print_notices(); ?>
<?php wc_print_notices(); ?>
<form method="post" class="login">
<p class="form-row form-row-wide">
<label for="username"><?php _e( 'Username or email address', 'woocommerce' ); ?> <span class="required">*</span></label>
<input type="text" class="input-text" name="username" id="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" />
</p>
<p class="form-row form-row-wide">
<label for="password"><?php _e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
<input class="input-text" type="password" name="password" id="password" />
</p>
<p class="form-row">
<?php wp_nonce_field( 'woocommerce-login' ); ?>
<input type="submit" class="button" name="login" value="<?php _e( 'Login', 'woocommerce' ); ?>" />
</p>
<p><?php printf( __( 'To connect to %1$s you need to be logged in. Log in to your store below, or %2$scancel and return to %1$s%3$s', 'woocommerce' ), wc_clean( $app_name ), '<a href="' . esc_url( $return_url ) . '">', '</a>' ); ?></p>
<form method="post" class="wc-auth-login">
<p class="form-row form-row-wide">
<label for="username"><?php _e( 'Username or email address', 'woocommerce' ); ?> <span class="required">*</span></label>
<input type="text" class="input-text" name="username" id="username" value="<?php echo ( ! empty( $_POST['username'] ) ) ? esc_attr( $_POST['username'] ) : ''; ?>" />
</p>
<p class="form-row form-row-wide">
<label for="password"><?php _e( 'Password', 'woocommerce' ); ?> <span class="required">*</span></label>
<input class="input-text" type="password" name="password" id="password" />
</p>
<p class="wc-auth-actions">
<?php wp_nonce_field( 'woocommerce-login' ); ?>
<input type="submit" class="button button-large button-primary wc-auth-login-button" name="login" value="<?php _e( 'Login', 'woocommerce' ); ?>" />
<input type="hidden" name="redirect" value="<?php echo esc_url( $redirect_url ); ?>" />
</form>
<a href="<?php echo esc_url( $return_url ); ?>"><?php printf( __( 'Return To %s', 'woocommerce' ), wc_clean( $app_name ) ); ?></a>
</p>
</form>
<?php do_action( 'woocommerce_auth_page_footer' ); ?>

View File

@ -22,3 +22,5 @@ if ( ! defined( 'ABSPATH' ) ) {
<link rel="stylesheet" href="<?php echo esc_url( str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/css/auth.css' ); ?>" type="text/css" />
</head>
<body class="wc-auth wp-core-ui">
<h1 id="wc-logo"><img src="<?php echo WC()->plugin_url(); ?>/assets/images/woocommerce_logo.png" alt="WooCommerce" /></h1>
<div class="wc-auth-content">