feat(avatar): enhance SpaceAvatar component with emoji support
- Updated SpaceAvatar component to allow emoji-based avatars, enabling users to select emojis as their space avatar. - Added new props and computed properties to handle emoji logic and display. - Enhanced UI to include an emoji picker and clear option for avatars. - Updated localization strings in English and Chinese for new avatar features. - Adjusted styles for emoji display and interaction. This update improves user personalization options for avatars, enhancing the overall user experience in the application.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
-- Migration: Create "未分类" tag for each knowledge base that has untagged entries
|
||||
-- and update chunks, knowledges, and embeddings to reference the new tag
|
||||
ALTER EXTENSION pg_search UPDATE;
|
||||
|
||||
DO $$
|
||||
DECLARE
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
-- Migration: 000011_organizations (down, merged 000011–000017, 000012)
|
||||
DO $$ BEGIN RAISE NOTICE '[Migration 000011] Rolling back organization tables...'; END $$;
|
||||
-- Migration: 000012_organizations (down, merged 000011–000017, 000012, 000013)
|
||||
DO $$ BEGIN RAISE NOTICE '[Migration 000012] Rolling back organization tables...'; END $$;
|
||||
|
||||
DROP TABLE IF EXISTS organization_join_requests;
|
||||
DROP TABLE IF EXISTS kb_shares;
|
||||
DROP TABLE IF EXISTS organization_members;
|
||||
DROP TABLE IF EXISTS organizations;
|
||||
|
||||
DO $$ BEGIN RAISE NOTICE '[Migration 000011] Rollback completed successfully!'; END $$;
|
||||
DO $$ BEGIN RAISE NOTICE '[Migration 000012] Rollback completed successfully!'; END $$;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
-- Migration: 000011_organizations (merged 000011–000017, 000012)
|
||||
-- Description: Organization tables, approval, invite expiry, join requests, avatar, searchable
|
||||
DO $$ BEGIN RAISE NOTICE '[Migration 000011] Starting organization tables setup...'; END $$;
|
||||
-- Migration: 000012_organizations (merged 000011–000017, 000012, 000013)
|
||||
-- Description: Organization tables, approval, invite expiry, join requests, avatar, searchable, member_limit
|
||||
DO $$ BEGIN RAISE NOTICE '[Migration 000012] Starting organization tables setup...'; END $$;
|
||||
|
||||
-- Create organizations table
|
||||
CREATE TABLE IF NOT EXISTS organizations (
|
||||
@@ -14,6 +14,7 @@ CREATE TABLE IF NOT EXISTS organizations (
|
||||
invite_code_validity_days SMALLINT NOT NULL DEFAULT 7,
|
||||
avatar VARCHAR(512) DEFAULT '',
|
||||
searchable BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
member_limit INTEGER NOT NULL DEFAULT 50,
|
||||
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||
deleted_at TIMESTAMP WITH TIME ZONE
|
||||
@@ -30,6 +31,7 @@ COMMENT ON COLUMN organizations.require_approval IS 'Whether joining this organi
|
||||
COMMENT ON COLUMN organizations.invite_code_expires_at IS 'When the current invite code expires; NULL means no expiry (legacy)';
|
||||
COMMENT ON COLUMN organizations.invite_code_validity_days IS 'Invite link validity in days: 0=never expire, 1/7/30 days';
|
||||
COMMENT ON COLUMN organizations.searchable IS 'When true, space appears in search and can be joined by org ID';
|
||||
COMMENT ON COLUMN organizations.member_limit IS 'Max members allowed; 0 means no limit';
|
||||
|
||||
-- Create organization_members table
|
||||
CREATE TABLE IF NOT EXISTS organization_members (
|
||||
@@ -106,4 +108,4 @@ COMMENT ON COLUMN organization_join_requests.message IS 'Optional message from t
|
||||
COMMENT ON COLUMN organization_join_requests.reviewed_by IS 'User ID of the admin who reviewed the request';
|
||||
COMMENT ON COLUMN organization_join_requests.review_message IS 'Optional message from the reviewer';
|
||||
|
||||
DO $$ BEGIN RAISE NOTICE '[Migration 000011] Organization tables setup completed successfully!'; END $$;
|
||||
DO $$ BEGIN RAISE NOTICE '[Migration 000012] Organization tables setup completed successfully!'; END $$;
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
-- Rollback: 000012_organizations_searchable
|
||||
ALTER TABLE organizations DROP COLUMN IF EXISTS searchable;
|
||||
@@ -1,8 +0,0 @@
|
||||
-- Migration: 000012_organizations_searchable
|
||||
-- Description: Add searchable flag to organizations (open for discovery)
|
||||
DO $$ BEGIN RAISE NOTICE '[Migration 000012] Adding searchable to organizations...'; END $$;
|
||||
|
||||
ALTER TABLE organizations ADD COLUMN IF NOT EXISTS searchable BOOLEAN NOT NULL DEFAULT FALSE;
|
||||
COMMENT ON COLUMN organizations.searchable IS 'When true, space appears in search and can be joined by org ID';
|
||||
|
||||
DO $$ BEGIN RAISE NOTICE '[Migration 000012] Organizations searchable column added.'; END $$;
|
||||
@@ -1,3 +0,0 @@
|
||||
-- Migration: 000013_organization_member_limit (down)
|
||||
ALTER TABLE organizations
|
||||
DROP COLUMN IF EXISTS member_limit;
|
||||
@@ -1,6 +0,0 @@
|
||||
-- Migration: 000013_organization_member_limit
|
||||
-- Description: Add member_limit to organizations (0 = unlimited)
|
||||
ALTER TABLE organizations
|
||||
ADD COLUMN IF NOT EXISTS member_limit INTEGER NOT NULL DEFAULT 50;
|
||||
|
||||
COMMENT ON COLUMN organizations.member_limit IS 'Max members allowed; 0 means no limit';
|
||||
Reference in New Issue
Block a user