parent
a4b27fdeab
commit
1487dcbadc
5 changed files with 12 additions and 11 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "cinny",
|
"name": "cinny",
|
||||||
"version": "1.5.0",
|
"version": "1.5.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cinny",
|
"name": "cinny",
|
||||||
"version": "1.5.0",
|
"version": "1.5.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.4.tgz",
|
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.4.tgz",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "cinny",
|
"name": "cinny",
|
||||||
"version": "1.5.0",
|
"version": "1.5.1",
|
||||||
"description": "Yet another matrix client",
|
"description": "Yet another matrix client",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
|
@ -156,7 +156,7 @@ function Login({ loginFlow, baseUrl }) {
|
||||||
const [typeIndex, setTypeIndex] = useState(0);
|
const [typeIndex, setTypeIndex] = useState(0);
|
||||||
const loginTypes = ['Username', 'Email'];
|
const loginTypes = ['Username', 'Email'];
|
||||||
const isPassword = loginFlow?.filter((flow) => flow.type === 'm.login.password')[0];
|
const isPassword = loginFlow?.filter((flow) => flow.type === 'm.login.password')[0];
|
||||||
const ssoProviders = loginFlow?.filter((flow) => flow.type.match(/^m.login.(sso|cas)$/))[0];
|
const ssoProviders = loginFlow?.filter((flow) => flow.type === 'm.login.sso')[0];
|
||||||
|
|
||||||
const initialValues = {
|
const initialValues = {
|
||||||
username: '', password: '', email: '', other: '',
|
username: '', password: '', email: '', other: '',
|
||||||
|
@ -248,7 +248,7 @@ function Login({ loginFlow, baseUrl }) {
|
||||||
{ssoProviders && isPassword && <Text className="sso__divider">OR</Text>}
|
{ssoProviders && isPassword && <Text className="sso__divider">OR</Text>}
|
||||||
{ssoProviders && (
|
{ssoProviders && (
|
||||||
<SSOButtons
|
<SSOButtons
|
||||||
type={ssoProviders.type.match(/^m.login.(sso|cas)$/)[1]}
|
type="sso"
|
||||||
identityProviders={ssoProviders.identity_providers}
|
identityProviders={ssoProviders.identity_providers}
|
||||||
baseUrl={baseUrl}
|
baseUrl={baseUrl}
|
||||||
/>
|
/>
|
||||||
|
@ -269,7 +269,7 @@ function Register({ registerInfo, loginFlow, baseUrl }) {
|
||||||
const [process, setProcess] = useState({});
|
const [process, setProcess] = useState({});
|
||||||
const formRef = useRef();
|
const formRef = useRef();
|
||||||
|
|
||||||
const ssoProviders = loginFlow?.filter((flow) => flow.type.match(/^m.login.(sso|cas)$/))[0];
|
const ssoProviders = loginFlow?.filter((flow) => flow.type === 'm.login.sso')[0];
|
||||||
const isDisabled = registerInfo.errcode !== undefined;
|
const isDisabled = registerInfo.errcode !== undefined;
|
||||||
const { flows, params, session } = registerInfo;
|
const { flows, params, session } = registerInfo;
|
||||||
|
|
||||||
|
@ -452,7 +452,7 @@ function Register({ registerInfo, loginFlow, baseUrl }) {
|
||||||
)}
|
)}
|
||||||
{isDisabled && ssoProviders && (
|
{isDisabled && ssoProviders && (
|
||||||
<SSOButtons
|
<SSOButtons
|
||||||
type={ssoProviders.type.match(/^m.login.(sso|cas)$/)[1]}
|
type="sso"
|
||||||
identityProviders={ssoProviders.identity_providers}
|
identityProviders={ssoProviders.identity_providers}
|
||||||
baseUrl={baseUrl}
|
baseUrl={baseUrl}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const cons = {
|
const cons = {
|
||||||
version: '1.5.0',
|
version: '1.5.1',
|
||||||
secretKey: {
|
secretKey: {
|
||||||
ACCESS_TOKEN: 'cinny_access_token',
|
ACCESS_TOKEN: 'cinny_access_token',
|
||||||
DEVICE_ID: 'cinny_device_id',
|
DEVICE_ID: 'cinny_device_id',
|
||||||
|
|
|
@ -292,9 +292,10 @@ button {
|
||||||
}
|
}
|
||||||
textarea,
|
textarea,
|
||||||
input,
|
input,
|
||||||
input[type=text]
|
input[type],
|
||||||
input[type=username]
|
input[type=text],
|
||||||
input[type=password]
|
input[type=username],
|
||||||
|
input[type=password],
|
||||||
input[type=email] {
|
input[type=email] {
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
-moz-appearance: none;
|
-moz-appearance: none;
|
||||||
|
|
Loading…
Reference in a new issue