Merge pull request #1 from OpenSignLabs/main

fix: update repo
This commit is contained in:
RaktimaNXG
2023-10-30 11:29:13 +05:30
committed by GitHub
6 changed files with 71 additions and 13 deletions
+18
View File
@@ -79,6 +79,24 @@
"contributions": [
"doc"
]
},
{
"login": "HansF",
"name": "Hans Fraiponts",
"avatar_url": "https://avatars.githubusercontent.com/u/1503?v=4",
"profile": "https://github.com/HansF",
"contributions": [
"doc"
]
},
{
"login": "Monilprajapati",
"name": "Monil Prajapati",
"avatar_url": "https://avatars.githubusercontent.com/u/99136041?v=4",
"profile": "http://linktr.ee/monilprajapati",
"contributions": [
"code"
]
}
]
}
+14
View File
@@ -0,0 +1,14 @@
# Clone the repo and rename this file to .env if you want to run the frontend react app locally for some quick contributions to the project.
# When used as it is, this env config will connect to our hosted UAT backend
# Note that any data in staging will get cleared from time to time and you may have to sign up again and again
# Set CI to false while running the app locally
CI=false
# Set it to the URL form where the app home page will be accessed
PUBLIC_URL=http://localhost:3000
# Set it to true if you want to generate the Sourcemap for debugging
GENERATE_SOURCEMAP=false
# Set it to the URL from where APIs will be accessible, for local development it should be localhost:3000/api/app (use your local port number instead)
REACT_APP_SERVERURL=https://staging-app.opensignlabs.com/api/app
# A 12 character long random app identifier. The value of this should be same as APP_ID which is a variable used by backend API.
REACT_APP_APPID=opensignstgn
+1 -1
View File
@@ -1,7 +1,7 @@
# INSTALLATON INSTRUCTIONS
You can use our app as a cloud version from [OpenSignLabs](www.opensignlabs.com)
You can use our app as a cloud version from [OpenSignLabs](https://www.opensignlabs.com)
or follow below instructions to install it on your own infrastructure.
+2
View File
@@ -116,6 +116,8 @@ We would like to thank all our contributors and users for their support and feed
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://jobinselvanose.com"><img src="https://avatars.githubusercontent.com/u/63976083?v=4?s=100" width="100px;" alt="Jobin Selvanose"/><br /><sub><b>Jobin Selvanose</b></sub></a><br /><a href="#doc-Jobin-S" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/HansF"><img src="https://avatars.githubusercontent.com/u/1503?v=4?s=100" width="100px;" alt="Hans Fraiponts"/><br /><sub><b>Hans Fraiponts</b></sub></a><br /><a href="#doc-HansF" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://linktr.ee/monilprajapati"><img src="https://avatars.githubusercontent.com/u/99136041?v=4?s=100" width="100px;" alt="Monil Prajapati"/><br /><sub><b>Monil Prajapati</b></sub></a><br /><a href="#code-Monilprajapati" title="Code">💻</a></td>
</tr>
</tbody>
</table>
+4 -2
View File
@@ -8,8 +8,10 @@ export const fetchAppInfo = (str, burl, app_id) => async (dispatch) => {
Parse.initialize(app_id);
const response = appInfo;
let _base = response.baseurl.charAt(response.baseurl.length - 1);
localStorage.removeItem("baseUrl");
let _base = ""; // Define _base here and initialize it to an empty string
if (response && response.baseurl) {
_base = response.baseurl.charAt(response.baseurl.length - 1);
} localStorage.removeItem("baseUrl");
localStorage.setItem("_appName", response.appname);
localStorage.setItem("_app_objectId", response.objectId);
if (_base === "/") {
+32 -10
View File
@@ -1,4 +1,4 @@
import React, { Component } from "react";
import React, { Component, useState } from "react";
import Parse from "parse";
import "../styles/toast.css";
import "../styles/loader.css";
@@ -17,6 +17,7 @@ class Login extends Component {
toastColor: "#5cb85c",
toastDescription: "",
password: "",
passwordVisible: false,
mobile: "",
phone: "",
OTP: "",
@@ -1009,9 +1010,14 @@ class Login extends Component {
return <Navigate to={_redirect} />;
}
const { email, password } = this.state;
const { email, password, passwordVisible } = this.state;
let image = this.props.appInfo.applogo;
let settings = this.props.appInfo.settings || undefined;
const togglePasswordVisibility = () => {
this.setState((prevState) => ({
passwordVisible: !prevState.passwordVisible
}));
};
return (
<div className="bg-white">
{settings &&
@@ -1061,14 +1067,30 @@ class Login extends Component {
/>
<hr className="my-2 border-none" />
<label className="block text-xs">Password</label>
<input
type="password"
className="px-3 py-2 w-full border-[1px] border-gray-300 rounded focus:outline-none text-xs"
name="password"
value={password}
onChange={this.handleChange}
required
/>
<div className="relative">
<input
type={passwordVisible ? "text" : "password"}
className="px-3 py-2 w-full border-[1px] border-gray-300 rounded focus:outline-none text-xs"
name="password"
value={password}
onChange={this.handleChange}
required
/>
<span
className={`absolute top-[50%] right-[10px] -translate-y-[50%] cursor-pointer ${
passwordVisible
? "text-[#007bff]"
: "text-black"
}`}
onClick={togglePasswordVisibility}
>
{passwordVisible ? (
<i className="fa fa-eye-slash" /> // Close eye icon
) : (
<i className="fa fa-eye" /> // Open eye icon
)}
</span>
</div>
</div>
</div>
<div className="flex flex-row justify-between items-center text-xs px-4 py-2">