Skip to content

Commit

Permalink
✨ Share button plugin: disable twitter by default, add bluesky
Browse files Browse the repository at this point in the history
Best enjoyed together with okfde/froide#909
  • Loading branch information
pajowu committed Nov 22, 2024
1 parent f92df06 commit 47164e6
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
1 change: 1 addition & 0 deletions fragdenstaat_de/fds_cms/cms_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ def render(self, context, instance, placeholder):
context["text"] = instance.title
context["image"] = instance.image
context["twitter"] = instance.twitter
context["bluesky"] = instance.bluesky
context["mastodon"] = instance.mastodon
context["facebook"] = instance.facebook
context["email"] = instance.email
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Generated by Django 4.2.16 on 2024-11-22 14:19

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("fds_cms", "0068_fdspageextension_frame_ancestors"),
]

operations = [
migrations.AddField(
model_name="sharelinkscmsplugin",
name="bluesky",
field=models.BooleanField(default=True, verbose_name="BlueSky"),
),
migrations.AlterField(
model_name="sharelinkscmsplugin",
name="twitter",
field=models.BooleanField(default=False, verbose_name="Twitter"),
),
migrations.AlterField(
model_name="vegachartcmsplugin",
name="description",
field=models.TextField(
blank=True, help_text="Formatting with Markdown is supported."
),
),
]
3 changes: 2 additions & 1 deletion fragdenstaat_de/fds_cms/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@ class ShareLinksCMSPlugin(CMSPlugin):
),
)

twitter = models.BooleanField("Twitter", default=True)
twitter = models.BooleanField("Twitter", default=False)
bluesky = models.BooleanField("BlueSky", default=True)
mastodon = models.BooleanField("Mastodon", default=True)
facebook = models.BooleanField("Facebook", default=False)
email = models.BooleanField(_("Email"), default=False)
Expand Down

0 comments on commit 47164e6

Please sign in to comment.