mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-24 08:20:31 +08:00
feat: comma dangle
This commit is contained in:
parent
9abf1b9d73
commit
cd966116d4
@ -52,6 +52,8 @@
|
||||
"space-unary-ops": ["error", { "words": true, "nonwords": false }],
|
||||
"space-infix-ops": "error",
|
||||
"key-spacing": ["error", { "beforeColon": false, "afterColon": true }],
|
||||
"comma-style": ["error", "last"],
|
||||
"comma-dangle": ["error", "always-multiline"],
|
||||
|
||||
|
||||
"react/prop-types": "off",
|
||||
|
@ -34,7 +34,7 @@ module.exports = {
|
||||
"/cas/validate": {
|
||||
target: "http://localhost:8000",
|
||||
changeOrigin: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
|
@ -116,7 +116,7 @@ class AccountTable extends React.Component {
|
||||
}
|
||||
</Select>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("provider:visible"),
|
||||
@ -129,7 +129,7 @@ class AccountTable extends React.Component {
|
||||
this.updateField(table, index, "visible", checked);
|
||||
}} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("organization:viewRule"),
|
||||
@ -156,7 +156,7 @@ class AccountTable extends React.Component {
|
||||
}
|
||||
</Select>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("organization:modifyRule"),
|
||||
@ -191,7 +191,7 @@ class AccountTable extends React.Component {
|
||||
}
|
||||
</Select>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Action"),
|
||||
@ -211,7 +211,7 @@ class AccountTable extends React.Component {
|
||||
</Tooltip>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -238,7 +238,7 @@ class App extends Component {
|
||||
const owner = this.state.account.owner;
|
||||
|
||||
this.setState({
|
||||
account: null
|
||||
account: null,
|
||||
});
|
||||
|
||||
Setting.showMessage("success", "Logged out successfully");
|
||||
@ -258,7 +258,7 @@ class App extends Component {
|
||||
|
||||
onUpdateAccount(account) {
|
||||
this.setState({
|
||||
account: account
|
||||
account: account,
|
||||
});
|
||||
}
|
||||
|
||||
@ -360,7 +360,7 @@ class App extends Component {
|
||||
<Link to="/">
|
||||
{i18next.t("general:Home")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
</Menu.Item>,
|
||||
);
|
||||
|
||||
if (Setting.isAdminUser(this.state.account)) {
|
||||
@ -369,49 +369,49 @@ class App extends Component {
|
||||
<Link to="/organizations">
|
||||
{i18next.t("general:Organizations")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
</Menu.Item>,
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/users">
|
||||
<Link to="/users">
|
||||
{i18next.t("general:Users")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
</Menu.Item>,
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/roles">
|
||||
<Link to="/roles">
|
||||
{i18next.t("general:Roles")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
</Menu.Item>,
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/permissions">
|
||||
<Link to="/permissions">
|
||||
{i18next.t("general:Permissions")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
</Menu.Item>,
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/models">
|
||||
<Link to="/models">
|
||||
{i18next.t("general:Models")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
</Menu.Item>,
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/providers">
|
||||
<Link to="/providers">
|
||||
{i18next.t("general:Providers")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
</Menu.Item>,
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/applications">
|
||||
<Link to="/applications">
|
||||
{i18next.t("general:Applications")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
</Menu.Item>,
|
||||
);
|
||||
}
|
||||
|
||||
@ -421,42 +421,42 @@ class App extends Component {
|
||||
<Link to="/resources">
|
||||
{i18next.t("general:Resources")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
</Menu.Item>,
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/tokens">
|
||||
<Link to="/tokens">
|
||||
{i18next.t("general:Tokens")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
</Menu.Item>,
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/records">
|
||||
<Link to="/records">
|
||||
{i18next.t("general:Records")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
</Menu.Item>,
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/webhooks">
|
||||
<Link to="/webhooks">
|
||||
{i18next.t("general:Webhooks")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
</Menu.Item>,
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/syncers">
|
||||
<Link to="/syncers">
|
||||
{i18next.t("general:Syncers")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
</Menu.Item>,
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/certs">
|
||||
<Link to="/certs">
|
||||
{i18next.t("general:Certs")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
</Menu.Item>,
|
||||
);
|
||||
|
||||
if (Conf.EnableExtraPages) {
|
||||
@ -465,14 +465,14 @@ class App extends Component {
|
||||
<Link to="/products">
|
||||
{i18next.t("general:Products")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
</Menu.Item>,
|
||||
);
|
||||
res.push(
|
||||
<Menu.Item key="/payments">
|
||||
<Link to="/payments">
|
||||
{i18next.t("general:Payments")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
</Menu.Item>,
|
||||
);
|
||||
}
|
||||
|
||||
@ -481,7 +481,7 @@ class App extends Component {
|
||||
<a target="_blank" rel="noreferrer" href={Setting.isLocalhost() ? `${Setting.ServerUrl}/swagger` : "/swagger"}>
|
||||
{i18next.t("general:Swagger")}
|
||||
</a>
|
||||
</Menu.Item>
|
||||
</Menu.Item>,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ class ApplicationListPage extends BaseListPage {
|
||||
ApplicationBackend.addApplication(newApplication)
|
||||
.then((res) => {
|
||||
this.props.history.push({pathname: `/applications/${newApplication.name}`, mode: "add"});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Application failed to add: ${error}`);
|
||||
@ -76,7 +76,7 @@ class ApplicationListPage extends BaseListPage {
|
||||
data: Setting.deleteRow(this.state.data, i),
|
||||
pagination: {total: this.state.pagination.total - 1},
|
||||
});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Application failed to delete: ${error}`);
|
||||
@ -99,7 +99,7 @@ class ApplicationListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Created time"),
|
||||
@ -109,7 +109,7 @@ class ApplicationListPage extends BaseListPage {
|
||||
sorter: true,
|
||||
render: (text, record, index) => {
|
||||
return Setting.getFormattedDate(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Display name"),
|
||||
@ -130,7 +130,7 @@ class ApplicationListPage extends BaseListPage {
|
||||
<img src={text} alt={text} width={150} />
|
||||
</a>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Organization"),
|
||||
@ -145,7 +145,7 @@ class ApplicationListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Providers"),
|
||||
@ -222,7 +222,7 @@ class ApplicationListPage extends BaseListPage {
|
||||
</Popconfirm>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -44,7 +44,7 @@ class CertListPage extends BaseListPage {
|
||||
CertBackend.addCert(newCert)
|
||||
.then((res) => {
|
||||
this.props.history.push({pathname: `/certs/${newCert.name}`, mode: "add"});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Cert failed to add: ${error}`);
|
||||
@ -59,7 +59,7 @@ class CertListPage extends BaseListPage {
|
||||
data: Setting.deleteRow(this.state.data, i),
|
||||
pagination: {total: this.state.pagination.total - 1},
|
||||
});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Cert failed to delete: ${error}`);
|
||||
@ -82,7 +82,7 @@ class CertListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Created time"),
|
||||
@ -92,7 +92,7 @@ class CertListPage extends BaseListPage {
|
||||
sorter: true,
|
||||
render: (text, record, index) => {
|
||||
return Setting.getFormattedDate(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Display name"),
|
||||
@ -169,7 +169,7 @@ class CertListPage extends BaseListPage {
|
||||
</Popconfirm>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -42,7 +42,7 @@ class LdapEditPage extends React.Component {
|
||||
.then((res) => {
|
||||
if (res.status === "ok") {
|
||||
this.setState({
|
||||
ldap: res.data
|
||||
ldap: res.data,
|
||||
});
|
||||
} else {
|
||||
Setting.showMessage("error", res.msg);
|
||||
@ -71,7 +71,7 @@ class LdapEditPage extends React.Component {
|
||||
return (
|
||||
<span style={{
|
||||
color: "#faad14",
|
||||
marginLeft: "20px"
|
||||
marginLeft: "20px",
|
||||
}}>{i18next.t("ldap:The Auto Sync option will sync all users to specify organization")}</span>
|
||||
);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ class LdapListPage extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
ldaps: null
|
||||
ldaps: null,
|
||||
};
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ class LdapListPage extends React.Component {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Organization"),
|
||||
@ -79,7 +79,7 @@ class LdapListPage extends React.Component {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("ldap:Server"),
|
||||
@ -89,7 +89,7 @@ class LdapListPage extends React.Component {
|
||||
sorter: (a, b) => a.host.localeCompare(b.host),
|
||||
render: (text, record, index) => {
|
||||
return `${text}:${record.port}`;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("ldap:Base DN"),
|
||||
@ -114,7 +114,7 @@ class LdapListPage extends React.Component {
|
||||
render: (text, record, index) => {
|
||||
return text === 0 ? (<span style={{color: "#faad14"}}>Disable</span>) : (
|
||||
<span style={{color: "#52c41a"}}>{text + " mins"}</span>);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("ldap:Last Sync"),
|
||||
@ -124,7 +124,7 @@ class LdapListPage extends React.Component {
|
||||
sorter: (a, b) => a.lastSync.localeCompare(b.lastSync),
|
||||
render: (text, record, index) => {
|
||||
return text;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Action"),
|
||||
@ -148,7 +148,7 @@ class LdapListPage extends React.Component {
|
||||
</Popconfirm>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -48,7 +48,7 @@ class LdapTable extends React.Component {
|
||||
passwd: "123",
|
||||
baseDn: "ou=People,dc=example,dc=com",
|
||||
autosync: 0,
|
||||
lastSync: ""
|
||||
lastSync: "",
|
||||
};
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ class LdapTable extends React.Component {
|
||||
} else {
|
||||
Setting.showMessage("error", res.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Add LDAP server failed: ${error}`);
|
||||
@ -83,7 +83,7 @@ class LdapTable extends React.Component {
|
||||
} else {
|
||||
Setting.showMessage("error", res.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Delete LDAP server failed: ${error}`);
|
||||
@ -104,7 +104,7 @@ class LdapTable extends React.Component {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("ldap:Server"),
|
||||
@ -114,7 +114,7 @@ class LdapTable extends React.Component {
|
||||
sorter: (a, b) => a.host.localeCompare(b.host),
|
||||
render: (text, record, index) => {
|
||||
return `${text}:${record.port}`;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("ldap:Base DN"),
|
||||
@ -132,7 +132,7 @@ class LdapTable extends React.Component {
|
||||
render: (text, record, index) => {
|
||||
return text === 0 ? (<span style={{color: "#faad14"}}>Disable</span>) : (
|
||||
<span style={{color: "#52c41a"}}>{text + " mins"}</span>);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("ldap:Last Sync"),
|
||||
@ -142,7 +142,7 @@ class LdapTable extends React.Component {
|
||||
sorter: (a, b) => a.lastSync.localeCompare(b.lastSync),
|
||||
render: (text, record, index) => {
|
||||
return text;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Action"),
|
||||
@ -166,7 +166,7 @@ class LdapTable extends React.Component {
|
||||
</Popconfirm>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -39,7 +39,7 @@ class ModelListPage extends BaseListPage {
|
||||
ModelBackend.addModel(newModel)
|
||||
.then((res) => {
|
||||
this.props.history.push({pathname: `/models/${newModel.owner}/${newModel.name}`, mode: "add"});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Model failed to add: ${error}`);
|
||||
@ -54,7 +54,7 @@ class ModelListPage extends BaseListPage {
|
||||
data: Setting.deleteRow(this.state.data, i),
|
||||
pagination: {total: this.state.pagination.total - 1},
|
||||
});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Model failed to delete: ${error}`);
|
||||
@ -76,7 +76,7 @@ class ModelListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Name"),
|
||||
@ -92,7 +92,7 @@ class ModelListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Created time"),
|
||||
@ -102,7 +102,7 @@ class ModelListPage extends BaseListPage {
|
||||
sorter: true,
|
||||
render: (text, record, index) => {
|
||||
return Setting.getFormattedDate(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Display name"),
|
||||
@ -122,7 +122,7 @@ class ModelListPage extends BaseListPage {
|
||||
return (
|
||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Action"),
|
||||
@ -143,7 +143,7 @@ class ModelListPage extends BaseListPage {
|
||||
</Popconfirm>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -60,7 +60,7 @@ class OrganizationEditPage extends React.Component {
|
||||
}
|
||||
}
|
||||
this.setState({
|
||||
ldaps: resdata
|
||||
ldaps: resdata,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ class OrganizationListPage extends BaseListPage {
|
||||
OrganizationBackend.addOrganization(newOrganization)
|
||||
.then((res) => {
|
||||
this.props.history.push({pathname: `/organizations/${newOrganization.name}`, mode: "add"});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Organization failed to add: ${error}`);
|
||||
@ -89,7 +89,7 @@ class OrganizationListPage extends BaseListPage {
|
||||
data: Setting.deleteRow(this.state.data, i),
|
||||
pagination: {total: this.state.pagination.total - 1},
|
||||
});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Organization failed to delete: ${error}`);
|
||||
@ -112,7 +112,7 @@ class OrganizationListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Created time"),
|
||||
@ -122,7 +122,7 @@ class OrganizationListPage extends BaseListPage {
|
||||
sorter: true,
|
||||
render: (text, record, index) => {
|
||||
return Setting.getFormattedDate(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Display name"),
|
||||
@ -143,7 +143,7 @@ class OrganizationListPage extends BaseListPage {
|
||||
<img src={text} alt={text} width={40} />
|
||||
</a>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("organization:Website URL"),
|
||||
@ -158,7 +158,7 @@ class OrganizationListPage extends BaseListPage {
|
||||
{text}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Password type"),
|
||||
@ -192,7 +192,7 @@ class OrganizationListPage extends BaseListPage {
|
||||
<img src={text} alt={text} width={40} />
|
||||
</a>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("organization:Soft deletion"),
|
||||
@ -204,7 +204,7 @@ class OrganizationListPage extends BaseListPage {
|
||||
return (
|
||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Action"),
|
||||
@ -226,7 +226,7 @@ class OrganizationListPage extends BaseListPage {
|
||||
</Popconfirm>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -52,7 +52,7 @@ class PaymentListPage extends BaseListPage {
|
||||
PaymentBackend.addPayment(newPayment)
|
||||
.then((res) => {
|
||||
this.props.history.push({pathname: `/payments/${newPayment.name}`, mode: "add"});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Payment failed to add: ${error}`);
|
||||
@ -67,7 +67,7 @@ class PaymentListPage extends BaseListPage {
|
||||
data: Setting.deleteRow(this.state.data, i),
|
||||
pagination: {total: this.state.pagination.total - 1},
|
||||
});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Payment failed to delete: ${error}`);
|
||||
@ -89,7 +89,7 @@ class PaymentListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:User"),
|
||||
@ -104,7 +104,7 @@ class PaymentListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Name"),
|
||||
@ -120,7 +120,7 @@ class PaymentListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Created time"),
|
||||
@ -130,7 +130,7 @@ class PaymentListPage extends BaseListPage {
|
||||
sorter: true,
|
||||
render: (text, record, index) => {
|
||||
return Setting.getFormattedDate(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: i18next.t("general:Display name"),
|
||||
@ -154,7 +154,7 @@ class PaymentListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("payment:Type"),
|
||||
@ -168,7 +168,7 @@ class PaymentListPage extends BaseListPage {
|
||||
render: (text, record, index) => {
|
||||
record.category = "Payment";
|
||||
return Provider.getProviderLogoWidget(record);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("payment:Product"),
|
||||
@ -221,7 +221,7 @@ class PaymentListPage extends BaseListPage {
|
||||
</Popconfirm>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -67,7 +67,7 @@ class PaymentResultPage extends React.Component {
|
||||
Setting.goToLink(payment.returnUrl);
|
||||
}}>
|
||||
{i18next.t("payment:Return to Website")}
|
||||
</Button>
|
||||
</Button>,
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
@ -103,7 +103,7 @@ class PaymentResultPage extends React.Component {
|
||||
Setting.goToLink(payment.returnUrl);
|
||||
}}>
|
||||
{i18next.t("payment:Return to Website")}
|
||||
</Button>
|
||||
</Button>,
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
|
@ -44,7 +44,7 @@ class PermissionListPage extends BaseListPage {
|
||||
PermissionBackend.addPermission(newPermission)
|
||||
.then((res) => {
|
||||
this.props.history.push({pathname: `/permissions/${newPermission.owner}/${newPermission.name}`, mode: "add"});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Permission failed to add: ${error}`);
|
||||
@ -59,7 +59,7 @@ class PermissionListPage extends BaseListPage {
|
||||
data: Setting.deleteRow(this.state.data, i),
|
||||
pagination: {total: this.state.pagination.total - 1},
|
||||
});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Permission failed to delete: ${error}`);
|
||||
@ -81,7 +81,7 @@ class PermissionListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Name"),
|
||||
@ -97,7 +97,7 @@ class PermissionListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Created time"),
|
||||
@ -107,7 +107,7 @@ class PermissionListPage extends BaseListPage {
|
||||
sorter: true,
|
||||
render: (text, record, index) => {
|
||||
return Setting.getFormattedDate(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Display name"),
|
||||
@ -126,7 +126,7 @@ class PermissionListPage extends BaseListPage {
|
||||
...this.getColumnSearchProps("users"),
|
||||
render: (text, record, index) => {
|
||||
return Setting.getTags(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("role:Sub roles"),
|
||||
@ -137,7 +137,7 @@ class PermissionListPage extends BaseListPage {
|
||||
...this.getColumnSearchProps("roles"),
|
||||
render: (text, record, index) => {
|
||||
return Setting.getTags(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("permission:Resource type"),
|
||||
@ -159,7 +159,7 @@ class PermissionListPage extends BaseListPage {
|
||||
...this.getColumnSearchProps("resources"),
|
||||
render: (text, record, index) => {
|
||||
return Setting.getTags(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("permission:Actions"),
|
||||
@ -170,7 +170,7 @@ class PermissionListPage extends BaseListPage {
|
||||
...this.getColumnSearchProps("actions"),
|
||||
render: (text, record, index) => {
|
||||
return Setting.getTags(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("permission:Effect"),
|
||||
@ -194,7 +194,7 @@ class PermissionListPage extends BaseListPage {
|
||||
return (
|
||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Action"),
|
||||
@ -214,7 +214,7 @@ class PermissionListPage extends BaseListPage {
|
||||
</Popconfirm>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -46,7 +46,7 @@ class ProductListPage extends BaseListPage {
|
||||
ProductBackend.addProduct(newProduct)
|
||||
.then((res) => {
|
||||
this.props.history.push({pathname: `/products/${newProduct.name}`, mode: "add"});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Product failed to add: ${error}`);
|
||||
@ -61,7 +61,7 @@ class ProductListPage extends BaseListPage {
|
||||
data: Setting.deleteRow(this.state.data, i),
|
||||
pagination: {total: this.state.pagination.total - 1},
|
||||
});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Product failed to delete: ${error}`);
|
||||
@ -84,7 +84,7 @@ class ProductListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Created time"),
|
||||
@ -94,7 +94,7 @@ class ProductListPage extends BaseListPage {
|
||||
sorter: true,
|
||||
render: (text, record, index) => {
|
||||
return Setting.getFormattedDate(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Display name"),
|
||||
@ -115,7 +115,7 @@ class ProductListPage extends BaseListPage {
|
||||
<img src={text} alt={text} width={150} />
|
||||
</a>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("product:Tag"),
|
||||
@ -240,7 +240,7 @@ class ProductListPage extends BaseListPage {
|
||||
</Popconfirm>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -47,7 +47,7 @@ class ProviderListPage extends BaseListPage {
|
||||
ProviderBackend.addProvider(newProvider)
|
||||
.then((res) => {
|
||||
this.props.history.push({pathname: `/providers/${newProvider.name}`, mode: "add"});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Provider failed to add: ${error}`);
|
||||
@ -62,7 +62,7 @@ class ProviderListPage extends BaseListPage {
|
||||
data: Setting.deleteRow(this.state.data, i),
|
||||
pagination: {total: this.state.pagination.total - 1},
|
||||
});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Provider failed to delete: ${error}`);
|
||||
@ -85,7 +85,7 @@ class ProviderListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Created time"),
|
||||
@ -95,7 +95,7 @@ class ProviderListPage extends BaseListPage {
|
||||
sorter: true,
|
||||
render: (text, record, index) => {
|
||||
return Setting.getFormattedDate(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Display name"),
|
||||
@ -138,7 +138,7 @@ class ProviderListPage extends BaseListPage {
|
||||
sorter: true,
|
||||
render: (text, record, index) => {
|
||||
return Provider.getProviderLogoWidget(record);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("provider:Client ID"),
|
||||
@ -149,7 +149,7 @@ class ProviderListPage extends BaseListPage {
|
||||
...this.getColumnSearchProps("clientId"),
|
||||
render: (text, record, index) => {
|
||||
return Setting.getShortText(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("provider:Provider URL"),
|
||||
@ -166,7 +166,7 @@ class ProviderListPage extends BaseListPage {
|
||||
}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Action"),
|
||||
@ -186,7 +186,7 @@ class ProviderListPage extends BaseListPage {
|
||||
</Popconfirm>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -82,7 +82,7 @@ class ProviderTable extends React.Component {
|
||||
}
|
||||
</Select>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("provider:Category"),
|
||||
@ -92,7 +92,7 @@ class ProviderTable extends React.Component {
|
||||
render: (text, record, index) => {
|
||||
const provider = Setting.getArrayItem(this.props.providers, "name", record.name);
|
||||
return provider?.category;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("provider:Type"),
|
||||
@ -102,7 +102,7 @@ class ProviderTable extends React.Component {
|
||||
render: (text, record, index) => {
|
||||
const provider = Setting.getArrayItem(this.props.providers, "name", record.name);
|
||||
return Provider.getProviderLogoWidget(provider);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("provider:canSignUp"),
|
||||
@ -119,7 +119,7 @@ class ProviderTable extends React.Component {
|
||||
this.updateField(table, index, "canSignUp", checked);
|
||||
}} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("provider:canSignIn"),
|
||||
@ -136,7 +136,7 @@ class ProviderTable extends React.Component {
|
||||
this.updateField(table, index, "canSignIn", checked);
|
||||
}} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("provider:canUnlink"),
|
||||
@ -153,7 +153,7 @@ class ProviderTable extends React.Component {
|
||||
this.updateField(table, index, "canUnlink", checked);
|
||||
}} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("provider:prompted"),
|
||||
@ -170,7 +170,7 @@ class ProviderTable extends React.Component {
|
||||
this.updateField(table, index, "prompted", checked);
|
||||
}} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: i18next.t("provider:alertType"),
|
||||
@ -211,7 +211,7 @@ class ProviderTable extends React.Component {
|
||||
</Tooltip>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -74,7 +74,7 @@ class RecordListPage extends BaseListPage {
|
||||
{text}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Timestamp"),
|
||||
@ -84,7 +84,7 @@ class RecordListPage extends BaseListPage {
|
||||
sorter: true,
|
||||
render: (text, record, index) => {
|
||||
return Setting.getFormattedDate(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Organization"),
|
||||
@ -99,7 +99,7 @@ class RecordListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:User"),
|
||||
@ -114,7 +114,7 @@ class RecordListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Method"),
|
||||
@ -153,7 +153,7 @@ class RecordListPage extends BaseListPage {
|
||||
fixed: (Setting.isMobile()) ? "false" : "right",
|
||||
render: (text, record, index) => {
|
||||
return text;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("record:Is Triggered"),
|
||||
@ -170,7 +170,7 @@ class RecordListPage extends BaseListPage {
|
||||
return (
|
||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -48,7 +48,7 @@ class ResourceListPage extends BaseListPage {
|
||||
data: Setting.deleteRow(this.state.data, i),
|
||||
pagination: {total: this.state.pagination.total - 1},
|
||||
});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Resource failed to delete: ${error}`);
|
||||
@ -99,7 +99,7 @@ class ResourceListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("resource:Application"),
|
||||
@ -114,7 +114,7 @@ class ResourceListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("resource:User"),
|
||||
@ -129,7 +129,7 @@ class ResourceListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("resource:Parent"),
|
||||
@ -155,7 +155,7 @@ class ResourceListPage extends BaseListPage {
|
||||
sorter: true,
|
||||
render: (text, record, index) => {
|
||||
return Setting.getFormattedDate(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("resource:Tag"),
|
||||
@ -196,7 +196,7 @@ class ResourceListPage extends BaseListPage {
|
||||
sorter: true,
|
||||
render: (text, record, index) => {
|
||||
return Setting.getFriendlyFileSize(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Preview"),
|
||||
@ -219,7 +219,7 @@ class ResourceListPage extends BaseListPage {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:URL"),
|
||||
@ -238,7 +238,7 @@ class ResourceListPage extends BaseListPage {
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Action"),
|
||||
@ -260,7 +260,7 @@ class ResourceListPage extends BaseListPage {
|
||||
</Popconfirm>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -40,7 +40,7 @@ class RoleListPage extends BaseListPage {
|
||||
RoleBackend.addRole(newRole)
|
||||
.then((res) => {
|
||||
this.props.history.push({pathname: `/roles/${newRole.owner}/${newRole.name}`, mode: "add"});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Role failed to add: ${error}`);
|
||||
@ -55,7 +55,7 @@ class RoleListPage extends BaseListPage {
|
||||
data: Setting.deleteRow(this.state.data, i),
|
||||
pagination: {total: this.state.pagination.total - 1},
|
||||
});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Role failed to delete: ${error}`);
|
||||
@ -77,7 +77,7 @@ class RoleListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Name"),
|
||||
@ -93,7 +93,7 @@ class RoleListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Created time"),
|
||||
@ -103,7 +103,7 @@ class RoleListPage extends BaseListPage {
|
||||
sorter: true,
|
||||
render: (text, record, index) => {
|
||||
return Setting.getFormattedDate(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Display name"),
|
||||
@ -122,7 +122,7 @@ class RoleListPage extends BaseListPage {
|
||||
...this.getColumnSearchProps("users"),
|
||||
render: (text, record, index) => {
|
||||
return Setting.getTags(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("role:Sub roles"),
|
||||
@ -133,7 +133,7 @@ class RoleListPage extends BaseListPage {
|
||||
...this.getColumnSearchProps("roles"),
|
||||
render: (text, record, index) => {
|
||||
return Setting.getTags(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Is enabled"),
|
||||
@ -145,7 +145,7 @@ class RoleListPage extends BaseListPage {
|
||||
return (
|
||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Action"),
|
||||
@ -165,7 +165,7 @@ class RoleListPage extends BaseListPage {
|
||||
</Popconfirm>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -75,35 +75,35 @@ export const OtherProviderInfo = {
|
||||
},
|
||||
"Azure Blob": {
|
||||
logo: `${StaticBaseUrl}/img/social_azure.jpg`,
|
||||
url: "https://azure.microsoft.com/en-us/services/storage/blobs/"
|
||||
}
|
||||
url: "https://azure.microsoft.com/en-us/services/storage/blobs/",
|
||||
},
|
||||
},
|
||||
SAML: {
|
||||
"Aliyun IDaaS": {
|
||||
logo: `${StaticBaseUrl}/img/social_aliyun.png`,
|
||||
url: "https://aliyun.com/product/idaas"
|
||||
url: "https://aliyun.com/product/idaas",
|
||||
},
|
||||
"Keycloak": {
|
||||
logo: `${StaticBaseUrl}/img/social_keycloak.png`,
|
||||
url: "https://www.keycloak.org/"
|
||||
url: "https://www.keycloak.org/",
|
||||
},
|
||||
},
|
||||
Payment: {
|
||||
"Alipay": {
|
||||
logo: `${StaticBaseUrl}/img/payment_alipay.png`,
|
||||
url: "https://www.alipay.com/"
|
||||
url: "https://www.alipay.com/",
|
||||
},
|
||||
"WeChat Pay": {
|
||||
logo: `${StaticBaseUrl}/img/payment_wechat_pay.png`,
|
||||
url: "https://pay.weixin.qq.com/"
|
||||
url: "https://pay.weixin.qq.com/",
|
||||
},
|
||||
"PayPal": {
|
||||
logo: `${StaticBaseUrl}/img/payment_paypal.png`,
|
||||
url: "https://www.paypal.com/"
|
||||
url: "https://www.paypal.com/",
|
||||
},
|
||||
"GC": {
|
||||
logo: `${StaticBaseUrl}/img/payment_gc.png`,
|
||||
url: "https://gc.org"
|
||||
url: "https://gc.org",
|
||||
},
|
||||
},
|
||||
Captcha: {
|
||||
@ -126,8 +126,8 @@ export const OtherProviderInfo = {
|
||||
"GEETEST": {
|
||||
logo: `${StaticBaseUrl}/img/social_geetest.png`,
|
||||
url: "https://www.geetest.com",
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export function getCountryRegionData() {
|
||||
@ -598,7 +598,7 @@ export function getProviderTypeOptions(category) {
|
||||
{id: "AWS S3", name: "AWS S3"},
|
||||
{id: "Aliyun OSS", name: "Aliyun OSS"},
|
||||
{id: "Tencent Cloud COS", name: "Tencent Cloud COS"},
|
||||
{id: "Azure Blob", name: "Azure Blob"}
|
||||
{id: "Azure Blob", name: "Azure Blob"},
|
||||
]
|
||||
);
|
||||
} else if (category === "SAML") {
|
||||
@ -808,7 +808,7 @@ export function getTags(tags) {
|
||||
res.push(
|
||||
<Tag color={getTagColor(tag)}>
|
||||
{tag}
|
||||
</Tag>
|
||||
</Tag>,
|
||||
);
|
||||
});
|
||||
return res;
|
||||
@ -858,7 +858,7 @@ export function getSyncerTableColumns(syncer) {
|
||||
"isHashed": true,
|
||||
"values": [
|
||||
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "USERNAME",
|
||||
@ -867,7 +867,7 @@ export function getSyncerTableColumns(syncer) {
|
||||
"isHashed": true,
|
||||
"values": [
|
||||
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "LAST_NAME+FIRST_NAME",
|
||||
@ -876,7 +876,7 @@ export function getSyncerTableColumns(syncer) {
|
||||
"isHashed": true,
|
||||
"values": [
|
||||
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "EMAIL",
|
||||
@ -885,7 +885,7 @@ export function getSyncerTableColumns(syncer) {
|
||||
"isHashed": true,
|
||||
"values": [
|
||||
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "EMAIL_VERIFIED",
|
||||
@ -894,7 +894,7 @@ export function getSyncerTableColumns(syncer) {
|
||||
"isHashed": true,
|
||||
"values": [
|
||||
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "FIRST_NAME",
|
||||
@ -903,7 +903,7 @@ export function getSyncerTableColumns(syncer) {
|
||||
"isHashed": true,
|
||||
"values": [
|
||||
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "LAST_NAME",
|
||||
@ -912,7 +912,7 @@ export function getSyncerTableColumns(syncer) {
|
||||
"isHashed": true,
|
||||
"values": [
|
||||
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "CREATED_TIMESTAMP",
|
||||
@ -921,7 +921,7 @@ export function getSyncerTableColumns(syncer) {
|
||||
"isHashed": true,
|
||||
"values": [
|
||||
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "ENABLED",
|
||||
@ -930,8 +930,8 @@ export function getSyncerTableColumns(syncer) {
|
||||
"isHashed": true,
|
||||
"values": [
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
},
|
||||
];
|
||||
default:
|
||||
return [];
|
||||
|
@ -101,7 +101,7 @@ class SignupTable extends React.Component {
|
||||
}
|
||||
</Select>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("provider:visible"),
|
||||
@ -123,7 +123,7 @@ class SignupTable extends React.Component {
|
||||
}
|
||||
}} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("provider:required"),
|
||||
@ -140,7 +140,7 @@ class SignupTable extends React.Component {
|
||||
this.updateField(table, index, "required", checked);
|
||||
}} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("provider:prompted"),
|
||||
@ -161,7 +161,7 @@ class SignupTable extends React.Component {
|
||||
this.updateField(table, index, "prompted", checked);
|
||||
}} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("application:rule"),
|
||||
@ -201,7 +201,7 @@ class SignupTable extends React.Component {
|
||||
}
|
||||
</Select>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Action"),
|
||||
@ -221,7 +221,7 @@ class SignupTable extends React.Component {
|
||||
</Tooltip>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -50,7 +50,7 @@ class SyncerListPage extends BaseListPage {
|
||||
SyncerBackend.addSyncer(newSyncer)
|
||||
.then((res) => {
|
||||
this.props.history.push({pathname: `/syncers/${newSyncer.name}`, mode: "add"});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Syncer failed to add: ${error}`);
|
||||
@ -65,7 +65,7 @@ class SyncerListPage extends BaseListPage {
|
||||
data: Setting.deleteRow(this.state.data, i),
|
||||
pagination: {total: this.state.pagination.total - 1},
|
||||
});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Syncer failed to delete: ${error}`);
|
||||
@ -78,7 +78,7 @@ class SyncerListPage extends BaseListPage {
|
||||
.then((res) => {
|
||||
this.setState({loading: false});
|
||||
Setting.showMessage("success", "Syncer sync users successfully");
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
this.setState({loading: false});
|
||||
@ -101,7 +101,7 @@ class SyncerListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Name"),
|
||||
@ -117,7 +117,7 @@ class SyncerListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Created time"),
|
||||
@ -127,7 +127,7 @@ class SyncerListPage extends BaseListPage {
|
||||
sorter: true,
|
||||
render: (text, record, index) => {
|
||||
return Setting.getFormattedDate(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("provider:Type"),
|
||||
@ -212,7 +212,7 @@ class SyncerListPage extends BaseListPage {
|
||||
return (
|
||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Action"),
|
||||
@ -233,7 +233,7 @@ class SyncerListPage extends BaseListPage {
|
||||
</Popconfirm>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -73,7 +73,7 @@ class SyncerTableColumnTable extends React.Component {
|
||||
this.updateField(table, index, "name", e.target.value);
|
||||
}} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("syncer:Column type"),
|
||||
@ -88,7 +88,7 @@ class SyncerTableColumnTable extends React.Component {
|
||||
}
|
||||
</Select>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("syncer:Casdoor column"),
|
||||
@ -105,7 +105,7 @@ class SyncerTableColumnTable extends React.Component {
|
||||
}
|
||||
</Select>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("syncer:Is hashed"),
|
||||
@ -117,7 +117,7 @@ class SyncerTableColumnTable extends React.Component {
|
||||
this.updateField(table, index, "isHashed", checked);
|
||||
}} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Action"),
|
||||
@ -137,7 +137,7 @@ class SyncerTableColumnTable extends React.Component {
|
||||
</Tooltip>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -54,6 +54,6 @@ function testEmailProvider(provider, email = "") {
|
||||
return fetch(`${Setting.ServerUrl}/api/send-email`, {
|
||||
method: "POST",
|
||||
credentials: "include",
|
||||
body: JSON.stringify(emailForm)
|
||||
body: JSON.stringify(emailForm),
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class TokenListPage extends BaseListPage {
|
||||
TokenBackend.addToken(newToken)
|
||||
.then((res) => {
|
||||
this.props.history.push({pathname: `/tokens/${newToken.name}`, mode: "add"});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Token failed to add: ${error}`);
|
||||
@ -58,7 +58,7 @@ class TokenListPage extends BaseListPage {
|
||||
data: Setting.deleteRow(this.state.data, i),
|
||||
pagination: {total: this.state.pagination.total - 1},
|
||||
});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Token failed to delete: ${error}`);
|
||||
@ -81,7 +81,7 @@ class TokenListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Created time"),
|
||||
@ -91,7 +91,7 @@ class TokenListPage extends BaseListPage {
|
||||
sorter: true,
|
||||
render: (text, record, index) => {
|
||||
return Setting.getFormattedDate(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Application"),
|
||||
@ -106,7 +106,7 @@ class TokenListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Organization"),
|
||||
@ -121,7 +121,7 @@ class TokenListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:User"),
|
||||
@ -136,7 +136,7 @@ class TokenListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("token:Authorization code"),
|
||||
@ -147,7 +147,7 @@ class TokenListPage extends BaseListPage {
|
||||
...this.getColumnSearchProps("code"),
|
||||
render: (text, record, index) => {
|
||||
return Setting.getClickable(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("token:Access token"),
|
||||
@ -159,7 +159,7 @@ class TokenListPage extends BaseListPage {
|
||||
...this.getColumnSearchProps("accessToken"),
|
||||
render: (text, record, index) => {
|
||||
return Setting.getClickable(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("token:Expires in"),
|
||||
@ -202,7 +202,7 @@ class TokenListPage extends BaseListPage {
|
||||
</Popconfirm>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -71,7 +71,7 @@ class UrlTable extends React.Component {
|
||||
this.updateField(table, index, e.target.value);
|
||||
}} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Action"),
|
||||
@ -91,7 +91,7 @@ class UrlTable extends React.Component {
|
||||
</Tooltip>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -469,7 +469,7 @@ class UserEditPage extends React.Component {
|
||||
<OAuthWidget key={providerItem.name} labelSpan={(Setting.isMobile()) ? 10 : 3} user={this.state.user} application={this.state.application} providerItem={providerItem} account={this.props.account} onUnlinked={() => {return this.unlinked();}} />
|
||||
) : (
|
||||
<SamlWidget key={providerItem.name} labelSpan={(Setting.isMobile()) ? 10 : 3} user={this.state.user} application={this.state.application} providerItem={providerItem} onUnlinked={() => {return this.unlinked();}} />
|
||||
)
|
||||
),
|
||||
)
|
||||
)
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ class UserListPage extends BaseListPage {
|
||||
UserBackend.addUser(newUser)
|
||||
.then((res) => {
|
||||
this.props.history.push({pathname: `/users/${newUser.owner}/${newUser.name}`, mode: "add"});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `User failed to add: ${error}`);
|
||||
@ -85,7 +85,7 @@ class UserListPage extends BaseListPage {
|
||||
data: Setting.deleteRow(this.state.data, i),
|
||||
pagination: {total: this.state.pagination.total - 1},
|
||||
});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `User failed to delete: ${error}`);
|
||||
@ -152,7 +152,7 @@ class UserListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Application"),
|
||||
@ -168,7 +168,7 @@ class UserListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Name"),
|
||||
@ -184,7 +184,7 @@ class UserListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Created time"),
|
||||
@ -194,7 +194,7 @@ class UserListPage extends BaseListPage {
|
||||
sorter: true,
|
||||
render: (text, record, index) => {
|
||||
return Setting.getFormattedDate(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Display name"),
|
||||
@ -215,7 +215,7 @@ class UserListPage extends BaseListPage {
|
||||
<img src={text} alt={text} width={50} />
|
||||
</a>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Email"),
|
||||
@ -230,7 +230,7 @@ class UserListPage extends BaseListPage {
|
||||
{text}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Phone"),
|
||||
@ -281,7 +281,7 @@ class UserListPage extends BaseListPage {
|
||||
return (
|
||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("user:Is global admin"),
|
||||
@ -293,7 +293,7 @@ class UserListPage extends BaseListPage {
|
||||
return (
|
||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("user:Is forbidden"),
|
||||
@ -305,7 +305,7 @@ class UserListPage extends BaseListPage {
|
||||
return (
|
||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("user:Is deleted"),
|
||||
@ -317,7 +317,7 @@ class UserListPage extends BaseListPage {
|
||||
return (
|
||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Action"),
|
||||
@ -337,7 +337,7 @@ class UserListPage extends BaseListPage {
|
||||
</Popconfirm>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -35,8 +35,8 @@ class WebAuthnCredentialTable extends React.Component {
|
||||
{i18next.t("general:Delete")}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
|
@ -84,8 +84,8 @@ const userTemplate = {
|
||||
"phoneVerifiedTime": "",
|
||||
"renameQuota": "3",
|
||||
"tagline": "",
|
||||
"website": ""
|
||||
}
|
||||
"website": "",
|
||||
},
|
||||
};
|
||||
|
||||
class WebhookEditPage extends React.Component {
|
||||
|
@ -72,7 +72,7 @@ class WebhookHeaderTable extends React.Component {
|
||||
this.updateField(table, index, "name", e.target.value);
|
||||
}} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("webhook:Value"),
|
||||
@ -84,7 +84,7 @@ class WebhookHeaderTable extends React.Component {
|
||||
this.updateField(table, index, "value", e.target.value);
|
||||
}} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Action"),
|
||||
@ -104,7 +104,7 @@ class WebhookHeaderTable extends React.Component {
|
||||
</Tooltip>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -43,7 +43,7 @@ class WebhookListPage extends BaseListPage {
|
||||
WebhookBackend.addWebhook(newWebhook)
|
||||
.then((res) => {
|
||||
this.props.history.push({pathname: `/webhooks/${newWebhook.name}`, mode: "add"});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Webhook failed to add: ${error}`);
|
||||
@ -58,7 +58,7 @@ class WebhookListPage extends BaseListPage {
|
||||
data: Setting.deleteRow(this.state.data, i),
|
||||
pagination: {total: this.state.pagination.total - 1},
|
||||
});
|
||||
}
|
||||
},
|
||||
)
|
||||
.catch(error => {
|
||||
Setting.showMessage("error", `Webhook failed to delete: ${error}`);
|
||||
@ -80,7 +80,7 @@ class WebhookListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Name"),
|
||||
@ -96,7 +96,7 @@ class WebhookListPage extends BaseListPage {
|
||||
{text}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Created time"),
|
||||
@ -106,7 +106,7 @@ class WebhookListPage extends BaseListPage {
|
||||
sorter: true,
|
||||
render: (text, record, index) => {
|
||||
return Setting.getFormattedDate(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("webhook:URL"),
|
||||
@ -123,7 +123,7 @@ class WebhookListPage extends BaseListPage {
|
||||
}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("webhook:Method"),
|
||||
@ -143,7 +143,7 @@ class WebhookListPage extends BaseListPage {
|
||||
filters: [
|
||||
{text: "application/json", value: "application/json"},
|
||||
{text: "application/x-www-form-urlencoded", value: "application/x-www-form-urlencoded"},
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
title: i18next.t("webhook:Events"),
|
||||
@ -154,7 +154,7 @@ class WebhookListPage extends BaseListPage {
|
||||
...this.getColumnSearchProps("events"),
|
||||
render: (text, record, index) => {
|
||||
return Setting.getTags(text);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("webhook:Is user extended"),
|
||||
@ -166,7 +166,7 @@ class WebhookListPage extends BaseListPage {
|
||||
return (
|
||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Is enabled"),
|
||||
@ -178,7 +178,7 @@ class WebhookListPage extends BaseListPage {
|
||||
return (
|
||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Action"),
|
||||
@ -198,7 +198,7 @@ class WebhookListPage extends BaseListPage {
|
||||
</Popconfirm>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -17,7 +17,7 @@ import {authConfig} from "./Auth";
|
||||
export function getAccount(query) {
|
||||
return fetch(`${authConfig.serverUrl}/api/get-account${query}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ class ForgetPage extends React.Component {
|
||||
} else {
|
||||
Util.showMessage(
|
||||
"error",
|
||||
i18next.t("forget:Unknown forget type: ") + this.state.type
|
||||
i18next.t("forget:Unknown forget type: ") + this.state.type,
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -77,7 +77,7 @@ class ForgetPage extends React.Component {
|
||||
this.setState({
|
||||
application: application,
|
||||
});
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ class ForgetPage extends React.Component {
|
||||
AuthBackend.getEmailAndPhone({
|
||||
application: forms.step1.getFieldValue("application"),
|
||||
organization: forms.step1.getFieldValue("organization"),
|
||||
username: username
|
||||
username: username,
|
||||
}).then((res) => {
|
||||
if (res.status === "ok") {
|
||||
const phone = res.data.phone;
|
||||
@ -147,7 +147,7 @@ class ForgetPage extends React.Component {
|
||||
name: this.state.name,
|
||||
code: forms.step2.getFieldValue("emailCode"),
|
||||
phonePrefix: this.state.application?.organizationObj.phonePrefix,
|
||||
type: "login"
|
||||
type: "login",
|
||||
}, oAuthParams).then(res => {
|
||||
if (res.status === "ok") {
|
||||
this.setState({current: 2, userId: res.data, username: res.data.split("/")[1]});
|
||||
@ -182,7 +182,7 @@ class ForgetPage extends React.Component {
|
||||
options.push(
|
||||
<Option key={"phone"} value={"phone"}>
|
||||
{this.state.phone}
|
||||
</Option>
|
||||
</Option>,
|
||||
);
|
||||
}
|
||||
|
||||
@ -190,7 +190,7 @@ class ForgetPage extends React.Component {
|
||||
options.push(
|
||||
<Option key={"email"} value={"email"}>
|
||||
{this.state.email}
|
||||
</Option>
|
||||
</Option>,
|
||||
);
|
||||
}
|
||||
|
||||
@ -222,7 +222,7 @@ class ForgetPage extends React.Component {
|
||||
{
|
||||
required: true,
|
||||
message: i18next.t(
|
||||
"forget:Please input your application!"
|
||||
"forget:Please input your application!",
|
||||
),
|
||||
},
|
||||
]}
|
||||
@ -234,7 +234,7 @@ class ForgetPage extends React.Component {
|
||||
{
|
||||
required: true,
|
||||
message: i18next.t(
|
||||
"forget:Please input your organization!"
|
||||
"forget:Please input your organization!",
|
||||
),
|
||||
},
|
||||
]}
|
||||
@ -245,7 +245,7 @@ class ForgetPage extends React.Component {
|
||||
{
|
||||
required: true,
|
||||
message: i18next.t(
|
||||
"forget:Please input your username!"
|
||||
"forget:Please input your username!",
|
||||
),
|
||||
whitespace: true,
|
||||
},
|
||||
@ -278,7 +278,7 @@ class ForgetPage extends React.Component {
|
||||
this.onFinishFailed(
|
||||
errorInfo.values,
|
||||
errorInfo.errorFields,
|
||||
errorInfo.outOfDate
|
||||
errorInfo.outOfDate,
|
||||
)
|
||||
}
|
||||
initialValues={{
|
||||
@ -295,7 +295,7 @@ class ForgetPage extends React.Component {
|
||||
{
|
||||
required: true,
|
||||
message: i18next.t(
|
||||
"forget:Please input your application!"
|
||||
"forget:Please input your application!",
|
||||
),
|
||||
},
|
||||
]}
|
||||
@ -307,7 +307,7 @@ class ForgetPage extends React.Component {
|
||||
{
|
||||
required: true,
|
||||
message: i18next.t(
|
||||
"forget:Please input your organization!"
|
||||
"forget:Please input your organization!",
|
||||
),
|
||||
},
|
||||
]}
|
||||
@ -343,7 +343,7 @@ class ForgetPage extends React.Component {
|
||||
{
|
||||
required: true,
|
||||
message: i18next.t(
|
||||
"code:Please input your verification code!"
|
||||
"code:Please input your verification code!",
|
||||
),
|
||||
},
|
||||
]}
|
||||
@ -382,7 +382,7 @@ class ForgetPage extends React.Component {
|
||||
this.onFinishFailed(
|
||||
errorInfo.values,
|
||||
errorInfo.errorFields,
|
||||
errorInfo.outOfDate
|
||||
errorInfo.outOfDate,
|
||||
)
|
||||
}
|
||||
initialValues={{
|
||||
@ -399,7 +399,7 @@ class ForgetPage extends React.Component {
|
||||
{
|
||||
required: true,
|
||||
message: i18next.t(
|
||||
"forget:Please input your application!"
|
||||
"forget:Please input your application!",
|
||||
),
|
||||
},
|
||||
]}
|
||||
@ -411,7 +411,7 @@ class ForgetPage extends React.Component {
|
||||
{
|
||||
required: true,
|
||||
message: i18next.t(
|
||||
"forget:Please input your organization!"
|
||||
"forget:Please input your organization!",
|
||||
),
|
||||
},
|
||||
]}
|
||||
@ -423,7 +423,7 @@ class ForgetPage extends React.Component {
|
||||
{
|
||||
required: true,
|
||||
message: i18next.t(
|
||||
"forget:Please input your password!"
|
||||
"forget:Please input your password!",
|
||||
),
|
||||
},
|
||||
]}
|
||||
@ -443,7 +443,7 @@ class ForgetPage extends React.Component {
|
||||
{
|
||||
required: true,
|
||||
message: i18next.t(
|
||||
"forget:Please confirm your password!"
|
||||
"forget:Please confirm your password!",
|
||||
),
|
||||
},
|
||||
({getFieldValue}) => ({
|
||||
@ -453,8 +453,8 @@ class ForgetPage extends React.Component {
|
||||
}
|
||||
return Promise.reject(
|
||||
i18next.t(
|
||||
"forget:Your confirmed password is inconsistent with the password!"
|
||||
)
|
||||
"forget:Your confirmed password is inconsistent with the password!",
|
||||
),
|
||||
);
|
||||
},
|
||||
}),
|
||||
|
@ -46,7 +46,7 @@ class LoginPage extends React.Component {
|
||||
validEmailOrPhone: false,
|
||||
validEmail: false,
|
||||
validPhone: false,
|
||||
loginMethod: "password"
|
||||
loginMethod: "password",
|
||||
};
|
||||
|
||||
if (this.state.type === "cas" && props.match?.params.casApplicationName !== undefined) {
|
||||
@ -107,7 +107,7 @@ class LoginPage extends React.Component {
|
||||
this.setState({
|
||||
application: application,
|
||||
});
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@ -291,7 +291,7 @@ class LoginPage extends React.Component {
|
||||
<Button type="primary" key="signin">
|
||||
Sign In
|
||||
</Button>
|
||||
</Link>
|
||||
</Link>,
|
||||
]}
|
||||
>
|
||||
</Result>
|
||||
@ -339,7 +339,7 @@ class LoginPage extends React.Component {
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: i18next.t("login:Please input your username, Email or phone!")
|
||||
message: i18next.t("login:Please input your username, Email or phone!"),
|
||||
},
|
||||
{
|
||||
validator: (_, value) => {
|
||||
@ -359,8 +359,8 @@ class LoginPage extends React.Component {
|
||||
|
||||
this.setState({validEmailOrPhone: true});
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input
|
||||
@ -557,7 +557,7 @@ class LoginPage extends React.Component {
|
||||
let application = this.getApplicationObj();
|
||||
return fetch(`${Setting.ServerUrl}/api/webauthn/signin/begin?owner=${application.organization}&name=${username}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
})
|
||||
.then(res => res.json())
|
||||
.then((credentialRequestOptions) => {
|
||||
@ -572,7 +572,7 @@ class LoginPage extends React.Component {
|
||||
});
|
||||
|
||||
return navigator.credentials.get({
|
||||
publicKey: credentialRequestOptions.publicKey
|
||||
publicKey: credentialRequestOptions.publicKey,
|
||||
});
|
||||
})
|
||||
.then((assertion) => {
|
||||
@ -594,7 +594,7 @@ class LoginPage extends React.Component {
|
||||
signature: UserWebauthnBackend.webAuthnBufferEncode(sig),
|
||||
userHandle: UserWebauthnBackend.webAuthnBufferEncode(userHandle),
|
||||
},
|
||||
})
|
||||
}),
|
||||
})
|
||||
.then(res => res.json()).then((res) => {
|
||||
if (res.msg === "") {
|
||||
|
@ -202,7 +202,7 @@ class PromptPage extends React.Component {
|
||||
Setting.goToLogin(this, application);
|
||||
}}>
|
||||
Sign In
|
||||
</Button>
|
||||
</Button>,
|
||||
]}
|
||||
>
|
||||
</Result>
|
||||
|
@ -34,7 +34,7 @@ const authInfo = {
|
||||
scope: "snsapi_login",
|
||||
endpoint: "https://open.weixin.qq.com/connect/qrconnect",
|
||||
mpScope: "snsapi_userinfo",
|
||||
mpEndpoint: "https://open.weixin.qq.com/connect/oauth2/authorize"
|
||||
mpEndpoint: "https://open.weixin.qq.com/connect/oauth2/authorize",
|
||||
},
|
||||
WeChatMiniProgram: {
|
||||
endpoint: "https://mp.weixin.qq.com/",
|
||||
@ -119,8 +119,8 @@ const authInfo = {
|
||||
endpoint: "https://example.com/",
|
||||
},
|
||||
Bilibili: {
|
||||
endpoint: "https://passport.bilibili.com/register/pc_oauth2.html"
|
||||
}
|
||||
endpoint: "https://passport.bilibili.com/register/pc_oauth2.html",
|
||||
},
|
||||
};
|
||||
|
||||
export function getProviderUrl(provider) {
|
||||
|
@ -73,7 +73,7 @@ class ResultPage extends React.Component {
|
||||
}
|
||||
}}>
|
||||
{i18next.t("login:Sign In")}
|
||||
</Button>
|
||||
</Button>,
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
|
@ -340,8 +340,8 @@ class SignupPage extends React.Component {
|
||||
|
||||
this.setState({validEmail: true});
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input onChange={e => this.setState({email: e.target.value})} />
|
||||
@ -386,8 +386,8 @@ class SignupPage extends React.Component {
|
||||
|
||||
this.setState({validPhone: true});
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input
|
||||
@ -530,7 +530,7 @@ class SignupPage extends React.Component {
|
||||
Setting.goToLogin(this, application);
|
||||
}}>
|
||||
Sign In
|
||||
</Button>
|
||||
</Button>,
|
||||
]}
|
||||
>
|
||||
</Result>
|
||||
|
@ -17,28 +17,28 @@ import * as Setting from "../Setting";
|
||||
export function getApplications(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-applications?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getApplicationsByOrganization(owner, organization) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-applications?owner=${owner}&organization=${organization}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getApplication(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-application?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getUserApplication(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-user-application?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
@ -73,6 +73,6 @@ export function deleteApplication(application) {
|
||||
export function getSamlMetadata(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/saml/metadata?application=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.text());
|
||||
}
|
||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
||||
export function getCerts(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-certs?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getCert(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-cert?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
||||
export function getModels(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-models?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getModel(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-model?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
||||
export function getOrganizations(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-organizations?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getOrganization(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-organization?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
||||
export function getPayments(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-payments?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getPayment(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-payment?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
@ -58,6 +58,6 @@ export function deletePayment(payment) {
|
||||
export function invoicePayment(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/invoice-payment?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "POST",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
||||
export function getPermissions(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-permissions?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getPermission(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-permission?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
||||
export function getProducts(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-products?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getProduct(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-product?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
||||
export function getProviders(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-providers?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getProvider(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-provider?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,6 @@ import * as Setting from "../Setting";
|
||||
export function getRecords(page, pageSize, field = "", value = "", sortField = "", sortOrder = "") {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-records?pageSize=${pageSize}&p=${page}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
||||
export function getResources(owner, user, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-resources?owner=${owner}&user=${user}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getResource(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-resource?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
||||
export function getRoles(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-roles?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getRole(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-role?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
||||
export function getSyncers(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-syncers?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getSyncer(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-syncer?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
||||
export function getTokens(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-tokens?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getToken(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-token?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
|
@ -18,21 +18,21 @@ import i18next from "i18next";
|
||||
export function getGlobalUsers(page, pageSize, field = "", value = "", sortField = "", sortOrder = "") {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-global-users?p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getUsers(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-users?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getUser(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-user?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ export function setPassword(userOwner, userName, oldPassword, newPassword) {
|
||||
return fetch(`${Setting.ServerUrl}/api/set-password`, {
|
||||
method: "POST",
|
||||
credentials: "include",
|
||||
body: formData
|
||||
body: formData,
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ export function sendCode(checkType, checkId, checkKey, dest, type, applicationId
|
||||
return fetch(`${Setting.ServerUrl}/api/send-verification-code`, {
|
||||
method: "POST",
|
||||
credentials: "include",
|
||||
body: formData
|
||||
body: formData,
|
||||
}).then(res => res.json()).then(res => {
|
||||
if (res.status === "ok") {
|
||||
Setting.showMessage("success", i18next.t("user:Code Sent"));
|
||||
@ -120,7 +120,7 @@ export function verifyCaptcha(captchaType, captchaToken, clientSecret) {
|
||||
return fetch(`${Setting.ServerUrl}/api/verify-captcha`, {
|
||||
method: "POST",
|
||||
credentials: "include",
|
||||
body: formData
|
||||
body: formData,
|
||||
}).then(res => res.json()).then(res => {
|
||||
if (res.status === "ok") {
|
||||
if (res.data) {
|
||||
@ -144,12 +144,12 @@ export function resetEmailOrPhone(dest, type, code) {
|
||||
return fetch(`${Setting.ServerUrl}/api/reset-email-or-phone`, {
|
||||
method: "POST",
|
||||
credentials: "include",
|
||||
body: formData
|
||||
body: formData,
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getCaptcha(owner, name, isCurrentProvider) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-captcha?applicationId=${owner}/${encodeURIComponent(name)}&isCurrentProvider=${isCurrentProvider}`, {
|
||||
method: "GET"
|
||||
method: "GET",
|
||||
}).then(res => res.json()).then(res => res.data);
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ import * as Setting from "../Setting";
|
||||
export function registerWebauthnCredential() {
|
||||
return fetch(`${Setting.ServerUrl}/api/webauthn/signup/begin`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
})
|
||||
.then(res => res.json())
|
||||
.then((credentialCreationOptions) => {
|
||||
@ -29,7 +29,7 @@ export function registerWebauthnCredential() {
|
||||
}
|
||||
}
|
||||
return navigator.credentials.create({
|
||||
publicKey: credentialCreationOptions.publicKey
|
||||
publicKey: credentialCreationOptions.publicKey,
|
||||
});
|
||||
})
|
||||
.then((credential) => {
|
||||
@ -47,7 +47,7 @@ export function registerWebauthnCredential() {
|
||||
attestationObject: webAuthnBufferEncode(attestationObject),
|
||||
clientDataJSON: webAuthnBufferEncode(clientDataJSON),
|
||||
},
|
||||
})
|
||||
}),
|
||||
})
|
||||
.then(res => res.json());
|
||||
});
|
||||
@ -61,7 +61,7 @@ export function deleteUserWebAuthnCredential(credentialID) {
|
||||
method: "POST",
|
||||
credentials: "include",
|
||||
body: form,
|
||||
dataType: "text"
|
||||
dataType: "text",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
|
@ -17,14 +17,14 @@ import * as Setting from "../Setting";
|
||||
export function getWebhooks(owner, page = "", pageSize = "", field = "", value = "", sortField = "", sortOrder = "") {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-webhooks?owner=${owner}&p=${page}&pageSize=${pageSize}&field=${field}&value=${value}&sortField=${sortField}&sortOrder=${sortOrder}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function getWebhook(owner, name) {
|
||||
return fetch(`${Setting.ServerUrl}/api/get-webhook?id=${owner}/${encodeURIComponent(name)}`, {
|
||||
method: "GET",
|
||||
credentials: "include"
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ export const CountDownInput = (props) => {
|
||||
width: "200px",
|
||||
borderRadius: "3px",
|
||||
border: "1px solid #ccc",
|
||||
marginBottom: 10
|
||||
marginBottom: 10,
|
||||
}}
|
||||
/>
|
||||
<Row>
|
||||
|
@ -26,7 +26,7 @@ ReactDOM.render(
|
||||
<BrowserRouter>
|
||||
<App />
|
||||
</BrowserRouter>,
|
||||
document.getElementById("root")
|
||||
document.getElementById("root"),
|
||||
);
|
||||
|
||||
// If you want your app to work offline and load faster, you can change
|
||||
|
@ -30,8 +30,8 @@ const isLocalhost = Boolean(
|
||||
window.location.hostname === "[::1]" ||
|
||||
// 127.0.0.0/8 are considered localhost for IPv4.
|
||||
window.location.hostname.match(
|
||||
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
|
||||
)
|
||||
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/,
|
||||
),
|
||||
);
|
||||
|
||||
export function register(config) {
|
||||
@ -57,7 +57,7 @@ export function register(config) {
|
||||
navigator.serviceWorker.ready.then(() => {
|
||||
console.log(
|
||||
"This web app is being served cache-first by a service " +
|
||||
"worker. To learn more, visit https://bit.ly/CRA-PWA"
|
||||
"worker. To learn more, visit https://bit.ly/CRA-PWA",
|
||||
);
|
||||
});
|
||||
} else {
|
||||
@ -85,7 +85,7 @@ function registerValidSW(swUrl, config) {
|
||||
// content until all client tabs are closed.
|
||||
console.log(
|
||||
"New content is available and will be used when all " +
|
||||
"tabs for this page are closed. See https://bit.ly/CRA-PWA."
|
||||
"tabs for this page are closed. See https://bit.ly/CRA-PWA.",
|
||||
);
|
||||
|
||||
// Execute callback
|
||||
@ -137,7 +137,7 @@ function checkValidServiceWorker(swUrl, config) {
|
||||
})
|
||||
.catch(() => {
|
||||
console.log(
|
||||
"No internet connection found. App is running in offline mode."
|
||||
"No internet connection found. App is running in offline mode.",
|
||||
);
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user