2 Commits

Author SHA1 Message Date
309c68d3fd - updated style 2022-07-05 08:47:38 +02:00
4516df29d9 - release note added 2022-07-05 08:47:32 +02:00
7 changed files with 61 additions and 91 deletions

View File

@@ -21,9 +21,3 @@ SESSION_DRIVER=array
SESSION_LIFETIME=120
FILESYSTEM_DISK=local
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/

View File

@@ -6,6 +6,7 @@ namespace Toby\Infrastructure\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Carbon;
use Inertia\Middleware;
use Toby\Domain\VacationRequestStatesRetriever;
use Toby\Eloquent\Helpers\YearPeriodRetriever;
@@ -73,14 +74,16 @@ class HandleInertiaRequests extends Middleware
: 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"),
"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"),
"github_url" => config("heroku.github_url", ""),
"github_url" => preg_replace("/\/$/i", "", config("heroku.github_url", "")),
];
}
}

View File

@@ -7,5 +7,5 @@ return [
"slug_description" => env("HEROKU_SLUG_DESCRIPTION"),
"release_created_at" => env("HEROKU_RELEASE_CREATED_AT"),
"slug_commit" => env("HEROKU_SLUG_COMMIT"),
"github_url" => env("GITHUB_REPO_URL"),
"github_url" => env("GITHUB_REPO_URL")
];

View File

@@ -32,10 +32,5 @@
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>
<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>
</phpunit>

View File

@@ -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>

View File

@@ -1,5 +1,5 @@
<template>
<div class="relative min-h-screen">
<div class="min-h-full">
<MainMenu
:auth="auth"
:years="years"
@@ -9,12 +9,31 @@
<div class="lg:px-4">
<slot />
</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>
<DeployInfo
:deploy-information="deployInformation"
class="absolute bottom-0 justify-end"
/>
</div>
</template>
@@ -22,7 +41,6 @@
import MainMenu from '@/Shared/MainMenu'
import { useToast } from 'vue-toastification'
import { watch } from 'vue'
import DeployInfo from '@/Shared/DeployInfo'
const props = defineProps({
flash: Object,

View File

@@ -1,16 +1,31 @@
<template>
<div class="relative flex flex-col justify-center py-12 min-h-screen bg-blumilk-25 sm:px-6 lg:px-8">
<slot />
<DeployInfo
:deploy-information="deployInformation"
class="absolute left-0 bottom-0 justify-end"
/>
<div class="absolute left-0 bottom-0 min-w-full p-4 text-xs text-gray-500 flex flex-col 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">
<strong>Data wydania:</strong> {{ deployInformation.release_created_at }}
</p>
</div>
</div>
</template>
<script setup>
import DeployInfo from '@/Shared/DeployInfo'
defineProps({
deployInformation: Object,
})