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

Commit 6502326

Browse files
author
DEWITTE Pierre-Alban
committed
[batch-mode] Formating vue file with vetur to ease collaboration
1 parent c979cb4 commit 6502326

16 files changed

+729
-775
lines changed

batch-mode-explorer/src/components/ControlAndExport.vue

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
<el-row>
1010
<el-col :span="24">
1111
<el-select v-model="requestedMimeType">
12-
<el-option v-for="requestedMimeType in interpretationOptions.requestedMimeTypes" :key="requestedMimeType" :label="requestedMimeType" :value="requestedMimeType" >
12+
<el-option v-for="requestedMimeType in interpretationOptions.requestedMimeTypes" :key="requestedMimeType" :label="requestedMimeType" :value="requestedMimeType">
1313
</el-option>
1414
</el-select>
1515
</el-col>
1616
</el-row>
17-
<el-row>
17+
<el-row>
1818
<el-col :span="24">
1919
<div v-if="status === 'CONVERTING'">
20-
<spinner size="large" message="Interpreting..."/>
20+
<spinner size="large" message="Interpreting..." />
2121
<div class="explaination">Your input is actually interpreated by MyScript Cloud</div>
2222
</div>
2323
<div class="controlView" v-if="exportResults[requestedMimeType]">
24-
<img v-if="requestedMimeType.startsWith('image/png') || requestedMimeType.startsWith('image/jpeg')" class="interpretedContent" :src="exportResults[requestedMimeType]"/>
25-
<vue-json-pretty v-else-if="requestedMimeType.startsWith('application/vnd.myscript.jiix')" :data="exportResults[requestedMimeType]" class="interpretedContent"></vue-json-pretty>
26-
<div v-else-if="requestedMimeType.startsWith('image/svg')" class="interpretedContent">
24+
<img v-if="requestedMimeType.startsWith('image/png') || requestedMimeType.startsWith('image/jpeg')" class="interpretedContent" :src="exportResults[requestedMimeType]" />
25+
<vue-json-pretty v-else-if="requestedMimeType.startsWith('application/vnd.myscript.jiix')" :data="exportResults[requestedMimeType]" class="interpretedContent"></vue-json-pretty>
26+
<div v-else-if="requestedMimeType.startsWith('image/svg')" class="interpretedContent">
2727
<div v-html="exportResults[requestedMimeType]"></div>
2828
</div>
2929
<div v-else-if="requestedMimeType.startsWith('application/vnd')" class="explaination">
@@ -35,7 +35,7 @@
3535
</div>
3636
<el-button v-if="exportResults[requestedMimeType]" type="primary" icon="el-icon-download" circle @click="download" class="dl-button"></el-button>
3737
</el-col>
38-
</el-row>
38+
</el-row>
3939
</el-main>
4040
</el-container>
4141
</template>
@@ -53,9 +53,9 @@ export default {
5353
Spinner,
5454
VueJsonPretty
5555
},
56-
data(){
56+
data() {
5757
return {
58-
requestedMimeType : '',
58+
requestedMimeType: '',
5959
}
6060
},
6161
computed: mapState([
@@ -65,29 +65,29 @@ export default {
6565
'status'
6666
]),
6767
methods: {
68-
download(){
68+
download() {
6969
this.$message({
70-
showClose: true,
71-
message: 'Not implemented yet.',
72-
type: 'warning'
73-
});
70+
showClose: true,
71+
message: 'Not implemented yet.',
72+
type: 'warning'
73+
});
7474
},
75-
reconvert(){
75+
reconvert() {
7676
this.$message({
77-
showClose: true,
78-
message: 'Not implemented yet.',
79-
type: 'warning'
80-
});
77+
showClose: true,
78+
message: 'Not implemented yet.',
79+
type: 'warning'
80+
});
8181
}
8282
},
83-
mounted(){
83+
mounted() {
8484
this.requestedMimeType = this.interpretationOptions.requestedMimeTypes[0];
8585
EventBus.$on('requestedMimeTypesChanged', () => {
8686
this.requestedMimeType = this.interpretationOptions.requestedMimeTypes[0];
8787
})
88-
88+
8989
}
90-
90+
9191
}
9292
</script>
9393
<style>
@@ -106,22 +106,22 @@ export default {
106106
}
107107
108108
.interpretedContent {
109-
max-width: 100%;
110-
max-height: 100%;
109+
max-width: 100%;
110+
max-height: 100%;
111111
}
112112
.interpretedContent > div > svg {
113-
max-width: 100%;
114-
max-height: 100%;
113+
max-width: 100%;
114+
max-height: 100%;
115115
}
116116
117117
.controlView {
118118
text-align: left;
119119
margin: 5px;
120120
overflow: auto;
121121
}
122-
.explaination{
122+
.explaination {
123123
font-size: 0.8em;
124-
color: #757B7F;
124+
color: #757b7f;
125125
}
126126
</style>
127127
<style scoped>
@@ -130,10 +130,9 @@ export default {
130130
}
131131
132132
.takecare {
133-
border: solid 1px lightgrey;
134-
border-radius: 5px;
135-
padding: 10px;
136-
background-color: #E6A23C;
133+
border: solid 1px lightgrey;
134+
border-radius: 5px;
135+
padding: 10px;
136+
background-color: #e6a23c;
137137
}
138-
139138
</style>

batch-mode-explorer/src/components/Exportcontent.vue

Lines changed: 19 additions & 21 deletions
Large diffs are not rendered by default.
Lines changed: 76 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,105 @@
11
<template>
22
<div class="wrapper">
3-
<el-card v-for="(localInk, index) in data" :key="index" class="box">
4-
<img :src="localInk.png" class="image">
5-
<div>
6-
<time class="time">{{ localInk.date }}</time>
7-
<div class="bottom clearfix">
8-
<el-button @click="select(index)" type="primary" size="small" class="button">Load</el-button>
9-
<el-button v-if="!useModels" @click="remove(index)" size="small" icon="el-icon-delete" class="button button-right"></el-button>
10-
</div>
11-
</div>
12-
</el-card>
13-
3+
<el-card v-for="(localInk, index) in data" :key="index" class="box">
4+
<img :src="localInk.png" class="image">
5+
<div>
6+
<time class="time">{{ localInk.date }}</time>
7+
<div class="bottom clearfix">
8+
<el-button @click="select(index)" type="primary" size="small" class="button">Load</el-button>
9+
<el-button v-if="!useModels" @click="remove(index)" size="small" icon="el-icon-delete" class="button button-right"></el-button>
1410
</div>
15-
</template>
11+
</div>
12+
</el-card>
13+
14+
</div>
15+
</template>
1616

1717
<script>
18-
import { mapState } from 'vuex';
19-
20-
export default {
21-
18+
import { mapState } from 'vuex';
19+
20+
export default {
21+
2222
name: 'ink-list',
2323
data() {
24-
return {
25-
centerDialogVisible: false,
26-
}
27-
},
24+
return {
25+
centerDialogVisible: false,
26+
}
27+
},
2828
computed: {
29-
data : function(){
30-
if(this.useModels === true){
29+
data: function () {
30+
if (this.useModels === true) {
3131
return this.models
32-
}else{
32+
} else {
3333
return this.localContent
3434
}
3535
},
3636
...mapState([
37-
'localContent','models'
37+
'localContent', 'models'
3838
])
3939
},
4040
props: {
4141
useLocals: Boolean,
42-
useModels : Boolean,
42+
useModels: Boolean,
4343
},
44-
methods : {
45-
select(idx){
44+
methods: {
45+
select(idx) {
4646
47-
this.$store.commit('restoreContext', this.data[idx]);
48-
//TODO Manage status and get the results
49-
this.$router.push({ path: '/write' });
50-
},
51-
remove(idx){
52-
this.$store.commit('removeLocalContentItem',idx);
53-
},
54-
}
47+
this.$store.commit('restoreContext', this.data[idx]);
48+
//TODO Manage status and get the results
49+
this.$router.push({ path: '/write' });
50+
},
51+
remove(idx) {
52+
this.$store.commit('removeLocalContentItem', idx);
53+
},
54+
}
5555
}
56-
</script>
56+
</script>
5757

5858
<style scoped>
59-
.wrapper {
60-
display: grid;
61-
grid-template-columns: 50% 50%;
62-
grid-gap: 10px;
63-
}
59+
.wrapper {
60+
display: grid;
61+
grid-template-columns: 50% 50%;
62+
grid-gap: 10px;
63+
}
6464
65-
.box {
66-
padding: 10px;
67-
}
65+
.box {
66+
padding: 10px;
67+
}
6868
69-
.time {
70-
font-size: 1em;
71-
color: #999;
72-
}
73-
.image{
74-
min-width: 100%;
75-
max-width: 100%;
76-
}
77-
78-
.bottom {
79-
margin-top: 13px;
80-
line-height: 12px;
81-
}
69+
.time {
70+
font-size: 1em;
71+
color: #999;
72+
}
73+
.image {
74+
min-width: 100%;
75+
max-width: 100%;
76+
}
8277
83-
.button-right {
84-
float: right;
85-
}
78+
.bottom {
79+
margin-top: 13px;
80+
line-height: 12px;
81+
}
8682
87-
.image {
88-
width: 100%;
89-
display: block;
90-
}
91-
.el-dialog {
92-
max-width: 90vw;
93-
}
94-
.modalcontainer{
95-
display: flex;
96-
flex: 1;
97-
padding: 10px;
98-
flex-direction: column;
99-
}
100-
.selector {
101-
padding: 20px;
102-
}
83+
.button-right {
84+
float: right;
85+
}
10386
104-
</style>
87+
.image {
88+
width: 100%;
89+
display: block;
90+
}
91+
.el-dialog {
92+
max-width: 90vw;
93+
}
94+
.modalcontainer {
95+
display: flex;
96+
flex: 1;
97+
padding: 10px;
98+
flex-direction: column;
99+
}
100+
.selector {
101+
padding: 20px;
102+
}
103+
</style>
105104

106105

0 commit comments

Comments
 (0)