mirror of https://github.com/Lissy93/dashy.git
🎨 Adds option to hide sports thumbnail (#654)
This commit is contained in:
parent
19b71313d5
commit
8c43442b39
|
@ -714,6 +714,7 @@ Show recent scores and upcoming matches from your favourite sports team. Data is
|
||||||
**`pastOrFuture`** | `string` | __Optional__ | Set to `past` to show scores for recent games, or `future` to show upcoming games. Defaults to `past`. You can change this within the UI
|
**`pastOrFuture`** | `string` | __Optional__ | Set to `past` to show scores for recent games, or `future` to show upcoming games. Defaults to `past`. You can change this within the UI
|
||||||
**`apiKey`** | `string` | __Optional__ | Optionally specify your API key, which you can sign up for at [TheSportsDB.com](https://www.thesportsdb.com/)
|
**`apiKey`** | `string` | __Optional__ | Optionally specify your API key, which you can sign up for at [TheSportsDB.com](https://www.thesportsdb.com/)
|
||||||
**`limit`** | `number` | __Optional__ | To limit output to a certain number of matches, defaults to `15`
|
**`limit`** | `number` | __Optional__ | To limit output to a certain number of matches, defaults to `15`
|
||||||
|
**`hideImage`** | `boolean` | __Optional__ | Set to `true` to not render the team / match banner image, defaults to `false`
|
||||||
|
|
||||||
##### Example
|
##### Example
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="match-row" v-for="match in matches" :key="match.id">
|
<div class="match-row" v-for="match in matches" :key="match.id">
|
||||||
<!-- Banner Image -->
|
<!-- Banner Image -->
|
||||||
<div class="match-thumbnail-wrap">
|
<div class="match-thumbnail-wrap" v-if="!hideImage">
|
||||||
<img :src="match.thumbnail" :alt="`${match.title} Banner Image`" class="match-thumbnail" />
|
<img :src="match.thumbnail" :alt="`${match.title} Banner Image`" class="match-thumbnail" />
|
||||||
</div>
|
</div>
|
||||||
<!-- Team Scores -->
|
<!-- Team Scores -->
|
||||||
|
@ -101,6 +101,9 @@ export default {
|
||||||
pastOrFuture() {
|
pastOrFuture() {
|
||||||
return this.options.pastOrFuture || 'past';
|
return this.options.pastOrFuture || 'past';
|
||||||
},
|
},
|
||||||
|
hideImage() {
|
||||||
|
return this.options.hideImage || false;
|
||||||
|
},
|
||||||
endpoint() {
|
endpoint() {
|
||||||
this.initiate();
|
this.initiate();
|
||||||
const endpoint = widgetApiEndpoints.sportsScores;
|
const endpoint = widgetApiEndpoints.sportsScores;
|
||||||
|
|
Loading…
Reference in New Issue