Skip to content

Commit

Permalink
BlankSlate placeholder (#129)
Browse files Browse the repository at this point in the history
* Create BlankSlate placeholder component
* Remove flex-direction style from BlankSlate
* Import BlankSlate component
  • Loading branch information
mittalyashu committed Jul 7, 2019
1 parent 58f544c commit 1bafc67
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 21 deletions.
27 changes: 27 additions & 0 deletions src/renderer/components/BlankSlate.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<template>
<t-flexbox
justify-content="center"
align-items="center"
class="blankslate"
>
No content to show
</t-flexbox>
</template>

<script>
import TFlexbox from "./TLayouts/TFlexbox";
export default {
name: "BlankSlate",
components: {
TFlexbox
}
};
</script>

<style lang="sass">
.blankslate
width: 100%
font-size: 12px
color: #7A7D84
</style>
19 changes: 7 additions & 12 deletions src/renderer/pages/repository/history.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,11 @@
</t-scrollbar>
</div>
</div>
<div class="history__preview">
<diffPreview
v-if="this.$store.state.history.filePreview.isActive"
:preview="commitFileDiffPreview"
/>
<div v-else>
No content to show
</div>
</div>
<diffPreview
v-if="this.$store.state.history.filePreview.isActive"
:preview="commitFileDiffPreview"
/>
<blank-slate v-else />
</t-flexbox>
</template>

Expand All @@ -59,6 +55,7 @@ import fileIcon from "../../components/icon/file";
import TScrollbar from "../../components/TLayouts/TScrollbar";
import gitLog from "../../git/log";
import logSkeleton from "../../components/skeleton/logs";
import BlankSlate from "../../components/BlankSlate";
import TFlexbox from "../../components/TLayouts/TFlexbox";
export default {
Expand All @@ -70,6 +67,7 @@ export default {
TScrollbar,
fileIcon,
logSkeleton,
BlankSlate,
TFlexbox
},
data() {
Expand Down Expand Up @@ -146,7 +144,4 @@ export default {
stroke: #6C6F75
width: 18px
height: 18px
&__preview
padding: 10px
</style>
16 changes: 7 additions & 9 deletions src/renderer/pages/repository/workspace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,11 @@
padding-right="10px"
/>
</div>
<div class="workspace__preview">
<diffPreview
v-if="this.$store.state.workspace.filePreview.isActive"
:preview="fileDiffPreview"
/>
<div v-else>
No file selected.
</div>
</div>
<diffPreview
v-if="this.$store.state.workspace.filePreview.isActive"
:preview="fileDiffPreview"
/>
<blank-slate v-else />
</t-flexbox>
</template>

Expand All @@ -77,6 +73,7 @@ import commitMessage from "../../components/commit/commitMessage";
import branchIcon from "../../components/icon/branch";
import diffPreview from "../../components/diff/diffPreview";
import fileChangesSkeleton from "../../components/skeleton/fileChanges";
import BlankSlate from "../../components/BlankSlate";
import TFlexbox from "../../components/TLayouts/TFlexbox";
export default {
Expand All @@ -87,6 +84,7 @@ export default {
commitMessage,
diffPreview,
fileChangesSkeleton,
BlankSlate,
TFlexbox
},
data() {
Expand Down

0 comments on commit 1bafc67

Please sign in to comment.