Simplify connection flow, mobile transfer UI, and header actions
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user