feat: manually mirror opencoze's code from bytedance
Change-Id: I09a73aadda978ad9511264a756b2ce51f5761adf
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
<svg width="53" height="52" viewBox="0 0 53 52" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0.5" width="52" height="52" rx="26" fill="#5865F2"/>
|
||||
<path d="M40.1025 14.3715C40.0913 14.3513 40.0727 14.3355 40.05 14.327C37.4344 13.2151 34.674 12.4222 31.8382 11.9683C31.8124 11.9638 31.7858 11.967 31.7621 11.9774C31.7384 11.9878 31.7189 12.0048 31.7063 12.0261C31.3304 12.6581 30.9892 13.3073 30.6839 13.9712C27.6271 13.5413 24.5176 13.5413 21.4608 13.9712C21.1535 13.3057 20.8068 12.6563 20.4223 12.0261C20.4091 12.0053 20.3895 11.9886 20.3659 11.9783C20.3424 11.968 20.316 11.9645 20.2903 11.9683C17.4542 12.4213 14.6937 13.2142 12.0783 14.327C12.0559 14.3358 12.037 14.3508 12.0243 14.37C6.79407 21.6063 5.36132 28.6647 6.06418 35.6356C6.06615 35.6527 6.07182 35.6692 6.08084 35.6843C6.08985 35.6993 6.10204 35.7125 6.11667 35.723C9.16216 37.8122 12.5686 39.4068 16.1906 40.439C16.2161 40.4461 16.2433 40.4457 16.2686 40.4381C16.2939 40.4304 16.3161 40.4157 16.3321 40.396C17.11 39.4153 17.7993 38.3769 18.393 37.2913C18.4012 37.2764 18.4058 37.26 18.4067 37.2434C18.4075 37.2267 18.4045 37.21 18.3979 37.1945C18.3913 37.1789 18.3812 37.1649 18.3683 37.1532C18.3554 37.1415 18.34 37.1325 18.3231 37.1268C17.2361 36.7414 16.1838 36.277 15.176 35.7376C15.1577 35.7277 15.1423 35.7137 15.1312 35.6969C15.1202 35.6801 15.1137 35.6611 15.1124 35.6414C15.1112 35.6218 15.1152 35.6022 15.124 35.5843C15.1329 35.5664 15.1464 35.5508 15.1633 35.5389C15.3754 35.3922 15.5838 35.2409 15.7883 35.0853C15.8062 35.0716 15.8279 35.0628 15.851 35.0599C15.874 35.057 15.8974 35.0602 15.9187 35.069C22.5211 37.8606 29.6691 37.8606 36.1934 35.069C36.2146 35.0596 36.2383 35.056 36.2617 35.0587C36.2851 35.0613 36.3072 35.07 36.3254 35.0838C36.5302 35.2403 36.7391 35.392 36.952 35.5389C36.969 35.5507 36.9826 35.5662 36.9916 35.584C37.0006 35.6018 37.0047 35.6214 37.0036 35.641C37.0025 35.6607 36.9962 35.6798 36.9853 35.6966C36.9743 35.7135 36.9591 35.7276 36.9408 35.7376C35.9353 36.2815 34.8821 36.7457 33.7923 37.1253C33.7753 37.1313 33.76 37.1405 33.7471 37.1523C33.7343 37.1642 33.7243 37.1784 33.7179 37.1941C33.7114 37.2097 33.7086 37.2265 33.7096 37.2432C33.7106 37.26 33.7154 37.2764 33.7236 37.2913C34.3272 38.3709 35.0155 39.408 35.783 40.3943C35.7985 40.4145 35.8206 40.4297 35.846 40.4377C35.8714 40.4457 35.8988 40.446 35.9245 40.4388C39.553 39.4101 42.9654 37.8153 46.0147 35.723C46.0295 35.713 46.0419 35.7001 46.0509 35.6853C46.06 35.6705 46.0655 35.654 46.0672 35.6371C46.9086 27.5779 44.6584 20.5774 40.1025 14.3715ZM19.379 31.391C17.3912 31.391 15.7533 29.701 15.7533 27.6254C15.7533 25.5498 17.3594 23.8597 19.379 23.8597C21.4144 23.8597 23.0364 25.5645 23.0047 27.6253C23.0047 29.701 21.3985 31.391 19.379 31.391ZM32.7843 31.391C30.7966 31.391 29.1587 29.701 29.1587 27.6254C29.1587 25.5498 30.7648 23.8597 32.7843 23.8597C34.8199 23.8597 36.4418 25.5645 36.4101 27.6253C36.4101 29.701 34.8199 31.391 32.7843 31.391Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 62 KiB |
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2025 coze-dev Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { type FC } from 'react';
|
||||
export { useInitOpenPremiumManage } from './use-init-open-premium-manage';
|
||||
export { usePremiumManageModal } from './use-premium-manage-modal';
|
||||
export const PremiumManage: FC<unknown> = () => <></>;
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright 2025 coze-dev Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export function useInitOpenPremiumManage(_props: { open: () => void }) {}
|
||||
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright 2025 coze-dev Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
const voidFunc = () => {
|
||||
console.log('unImplement void func');
|
||||
};
|
||||
export function usePremiumManageModal(_props?: unknown) {
|
||||
return {
|
||||
node: <></>,
|
||||
open: voidFunc,
|
||||
close: voidFunc,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright 2025 coze-dev Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { useFetchKnowledgeBenefit } from './use-fetch-knowledge-benefit';
|
||||
export enum PremiumPaywallBannerScene {
|
||||
Knowledge, // 知识库场景
|
||||
Token, // 其余 Token 消耗场景
|
||||
}
|
||||
|
||||
export function PremiumPaywallBanner(_props: {
|
||||
scene: PremiumPaywallBannerScene;
|
||||
knowledgeBenefit?: {
|
||||
total: number;
|
||||
used: number;
|
||||
};
|
||||
center?: boolean;
|
||||
}) {
|
||||
return <></>;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright 2025 coze-dev Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export function useFetchKnowledgeBenefit(_props: unknown = {}) {
|
||||
return {
|
||||
data: {
|
||||
total: 0,
|
||||
used: 0,
|
||||
},
|
||||
loading: false,
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright 2025 coze-dev Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export enum PremiumPaywallScene {
|
||||
// 创建新空间
|
||||
AddSpace,
|
||||
// 新模型体验
|
||||
NewModel,
|
||||
// 付费用户模板
|
||||
ProTemplate,
|
||||
// 添加空间成员
|
||||
AddSpaceMember,
|
||||
// 协作
|
||||
Collaborate,
|
||||
// 跨空间资源复制
|
||||
CopyResourceCrossSpace,
|
||||
// 发布到API或者SDK
|
||||
API,
|
||||
// 添加音色资源
|
||||
AddVoice,
|
||||
// 实时语音对话
|
||||
RTC,
|
||||
// 导出日志
|
||||
ExportLog,
|
||||
// 查询日志
|
||||
FilterLog,
|
||||
}
|
||||
export function useBenefitAvailable(_props: unknown) {
|
||||
return true;
|
||||
}
|
||||
const voidFunc = () => {
|
||||
console.log('unImplement void func');
|
||||
};
|
||||
export function usePremiumPaywallModal(_props: unknown) {
|
||||
return {
|
||||
node: <></>,
|
||||
open: voidFunc,
|
||||
close: voidFunc,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user