Simplify connection flow, mobile transfer UI, and header actions

This commit is contained in:
2026-10-12 18:14:54 +09:00
parent 5f431ee153
commit 4f0231da3d
22 changed files with 820 additions and 131 deletions

View File

@@ -28,6 +28,7 @@ export const pendingPeers = ref([]);
let pendingTimer;
let deviceInfo = {};
export const nextCursor = ref(null);
export const spaceInviteCodeLength = ref(4);
export const locationSettings = ref({ enabled: false, radiusMeters: 100, refreshMs: 120000 });
export async function publishLocation(position) {
if (!socket?.connected) throw Error('서버 연결을 확인해 주세요.');
@@ -150,6 +151,7 @@ export const refresh = createRefreshQueue(async () => {
(id) => !snapshot.devices.some((peer) => peer.id === id),
);
discoveryEnabled.value = snapshot.sameNetworkDiscoveryEnabled;
spaceInviteCodeLength.value = snapshot.spaceInviteCodeLength ?? 4;
locationSettings.value = snapshot.locationDiscovery ?? {
enabled: false,
radiusMeters: 100,
@@ -296,6 +298,7 @@ export async function uploadFile(id, index, file, accountId) {
controller = new AbortController();
uploadProgress.value[progressKey] = {
name: file.name,
index,
progress: 0,
status: 'uploading',
accountId,
@@ -407,6 +410,7 @@ export async function uploadFile(id, index, file, accountId) {
check();
uploadProgress.value[progressKey] = {
name: file.name,
index,
progress: 100,
status: 'stored',
accountId,
@@ -417,6 +421,7 @@ export async function uploadFile(id, index, file, accountId) {
else
uploadProgress.value[progressKey] = {
name: file.name,
index,
progress: 0,
status: 'failed',
accountId,