Skip to content

Commit

Permalink
version page 100%
Browse files Browse the repository at this point in the history
  • Loading branch information
rafa0128 committed Sep 25, 2022
1 parent 9a95255 commit e4bd90b
Show file tree
Hide file tree
Showing 184 changed files with 42,093 additions and 155 deletions.
2 changes: 1 addition & 1 deletion 接口文档.md → API.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## APP相关接口
## 1. APP相关接口

#### 上传版本文件
- Curl
Expand Down
2 changes: 1 addition & 1 deletion README.EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Hyacinth
Hyacinth is a lightweight, free APP package internal testing platform, and supports virus scanning, security reinforcement and other functions. The open API can help you build into the CI/CD process, and the beautiful UI and convenient installation method can better distribute the internal testing package to the team.

<img src="https://cdn.nlark.com/yuque/0/2022/png/153412/1662378693260-2120f7bd-c9dd-4766-9c8b-a97863a684ad.png?x-oss-process=image%2Fresize%2Cw_1500%2Climit_0" width="100%">
<img src="https://cdn.nlark.com/yuque/0/2022/png/153412/1664101122085-064d6607-3a25-4097-9c63-71ddb62a643b.png?x-oss-process=image%2Fresize%2Cw_1500%2Climit_0" width="100%">

## Initialization
```
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
## 风信子
风信子是一个轻量、免费的APP包内测平台,并且支持病毒扫描、安全加固等功能。开放式API可以有助你构建到CI/CD流程中,美观的UI、便捷的安装方式可以更好的给团队内部分发内测包。

<img src="https://cdn.nlark.com/yuque/0/2022/png/153412/1662378693260-2120f7bd-c9dd-4766-9c8b-a97863a684ad.png?x-oss-process=image%2Fresize%2Cw_1500%2Climit_0" width="100%">
<img src="https://cdn.nlark.com/yuque/0/2022/png/153412/1664101122085-064d6607-3a25-4097-9c63-71ddb62a643b.png?x-oss-process=image%2Fresize%2Cw_1500%2Climit_0" width="100%">

## 初始化
```
Expand Down
4 changes: 3 additions & 1 deletion hyacinth/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
SECRET_KEY = 'django-insecure-kbnw%$@c503l6yieh=^n9_@hvin0zm$%h-y1=1qps*h)7qucbm'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = False

ALLOWED_HOSTS = ['*']

Expand Down Expand Up @@ -156,6 +156,8 @@

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')


# Default primary key field type
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field

Expand Down
6 changes: 5 additions & 1 deletion hyacinth/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@
from django.views import static
from django.conf import settings
from django.urls import re_path as url
from hysite.views import error

handler404 = error.Error.error_404_page
handler500 = error.Error.error_500_page

urlpatterns = [
path('admin/', admin.site.urls),
path('', include('hysite.urls')),
path('', include('social_django.urls', namespace='social')),
url(r'^static/(?P<path>.*)$', static.serve,{'document_root': settings.STATIC_ROOT}, name='static'),
url(r'^static/(?P<path>.*)$', static.serve, {'document_root': settings.STATIC_ROOT}, name='static'),
]
Binary file added hysite/static/image/404.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hysite/static/image/500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified hysite/static/image/app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions hysite/templates/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/>
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
<title>404 - 风信子</title>
<link rel="icon" href="/static/image/logo/logo.png">
<!-- CSS files -->
<link href="/static/css/tabler.min.css" rel="stylesheet"/>
</head>
<body class="antialiased border-top-wide d-flex flex-column">
<div class="page page-center">
<div class="container-tight">
<img src="/static/image/404.png">
<a href="/package/home/app=all" class="btn btn-primary" style="margin-left: 160px">
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><line x1="5" y1="12" x2="19" y2="12" /><line x1="5" y1="12" x2="11" y2="18" /><line x1="5" y1="12" x2="11" y2="6" /></svg>
回到首页
</a>
</div>
</div>
<script src="/static/js/tabler.min.js"></script>
</body>
</html>
24 changes: 24 additions & 0 deletions hysite/templates/500.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/>
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
<title>500 - 风信子</title>
<link rel="icon" href="/static/image/logo/logo.png">
<!-- CSS files -->
<link href="/static/css/tabler.min.css" rel="stylesheet"/>
</head>
<body class="antialiased border-top-wide d-flex flex-column">
<div class="page page-center">
<div class="container-tight">
<img src="/static/image/500.png">
<a href="/package/home/app=all" class="btn btn-primary" style="margin-left: 160px">
<svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><line x1="5" y1="12" x2="19" y2="12" /><line x1="5" y1="12" x2="11" y2="18" /><line x1="5" y1="12" x2="11" y2="6" /></svg>
回到首页
</a>
</div>
</div>
<script src="/static/js/tabler.min.js"></script>
</body>
</html>
60 changes: 48 additions & 12 deletions hysite/templates/package-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@

