diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-02 09:13:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-02 09:13:40 +0300 |
commit | 49b4ef6b6c1044b4e03ee9b6f3b84140610f1224 (patch) | |
tree | 69b00e8840e52de0efd15fbade1b5a9ef3b589a5 /app/assets/javascripts/repository | |
parent | 1a54a22498c83026e61d30d36c9c599938664454 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/repository')
-rw-r--r-- | app/assets/javascripts/repository/components/blob_viewers/audio_viewer.vue | 20 | ||||
-rw-r--r-- | app/assets/javascripts/repository/components/blob_viewers/index.js | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/app/assets/javascripts/repository/components/blob_viewers/audio_viewer.vue b/app/assets/javascripts/repository/components/blob_viewers/audio_viewer.vue new file mode 100644 index 00000000000..048730c02c1 --- /dev/null +++ b/app/assets/javascripts/repository/components/blob_viewers/audio_viewer.vue @@ -0,0 +1,20 @@ +<script> +export default { + props: { + blob: { + type: Object, + required: true, + }, + }, + data() { + return { + src: this.blob.rawPath, + }; + }, +}; +</script> +<template> + <div class="gl-text-center gl-p-7"> + <audio :src="src" controls data-testid="audio"></audio> + </div> +</template> diff --git a/app/assets/javascripts/repository/components/blob_viewers/index.js b/app/assets/javascripts/repository/components/blob_viewers/index.js index 11fc4b90f7e..cbe18ea396e 100644 --- a/app/assets/javascripts/repository/components/blob_viewers/index.js +++ b/app/assets/javascripts/repository/components/blob_viewers/index.js @@ -7,6 +7,7 @@ const viewers = { text: () => import('~/vue_shared/components/source_viewer/source_viewer.vue'), pdf: () => import('./pdf_viewer.vue'), lfs: () => import('./lfs_viewer.vue'), + audio: () => import('./audio_viewer.vue'), }; export const loadViewer = (type, isUsingLfs) => { |