-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [task-124] Server variables validation & bugfix * [task-119] Ask for role in creating user command & improvements in error handling * [task-131] Updated recharge payment title translation in english * [task-136] Hide product images when are not set * [task-133] Added crowdin & roadmap to README.md * [task-137] Fix with translations in email after purchase * [task-138] Do not show register page if user is logged in * [task-139] Added product banner * [v0.3.1] Fixes in product template after merge * Added crowdin page to CONTRIBUTING.md --------- Co-authored-by: Konrad Sroga <[email protected]>
- Loading branch information
1 parent
ed290df
commit dd41834
Showing
35 changed files
with
396 additions
and
58 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,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DoctrineMigrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
final class Version20250128174115 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return 'Add `banner_path` column to `product` table'; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
$this->addSql('ALTER TABLE product ADD banner_path VARCHAR(255) DEFAULT NULL'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
$this->addSql('ALTER TABLE product DROP banner_path'); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -168,4 +168,8 @@ input#command { | |
|
||
.server-stats-row { | ||
min-width: 300px; | ||
} | ||
|
||
.hover-pointer:hover { | ||
cursor: pointer; | ||
} |
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,29 @@ | ||
<?php | ||
|
||
namespace App\Core\DTO\Collection; | ||
|
||
use App\Core\DTO\ServerVariableDTO; | ||
|
||
class ServerVariableCollection | ||
{ | ||
public function __construct( | ||
private readonly array $variables, | ||
) | ||
{ | ||
} | ||
|
||
public function getByEnvVariable(string $envVariable): ?ServerVariableDTO | ||
{ | ||
$foundVariable = array_filter($this->variables, function (ServerVariableDTO $variable) use ($envVariable) { | ||
return $variable->envVariable === $envVariable; | ||
}); | ||
$foundVariable = current($foundVariable); | ||
|
||
return $foundVariable ?: null; | ||
} | ||
|
||
public function all(): array | ||
{ | ||
return $this->variables; | ||
} | ||
} |
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,19 @@ | ||
<?php | ||
|
||
namespace App\Core\DTO; | ||
|
||
class ServerVariableDTO | ||
{ | ||
public function __construct( | ||
public readonly string $name, | ||
public readonly string $description, | ||
public readonly string $envVariable, | ||
public readonly string $defaultValue, | ||
public readonly string $serverValue, | ||
public readonly bool $isUserEditable, | ||
public readonly bool $isUserViewable, | ||
public readonly array $rules, | ||
) | ||
{ | ||
} | ||
} |
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,34 @@ | ||
<?php | ||
|
||
namespace App\Core\Factory; | ||
|
||
use App\Core\DTO\ServerVariableDTO; | ||
|
||
class ServerVariableFactory | ||
{ | ||
/** | ||
* @return array<ServerVariableDTO | ||
*/ | ||
public function createFromCollection(array $variables): array | ||
{ | ||
$preparedVariables = []; | ||
|
||
foreach ($variables as $variable) { | ||
$variable = $variable['attributes']; | ||
$variableRules = explode('|', $variable['rules']); | ||
|
||
$preparedVariables[] = new ServerVariableDTO( | ||
$variable['name'], | ||
$variable['description'], | ||
$variable['env_variable'], | ||
$variable['default_value'], | ||
$variable['server_value'], | ||
$variable['user_editable'], | ||
$variable['user_viewable'], | ||
$variableRules, | ||
); | ||
} | ||
|
||
return $preparedVariables; | ||
} | ||
} |
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.