本地化改造:免登录 + 本机 AI + 离线可用
在上游 gitee.com/676015863/unicut 基础上做的自托管改造,使其可脱离官方账号体系 与 CDN 独立运行。详见 CHANGELOG.md。 主要能力 - 免登录:GUEST_USER 直接使用核心功能,checkAuth 不再拦截 - 本机 AI:对话 mimo-v2.6-flash(同源 /newapi/v1)、视觉 deepseek-v4-flash-vision-exp、 生图 /omniai、生视频 /civideo;密钥仅存服务端(nginx 占位符 + entrypoint 注入) - AI 一键出片:图片+标题 → AI 文案 → 人声/语速/情绪 → 确认生成直接排时间轴, 并支持转场、图片运镜、字幕位置/大小/配色/入场动画 - 离线可用:工程数据 IndexedDB + 项目文件 JSON 双写;官方素材走同源 /cdn/ 反代; 无 OPFS 时素材回落 IndexedDB files 表 修复 - 账号类接口本地短路,不再反复弹「Header parameter [authorization] cannot be empty」 - isFSApiSupported 改取值判断,修 OPFS 判定错误导致卡在文件夹引导页 - 模板素材统一 /cdn/ 改写 + nginx 兜底转发,修缩略图全裂 - 剔除素材已失效的模板(上游 CDN 已删,点开必卡 loading 50%) - 补齐 SDK 内置 4 张滤镜贴图,修画布卡 loading 0% - 封面上传失败不再中断整次保存 品牌与页面 - 「云剪」改为 UniCut - 首页删除收费标准栏目;顶部菜单移除 GitHub/Gitee;底部栏整体下线 安全 - .env 与 public/local-ai.json(含密钥)已在 .gitignore,不入库 - public/local-ai.json.example 仅含占位符
This commit is contained in:
1 parent
e0f2d47c51
commit
59241af720
362 files changed
+6054
-1254
No files matched your search
@@ -1,77 +1,12 @@
|
||||
import { theme } from '@theme';
|
||||
import styles from './footer.module.less';
|
||||
import { Intl } from '@language/index';
|
||||
|
||||
/**
|
||||
* 底部栏:按需求整块下线(内容全部删除)。
|
||||
*
|
||||
* 组件保留但不再渲染任何东西 —— 这样首页、关于我们、协议页、用户页共用的
|
||||
* <Footer /> 调用处都不用改,也不会因为删组件而碰到一堆 import。
|
||||
* 要恢复底部栏,把这个文件的 return 换回原 JSX 即可(样式仍在 footer.module.less 里)。
|
||||
*/
|
||||
export interface IProps {}
|
||||
|
||||
export default function Footer(props: IProps) {
|
||||
return (
|
||||
<div className={styles.footer}>
|
||||
<div className={styles.divider}></div>
|
||||
<div className={styles.footerInner}>
|
||||
<section className={styles.item}>
|
||||
<span className={styles.logo}></span>
|
||||
<span className={styles.info}>
|
||||
<Intl name="common_about_us_info" />
|
||||
</span>
|
||||
</section>
|
||||
<section className={styles.item}>
|
||||
<h3><Intl name="common_navigation" /></h3>
|
||||
<ul className={styles.links}>
|
||||
<li>
|
||||
<a href="#">{<Intl name="common_home" />}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/article/about">{<Intl name="common_about_us" />}</a>
|
||||
</li>
|
||||
{/* <li>
|
||||
<a href="#">VIP特权</a>
|
||||
</li> */}
|
||||
</ul>
|
||||
</section>
|
||||
<section className={styles.item}>
|
||||
<h3><Intl name="common_support" /></h3>
|
||||
<ul className={styles.links}>
|
||||
<li>
|
||||
<a href="#">{<Intl name="common_help_center" />}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">{<Intl name="common_privacy_policy" />}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">{<Intl name="common_service_agreement" />}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">{<Intl name="common_disclaimer" />}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section className={styles.item}>
|
||||
<h3><Intl name="common_contact_us" /></h3>
|
||||
<div className={styles.contact}>
|
||||
<p>
|
||||
<Intl name="common_private_deployment_saas_consultation" />
|
||||
<br />
|
||||
<Intl name="common_phone" />: 13551301693
|
||||
</p>
|
||||
<span className={styles.span}>
|
||||
<img src="/assets/images/qrcode.png" alt="" />
|
||||
</span>
|
||||
{/* <span className={styles.span}>
|
||||
<i>董经理</i>
|
||||
<em>13551301693</em>
|
||||
</span> */}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div className={styles.footerBottom}>
|
||||
<span className={styles.copyRight}>
|
||||
<Intl name="common_copyright" />
|
||||
</span>
|
||||
{/* <span className={styles.cookie}>
|
||||
开启cookie提供更好的服务 <a>接受</a>
|
||||
</span> */}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
return null;
|
||||
}
|
||||
@@ -36,11 +36,6 @@ const Header = (props: IProps) => {
|
||||
|
||||
// 创建视频
|
||||
const createVideo = async () => {
|
||||
if (!user.info) {
|
||||
pubsub.publish('showLoginModal', true);
|
||||
return;
|
||||
}
|
||||
|
||||
const initData = getInitData();
|
||||
if (cid) {
|
||||
initData.category_id = cid;
|
||||
@@ -105,37 +100,14 @@ const Header = (props: IProps) => {
|
||||
<NavLink to="/article/about" className={styles.text} activeClassName={styles.active}>
|
||||
<Intl name="common_about_us" />
|
||||
</NavLink>
|
||||
<a
|
||||
href="https://github.com/mtsee/unicut"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
{/* 详情页优先:教程入口直接指向一篇具体文章,相关文章在页尾互相串联 */}
|
||||
<NavLink
|
||||
to="/article/local-deploy-guide"
|
||||
className={styles.text}
|
||||
style={{ display: 'inline-flex', alignItems: 'center', gap: '6px' }}
|
||||
activeClassName={styles.active}
|
||||
>
|
||||
<svg width="24" height="24" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z" />
|
||||
</svg>
|
||||
GitHub
|
||||
</a>
|
||||
<a
|
||||
href="https://gitee.com/676015863/unicut"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className={styles.text}
|
||||
style={{ display: 'inline-flex', alignItems: 'center', gap: '6px' }}
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 90 90" version="1.1">
|
||||
<g xmlns="http://www.w3.org/2000/svg" id="Group">
|
||||
<circle id="Combined-Shape" fill="#C71D23" cx="44.8544363" cy="44.8544363" r="44.8544363" />
|
||||
<path
|
||||
d="M67.558546,39.8714292 L42.0857966,39.8714292 C40.8627004,39.8720094 39.8710953,40.8633548 39.8701949,42.0864508 L39.8687448,47.623783 C39.867826,48.8471055 40.8592652,49.8390642 42.0825879,49.8393845 C42.0827874,49.8393846 42.0829869,49.8393846 42.0831864,49.8387862 L57.5909484,49.838657 C58.8142711,49.8386283 59.8059783,50.830319 59.8059885,52.0536417 C59.8059885,52.0536479 59.8059885,52.053654 59.8059701,52.0536602 L59.8059701,52.6073539 L59.8059701,52.6073539 L59.8059701,53.161115 C59.8059701,56.8310831 56.8308731,59.80618 53.160905,59.80618 L32.1165505,59.80618 C30.8934034,59.806119 29.9018373,58.8145802 29.9017425,57.5914331 L29.9011625,36.5491188 C29.9008781,32.8791508 32.8758931,29.9039718 36.5458611,29.9038706 C36.5459222,29.9038706 36.5459833,29.9038706 36.5460443,29.9040538 L67.5523638,29.9040538 C68.77515,29.9026795 69.7666266,28.9118177 69.7687593,27.6890325 L69.7721938,22.1516997 C69.774326,20.928378 68.7832423,19.9360642 67.5599198,19.9353054 C67.5594619,19.9353051 67.5590039,19.935305 67.558546,19.9366784 L36.5479677,19.9366784 C27.3730474,19.9366784 19.935305,27.3744208 19.935305,36.549341 L19.935305,67.558546 C19.935305,68.7818687 20.927004,69.7735676 22.1503267,69.7735676 L54.8224984,69.7735676 C63.079746,69.7735676 69.7735676,63.079746 69.7735676,54.8224984 L69.7735676,42.0864509 C69.7735676,40.8631282 68.7818687,39.8714292 67.558546,39.8714292 Z"
|
||||
id="G"
|
||||
fill="#FFFFFF"
|
||||
/>
|
||||
</g>
|
||||
</svg>
|
||||
Gitee
|
||||
</a>
|
||||
使用教程
|
||||
</NavLink>
|
||||
{/* <a
|
||||
href={languageType === 'en-US' ? '/docs/en' : '/docs'}
|
||||
target="_blank"
|
||||
@@ -177,19 +149,13 @@ const Header = (props: IProps) => {
|
||||
<Intl name="common_create_video" />
|
||||
</Button>
|
||||
</a> */}
|
||||
{user.info ? (
|
||||
{user.info && !user.info.guest ? (
|
||||
<Popover content={<User />} position="bottomRight" trigger="hover">
|
||||
<Avatar src={reURL(user.info.avatar, config.resourcesHost)} size="small" color="blue" alt="Lisa LeBlanc">
|
||||
{user.info.name.toUpperCase().split('')[0]}
|
||||
</Avatar>
|
||||
</Popover>
|
||||
) : (
|
||||
<Login>
|
||||
<Button theme="solid" className={styles.loginBtn}>
|
||||
<Intl name="header_login" />
|
||||
</Button>
|
||||
</Login>
|
||||
)}
|
||||
) : null}
|
||||
</Space>
|
||||
<VipRecharge visible={vipRechargeVisible} onCancel={() => setVipRechargeVisible(false)} />
|
||||
<CreditRecharge visible={creditRechargeVisible} onCancel={() => setCreditRechargeVisible(false)} />
|
||||
|
||||
@@ -1,63 +1,11 @@
|
||||
import styles from './login-register.module.less';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Modal } from '@douyinfe/semi-ui';
|
||||
import LoginRegisterBox from './loginRegisterBox/LoginRegisterBox';
|
||||
import { pubsub } from '@utils/index';
|
||||
import { Close } from '@icon-park/react';
|
||||
import { language } from '@language/language';
|
||||
import { stores } from '@stores/index';
|
||||
|
||||
/**
|
||||
* 免登录改造:登录/注册弹窗整体停用。
|
||||
* 任何位置触发 showLoginModal 或渲染 <LoginRegister> 都不再出现登录界面,
|
||||
* 应用始终以本地访客身份运行。
|
||||
*/
|
||||
function LoginRegister({ children }: any) {
|
||||
const [visible, setVisible] = useState(false);
|
||||
|
||||
const showVisible = () => {
|
||||
if (!stores.user.info) {
|
||||
setVisible(true);
|
||||
} else {
|
||||
console.log(stores.user.info);
|
||||
console.warn('已经登录过了');
|
||||
// history.push(location.pathname);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
pubsub.subscribe('showLoginModal', (_eventName: string, mark: boolean) => {
|
||||
if (mark !== undefined) {
|
||||
setVisible(mark);
|
||||
} else {
|
||||
setVisible(true);
|
||||
}
|
||||
});
|
||||
return () => {
|
||||
pubsub.unsubscribe('showLoginModal');
|
||||
};
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className={styles.loginRegister}>
|
||||
{children ? (
|
||||
<span onClick={showVisible}>{children}</span>
|
||||
) : (
|
||||
<a onClick={showVisible} className={styles.loginRegisterBtn}>
|
||||
{language.val('login_login0')}
|
||||
</a>
|
||||
)}
|
||||
<Modal
|
||||
className="loginRegisterModal"
|
||||
style={{ padding: 0 }}
|
||||
bodyStyle={{ padding: 0, margin: 0, border: 'none' }}
|
||||
title={null}
|
||||
width={836}
|
||||
visible={visible}
|
||||
zIndex={1000}
|
||||
footer={null}
|
||||
closeIcon={<Close />}
|
||||
onCancel={() => setVisible(false)}
|
||||
>
|
||||
{visible && <LoginRegisterBox />}
|
||||
</Modal>
|
||||
</div>
|
||||
);
|
||||
// 不再渲染任何登录入口/弹窗
|
||||
return null;
|
||||
}
|
||||
|
||||
export default LoginRegister;
|
||||
@@ -77,7 +77,7 @@ class LoginQrcode extends Component<IProps, IState> {
|
||||
<Wechat theme="filled" size="28" fill="#4ab70f" />
|
||||
<span className={styles.text}>{language.val('login_wechat_login')}</span>
|
||||
</p>
|
||||
<img style={{ width: 160 }} src={url || 'https://cdn.h5ds.com/static/images/qrcode-loading.png'} alt="" />
|
||||
<img style={{ width: 160 }} src={url || '/assets/images/qrcode-loading.png'} alt="" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user