feat: key spacing

This commit is contained in:
qianxi0410
2022-08-06 23:47:28 +08:00
parent 6aaba6debd
commit 9abf1b9d73
10 changed files with 61 additions and 60 deletions

View File

@ -51,6 +51,7 @@
"no-multiple-empty-lines": ["error", { "max": 1, "maxBOF": 0, "maxEOF": 0 }], "no-multiple-empty-lines": ["error", { "max": 1, "maxBOF": 0, "maxEOF": 0 }],
"space-unary-ops": ["error", { "words": true, "nonwords": false }], "space-unary-ops": ["error", { "words": true, "nonwords": false }],
"space-infix-ops": "error", "space-infix-ops": "error",
"key-spacing": ["error", { "beforeColon": false, "afterColon": true }],
"react/prop-types": "off", "react/prop-types": "off",

View File

@ -566,7 +566,7 @@ class App extends Component {
renderContent() { renderContent() {
if (!Setting.isMobile()) { if (!Setting.isMobile()) {
return ( 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"}}> <Layout style={{display: "flex", alignItems: "stretch"}}>
<Header style={{padding: "0", marginBottom: "3px"}}> <Header style={{padding: "0", marginBottom: "3px"}}>
{ {

View File

@ -583,7 +583,7 @@ class ApplicationEditPage extends React.Component {
{i18next.t("application:Copy signup page URL")} {i18next.t("application:Copy signup page URL")}
</Button> </Button>
<br /> <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 ? ( this.state.application.enablePassword ? (
<SignupPage application={this.state.application} /> <SignupPage application={this.state.application} />
@ -603,7 +603,7 @@ class ApplicationEditPage extends React.Component {
{i18next.t("application:Copy signin page URL")} {i18next.t("application:Copy signin page URL")}
</Button> </Button>
<br /> <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} /> <LoginPage type={"login"} mode={"signin"} application={this.state.application} />
<div style={maskStyle}></div> <div style={maskStyle}></div>
</div> </div>

View File

@ -163,7 +163,7 @@ class PaymentListPage extends BaseListPage {
width: "140px", width: "140px",
align: "center", align: "center",
filterMultiple: false, 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, sorter: true,
render: (text, record, index) => { render: (text, record, index) => {
record.category = "Payment"; record.category = "Payment";

View File

@ -128,12 +128,12 @@ class ProviderListPage extends BaseListPage {
align: "center", align: "center",
filterMultiple: false, filterMultiple: false,
filters: [ filters: [
{text: "OAuth", value: "OAuth", children: Setting.getProviderTypeOptions("OAuth").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: "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: "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: "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: "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: "Captcha", value: "Captcha", children: Setting.getProviderTypeOptions("Captcha").map((o) => {return {text: o.id, value: o.name};})},
], ],
sorter: true, sorter: true,
render: (text, record, index) => { render: (text, record, index) => {

View File

@ -32,7 +32,7 @@ class RecordListPage extends BaseListPage {
return { return {
owner: "built-in", owner: "built-in",
name: "1234", name: "1234",
id : "1234", id: "1234",
clientIp: "::1", clientIp: "::1",
timestamp: moment().format(), timestamp: moment().format(),
organization: "built-in", organization: "built-in",

View File

@ -140,7 +140,7 @@ export function getCountryRegionData() {
countries.registerLocale(require("i18n-iso-countries/langs/" + language + ".json")); countries.registerLocale(require("i18n-iso-countries/langs/" + language + ".json"));
var data = countries.getNames(language, {select: "official"}); var data = countries.getNames(language, {select: "official"});
var result = []; 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; return result;
} }
@ -852,83 +852,83 @@ export function getSyncerTableColumns(syncer) {
case "Keycloak": case "Keycloak":
return [ return [
{ {
"name":"ID", "name": "ID",
"type":"string", "type": "string",
"casdoorName":"Id", "casdoorName": "Id",
"isHashed":true, "isHashed": true,
"values":[ "values": [
] ]
}, },
{ {
"name":"USERNAME", "name": "USERNAME",
"type":"string", "type": "string",
"casdoorName":"Name", "casdoorName": "Name",
"isHashed":true, "isHashed": true,
"values":[ "values": [
] ]
}, },
{ {
"name":"LAST_NAME+FIRST_NAME", "name": "LAST_NAME+FIRST_NAME",
"type":"string", "type": "string",
"casdoorName":"DisplayName", "casdoorName": "DisplayName",
"isHashed":true, "isHashed": true,
"values":[ "values": [
] ]
}, },
{ {
"name":"EMAIL", "name": "EMAIL",
"type":"string", "type": "string",
"casdoorName":"Email", "casdoorName": "Email",
"isHashed":true, "isHashed": true,
"values":[ "values": [
] ]
}, },
{ {
"name":"EMAIL_VERIFIED", "name": "EMAIL_VERIFIED",
"type":"boolean", "type": "boolean",
"casdoorName":"EmailVerified", "casdoorName": "EmailVerified",
"isHashed":true, "isHashed": true,
"values":[ "values": [
] ]
}, },
{ {
"name":"FIRST_NAME", "name": "FIRST_NAME",
"type":"string", "type": "string",
"casdoorName":"FirstName", "casdoorName": "FirstName",
"isHashed":true, "isHashed": true,
"values":[ "values": [
] ]
}, },
{ {
"name":"LAST_NAME", "name": "LAST_NAME",
"type":"string", "type": "string",
"casdoorName":"LastName", "casdoorName": "LastName",
"isHashed":true, "isHashed": true,
"values":[ "values": [
] ]
}, },
{ {
"name":"CREATED_TIMESTAMP", "name": "CREATED_TIMESTAMP",
"type":"string", "type": "string",
"casdoorName":"CreatedTime", "casdoorName": "CreatedTime",
"isHashed":true, "isHashed": true,
"values":[ "values": [
] ]
}, },
{ {
"name":"ENABLED", "name": "ENABLED",
"type":"boolean", "type": "boolean",
"casdoorName":"IsForbidden", "casdoorName": "IsForbidden",
"isHashed":true, "isHashed": true,
"values":[ "values": [
] ]
} }

View File

@ -37,7 +37,7 @@ class LoginPage extends React.Component {
classes: props, classes: props,
type: props.type, type: props.type,
applicationName: props.applicationName !== undefined ? props.applicationName : (props.match === undefined ? null : props.match.params.applicationName), 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, application: null,
mode: props.mode !== undefined ? props.mode : (props.match === undefined ? null : props.match.params.mode), // "signup" or "signin" mode: props.mode !== undefined ? props.mode : (props.match === undefined ? null : props.match.params.mode), // "signup" or "signin"
isCodeSignin: false, isCodeSignin: false,