Skip to content

Commit

Permalink
Fix Pulsoid account linking (1.14.5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphiiko committed Oct 30, 2024
1 parent d02075c commit 2c88506
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 14 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.14.5]

### Fixed

- Linking your Pulsoid account through the Pulsoid integration no longer functioning.

## [1.14.4]

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oyasumi",
"version": "1.14.4",
"version": "1.14.5",
"author": "Raphiiko",
"license": "MIT",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions src-core/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "oyasumivr"
version = "1.14.4"
version = "1.14.5"
description = ""
authors = ["Raphiiko"]
license = "MIT"
Expand Down
6 changes: 3 additions & 3 deletions src-core/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"package": {
"productName": "OyasumiVR",
"version": "1.14.4"
"version": "1.14.5"
},
"tauri": {
"allowlist": {
Expand Down Expand Up @@ -201,7 +201,7 @@
"center": true,
"theme": "Dark",
"transparent": true,
"userAgent": "OyasumiVR/1.14.4 (https://github.com/Raphiiko/OyasumiVR)"
"userAgent": "OyasumiVR/1.14.5 (https://github.com/Raphiiko/OyasumiVR)"
},
{
"width": 700,
Expand All @@ -216,7 +216,7 @@
"skipTaskbar": true,
"minimizable": false,
"alwaysOnTop": true,
"userAgent": "OyasumiVR/1.14.4 (https://github.com/Raphiiko/OyasumiVR)"
"userAgent": "OyasumiVR/1.14.5 (https://github.com/Raphiiko/OyasumiVR)"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion src-elevated-sidecar/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "oyasumivr-elevated-sidecar"
version = "1.14.4"
version = "1.14.5"
authors = ["Raphiiko"]
license = "MIT"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion src-overlay-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oyasumivr-overlay-ui",
"version": "1.14.4",
"version": "1.14.5",
"private": true,
"scripts": {
"dev": "vite dev",
Expand Down
2 changes: 1 addition & 1 deletion src-shared-rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "oyasumivr-shared"
version = "1.14.4"
version = "1.14.5"
authors = ["Raphiiko"]
edition = "2021"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src-shared-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "src-shared-ts",
"description": "Shared typescript code for Oyasumi modules",
"scripts": {},
"version": "1.14.4",
"version": "1.14.5",
"author": "Raphiiko",
"license": "MIT",
"type": "module",
Expand Down
15 changes: 12 additions & 3 deletions src-ui/app/services/deep-link.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { listen } from '@tauri-apps/api/event';
import { warn } from 'tauri-plugin-log-api';
import { info, warn } from 'tauri-plugin-log-api';
import { PulsoidService } from './integrations/pulsoid.service';

@Injectable({
Expand All @@ -12,21 +12,26 @@ export class DeepLinkService {
async init() {
await listen<string>('onDeepLinkCall', async (event) => {
let url: URL | null = null;
info(`[DeepLinkService] Received deep link call: ${event.payload}`);
try {
url = new URL(event.payload);
} catch (e) {
await warn(`[DeepLinkService] Failed to parse deep link URL: ${event.payload}`);
return;
}
await this.handleDeepLinkCall(url);
try {
await this.handleDeepLinkCall(url);
} catch (e) {
await warn(`[DeepLinkService] Failed to handle deep link call for URL: ${event.payload}`);
}
});
}

private async handleDeepLinkCall(url: URL) {
let pathname = url.pathname;
// Remove any leading slashes
while (pathname.startsWith('/')) pathname = pathname.substring(1);
const route = pathname.split('/');
const route = [url.hostname, ...pathname.split('/')];
switch (route[0]) {
case 'integration':
if (route.length < 2) break;
Expand All @@ -41,6 +46,8 @@ export class DeepLinkService {
url.hash.substring(1)
);
break;
default:
await warn(`[DeepLinkService] Couldn't handle deep link type: ${route[0]}`);
}
}

Expand All @@ -63,6 +70,8 @@ export class DeepLinkService {
case 'pulsoid':
await this.pulsoid.handleDeepLink(path, params, fragmentParams);
break;
default:
await warn(`[DeepLinkService] Couldn't handle deep link for integration: ${integration}`);
}
}
}

0 comments on commit 2c88506

Please sign in to comment.