diff --git a/web/.eslintrc b/web/.eslintrc index c3fce332..ecb5af06 100644 --- a/web/.eslintrc +++ b/web/.eslintrc @@ -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", diff --git a/web/src/App.js b/web/src/App.js index 6f980693..e5e7d3ee 100644 --- a/web/src/App.js +++ b/web/src/App.js @@ -566,7 +566,7 @@ class App extends Component { renderContent() { if (!Setting.isMobile()) { return ( -
+
{ diff --git a/web/src/ApplicationEditPage.js b/web/src/ApplicationEditPage.js index 069871ba..89c3f076 100644 --- a/web/src/ApplicationEditPage.js +++ b/web/src/ApplicationEditPage.js @@ -583,7 +583,7 @@ class ApplicationEditPage extends React.Component { {i18next.t("application:Copy signup page URL")}
-
+
{ this.state.application.enablePassword ? ( @@ -603,7 +603,7 @@ class ApplicationEditPage extends React.Component { {i18next.t("application:Copy signin page URL")}
-
+
diff --git a/web/src/PaymentListPage.js b/web/src/PaymentListPage.js index 8961a999..a0b17ad3 100644 --- a/web/src/PaymentListPage.js +++ b/web/src/PaymentListPage.js @@ -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"; diff --git a/web/src/ProviderListPage.js b/web/src/ProviderListPage.js index f9a96795..8aa2c802 100644 --- a/web/src/ProviderListPage.js +++ b/web/src/ProviderListPage.js @@ -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) => { diff --git a/web/src/RecordListPage.js b/web/src/RecordListPage.js index 9b3110ca..1311d511 100644 --- a/web/src/RecordListPage.js +++ b/web/src/RecordListPage.js @@ -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", diff --git a/web/src/Setting.js b/web/src/Setting.js index d61ece62..2dad37c9 100644 --- a/web/src/Setting.js +++ b/web/src/Setting.js @@ -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; } @@ -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": [ ] } diff --git a/web/src/auth/LoginPage.js b/web/src/auth/LoginPage.js index c5db59da..b348c5e2 100644 --- a/web/src/auth/LoginPage.js +++ b/web/src/auth/LoginPage.js @@ -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, diff --git a/web/src/auth/SignupPage.js b/web/src/auth/SignupPage.js index 9ad5514d..48d5d5dd 100644 --- a/web/src/auth/SignupPage.js +++ b/web/src/auth/SignupPage.js @@ -617,7 +617,7 @@ class SignupPage extends React.Component {   - +
{ Setting.renderHelmet(application) diff --git a/web/src/basic/HomePage.js b/web/src/basic/HomePage.js index ef8a3c2b..f1a0bd5c 100644 --- a/web/src/basic/HomePage.js +++ b/web/src/basic/HomePage.js @@ -111,7 +111,7 @@ class HomePage extends React.Component { return (
- + { this.renderCards() }