From cbd2b8e0e91b9a6d4807921c71e4aafa2acd194e Mon Sep 17 00:00:00 2001 From: Dennis Date: Tue, 10 Aug 2021 13:51:37 +0200 Subject: [PATCH] Wip on terms & privacy page configurator --- .../Controllers/Admin/SettingController.php | 38 ++++ app/Http/Controllers/PageController.php | 13 ++ app/Http/Middleware/HandleInertiaRequests.php | 3 +- package-lock.json | 93 +++++++++ package.json | 3 + public/js/app.js | 18 +- resources/js/Pages/Admin/Tabs.vue | 17 +- resources/js/Pages/Admin/Terms.vue | 179 ++++++++++++++++++ resources/js/Pages/Auth/Login.vue | 6 + resources/js/Pages/Pages/Terms.vue | 45 +++++ resources/js/components/Container.vue | 1 + resources/js/components/TextDivider.vue | 13 +- resources/js/components/forms/FormCustom.vue | 72 +++++++ routes/admin.php | 10 +- routes/web.php | 2 + storage/templates/terms-of-service.md | 43 +++++ 16 files changed, 545 insertions(+), 11 deletions(-) create mode 100644 resources/js/Pages/Admin/Terms.vue create mode 100644 resources/js/Pages/Pages/Terms.vue create mode 100644 resources/js/components/forms/FormCustom.vue create mode 100644 storage/templates/terms-of-service.md diff --git a/app/Http/Controllers/Admin/SettingController.php b/app/Http/Controllers/Admin/SettingController.php index 21ac8c4..a74d3cb 100644 --- a/app/Http/Controllers/Admin/SettingController.php +++ b/app/Http/Controllers/Admin/SettingController.php @@ -3,6 +3,7 @@ namespace App\Http\Controllers\Admin; use App\Models\Package; +use Illuminate\Http\Request; use Illuminate\Support\Str; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Storage; @@ -87,4 +88,41 @@ class SettingController extends Controller return redirect()->route('admin.settings')->with('success', __('Settings have been updated')); } + + public function terms() + { + return inertia('Admin/Terms', [ + 'settings' => [ + 'name' => setting('name'), + 'terms_required' => setting('accept_terms_required'), + 'terms' => setting('terms'), + 'privacy' => setting('privacy') + ] + ]); + } + + public function updateTerms(Request $request) + { + setting(['accept_terms_required' => $request->input('terms_required'),]); + setting(['terms' => $request->input('terms'),]); + setting(['privacy' => $request->input('privacy'),]); + + return redirect()->route('admin.settings.terms')->with('success', __('Terms have been updated')); + } + + public function termsTemplate(Request $request) + { + $template = file_get_contents(storage_path('templates/terms-of-service.md')); + $template = str_replace([ + '{NAME}', + '{WEBSITE}', + '{DATE}' + ], [ + setting('name'), + config('app.url'), + date('Y-m-d') + ], $template); + + return ['content' => $template]; + } } diff --git a/app/Http/Controllers/PageController.php b/app/Http/Controllers/PageController.php index be3725a..bb5bfaf 100644 --- a/app/Http/Controllers/PageController.php +++ b/app/Http/Controllers/PageController.php @@ -2,10 +2,23 @@ namespace App\Http\Controllers; +use Illuminate\Support\Str; + class PageController extends Controller { public function installationIncomplete() { return inertia('Core/InstallationIncomplete'); } + + public function show($slug) + { + if ($slug === 'terms-of-service' && setting('terms')) { + return inertia('Pages/Terms', [ + 'content' => Str::markdown(setting('terms')) + ]); + } + + abort(404); + } } diff --git a/app/Http/Middleware/HandleInertiaRequests.php b/app/Http/Middleware/HandleInertiaRequests.php index 4bc531f..521517e 100644 --- a/app/Http/Middleware/HandleInertiaRequests.php +++ b/app/Http/Middleware/HandleInertiaRequests.php @@ -87,7 +87,8 @@ class HandleInertiaRequests extends Middleware 'documentation' => setting('documentation', false), 'logo' => setting('logo'), 'allow_registration' => setting('allow_registration'), - 'billing' => config('cashier.key') && config('cashier.secret') + 'billing' => config('cashier.key') && config('cashier.secret'), + 'has_terms' => setting('terms') ? true : false ]; }, 'flash' => function () { diff --git a/package-lock.json b/package-lock.json index d96b442..319ca15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,9 @@ "requires": true, "packages": { "": { + "dependencies": { + "vue-simplemde": "^2.0.0" + }, "devDependencies": { "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@inertiajs/inertia": "^0.10.0", @@ -3090,6 +3093,19 @@ "node": ">=6" } }, + "node_modules/codemirror": { + "version": "5.62.2", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.62.2.tgz", + "integrity": "sha512-tVFMUa4J3Q8JUd1KL9yQzQB0/BJt7ZYZujZmTPgo/54Lpuq3ez4C8x/ATUY/wv7b7X3AUq8o3Xd+2C5ZrCGWHw==" + }, + "node_modules/codemirror-spell-checker": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/codemirror-spell-checker/-/codemirror-spell-checker-1.1.2.tgz", + "integrity": "sha1-HGYPkIlIPMtRE7m6nKGcP0mTNx4=", + "dependencies": { + "typo-js": "*" + } + }, "node_modules/collect.js": { "version": "4.28.6", "resolved": "https://registry.npmjs.org/collect.js/-/collect.js-4.28.6.tgz", @@ -6252,6 +6268,17 @@ "node": ">=6" } }, + "node_modules/marked": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-2.1.3.tgz", + "integrity": "sha512-/Q+7MGzaETqifOMWYEA7HVMaZb4XbcRfaOzcSsHZEith83KGlvaSG33u0SKu89Mj5h+T8V2hM+8O45Qc5XTgwA==", + "bin": { + "marked": "bin/marked" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/md5": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", @@ -8934,6 +8961,16 @@ "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", "dev": true }, + "node_modules/simplemde": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/simplemde/-/simplemde-1.11.2.tgz", + "integrity": "sha1-ojo12XjSxA7wfewAjJLwcNjggOM=", + "dependencies": { + "codemirror": "*", + "codemirror-spell-checker": "*", + "marked": "*" + } + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -9658,6 +9695,11 @@ "node": ">= 0.6" } }, + "node_modules/typo-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/typo-js/-/typo-js-1.2.0.tgz", + "integrity": "sha512-dELuLBVa2jvWdU/CHTKi2L/POYaRupv942k+vRsFXsM17acXesQGAiGCio82RW7fvcr7bkuD/Zj8XpUh6aPC2A==" + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", @@ -9924,6 +9966,15 @@ "deepmerge": "^4.2.2" } }, + "node_modules/vue-simplemde": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/vue-simplemde/-/vue-simplemde-2.0.0.tgz", + "integrity": "sha512-Wn/U/CLTy8y/bqAFg6rba8/uZHGcolx3J1TtvcaQ3mqmDlj6yXOiCy4b8uJxbG96t2A6UBdMyryzODLYAzDYmA==", + "dependencies": { + "marked": "*", + "simplemde": "*" + } + }, "node_modules/vue-style-loader": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz", @@ -12876,6 +12927,19 @@ "shallow-clone": "^3.0.0" } }, + "codemirror": { + "version": "5.62.2", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.62.2.tgz", + "integrity": "sha512-tVFMUa4J3Q8JUd1KL9yQzQB0/BJt7ZYZujZmTPgo/54Lpuq3ez4C8x/ATUY/wv7b7X3AUq8o3Xd+2C5ZrCGWHw==" + }, + "codemirror-spell-checker": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/codemirror-spell-checker/-/codemirror-spell-checker-1.1.2.tgz", + "integrity": "sha1-HGYPkIlIPMtRE7m6nKGcP0mTNx4=", + "requires": { + "typo-js": "*" + } + }, "collect.js": { "version": "4.28.6", "resolved": "https://registry.npmjs.org/collect.js/-/collect.js-4.28.6.tgz", @@ -15364,6 +15428,11 @@ "p-defer": "^1.0.0" } }, + "marked": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-2.1.3.tgz", + "integrity": "sha512-/Q+7MGzaETqifOMWYEA7HVMaZb4XbcRfaOzcSsHZEith83KGlvaSG33u0SKu89Mj5h+T8V2hM+8O45Qc5XTgwA==" + }, "md5": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", @@ -17367,6 +17436,16 @@ } } }, + "simplemde": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/simplemde/-/simplemde-1.11.2.tgz", + "integrity": "sha1-ojo12XjSxA7wfewAjJLwcNjggOM=", + "requires": { + "codemirror": "*", + "codemirror-spell-checker": "*", + "marked": "*" + } + }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -17925,6 +18004,11 @@ "mime-types": "~2.1.24" } }, + "typo-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/typo-js/-/typo-js-1.2.0.tgz", + "integrity": "sha512-dELuLBVa2jvWdU/CHTKi2L/POYaRupv942k+vRsFXsM17acXesQGAiGCio82RW7fvcr7bkuD/Zj8XpUh6aPC2A==" + }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", @@ -18142,6 +18226,15 @@ "deepmerge": "^4.2.2" } }, + "vue-simplemde": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/vue-simplemde/-/vue-simplemde-2.0.0.tgz", + "integrity": "sha512-Wn/U/CLTy8y/bqAFg6rba8/uZHGcolx3J1TtvcaQ3mqmDlj6yXOiCy4b8uJxbG96t2A6UBdMyryzODLYAzDYmA==", + "requires": { + "marked": "*", + "simplemde": "*" + } + }, "vue-style-loader": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz", diff --git a/package.json b/package.json index 111f9fa..526ad68 100644 --- a/package.json +++ b/package.json @@ -34,5 +34,8 @@ "vue-meta": "^2.4.0", "vue-template-compiler": "^2.6.11", "vuex": "^3.6.2" + }, + "dependencies": { + "vue-simplemde": "^2.0.0" } } diff --git a/public/js/app.js b/public/js/app.js index 6f996b8..e975a31 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -26582,6 +26582,14 @@ var map = { "./resources/js/Pages/Admin/TabsStatus.vue", "resources_js_Pages_Admin_TabsStatus_vue" ], + "./Admin/Terms": [ + "./resources/js/Pages/Admin/Terms.vue", + "resources_js_Pages_Admin_Terms_vue" + ], + "./Admin/Terms.vue": [ + "./resources/js/Pages/Admin/Terms.vue", + "resources_js_Pages_Admin_Terms_vue" + ], "./Admin/Users/Create": [ "./resources/js/Pages/Admin/Users/Create.vue", "resources_js_Pages_Admin_Users_Create_vue" @@ -26750,6 +26758,14 @@ var map = { "./resources/js/Pages/Errors/404.vue", "resources_js_Pages_Errors_404_vue" ], + "./Pages/Terms": [ + "./resources/js/Pages/Pages/Terms.vue", + "resources_js_Pages_Pages_Terms_vue" + ], + "./Pages/Terms.vue": [ + "./resources/js/Pages/Pages/Terms.vue", + "resources_js_Pages_Pages_Terms_vue" + ], "./Profile/Billing": [ "./resources/js/Pages/Profile/Billing.vue", "resources_js_Pages_Profile_Billing_vue" @@ -27103,7 +27119,7 @@ module.exports = webpackAsyncContext; /******/ // This function allow to reference async chunks /******/ __webpack_require__.u = (chunkId) => { /******/ // return url for filenames based on template -/******/ return "js/" + chunkId + ".js?id=" + {"resources_js_Pages_Admin_Alerts_Create_vue":"41851dc08ae778088950","resources_js_Pages_Admin_Alerts_Edit_vue":"c32d97de6e6522c9061a","resources_js_Pages_Admin_Alerts_Index_vue":"d41b23aeb175cbe756ac","resources_js_Pages_Admin_Alerts_Tabs_vue":"18f0f531267930d22957","resources_js_Pages_Admin_ApplicationLogs_vue":"08dfda83abb52d9681d5","resources_js_Pages_Admin_Dashboard_vue":"c022bd0939ccbb6fda66","resources_js_Pages_Admin_Documentation_Articles_Create_vue":"581dbd732705e0a665df","resources_js_Pages_Admin_Documentation_Articles_Edit_vue":"c66886ae6e12e0f9258b","resources_js_Pages_Admin_Documentation_Articles_Index_vue":"6fba4f56db7600a76a4a","resources_js_Pages_Admin_Documentation_Create_vue":"9c98dbd3e3f86af5c9a1","resources_js_Pages_Admin_Documentation_Edit_vue":"c5cd4c8f38ed3eef9d39","resources_js_Pages_Admin_Documentation_Index_vue":"af7e816d2d04baf71a63","resources_js_Pages_Admin_Documentation_Tabs_vue":"1a78d054b14b4e1b78fa","resources_js_Pages_Admin_Packages_Create_vue":"50a1f043d6c8ae2e9849","resources_js_Pages_Admin_Packages_Edit_vue":"98eb804e4f399169e98c","resources_js_Pages_Admin_Packages_Index_vue":"6c19e353463e48cc3503","resources_js_Pages_Admin_Packages_Tabs_vue":"abad1e70a96a4404cdf0","resources_js_Pages_Admin_Services_Index_vue":"7949e100f4003ce81bdb","resources_js_Pages_Admin_Services_Provider_Edit_vue":"3759e2a7c70367f9a486","resources_js_Pages_Admin_Services_Providers_vue":"abdb053a51cf8a7954d1","resources_js_Pages_Admin_Services_Server_Edit_vue":"b65c548acf31bc2ef154","resources_js_Pages_Admin_Services_Servers_vue":"41b76423835fad479c68","resources_js_Pages_Admin_Services_Site_Edit_vue":"306aa5b5a06e51120de9","resources_js_Pages_Admin_Services_Sites_vue":"ff7c252820d5b42c0875","resources_js_Pages_Admin_Services_Tabs_vue":"0d1cdaa88e2896a5d67c","resources_js_Pages_Admin_Settings_vue":"07c58d8f30609925a291","resources_js_Pages_Admin_Status_vue":"f0ade85038aa1226136d","resources_js_Pages_Admin_Support_Index_vue":"3d0026aad109fe4ae399","resources_js_Pages_Admin_Support_Show_vue":"48d4d3c526db744cbf67","resources_js_Pages_Admin_Support_Tabs_vue":"1ce9f4b348168e845df5","resources_js_Pages_Admin_System_vue":"4e854a940e23f8ab087c","resources_js_Pages_Admin_Tabs_vue":"8685ef690e3fbff67ea5","resources_js_Pages_Admin_TabsStatus_vue":"c8983db5819a77f80d8c","resources_js_Pages_Admin_Users_Create_vue":"9e8249ae95953a4f4316","resources_js_Pages_Admin_Users_Edit_vue":"b144f692efc852d02963","resources_js_Pages_Admin_Users_Index_vue":"6c286df94925eb1ac694","resources_js_Pages_Admin_Users_Show_vue":"d13bb4f39b6851ebfb05","resources_js_Pages_Admin_Users_Tabs_vue":"6a3c60be7c7ae0a63c62","resources_js_Pages_Admin_components_TopBar_vue":"2185df0b7ed547f35956","resources_js_Pages_Auth_Email_vue":"ad9d39a9b39e43bc943e","resources_js_Pages_Auth_Login_vue":"2eaff33fb693a5013466","resources_js_Pages_Auth_PasswordCreation_vue":"eff33c7b710b51d61ed4","resources_js_Pages_Auth_Register_vue":"08ba75d713ebbfe2666b","resources_js_Pages_Auth_Reset_vue":"d6c6635d8779e0a5ab52","resources_js_Pages_Core_InstallationIncomplete_vue":"300a4991855d414e4db9","resources_js_Pages_Dashboard_Index_vue":"dfdeb1cf1f94c7aa4101","resources_js_Pages_Dashboard_components_TopBar_vue":"bb3f55b9b800e83f04c8","resources_js_Pages_Documentation_Article_vue":"8fec8fd3668037573216","resources_js_Pages_Documentation_Index_vue":"ba753dc2de4ba2c5309b","resources_js_Pages_Documentation_Show_vue":"714dea6ebcdf018caa22","resources_js_Pages_Documentation_Tabs_vue":"7cc69e097d1b0cb0288e","resources_js_Pages_Documentation_components_TopBar_vue":"30477e3181d093cb2b3a","resources_js_Pages_Errors_403_vue":"cfeb92f7b9022a964ce3","resources_js_Pages_Errors_404_vue":"8134a21f243dd8ea0ec1","resources_js_Pages_Profile_Billing_vue":"a00b1baab6d1380788a7","resources_js_Pages_Profile_BillingError_vue":"c05fc4c7afbd1784ffb9","resources_js_Pages_Profile_Index_vue":"31dad1e74c314ab6f19b","resources_js_Pages_Profile_Integrations_vue":"80d3a453be0d66963f97","resources_js_Pages_Profile_Security_vue":"c2fb47a43b6a284ec168","resources_js_Pages_Profile_Settings_vue":"8dbcb17daf76268f7e7c","resources_js_Pages_Profile_components_TopBar_vue":"ce60a21cffae3744684f","resources_js_Pages_Servers_Index_vue":"2653db36b5953b60b2e1","resources_js_Pages_Servers_Settings_vue":"10af53fe12c0dfa3da20","resources_js_Pages_Servers_Show_vue":"4f5f50100beffe2f75fa","resources_js_Pages_Servers_Tabs_vue":"5b746984d315d58b9539","resources_js_Pages_Servers_components_TopBar_vue":"fa6ce86d9f8e6baee213","resources_js_Pages_Sites_Apps_vue":"99c19a467945ee1857ed","resources_js_Pages_Sites_Certificates_vue":"523830c6a9c2edc90ab8","resources_js_Pages_Sites_Cronjobs_vue":"4900a31fcea51cb4536a","resources_js_Pages_Sites_Databases_vue":"87ca90f6ac5dd17d65e6","resources_js_Pages_Sites_Dns_vue":"22c73f3aa2436bb869c1","resources_js_Pages_Sites_Index_vue":"4e4f2e198c470fc15837","resources_js_Pages_Sites_Redirects_vue":"b02f4131aaf3ec3d2d5e","resources_js_Pages_Sites_Settings_vue":"ccc95ca8844160e928c2","resources_js_Pages_Sites_Show_vue":"c1b4ca1f3a6576a2bbbc","resources_js_Pages_Sites_Tabs_vue":"4567be6b0ef1fec399e1","resources_js_Pages_Sites_components_TopBar_vue":"c3a30656a425c96161a0","resources_js_Pages_Support_Closed_vue":"fb51fd2ad4e8fbfe44b0","resources_js_Pages_Support_Index_vue":"25875b66808c40092f05","resources_js_Pages_Support_Show_vue":"b4a9c0fbf5a18b64c3e4","resources_js_Pages_Support_components_TopBar_vue":"b6a16e6baa8184993f52"}[chunkId] + ""; +/******/ return "js/" + chunkId + ".js?id=" + {"resources_js_Pages_Admin_Alerts_Create_vue":"46478f0ce9de0f1b9e10","resources_js_Pages_Admin_Alerts_Edit_vue":"73665f9f8a2350759a95","resources_js_Pages_Admin_Alerts_Index_vue":"f19052ce7bf90d20b290","resources_js_Pages_Admin_Alerts_Tabs_vue":"18f0f531267930d22957","resources_js_Pages_Admin_ApplicationLogs_vue":"c67f64553c7247dff101","resources_js_Pages_Admin_Dashboard_vue":"104e5515ec8447b93bb5","resources_js_Pages_Admin_Documentation_Articles_Create_vue":"814d2c3833a44fe4016e","resources_js_Pages_Admin_Documentation_Articles_Edit_vue":"1260d413959ef5be0a73","resources_js_Pages_Admin_Documentation_Articles_Index_vue":"dc5827dabe5514e01bf8","resources_js_Pages_Admin_Documentation_Create_vue":"c36d744c486d258df597","resources_js_Pages_Admin_Documentation_Edit_vue":"d7df29f68149e5023e6d","resources_js_Pages_Admin_Documentation_Index_vue":"6a239979eb71d68572bb","resources_js_Pages_Admin_Documentation_Tabs_vue":"1a78d054b14b4e1b78fa","resources_js_Pages_Admin_Packages_Create_vue":"9b54ae7d74e19bc200fc","resources_js_Pages_Admin_Packages_Edit_vue":"86293517034759e34878","resources_js_Pages_Admin_Packages_Index_vue":"27c37144d4ee8c2536f5","resources_js_Pages_Admin_Packages_Tabs_vue":"abad1e70a96a4404cdf0","resources_js_Pages_Admin_Services_Index_vue":"0532db0aec4d9fc5c7bd","resources_js_Pages_Admin_Services_Provider_Edit_vue":"783f6ca52a44f76594de","resources_js_Pages_Admin_Services_Providers_vue":"6475da4a6792499f0228","resources_js_Pages_Admin_Services_Server_Edit_vue":"4b625a097194f15d5d3f","resources_js_Pages_Admin_Services_Servers_vue":"84d1e3de4f150d96702a","resources_js_Pages_Admin_Services_Site_Edit_vue":"aa255b482d1379f0e90d","resources_js_Pages_Admin_Services_Sites_vue":"1ab9f3488f1b79835bc5","resources_js_Pages_Admin_Services_Tabs_vue":"0d1cdaa88e2896a5d67c","resources_js_Pages_Admin_Settings_vue":"69149946642f2a7de099","resources_js_Pages_Admin_Status_vue":"f1490bac870d1b35d34b","resources_js_Pages_Admin_Support_Index_vue":"f00fa6d2cd51ef1c2e9c","resources_js_Pages_Admin_Support_Show_vue":"84eb97a4f6fd3de712a7","resources_js_Pages_Admin_Support_Tabs_vue":"1ce9f4b348168e845df5","resources_js_Pages_Admin_System_vue":"5731558567c18c4710ff","resources_js_Pages_Admin_Tabs_vue":"32df9560ad3da059325b","resources_js_Pages_Admin_TabsStatus_vue":"c8983db5819a77f80d8c","resources_js_Pages_Admin_Terms_vue":"92a1ab97e14f6242d80c","resources_js_Pages_Admin_Users_Create_vue":"4ec36af897d5f862fb80","resources_js_Pages_Admin_Users_Edit_vue":"696e0cf106d742e99ecc","resources_js_Pages_Admin_Users_Index_vue":"748dbf95a81fbdf60241","resources_js_Pages_Admin_Users_Show_vue":"4016137c9d5ea6cda9ee","resources_js_Pages_Admin_Users_Tabs_vue":"6a3c60be7c7ae0a63c62","resources_js_Pages_Admin_components_TopBar_vue":"f80c4b20379f30a14b7e","resources_js_Pages_Auth_Email_vue":"1a88acf63ba75e66a58e","resources_js_Pages_Auth_Login_vue":"aa1ac9d5b5ec55abfd5b","resources_js_Pages_Auth_PasswordCreation_vue":"07d59330fc702b4f97d9","resources_js_Pages_Auth_Register_vue":"e79d13c81531b786b283","resources_js_Pages_Auth_Reset_vue":"f29c7069f458c99ef89a","resources_js_Pages_Core_InstallationIncomplete_vue":"b11b1027ccc6a774fcab","resources_js_Pages_Dashboard_Index_vue":"ca012e102fb216e82a86","resources_js_Pages_Dashboard_components_TopBar_vue":"4011a56f8807b60af70e","resources_js_Pages_Documentation_Article_vue":"77c9022f7bf529722366","resources_js_Pages_Documentation_Index_vue":"c766e602cb7908384ae8","resources_js_Pages_Documentation_Show_vue":"cc9f5499b5304b75b4fb","resources_js_Pages_Documentation_Tabs_vue":"7cc69e097d1b0cb0288e","resources_js_Pages_Documentation_components_TopBar_vue":"a6a1760d64f604fa276f","resources_js_Pages_Errors_403_vue":"809ef6aa09f383cd5a23","resources_js_Pages_Errors_404_vue":"fb2fdf45056c5bbbf78b","resources_js_Pages_Pages_Terms_vue":"55b09ee9d6d7f0564ef3","resources_js_Pages_Profile_Billing_vue":"66c9a685713804342b98","resources_js_Pages_Profile_BillingError_vue":"3adbed4b650c62b514b4","resources_js_Pages_Profile_Index_vue":"1bac854ce71433b7d68a","resources_js_Pages_Profile_Integrations_vue":"c5faf5a3a06f72664b66","resources_js_Pages_Profile_Security_vue":"14b7a4123b575176f06f","resources_js_Pages_Profile_Settings_vue":"1a376f4531558e58c9c6","resources_js_Pages_Profile_components_TopBar_vue":"b950be66e16fef6b6572","resources_js_Pages_Servers_Index_vue":"3dd0954406a2dda5327a","resources_js_Pages_Servers_Settings_vue":"e2e7874df0acb45374b3","resources_js_Pages_Servers_Show_vue":"6bd5d53a578af128cf36","resources_js_Pages_Servers_Tabs_vue":"5b746984d315d58b9539","resources_js_Pages_Servers_components_TopBar_vue":"bd145753bc6be55da244","resources_js_Pages_Sites_Apps_vue":"f490d19a5bff29d35ee6","resources_js_Pages_Sites_Certificates_vue":"2c43fd333dce0473feff","resources_js_Pages_Sites_Cronjobs_vue":"a802128ba63d0d7126f9","resources_js_Pages_Sites_Databases_vue":"0974d08e0a308e2c46f0","resources_js_Pages_Sites_Dns_vue":"5fb86df3ac8066652560","resources_js_Pages_Sites_Index_vue":"3204229e7abff4ddd9af","resources_js_Pages_Sites_Redirects_vue":"3891301c739575fa7f52","resources_js_Pages_Sites_Settings_vue":"a36fac621a9f6a414eb2","resources_js_Pages_Sites_Show_vue":"6364c0ce26cefedf032a","resources_js_Pages_Sites_Tabs_vue":"4567be6b0ef1fec399e1","resources_js_Pages_Sites_components_TopBar_vue":"ccf44d865e51c6442a19","resources_js_Pages_Support_Closed_vue":"098d3a56d2376b4c248e","resources_js_Pages_Support_Index_vue":"8a2ba7820f94ccf0beea","resources_js_Pages_Support_Show_vue":"ef166703373b09a735ab","resources_js_Pages_Support_components_TopBar_vue":"7a0a718d57b05eef43fc"}[chunkId] + ""; /******/ }; /******/ })(); /******/ diff --git a/resources/js/Pages/Admin/Tabs.vue b/resources/js/Pages/Admin/Tabs.vue index 50c7d96..8a8eb0b 100644 --- a/resources/js/Pages/Admin/Tabs.vue +++ b/resources/js/Pages/Admin/Tabs.vue @@ -25,21 +25,26 @@ to: this.route('admin.settings'), active: this.route().current('admin.settings') }, - { - title: this.__('Alert messages'), - to: this.route('admin.alerts.index'), - active: this.route().current('admin.alerts.*') - }, { title: this.__('System'), to: this.route('admin.system'), active: this.route().current('admin.system') }, + { + title: this.__('Terms'), + to: this.route('admin.settings.terms'), + active: this.route().current('admin.settings.terms') + }, + { + title: this.__('Alert messages'), + to: this.route('admin.alerts.index'), + active: this.route().current('admin.alerts.*') + }, { title: this.__('Application logs'), to: this.route('admin.application-logs'), active: this.route().current('admin.application-logs') - } + }, ], } }, diff --git a/resources/js/Pages/Admin/Terms.vue b/resources/js/Pages/Admin/Terms.vue new file mode 100644 index 0000000..4ffab7e --- /dev/null +++ b/resources/js/Pages/Admin/Terms.vue @@ -0,0 +1,179 @@ + + + + + diff --git a/resources/js/Pages/Auth/Login.vue b/resources/js/Pages/Auth/Login.vue index 43972bd..4232e5b 100644 --- a/resources/js/Pages/Auth/Login.vue +++ b/resources/js/Pages/Auth/Login.vue @@ -27,6 +27,12 @@ v-if="$page.props.settings.allow_registration" block>Register + + + +
+ Terms Of Service +
diff --git a/resources/js/Pages/Pages/Terms.vue b/resources/js/Pages/Pages/Terms.vue new file mode 100644 index 0000000..db8afd0 --- /dev/null +++ b/resources/js/Pages/Pages/Terms.vue @@ -0,0 +1,45 @@ + + + diff --git a/resources/js/components/Container.vue b/resources/js/components/Container.vue index c10cce0..61fb6c4 100644 --- a/resources/js/components/Container.vue +++ b/resources/js/components/Container.vue @@ -8,6 +8,7 @@ const baseClasses = 'w-full px-4 sm:px-8 mx-auto' const sizeClasses = { small: 'max-w-sm', + medium: 'max-w-xl', base: 'max-w-5xl', large: 'max-w-screen-xl', fluid: 'max-w-none', diff --git a/resources/js/components/TextDivider.vue b/resources/js/components/TextDivider.vue index 7b5a506..2bd942c 100644 --- a/resources/js/components/TextDivider.vue +++ b/resources/js/components/TextDivider.vue @@ -1,8 +1,19 @@ + + diff --git a/resources/js/components/forms/FormCustom.vue b/resources/js/components/forms/FormCustom.vue new file mode 100644 index 0000000..c700d92 --- /dev/null +++ b/resources/js/components/forms/FormCustom.vue @@ -0,0 +1,72 @@ + + + diff --git a/routes/admin.php b/routes/admin.php index 4fc418d..a9df510 100644 --- a/routes/admin.php +++ b/routes/admin.php @@ -4,8 +4,14 @@ use Illuminate\Support\Facades\Route; Route::get('/', 'DashboardController@index')->name('dashboard'); -Route::get('settings', 'SettingController@index')->name('settings'); -Route::patch('settings', 'SettingController@update')->name('settings.update'); +Route::group(['prefix' => 'settings'], function () { + Route::get('/', 'SettingController@index')->name('settings'); + Route::patch('/', 'SettingController@update')->name('settings.update'); + Route::get('terms', 'SettingController@terms')->name('settings.terms'); + Route::get('terms/template', 'SettingController@termsTemplate')->name('settings.terms.template'); + Route::patch('terms', 'SettingController@updateTerms')->name('settings.terms.update'); +}); + Route::get('system', 'SystemController@index')->name('system'); Route::post('system/update', 'SystemController@update')->name('system.update'); diff --git a/routes/web.php b/routes/web.php index 9f77a5f..53bcf9e 100644 --- a/routes/web.php +++ b/routes/web.php @@ -11,6 +11,8 @@ Route::post('password-creation', 'Auth\CreatePasswordController@start')->name('p Route::get('installation-incomplete', 'PageController@installationIncomplete')->name('installation-incomplete'); +Route::get('page/{slug}', 'PageController@show')->name('page.show'); + // All auth protected routes Route::group(['middleware' => ['auth', 'auth.blocked']], function () { Route::get('/', 'DashboardController@index')->name('dashboard'); diff --git a/storage/templates/terms-of-service.md b/storage/templates/terms-of-service.md new file mode 100644 index 0000000..85beffe --- /dev/null +++ b/storage/templates/terms-of-service.md @@ -0,0 +1,43 @@ +This document is created on {DATE}. + +Please read these terms of service ("terms", "terms of service") carefully before using {WEBSITE} website (the "service") operated by {NAME} ("us", 'we", "our"). + +## Conditions of Use + +We will provide their services to you, which are subject to the conditions stated below in this document. Every time you visit this website, use its services or make a purchase, you accept the following conditions. This is why we urge you to read them carefully. + +## Privacy Policy + +Before you continue using our website we advise you to read our privacy policy regarding our user data collection. It will help you better understand our practices. + +## Copyright + +Content published on this website (digital downloads, images, texts, graphics, logos) is the property of {NAME} and/or its content creators and protected by international copyright laws. The entire compilation of the content found on this website is the exclusive property of {NAME}, with copyright authorship for this compilation by {NAME}. + +## Communications + +The entire communication with us is electronic. Every time you send us an email or visit our website, you are going to be communicating with us. You hereby consent to receive communications from us. If you subscribe to the news on our website, you are going to receive regular emails from us. We will continue to communicate with you by posting news and notices on our website and by sending you emails. You also agree that all notices, disclosures, agreements and other communications we provide to you electronically meet the legal requirements that such communications be in writing. + +## Applicable Law + +By visiting this website, you agree that the laws of the location you are currently at, without regard to principles of conflict laws, will govern these terms of service, or any dispute of any sort that might come between {NAME} and you, or its business partners and associates. + +## Disputes + +Any dispute related in any way to your visit to this website or to products you purchase from us shall be arbitrated by state or federal court from your location and you consent to exclusive jurisdiction and venue of such courts. + +## Comments, Reviews, and Emails + +Visitors may post content as long as it is not obscene, illegal, defamatory, threatening, infringing of intellectual property rights, invasive of privacy or injurious in any other way to third parties. Content has to be free of software viruses, political campaign, and commercial solicitation. + +We reserve all rights (but not the obligation) to remove and/or edit such content. When you post your content, you grant {NAME} non-exclusive, royalty-free and irrevocable right to use, reproduce, publish, modify such content throughout the world in any media. + +## License and Site Access + +We grant you a limited license to access and make personal use of this website. You are not allowed to download or modify it. This may be done only with written consent from us. + +## User Account + +If you are an owner of an account on this website, you are solely responsible for maintaining the confidentiality of your private user details (username and password). You are responsible for all activities that occur under your account or password. + +We reserve all rights to terminate accounts, edit or remove content and cancel orders in their sole discretion.