Skip to content
This repository was archived by the owner on Jan 8, 2024. It is now read-only.

Commit 34c5f18

Browse files
committed
Refactor: UpButton > Actions::Up
1 parent bf7eb98 commit 34c5f18

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed
File renamed without changes.

Diff for: ui/app/components/up-button.ts renamed to ui/app/components/actions/up.ts

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
import Component from '@glimmer/component';
2-
import { inject as service } from '@ember/service';
3-
import ApiService from 'waypoint/services/api';
4-
import PollModelService from 'waypoint/services/poll-model';
51
import {
6-
Ref,
2+
GetJobRequest,
3+
GetJobStreamResponse,
74
Job,
85
QueueJobRequest,
96
QueueJobResponse,
10-
GetJobRequest,
11-
GetJobStreamResponse,
7+
Ref,
128
} from 'waypoint-pb';
13-
import { task } from 'ember-concurrency-decorators';
9+
10+
import ApiService from 'waypoint/services/api';
11+
import Component from '@glimmer/component';
12+
import PollModelService from 'waypoint/services/poll-model';
1413
import { perform } from 'ember-concurrency-ts';
14+
import { inject as service } from '@ember/service';
15+
import { task } from 'ember-concurrency-decorators';
1516
import { tracked } from '@glimmer/tracking';
1617

17-
interface UpButtonArgs {
18+
interface ActionsUpArgs {
1819
application: Ref.Application.AsObject;
1920
}
2021

21-
export default class UpButton extends Component<UpButtonArgs> {
22+
export default class ActionsUp extends Component<ActionsUpArgs> {
2223
@service api!: ApiService;
2324
@service pollModel!: PollModelService;
2425

Diff for: ui/app/helpers/project-is-remote-uppable.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import { Project } from 'waypoint-pb';
12
import { helper } from '@ember/component/helper';
23

3-
export function projectIsRemoteUppable(params/*, hash*/) {
4+
export function projectIsRemoteUppable(params: Array<Project.AsObject> /*, hash*/): boolean {
45
let project = params[0] as Project.AsObject;
56
// We only want to display the Up button only in this case:
67
// if a project has a git datasource, and the dataSourcePoll is not enabled

Diff for: ui/app/templates/workspace/projects/project/app.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</div>
2323
<div class="actions">
2424
{{#if (project-is-remote-uppable @model.project)}}
25-
<UpButton @application={{@model.application}} />
25+
<Actions::Up @application={{@model.application}} />
2626
{{else}}
2727
{{#if @model.releases.length}}
2828
<LatestReleaseUrl @releases={{@model.releases}}></LatestReleaseUrl>

0 commit comments

Comments
 (0)