feat: Tag管理功能 + 打包脚本优化 + CI/CD发布流水线
- 新增标签管理: 列表/创建/删除/推送标签 (后端API + 前端UI) - 前端新增标签Tab页,支持创建、删除、推送操作 - config.go 改为从可执行文件同目录加载 config.yaml - 各平台构建脚本自动复制 config.yaml 到输出目录 - Windows 打包改为 ZIP 格式 (不依赖 NSIS) - 新增 GitHub Actions Release 工作流 (三平台自动构建+发布)
This commit is contained in:
@@ -62,6 +62,27 @@ export function CommitChanges(path, message) {
|
||||
return $Call.ByID(921984546, path, message);
|
||||
}
|
||||
|
||||
/**
|
||||
* CreateTag 创建标签
|
||||
* @param {string} path
|
||||
* @param {string} name
|
||||
* @param {string} message
|
||||
* @returns {$CancellablePromise<void>}
|
||||
*/
|
||||
export function CreateTag(path, name, message) {
|
||||
return $Call.ByID(4209616956, path, name, message);
|
||||
}
|
||||
|
||||
/**
|
||||
* DeleteTag 删除标签(本地+远程)
|
||||
* @param {string} path
|
||||
* @param {string} name
|
||||
* @returns {$CancellablePromise<void>}
|
||||
*/
|
||||
export function DeleteTag(path, name) {
|
||||
return $Call.ByID(873653241, path, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* DiscardFiles 丢弃工作区指定文件的更改
|
||||
* @param {string} path
|
||||
@@ -210,6 +231,17 @@ export function GetProjectTree() {
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* GetTags 获取所有标签
|
||||
* @param {string} path
|
||||
* @returns {$CancellablePromise<$models.TagInfo[]>}
|
||||
*/
|
||||
export function GetTags(path) {
|
||||
return $Call.ByID(3979169621, path).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType15($result);
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* GetUserInfo 获取用户信息
|
||||
* @param {string} platform
|
||||
@@ -218,7 +250,7 @@ export function GetProjectTree() {
|
||||
*/
|
||||
export function GetUserInfo(platform, username) {
|
||||
return $Call.ByID(2674655707, platform, username).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType15($result);
|
||||
return $$createType17($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -240,6 +272,16 @@ export function PushProject(path) {
|
||||
return $Call.ByID(3887901113, path);
|
||||
}
|
||||
|
||||
/**
|
||||
* PushTag 推送标签到远程
|
||||
* @param {string} path
|
||||
* @param {string} name
|
||||
* @returns {$CancellablePromise<void>}
|
||||
*/
|
||||
export function PushTag(path, name) {
|
||||
return $Call.ByID(1424810524, path, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* RemovePlatform 删除平台
|
||||
* @param {string} name
|
||||
@@ -393,5 +435,7 @@ const $$createType10 = $models.ProjectStatus.createFrom;
|
||||
const $$createType11 = $Create.Nullable($$createType10);
|
||||
const $$createType12 = $models.TreeNode.createFrom;
|
||||
const $$createType13 = $Create.Array($$createType12);
|
||||
const $$createType14 = $models.UserInfo.createFrom;
|
||||
const $$createType15 = $Create.Nullable($$createType14);
|
||||
const $$createType14 = $models.TagInfo.createFrom;
|
||||
const $$createType15 = $Create.Array($$createType14);
|
||||
const $$createType16 = $models.UserInfo.createFrom;
|
||||
const $$createType17 = $Create.Nullable($$createType16);
|
||||
|
||||
@@ -14,6 +14,7 @@ export {
|
||||
FileInfo,
|
||||
PlatformInfo,
|
||||
ProjectStatus,
|
||||
TagInfo,
|
||||
TreeNode,
|
||||
UserInfo
|
||||
} from "./models.js";
|
||||
|
||||
@@ -294,6 +294,58 @@ export class ProjectStatus {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TagInfo 标签信息
|
||||
*/
|
||||
export class TagInfo {
|
||||
/**
|
||||
* Creates a new TagInfo instance.
|
||||
* @param {Partial<TagInfo>} [$$source = {}] - The source object to create the TagInfo.
|
||||
*/
|
||||
constructor($$source = {}) {
|
||||
if (!("name" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["name"] = "";
|
||||
}
|
||||
if (!("hash" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["hash"] = "";
|
||||
}
|
||||
if (!("timestamp" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {number}
|
||||
*/
|
||||
this["timestamp"] = 0;
|
||||
}
|
||||
if (!("message" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["message"] = "";
|
||||
}
|
||||
|
||||
Object.assign(this, $$source);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new TagInfo instance from a string or object.
|
||||
* @param {any} [$$source = {}]
|
||||
* @returns {TagInfo}
|
||||
*/
|
||||
static createFrom($$source = {}) {
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
return new TagInfo(/** @type {Partial<TagInfo>} */($$parsedSource));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TreeNode 前端侧边栏树节点
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user