Skip to content

Commit 64c3ea8

Browse files
authored
Merge branch 'master' into open-repository-open-cat-file-batch
2 parents 9212acc + 5c5cfd6 commit 64c3ea8

File tree

7 files changed

+41
-27
lines changed

7 files changed

+41
-27
lines changed

modules/structs/admin_user.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ type EditUserOption struct {
3232
FullName *string `json:"full_name" binding:"MaxSize(100)"`
3333
Password string `json:"password" binding:"MaxSize(255)"`
3434
MustChangePassword *bool `json:"must_change_password"`
35-
Website *string `json:"website" binding:"MaxSize(50)"`
35+
Website *string `json:"website" binding:"OmitEmpty;ValidUrl;MaxSize(255)"`
3636
Location *string `json:"location" binding:"MaxSize(50)"`
37+
Description *string `json:"description" binding:"MaxSize(255)"`
3738
Active *bool `json:"active"`
3839
Admin *bool `json:"admin"`
3940
AllowGitHook *bool `json:"allow_git_hook"`

modules/structs/org.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ type CreateOrgOption struct {
2222
// required: true
2323
UserName string `json:"username" binding:"Required"`
2424
FullName string `json:"full_name"`
25-
Description string `json:"description"`
26-
Website string `json:"website"`
27-
Location string `json:"location"`
25+
Description string `json:"description" binding:"MaxSize(255)"`
26+
Website string `json:"website" binding:"ValidUrl;MaxSize(255)"`
27+
Location string `json:"location" binding:"MaxSize(50)"`
2828
// possible values are `public` (default), `limited` or `private`
2929
// enum: public,limited,private
3030
Visibility string `json:"visibility" binding:"In(,public,limited,private)"`
@@ -34,9 +34,9 @@ type CreateOrgOption struct {
3434
// EditOrgOption options for editing an organization
3535
type EditOrgOption struct {
3636
FullName string `json:"full_name"`
37-
Description string `json:"description"`
38-
Website string `json:"website"`
39-
Location string `json:"location"`
37+
Description string `json:"description" binding:"MaxSize(255)"`
38+
Website string `json:"website" binding:"ValidUrl;MaxSize(255)"`
39+
Location string `json:"location" binding:"MaxSize(50)"`
4040
// possible values are `public`, `limited` or `private`
4141
// enum: public,limited,private
4242
Visibility string `json:"visibility" binding:"In(,public,limited,private)"`

modules/structs/user.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ type User struct {
3737
Location string `json:"location"`
3838
// the user's website
3939
Website string `json:"website"`
40-
// the user's biography
41-
Description string `json:"bio"`
40+
// the user's description
41+
Description string `json:"description"`
4242
}
4343

4444
// MarshalJSON implements the json.Marshaler interface for User, adding field(s) for backward compatibility

options/locale/locale_zh-TW.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ repositories=儲存庫列表
419419
activity=公開動態
420420
followers=追蹤者
421421
starred=已加星號
422+
watched=關注的儲存庫
422423
projects=專案
423424
following=追蹤中
424425
follow=追蹤
@@ -1121,6 +1122,8 @@ issues.context.edit=編輯
11211122
issues.context.delete=刪除
11221123
issues.no_content=尚未有任何內容
11231124
issues.close_issue=關閉
1125+
issues.pull_merged_at=`合併了提交 <a class="ui sha" href="%[1]s"><code>%[2]s</code></a> 至 <b>%[3]s</b> %[4]s`
1126+
issues.manually_pull_merged_at=`手動合併了提交 <a class="ui sha" href="%[1]s"><code>%[2]s</code></a> 至 <b>%[3]s</b> %[4]s`
11241127
issues.close_comment_issue=留言並關閉
11251128
issues.reopen_issue=重新開放
11261129
issues.reopen_comment_issue=留言並重新開放
@@ -1214,6 +1217,7 @@ issues.error_modifying_due_date=無法修改截止日期。
12141217
issues.error_removing_due_date=無法移除截止日期。
12151218
issues.push_commit_1=加入了 %d 個提交 %s
12161219
issues.push_commits_n=加入了 %d 個提交 %s
1220+
issues.force_push_codes=`強制推送了 %[1]s 自 <a class="ui sha" href="%[3]s"><code>%[2]s</code></a> 至 <a class="ui sha" href="%[5]s"><code>%[4]s</code></a> %[6]s`
12171221
issues.due_date_form=yyyy年mm月dd日
12181222
issues.due_date_form_add=新增截止日期
12191223
issues.due_date_form_edit=編輯
@@ -2173,6 +2177,8 @@ dashboard.total_gc_time=總 GC 暫停時間
21732177
dashboard.total_gc_pause=總 GC 暫停時間
21742178
dashboard.last_gc_pause=上次 GC 暫停時間
21752179
dashboard.gc_times=GC 執行次數
2180+
dashboard.delete_old_actions=從資料庫刪除所有舊行為
2181+
dashboard.delete_old_actions.started=從資料庫刪除所有舊行為的任務已啟動。
21762182

21772183
users.user_manage_panel=使用者帳戶管理
21782184
users.new_account=建立使用者帳戶

routers/api/v1/admin/user.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,9 @@ func EditUser(ctx *context.APIContext) {
203203
if form.Location != nil {
204204
u.Location = *form.Location
205205
}
206+
if form.Description != nil {
207+
u.Description = *form.Description
208+
}
206209
if form.Active != nil {
207210
u.IsActive = *form.Active
208211
}

templates/swagger/v1_json.tmpl

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13800,6 +13800,10 @@
1380013800
"type": "boolean",
1380113801
"x-go-name": "AllowImportLocal"
1380213802
},
13803+
"description": {
13804+
"type": "string",
13805+
"x-go-name": "Description"
13806+
},
1380313807
"email": {
1380413808
"type": "string",
1380513809
"format": "email",
@@ -16251,16 +16255,16 @@
1625116255
"type": "string",
1625216256
"x-go-name": "AvatarURL"
1625316257
},
16254-
"bio": {
16255-
"description": "the user's biography",
16256-
"type": "string",
16257-
"x-go-name": "Description"
16258-
},
1625916258
"created": {
1626016259
"type": "string",
1626116260
"format": "date-time",
1626216261
"x-go-name": "Created"
1626316262
},
16263+
"description": {
16264+
"description": "the user's description",
16265+
"type": "string",
16266+
"x-go-name": "Description"
16267+
},
1626416268
"email": {
1626516269
"type": "string",
1626616270
"format": "email",

web_src/less/chroma/light.less

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@
2525
.chroma .vc { color: #008080; } /* NameVariableClass */
2626
.chroma .vg { color: #008080; } /* NameVariableGlobal */
2727
.chroma .vi { color: #008080; } /* NameVariableInstance */
28-
.chroma .s { color: #032f62; } /* LiteralString */
29-
.chroma .sa { color: #032f62; } /* LiteralStringAffix */
30-
.chroma .sb { color: #032f62; } /* LiteralStringBacktick */
31-
.chroma .sc { color: #032f62; } /* LiteralStringChar */
32-
.chroma .dl { color: #032f62; } /* LiteralStringDelimiter */
33-
.chroma .sd { color: #032f62; } /* LiteralStringDoc */
34-
.chroma .s2 { color: #032f62; } /* LiteralStringDouble */
35-
.chroma .se { color: #032f62; } /* LiteralStringEscape */
36-
.chroma .sh { color: #032f62; } /* LiteralStringHeredoc */
37-
.chroma .si { color: #032f62; } /* LiteralStringInterpol */
38-
.chroma .sx { color: #032f62; } /* LiteralStringOther */
28+
.chroma .s { color: #106303; } /* LiteralString */
29+
.chroma .sa { color: #106303; } /* LiteralStringAffix */
30+
.chroma .sb { color: #106303; } /* LiteralStringBacktick */
31+
.chroma .sc { color: #106303; } /* LiteralStringChar */
32+
.chroma .dl { color: #106303; } /* LiteralStringDelimiter */
33+
.chroma .sd { color: #106303; } /* LiteralStringDoc */
34+
.chroma .s2 { color: #106303; } /* LiteralStringDouble */
35+
.chroma .se { color: #106303; } /* LiteralStringEscape */
36+
.chroma .sh { color: #106303; } /* LiteralStringHeredoc */
37+
.chroma .si { color: #106303; } /* LiteralStringInterpol */
38+
.chroma .sx { color: #106303; } /* LiteralStringOther */
3939
.chroma .sr { color: #22863a; } /* LiteralStringRegex */
40-
.chroma .s1 { color: #24292e; } /* LiteralStringSingle */
41-
.chroma .ss { color: #032f62; } /* LiteralStringSymbol */
40+
.chroma .s1 { color: #cc7a00; } /* LiteralStringSingle */
41+
.chroma .ss { color: #106303; } /* LiteralStringSymbol */
4242
.chroma .m { color: #009999; } /* LiteralNumber */
4343
.chroma .mb { color: #009999; } /* LiteralNumberBin */
4444
.chroma .mf { color: #009999; } /* LiteralNumberFloat */

0 commit comments

Comments
 (0)