Skip to content

Commit

Permalink
Fix wiki module bug (#7304)
Browse files Browse the repository at this point in the history
* optimize code

* update sdoc version and sdoc translate
  • Loading branch information
shuntian authored Jan 4, 2025
1 parent dd177f4 commit 28bb333
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
8 changes: 4 additions & 4 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@gatsbyjs/reach-router": "1.3.9",
"@seafile/react-image-lightbox": "3.0.4",
"@seafile/resumablejs": "1.1.16",
"@seafile/sdoc-editor": "1.0.191",
"@seafile/sdoc-editor": "1.0.192",
"@seafile/seafile-calendar": "0.0.28",
"@seafile/seafile-editor": "1.0.133",
"@seafile/sf-metadata-ui-component": "^0.0.62",
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/pages/wiki2/main-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class MainPanel extends Component {
const { seadoc_access_token, currentPageId, config } = props;
const appConfig = window.app.config;
const pageOptions = window.app.pageOptions;
const { assetsUrl, seadocServerUrl: sdocServer, } = window.wiki.config;
const { assetsUrl, seadocServerUrl: sdocServer, publishUrl } = window.wiki.config;
window.seafile = {
...window.seafile, // need docUuid
...appConfig,
Expand All @@ -52,6 +52,7 @@ class MainPanel extends Component {
serviceUrl: appConfig.serviceURL,
assets_url: appConfig.assetsUrl,
isWiki: true,
publishUrl,
};
const currentPageConfig = getCurrentPageConfig(config.pages, currentPageId);
return { ...props, docUuid: window.seafile.docUuid, currentPageConfig };
Expand Down
15 changes: 8 additions & 7 deletions seahub/templates/wiki/wiki_publish.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
{% load render_bundle from webpack_loader %}
{% load seahub_tags %}
{% block extra_ogp_tags %}
<meta property="og:type" content="website" />
<meta property="og:type" content="website">
<meta property="og:site_name" content="{{ site_name }}">
<meta property="og:url" content="{{ service_url }}{{ request.path }}" />
<meta property="og:title" content="{{ repo_name }}" />
<meta property="og:image" content="{{ service_url }}{{ MEDIA_URL }}img/file/{{ filename|file_icon_filter }}" />
<meta property="og:description" content="{{ filename }}" />
<meta property="og:url" content="{{ service_url }}{{ request.path }}">
<meta property="og:title" content="{{ repo_name }}">
<meta property="og:image" content="{{ service_url }}{{ MEDIA_URL }}img/file/{{ filename|file_icon_filter }}">
<meta property="og:description" content="{{ filename }}">
{% endblock %}
{% block extra_style %}
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}seafile-editor/seafile-editor-font.css" />
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}sdoc-editor/sdoc-editor-font.css" />
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}seafile-editor/seafile-editor-font.css">
<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}sdoc-editor/sdoc-editor-font.css">
{% render_bundle 'wiki2' 'css' %}
{% endblock %}

Expand All @@ -28,6 +28,7 @@
isWiki2: true,
seadocServerUrl: "{{ seadoc_server_url }}",
permission: "{{ permission }}",
publishUrl: "{{ publish_url }}"
}
};
</script>
Expand Down
3 changes: 2 additions & 1 deletion seahub/wiki2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ def wiki_publish_view(request, publish_url, page_id=None):
"modifier": latest_contributor,
"modify_time": last_modified,
"seadoc_server_url": SEADOC_SERVER_URL,
"permission": 'public'
"permission": 'public',
"publish_url": publish_url
})

def wiki_history_view(request, wiki_id):
Expand Down

0 comments on commit 28bb333

Please sign in to comment.