Merge branch 'main' of anton.github.com:velaboratory/VEL-Connect
commit
e555a996f8
|
|
@ -2,7 +2,7 @@ name: Deploy to VelNet Oracle server (Pocketbase edition)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["feature/pocketbase-server"]
|
branches: ["main"]
|
||||||
paths: ["velconnect/**"]
|
paths: ["velconnect/**"]
|
||||||
jobs:
|
jobs:
|
||||||
run_pull:
|
run_pull:
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
name: Deploy to VelNet Oracle server
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: ["main"]
|
|
||||||
paths: ["velconnect/**"]
|
|
||||||
jobs:
|
|
||||||
run_pull:
|
|
||||||
name: Pull new version
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: install ssh keys
|
|
||||||
run: |
|
|
||||||
install -m 600 -D /dev/null ~/.ssh/id_rsa
|
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
|
||||||
ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
|
|
||||||
- name: connect and pull
|
|
||||||
run: ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd /home/ubuntu/VEL-Connect-v2/velconnect && git pull && docker compose up -d --build && exit"
|
|
||||||
- name: cleanup
|
|
||||||
run: rm -rf ~/.ssh
|
|
||||||
|
|
@ -3,7 +3,6 @@ env:
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["feature/pocketbase-server"]
|
|
||||||
paths: ["example_dashboard/**"]
|
paths: ["example_dashboard/**"]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -26,6 +25,11 @@ jobs:
|
||||||
- name: Install Packages
|
- name: Install Packages
|
||||||
working-directory: ${{env.SUBFOLDER}}
|
working-directory: ${{env.SUBFOLDER}}
|
||||||
run: npm i
|
run: npm i
|
||||||
|
|
||||||
|
- name: 'Create env file'
|
||||||
|
working-directory: ${{env.SUBFOLDER}}
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.EXAMPLE_DASHBOARD_ENV }}" > .env
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: ${{env.SUBFOLDER}}
|
working-directory: ${{env.SUBFOLDER}}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -19,6 +19,8 @@
|
||||||
"eslint": "^8.28.0",
|
"eslint": "^8.28.0",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-plugin-svelte": "^2.30.0",
|
"eslint-plugin-svelte": "^2.30.0",
|
||||||
|
"humanize-duration": "^3.29.0",
|
||||||
|
"luxon": "^3.3.0",
|
||||||
"prettier": "^2.8.0",
|
"prettier": "^2.8.0",
|
||||||
"prettier-plugin-svelte": "^2.10.1",
|
"prettier-plugin-svelte": "^2.10.1",
|
||||||
"sass": "^1.63.6",
|
"sass": "^1.63.6",
|
||||||
|
|
@ -27,10 +29,11 @@
|
||||||
"svelte-preprocess": "^5.0.4",
|
"svelte-preprocess": "^5.0.4",
|
||||||
"tslib": "^2.4.1",
|
"tslib": "^2.4.1",
|
||||||
"typescript": "^5.0.0",
|
"typescript": "^5.0.0",
|
||||||
"vite": "^4.3.6"
|
"vite": "^4.3.6",
|
||||||
|
"pocketbase": "^0.15.3"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@velaboratory/velconnect-svelte": "^1.0.2"
|
"@velaboratory/velconnect-svelte": "^1.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,4 @@ declare global {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export {};
|
export { };
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,10 @@
|
||||||
import Pair from '$lib/components/Pair.svelte';
|
import Pair from '$lib/components/Pair.svelte';
|
||||||
import { prettyDate } from '$lib/js/util';
|
import { prettyDate } from '$lib/js/util';
|
||||||
import { onDestroy, onMount } from 'svelte';
|
import { onDestroy, onMount } from 'svelte';
|
||||||
|
import { PUBLIC_VELCONNECT_URL } from '$env/static/public';
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
await startListening('http://localhost:8090');
|
await startListening(PUBLIC_VELCONNECT_URL);
|
||||||
});
|
});
|
||||||
onDestroy(() => {
|
onDestroy(() => {
|
||||||
stopListening();
|
stopListening();
|
||||||
|
|
@ -104,7 +105,7 @@
|
||||||
on:input={delayedSend}
|
on:input={delayedSend}
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Nickname
|
Nickname
|
||||||
<input
|
<input
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ namespace VELConnect
|
||||||
public class VELConnectManager : MonoBehaviour
|
public class VELConnectManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
public string velConnectUrl = "http://localhost";
|
public string velConnectUrl = "http://localhost";
|
||||||
|
public static string VelConnectUrl => instance.velConnectUrl;
|
||||||
private static VELConnectManager instance;
|
private static VELConnectManager instance;
|
||||||
|
|
||||||
public class State
|
public class State
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "edu.uga.engr.vel.vel-connect",
|
"name": "edu.uga.engr.vel.vel-connect",
|
||||||
"displayName": "VEL-Connect",
|
"displayName": "VEL-Connect",
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"unity": "2019.1",
|
"unity": "2019.1",
|
||||||
"description": "Web-based configuration for VR applications",
|
"description": "Web-based configuration for VR applications",
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ export interface Device extends Record {
|
||||||
current_room: string;
|
current_room: string;
|
||||||
current_app: string;
|
current_app: string;
|
||||||
pairing_code: string;
|
pairing_code: string;
|
||||||
|
last_online: string;
|
||||||
data: string;
|
data: string;
|
||||||
expand: { data?: DataBlock };
|
expand: { data?: DataBlock };
|
||||||
}
|
}
|
||||||
|
|
@ -241,7 +242,6 @@ export async function pair(pairingCode: string) {
|
||||||
.getFirstListItem(`pairing_code="${pairingCode}"`)) as Device;
|
.getFirstListItem(`pairing_code="${pairingCode}"`)) as Device;
|
||||||
|
|
||||||
// add it to the local data
|
// add it to the local data
|
||||||
currentDeviceId.set(device.id);
|
|
||||||
if (!get(pairedDevices).includes(device.id)) {
|
if (!get(pairedDevices).includes(device.id)) {
|
||||||
pairedDevices.set([...get(pairedDevices), device.id]);
|
pairedDevices.set([...get(pairedDevices), device.id]);
|
||||||
}
|
}
|
||||||
|
|
@ -274,6 +274,8 @@ export async function pair(pairingCode: string) {
|
||||||
await pb.collection("Users").update(u.id, u);
|
await pb.collection("Users").update(u.id, u);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
currentDeviceId.set(device.id);
|
||||||
|
|
||||||
return { error: null };
|
return { error: null };
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Not found: " + e);
|
console.error("Not found: " + e);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue