mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-28 08:06:56 +00:00
40 lines
1.2 KiB
HTML
40 lines
1.2 KiB
HTML
{% extends "myhome_base.html" %}
|
|
|
|
{% block main_panel %}
|
|
<div class="text-panel">
|
|
<p id="msg-client" class="error hide">请确认本地Seafile程序已启动。</p>
|
|
<p id="msg-version" class="error hide">你的 Seafile 客户端版本太旧,请升级到最新版本。<a href="http://www.seafile.com/download">点击下载</a></p>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block extra_script %}
|
|
<script type="text/javascript">
|
|
$(function() {
|
|
var req_success = false;
|
|
var version_mismatch = false;
|
|
$.ajax({
|
|
url: '{{ applet_root }}/seafile_access_check/',
|
|
dataType: 'jsonp',
|
|
jsonpCallback: 'xx',
|
|
crossDomain: true,
|
|
success: function(version) {
|
|
if (version < 2) {
|
|
version_mismatch = true;
|
|
} else {
|
|
req_success = true;
|
|
location.href = '{{ SITE_ROOT }}download/repo/?repo_id={{ repo_id }}';
|
|
}
|
|
}
|
|
});
|
|
|
|
setTimeout(function() {
|
|
if (version_mismatch) {
|
|
$('#msg-version').removeClass('hide');
|
|
} else if (!req_success) {
|
|
$('#msg-client').removeClass('hide');
|
|
}
|
|
}, 3000);
|
|
});
|
|
</script>
|
|
{% endblock %}
|