1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-20 10:58:33 +00:00

[terms] rewrote 'terms view' with react (#4589)

This commit is contained in:
llj
2020-06-15 16:27:00 +08:00
committed by GitHub
parent 1a3aca68e3
commit 389f8befee
6 changed files with 64 additions and 9 deletions

39
frontend/src/tc-view.js Normal file
View File

@@ -0,0 +1,39 @@
import React from 'react';
import ReactDOM from 'react-dom';
import Logo from './components/logo';
import Account from './components/common/account';
import TermsPreviewWidget from './components/terms-preview-widget';
import './css/tc-accept.css';
const {
termsName,
termsText
} = window.tc;
class TCView extends React.Component {
render() {
return (
<div className="h-100 d-flex flex-column">
<div className="top-header d-flex justify-content-between">
<Logo />
<Account />
</div>
<div className="o-auto">
<div className="py-4 px-4 my-6 mx-auto content">
<h2 dangerouslySetInnerHTML={{__html: termsName}}></h2>
<div className="article">
<TermsPreviewWidget content={termsText} />
</div>
</div>
</div>
</div>
);
}
}
ReactDOM.render(
<TCView />,
document.getElementById('wrapper')
);