Compare commits

...

9 Commits

Author SHA1 Message Date
Andras Bacsai
d48b5a9079 Merge pull request #2664 from coollabsio/next
Refactor default_environment method to handle projects with 0 environ…
2024-06-24 18:42:21 +02:00
Andras Bacsai
99354f0d7d Refactor default_environment method to handle projects with 0 environments 2024-06-24 18:41:44 +02:00
Andras Bacsai
0fa8552aa3 Merge pull request #2663 from coollabsio/next
v4.0.0-beta.301
2024-06-24 18:35:18 +02:00
Andras Bacsai
4869c388b2 Merge pull request #2659 from kubatron117/cs-lang
CS localization
2024-06-24 18:34:54 +02:00
Andras Bacsai
2adade0927 Merge pull request #2661 from ari-party/main
Small CSS change
2024-06-24 18:34:28 +02:00
Andras Bacsai
87b7337d9e fix: projects with 0 envs 2024-06-24 18:33:01 +02:00
Andras Bacsai
351c9c1ad3 chore: Update version to 4.0.0-beta.301 2024-06-24 18:31:15 +02:00
kubatron 117
7759fe2cdf Add czech localization 2024-06-24 17:24:08 +02:00
Astrid
5d2651afc1 Add margin top to button 2024-06-24 17:20:56 +02:00
8 changed files with 56 additions and 12 deletions

View File

@@ -116,10 +116,14 @@ class Project extends BaseModel
public function default_environment()
{
$default = $this->environments()->where('name', 'production')->first();
if (! $default) {
$default = $this->environments()->get()->sortBy('created_at')->first();
if ($default) {
return $default->name;
}
$default = $this->environments()->get();
if ($default->count() > 0) {
return $default->sortBy('created_at')->first()->name;
}
return $default;
return null;
}
}

View File

@@ -7,7 +7,7 @@ return [
// The release version of your application
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
'release' => '4.0.0-beta.300',
'release' => '4.0.0-beta.301',
// When left empty or `null` the Laravel environment will be used
'environment' => config('app.env'),

View File

@@ -1,3 +1,3 @@
<?php
return '4.0.0-beta.300';
return '4.0.0-beta.301';

30
lang/cs.json Normal file
View File

@@ -0,0 +1,30 @@
{
"auth.login": "Přihlásit se",
"auth.login.azure": "Přihlásit se pomocí Microsoftu",
"auth.login.bitbucket": "Přihlásit se pomocí Bitbucketu",
"auth.login.github": "Přihlásit se pomocí GitHubu",
"auth.login.gitlab": "Přihlásit se pomocí Gitlabu",
"auth.login.google": "Přihlásit se pomocí Google",
"auth.already_registered": "Již jste registrováni?",
"auth.confirm_password": "Potvrďte heslo",
"auth.forgot_password": "Zapomněli jste heslo",
"auth.forgot_password_send_email": "Poslat e-mail pro resetování hesla",
"auth.register_now": "Registrovat se",
"auth.logout": "Odhlásit se",
"auth.register": "Registrovat se",
"auth.registration_disabled": "Registrace je zakázána. Kontaktujte prosím administrátora.",
"auth.reset_password": "Obnovit heslo",
"auth.failed": "Tyto údaje neodpovídají našim záznamům.",
"auth.failed.callback": "Nepodařilo se zpracovat zpětné volání od poskytovatele přihlášení.",
"auth.failed.password": "Zadané heslo je nesprávné.",
"auth.failed.email": "Nemůžeme najít uživatele s touto e-mailovou adresou.",
"auth.throttle": "Příliš mnoho pokusů o přihlášení. Zkuste to prosím znovu za :seconds sekund.",
"input.name": "Jméno",
"input.email": "E-mail",
"input.password": "Heslo",
"input.password.again": "Heslo znovu",
"input.code": "Jednorázový kód",
"input.recovery_code": "Obnovovací kód",
"button.save": "Uložit",
"repository.url": "<span class='text-helper'>Příklady</span><br>Pro veřejné repozitáře, použijte <span class='text-helper'>https://...</span>.<br>Pro soukromé repozitáře, použijte <span class='text-helper'>git@...</span>.<br><br>https://github.com/coollabsio/coolify-examples <span class='text-helper'>main</span> branch bude zvolena<br>https://github.com/coollabsio/coolify-examples/tree/nodejs-fastify <span class='text-helper'>nodejs-fastify</span> branch bude vybrána.<br>https://gitea.com/sedlav/expressjs.git <span class='text-helper'>main</span> branch vybrána.<br>https://gitlab.com/andrasbacsai/nodejs-example.git <span class='text-helper'>main</span> branch bude vybrána."
}

View File

@@ -23,7 +23,7 @@
<div class="grid grid-cols-1 gap-2 xl:grid-cols-2">
@foreach ($projects as $project)
<div class="gap-2 border border-transparent cursor-pointer box group"
onclick="window.location.href = '{{ route('project.resource.index', ['project_uuid' => data_get($project, 'uuid'), 'environment_name' => $project->default_environment()->name]) }}'">
onclick="gotoProject('{{ $project->uuid }}','{{ $project->default_environment() }}')">
<div class="flex flex-1 mx-6">
<div class="flex flex-col justify-center flex-1">
<div class="box-title">{{ $project->name }}</div>
@@ -160,7 +160,10 @@
@endif
<script>
function gotoProject(uuid, environment = 'production') {
function gotoProject(uuid, environment) {
if (!environment) {
window.location.href = '/project/' + uuid;
}
window.location.href = '/project/' + uuid + '/' + environment;
}
</script>

View File

@@ -12,12 +12,12 @@
<div class="grid gap-2 lg:grid-cols-2">
@forelse ($projects as $project)
<div class="box group" x-data x-on:click="goto('{{ $project->uuid }}')">
<a class="flex flex-col justify-center flex-1 mx-6"
href="{{ route('project.resource.index', ['project_uuid' => data_get($project, 'uuid'), 'environment_name' => $project->default_environment()->name]) }}">
<div class="flex flex-col justify-center flex-1 mx-6"
onclick="gotoProject('{{ $project->uuid }}','{{ $project->default_environment() }}')">
<div class="box-title">{{ $project->name }}</div>
<div class="box-description ">
{{ $project->description }}</div>
</a>
</div>
<div class="flex items-center justify-center gap-2 pt-4 pb-2 mr-4 text-xs lg:py-0 lg:justify-normal">
<a class="mx-4 font-bold hover:underline"
href="{{ route('project.edit', ['project_uuid' => data_get($project, 'uuid')]) }}">
@@ -36,5 +36,12 @@
function goto(uuid) {
window.location.href = '/project/' + uuid;
}
function gotoProject(uuid, environment) {
if (!environment) {
window.location.href = '/project/' + uuid;
}
window.location.href = '/project/' + uuid + '/' + environment;
}
</script>
</div>

View File

@@ -26,7 +26,7 @@
@else
To configure automatic backup for your Coolify instance, you first need to add as a database resource
into Coolify.
<x-forms.button wire:click="add_coolify_database">Add Database</x-forms.button>
<x-forms.button class="mt-2" wire:click="add_coolify_database">Add Database</x-forms.button>
@endif
</div>
<div class="py-4">

View File

@@ -1,7 +1,7 @@
{
"coolify": {
"v4": {
"version": "4.0.0-beta.300"
"version": "4.0.0-beta.301"
}
}
}