-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #315 from jamesvandyne/bluesky
Add Bridgy Bluesky support
- Loading branch information
Showing
7 changed files
with
65 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
from application.entry._open_graph import get_open_graph_meta_for_entry | ||
|
||
from ._create_entry import Bookmark, Checkin, Location, Reply, create_entry | ||
from ._post_to_bridgy import post_to_mastodon | ||
from ._post_to_bridgy import post_to_bridgy | ||
from ._update_entry import update_entry | ||
|
||
__all__ = ["get_open_graph_meta_for_entry", "create_entry"] |
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
16 changes: 12 additions & 4 deletions
16
apps/templates/interfaces/dashboard/entry/bridgy/_form.html
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,10 +1,18 @@ | ||
<div hx-target="this" hx-swap="outerHTML" class="mt-2"> | ||
{% if is_syndicated %} | ||
<a href="{{ syndication_url }}" target="_new" class="outline-button">🐘 View on Mastodon</a> | ||
<div hx-target="this" hx-swap="outerHTML" class="mt-2 flex flex-col"> | ||
{% if is_syndicated_to_mastodon %} | ||
<a href="{{ mastodon_syndication_url }}" target="_new" class="outline-button text-center">🐘 View on Mastodon</a> | ||
{% else %} | ||
<form hx-post="{% url 'send_to_mastodon' t_entry_id %}" class="flex"> | ||
<form hx-post="{% url 'send_to_mastodon' t_entry_id %}" class="flex flex-col"> | ||
<button class="outline-button" data-loading-class="hidden"><span id="elephant">🐘</span> Send to Mastodon</button> | ||
<button class="outline-button" data-loading-disable data-loading><span id="elephant" class="animate-spin inline-block" >🐘</span> Sending to Mastodon…</button> | ||
</form> | ||
{% endif %} | ||
{% if is_syndicated_to_bluesky %} | ||
<a href="{{ bluesky_syndication_url }}" target="_new" class="outline-button mt-2 text-center">🦋 View on Bluesky</a> | ||
{% else %} | ||
<form hx-post="{% url 'send_to_bluesky' t_entry_id %}" class="flex flex-col mt-2"> | ||
<button class="outline-button text-center" data-loading-class="hidden"><span id="butterfly">🦋</span> Send to Bluesky</button> | ||
<button class="outline-button" data-loading-disable data-loading><span id="butterfly" class="animate-spin inline-block" >🦋</span> Sending to Bluesky…</button> | ||
</form> | ||
{% endif %} | ||
</div> |