-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added pane and table column attribute to see status or a user > athel…
…ete to Strava
- Loading branch information
Showing
11 changed files
with
134 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,27 @@ | ||
/** | ||
* Strava Sync plugin for Craft CMS | ||
* | ||
* Strava Sync CSS | ||
* | ||
* @author bymayo | ||
* @copyright Copyright (c) 2019 bymayo | ||
* @link http://bymayo.co.uk | ||
* @package StravaSync | ||
* @since 1.0.0 | ||
*/ | ||
.rounded { | ||
border-radius: .25rem; | ||
} | ||
|
||
.font-medium { | ||
font-weight: 500; | ||
} | ||
|
||
.text-sm { | ||
font-size: .75rem; | ||
} | ||
|
||
.p-2 { | ||
padding: 0.3rem 0.5rem; | ||
} | ||
|
||
.text-white { | ||
color: #fff; | ||
} | ||
|
||
.bg-strava { | ||
background-color: #fc4c02; | ||
} | ||
|
||
.bg-gray-300 { | ||
background-color: #e2e8f0; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +0,0 @@ | ||
/** | ||
* Strava Sync plugin for Craft CMS | ||
* | ||
* Strava Sync JS | ||
* | ||
* @author bymayo | ||
* @copyright Copyright (c) 2019 bymayo | ||
* @link http://bymayo.co.uk | ||
* @package StravaSync | ||
* @since 1.0.0 | ||
*/ | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% if status %} | ||
<span class="bg-strava text-white font-medium text-sm p-2 rounded">Connected</span> | ||
{% else %} | ||
<span class="bg-gray-300 font-medium text-sm p-2 rounded">Disconnected</span> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{% if user.id == currentUser.id or currentUser.admin %} | ||
|
||
<div class="meta"> | ||
<h2>Strava</h2> | ||
{% set stravaSyncUser = craft.stravaSync.connected(user.id) %} | ||
{% if stravaSyncUser %} | ||
<div class="data first"> | ||
<span class="heading">ID</span> | ||
<span class="value"> | ||
<a href="https://strava.com/athletes/{{ stravaSyncUser.athleteId }}" target="_blank">#{{ stravaSyncUser.athleteId }}</a> | ||
</span> | ||
</div> | ||
<div class="data"> | ||
<span class="heading">Token Expiry</span> | ||
<span class="value">{{ stravaSyncUser.expires|datetime('short') }}</span> | ||
</div> | ||
<div class="data"> | ||
<span class="heading"> | ||
{% if user.id == currentUser.id %} | ||
<a href="{{ craft.stravaSync.disconnectUrl() }}" class="btn small delete" title="Disconnect from Strava">Disconnect from Strava</a> | ||
{% elseif currentUser.admin %} | ||
<a href="{{ craft.stravaSync.disconnectUrl() }}" class="btn small delete" title="Disconnect from Strava">Disconnect from Strava</a> | ||
{% else %} | ||
<div class="btn small disabled">Disconnect from Strava</div> | ||
{% endif %} | ||
</span> | ||
</div> | ||
{% else %} | ||
<div class="data"> | ||
{% if user.id == currentUser.id %} | ||
<a href="{{ craft.stravaSync.connectUrl() }}" class="btn small submit">Connect to Strava</a> | ||
{% else %} | ||
<div class="btn small submit disabled">Connect to Strava</div> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
</div> | ||
|
||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters