FileManager.vue 35.4 KB
Newer Older
1001
1002
1003
    fetchPlaylists: function (slug) {
      this.loaded.playlists = false
      var uri = process.env.VUE_APP_API_TANK + 'shows/' + slug + '/playlists'
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
      axios.get(uri, {
        withCredentials: true,
        headers: { 'Authorization': 'Bearer ' + this.$parent.user.access_token }
      }).then(response => {
        // we don't have to check separately, if there are playlists, because tank
        // always provides an empty array if there are no playlists (or even if there is no corresponding show)
        this.playlists = response.data.results
        this.loaded.playlists = true
      }).catch(error => {
        alert('There was an error fetching playlists from tank: ' + error)
      })
1015
1016
1017
    }
  }
}
1018
1019
1020
</script>

<style>
1021
1022
1023
1024
1025
div.filelistbox {
  border: 1px solid #e9ecef;
  border-radius: 0.3rem;
  padding: 1rem 2rem;
}
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
.stateNew {
  color: red;
  font-weight: bold;
}
.stateRunning {
  color: darkgreen;
}
.stateUndefined {
  color: orange;
  font-weight: bold;
}
1037
</style>
For faster browsing, not all history is shown. View entire blame