@lobehub/chat 1.22.24 → 1.22.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/package.json +1 -1
- package/src/app/(main)/discover/_layout/Desktop/Header.tsx +2 -1
- package/src/app/(main)/settings/llm/index.tsx +3 -1
- package/src/app/metadata.ts +10 -7
- package/src/const/branding.ts +6 -0
- package/src/database/server/migrations/0009_remove_unused_user_tables.sql +2 -0
- package/src/database/server/migrations/meta/0009_snapshot.json +3305 -0
- package/src/database/server/migrations/meta/_journal.json +7 -0
- package/src/database/server/schemas/lobechat/user.ts +1 -54
- package/src/layout/AuthProvider/Clerk/useAppearance.ts +5 -3
@@ -1,6 +1,6 @@
|
|
1
1
|
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
2
2
|
import { LobeChatPluginManifest } from '@lobehub/chat-plugin-sdk';
|
3
|
-
import { boolean,
|
3
|
+
import { boolean, jsonb, pgTable, primaryKey, text } from 'drizzle-orm/pg-core';
|
4
4
|
|
5
5
|
import { DEFAULT_PREFERENCE } from '@/const/user';
|
6
6
|
import { CustomPluginParams } from '@/types/tool/plugin';
|
@@ -48,59 +48,6 @@ export const userSettings = pgTable('user_settings', {
|
|
48
48
|
tool: jsonb('tool'),
|
49
49
|
});
|
50
50
|
|
51
|
-
export const userSubscriptions = pgTable('user_subscriptions', {
|
52
|
-
id: text('id').primaryKey().notNull(),
|
53
|
-
userId: text('user_id')
|
54
|
-
.references(() => users.id, { onDelete: 'cascade' })
|
55
|
-
.notNull(),
|
56
|
-
stripeId: text('stripe_id'),
|
57
|
-
|
58
|
-
currency: text('currency'),
|
59
|
-
pricing: integer('pricing'),
|
60
|
-
billingPaidAt: integer('billing_paid_at'),
|
61
|
-
billingCycleStart: integer('billing_cycle_start'),
|
62
|
-
billingCycleEnd: integer('billing_cycle_end'),
|
63
|
-
|
64
|
-
cancelAtPeriodEnd: boolean('cancel_at_period_end'),
|
65
|
-
cancelAt: integer('cancel_at'),
|
66
|
-
|
67
|
-
nextBilling: jsonb('next_billing'),
|
68
|
-
|
69
|
-
plan: text('plan'),
|
70
|
-
recurring: text('recurring'),
|
71
|
-
|
72
|
-
storageLimit: integer('storage_limit'),
|
73
|
-
|
74
|
-
status: integer('status'),
|
75
|
-
createdAt: createdAt(),
|
76
|
-
updatedAt: updatedAt(),
|
77
|
-
});
|
78
|
-
|
79
|
-
export type NewUserSubscription = typeof userSubscriptions.$inferInsert;
|
80
|
-
export type UserSubscriptionItem = typeof userSubscriptions.$inferSelect;
|
81
|
-
|
82
|
-
export const userBudgets = pgTable('user_budgets', {
|
83
|
-
id: text('id')
|
84
|
-
.primaryKey()
|
85
|
-
.references(() => users.id, { onDelete: 'cascade' })
|
86
|
-
.notNull(),
|
87
|
-
|
88
|
-
freeBudgetId: text('free_budget_id'),
|
89
|
-
freeBudgetKey: text('free_budget_key'),
|
90
|
-
|
91
|
-
subscriptionBudgetId: text('subscription_budget_id'),
|
92
|
-
subscriptionBudgetKey: text('subscription_budget_key'),
|
93
|
-
|
94
|
-
packageBudgetId: text('package_budget_id'),
|
95
|
-
packageBudgetKey: text('package_budget_key'),
|
96
|
-
|
97
|
-
createdAt: createdAt(),
|
98
|
-
updatedAt: updatedAt(),
|
99
|
-
});
|
100
|
-
|
101
|
-
export type NewUserBudgets = typeof userBudgets.$inferInsert;
|
102
|
-
export type UserBudgetItem = typeof userBudgets.$inferSelect;
|
103
|
-
|
104
51
|
export const installedPlugins = pgTable(
|
105
52
|
'user_installed_plugins',
|
106
53
|
{
|
@@ -4,6 +4,8 @@ import { dark } from '@clerk/themes';
|
|
4
4
|
import { ElementsConfig, Theme } from '@clerk/types';
|
5
5
|
import { createStyles, useThemeMode } from 'antd-style';
|
6
6
|
|
7
|
+
import { BRANDING_URL } from '@/const/branding';
|
8
|
+
|
7
9
|
const prefixCls = 'cl';
|
8
10
|
|
9
11
|
export const useStyles = createStyles(
|
@@ -101,10 +103,10 @@ export const useAppearance = () => {
|
|
101
103
|
baseTheme: isDarkMode ? dark : undefined,
|
102
104
|
elements: styles,
|
103
105
|
layout: {
|
104
|
-
helpPageUrl: 'https://lobehub.com/docs',
|
105
|
-
privacyPageUrl: 'https://lobehub.com/privacy',
|
106
|
+
helpPageUrl: BRANDING_URL.help ?? 'https://lobehub.com/docs',
|
107
|
+
privacyPageUrl: BRANDING_URL.privacy ?? 'https://lobehub.com/privacy',
|
106
108
|
socialButtonsVariant: 'blockButton',
|
107
|
-
termsPageUrl: 'https://lobehub.com/terms',
|
109
|
+
termsPageUrl: BRANDING_URL.terms ?? 'https://lobehub.com/terms',
|
108
110
|
},
|
109
111
|
variables: {
|
110
112
|
borderRadius: `${theme.borderRadius}px`,
|