Commit 5fa274d9 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt
Browse files

add sharing functionality to RecordingPage

parent 24209441
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
            <app-like collection="recordings" :id="recording.id"/>
            <app-download look="transparent" class="ml-3" :name="$t('recording_page.download_name')"
                          v-if="trackDownloadUrls" :files="trackDownloadUrls"/>
            <app-share look="transparent" class="ml-3" :name="recording.title" :payload="shareData"/>
          </div>
        </app-field>
        <app-auto-grid :sizes="{ md: [2, 1], lg: [2, 1], xl: [2, 1] }" :gap-modifier="2">
@@ -79,6 +80,14 @@
          omit: this.recording.id,
          is_available: 1
        }
      },
      shareData () {
        const { title, description } = this.recording
        return {
          title,
          text: description !== title ? description : null,
          url: window.location.origin + this.$route.path
        }
      }
    },
    inject: ['dataSources', 'env']