Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Commit

Permalink
feat(download-tab): Add copy url button
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-heimbuch committed Jul 30, 2017
1 parent 162a980 commit 898264f
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/components/tabs/download/Download.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
</ul>
</div>
<div class="file-selection centered column" :style="sectionStyle">
<ButtonComponent class="action download-button" :href="download.selected" type="link">{{ $t('DOWNLOAD.DOWNLOAD_EPISODE') }}</ButtonComponent>
<ButtonComponent class="action download-button" :href="download.selected" type="link">{{ $t('DOWNLOAD.ACTIONS.DOWNLOAD') }}</ButtonComponent>
<ButtonComponent class="action copy-button" :data-clipboard-text="download.selected" v-clipboard>{{ $t('DOWNLOAD.ACTIONS.COPY') }}</ButtonComponent>
<InputSelectComponent class="download-select" :change="setDownloadFile">
<option v-for="(option, index) in download.files" v-bind:key="index" v-bind:value="option.url" :selected="download.selected === option.url">
{{ option.title }} • {{ toMegabyte(option.size) }} MB
Expand Down Expand Up @@ -106,7 +107,7 @@
.file-selection {
padding: $padding;
.download-button, .download-select {
.download-button, .download-select, .copy-button {
margin: ($margin / 2) $margin;
width: $download-interaction-size;
}
Expand Down
8 changes: 4 additions & 4 deletions src/components/tabs/share/ShareEmbed.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<template>
<OverlayComponent :visible="share.embed.visible" :onClose="closeEmbedOverlay" class="embed-overlay">
<h3 name="header" class="title text-center">Embed Episode</h3>
<h3 name="header" class="title text-center">{{ $t('SHARE.EMBED.TITLE') }}</h3>
<div class="input-element">
<label class="input-label">Embed Size</label>
<label class="input-label">{{ $t('SHARE.EMBED.LABEL.SIZE') }}</label>
<InputSelectComponent :model="share.embed.size" :options="share.embed.available" :change="setEmbedSize"></InputSelectComponent>
</div>
<div class="input-element">
<label class="input-label">Embed Code</label>
<label class="input-label">{{ $t('SHARE.EMBED.LABEL.CODE') }}</label>
<InputTextComponent class="block" disabled="true" :value="embedCode"></InputTextComponent>
</div>
<div class="input-element">
<ButtonComponent class="block action" :data-clipboard-text="embedCode" v-clipboard>Copy EmbedCode</ButtonComponent>
<ButtonComponent class="block action" :data-clipboard-text="embedCode" v-clipboard>{{ $t('SHARE.EMBED.ACTIONS.COPY') }}</ButtonComponent>
</div>
</OverlayComponent>
</template>
Expand Down
18 changes: 17 additions & 1 deletion src/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@
},
"DOWNLOAD": {
"TITLE": "Download",
"PUBLICATION_DATE": "Veröffentlicht: {day}.{month}.year"
"PUBLICATION_DATE": "Veröffentlicht: {day}.{month}.{year}",
"DURATION_WITH_HOURS": "Dauer: {hours} Stunden {minutes} Minuten",
"DURATION": "Dauer: {minutes} Minuten",
"ACTIONS": {
"DOWNLOAD": "Download Episode",
"COPY": "Url kopieren"
}
},
"SHARE": {
"TITLE": "Teilen",
Expand Down Expand Up @@ -60,5 +66,15 @@
"TEXT": "Share text for show \"{title}\" with link {link}",
"SUBJECT": "Share subject for show \"{title}\" with link {link}"
}
},
"EMBED": {
"TITLE": "Embed Episode",
"LABEL": {
"SIZE": "Embed Size",
"CODE": "Embed Code"
},
"ACTIONS": {
"COPY": "Code kopieren"
}
}
}
15 changes: 14 additions & 1 deletion src/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
"PUBLICATION_DATE": "Published: {month}/{day}/{year}",
"DURATION_WITH_HOURS": "Duration: {hours} hours {minutes} minutes",
"DURATION": "Duration: {minutes} minutes",
"DOWNLOAD_EPISODE": "Download Episode"
"ACTIONS": {
"DOWNLOAD": "Download Episode",
"COPY": "Copy Url"
}
},
"SHARE": {
"TITLE": "Share",
Expand Down Expand Up @@ -57,6 +60,16 @@
"SHOW": {
"TEXT": "Share text for show \"{title}\" with link {link}",
"SUBJECT": "Share subject for show \"{title}\" with link {link}"
},
"EMBED": {
"TITLE": "Embed Episode",
"LABEL": {
"SIZE": "Embed Size",
"CODE": "Embed Code"
},
"ACTIONS": {
"COPY": "Copy Code"
}
}
}
}

0 comments on commit 898264f

Please sign in to comment.