Remove shareable invitation links
Codes are exchanged by copy and paste again. The URL fragment intake, the invitation dialog, the BroadcastChannel answer relay and the Share link / Copy link controls are gone, along with their tests, browser check scenarios and design doc. Code fields no longer accept links. The compressed HC1 codes with typed offers/answers and echoed refs stay. An optional signaling backend is the intended way to simplify the exchange instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f320bfb541
commit
a5935a8324
16 files changed
+57
-602
No files matched your search
@@ -1,12 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { nextTick, ref, watch } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import TransferPanel from './TransferPanel.vue';
|
||||
import type { SavedConnection, ConnectionUpdate } from '../lib/connections.ts';
|
||||
const props = defineProps<{ connection: SavedConnection; loadTrust: (id: string) => Promise<SavedConnection>; invitation?: { code: string } | null }>();
|
||||
const props = defineProps<{ connection: SavedConnection; loadTrust: (id: string) => Promise<SavedConnection> }>();
|
||||
const emit = defineEmits<{
|
||||
status: [id: string, state: 'ready' | 'connecting' | 'connected'];
|
||||
update: [id: string, change: ConnectionUpdate];
|
||||
invitationTaken: [];
|
||||
}>();
|
||||
const mode = ref<'send' | 'receive'>('send');
|
||||
const sessionActive = ref(false), connected = ref(false);
|
||||
@@ -17,16 +16,6 @@ function navigate(next: 'send' | 'receive') {
|
||||
if (connected.value) { direction.value = next; panel.value?.focusDirection(next); }
|
||||
else if (!sessionActive.value) mode.value = next;
|
||||
}
|
||||
// An accepted invitation switches an idle slot to Receive and fills the code;
|
||||
// the user still creates the answer.
|
||||
watch(() => props.invitation, async invitation => {
|
||||
if (!invitation) return;
|
||||
emit('invitationTaken');
|
||||
if (sessionActive.value) return;
|
||||
mode.value = 'receive';
|
||||
await nextTick();
|
||||
panel.value?.importCode(invitation.code);
|
||||
}, { immediate: true });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in new issue
Block a user