-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving code into components, cleanup, adding version number from package
- Loading branch information
Pieter Montoulieu
committed
Apr 7, 2019
1 parent
abe4c4f
commit 267b921
Showing
6 changed files
with
147 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<template> | ||
<div class="col-md-3 order-1 px-0 pt-4 border-right border-dark text-left"> | ||
<header class="d-flex align-items-end pb-2"> | ||
<h1 class="text-light font-weight-800 letter-spacing-1 text-left pl-4 pt-3 mb-0 d-inline-block">Newswire</h1> | ||
<span class="version bg-danger ml-2 mb-2 px-1 d-inline-block rounded">alpha {{ versionNumber }}</span> | ||
</header> | ||
|
||
<channel-list :channels="channels" @change-channel="handleChannelChange"/> | ||
<!-- <div class="pt-3 pl-3"> | ||
<b-button v-b-modal.modal-1 size="sm" variant="outline-gray" class="mt-1"><img src="static/icons/settings.svg" height="24"></b-button> | ||
</div> --> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import ChannelList from '@/components/ChannelList' | ||
export default { | ||
name: 'sidebar', | ||
props: { | ||
channels: Object | ||
}, | ||
components: { | ||
ChannelList | ||
}, | ||
computed: { | ||
versionNumber: function () { | ||
var pjson = require('../../../package.json') | ||
return pjson.version | ||
} | ||
}, | ||
methods: { | ||
handleChannelChange (channel) { | ||
this.$emit('change-channel', channel) | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<template> | ||
<div class="col-md-9 text-left order-2 px-0" | ||
@mouseover="hovering = true" | ||
@mouseleave="hovering = false" | ||
> | ||
<div class="embed-responsive embed-responsive-16by9 p-relative"> | ||
<video class="embed-responsive-item " width="720" height="480" id="video" autoplay :controls="hovering ? 'controls' : false" :poster="channels[currentChannel.name].logo.url ? channels[currentChannel.name].logo.url : false"></video> | ||
<div class="spinner-container text-center d-flex justify-content-center align-items-center" v-if="loadingState != 'loaded'"> | ||
<b-spinner variant="light" type="grow"></b-spinner> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'video-pane', | ||
props: { | ||
channels: Object, | ||
loadingState: String, | ||
currentStream: String, | ||
currentChannel: Object | ||
}, | ||
data () { | ||
return { | ||
hovering: false | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters