mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-12-23 00:21:38 +03:00
Merge pull request #597 from kinode-dao/develop
fix: remove app store secure subdomain from links
This commit is contained in:
commit
4ffa5b5703
@ -9,7 +9,7 @@ const Header: React.FC = () => {
|
|||||||
<header className="app-header">
|
<header className="app-header">
|
||||||
<div className="header-left">
|
<div className="header-left">
|
||||||
<nav>
|
<nav>
|
||||||
<button onClick={() => window.location.href = '/'} className="home-button">
|
<button onClick={() => window.location.href = window.location.origin.replace('//app-store-sys.', '//') + '/'} className="home-button">
|
||||||
<FaHome />
|
<FaHome />
|
||||||
</button>
|
</button>
|
||||||
<Link to={STORE_PATH} className={location.pathname === STORE_PATH ? 'active' : ''}>Apps</Link>
|
<Link to={STORE_PATH} className={location.pathname === STORE_PATH ? 'active' : ''}>Apps</Link>
|
||||||
|
@ -62,7 +62,7 @@ export default function AppPage() {
|
|||||||
if (app) {
|
if (app) {
|
||||||
const launchUrl = getLaunchUrl(`${app.package_id.package_name}:${app.package_id.publisher_node}`);
|
const launchUrl = getLaunchUrl(`${app.package_id.package_name}:${app.package_id.publisher_node}`);
|
||||||
if (launchUrl) {
|
if (launchUrl) {
|
||||||
window.location.href = launchUrl;
|
window.location.href = window.location.origin.replace('//app-store-sys.', '//') + launchUrl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [app, getLaunchUrl]);
|
}, [app, getLaunchUrl]);
|
||||||
|
@ -178,7 +178,7 @@ export default function DownloadPage() {
|
|||||||
|
|
||||||
const handleLaunch = useCallback(() => {
|
const handleLaunch = useCallback(() => {
|
||||||
if (launchPath) {
|
if (launchPath) {
|
||||||
window.location.href = launchPath;
|
window.location.href = window.location.origin.replace('//app-store-sys.', '//') + launchPath;
|
||||||
}
|
}
|
||||||
}, [launchPath]);
|
}, [launchPath]);
|
||||||
|
|
||||||
|
@ -77,12 +77,7 @@ function populate_contacts(contacts) {
|
|||||||
|
|
||||||
document.getElementById('back-button').addEventListener('click', () => {
|
document.getElementById('back-button').addEventListener('click', () => {
|
||||||
// set page to `/` while also removing the subdomain
|
// set page to `/` while also removing the subdomain
|
||||||
const url = new URL(window.location.href);
|
window.location.href = window.location.origin.replace('//contacts-sys.', '//') + '/'
|
||||||
if (url.hostname.split('.')[0] === 'contacts-sys') {
|
|
||||||
url.hostname = url.hostname.split('.').slice(1).join('.');
|
|
||||||
}
|
|
||||||
url.pathname = '/';
|
|
||||||
window.location.href = url.toString();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById('add-contact').addEventListener('submit', (e) => {
|
document.getElementById('add-contact').addEventListener('submit', (e) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user