feat(ui): add Button, Modal, Spinner, Toast, and Tooltip components with styles
All checks were successful
Build and Release / build-and-release (push) Successful in 13m12s
All checks were successful
Build and Release / build-and-release (push) Successful in 13m12s
- Implemented Button component with various props for customization. - Created Modal component with header, content, and footer subcomponents. - Added Spinner component for loading indicators. - Developed Toast component for displaying notifications. - Introduced Tooltip component for contextual hints with keyboard shortcuts. - Added corresponding CSS modules for styling each component. - Updated index file to export new components. - Configured TypeScript settings for the UI package.
This commit is contained in:
@@ -17,6 +17,7 @@ export default defineSchema({
|
||||
aboutMe: v.optional(v.string()),
|
||||
customStatus: v.optional(v.string()),
|
||||
joinSoundStorageId: v.optional(v.id("_storage")),
|
||||
accentColor: v.optional(v.string()),
|
||||
}).index("by_username", ["username"]),
|
||||
|
||||
categories: defineTable({
|
||||
@@ -142,8 +143,71 @@ export default defineSchema({
|
||||
name: v.string(),
|
||||
storageId: v.id("_storage"),
|
||||
uploadedBy: v.id("userProfiles"),
|
||||
// `true` for animated (GIF / APNG) uploads so the settings UI
|
||||
// can split Static vs Animated in separate sections. Optional
|
||||
// so existing rows without the flag still validate — they
|
||||
// surface as static in the UI by default.
|
||||
animated: v.optional(v.boolean()),
|
||||
|
||||
createdAt: v.number(),
|
||||
}).index("by_name", ["name"])
|
||||
.index("by_uploader", ["uploadedBy"]),
|
||||
|
||||
polls: defineTable({
|
||||
channelId: v.id("channels"),
|
||||
createdBy: v.id("userProfiles"),
|
||||
question: v.string(),
|
||||
options: v.array(
|
||||
v.object({
|
||||
id: v.string(),
|
||||
text: v.string(),
|
||||
}),
|
||||
),
|
||||
allowMultiple: v.boolean(),
|
||||
disclosed: v.boolean(),
|
||||
closed: v.boolean(),
|
||||
closesAt: v.optional(v.number()),
|
||||
createdAt: v.number(),
|
||||
})
|
||||
.index("by_channel", ["channelId"])
|
||||
.index("by_creator", ["createdBy"]),
|
||||
|
||||
pollVotes: defineTable({
|
||||
pollId: v.id("polls"),
|
||||
userId: v.id("userProfiles"),
|
||||
optionIds: v.array(v.string()),
|
||||
votedAt: v.number(),
|
||||
})
|
||||
.index("by_poll", ["pollId"])
|
||||
.index("by_poll_and_user", ["pollId", "userId"]),
|
||||
|
||||
pollReactions: defineTable({
|
||||
pollId: v.id("polls"),
|
||||
userId: v.id("userProfiles"),
|
||||
emoji: v.string(),
|
||||
})
|
||||
.index("by_poll", ["pollId"])
|
||||
.index("by_poll_user_emoji", ["pollId", "userId", "emoji"])
|
||||
.index("by_user", ["userId"]),
|
||||
|
||||
savedMedia: defineTable({
|
||||
userId: v.id("userProfiles"),
|
||||
// Convex storage URL — also the dedupe key for a single user.
|
||||
url: v.string(),
|
||||
kind: v.string(), // 'image' | 'video' | 'audio'
|
||||
filename: v.string(),
|
||||
mimeType: v.optional(v.string()),
|
||||
width: v.optional(v.number()),
|
||||
height: v.optional(v.number()),
|
||||
size: v.optional(v.number()),
|
||||
// Re-post path: keep the per-file AES key + iv so the same
|
||||
// attachment metadata can be embedded in a future message
|
||||
// without re-uploading. The file stays encrypted in storage —
|
||||
// saving just bookmarks the metadata.
|
||||
encryptionKey: v.string(),
|
||||
encryptionIv: v.string(),
|
||||
savedAt: v.number(),
|
||||
})
|
||||
.index("by_user", ["userId"])
|
||||
.index("by_user_and_url", ["userId", "url"]),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user