Commit 279a3879 by Jonathan Reinink

Replace provide/inject with new $page property

1 parent a4c502e6
...@@ -427,12 +427,12 @@ ...@@ -427,12 +427,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/inertiajs/inertia-laravel.git", "url": "https://github.com/inertiajs/inertia-laravel.git",
"reference": "110ea11509d90e9c4e0005e3b2636fe7d81f786a" "reference": "13bc1e0802a0d6d590fc3f3a0e865817a8f70f02"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/inertiajs/inertia-laravel/zipball/110ea11509d90e9c4e0005e3b2636fe7d81f786a", "url": "https://api.github.com/repos/inertiajs/inertia-laravel/zipball/13bc1e0802a0d6d590fc3f3a0e865817a8f70f02",
"reference": "110ea11509d90e9c4e0005e3b2636fe7d81f786a", "reference": "13bc1e0802a0d6d590fc3f3a0e865817a8f70f02",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -471,7 +471,7 @@ ...@@ -471,7 +471,7 @@
"inertia", "inertia",
"laravel" "laravel"
], ],
"time": "2019-05-08T13:48:08+00:00" "time": "2019-05-14T09:33:16+00:00"
}, },
{ {
"name": "jakub-onderka/php-console-color", "name": "jakub-onderka/php-console-color",
...@@ -563,16 +563,16 @@ ...@@ -563,16 +563,16 @@
}, },
{ {
"name": "laravel/framework", "name": "laravel/framework",
"version": "v5.8.16", "version": "v5.8.17",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/framework.git", "url": "https://github.com/laravel/framework.git",
"reference": "83d57f9f9162ab476c43b9ec00d463ff12c578fd" "reference": "33c04dd2a431adeeb49926a4f2b20590cc033ca2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/83d57f9f9162ab476c43b9ec00d463ff12c578fd", "url": "https://api.github.com/repos/laravel/framework/zipball/33c04dd2a431adeeb49926a4f2b20590cc033ca2",
"reference": "83d57f9f9162ab476c43b9ec00d463ff12c578fd", "reference": "33c04dd2a431adeeb49926a4f2b20590cc033ca2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -706,7 +706,7 @@ ...@@ -706,7 +706,7 @@
"framework", "framework",
"laravel" "laravel"
], ],
"time": "2019-05-07T14:37:11+00:00" "time": "2019-05-14T16:02:41+00:00"
}, },
{ {
"name": "laravel/tinker", "name": "laravel/tinker",
...@@ -1718,16 +1718,16 @@ ...@@ -1718,16 +1718,16 @@
}, },
{ {
"name": "symfony/contracts", "name": "symfony/contracts",
"version": "v1.0.2", "version": "v1.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/contracts.git", "url": "https://github.com/symfony/contracts.git",
"reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf" "reference": "d3636025e8253c6144358ec0a62773cae588395b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf", "url": "https://api.github.com/repos/symfony/contracts/zipball/d3636025e8253c6144358ec0a62773cae588395b",
"reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf", "reference": "d3636025e8253c6144358ec0a62773cae588395b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -1735,19 +1735,22 @@ ...@@ -1735,19 +1735,22 @@
}, },
"require-dev": { "require-dev": {
"psr/cache": "^1.0", "psr/cache": "^1.0",
"psr/container": "^1.0" "psr/container": "^1.0",
"symfony/polyfill-intl-idn": "^1.10"
}, },
"suggest": { "suggest": {
"psr/cache": "When using the Cache contracts", "psr/cache": "When using the Cache contracts",
"psr/container": "When using the Service contracts", "psr/container": "When using the Service contracts",
"symfony/cache-contracts-implementation": "", "symfony/cache-contracts-implementation": "",
"symfony/event-dispatcher-implementation": "",
"symfony/http-client-contracts-implementation": "",
"symfony/service-contracts-implementation": "", "symfony/service-contracts-implementation": "",
"symfony/translation-contracts-implementation": "" "symfony/translation-contracts-implementation": ""
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.0-dev" "dev-master": "1.1-dev"
} }
}, },
"autoload": { "autoload": {
...@@ -1782,7 +1785,7 @@ ...@@ -1782,7 +1785,7 @@
"interoperability", "interoperability",
"standards" "standards"
], ],
"time": "2018-12-05T08:06:11+00:00" "time": "2019-04-27T14:29:50+00:00"
}, },
{ {
"name": "symfony/css-selector", "name": "symfony/css-selector",
...@@ -4106,16 +4109,16 @@ ...@@ -4106,16 +4109,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "7.5.9", "version": "7.5.11",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "134669cf0eeac3f79bc7f0c793efbc158bffc160" "reference": "64cb33f5b520da490a7b13149d39b43cf3c890c6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/134669cf0eeac3f79bc7f0c793efbc158bffc160", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/64cb33f5b520da490a7b13149d39b43cf3c890c6",
"reference": "134669cf0eeac3f79bc7f0c793efbc158bffc160", "reference": "64cb33f5b520da490a7b13149d39b43cf3c890c6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -4186,7 +4189,7 @@ ...@@ -4186,7 +4189,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2019-04-19T15:50:46+00:00" "time": "2019-05-14T04:53:02+00:00"
}, },
{ {
"name": "sebastian/code-unit-reverse-lookup", "name": "sebastian/code-unit-reverse-lookup",
......
...@@ -36,7 +36,6 @@ export default { ...@@ -36,7 +36,6 @@ export default {
props: { props: {
errors: Object, errors: Object,
}, },
inject: ['page'],
data() { data() {
return { return {
sending: false, sending: false,
...@@ -48,7 +47,7 @@ export default { ...@@ -48,7 +47,7 @@ export default {
} }
}, },
mounted() { mounted() {
document.title = `Login | ${this.page.props.app.name}` document.title = `Login | ${this.$page.app.name}`
}, },
methods: { methods: {
submit() { submit() {
......
...@@ -16,17 +16,17 @@ ...@@ -16,17 +16,17 @@
</dropdown> </dropdown>
</div> </div>
<div class="bg-white border-b w-full p-4 md:py-0 md:px-12 text-sm md:text-base flex justify-between items-center"> <div class="bg-white border-b w-full p-4 md:py-0 md:px-12 text-sm md:text-base flex justify-between items-center">
<div class="mt-1 mr-4">{{ page.props.auth.user.account.name }}</div> <div class="mt-1 mr-4">{{ $page.auth.user.account.name }}</div>
<dropdown class="mt-1" placement="bottom-end"> <dropdown class="mt-1" placement="bottom-end">
<div class="flex items-center cursor-pointer select-none group"> <div class="flex items-center cursor-pointer select-none group">
<div class="text-grey-darkest group-hover:text-indigo-dark focus:text-indigo-dark mr-1 whitespace-no-wrap"> <div class="text-grey-darkest group-hover:text-indigo-dark focus:text-indigo-dark mr-1 whitespace-no-wrap">
<span>{{ page.props.auth.user.first_name }}</span> <span>{{ $page.auth.user.first_name }}</span>
<span class="hidden md:inline">{{ page.props.auth.user.last_name }}</span> <span class="hidden md:inline">{{ $page.auth.user.last_name }}</span>
</div> </div>
<icon class="w-5 h-5 group-hover:fill-indigo-dark fill-grey-darkest focus:fill-indigo-dark" name="cheveron-down" /> <icon class="w-5 h-5 group-hover:fill-indigo-dark fill-grey-darkest focus:fill-indigo-dark" name="cheveron-down" />
</div> </div>
<div slot="dropdown" class="mt-2 py-2 shadow-lg bg-white rounded text-sm"> <div slot="dropdown" class="mt-2 py-2 shadow-lg bg-white rounded text-sm">
<inertia-link class="block px-6 py-2 hover:bg-indigo hover:text-white" :href="route('users.edit', page.props.auth.user.id)">My Profile</inertia-link> <inertia-link class="block px-6 py-2 hover:bg-indigo hover:text-white" :href="route('users.edit', $page.auth.user.id)">My Profile</inertia-link>
<inertia-link class="block px-6 py-2 hover:bg-indigo hover:text-white" :href="route('users')">Manage Users</inertia-link> <inertia-link class="block px-6 py-2 hover:bg-indigo hover:text-white" :href="route('users')">Manage Users</inertia-link>
<inertia-link class="block px-6 py-2 hover:bg-indigo hover:text-white" :href="route('logout')" method="post">Logout</inertia-link> <inertia-link class="block px-6 py-2 hover:bg-indigo hover:text-white" :href="route('logout')" method="post">Logout</inertia-link>
</div> </div>
...@@ -59,7 +59,6 @@ export default { ...@@ -59,7 +59,6 @@ export default {
Logo, Logo,
MainMenu, MainMenu,
}, },
inject: ['page'],
props: { props: {
title: String, title: String,
}, },
...@@ -79,7 +78,7 @@ export default { ...@@ -79,7 +78,7 @@ export default {
}, },
methods: { methods: {
updatePageTitle(title) { updatePageTitle(title) {
document.title = title ? `${title} | ${this.page.props.app.name}` : this.page.props.app.name document.title = title ? `${title} | ${this.$page.app.name}` : this.$page.app.name
}, },
hideDropdownMenus() { hideDropdownMenus() {
this.showUserMenu = false this.showUserMenu = false
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!