Skip to content

Commit a1428a4

Browse files
committed
ran make lint-fix
1 parent 553cceb commit a1428a4

39 files changed

+882
-737
lines changed

src/App.vue

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,33 +43,35 @@ export default {
4343
return {
4444
activityViews: [],
4545
info: {},
46-
}
46+
};
4747
},
4848
4949
mounted: async function() {
5050
this.$aw.getInfo().then(
51-
(info) => {
51+
info => {
5252
this.info = info;
5353
},
54-
(e) => {
55-
console.error("Unable to connect: ", e)
54+
e => {
55+
console.error('Unable to connect: ', e);
5656
this.info = {};
5757
}
5858
);
59-
}
60-
}
59+
},
60+
};
6161
</script>
6262

6363
<style lang="scss">
6464
$textcolor: #000;
6565
66-
html, body, button {
66+
html,
67+
body,
68+
button {
6769
color: $textcolor;
6870
font-family: 'Varela Round', sans-serif !important;
6971
}
7072
7173
body {
72-
background-color: #EEE;
74+
background-color: #eee;
7375
}
7476
7577
.fa-icon {
@@ -80,8 +82,8 @@ body {
8082
}
8183
8284
.aw-container {
83-
background-color: #FFF;
84-
border: 1px solid #CCC;
85+
background-color: #fff;
86+
border: 1px solid #ccc;
8587
border-radius: 5px 5px 5px 5px;
8688
}
8789
</style>

src/components/CategoryEditTree.vue

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ import 'vue-awesome/icons/plus';
5555
import 'vue-awesome/icons/edit';
5656
5757
export default {
58-
name: "CategoryEditTree",
58+
name: 'CategoryEditTree',
5959
props: {
6060
cls: Object,
6161
depth: {
6262
type: Number,
6363
default: 0,
64-
}
64+
},
6565
},
6666
data: () => {
6767
return {
@@ -76,21 +76,26 @@ export default {
7676
},
7777
computed: {
7878
allCategories: function() {
79-
const categories = this.$store.getters["settings/all_categories"];
80-
const entries = categories.map(c => { return { text: c.join("->"), value: c } });
81-
return [{ value: [], text: 'None'}].concat(entries);
79+
const categories = this.$store.getters['settings/all_categories'];
80+
const entries = categories.map(c => {
81+
return { text: c.join('->'), value: c };
82+
});
83+
return [{ value: [], text: 'None' }].concat(entries);
8284
},
8385
allRuleTypes: function() {
8486
return [
8587
{ value: null, text: 'None' },
8688
{ value: 'regex', text: 'Regular Expression' },
8789
//{ value: 'glob', text: 'Glob pattern' },
88-
]
90+
];
8991
},
9092
},
9193
methods: {
9294
addSubclass: function(parent) {
93-
this.$store.commit('settings/addClass', {name: parent.name.concat(["New class"]), rule: {type: "regex", regex: "FILL ME"}});
95+
this.$store.commit('settings/addClass', {
96+
name: parent.name.concat(['New class']),
97+
rule: { type: 'regex', regex: 'FILL ME' },
98+
});
9499
},
95100
removeClass: function(cls) {
96101
// TODO: Show a confirmation dialog
@@ -99,22 +104,22 @@ export default {
99104
this.$store.commit('settings/removeClass', cls);
100105
},
101106
showEditModal(event) {
102-
this.$refs.edit.show()
107+
this.$refs.edit.show();
103108
},
104109
checkFormValidity() {
105110
// FIXME
106111
return true;
107112
},
108113
handleOk(event) {
109114
// Prevent modal from closing
110-
event.preventDefault()
115+
event.preventDefault();
111116
// Trigger submit handler
112-
this.handleSubmit()
117+
this.handleSubmit();
113118
},
114119
handleSubmit() {
115120
// Exit when the form isn't valid
116121
if (!this.checkFormValidity()) {
117-
return
122+
return;
118123
}
119124
120125
// Save the category
@@ -123,12 +128,12 @@ export default {
123128
name: this.editing.parent.concat(this.editing.name),
124129
rule: this.editing.rule.type !== null ? this.editing.rule : { type: null },
125130
};
126-
this.$store.commit("settings/updateClass", new_class);
131+
this.$store.commit('settings/updateClass', new_class);
127132
128133
// Hide the modal manually
129134
this.$nextTick(() => {
130-
this.$refs.edit.hide()
131-
})
135+
this.$refs.edit.hide();
136+
});
132137
},
133138
resetModal() {
134139
this.editing = {
@@ -139,13 +144,13 @@ export default {
139144
};
140145
//console.log(this.editing);
141146
},
142-
}
143-
}
147+
},
148+
};
144149
</script>
145150

146151
<style scoped lang="scss">
147152
.row.cls:hover {
148-
background-color: #EEE;
153+
background-color: #eee;
149154
boder-radius: 5px;
150155
}
151156
</style>

src/components/ErrorBoundary.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ export default {
1313
data() {
1414
return { errors: [] };
1515
},
16-
errorCaptured (err, vm, info) {
16+
errorCaptured(err, vm, info) {
1717
//console.error("Error captured!");
1818
//console.error(err, vm, info);
19-
const msg = (err.name && err.message) ? (err.name + ": " + err.message) : err;
19+
const msg = err.name && err.message ? err.name + ': ' + err.message : err;
2020
this.errors.push({
2121
msg: msg,
2222
time: new Date().toISOString(),
2323
dismissed: false,
2424
});
2525
},
26-
}
26+
};
2727
</script>

