diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d89ff313..0a2802948 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 4.0.0 - 2018-01-23 + +- Brought back the `layout` property in pages that was removed in 3.0. By default it's set to `default` (`~/layouts/default.vue`). + ## 3.0.1 - 2018-01-22 - Removed middleware from routes, since they don't work when you press the back button. Now you have to use the `middleware` property in pages. diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index fd610ef85..869a6b309 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -5,7 +5,6 @@ import i18n from '~/plugins/i18n' import App from '~/components/App' import '~/plugins' -import '~/layouts' import '~/components' Vue.config.productionTip = false diff --git a/resources/assets/js/components/App.vue b/resources/assets/js/components/App.vue index ecabcc2e9..3cbdc9780 100644 --- a/resources/assets/js/components/App.vue +++ b/resources/assets/js/components/App.vue @@ -3,7 +3,7 @@ - + @@ -11,6 +11,18 @@ diff --git a/resources/assets/js/components/Child.vue b/resources/assets/js/components/Child.vue new file mode 100644 index 000000000..e00519141 --- /dev/null +++ b/resources/assets/js/components/Child.vue @@ -0,0 +1,13 @@ + + + diff --git a/resources/assets/js/components/index.js b/resources/assets/js/components/index.js index b056b5d51..1ff57a5d6 100644 --- a/resources/assets/js/components/index.js +++ b/resources/assets/js/components/index.js @@ -1,5 +1,6 @@ import Vue from 'vue' import Card from './Card' +import Child from './Child' import Button from './Button' import Checkbox from './Checkbox' import { HasError, AlertError, AlertSuccess } from 'vform' @@ -7,6 +8,7 @@ import { HasError, AlertError, AlertSuccess } from 'vform' // Components that are registered globaly. [ Card, + Child, Button, Checkbox, HasError, diff --git a/resources/assets/js/layouts/basic.vue b/resources/assets/js/layouts/basic.vue new file mode 100644 index 000000000..8eb2298d3 --- /dev/null +++ b/resources/assets/js/layouts/basic.vue @@ -0,0 +1,31 @@ + + + + + + diff --git a/resources/assets/js/layouts/Main.vue b/resources/assets/js/layouts/default.vue similarity index 94% rename from resources/assets/js/layouts/Main.vue rename to resources/assets/js/layouts/default.vue index 3f446f8c1..04b58a2c8 100644 --- a/resources/assets/js/layouts/Main.vue +++ b/resources/assets/js/layouts/default.vue @@ -3,7 +3,7 @@
- +
diff --git a/resources/assets/js/layouts/index.js b/resources/assets/js/layouts/index.js deleted file mode 100644 index 7ee6a25d0..000000000 --- a/resources/assets/js/layouts/index.js +++ /dev/null @@ -1,16 +0,0 @@ -import Vue from 'vue' - -// Load layout components dynamically. -const requireContext = require.context('./', false, /.*\.vue$/) - -requireContext.keys().forEach(file => { - let Component = requireContext(file) - - if (Component.default) { - Component = Component.default - } - - if (Component.name !== undefined) { - Vue.component(Component.name, Component) - } -}) diff --git a/resources/assets/js/pages/auth/login.vue b/resources/assets/js/pages/auth/login.vue index 1dace553e..8240ad917 100644 --- a/resources/assets/js/pages/auth/login.vue +++ b/resources/assets/js/pages/auth/login.vue @@ -1,59 +1,57 @@