Change props to meet guidelines

This commit is contained in:
Luke "Jared" Bennett 2017-07-20 16:37:52 +01:00
parent f0e23800c3
commit 115ffa3749
No known key found for this signature in database
GPG key ID: 402ED51FB5D306C2
5 changed files with 58 additions and 21 deletions

View file

@ -1,13 +1,29 @@
<script> <script>
const RepoFile = { const RepoFile = {
props: { props: {
name: 'repo-file', file: {
file: Object, type: Object,
isTree: Boolean, required: true,
isMini: Boolean, },
loading: Object, isMini: {
hasFiles: Boolean, type: Boolean,
activeFile: Object, required: false,
default: false,
},
loading: {
type: Object,
required: false,
default: {},
},
hasFiles: {
type: Boolean,
required: false,
default: false,
},
activeFile: {
type: Object,
required: true,
},
}, },
methods: { methods: {

View file

@ -1,9 +1,15 @@
<script> <script>
const RepoFileOptions = { const RepoFileOptions = {
props: { props: {
name: 'repo-file-options', isMini: {
isMini: Boolean, type: Boolean,
projectName: String, required: false,
default: false,
},
projectName: {
type: String,
required: true,
},
}, },
}; };

View file

@ -1,16 +1,28 @@
<script> <script>
const RepoLoadingFile = { const RepoLoadingFile = {
props: {
loading: {
type: Object,
required: false,
default: {},
},
hasFiles: {
type: Boolean,
required: false,
default: false,
},
isMini: {
type: Boolean,
required: false,
default: false,
},
},
methods: { methods: {
lineOfCode(n) { lineOfCode(n) {
return `line-of-code-${n}`; return `line-of-code-${n}`;
}, },
}, },
props: {
loading: Object,
hasFiles: Boolean,
isMini: Boolean,
},
}; };
export default RepoLoadingFile; export default RepoLoadingFile;

View file

@ -1,8 +1,10 @@
<script> <script>
const RepoPreviousDirectory = { const RepoPreviousDirectory = {
props: { props: {
name: 'repo-previous-directory', prevUrl: {
prevUrl: String, type: String,
required: true,
},
}, },
methods: { methods: {

View file

@ -3,9 +3,10 @@ import RepoStore from './repo_store';
const RepoTab = { const RepoTab = {
props: { props: {
name: 'repo-tab', tab: {
tab: Object, type: Object,
saved: true, required: true,
},
}, },
computed: { computed: {