{% block ms-auto %}
<select id="search-version" class="select2-selection--single form-control" data-placeholder="请选择版本" style="width: auto;min-width: 150px">
{% if version != 'None' %}
<option>{{ version }}</option>
{% endif %}
{% for versions in version_list %}
{% if versions.version != version %}
<option>{{ versions.version }}</option>
{% endif %}
{% endfor %}
</select>
{% endblock %}
Expand All @@ -37,13 +42,13 @@ <h2 class="mb-3">Build Num #{{ package_file.build_num }}</h2>
</a>
</div>
<div class="col-auto mt-2">
<a class="btn btn-default">
<a class="btn btn-default" onclick="createQrcode('{{ package_file.filepath }}')">
<svg t="1662462699219" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8241" width="2000" height="2000"><path d="M260 260m-196 0a196 196 0 1 0 392 0 196 196 0 1 0-392 0Z" fill="#8C9EFF" p-id="8242"></path><path d="M260 260m-84 0a84 84 0 1 0 168 0 84 84 0 1 0-168 0Z" fill="#313FA0" p-id="8243"></path><path d="M260 764m-196 0a196 196 0 1 0 392 0 196 196 0 1 0-392 0Z" fill="#8C9EFF" p-id="8244"></path><path d="M260 764m-84 0a84 84 0 1 0 168 0 84 84 0 1 0-168 0Z" fill="#313FA0" p-id="8245"></path><path d="M764 260m-196 0a196 196 0 1 0 392 0 196 196 0 1 0-392 0Z" fill="#8C9EFF" p-id="8246"></path><path d="M764 260m-84 0a84 84 0 1 0 168 0 84 84 0 1 0-168 0Z" fill="#313FA0" p-id="8247"></path><path d="M624 624m-56 0a56 56 0 1 0 112 0 56 56 0 1 0-112 0Z" fill="#FFD600" p-id="8248"></path><path d="M904 624m-56 0a56 56 0 1 0 112 0 56 56 0 1 0-112 0Z" fill="#FFD600" p-id="8249"></path><path d="M624 904m-56 0a56 56 0 1 0 112 0 56 56 0 1 0-112 0Z" fill="#FFD600" p-id="8250"></path><path d="M764 820c-23.1 0-42-18.9-42-42v-28c0-23.1 18.9-42 42-42s42 18.9 42 42v28c0 23.1-18.9 42-42 42zM918 736c-23.1 0-42 18.9-42 42v70c0 15.46-12.54 28-28 28h-68.16c-20.32 0-39.04 13.61-43 33.54C731.53 936.3 752.13 960 778 960h140c23.1 0 42-18.9 42-42V778c0-23.1-18.9-42-42-42z" fill="#FFD600" p-id="8251"></path></svg>
二维码
</a>
</div>
<div class="col-auto mt-2">
<a class="btn btn-default">
<a class="btn btn-default" onclick="createShare('{{ app }}','{{ version }}','{{ package_file.filename }}')">
<svg t="1662287020701" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="34233" width="2000" height="2000"><path d="M363.91 438.358l265.776-153.45 18.85 32.648-265.775 153.45z" fill="#4E30DC" p-id="34234"></path><path d="M380.8 478.5l-24.3-42.1 275.3-159 24.3 42.1-275.3 159z m-9.3-38.1l13.3 23.1 256.3-148-13.3-23.1-256.3 148zM361.676 595.73l18.85-32.647L646.3 716.533l-18.85 32.648z" fill="#4E30DC" p-id="34235"></path><path d="M629.5 756.7l-275.3-159 24.3-42.1 275.3 159-24.3 42.1z m-260.3-163l256.3 148 13.3-23.1-256.3-148-13.3 23.1z" fill="#4E30DC" p-id="34236"></path><path d="M267.1 368.8c-79.8 0-144.6 64.9-144.6 144.7 0 79.7 64.9 144.6 144.6 144.6 79.7 0 144.6-64.9 144.6-144.6 0-79.8-64.8-144.7-144.6-144.7z m0 240.6c-52.9 0-96-43-96-96 0-52.9 43.1-96 96-96s96 43.1 96 96c0 53-43.1 96-96 96z" fill="#FF4E7D" p-id="34237"></path><path d="M749.6 632.7c-76.7 0-139.1 62.4-139.1 139.1 0 76.7 62.4 139.2 139.1 139.2 76.7 0 139.1-62.4 139.1-139.2 0-76.7-62.4-139.1-139.1-139.1zM851 771.9c0 56-45.5 101.5-101.5 101.5S648 827.9 648 771.9c0-55.9 45.5-101.5 101.5-101.5S851 715.9 851 771.9z" fill="#4E30DC" p-id="34238"></path><path d="M749.6 916.5c-79.8 0-144.6-64.9-144.6-144.7 0-79.7 64.9-144.6 144.6-144.6 79.7 0 144.6 64.9 144.6 144.6 0 79.8-64.9 144.7-144.6 144.7z m0-278.3c-73.7 0-133.6 59.9-133.6 133.6 0 73.7 60 133.7 133.6 133.7 73.7 0 133.6-60 133.6-133.7 0-73.6-59.9-133.6-133.6-133.6z m0 240.7c-59 0-107-48-107-107s48-107 107-107 107 48 107 107c-0.1 59-48 107-107 107z m0-203c-52.9 0-96 43-96 96 0 52.9 43.1 96 96 96s96-43.1 96-96c-0.1-52.9-43.1-96-96-96z" fill="#4E30DC" p-id="34239"></path><path d="M749.6 113.8c-76.7 0-139.1 62.4-139.1 139.1 0 76.7 62.4 139.2 139.1 139.2 76.7 0 139.1-62.4 139.1-139.2 0-76.7-62.4-139.1-139.1-139.1zM851 252.9c0 56-45.5 101.5-101.5 101.5S648 308.9 648 252.9c0-55.9 45.5-101.5 101.5-101.5S851 196.9 851 252.9z" fill="#4E30DC" p-id="34240"></path><path d="M749.6 397.5c-79.8 0-144.6-64.9-144.6-144.7 0-79.7 64.9-144.6 144.6-144.6 79.7 0 144.6 64.9 144.6 144.6 0 79.9-64.9 144.7-144.6 144.7z m0-278.2c-73.7 0-133.6 59.9-133.6 133.6 0 73.7 60 133.7 133.6 133.7 73.7 0 133.6-60 133.6-133.7 0-73.7-59.9-133.6-133.6-133.6z m0 240.6c-59 0-107-48-107-107s48-107 107-107 107 48 107 107c-0.1 59-48 107-107 107z m0-203c-52.9 0-96 43-96 96 0 52.9 43.1 96 96 96s96-43.1 96-96c-0.1-52.9-43.1-96-96-96z" fill="#4E30DC" p-id="34241"></path></svg>
分享
</a>
Expand All @@ -55,7 +60,7 @@ <h2 class="mb-3">Build Num #{{ package_file.build_num }}</h2>
</a>
</div>
</div>
<!--<div id="qrcode"></div>-->
<div id="make-content" class="mt-3" style="display: none"></div>
</div>
</div>
</div>
Expand Down Expand Up @@ -98,7 +103,7 @@ <h2 class="mb-3">Build Num #{{ package_file.build_num }}</h2>
</g>
</svg>
</div>
<p class="empty-title">该应用没有版本记录</p>
<p class="empty-title">该版本没有文件记录</p>
</div>
{% endif %}
<div class="modal modal-blur fade" id="modal-danger" tabindex="-1" role="dialog" aria-hidden="true">
Expand Down Expand Up @@ -171,15 +176,46 @@ <h3>确认删除?</h3>
});
}

// var qrcode = new QRCode(document.getElementById("qrcode"), {
// text: "https://github.com/",
// width: 280,
// height: 280,
// colorDark : "#303030",
// colorLight : "#ffffff",
// correctLevel : QRCode.CorrectLevel.H
// });
function createShare(pkgname, version, filename) {
$.ajax({
url: "/package/api/file/share",
type: "POST",
async: false,
data: {
pkgname: pkgname,
version: version,
filename: filename,
},
beforeSend: function () {
SwalLoading('Loading');
},
complete: function () {
swal.close();
},
success: function (data) {
if (data['status'] == 1) {
$('#make-content').show();
$('#make-content').text(data['share_path']);
}
else{
Spop(SPOP_TYPE['error'],data['msg']);
}
}
});
}

function createQrcode(filepath) {
$('#make-content').show();
$('#make-content').text();
new QRCode(document.getElementById("make-content"), {
text: filepath,
width: 280,
height: 280,
colorDark : "#303030",
colorLight : "#ffffff",
correctLevel : QRCode.CorrectLevel.H
});
}

</script>
{% endblock %}
Expand Down
Loading

0 comments on commit e4bd90b

Please sign in to comment.