Compare commits
2 Commits
#172-app-f
...
309c68d3fd
Author | SHA1 | Date | |
---|---|---|---|
309c68d3fd
|
|||
4516df29d9
|
6
.env.ci
6
.env.ci
@@ -21,9 +21,3 @@ SESSION_DRIVER=array
|
|||||||
SESSION_LIFETIME=120
|
SESSION_LIFETIME=120
|
||||||
FILESYSTEM_DISK=local
|
FILESYSTEM_DISK=local
|
||||||
MAIL_MAILER=array
|
MAIL_MAILER=array
|
||||||
|
|
||||||
HEROKU_RELEASE_VERSION=v01
|
|
||||||
HEROKU_SLUG_DESCRIPTION="Dev 643f546"
|
|
||||||
HEROKU_RELEASE_CREATED_AT=2022-07-04T18:05:46Z
|
|
||||||
HEROKU_SLUG_COMMIT=643f546142b8a2db342f0ae46f01e61dce03e97c
|
|
||||||
GITHUB_REPO_URL=https://github.com/blumilksoftware/toby/
|
|
||||||
|
@@ -6,6 +6,7 @@ namespace Toby\Infrastructure\Http\Middleware;
|
|||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Carbon;
|
||||||
use Inertia\Middleware;
|
use Inertia\Middleware;
|
||||||
use Toby\Domain\VacationRequestStatesRetriever;
|
use Toby\Domain\VacationRequestStatesRetriever;
|
||||||
use Toby\Eloquent\Helpers\YearPeriodRetriever;
|
use Toby\Eloquent\Helpers\YearPeriodRetriever;
|
||||||
@@ -73,14 +74,16 @@ class HandleInertiaRequests extends Middleware
|
|||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDeployInformation(): Closure
|
protected function getDeployInformation(): array
|
||||||
{
|
{
|
||||||
return fn(): array => [
|
$releaseDate = config("heroku.release_created_at");
|
||||||
|
|
||||||
|
return [
|
||||||
"release_version" => config("heroku.release_version"),
|
"release_version" => config("heroku.release_version"),
|
||||||
"slug_description" => config("heroku.slug_description"),
|
"slug_description" => config("heroku.slug_description"),
|
||||||
"release_created_at" => config("heroku.release_created_at"),
|
"release_created_at" => $releaseDate ? Carbon::parse($releaseDate)->format('Y-m-d H:i:s') : null,
|
||||||
"slug_commit" => config("heroku.slug_commit"),
|
"slug_commit" => config("heroku.slug_commit"),
|
||||||
"github_url" => config("heroku.github_url", ""),
|
"github_url" => preg_replace("/\/$/i", "", config("heroku.github_url", "")),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -7,5 +7,5 @@ return [
|
|||||||
"slug_description" => env("HEROKU_SLUG_DESCRIPTION"),
|
"slug_description" => env("HEROKU_SLUG_DESCRIPTION"),
|
||||||
"release_created_at" => env("HEROKU_RELEASE_CREATED_AT"),
|
"release_created_at" => env("HEROKU_RELEASE_CREATED_AT"),
|
||||||
"slug_commit" => env("HEROKU_SLUG_COMMIT"),
|
"slug_commit" => env("HEROKU_SLUG_COMMIT"),
|
||||||
"github_url" => env("GITHUB_REPO_URL"),
|
"github_url" => env("GITHUB_REPO_URL")
|
||||||
];
|
];
|
||||||
|
@@ -32,10 +32,5 @@
|
|||||||
<env name="QUEUE_CONNECTION" value="sync"/>
|
<env name="QUEUE_CONNECTION" value="sync"/>
|
||||||
<env name="SESSION_DRIVER" value="array"/>
|
<env name="SESSION_DRIVER" value="array"/>
|
||||||
<env name="TELESCOPE_ENABLED" value="false"/>
|
<env name="TELESCOPE_ENABLED" value="false"/>
|
||||||
<env name="HEROKU_RELEASE_VERSION" value="v01"/>
|
|
||||||
<env name="HEROKU_SLUG_DESCRIPTION" value="Dev 643f546"/>
|
|
||||||
<env name="HEROKU_RELEASE_CREATED_AT" value="2022-07-04T18:05:46Z"/>
|
|
||||||
<env name="HEROKU_SLUG_COMMIT" value="643f546142b8a2db342f0ae46f01e61dce03e97c"/>
|
|
||||||
<env name="GITHUB_REPO_URL" value="https://github.com/blumilksoftware/toby"/>
|
|
||||||
</php>
|
</php>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
@@ -1,55 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div
|
|
||||||
class="min-w-full p-4 text-xs text-gray-500 flex flex-row gap-x-1"
|
|
||||||
>
|
|
||||||
<p class="flex flex-col sm:flex-row gap-x-1">
|
|
||||||
<span class="font-bold whitespace-nowrap">Wersja:</span>
|
|
||||||
<span
|
|
||||||
class="whitespace-nowrap"
|
|
||||||
:title="`Commit: ${deployInformation.slug_commit ?? 'unset'}`"
|
|
||||||
>
|
|
||||||
{{ deployInformation.slug_description ?? 'unset' }} ({{ deployInformation.release_version ?? 'unset' }})
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
<p
|
|
||||||
v-if="deployInformation.release_created_at"
|
|
||||||
class="flex flex-col sm:flex-row gap-x-1 border-l-2 border-gray-300 pl-1"
|
|
||||||
>
|
|
||||||
<span class="font-bold whitespace-nowrap">Ostatnio zbudowano:</span>
|
|
||||||
<span>{{ getDate() }}</span>
|
|
||||||
</p>
|
|
||||||
<p
|
|
||||||
v-if="deployInformation.github_url"
|
|
||||||
class="flex flex-col sm:flex-row gap-x-1 border-l-2 border-gray-300 pl-1"
|
|
||||||
>
|
|
||||||
<span class="hidden sm:block font-bold whitespace-nowrap">Repozytorium:</span>
|
|
||||||
<span class="block sm:hidden font-bold whitespace-nowrap">Repo:</span>
|
|
||||||
<a
|
|
||||||
v-if="deployInformation.github_url"
|
|
||||||
class="text-gray-800 whitespace-nowrap underline hover:no-underline hover:text-blumilk-600"
|
|
||||||
:href="deployInformation.github_url"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener nofollow noreferrer"
|
|
||||||
>GitHub</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { DateTime } from 'luxon'
|
|
||||||
|
|
||||||
let props = defineProps({
|
|
||||||
deployInformation: Object,
|
|
||||||
})
|
|
||||||
|
|
||||||
function getDate() {
|
|
||||||
return DateTime.fromISO(props.deployInformation.release_created_at)
|
|
||||||
.toLocaleString({
|
|
||||||
year: 'numeric',
|
|
||||||
month: '2-digit',
|
|
||||||
day: '2-digit',
|
|
||||||
hour: '2-digit',
|
|
||||||
minute: '2-digit',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</script>
|
|
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="relative min-h-screen">
|
<div class="min-h-full">
|
||||||
<MainMenu
|
<MainMenu
|
||||||
:auth="auth"
|
:auth="auth"
|
||||||
:years="years"
|
:years="years"
|
||||||
@@ -9,12 +9,31 @@
|
|||||||
<div class="lg:px-4">
|
<div class="lg:px-4">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
<div class="h-8 sm:h-4"></div>
|
<div class="p-4 text-xs text-gray-500 flex align-baseline gap-x-1">
|
||||||
|
<p>
|
||||||
|
<strong>Wydanie:</strong> <a
|
||||||
|
v-if="deployInformation.github_url"
|
||||||
|
:href="`${deployInformation.github_url}/commit/${deployInformation.slug_commit}`"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener nofollow noreferrer"
|
||||||
|
:title="`Commit: ${deployInformation.slug_commit}`"
|
||||||
|
>
|
||||||
|
{{ deployInformation.slug_description }} ({{ deployInformation.release_version }})
|
||||||
|
</a><span
|
||||||
|
v-else
|
||||||
|
:title="`Commit: ${deployInformation.slug_commit}`"
|
||||||
|
>
|
||||||
|
{{ deployInformation.slug_description }}
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<p
|
||||||
|
v-if="deployInformation.release_created_at"
|
||||||
|
class="border-l-2 border-gray-300 pl-1"
|
||||||
|
>
|
||||||
|
<strong>Data wydania:</strong> {{ deployInformation.release_created_at }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<DeployInfo
|
|
||||||
:deploy-information="deployInformation"
|
|
||||||
class="absolute bottom-0 justify-end"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -22,7 +41,6 @@
|
|||||||
import MainMenu from '@/Shared/MainMenu'
|
import MainMenu from '@/Shared/MainMenu'
|
||||||
import { useToast } from 'vue-toastification'
|
import { useToast } from 'vue-toastification'
|
||||||
import { watch } from 'vue'
|
import { watch } from 'vue'
|
||||||
import DeployInfo from '@/Shared/DeployInfo'
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
flash: Object,
|
flash: Object,
|
||||||
|
@@ -1,16 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="relative flex flex-col justify-center py-12 min-h-screen bg-blumilk-25 sm:px-6 lg:px-8">
|
<div class="relative flex flex-col justify-center py-12 min-h-screen bg-blumilk-25 sm:px-6 lg:px-8">
|
||||||
<slot />
|
<slot />
|
||||||
<DeployInfo
|
<div class="absolute left-0 bottom-0 min-w-full p-4 text-xs text-gray-500 flex flex-col gap-x-1">
|
||||||
:deploy-information="deployInformation"
|
<p>
|
||||||
class="absolute left-0 bottom-0 justify-end"
|
<strong>Wydanie:</strong> <a
|
||||||
/>
|
v-if="deployInformation.github_url"
|
||||||
|
:href="`${deployInformation.github_url}/commit/${deployInformation.slug_commit}`"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener nofollow noreferrer"
|
||||||
|
:title="`Commit: ${deployInformation.slug_commit}`"
|
||||||
|
>
|
||||||
|
{{ deployInformation.slug_description }} ({{ deployInformation.release_version }})
|
||||||
|
</a>
|
||||||
|
<span
|
||||||
|
v-else
|
||||||
|
:title="`Commit: ${deployInformation.slug_commit}`"
|
||||||
|
>
|
||||||
|
{{ deployInformation.slug_description }}
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<p v-if="deployInformation.release_created_at">
|
||||||
|
<strong>Data wydania:</strong> {{ deployInformation.release_created_at }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import DeployInfo from '@/Shared/DeployInfo'
|
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
deployInformation: Object,
|
deployInformation: Object,
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user