kaze 0.15.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kaze/version.rb +1 -1
- data/stubs/inertia-react-ts/app/javascript/Layouts/AuthenticatedLayout.tsx +5 -5
- data/stubs/inertia-react-ts/app/javascript/Layouts/GuestLayout.tsx +1 -1
- data/stubs/inertia-react-ts/app/javascript/Pages/Dashboard.tsx +1 -3
- data/stubs/inertia-react-ts/app/javascript/Pages/Profile/Edit.tsx +0 -2
- data/stubs/inertia-react-ts/app/javascript/Pages/Profile/Partials/DeleteUserForm.tsx +2 -0
- data/stubs/inertia-react-ts/app/javascript/Pages/Profile/Partials/UpdateProfileInformationForm.tsx +1 -2
- data/stubs/inertia-react-ts/app/javascript/Pages/Welcome.tsx +4 -3
- data/stubs/inertia-react-ts/app/javascript/types/global.d.ts +6 -0
- data/stubs/inertia-react-ts/app/javascript/types/index.d.ts +1 -1
- data/stubs/inertia-vue-ts/app/javascript/Pages/Profile/Partials/DeleteUserForm.vue +1 -0
- data/stubs/inertia-vue-ts/app/javascript/types/index.d.ts +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70692c92f436ae83178d631efa5e3b076b205af9fb38865643da09778b3dc5bd
|
4
|
+
data.tar.gz: 79e38f700d7725df90445290a1299f3a42c7eb09e44ccf225474cb359f268952
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c9070cd7055e4a06f18193ad13f715fef0cf6e002eb60e7424ee7cd2fe2696155d30918d7b686aa1a5f40229d727c9a1ad374a521cd8c3ad074d6d1f82ac6c7
|
7
|
+
data.tar.gz: d23b59dc85ce9d0b974b2e15d2bdd7a2b92892e671c68af00b3d7ca695376985f6a06e8cbd10fdce2ed1acb4bf42e5223d82fb42cd9d558f7f59e9bd4406f4eb
|
data/lib/kaze/version.rb
CHANGED
@@ -3,15 +3,15 @@ import ApplicationLogo from '@/Components/ApplicationLogo'
|
|
3
3
|
import Dropdown from '@/Components/Dropdown'
|
4
4
|
import NavLink from '@/Components/NavLink'
|
5
5
|
import ResponsiveNavLink from '@/Components/ResponsiveNavLink'
|
6
|
-
import { Link } from '@inertiajs/react'
|
7
|
-
import { User } from '@/types'
|
6
|
+
import { Link, usePage } from '@inertiajs/react'
|
8
7
|
import { dashboard_path, logout_path, profile_edit_path } from '@/routes'
|
9
8
|
|
10
|
-
export default function
|
11
|
-
user,
|
9
|
+
export default function AuthenticatedLayout({
|
12
10
|
header,
|
13
11
|
children,
|
14
|
-
}: PropsWithChildren<{
|
12
|
+
}: PropsWithChildren<{ header?: ReactNode }>) {
|
13
|
+
const user = usePage().props.auth.user
|
14
|
+
|
15
15
|
const [showingNavigationDropdown, setShowingNavigationDropdown] = useState(false)
|
16
16
|
|
17
17
|
const { pathname = '' } = typeof window !== 'undefined' ? window.location : {}
|
@@ -2,7 +2,7 @@ import ApplicationLogo from '@/Components/ApplicationLogo'
|
|
2
2
|
import { Link } from '@inertiajs/react'
|
3
3
|
import { PropsWithChildren } from 'react'
|
4
4
|
|
5
|
-
export default function
|
5
|
+
export default function GuestLayout({ children }: PropsWithChildren) {
|
6
6
|
return (
|
7
7
|
<div className="min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 bg-gray-100">
|
8
8
|
<div>
|
@@ -1,11 +1,9 @@
|
|
1
1
|
import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout'
|
2
2
|
import { Head } from '@inertiajs/react'
|
3
|
-
import { PageProps } from '@/types'
|
4
3
|
|
5
|
-
export default function Dashboard(
|
4
|
+
export default function Dashboard() {
|
6
5
|
return (
|
7
6
|
<AuthenticatedLayout
|
8
|
-
user={auth.user}
|
9
7
|
header={<h2 className="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">Dashboard</h2>}
|
10
8
|
>
|
11
9
|
<Head title="Dashboard" />
|
@@ -6,13 +6,11 @@ import { Head } from '@inertiajs/react'
|
|
6
6
|
import { PageProps } from '@/types'
|
7
7
|
|
8
8
|
export default function Edit({
|
9
|
-
auth,
|
10
9
|
mustVerifyEmail,
|
11
10
|
status,
|
12
11
|
}: PageProps<{ mustVerifyEmail: boolean; status?: string }>) {
|
13
12
|
return (
|
14
13
|
<AuthenticatedLayout
|
15
|
-
user={auth.user}
|
16
14
|
header={<h2 className="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">Profile</h2>}
|
17
15
|
>
|
18
16
|
<Head title="Profile" />
|
@@ -19,6 +19,7 @@ export default function DeleteUserForm({ className = '' }: { className?: string
|
|
19
19
|
processing,
|
20
20
|
reset,
|
21
21
|
errors,
|
22
|
+
clearErrors,
|
22
23
|
} = useForm({
|
23
24
|
password: '',
|
24
25
|
})
|
@@ -41,6 +42,7 @@ export default function DeleteUserForm({ className = '' }: { className?: string
|
|
41
42
|
const closeModal = () => {
|
42
43
|
setConfirmingUserDeletion(false)
|
43
44
|
|
45
|
+
clearErrors()
|
44
46
|
reset()
|
45
47
|
}
|
46
48
|
|
data/stubs/inertia-react-ts/app/javascript/Pages/Profile/Partials/UpdateProfileInformationForm.tsx
CHANGED
@@ -5,7 +5,6 @@ import TextInput from '@/Components/TextInput'
|
|
5
5
|
import { Link, useForm, usePage } from '@inertiajs/react'
|
6
6
|
import { Transition } from '@headlessui/react'
|
7
7
|
import { FormEventHandler } from 'react'
|
8
|
-
import { PageProps } from '@/types'
|
9
8
|
import { profile_update_path, verification_send_path } from '@/routes'
|
10
9
|
|
11
10
|
export default function UpdateProfileInformation({
|
@@ -17,7 +16,7 @@ export default function UpdateProfileInformation({
|
|
17
16
|
status?: string
|
18
17
|
className?: string
|
19
18
|
}) {
|
20
|
-
const user = usePage
|
19
|
+
const user = usePage().props.auth.user
|
21
20
|
|
22
21
|
const { data, setData, patch, errors, processing, recentlySuccessful } = useForm({
|
23
22
|
name: user.name,
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import { dashboard_path, login_path, register_path } from '@/routes'
|
2
2
|
import { PageProps } from '@/types'
|
3
|
-
import { Head, Link } from '@inertiajs/react'
|
3
|
+
import { Head, Link, usePage } from '@inertiajs/react'
|
4
4
|
|
5
5
|
export default function Welcome({
|
6
|
-
auth,
|
7
6
|
railsVersion,
|
8
7
|
rubyVersion,
|
9
8
|
}: PageProps<{ railsVersion: string; rubyVersion: string }>) {
|
9
|
+
const user = usePage().props.auth.user
|
10
|
+
|
10
11
|
return (
|
11
12
|
<>
|
12
13
|
<Head title="Welcome" />
|
@@ -21,7 +22,7 @@ export default function Welcome({
|
|
21
22
|
>
|
22
23
|
<header className="absolute top-0 right-0 grid grid-cols-2 items-center gap-2 py-10 lg:grid-cols-3">
|
23
24
|
<div className="-mx-3 flex flex-1 justify-end">
|
24
|
-
{
|
25
|
+
{user ? (
|
25
26
|
<Link
|
26
27
|
href={dashboard_path()}
|
27
28
|
className="rounded-md px-3 py-2 text-black ring-1 ring-transparent transition hover:text-black/70 focus:outline-none focus-visible:ring-[#FF2D20] dark:text-white dark:hover:text-white/80 dark:focus-visible:ring-white"
|
@@ -1,7 +1,13 @@
|
|
1
|
+
import { PageProps as InertiaPageProps } from '@inertiajs/core';
|
1
2
|
import { AxiosInstance } from 'axios'
|
3
|
+
import { PageProps as AppPageProps } from './';
|
2
4
|
|
3
5
|
declare global {
|
4
6
|
interface Window {
|
5
7
|
axios: AxiosInstance
|
6
8
|
}
|
7
9
|
}
|
10
|
+
|
11
|
+
declare module '@inertiajs/core' {
|
12
|
+
interface PageProps extends InertiaPageProps, AppPageProps {}
|
13
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kaze
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cuong Giang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -272,7 +272,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
272
272
|
- !ruby/object:Gem::Version
|
273
273
|
version: '0'
|
274
274
|
requirements: []
|
275
|
-
rubygems_version: 3.5.
|
275
|
+
rubygems_version: 3.5.11
|
276
276
|
signing_key:
|
277
277
|
specification_version: 4
|
278
278
|
summary: Opinionated minimal Rails authentication scaffolding with Hotwire, React,
|