Skip to content

Commit cc95ba6

Browse files
committed
docs: #85 add legal docs
1 parent 1b2807b commit cc95ba6

File tree

10 files changed

+722
-55
lines changed

10 files changed

+722
-55
lines changed

Diff for: app/Http/Controllers/RefundPolicyController.php

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace App\Http\Controllers;
4+
5+
use Illuminate\Http\Request;
6+
use Illuminate\Routing\Controller;
7+
use Illuminate\Support\Str;
8+
use Inertia\Inertia;
9+
use Laravel\Jetstream\Jetstream;
10+
11+
class RefundPolicyController extends Controller
12+
{
13+
/**
14+
* Show the privacy policy for the application.
15+
*
16+
* @return \Inertia\Response
17+
*/
18+
public function show(Request $request)
19+
{
20+
$policyFile = Jetstream::localizedMarkdownPath('refund.md');
21+
22+
return Inertia::render('RefundPolicy', [
23+
'policy' => Str::markdown(file_get_contents($policyFile)),
24+
]);
25+
}
26+
}

Diff for: resources/js/Components/AuthenticationCard.vue

+17-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1+
<script setup>
2+
import LegalNotice from "@/Components/LegalNotice.vue";
3+
</script>
4+
15
<template>
2-
<div class="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 bg-gray-100 dark:bg-gray-900">
6+
<div
7+
class="min-h-screen flex flex-col items-center justify-around pt-6 sm:pt-0 bg-gray-100 dark:bg-gray-900"
8+
>
39
<div>
4-
<slot name="logo" />
5-
</div>
10+
<div>
11+
<slot name="logo" />
12+
</div>
613

7-
<div class="w-full sm:max-w-md mt-6 px-6 py-4 bg-white dark:bg-gray-800 shadow-md overflow-hidden sm:rounded-lg">
8-
<slot />
14+
<div
15+
class="w-full sm:max-w-md mt-6 px-6 py-4 bg-white dark:bg-gray-800 shadow-md overflow-hidden sm:rounded-lg"
16+
>
17+
<slot />
18+
</div>
919
</div>
20+
21+
<LegalNotice />
1022
</div>
1123
</template>

Diff for: resources/js/Components/LegalNotice.vue

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<template>
2+
<div class="flex flex-col items-center">
3+
<a
4+
href="https://x.com/b_shulha"
5+
class="flex gap-2 text-sm"
6+
target="_blank"
7+
>
8+
<svg
9+
class="w-6 h-6 text-gray-800 dark:text-white"
10+
aria-hidden="true"
11+
xmlns="http://www.w3.org/2000/svg"
12+
width="24"
13+
height="24"
14+
fill="currentColor"
15+
viewBox="0 0 24 24"
16+
>
17+
<path
18+
fill-rule="evenodd"
19+
d="M22 5.892a8.178 8.178 0 0 1-2.355.635 4.074 4.074 0 0 0 1.8-2.235 8.343 8.343 0 0 1-2.605.981A4.13 4.13 0 0 0 15.85 4a4.068 4.068 0 0 0-4.1 4.038c0 .31.035.618.105.919A11.705 11.705 0 0 1 3.4 4.734a4.006 4.006 0 0 0 1.268 5.392 4.165 4.165 0 0 1-1.859-.5v.05A4.057 4.057 0 0 0 6.1 13.635a4.192 4.192 0 0 1-1.856.07 4.108 4.108 0 0 0 3.831 2.807A8.36 8.36 0 0 1 2 18.184 11.732 11.732 0 0 0 8.291 20 11.502 11.502 0 0 0 19.964 8.5c0-.177 0-.349-.012-.523A8.143 8.143 0 0 0 22 5.892Z"
20+
clip-rule="evenodd"
21+
/>
22+
</svg>
23+
24+
<span class="underline hover:text-blue-500">@b_shulha</span>
25+
</a>
26+
27+
<div
28+
class="w-full flex flex-col gap-4 items-center px-6 py-4 text-xs text-gray-500"
29+
>
30+
<div>
31+
<a
32+
href="https://ptah.sh/"
33+
class="underline hover:text-blue-500"
34+
target="_blank"
35+
>Ptah.sh</a
36+
>
37+
&copy; {{ new Date().getFullYear() }}
38+
</div>
39+
<div class="flex gap-4">
40+
<div>
41+
<div>Operated by Bohdan Shulha, Private Entrepreneur</div>
42+
<div>00-833, Warsaw, ul. Sienna 75, lok. 8.51</div>
43+
</div>
44+
<div>
45+
<div>Tax Identification Number (NIP): 5223265838</div>
46+
<div>
47+
Contact Email:
48+
<a
49+
href="mailto:contact@ptah.sh"
50+
class="underline hover:text-blue-500"
51+
>contact@ptah.sh</a
52+
>
53+
</div>
54+
</div>
55+
</div>
56+
</div>
57+
</div>
58+
</template>
59+
<script setup lang="ts"></script>

