Skip to content

Commit

Permalink
FreeTubeApp#1414: Add share button ton Channel view
Browse files Browse the repository at this point in the history
- implemented the new button in src/renderer/views/Channel
  • Loading branch information
Alhuin committed Nov 12, 2022
1 parent 0ae08f2 commit 646b1c0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
10 changes: 10 additions & 0 deletions src/renderer/views/Channel/Channel.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,23 @@
left: 120px;
}

.channelInfoActionsContainer {
display: flex;
min-width: 230px;
justify-content: space-between;
}

.subscribeButton {
height: 50px;
min-width: 150px;
align-self: center;
margin-bottom: 10px;
}

.shareIcon {
align-items: center;
}

.channelSearch {
width: 200px;
align-self: flex-end;
Expand Down
4 changes: 3 additions & 1 deletion src/renderer/views/Channel/Channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import FtChannelBubble from '../../components/ft-channel-bubble/ft-channel-bubbl
import FtLoader from '../../components/ft-loader/ft-loader.vue'
import FtElementList from '../../components/ft-element-list/ft-element-list.vue'
import FtAgeRestricted from '../../components/ft-age-restricted/ft-age-restricted.vue'
import FtShareButton from '../../components/ft-share-button/ft-share-button.vue'

import ytch from 'yt-channel-info'
import autolinker from 'autolinker'
Expand All @@ -27,7 +28,8 @@ export default Vue.extend({
'ft-channel-bubble': FtChannelBubble,
'ft-loader': FtLoader,
'ft-element-list': FtElementList,
'ft-age-restricted': FtAgeRestricted
'ft-age-restricted': FtAgeRestricted,
'ft-share-button': FtShareButton
},
data: function () {
return {
Expand Down
24 changes: 16 additions & 8 deletions src/renderer/views/Channel/Channel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,22 @@
</div>
</div>

<ft-button
v-if="!hideUnsubscribeButton"
:label="subscribedText"
background-color="var(--primary-color)"
text-color="var(--text-with-main-color)"
class="subscribeButton"
@click="handleSubscription"
/>
<div class="channelInfoActionsContainer">
<ft-share-button
:id="id"
media-type="Channel"
class="shareIcon"
/>

<ft-button
v-if="!hideUnsubscribeButton"
:label="subscribedText"
background-color="var(--primary-color)"
text-color="var(--text-with-main-color)"
class="subscribeButton"
@click="handleSubscription"
/>
</div>
</div>

<ft-flex-box
Expand Down

0 comments on commit 646b1c0

Please sign in to comment.