src/components/EventEditor.vue

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,21 @@ div
3939
| Save
4040
</template>
4141

42-
<style lang="scss">
43-
</style>
42+
<style lang="scss"></style>
4443

4544
<script>
4645
import moment from 'moment';
4746
48-
4947
export default {
50-
name: "EventEditor",
48+
name: 'EventEditor',
5149
props: {
5250
event: Object,
5351
bucket_id: String,
5452
},
5553
data() {
5654
return {
5755
editedEvent: JSON.parse(JSON.stringify(this.event)),
58-
}
56+
};
5957
},
6058
computed: {
6159
start: {
@@ -66,7 +64,7 @@ export default {
6664
// Duration needs to be set first since otherwise the computed for end will use the new timestamp
6765
this.editedEvent.duration = moment(this.end).diff(dt, 'seconds');
6866
this.editedEvent.timestamp = new Date(dt);
69-
}
67+
},
7068
},
7169
end: {
7270
get: function() {
@@ -84,6 +82,6 @@ export default {
8482
this.$emit('save', this.editedEvent);
8583
await this.$aw.replaceEvent(this.bucket_id, this.editedEvent);
8684
},
87-
}
88-
}
85+
},
86+
};
8987
</script>

src/components/Header.vue

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ div.aw-navbar
6363
</template>
6464

6565
<script>
66-
6766
// only import the icons you use to reduce bundle size
6867
import 'vue-awesome/icons/calendar-day';
6968
import 'vue-awesome/icons/calendar-week';
@@ -86,54 +85,56 @@ export default {
8685
data() {
8786
return {
8887
activityViews: [],
89-
isAndroidApp: testingAndroid || navigator.userAgent.includes("Android") && navigator.userAgent.includes("wv"), // Checks for Android and WebView
88+
isAndroidApp:
89+
testingAndroid ||
90+
(navigator.userAgent.includes('Android') && navigator.userAgent.includes('wv')), // Checks for Android and WebView
9091
};
9192
},
9293
mounted: async function() {
9394
const buckets = await this.$aw.getBuckets();
9495
const types_by_host = {};
95-
_.each(buckets, (v) => {
96-
types_by_host[v.hostname] = types_by_host[v.hostname] || {};
97-
// The '&& true;' is just to typecoerce into booleans
98-
types_by_host[v.hostname].afk |= v.type == "afkstatus";
99-
types_by_host[v.hostname].window |= v.type == "currentwindow";
100-
types_by_host[v.hostname].android |= v.type == "currentwindow" && this.isAndroidApp; // Use other bucket type ID in the future
101-
})
96+
_.each(buckets, v => {
97+
types_by_host[v.hostname] = types_by_host[v.hostname] || {};
98+
// The '&& true;' is just to typecoerce into booleans
99+
types_by_host[v.hostname].afk |= v.type == 'afkstatus';
100+
types_by_host[v.hostname].window |= v.type == 'currentwindow';
101+
types_by_host[v.hostname].android |= v.type == 'currentwindow' && this.isAndroidApp; // Use other bucket type ID in the future
102+
});
102103
//console.log(types_by_host);
103104
104105
_.each(types_by_host, (types, hostname) => {
105-
if(types.afk && types.window) {
106-
this.activityViews.push({
107-
name: hostname,
108-
hostname: hostname,
109-
type: "default",
110-
pathUrl: `/activity/${hostname}`,
111-
icon: 'desktop'
112-
});
113-
}
114-
if(testingAndroid || types.android) {
115-
this.activityViews.push({
116-
name: `${hostname} (Android)`,
117-
hostname: hostname,
118-
type: "android",
119-
pathUrl: '/activity/android',
120-
icon: 'mobile'
121-
});
122-
}
123-
})
124-
}
125-
}
106+
if (types.afk && types.window) {
107+
this.activityViews.push({
108+
name: hostname,
109+
hostname: hostname,
110+
type: 'default',
111+
pathUrl: `/activity/${hostname}`,
112+
icon: 'desktop',
113+
});
114+
}
115+
if (testingAndroid || types.android) {
116+
this.activityViews.push({
117+
name: `${hostname} (Android)`,
118+
hostname: hostname,
119+
type: 'android',
120+
pathUrl: '/activity/android',
121+
icon: 'mobile',
122+
});
123+
}
124+
});
125+
},
126+
};
126127
</script>
127128

128129
<style lang="scss" scoped>
129130
.aw-navbar {
130-
background-color: #FFF;
131-
border: solid #CCC;
131+
background-color: #fff;
132+
border: solid #ccc;
132133
border-width: 0 0 1px 0;
133134
}
134135
135136
.active {
136-
background-color: #DDD;
137+
background-color: #ddd;
137138
border-radius: 0.5em;
138139
}
139140
@@ -145,14 +146,14 @@ export default {
145146
border-radius: 0.5em;
146147
147148
&:hover {
148-
background-color: #DDD;
149+
background-color: #ddd;
149150
}
150151
}
151152
152153
.abs-center {
153-
position: absolute;
154-
left: 50%;
155-
transform: translateX(-50%);
154+
position: absolute;
155+
left: 50%;
156+
transform: translateX(-50%);
156157
}
157158
</style>
158159

0 commit comments

Comments
 (0)