Add copy Commit ID button in commits list (#17759)
* fix: implement commit id copy to clipboard * fix: remove abundant attributes / consider edge-case * fix: locale_en fixed * fix: use ui button * tune copy button * fix: button size * Fix merge Co-authored-by: Ysmr-Ry <ryo.yossy@live.jp> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
		
							parent
							
								
									b2daa7e203
								
							
						
					
					
						commit
						a1f5c7bfce
					
				| 
						 | 
					@ -23,7 +23,8 @@
 | 
				
			||||||
								{{$userName}}
 | 
													{{$userName}}
 | 
				
			||||||
							{{end}}
 | 
												{{end}}
 | 
				
			||||||
						</td>
 | 
											</td>
 | 
				
			||||||
						<td class="sha">
 | 
											<td class="sha df">
 | 
				
			||||||
 | 
												<button class="ui button copy-commit-sha df ac" data-clipboard-text="{{.ID}}">{{svg "octicon-copy" 14}}</button>
 | 
				
			||||||
							{{$class := "ui sha label"}}
 | 
												{{$class := "ui sha label"}}
 | 
				
			||||||
							{{if .Signature}}
 | 
												{{if .Signature}}
 | 
				
			||||||
								{{$class = (printf "%s%s" $class " isSigned")}}
 | 
													{{$class = (printf "%s%s" $class " isSigned")}}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -985,6 +985,13 @@ a.ui.card:hover,
 | 
				
			||||||
    margin: 0 6px;
 | 
					    margin: 0 6px;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .button.copy-commit-sha {
 | 
				
			||||||
 | 
					    border: 1px solid var(--color-light-border);
 | 
				
			||||||
 | 
					    margin-right: 3px;
 | 
				
			||||||
 | 
					    padding: 6px 6px 4px;
 | 
				
			||||||
 | 
					    background: var(--color-light);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .button.truncate {
 | 
					  .button.truncate {
 | 
				
			||||||
    display: inline-block;
 | 
					    display: inline-block;
 | 
				
			||||||
    max-width: 100%;
 | 
					    max-width: 100%;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1364,7 +1364,7 @@
 | 
				
			||||||
          text-align: center;
 | 
					          text-align: center;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        width: 175px;
 | 
					        width: 200px;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue