Skip to content

Commit 0b45822

Browse files
committed
Prettify: Run eslint:fix
1 parent b8a2193 commit 0b45822

27 files changed

+774
-441
lines changed

src/renderer/App.vue

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
<template>
2-
<div id="app">
3-
<menubar/>
4-
<router-view></router-view>
5-
<div v-if="this.$store.state.model.isActive" class="model__placeholder">
6-
<div class="model__container">
7-
<addLocalRepository/>
8-
<about/>
9-
<exportCommitData/>
10-
<newRemote/>
11-
</div>
12-
</div>
13-
</div>
2+
<div id="app">
3+
<menubar />
4+
<router-view />
5+
<div
6+
v-if="this.$store.state.model.isActive"
7+
class="model__placeholder"
8+
>
9+
<div class="model__container">
10+
<addLocalRepository />
11+
<about />
12+
<exportCommitData />
13+
<newRemote />
14+
</div>
15+
</div>
16+
</div>
1417
</template>
1518

1619
<script>
@@ -21,9 +24,9 @@ import exportCommitData from "./components/model/exportCommitData"
2124
import newRemote from "./components/model/newRemote"
2225
2326
export default {
24-
name: "app",
27+
name: "App",
2528
components: {
26-
menubar,
29+
menubar,
2730
addLocalRepository,
2831
about,
2932
exportCommitData,

src/renderer/components/buttons/outlineButton.vue

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
11
<template>
2-
<a :class="buttonType" class="button button--outline">{{ text }}</a>
2+
<a
3+
:class="buttonType"
4+
class="button button--outline"
5+
>{{ text }}</a>
36
</template>
47

58
<script>
6-
export default {
7-
props: {
8-
text: {
9-
type: String,
10-
required: true
11-
},
12-
type: {
13-
type: String
14-
}
9+
export default {
10+
props: {
11+
text: {
12+
type: String,
13+
required: true
1514
},
16-
computed: {
17-
buttonType() {
18-
switch (this.type) {
19-
case "danger":
20-
return "button--outline--danger"
21-
default:
22-
return "button--outline--normal"
23-
}
15+
type: {
16+
type: String
17+
}
18+
},
19+
computed: {
20+
buttonType() {
21+
switch (this.type) {
22+
case "danger":
23+
return "button--outline--danger"
24+
default:
25+
return "button--outline--normal"
2426
}
2527
}
2628
}
29+
}
2730
</script>
2831

2932
<style lang='sass'>

src/renderer/components/buttons/primaryButton.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<template>
2-
<a class="button button--primary">{{ text }}</a>
2+
<a class="button button--primary">{{ text }}</a>
33
</template>
44

55
<script>
6-
export default {
7-
props: {
8-
text: {
9-
type: String,
10-
required: true
11-
}
6+
export default {
7+
props: {
8+
text: {
9+
type: String,
10+
required: true
1211
}
1312
}
13+
}
1414
</script>
1515

1616
<style lang='sass'>

src/renderer/components/commit/commitHistoryItem.vue

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,34 @@
11
<template>
22
<div>
33
<a
4+
class="history__item d-flex flex-column"
45
@mouseenter="showFiles(data.hash)"
56
@mouseleave="hideFiles()"
6-
class="history__item d-flex flex-column"
77
>
8-
<div :title="data.message" class="history__item__title">{{ data.message }}</div>
8+
<div
9+
:title="data.message"
10+
class="history__item__title"
11+
>{{ data.message }}</div>
912
<div class="history__item__author d-flex flex-row align-items-center">
10-
<img class="history__item__author__image" src="../../../../static/image/user_avatar.png">
13+
<img
14+
class="history__item__author__image"
15+
src="../../../../static/image/user_avatar.png"
16+
>
1117
{{ data.author_name }} committed {{ data.date | moment("from", "now") }}
1218
</div>
1319
</a>
14-
<div v-show="this.files.isActive" class="history__files">
20+
<div
21+
v-show="this.files.isActive"
22+
class="history__files"
23+
>
1524
<div class="history__files__dropdown">
1625
<div
17-
class="history__files__dropdown__item"
1826
v-for="item in this.files.list"
1927
:key="item"
20-
>{{ item.replace(/\|.*/, "").trim() }}</div>
28+
class="history__files__dropdown__item"
29+
>
30+
{{ item.replace(/\|.*/, "").trim() }}
31+
</div>
2132
</div>
2233
</div>
2334
</div>
@@ -28,7 +39,12 @@ import git from "simple-git/promise"
2839
import * as Sentry from "@sentry/electron"
2940
3041
export default {
31-
name: "commitHistoryItem",
42+
name: "CommitHistoryItem",
43+
props: {
44+
data: {
45+
type: Object
46+
}
47+
},
3248
data() {
3349
return {
3450
files: {
@@ -37,11 +53,6 @@ export default {
3753
}
3854
}
3955
},
40-
props: {
41-
data: {
42-
type: Object
43-
}
44-
},
4556
computed: {
4657
currentRepository() {
4758
return this.$store.getters["workspace/currentRepository"]

src/renderer/components/commit/commitHistoryPreview.vue

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
<template>
2-
<VueScrollbar class="commit__preview">
3-
<div>
4-
<div v-for="(line, index) in filePreview" :key="index">
5-
{{ line }}
6-
</div>
7-
</div>
8-
</VueScrollbar>
2+
<VueScrollbar class="commit__preview">
3+
<div>
4+
<div
5+
v-for="(line, index) in filePreview"
6+
:key="index"
7+
>
8+
{{ line }}
9+
</div>
10+
</div>
11+
</VueScrollbar>
912
</template>
1013

1114
<script>
1215
import VueScrollbar from "vue2-scrollbar"
1316
1417
export default {
15-
name: "commitHistoryPreivew",
18+
name: "CommitHistoryPreivew",
1619
components: {
1720
VueScrollbar
1821
},

src/renderer/components/commit/commitInformation.vue

Lines changed: 60 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,102 @@
11
<template>
22
<div class="commit__detail">
33
<div class="commit__detail__author">
4-
<img class="commit__detail__author__image" src="../../../../static/image/user_avatar.png">
4+
<img
5+
class="commit__detail__author__image"
6+
src="../../../../static/image/user_avatar.png"
7+
>
58
<div>
6-
<h6 class="commit__detail__author__name">{{ commitInformation.author.name }}</h6>
7-
<p class="commit__detail__author__email">{{ commitInformation.author.email }}</p>
9+
<h6 class="commit__detail__author__name">
10+
{{ commitInformation.author.name }}
11+
</h6>
12+
<p class="commit__detail__author__email">
13+
{{ commitInformation.author.email }}
14+
</p>
815
</div>
916
</div>
1017
<div class="commit__detail__summary">
11-
<div class="commit__detail__summary__title">{{ commitInformation.title }}</div>
18+
<div class="commit__detail__summary__title">
19+
{{ commitInformation.title }}
20+
</div>
1221
<div
1322
v-if="commitInformation.description"
1423
class="commit__detail__summary__description"
15-
>{{ commitInformation.description }}</div>
24+
>
25+
{{ commitInformation.description }}
26+
</div>
1627
</div>
1728
<div class="commit__detail__meta">
18-
<div v-if="commitInformation.author.name" class="commit__detail__meta__item">
29+
<div
30+
v-if="commitInformation.author.name"
31+
class="commit__detail__meta__item"
32+
>
1933
Author:
2034
<p>{{ commitInformation.author.name }} <{{ commitInformation.author.email }}></p>
2135
</div>
22-
<div v-if="commitInformation.author.date" class="commit__detail__meta__item">
36+
<div
37+
v-if="commitInformation.author.date"
38+
class="commit__detail__meta__item"
39+
>
2340
Author Date:
2441
<p>{{ commitInformation.author.date }}</p>
2542
</div>
26-
<div v-if="commitInformation.committer.name" class="commit__detail__meta__item">
43+
<div
44+
v-if="commitInformation.committer.name"
45+
class="commit__detail__meta__item"
46+
>
2747
Committer:
28-
<p>{{ commitInformation.committer.name }} <{{ commitInformation.committer.email}}></p>
48+
<p>{{ commitInformation.committer.name }} <{{ commitInformation.committer.email }}></p>
2949
</div>
30-
<div v-if="commitInformation.committer.date" class="commit__detail__meta__item">
50+
<div
51+
v-if="commitInformation.committer.date"
52+
class="commit__detail__meta__item"
53+
>
3154
Committer Date:
3255
<p>{{ commitInformation.committer.date }}</p>
3356
</div>
34-
<div v-if="commitInformation.meta.refs" class="commit__detail__meta__item">
57+
<div
58+
v-if="commitInformation.meta.refs"
59+
class="commit__detail__meta__item"
60+
>
3561
Refs:
3662
<p>{{ commitInformation.meta.refs }}</p>
3763
</div>
38-
<div v-if="commitInformation.meta.commit_hash" class="commit__detail__meta__item">
64+
<div
65+
v-if="commitInformation.meta.commit_hash"
66+
class="commit__detail__meta__item"
67+
>
3968
Commit Hash:
4069
<p>{{ commitInformation.meta.commit_hash }}</p>
4170
</div>
42-
<div v-if="commitInformation.meta.tree_hash" class="commit__detail__meta__item">
71+
<div
72+
v-if="commitInformation.meta.tree_hash"
73+
class="commit__detail__meta__item"
74+
>
4375
Tree Hash:
4476
<p>{{ commitInformation.meta.tree_hash }}</p>
4577
</div>
46-
<div v-if="commitInformation.meta.parent_hash" class="commit__detail__meta__item">
78+
<div
79+
v-if="commitInformation.meta.parent_hash"
80+
class="commit__detail__meta__item"
81+
>
4782
Parent Hash:
4883
<p>{{ commitInformation.meta.parent_hash }}</p>
4984
</div>
5085
</div>
5186
<div class="commit__detail__files">
5287
<div
5388
class="commit__detail__files__summary"
54-
>Showing {{ commitInformation.files.list.length }} changed files with {{ commitInformation.files.additions ? commitInformation.files.additions : '0' }} additions and {{ commitInformation.files.deletion ? commitInformation.files.additions : '0' }} deletion</div>
89+
>
90+
Showing {{ commitInformation.files.list.length }} changed files with {{ commitInformation.files.additions ? commitInformation.files.additions : '0' }} additions and {{ commitInformation.files.deletion ? commitInformation.files.additions : '0' }} deletion
91+
</div>
5592
<div
56-
class="commit__detail__files__list"
5793
v-for="file in commitInformation.files.list"
5894
:key="trimFilePath(file)"
95+
class="commit__detail__files__list"
5996
@click="commitHistoryPreview(commitInformation.meta.commit_hash, trimFilePath(file))"
60-
>{{ trimFilePath(file) }}</div>
97+
>
98+
{{ trimFilePath(file) }}
99+
</div>
61100
</div>
62101
</div>
63102
</template>
@@ -67,7 +106,7 @@ import git from "simple-git/promise"
67106
import * as Sentry from "@sentry/electron"
68107
69108
export default {
70-
name: "commitInformation",
109+
name: "CommitInformation",
71110
computed: {
72111
commitInformation() {
73112
return this.$store.getters["history/getCommitInformation"]
@@ -79,6 +118,9 @@ export default {
79118
return this.$store.state.history.commitInformation.meta.commit_hash
80119
}
81120
},
121+
mounted() {
122+
this.getCommitInformation()
123+
},
82124
methods: {
83125
getCommitInformation() {
84126
this.getAuthorDetail(this.commitHash)
@@ -239,9 +281,6 @@ export default {
239281
console.log("You have not enabled File changes feature from settings.")
240282
}
241283
}
242-
},
243-
mounted() {
244-
this.getCommitInformation()
245284
}
246285
}
247286
</script>

src/renderer/components/input/inputText.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
type="text"
44
:name="name"
55
class="input__text"
6-
:class="disabled"
6+
:class="disabled"
77
:placeholder="placeholder"
8-
:disabled="disable"
8+
:disabled="disable"
99
@input="$emit('input', $event.target.value)"
1010
>
1111
</template>
1212

1313
<script>
1414
export default {
15-
name: "inputText",
15+
name: "InputText",
1616
props: {
1717
name: {
1818
type: String

0 commit comments

Comments
 (0)