-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Set the visibility for statuses individually (#410)
* added migration * Visibility-logic implemented. * Now like creation is only possible with a visibleToMe-Status! * icons to show the visibility of a status * Translations!!!1 Also visibility in events * Yay, the visibility-dropdown does now exist * check in with visibility * updates work now too (not in the api) * codacy, etc. * fixed tests. * fixed dropdown to btn-group * fixes * fixes * enum! * format * user Co-authored-by: Kris <[email protected]>
- Loading branch information
1 parent
1cbc518
commit 5ba8789
Showing
24 changed files
with
336 additions
and
149 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
declare(strict_types=0); | ||
|
||
namespace App\Enum; | ||
|
||
final class StatusVisibility extends BasicEnum | ||
{ | ||
public const PUBLIC = 0; | ||
public const UNLISTED = 1; | ||
public const FOLLOWERS = 2; | ||
public const PRIVATE = 3; | ||
} |
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
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
22 changes: 22 additions & 0 deletions
22
database/migrations/2021_06_07_145349_add_visibility_to_statuses.php
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,22 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class AddVisibilityToStatuses extends Migration | ||
{ | ||
public function up(): void { | ||
Schema::table('statuses', function(Blueprint $table) { | ||
$table->unsignedTinyInteger('visibility') | ||
->default(0) | ||
->after('business'); | ||
}); | ||
} | ||
|
||
public function down(): void { | ||
Schema::table('statuses', function(Blueprint $table) { | ||
$table->dropColumn('visibility'); | ||
}); | ||
} | ||
} |
Oops, something went wrong.