-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Melroy van den Berg <melroy@melroy.org>
- Loading branch information
1 parent
c4d351f
commit fa6f302
Showing
54 changed files
with
2,524 additions
and
91 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
i.active { | ||
color: var(--kbin-color-icon-active, orange); | ||
} |
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,6 @@ | ||
.page-bookmarks { | ||
.entry, .entry-comment, .post, .post-comment, .comment { | ||
margin-top: 0!important; | ||
margin-bottom: .5em!important; | ||
} | ||
} |
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,71 @@ | ||
bookmark_front: | ||
controller: App\Controller\BookmarkListController::front | ||
defaults: { sortBy: hot, time: '∞', federation: all } | ||
path: /bookmark-lists/show/{list}/{sortBy}/{time}/{federation} | ||
methods: [GET] | ||
requirements: &front_requirement | ||
sortBy: "%default_sort_options%" | ||
time: "%default_time_options%" | ||
federation: "%default_federation_options%" | ||
|
||
bookmark_lists: | ||
controller: App\Controller\BookmarkListController::list | ||
path: /bookmark-lists | ||
methods: [GET, POST] | ||
|
||
bookmark_lists_menu_refresh_status: | ||
controller: App\Controller\BookmarkListController::subjectBookmarkMenuListRefresh | ||
path: /blr/{subject_id}/{subject_type} | ||
requirements: | ||
subject_type: "%default_subject_type_options%" | ||
methods: [ GET ] | ||
|
||
bookmark_lists_make_default: | ||
controller: App\Controller\BookmarkListController::makeDefault | ||
path: /bookmark-lists/makeDefault | ||
methods: [GET] | ||
|
||
bookmark_lists_edit_list: | ||
controller: App\Controller\BookmarkListController::editList | ||
path: /bookmark-lists/editList/{list} | ||
methods: [GET, POST] | ||
|
||
bookmark_lists_delete_list: | ||
controller: App\Controller\BookmarkListController::deleteList | ||
path: /bookmark-lists/deleteList/{list} | ||
methods: [GET] | ||
|
||
subject_bookmark_standard: | ||
controller: App\Controller\BookmarkController::subjectBookmarkStandard | ||
path: /bos/{subject_id}/{subject_type} | ||
requirements: | ||
subject_type: "%default_subject_type_options%" | ||
methods: [ GET ] | ||
|
||
subject_bookmark_refresh_status: | ||
controller: App\Controller\BookmarkController::subjectBookmarkRefresh | ||
path: /bor/{subject_id}/{subject_type} | ||
requirements: | ||
subject_type: "%default_subject_type_options%" | ||
methods: [ GET ] | ||
|
||
subject_bookmark_to_list: | ||
controller: App\Controller\BookmarkController::subjectBookmarkToList | ||
path: /bol/{subject_id}/{subject_type}/{list} | ||
requirements: | ||
subject_type: "%default_subject_type_options%" | ||
methods: [ GET ] | ||
|
||
subject_remove_bookmarks: | ||
controller: App\Controller\BookmarkController::subjectRemoveBookmarks | ||
path: /rbo/{subject_id}/{subject_type} | ||
requirements: | ||
subject_type: "%default_subject_type_options%" | ||
methods: [ GET ] | ||
|
||
subject_remove_bookmark_from_list: | ||
controller: App\Controller\BookmarkController::subjectRemoveBookmarkFromList | ||
path: /rbol/{subject_id}/{subject_type}/{list} | ||
requirements: | ||
subject_type: "%default_subject_type_options%" | ||
methods: [ GET ] |
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,61 @@ | ||
api_bookmark_front: | ||
controller: App\Controller\Api\Bookmark\BookmarkListApiController::front | ||
path: /api/bookmark-lists/show | ||
methods: [GET] | ||
format: json | ||
|
||
api_bookmark_lists: | ||
controller: App\Controller\Api\Bookmark\BookmarkListApiController::list | ||
path: /api/bookmark-lists | ||
methods: [GET] | ||
format: json | ||
|
||
api_bookmark_lists_make_default: | ||
controller: App\Controller\Api\Bookmark\BookmarkListApiController::makeDefault | ||
path: /api/bookmark-lists/{list_name}/makeDefault | ||
methods: [GET] | ||
format: json | ||
|
||
api_bookmark_lists_edit_list: | ||
controller: App\Controller\Api\Bookmark\BookmarkListApiController::editList | ||
path: /api/bookmark-lists/{list_name} | ||
methods: [POST] | ||
format: json | ||
|
||
api_bookmark_lists_delete_list: | ||
controller: App\Controller\Api\Bookmark\BookmarkListApiController::deleteList | ||
path: /api/bookmark-lists/{list_name} | ||
methods: [DELETE] | ||
format: json | ||
|
||
api_subject_bookmark_standard: | ||
controller: App\Controller\Api\Bookmark\BookmarkApiController::subjectBookmarkStandard | ||
path: /api/bos/{subject_id}/{subject_type} | ||
requirements: | ||
subject_type: "%default_subject_type_options%" | ||
methods: [ GET ] | ||
format: json | ||
|
||
api_subject_bookmark_to_list: | ||
controller: App\Controller\Api\Bookmark\BookmarkApiController::subjectBookmarkToList | ||
path: /api/bol/{subject_id}/{subject_type}/{list_name} | ||
requirements: | ||
subject_type: "%default_subject_type_options%" | ||
methods: [ GET ] | ||
format: json | ||
|
||
api_subject_remove_bookmarks: | ||
controller: App\Controller\Api\Bookmark\BookmarkApiController::subjectRemoveBookmarks | ||
path: /api/rbo/{subject_id}/{subject_type} | ||
requirements: | ||
subject_type: "%default_subject_type_options%" | ||
methods: [ GET ] | ||
format: json | ||
|
||
api_subject_remove_bookmark_from_list: | ||
controller: App\Controller\Api\Bookmark\BookmarkApiController::subjectRemoveBookmarkFromList | ||
path: /api/rbol/{subject_id}/{subject_type}/{list_name} | ||
requirements: | ||
subject_type: "%default_subject_type_options%" | ||
methods: [ GET ] | ||
format: json |
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DoctrineMigrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
final class Version20240831151328 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return 'This adds the bookmark and bookmark list tables'; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
$this->addSql('CREATE SEQUENCE bookmark_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); | ||
$this->addSql('CREATE SEQUENCE bookmark_list_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); | ||
$this->addSql('CREATE TABLE bookmark (id INT NOT NULL, list_id INT NOT NULL, user_id INT NOT NULL, entry_id INT DEFAULT NULL, entry_comment_id INT DEFAULT NULL, post_id INT DEFAULT NULL, post_comment_id INT DEFAULT NULL, created_at TIMESTAMP(0) WITH TIME ZONE NOT NULL, PRIMARY KEY(id))'); | ||
$this->addSql('CREATE INDEX IDX_DA62921D3DAE168B ON bookmark (list_id)'); | ||
$this->addSql('CREATE INDEX IDX_DA62921DA76ED395 ON bookmark (user_id)'); | ||
$this->addSql('CREATE INDEX IDX_DA62921DBA364942 ON bookmark (entry_id)'); | ||
$this->addSql('CREATE INDEX IDX_DA62921D60C33421 ON bookmark (entry_comment_id)'); | ||
$this->addSql('CREATE INDEX IDX_DA62921D4B89032C ON bookmark (post_id)'); | ||
$this->addSql('CREATE INDEX IDX_DA62921DDB1174D2 ON bookmark (post_comment_id)'); | ||
$this->addSql('CREATE UNIQUE INDEX bookmark_list_entry_entryComment_post_postComment_idx ON bookmark (list_id, entry_id, entry_comment_id, post_id, post_comment_id)'); | ||
$this->addSql('COMMENT ON COLUMN bookmark.created_at IS \'(DC2Type:datetimetz_immutable)\''); | ||
$this->addSql('CREATE TABLE bookmark_list (id INT NOT NULL, user_id INT NOT NULL, name VARCHAR(255) NOT NULL, is_default BOOLEAN NOT NULL, PRIMARY KEY(id))'); | ||
$this->addSql('CREATE INDEX IDX_A650C0C4A76ED395 ON bookmark_list (user_id)'); | ||
$this->addSql('CREATE UNIQUE INDEX UNIQ_A650C0C4A76ED3955E237E06 ON bookmark_list (user_id, name)'); | ||
$this->addSql('ALTER TABLE bookmark ADD CONSTRAINT FK_DA62921D3DAE168B FOREIGN KEY (list_id) REFERENCES bookmark_list (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); | ||
$this->addSql('ALTER TABLE bookmark ADD CONSTRAINT FK_DA62921DA76ED395 FOREIGN KEY (user_id) REFERENCES "user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); | ||
$this->addSql('ALTER TABLE bookmark ADD CONSTRAINT FK_DA62921DBA364942 FOREIGN KEY (entry_id) REFERENCES entry (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); | ||
$this->addSql('ALTER TABLE bookmark ADD CONSTRAINT FK_DA62921D60C33421 FOREIGN KEY (entry_comment_id) REFERENCES entry_comment (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); | ||
$this->addSql('ALTER TABLE bookmark ADD CONSTRAINT FK_DA62921D4B89032C FOREIGN KEY (post_id) REFERENCES post (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); | ||
$this->addSql('ALTER TABLE bookmark ADD CONSTRAINT FK_DA62921DDB1174D2 FOREIGN KEY (post_comment_id) REFERENCES post_comment (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); | ||
$this->addSql('ALTER TABLE bookmark_list ADD CONSTRAINT FK_A650C0C4A76ED395 FOREIGN KEY (user_id) REFERENCES "user" (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
$this->addSql('DROP SEQUENCE bookmark_id_seq CASCADE'); | ||
$this->addSql('DROP SEQUENCE bookmark_list_id_seq CASCADE'); | ||
$this->addSql('ALTER TABLE bookmark DROP CONSTRAINT FK_DA62921D3DAE168B'); | ||
$this->addSql('ALTER TABLE bookmark DROP CONSTRAINT FK_DA62921DA76ED395'); | ||
$this->addSql('ALTER TABLE bookmark DROP CONSTRAINT FK_DA62921DBA364942'); | ||
$this->addSql('ALTER TABLE bookmark DROP CONSTRAINT FK_DA62921D60C33421'); | ||
$this->addSql('ALTER TABLE bookmark DROP CONSTRAINT FK_DA62921D4B89032C'); | ||
$this->addSql('ALTER TABLE bookmark DROP CONSTRAINT FK_DA62921DDB1174D2'); | ||
$this->addSql('ALTER TABLE bookmark_list DROP CONSTRAINT FK_A650C0C4A76ED395'); | ||
$this->addSql('DROP TABLE bookmark'); | ||
$this->addSql('DROP TABLE bookmark_list'); | ||
} | ||
} |
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.