Skip to content

Commit

Permalink
NEW: add configurable page title to the package
Browse files Browse the repository at this point in the history
  • Loading branch information
javoscript committed Oct 3, 2022
1 parent fd6a57e commit beacc04
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions config/nova-calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
* Custom URI for Nova Calendar
*/
'uri' => 'wdelfuego/nova-calendar',
'title' => 'Nova Calendar',
];
12 changes: 10 additions & 2 deletions resources/js/pages/Tool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<template>
<div>
<Head title="Nova Calendar" />
<Head :title="pageTitle" />

<div id="nc-control">

Expand Down Expand Up @@ -180,7 +180,15 @@ export default {
return this.styles.default;
}
}
},
props: {
pageTitle: {
type: String,
required: false,
default: 'Nova Calendar',
},
},
data () {
Expand Down
4 changes: 3 additions & 1 deletion routes/inertia.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@
*/

Route::get('/', function (NovaRequest $request) {
return inertia('NovaCalendar');
return inertia('NovaCalendar', [
'pageTitle' => config('nova-calendar.title', 'Nova Calendar'),
]);
});

0 comments on commit beacc04

Please sign in to comment.