feat: Implement initial Electron frontend with core UI, user and server settings, chat, and voice features, along with Convex backend schemas and functions.
Some checks failed
Build and Release / build-and-release (push) Has been cancelled

This commit is contained in:
Bryan1029384756
2026-02-13 10:29:24 -06:00
parent 56a9523e38
commit 556a561449
15 changed files with 648 additions and 57 deletions

View File

@@ -204,6 +204,7 @@ export const getPublicKeys = query({
avatarUrl: v.optional(v.union(v.string(), v.null())),
aboutMe: v.optional(v.string()),
customStatus: v.optional(v.string()),
joinSoundUrl: v.optional(v.union(v.string(), v.null())),
})
),
handler: async (ctx) => {
@@ -214,6 +215,10 @@ export const getPublicKeys = query({
if (u.avatarStorageId) {
avatarUrl = await getPublicStorageUrl(ctx, u.avatarStorageId);
}
let joinSoundUrl: string | null = null;
if (u.joinSoundStorageId) {
joinSoundUrl = await getPublicStorageUrl(ctx, u.joinSoundStorageId);
}
results.push({
id: u._id,
username: u.username,
@@ -223,6 +228,7 @@ export const getPublicKeys = query({
avatarUrl,
aboutMe: u.aboutMe,
customStatus: u.customStatus,
joinSoundUrl,
});
}
return results;
@@ -237,6 +243,8 @@ export const updateProfile = mutation({
aboutMe: v.optional(v.string()),
avatarStorageId: v.optional(v.id("_storage")),
customStatus: v.optional(v.string()),
joinSoundStorageId: v.optional(v.id("_storage")),
removeJoinSound: v.optional(v.boolean()),
},
returns: v.null(),
handler: async (ctx, args) => {
@@ -245,11 +253,24 @@ export const updateProfile = mutation({
if (args.aboutMe !== undefined) patch.aboutMe = args.aboutMe;
if (args.avatarStorageId !== undefined) patch.avatarStorageId = args.avatarStorageId;
if (args.customStatus !== undefined) patch.customStatus = args.customStatus;
if (args.joinSoundStorageId !== undefined) patch.joinSoundStorageId = args.joinSoundStorageId;
if (args.removeJoinSound) patch.joinSoundStorageId = undefined;
await ctx.db.patch(args.userId, patch);
return null;
},
});
// Get the current user's join sound URL
export const getMyJoinSoundUrl = query({
args: { userId: v.id("userProfiles") },
returns: v.union(v.string(), v.null()),
handler: async (ctx, args) => {
const user = await ctx.db.get(args.userId);
if (!user?.joinSoundStorageId) return null;
return await getPublicStorageUrl(ctx, user.joinSoundStorageId);
},
});
// Update user status
export const updateStatus = mutation({
args: {