|
@@ -10,13 +10,28 @@
|
|
|
<div class="name">
|
|
|
{{ currentProject ? currentProject.name : 'PyCS' }}
|
|
|
</div>
|
|
|
+
|
|
|
+ <div class="jobs" v-if="activeJobCount > 0">
|
|
|
+ {{ activeJobCount }} {{ activeJobCount === 1 ? 'job' : 'jobs' }} running
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
export default {
|
|
|
name: "top-navigation-bar",
|
|
|
- props: ['window', 'currentProject']
|
|
|
+ props: ['window', 'currentProject'],
|
|
|
+ computed: {
|
|
|
+ activeJobCount: function() {
|
|
|
+ if (!this.currentProject)
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ return Object.keys(this.currentProject.jobs)
|
|
|
+ .map(key => this.currentProject.jobs[key])
|
|
|
+ .filter(job => !job.finished)
|
|
|
+ .length;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -31,19 +46,29 @@ export default {
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
-.top-navigation .burger {
|
|
|
+.burger {
|
|
|
transition: transform 0.6s;
|
|
|
filter: invert(1);
|
|
|
width: 2rem;
|
|
|
margin-right: 0.75rem;
|
|
|
}
|
|
|
|
|
|
-.top-navigation .burger.rotation {
|
|
|
+.burger.rotation {
|
|
|
transform: rotate(90deg);
|
|
|
}
|
|
|
|
|
|
-.top-navigation .name {
|
|
|
+.name {
|
|
|
font-weight: bold;
|
|
|
font-family: "Roboto Condensed";
|
|
|
+ flex-grow: 1;
|
|
|
+
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ overflow-x: hidden;
|
|
|
+}
|
|
|
+
|
|
|
+.jobs {
|
|
|
+ font-family: "Roboto Condensed";
|
|
|
+ white-space: nowrap;
|
|
|
}
|
|
|
</style>
|