1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 15:38:15 +00:00

add-isPro

This commit is contained in:
yinjianfei
2023-12-14 10:33:19 +08:00
parent 8756ded5ae
commit 49f49a56b7
3 changed files with 4 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ import { Utils } from './utils/utils';
import Loading from './components/loading'; import Loading from './components/loading';
import SdocEditor from './pages/sdoc/sdoc-editor'; import SdocEditor from './pages/sdoc/sdoc-editor';
const { serviceURL, avatarURL, siteRoot, lang, mediaUrl } = window.app.config; const { serviceURL, avatarURL, siteRoot, lang, mediaUrl, isPro } = window.app.config;
const { username, name } = window.app.userInfo; const { username, name } = window.app.userInfo;
const { const {
repoID, repoName, parentDir, filePerm, repoID, repoName, parentDir, filePerm,
@@ -45,6 +45,7 @@ window.seafile = {
revisionId, revisionId,
mediaUrl, mediaUrl,
isFreezed, isFreezed,
isPro: isPro === 'True' ? true : false,
}; };
ReactDom.render( ReactDom.render(

View File

@@ -8,6 +8,7 @@
{% endblock %} {% endblock %}
{% block extra_data %} {% block extra_data %}
isPro: '{{ is_pro }}',
docPath: '{{ path|escapejs }}', docPath: '{{ path|escapejs }}',
docName: '{{ filename|escapejs }}', docName: '{{ filename|escapejs }}',
docUuid: '{{ file_uuid }}', docUuid: '{{ file_uuid }}',

View File

@@ -2229,6 +2229,7 @@ def view_sdoc_revision(request, repo_id, revision_id):
return_dict['can_share_file'] = False return_dict['can_share_file'] = False
return_dict['filetype'] = 'SDoc' return_dict['filetype'] = 'SDoc'
return_dict['is_pro'] = is_pro_version()
file_uuid = revision.doc_uuid file_uuid = revision.doc_uuid
return_dict['file_uuid'] = file_uuid return_dict['file_uuid'] = file_uuid