Merge branch 'develop' of bitbucket.org:jamkazam/jam-cloud into develop

This commit is contained in:
Seth Call 2024-12-01 10:01:21 -06:00
commit 27b66783c1
2 changed files with 13 additions and 6 deletions

View File

@ -7,7 +7,7 @@ import FalconCardHeader from '../common/FalconCardHeader';
const JKCustomUrlSchemaHandle = () => {
const [urlScheme, setUrlScheme] = useState(null);
const { t } = useTranslation();
useEffect(() => {
const queryStr = window.location.search;
if (!queryStr) return;
@ -32,11 +32,17 @@ const JKCustomUrlSchemaHandle = () => {
<CardBody className="pt-0">
<Row>
<Col>
<div className='pt-5 text-center pb-5'>
<div className="mt-8 text-center mb-8">
{urlScheme && (
<p>
If JamKazam app doesn't open automatically, <a href={urlScheme}>click here</a>.
</p>
<>
<p>
Click <strong>Open JamKazam.app</strong> on the dialog shown by the browser. <br />
If you don't see the dialog, click <strong>Lauhch JamKazam App</strong> below.
</p>
<div>
<a href={urlScheme} className='btn btn-primary'>Lauhch JamKazam App</a>
</div>
</>
)}
</div>
</Col>

View File

@ -3,7 +3,8 @@ export default (section, queryStr) => {
if(queryStr.startsWith('?')) {
queryStr = queryStr.substring(1);
}
const url = encodeURI(`${process.env.REACT_APP_CLIENT_BASE_URL}/client#/${section}/custom~yes|${queryStr}`);
const { hostname } = new URL(process.env.REACT_APP_CLIENT_BASE_URL);
const url = encodeURI(`${hostname}/client#/${section}/custom~yes|${queryStr}`);
const urlScheme = `jamkazam://${url}`;
return urlScheme;
};