Diff for: resources/js/Pages/Auth/Login.vue

+44-18
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
<script setup>
2-
import { Head, Link, useForm } from '@inertiajs/vue3';
3-
import AuthenticationCard from '@/Components/AuthenticationCard.vue';
4-
import AuthenticationCardLogo from '@/Components/AuthenticationCardLogo.vue';
5-
import Checkbox from '@/Components/Checkbox.vue';
6-
import InputError from '@/Components/InputError.vue';
7-
import InputLabel from '@/Components/InputLabel.vue';
8-
import PrimaryButton from '@/Components/PrimaryButton.vue';
9-
import TextInput from '@/Components/TextInput.vue';
2+
import { Head, Link, useForm } from "@inertiajs/vue3";
3+
import AuthenticationCard from "@/Components/AuthenticationCard.vue";
4+
import AuthenticationCardLogo from "@/Components/AuthenticationCardLogo.vue";
5+
import Checkbox from "@/Components/Checkbox.vue";
6+
import InputError from "@/Components/InputError.vue";
7+
import InputLabel from "@/Components/InputLabel.vue";
8+
import PrimaryButton from "@/Components/PrimaryButton.vue";
9+
import TextInput from "@/Components/TextInput.vue";
10+
import SecondaryButton from "@/Components/SecondaryButton.vue";
1011
1112
defineProps({
1213
canResetPassword: Boolean,
1314
status: String,
1415
});
1516
1617
const form = useForm({
17-
email: '',
18-
password: '',
18+
email: "",
19+
password: "",
1920
remember: false,
2021
});
2122
2223
const submit = () => {
23-
form.transform(data => ({
24+
form.transform((data) => ({
2425
...data,
25-
remember: form.remember ? 'on' : '',
26-
})).post(route('login'), {
27-
onFinish: () => form.reset('password'),
26+
remember: form.remember ? "on" : "",
27+
})).post(route("login"), {
28+
onFinish: () => form.reset("password"),
2829
});
2930
};
3031
</script>
@@ -37,7 +38,10 @@ const submit = () => {
3738
<AuthenticationCardLogo />
3839
</template>
3940

40-
<div v-if="status" class="mb-4 font-medium text-sm text-green-600 dark:text-green-400">
41+
<div
42+
v-if="status"
43+
class="mb-4 font-medium text-sm text-green-600 dark:text-green-400"
44+
>
4145
{{ status }}
4246
</div>
4347

@@ -72,19 +76,41 @@ const submit = () => {
7276
<div class="block mt-4">
7377
<label class="flex items-center">
7478
<Checkbox v-model:checked="form.remember" name="remember" />
75-
<span class="ms-2 text-sm text-gray-600 dark:text-gray-400">Remember me</span>
79+
<span class="ms-2 text-sm text-gray-600 dark:text-gray-400"
80+
>Remember me</span
81+
>
7682
</label>
7783
</div>
7884

7985
<div class="flex items-center justify-end mt-4">
80-
<Link v-if="canResetPassword" :href="route('password.request')" class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800">
86+
<Link
87+
v-if="canResetPassword"
88+
:href="route('password.request')"
89+
class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800"
90+
>
8191
Forgot your password?
8292
</Link>
8393

84-
<PrimaryButton class="ms-4" :class="{ 'opacity-25': form.processing }" :disabled="form.processing">
94+
<PrimaryButton
95+
class="ms-4"
96+
:class="{ 'opacity-25': form.processing }"
97+
:disabled="form.processing"
98+
>
8599
Log in
86100
</PrimaryButton>
87101
</div>
88102
</form>
103+
104+
<hr class="m-8" />
105+
<div class="flex gap-4 mb-4 justify-center">
106+
<span class="text-sm">New user?</span>
107+
108+
<Link
109+
v-if="canResetPassword"
110+
:href="route('register')"
111+
class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800"
112+
>Create an account
113+
</Link>
114+
</div>
89115
</AuthenticationCard>
90116
</template>

Diff for: resources/js/Pages/Auth/Register.vue

+60-21
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
<script setup>
2-
import { Head, Link, useForm } from '@inertiajs/vue3';
3-
import AuthenticationCard from '@/Components/AuthenticationCard.vue';
4-
import AuthenticationCardLogo from '@/Components/AuthenticationCardLogo.vue';
5-
import Checkbox from '@/Components/Checkbox.vue';
6-
import InputError from '@/Components/InputError.vue';
7-
import InputLabel from '@/Components/InputLabel.vue';
8-
import PrimaryButton from '@/Components/PrimaryButton.vue';
9-
import TextInput from '@/Components/TextInput.vue';
2+
import { Head, Link, useForm } from "@inertiajs/vue3";
3+
import AuthenticationCard from "@/Components/AuthenticationCard.vue";
4+
import AuthenticationCardLogo from "@/Components/AuthenticationCardLogo.vue";
5+
import Checkbox from "@/Components/Checkbox.vue";
6+
import InputError from "@/Components/InputError.vue";
7+
import InputLabel from "@/Components/InputLabel.vue";
8+
import PrimaryButton from "@/Components/PrimaryButton.vue";
9+
import TextInput from "@/Components/TextInput.vue";
1010
1111
const form = useForm({
12-
name: '',
13-
email: '',
14-
password: '',
15-
password_confirmation: '',
12+
name: "",
13+
email: "",
14+
password: "",
15+
password_confirmation: "",
1616
terms: false,
1717
});
1818
1919
const submit = () => {
20-
form.post(route('register'), {
21-
onFinish: () => form.reset('password', 'password_confirmation'),
20+
form.post(route("register"), {
21+
onFinish: () => form.reset("password", "password_confirmation"),
2222
});
2323
};
2424
</script>
@@ -73,7 +73,10 @@ const submit = () => {
7373
</div>
7474

7575
<div class="mt-4">
76-
<InputLabel for="password_confirmation" value="Confirm Password" />
76+
<InputLabel
77+
for="password_confirmation"
78+
value="Confirm Password"
79+
/>
7780
<TextInput
7881
id="password_confirmation"
7982
v-model="form.password_confirmation"
@@ -82,28 +85,64 @@ const submit = () => {
8285
required
8386
autocomplete="new-password"
8487
/>
85-
<InputError class="mt-2" :message="form.errors.password_confirmation" />
88+
<InputError
89+
class="mt-2"
90+
:message="form.errors.password_confirmation"
91+
/>
8692
</div>
8793

88-
<div v-if="$page.props.jetstream.hasTermsAndPrivacyPolicyFeature" class="mt-4">
94+
<div
95+
v-if="$page.props.jetstream.hasTermsAndPrivacyPolicyFeature"
96+
class="mt-4"
97+
>
8998
<InputLabel for="terms">
9099
<div class="flex items-center">
91-
<Checkbox id="terms" v-model:checked="form.terms" name="terms" required />
100+
<Checkbox
101+
id="terms"
102+
v-model:checked="form.terms"
103+
name="terms"
104+
required
105+
/>
92106

93107
<div class="ms-2">
94-
I agree to the <a target="_blank" :href="route('terms.show')" class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800">Terms of Service</a> and <a target="_blank" :href="route('policy.show')" class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800">Privacy Policy</a>
108+
I agree to the
109+
<a
110+
target="_blank"
111+
:href="route('terms.show')"
112+
class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800"
113+
>Terms of Service</a
114+
>,
115+
<a
116+
target="_blank"
117+
:href="route('policy.show')"
118+
class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800"
119+
>Privacy Policy</a
120+
>, and
121+
<a
122+
target="_blank"
123+
:href="route('refund-policy.show')"
124+
class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800"
125+
>Refund Policy</a
126+
>
95127
</div>
96128
</div>
97129
<InputError class="mt-2" :message="form.errors.terms" />
98130
</InputLabel>
99131
</div>
100132

101133
<div class="flex items-center justify-end mt-4">
102-
<Link :href="route('login')" class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800">
134+
<Link
135+
:href="route('login')"
136+
class="underline text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:focus:ring-offset-gray-800"
137+
>
103138
Already registered?
104139
</Link>
105140

106-
<PrimaryButton class="ms-4" :class="{ 'opacity-25': form.processing }" :disabled="form.processing">
141+
<PrimaryButton
142+
class="ms-4"
143+
:class="{ 'opacity-25': form.processing }"
144+
:disabled="form.processing"
145+
>
107146
Register
108147
</PrimaryButton>
109148
</div>

Diff for: resources/js/Pages/RefundPolicy.vue

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<script setup>
2+
import { Head } from "@inertiajs/vue3";
3+
import AuthenticationCardLogo from "@/Components/AuthenticationCardLogo.vue";
4+
5+
defineProps({
6+
policy: String,
7+
});
8+
</script>
9+
10+
<template>
11+
<Head title="Refund Policy" />
12+
13+
<div class="font-sans text-gray-900 dark:text-gray-100 antialiased">
14+
<div class="pt-4 bg-gray-100 dark:bg-gray-900">
15+
<div class="min-h-screen flex flex-col items-center pt-6 sm:pt-0">
16+
<div>
17+
<AuthenticationCardLogo />
18+
</div>
19+
20+
<div
21+
class="w-full sm:max-w-2xl mt-6 p-6 bg-white dark:bg-gray-800 shadow-md overflow-hidden sm:rounded-lg prose dark:prose-invert"
22+
v-html="policy"
23+
/>
24+
</div>
25+
</div>
26+
</div>
27+
</template>

0 commit comments

Comments
 (0)