Merge pull request #597 from kinode-dao/develop

fix: remove app store secure subdomain from links
This commit is contained in:
doria 2024-11-05 14:49:07 -05:00 committed by GitHub
commit 4ffa5b5703
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 9 deletions

View File

@ -9,7 +9,7 @@ const Header: React.FC = () => {
<header className="app-header">
<div className="header-left">
<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 />
</button>
<Link to={STORE_PATH} className={location.pathname === STORE_PATH ? 'active' : ''}>Apps</Link>

View File

@ -62,7 +62,7 @@ export default function AppPage() {
if (app) {
const launchUrl = getLaunchUrl(`${app.package_id.package_name}:${app.package_id.publisher_node}`);
if (launchUrl) {
window.location.href = launchUrl;
window.location.href = window.location.origin.replace('//app-store-sys.', '//') + launchUrl;
}
}
}, [app, getLaunchUrl]);

View File

@ -178,7 +178,7 @@ export default function DownloadPage() {
const handleLaunch = useCallback(() => {
if (launchPath) {
window.location.href = launchPath;
window.location.href = window.location.origin.replace('//app-store-sys.', '//') + launchPath;
}
}, [launchPath]);

View File

@ -77,12 +77,7 @@ function populate_contacts(contacts) {
document.getElementById('back-button').addEventListener('click', () => {
// set page to `/` while also removing the subdomain
const url = new URL(window.location.href);
if (url.hostname.split('.')[0] === 'contacts-sys') {
url.hostname = url.hostname.split('.').slice(1).join('.');
}
url.pathname = '/';
window.location.href = url.toString();
window.location.href = window.location.origin.replace('//contacts-sys.', '//') + '/'
});
document.getElementById('add-contact').addEventListener('submit', (e) => {