File tree Expand file tree Collapse file tree 5 files changed +37
-54
lines changed Expand file tree Collapse file tree 5 files changed +37
-54
lines changed Original file line number Diff line number Diff line change
1
+ {{ #if @version.yanked }}
2
+ <button
3
+ type =" button"
4
+ local-class =" button"
5
+ disabled ={{ @version.unyankTask.isRunning }}
6
+ {{ on " click" (perform @version.unyankTask )}}
7
+ >
8
+ {{ #if @version.unyankTask.isRunning }}
9
+ Unyanking...
10
+ {{ else }}
11
+ Unyank
12
+ {{ /if }}
13
+ </button >
14
+ {{ else }}
15
+ <button
16
+ type =" button"
17
+ local-class =" button"
18
+ disabled ={{ @version.yankTask.isRunning }}
19
+ {{ on " click" (perform @version.yankTask )}}
20
+ >
21
+ {{ #if @version.yankTask.isRunning }}
22
+ Yanking...
23
+ {{ else }}
24
+ Yank
25
+ {{ /if }}
26
+ </button >
27
+ {{ /if }}
Original file line number Diff line number Diff line change
1
+ import Component from '@ember/component' ;
2
+
3
+ export default Component . extend ( {
4
+ tagName : '' ,
5
+ } ) ;
Original file line number Diff line number Diff line change
1
+ .button {
2
+ composes : yellow-button small from '../styles/shared/buttons.module.css' ;
3
+ }
Original file line number Diff line number Diff line change 169
169
</LinkTo >
170
170
{{ moment-format version.created_at ' ll' }}
171
171
{{ #if this.isOwner }}
172
- {{ #if version.yanked }}
173
- <button
174
- type =" button"
175
- local-class =" remove-button"
176
- disabled ={{ version.unyankTask.isRunning }}
177
- {{ on " click" (perform version.unyankTask )}}
178
- >
179
- {{ #if version.unyankTask.isRunning }}
180
- Unyanking...
181
- {{ else }}
182
- Unyank
183
- {{ /if }}
184
- </button >
185
- {{ else }}
186
- <button
187
- type =" button"
188
- local-class =" remove-button"
189
- disabled ={{ version.yankTask.isRunning }}
190
- {{ on " click" (perform version.yankTask )}}
191
- >
192
- {{ #if version.yankTask.isRunning }}
193
- Yanking...
194
- {{ else }}
195
- Yank
196
- {{ /if }}
197
- </button >
198
- {{ /if }}
172
+ <YankButton @version ={{ version }} />
199
173
{{ else }}
200
174
{{ #if version.yanked }}
201
175
<span local-class =' yanked' >yanked</span >
Original file line number Diff line number Diff line change 14
14
15
15
<span local-class =" date" >{{ moment-format version.created_at ' LL' }} </span >
16
16
{{ #if this.isOwner }}
17
- {{ #if version.yanked }}
18
- <button
19
- type =" button"
20
- local-class =" remove-button"
21
- disabled ={{ version.unyankTask.isRunning }}
22
- {{ on " click" (perform version.unyankTask )}}
23
- >
24
- {{ #if version.unyankTask.isRunning }}
25
- Unyanking...
26
- {{ else }}
27
- Unyank
28
- {{ /if }}
29
- </button >
30
- {{ else }}
31
- <button
32
- type =" button"
33
- local-class =" remove-button"
34
- disabled ={{ version.yankTask.isRunning }}
35
- {{ on " click" (perform version.yankTask )}}
36
- >
37
- {{ #if version.yankTask.isRunning }}
38
- Yanking...
39
- {{ else }}
40
- Yank
41
- {{ /if }}
42
- </button >
43
- {{ /if }}
17
+ <YankButton @version ={{ version }} />
44
18
{{ else }}
45
19
{{ #if version.yanked }}
46
20
<span local-class =' yanked' >yanked</span >
You can’t perform that action at this time.
0 commit comments