-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make bookmark list actions configurable (#666)
* Make bookmark list actions configurable * Add upgrade notice
- Loading branch information
1 parent
92f62d3
commit d9b7996
Showing
10 changed files
with
234 additions
and
32 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
bookmarks/migrations/0028_userprofile_display_archive_bookmark_action_and_more.py
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,33 @@ | ||
# Generated by Django 5.0.2 on 2024-03-29 20:05 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("bookmarks", "0027_userprofile_bookmark_description_display_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="userprofile", | ||
name="display_archive_bookmark_action", | ||
field=models.BooleanField(default=True), | ||
), | ||
migrations.AddField( | ||
model_name="userprofile", | ||
name="display_edit_bookmark_action", | ||
field=models.BooleanField(default=True), | ||
), | ||
migrations.AddField( | ||
model_name="userprofile", | ||
name="display_remove_bookmark_action", | ||
field=models.BooleanField(default=True), | ||
), | ||
migrations.AddField( | ||
model_name="userprofile", | ||
name="display_view_bookmark_action", | ||
field=models.BooleanField(default=True), | ||
), | ||
] |
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,34 @@ | ||
# Generated by Django 5.0.2 on 2024-03-29 21:25 | ||
|
||
from django.db import migrations | ||
from django.contrib.auth import get_user_model | ||
|
||
from bookmarks.models import Toast | ||
|
||
User = get_user_model() | ||
|
||
|
||
def forwards(apps, schema_editor): | ||
|
||
for user in User.objects.all(): | ||
toast = Toast( | ||
key="bookmark_list_actions_hint", | ||
message="This version adds a new link to each bookmark to view details in a dialog. If you feel there is too much clutter you can now hide individual links in the settings.", | ||
owner=user, | ||
) | ||
toast.save() | ||
|
||
|
||
def reverse(apps, schema_editor): | ||
Toast.objects.filter(key="bookmark_list_actions_hint").delete() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("bookmarks", "0028_userprofile_display_archive_bookmark_action_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(forwards, reverse), | ||
] |
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
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
Oops, something went wrong.