Skip to content

Commit

Permalink
feat: key spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
qianxi0410 committed Aug 6, 2022
1 parent 6aaba6d commit 9abf1b9
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 60 deletions.
1 change: 1 addition & 0 deletions web/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"no-multiple-empty-lines": ["error", { "max": 1, "maxBOF": 0, "maxEOF": 0 }],
"space-unary-ops": ["error", { "words": true, "nonwords": false }],
"space-infix-ops": "error",
"key-spacing": ["error", { "beforeColon": false, "afterColon": true }],


"react/prop-types": "off",
Expand Down
2 changes: 1 addition & 1 deletion web/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ class App extends Component {
renderContent() {
if (!Setting.isMobile()) {
return (
<div style={{display: "flex", flex: "auto", width:"100%", flexDirection: "column"}}>
<div style={{display: "flex", flex: "auto", width: "100%", flexDirection: "column"}}>
<Layout style={{display: "flex", alignItems: "stretch"}}>
<Header style={{padding: "0", marginBottom: "3px"}}>
{
Expand Down
4 changes: 2 additions & 2 deletions web/src/ApplicationEditPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ class ApplicationEditPage extends React.Component {
{i18next.t("application:Copy signup page URL")}
</Button>
<br />
<div style={{position: "relative", width: "90%", border: "1px solid rgb(217,217,217)", boxShadow: "10px 10px 5px #888888", alignItems:"center", overflow:"auto", flexDirection:"column", flex: "auto"}}>
<div style={{position: "relative", width: "90%", border: "1px solid rgb(217,217,217)", boxShadow: "10px 10px 5px #888888", alignItems: "center", overflow: "auto", flexDirection: "column", flex: "auto"}}>
{
this.state.application.enablePassword ? (
<SignupPage application={this.state.application} />
Expand All @@ -603,7 +603,7 @@ class ApplicationEditPage extends React.Component {
{i18next.t("application:Copy signin page URL")}
</Button>
<br />
<div style={{position: "relative", width: "90%", border: "1px solid rgb(217,217,217)", boxShadow: "10px 10px 5px #888888", alignItems:"center", overflow:"auto", flexDirection:"column", flex: "auto"}}>
<div style={{position: "relative", width: "90%", border: "1px solid rgb(217,217,217)", boxShadow: "10px 10px 5px #888888", alignItems: "center", overflow: "auto", flexDirection: "column", flex: "auto"}}>
<LoginPage type={"login"} mode={"signin"} application={this.state.application} />
<div style={maskStyle}></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/src/PaymentListPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class PaymentListPage extends BaseListPage {
width: "140px",
align: "center",
filterMultiple: false,
filters: Setting.getProviderTypeOptions("Payment").map((o) => {return {text:o.id, value:o.name};}),
filters: Setting.getProviderTypeOptions("Payment").map((o) => {return {text: o.id, value: o.name};}),
sorter: true,
render: (text, record, index) => {
record.category = "Payment";
Expand Down
12 changes: 6 additions & 6 deletions web/src/ProviderListPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ class ProviderListPage extends BaseListPage {
align: "center",
filterMultiple: false,
filters: [
{text: "OAuth", value: "OAuth", children: Setting.getProviderTypeOptions("OAuth").map((o) => {return {text:o.id, value:o.name};})},
{text: "Email", value: "Email", children: Setting.getProviderTypeOptions("Email").map((o) => {return {text:o.id, value:o.name};})},
{text: "SMS", value: "SMS", children: Setting.getProviderTypeOptions("SMS").map((o) => {return {text:o.id, value:o.name};})},
{text: "Storage", value: "Storage", children: Setting.getProviderTypeOptions("Storage").map((o) => {return {text:o.id, value:o.name};})},
{text: "SAML", value: "SAML", children: Setting.getProviderTypeOptions("SAML").map((o) => {return {text:o.id, value:o.name};})},
{text: "Captcha", value: "Captcha", children: Setting.getProviderTypeOptions("Captcha").map((o) => {return {text:o.id, value:o.name};})},
{text: "OAuth", value: "OAuth", children: Setting.getProviderTypeOptions("OAuth").map((o) => {return {text: o.id, value: o.name};})},
{text: "Email", value: "Email", children: Setting.getProviderTypeOptions("Email").map((o) => {return {text: o.id, value: o.name};})},
{text: "SMS", value: "SMS", children: Setting.getProviderTypeOptions("SMS").map((o) => {return {text: o.id, value: o.name};})},
{text: "Storage", value: "Storage", children: Setting.getProviderTypeOptions("Storage").map((o) => {return {text: o.id, value: o.name};})},
{text: "SAML", value: "SAML", children: Setting.getProviderTypeOptions("SAML").map((o) => {return {text: o.id, value: o.name};})},
{text: "Captcha", value: "Captcha", children: Setting.getProviderTypeOptions("Captcha").map((o) => {return {text: o.id, value: o.name};})},
],
sorter: true,
render: (text, record, index) => {
Expand Down
2 changes: 1 addition & 1 deletion web/src/RecordListPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class RecordListPage extends BaseListPage {
return {
owner: "built-in",
name: "1234",
id : "1234",
id: "1234",
clientIp: "::1",
timestamp: moment().format(),
organization: "built-in",
Expand Down
92 changes: 46 additions & 46 deletions web/src/Setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export function getCountryRegionData() {
countries.registerLocale(require("i18n-iso-countries/langs/" + language + ".json"));
var data = countries.getNames(language, {select: "official"});
var result = [];
for (var i in data) {result.push({code:i, name:data[i]});}
for (var i in data) {result.push({code: i, name: data[i]});}
return result;
}

Expand Down Expand Up @@ -852,83 +852,83 @@ export function getSyncerTableColumns(syncer) {
case "Keycloak":
return [
{
"name":"ID",
"type":"string",
"casdoorName":"Id",
"isHashed":true,
"values":[
"name": "ID",
"type": "string",
"casdoorName": "Id",
"isHashed": true,
"values": [

]
},
{
"name":"USERNAME",
"type":"string",
"casdoorName":"Name",
"isHashed":true,
"values":[
"name": "USERNAME",
"type": "string",
"casdoorName": "Name",
"isHashed": true,
"values": [

]
},
{
"name":"LAST_NAME+FIRST_NAME",
"type":"string",
"casdoorName":"DisplayName",
"isHashed":true,
"values":[
"name": "LAST_NAME+FIRST_NAME",
"type": "string",
"casdoorName": "DisplayName",
"isHashed": true,
"values": [

]
},
{
"name":"EMAIL",
"type":"string",
"casdoorName":"Email",
"isHashed":true,
"values":[
"name": "EMAIL",
"type": "string",
"casdoorName": "Email",
"isHashed": true,
"values": [

]
},
{
"name":"EMAIL_VERIFIED",
"type":"boolean",
"casdoorName":"EmailVerified",
"isHashed":true,
"values":[
"name": "EMAIL_VERIFIED",
"type": "boolean",
"casdoorName": "EmailVerified",
"isHashed": true,
"values": [

]
},
{
"name":"FIRST_NAME",
"type":"string",
"casdoorName":"FirstName",
"isHashed":true,
"values":[
"name": "FIRST_NAME",
"type": "string",
"casdoorName": "FirstName",
"isHashed": true,
"values": [

]
},
{
"name":"LAST_NAME",
"type":"string",
"casdoorName":"LastName",
"isHashed":true,
"values":[
"name": "LAST_NAME",
"type": "string",
"casdoorName": "LastName",
"isHashed": true,
"values": [

]
},
{
"name":"CREATED_TIMESTAMP",
"type":"string",
"casdoorName":"CreatedTime",
"isHashed":true,
"values":[
"name": "CREATED_TIMESTAMP",
"type": "string",
"casdoorName": "CreatedTime",
"isHashed": true,
"values": [

]
},
{
"name":"ENABLED",
"type":"boolean",
"casdoorName":"IsForbidden",
"isHashed":true,
"values":[
"name": "ENABLED",
"type": "boolean",
"casdoorName": "IsForbidden",
"isHashed": true,
"values": [

]
}
Expand Down
2 changes: 1 addition & 1 deletion web/src/auth/LoginPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class LoginPage extends React.Component {
classes: props,
type: props.type,
applicationName: props.applicationName !== undefined ? props.applicationName : (props.match === undefined ? null : props.match.params.applicationName),
owner : props.owner !== undefined ? props.owner : (props.match === undefined ? null : props.match.params.owner),
owner: props.owner !== undefined ? props.owner : (props.match === undefined ? null : props.match.params.owner),
application: null,
mode: props.mode !== undefined ? props.mode : (props.match === undefined ? null : props.match.params.mode), // "signup" or "signin"
isCodeSignin: false,
Expand Down
2 changes: 1 addition & 1 deletion web/src/auth/SignupPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ class SignupPage extends React.Component {
<CustomGithubCorner />
&nbsp;
<Row>
<Col span={24} style={{display: "flex", justifyContent: "center"}} >
<Col span={24} style={{display: "flex", justifyContent: "center"}} >
<div style={{marginTop: "10px", textAlign: "center"}}>
{
Setting.renderHelmet(application)
Expand Down
2 changes: 1 addition & 1 deletion web/src/basic/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class HomePage extends React.Component {
return (
<div>
<Row style={{width: "100%"}}>
<Col span={24} style={{display: "flex", justifyContent: "center"}} >
<Col span={24} style={{display: "flex", justifyContent: "center"}} >
{
this.renderCards()
}
Expand Down

0 comments on commit 9abf1b9

Please sign in to comment.