diff --git a/MirageClient b/MirageClient
index ae9f955..48d3407 160000
--- a/MirageClient
+++ b/MirageClient
@@ -1 +1 @@
-Subproject commit ae9f95586f6c88f0149e42bf47c27c9f7eb87adc
+Subproject commit 48d3407123063f8179a842f9546b5849618f6cfb
diff --git a/cockpit_web/src/setpart/ClientPublish.vue b/cockpit_web/src/setpart/ClientPublish.vue
index ea64f77..1e990ea 100644
--- a/cockpit_web/src/setpart/ClientPublish.vue
+++ b/cockpit_web/src/setpart/ClientPublish.vue
@@ -38,6 +38,9 @@ const naviAarch64Uploader = ref(null);
const naviProc = ref("");
const naviProcPercent = ref(0);
+const wantLinuxRepo = ref("");
+const wantLinuxRepoCred = ref("");
+
const wantWinVersion = ref({});
const winExtURL = ref(false);
const winUploader = ref(null);
@@ -185,15 +188,42 @@ function handleWinError(err) {
toastShow.value = true;
}
-onMounted(() => {
+var getLinuxBuildStateIntID;
+
+function getLinuxBuildState() {
axios
- .get("/cockpit/api/setting/general")
+ .get("/cockpit/api/publish")
.then(function (response) {
// 处理成功情况
if (response.data["status"] == "success") {
- uploadURL.value =
- "https://" + response.data["data"]["server_url"] + "/cockpit/api/publish/";
+ uploadURL.value = response.data["data"]["upload_url"];
ClientVersion.value = response.data["data"]["client_version"];
+ if (ClientVersion.value["linux"]["buildst"] != "正在进行") {
+ clearInterval(getLinuxBuildStateIntID);
+ }
+ } else {
+ toastMsg.value = response.data["status"].substring(6);
+ toastShow.value = true;
+ }
+ })
+ .catch(function (error) {
+ // 处理错误情况
+ toastMsg.value = error;
+ toastShow.value = true;
+ });
+}
+
+onMounted(() => {
+ axios
+ .get("/cockpit/api/publish")
+ .then(function (response) {
+ // 处理成功情况
+ if (response.data["status"] == "success") {
+ uploadURL.value = response.data["data"]["upload_url"];
+ ClientVersion.value = response.data["data"]["client_version"];
+
+ wantLinuxRepo.value = response.data["data"]["client_version"]["linux"]["url"];
+
wantWinVersion.value = {};
wantWinVersion.value["version"] =
response.data["data"]["client_version"]["win"]["version"];
@@ -221,6 +251,33 @@ onMounted(() => {
});
});
+function publishLinux() {
+ axios
+ .post("/cockpit/api/publish/linux", {
+ version: wantLinuxRepoCred.value,
+ url: wantLinuxRepo.value,
+ })
+ .then(function (response) {
+ // 处理成功情况
+ if (response.data["status"] == "success") {
+ toastMsg.value = "Linux已提交构建";
+ toastShow.value = true;
+ getLinuxBuildStateIntID = setInterval(() => {
+ getLinuxBuildState();
+ }, 3000);
+ } else {
+ toastMsg.value = response.data["status"].substring(6);
+ toastShow.value = true;
+ }
+ })
+ .catch(function (error) {
+ // 处理错误情况
+ toastMsg.value = error;
+ toastShow.value = true;
+ });
+ return;
+}
+
function publishWin() {
if (winExtURL.value) {
axios
@@ -501,6 +558,178 @@ function publishIOSToTestflight() {
+
+
+
+
+ Linux 客户端发布
+
+
+
+
+
+
+
+
+ 当前源码仓库
+
+
+ {{
+ ClientVersion.linux.url && ClientVersion.linux.url != ""
+ ? ClientVersion.linux.url
+ : "未设置"
+ }}
+
+
当前版本
+
+ {{
+ ClientVersion.linux.version && ClientVersion.linux.version != ""
+ ? ClientVersion.linux.version
+ : "尚未构建本"
+ }}
+
+
+ 最近一次构建情况
+
+
+ {{
+ ClientVersion.linux.buildst && ClientVersion.linux.buildst != ""
+ ? ClientVersion.linux.buildst
+ : "尚未进行"
+ }}
+
+
+
+
+
+
+
+
+
+ 用户名:口令 (选填, 填 clear 清除)
+
+
+
+
+
+
+