Start on getting it to work
This commit is contained in:
parent
3712eb750b
commit
9e2f1f1650
11 changed files with 37584 additions and 8060 deletions
|
@ -38,11 +38,12 @@ class ItemController extends Controller
|
|||
$query->where('id', 0);
|
||||
})->orWhere('type', 1)->orderBy('order', 'asc')->get();
|
||||
|
||||
$data['current_user'] = User::currentUser();
|
||||
|
||||
//$data['all_apps'] = Item::doesntHave('parents')->get();
|
||||
//die(print_r($data['apps']));
|
||||
// return view('welcome', $data);
|
||||
return Inertia::render('index', [
|
||||
]);
|
||||
return Inertia::render('Index', $data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
356
package-lock.json
generated
356
package-lock.json
generated
|
@ -1169,31 +1169,18 @@
|
|||
"version": "0.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@inertiajs/inertia/-/inertia-0.11.0.tgz",
|
||||
"integrity": "sha512-QF4hctgFC+B/t/WClCwfOla+WoDE9iTltQJ0u+DCfjl0KdGoCvIxYiNtuH8h8oM+RQMb8orjbpW3pHapjYI5Vw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"axios": "^0.21.1",
|
||||
"deepmerge": "^4.0.0",
|
||||
"qs": "^6.9.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"deepmerge": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
|
||||
"integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg=="
|
||||
},
|
||||
"qs": {
|
||||
"version": "6.10.3",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz",
|
||||
"integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==",
|
||||
"requires": {
|
||||
"side-channel": "^1.0.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@inertiajs/inertia-vue": {
|
||||
"version": "0.8.0",
|
||||
"resolved": "https://registry.npmjs.org/@inertiajs/inertia-vue/-/inertia-vue-0.8.0.tgz",
|
||||
"integrity": "sha512-+AQUo0lDArGGD9pj66pRju/gTHzVDYRI01c8htS1vqJeFORx7r5pvqC+QqBOGpwb7I5K15BUzLoxifUe+61oUw==",
|
||||
"@inertiajs/inertia-vue3": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@inertiajs/inertia-vue3/-/inertia-vue3-0.6.0.tgz",
|
||||
"integrity": "sha512-qhPBtd/G0VS7vVVbYw1rrqKB6JqRusxqt+5ec2GLmK6t7fTlBBnZ3KsakmGZLSM1m1OGkNcfn4ifmCk3zfA8RQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lodash.clonedeep": "^4.5.0",
|
||||
"lodash.isequal": "^4.5.0"
|
||||
|
@ -1555,6 +1542,131 @@
|
|||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@vue/compiler-core": {
|
||||
"version": "3.2.31",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.2.31.tgz",
|
||||
"integrity": "sha512-aKno00qoA4o+V/kR6i/pE+aP+esng5siNAVQ422TkBNM6qA4veXiZbSe8OTXHXquEi/f6Akc+nLfB4JGfe4/WQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/parser": "^7.16.4",
|
||||
"@vue/shared": "3.2.31",
|
||||
"estree-walker": "^2.0.2",
|
||||
"source-map": "^0.6.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@vue/compiler-dom": {
|
||||
"version": "3.2.31",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.2.31.tgz",
|
||||
"integrity": "sha512-60zIlFfzIDf3u91cqfqy9KhCKIJgPeqxgveH2L+87RcGU/alT6BRrk5JtUso0OibH3O7NXuNOQ0cDc9beT0wrg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@vue/compiler-core": "3.2.31",
|
||||
"@vue/shared": "3.2.31"
|
||||
}
|
||||
},
|
||||
"@vue/compiler-sfc": {
|
||||
"version": "3.2.31",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.2.31.tgz",
|
||||
"integrity": "sha512-748adc9msSPGzXgibHiO6T7RWgfnDcVQD+VVwYgSsyyY8Ans64tALHZANrKtOzvkwznV/F4H7OAod/jIlp/dkQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/parser": "^7.16.4",
|
||||
"@vue/compiler-core": "3.2.31",
|
||||
"@vue/compiler-dom": "3.2.31",
|
||||
"@vue/compiler-ssr": "3.2.31",
|
||||
"@vue/reactivity-transform": "3.2.31",
|
||||
"@vue/shared": "3.2.31",
|
||||
"estree-walker": "^2.0.2",
|
||||
"magic-string": "^0.25.7",
|
||||
"postcss": "^8.1.10",
|
||||
"source-map": "^0.6.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@vue/compiler-ssr": {
|
||||
"version": "3.2.31",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.2.31.tgz",
|
||||
"integrity": "sha512-mjN0rqig+A8TVDnsGPYJM5dpbjlXeHUm2oZHZwGyMYiGT/F4fhJf/cXy8QpjnLQK4Y9Et4GWzHn9PS8AHUnSkw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@vue/compiler-dom": "3.2.31",
|
||||
"@vue/shared": "3.2.31"
|
||||
}
|
||||
},
|
||||
"@vue/reactivity": {
|
||||
"version": "3.2.31",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.2.31.tgz",
|
||||
"integrity": "sha512-HVr0l211gbhpEKYr2hYe7hRsV91uIVGFYNHj73njbARVGHQvIojkImKMaZNDdoDZOIkMsBc9a1sMqR+WZwfSCw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@vue/shared": "3.2.31"
|
||||
}
|
||||
},
|
||||
"@vue/reactivity-transform": {
|
||||
"version": "3.2.31",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity-transform/-/reactivity-transform-3.2.31.tgz",
|
||||
"integrity": "sha512-uS4l4z/W7wXdI+Va5pgVxBJ345wyGFKvpPYtdSgvfJfX/x2Ymm6ophQlXXB6acqGHtXuBqNyyO3zVp9b1r0MOA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/parser": "^7.16.4",
|
||||
"@vue/compiler-core": "3.2.31",
|
||||
"@vue/shared": "3.2.31",
|
||||
"estree-walker": "^2.0.2",
|
||||
"magic-string": "^0.25.7"
|
||||
}
|
||||
},
|
||||
"@vue/runtime-core": {
|
||||
"version": "3.2.31",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.2.31.tgz",
|
||||
"integrity": "sha512-Kcog5XmSY7VHFEMuk4+Gap8gUssYMZ2+w+cmGI6OpZWYOEIcbE0TPzzPHi+8XTzAgx1w/ZxDFcXhZeXN5eKWsA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@vue/reactivity": "3.2.31",
|
||||
"@vue/shared": "3.2.31"
|
||||
}
|
||||
},
|
||||
"@vue/runtime-dom": {
|
||||
"version": "3.2.31",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.2.31.tgz",
|
||||
"integrity": "sha512-N+o0sICVLScUjfLG7u9u5XCjvmsexAiPt17GNnaWHJUfsKed5e85/A3SWgKxzlxx2SW/Hw7RQxzxbXez9PtY3g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@vue/runtime-core": "3.2.31",
|
||||
"@vue/shared": "3.2.31",
|
||||
"csstype": "^2.6.8"
|
||||
}
|
||||
},
|
||||
"@vue/server-renderer": {
|
||||
"version": "3.2.31",
|
||||
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.2.31.tgz",
|
||||
"integrity": "sha512-8CN3Zj2HyR2LQQBHZ61HexF5NReqngLT3oahyiVRfSSvak+oAvVmu8iNLSu6XR77Ili2AOpnAt1y8ywjjqtmkg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@vue/compiler-ssr": "3.2.31",
|
||||
"@vue/shared": "3.2.31"
|
||||
}
|
||||
},
|
||||
"@vue/shared": {
|
||||
"version": "3.2.31",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.31.tgz",
|
||||
"integrity": "sha512-ymN2pj6zEjiKJZbrf98UM2pfDd6F2H7ksKw7NDt/ZZ1fh5Ei39X5tABugtT03ZRlWd9imccoK0hE8hpjpU7irQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@webassemblyjs/ast": {
|
||||
"version": "1.11.1",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz",
|
||||
|
@ -1930,15 +2042,9 @@
|
|||
"version": "0.21.4",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
|
||||
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"follow-redirects": "^1.14.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"follow-redirects": {
|
||||
"version": "1.14.9",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
|
||||
"integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"babel-loader": {
|
||||
|
@ -2272,6 +2378,7 @@
|
|||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
|
||||
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1",
|
||||
"get-intrinsic": "^1.0.2"
|
||||
|
@ -2721,29 +2828,6 @@
|
|||
"sha.js": "^2.4.8"
|
||||
}
|
||||
},
|
||||
"cross-env": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.2.0.tgz",
|
||||
"integrity": "sha512-jtdNFfFW1hB7sMhr/H6rW1Z45LFqyI431m3qU6bFXcQ3Eh7LtBuG3h74o7ohHZ3crrRkkqHlo4jYHFPcjroANg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cross-spawn": "^6.0.5",
|
||||
"is-windows": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"nice-try": "^1.0.4",
|
||||
"path-key": "^2.0.1",
|
||||
"semver": "^5.5.0",
|
||||
"shebang-command": "^1.2.0",
|
||||
"which": "^1.2.9"
|
||||
}
|
||||
},
|
||||
"crypt": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
|
||||
|
@ -2935,6 +3019,18 @@
|
|||
"css-tree": "^1.1.2"
|
||||
}
|
||||
},
|
||||
"csstype": {
|
||||
"version": "2.6.20",
|
||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.20.tgz",
|
||||
"integrity": "sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA==",
|
||||
"dev": true
|
||||
},
|
||||
"de-indent": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
|
||||
"integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=",
|
||||
"dev": true
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
|
@ -2958,6 +3054,12 @@
|
|||
"regexp.prototype.flags": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"deepmerge": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
|
||||
"integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==",
|
||||
"dev": true
|
||||
},
|
||||
"default-gateway": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz",
|
||||
|
@ -3301,6 +3403,12 @@
|
|||
"integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
|
||||
"dev": true
|
||||
},
|
||||
"estree-walker": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
|
||||
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
|
||||
"dev": true
|
||||
},
|
||||
"esutils": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
|
||||
|
@ -3670,7 +3778,8 @@
|
|||
"function-bind": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
|
||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
|
||||
"dev": true
|
||||
},
|
||||
"gensync": {
|
||||
"version": "1.0.0-beta.2",
|
||||
|
@ -3688,6 +3797,7 @@
|
|||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
|
||||
"integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
|
@ -3697,7 +3807,8 @@
|
|||
"has-symbols": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
|
||||
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
|
||||
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -3780,6 +3891,7 @@
|
|||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
||||
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1"
|
||||
}
|
||||
|
@ -4299,12 +4411,6 @@
|
|||
"integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
|
||||
"dev": true
|
||||
},
|
||||
"is-windows": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
|
||||
"integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
|
||||
"dev": true
|
||||
},
|
||||
"is-wsl": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
|
||||
|
@ -4554,7 +4660,8 @@
|
|||
"lodash.clonedeep": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
|
||||
"integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8="
|
||||
"integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=",
|
||||
"dev": true
|
||||
},
|
||||
"lodash.debounce": {
|
||||
"version": "4.0.8",
|
||||
|
@ -4565,7 +4672,8 @@
|
|||
"lodash.isequal": {
|
||||
"version": "4.5.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
|
||||
"integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
|
||||
"integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=",
|
||||
"dev": true
|
||||
},
|
||||
"lodash.memoize": {
|
||||
"version": "4.1.2",
|
||||
|
@ -4597,6 +4705,15 @@
|
|||
"yallist": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"magic-string": {
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz",
|
||||
"integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"sourcemap-codec": "^1.4.8"
|
||||
}
|
||||
},
|
||||
"make-dir": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
|
||||
|
@ -4847,12 +4964,6 @@
|
|||
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
|
||||
"dev": true
|
||||
},
|
||||
"nice-try": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz",
|
||||
"integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==",
|
||||
"dev": true
|
||||
},
|
||||
"no-case": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
|
||||
|
@ -4998,11 +5109,6 @@
|
|||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
|
||||
"dev": true
|
||||
},
|
||||
"object-inspect": {
|
||||
"version": "1.12.0",
|
||||
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz",
|
||||
"integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g=="
|
||||
},
|
||||
"object-is": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz",
|
||||
|
@ -5220,12 +5326,6 @@
|
|||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||
"dev": true
|
||||
},
|
||||
"path-key": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
|
||||
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
|
||||
"dev": true
|
||||
},
|
||||
"path-parse": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
||||
|
@ -6026,11 +6126,6 @@
|
|||
"integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=",
|
||||
"dev": true
|
||||
},
|
||||
"select2": {
|
||||
"version": "4.0.7",
|
||||
"resolved": "https://registry.npmjs.org/select2/-/select2-4.0.7.tgz",
|
||||
"integrity": "sha512-t46Z2nkEEYnBYdRpLNw5dj9qqO+YTiTlWKnpJ/B5e1Q3hPND00JRgcLJxYRzqpeLZd+ZkszkHEMagLKIfbTjVA=="
|
||||
},
|
||||
"selfsigned": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.0.0.tgz",
|
||||
|
@ -6040,12 +6135,6 @@
|
|||
"node-forge": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
|
||||
"integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==",
|
||||
"dev": true
|
||||
},
|
||||
"send": {
|
||||
"version": "0.17.2",
|
||||
"resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz",
|
||||
|
@ -6200,37 +6289,12 @@
|
|||
"kind-of": "^6.0.2"
|
||||
}
|
||||
},
|
||||
"shebang-command": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
|
||||
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"shebang-regex": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"shebang-regex": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
|
||||
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
|
||||
"dev": true
|
||||
},
|
||||
"shellwords": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz",
|
||||
"integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==",
|
||||
"dev": true
|
||||
},
|
||||
"side-channel": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
|
||||
"integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
|
||||
"requires": {
|
||||
"call-bind": "^1.0.0",
|
||||
"get-intrinsic": "^1.0.2",
|
||||
"object-inspect": "^1.9.0"
|
||||
}
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
|
||||
|
@ -6290,6 +6354,12 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"sourcemap-codec": {
|
||||
"version": "1.4.8",
|
||||
"resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
|
||||
"integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==",
|
||||
"dev": true
|
||||
},
|
||||
"spdy": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz",
|
||||
|
@ -6736,6 +6806,49 @@
|
|||
"integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==",
|
||||
"dev": true
|
||||
},
|
||||
"vue": {
|
||||
"version": "3.2.31",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.2.31.tgz",
|
||||
"integrity": "sha512-odT3W2tcffTiQCy57nOT93INw1auq5lYLLYtWpPYQQYQOOdHiqFct9Xhna6GJ+pJQaF67yZABraH47oywkJgFw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@vue/compiler-dom": "3.2.31",
|
||||
"@vue/compiler-sfc": "3.2.31",
|
||||
"@vue/runtime-dom": "3.2.31",
|
||||
"@vue/server-renderer": "3.2.31",
|
||||
"@vue/shared": "3.2.31"
|
||||
}
|
||||
},
|
||||
"vue-loader": {
|
||||
"version": "16.8.3",
|
||||
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz",
|
||||
"integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chalk": "^4.1.0",
|
||||
"hash-sum": "^2.0.0",
|
||||
"loader-utils": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"hash-sum": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-2.0.0.tgz",
|
||||
"integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==",
|
||||
"dev": true
|
||||
},
|
||||
"loader-utils": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
|
||||
"integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"big.js": "^5.2.2",
|
||||
"emojis-list": "^3.0.0",
|
||||
"json5": "^2.1.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"vue-style-loader": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz",
|
||||
|
@ -6746,6 +6859,16 @@
|
|||
"loader-utils": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"vue-template-compiler": {
|
||||
"version": "2.6.14",
|
||||
"resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.14.tgz",
|
||||
"integrity": "sha512-ODQS1SyMbjKoO1JBJZojSw6FE4qnh9rIpUZn2EUT86FKizx9uH5z6uXiIrm4/Nb/gwxTi/o17ZDEGWAXHvtC7g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"de-indent": "^1.0.2",
|
||||
"he": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"watchpack": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz",
|
||||
|
@ -7051,15 +7174,6 @@
|
|||
"integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==",
|
||||
"dev": true
|
||||
},
|
||||
"which": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
|
||||
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"isexe": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"wildcard": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz",
|
||||
|
|
12
package.json
12
package.json
|
@ -10,14 +10,12 @@
|
|||
"production": "mix --production"
|
||||
},
|
||||
"devDependencies": {
|
||||
"cross-env": "^5.2.0",
|
||||
"@inertiajs/inertia": "^0.11.0",
|
||||
"@inertiajs/inertia-vue3": "^0.6.0",
|
||||
"laravel-mix": "^6.0.43",
|
||||
"vue-loader": "^15.9.7",
|
||||
"vue": "^3.2.31",
|
||||
"vue-loader": "^16.1.2",
|
||||
"vue-template-compiler": "^2.6.14"
|
||||
},
|
||||
"dependencies": {
|
||||
"@inertiajs/inertia": "^0.11.0",
|
||||
"@inertiajs/inertia-vue": "^0.8.0",
|
||||
"select2": "^4.0.7"
|
||||
}
|
||||
"dependencies": {}
|
||||
}
|
||||
|
|
39020
public/js/app.js
vendored
39020
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1,23 +1,54 @@
|
|||
<template>
|
||||
<div class="">here</div>
|
||||
<div class="flex flex-center">
|
||||
<div class="noapps" v-if="apps.length === 0">
|
||||
{{ $t('no_apps') }}
|
||||
<button style="margin-top: 20px" unelevated color="cyan-8" to="/account">
|
||||
{{ $t('manage_apps') }}
|
||||
</button>
|
||||
</div>
|
||||
<Tile v-else v-for="application in apps" :key="application.id" v-bind="application" :application="application" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Tile from '../components/Tile'
|
||||
|
||||
export default {
|
||||
name: 'PageIndex',
|
||||
|
||||
props: ['filter', 'searchfilter'],
|
||||
props: ['apps', 'searchfilter'],
|
||||
|
||||
components: {
|
||||
Tile
|
||||
},
|
||||
|
||||
computed: {
|
||||
/*applications: function () {
|
||||
let tiles = null
|
||||
if (this.filter === null) {
|
||||
tiles = this.$store.state.tiles.active
|
||||
} else {
|
||||
console.log('active')
|
||||
console.log(this.$store.state.tiles.active)
|
||||
const notNull = this.$store.state.tiles.active.filter(a => a.tags !== null)
|
||||
console.log('notnull')
|
||||
console.log(notNull)
|
||||
tiles = notNull.filter(a => a.tags.find(name => name === this.filter))
|
||||
}
|
||||
// console.log(tiles)
|
||||
if (this.searchfilter === null) {
|
||||
return tiles
|
||||
} else {
|
||||
return tiles.filter(v => v.title.toLowerCase().indexOf(this.searchfilter) > -1)
|
||||
}
|
||||
}*/
|
||||
},
|
||||
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
mounted() {}
|
||||
mounted() {
|
||||
console.log(apps)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
import Vue from 'vue'
|
||||
import { createInertiaApp } from '@inertiajs/inertia-vue'
|
||||
import { createApp, h } from 'vue'
|
||||
import { createInertiaApp } from '@inertiajs/inertia-vue3'
|
||||
|
||||
createInertiaApp({
|
||||
resolve: name => require(`./Pages/${name}`),
|
||||
setup({ el, App, props, plugin }) {
|
||||
Vue.use(plugin)
|
||||
|
||||
new Vue({
|
||||
render: h => h(App, props),
|
||||
}).$mount(el)
|
||||
createApp({ render: () => h(App, props) })
|
||||
.use(plugin)
|
||||
.mount(el)
|
||||
},
|
||||
})
|
201
resources/assets/js/components/Tile.vue
Normal file
201
resources/assets/js/components/Tile.vue
Normal file
|
@ -0,0 +1,201 @@
|
|||
<template>
|
||||
<section class="item-container ui-sortable-handle" :class="{ preview: preview }" :data-id="this.$attrs.id">
|
||||
<div class="item" :style="'background-color: ' + bgColor + '; color: ' + textColor + ''">
|
||||
<img class="app-icon" :src="appIcon" />
|
||||
<div class="details">
|
||||
<div class="title white">{{ application.title }}</div>
|
||||
<!--<div v-if="application.config.enhancedType !== 'disabled'" class="livestats-container white">
|
||||
<ul class="livestats">
|
||||
<li v-if="application.config.stat1.name">
|
||||
<span class="title">{{ application.config.stat1.name }}</span>
|
||||
<strong>{{ this.stat1value }}</strong>
|
||||
</li>
|
||||
<li v-if="application.config.stat2.name">
|
||||
<span class="title">{{ application.config.stat2.name }}</span>
|
||||
<strong>{{ this.stat2value }}</strong>
|
||||
</li>
|
||||
</ul>
|
||||
</div>-->
|
||||
</div>
|
||||
<a :style="'color: ' + textColor" class="link white" :href="application.url" v-bind:target="application.link_tab === 'default' ? settings.default_link_tab : application.link_tab">
|
||||
<svg class="svg-inline--fa fa-arrow-alt-to-right fa-w-14" aria-hidden="true" data-prefix="fas" data-icon="arrow-alt-to-right" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" data-fa-i2svg="">
|
||||
<path fill="currentColor" d="M448 88v336c0 13.3-10.7 24-24 24h-24c-13.3 0-24-10.7-24-24V88c0-13.3 10.7-24 24-24h24c13.3 0 24 10.7 24 24zM24 320h136v87.7c0 17.8 21.5 26.7 34.1 14.1l152.2-152.2c7.5-7.5 7.5-19.8 0-27.3L194.1 90.1c-12.6-12.6-34.1-3.7-34.1 14.1V192H24c-13.3 0-24 10.7-24 24v80c0 13.3 10.7 24 24 24z"></path>
|
||||
</svg>
|
||||
<!-- <i class="fas fa-arrow-alt-to-right"></i> -->
|
||||
</a>
|
||||
<div v-if="application.description !== ''" content-class="tooltip-content" max-width="500px" anchor="top middle" self="bottom middle">{{ application.description }}</div>
|
||||
<!--<div v-if="application.config.enhancedType !== 'disabled'" @click="refreshData" class="tile-actions refresh">
|
||||
<q-icon class="" name="refresh"></q-icon>
|
||||
{{ $t('refresh_stats') }}
|
||||
</div>-->
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import EnhancedApps from '../plugins/EnhancedApps'
|
||||
import _ from 'lodash'
|
||||
export default {
|
||||
name: 'Tile',
|
||||
|
||||
props: ['application', 'stat1valueinit', 'stat2valueinit'],
|
||||
|
||||
components: {},
|
||||
|
||||
computed: {
|
||||
textColor() {
|
||||
return '#000000'
|
||||
const bgColor = this.bgColor
|
||||
const lightColor = '#ffffff'
|
||||
const darkColor = '#000000'
|
||||
const color = bgColor.charAt(0) === '#' ? bgColor.substring(1, 7) : bgColor
|
||||
const alpha = bgColor.charAt(0) === '#' ? bgColor.substring(7, 9) : bgColor.substring(6, 8)
|
||||
const r = parseInt(color.substring(0, 2), 16) // hexToR
|
||||
const g = parseInt(color.substring(2, 4), 16) // hexToG
|
||||
const b = parseInt(color.substring(4, 6), 16) // hexToB
|
||||
const a = parseFloat(parseInt((parseInt(alpha, 16) / 255) * 1000) / 1000)
|
||||
const brightness = r * 0.299 + g * 0.587 + b * 0.114 + (1 - a) * 255
|
||||
return brightness > 186 ? darkColor : lightColor
|
||||
},
|
||||
bgColor() {
|
||||
if (this.application.color !== 'null' && this.application.color !== null) {
|
||||
return this.application.color
|
||||
}
|
||||
return '#222222'
|
||||
},
|
||||
preview() {
|
||||
return this.application.preview
|
||||
},
|
||||
running() {
|
||||
// return this.$store.state.tiles.running
|
||||
},
|
||||
settings() {
|
||||
// return this.$store.state.app.settings
|
||||
},
|
||||
appIcon() {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
application: function (newdata, olddata) {
|
||||
clearTimeout(this.check)
|
||||
if (newdata.config.enhancedType !== 'disabled') {
|
||||
// this.checkVisible()
|
||||
}
|
||||
},
|
||||
running: function (newdata, olddata) {
|
||||
if (newdata === false) {
|
||||
clearTimeout(this.check)
|
||||
}
|
||||
if (olddata === false && newdata === true) {
|
||||
this.timedChecks()
|
||||
}
|
||||
},
|
||||
stat1valueinit: function (newdata, olddata) {
|
||||
this.stat1value = newdata
|
||||
},
|
||||
stat2valueinit: function (newdata, olddata) {
|
||||
this.stat2value = newdata
|
||||
}
|
||||
},
|
||||
|
||||
asyncComputed: {
|
||||
/*async appIcon() {
|
||||
if (this.application.icon === null) {
|
||||
return '/heimdall-logo-white.svg'
|
||||
}
|
||||
// Is a file upload
|
||||
if (typeof this.application.icon === 'object') {
|
||||
// work out how to preview the image
|
||||
console.log(this.application.icon)
|
||||
}
|
||||
// Is an image stored online
|
||||
if (this.application.icon && this.application.icon.startsWith('http')) {
|
||||
}
|
||||
return this.application.icon
|
||||
}*/
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
icon: this.$attrs.icon || '/heimdall-logo-white.svg',
|
||||
stat1value: this.stat1valueinit || null,
|
||||
stat2value: this.stat2valueinit || null,
|
||||
check: null,
|
||||
active: 2000,
|
||||
maxTimer: 45000,
|
||||
timer: 5000
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.refreshData()
|
||||
},
|
||||
methods: {
|
||||
async timedChecks() {
|
||||
const current1 = this.stat1value
|
||||
const current2 = this.stat2value
|
||||
const data = await this.checkForData()
|
||||
if (!data) {
|
||||
return
|
||||
}
|
||||
if (data.stat1 !== current1 && this.application.config.stat1.updateOnChange === 'Yes') {
|
||||
this.timer = this.active
|
||||
} else if (data.stat2 !== current2 && this.application.config.stat2.updateOnChange === 'Yes') {
|
||||
// There has been a change to the data
|
||||
this.timer = this.active
|
||||
} else {
|
||||
if (this.timer < this.maxTimer) this.timer += 5000
|
||||
}
|
||||
this.stat1value = data.stat1
|
||||
this.stat2value = data.stat2
|
||||
clearTimeout(this.check) // Make sure timer is cleared, it should be, but shouldn't hurt to make sure
|
||||
if (
|
||||
// check if update on change is set on at least 1 stat
|
||||
this.application.config.stat1.updateOnChange === 'Yes' ||
|
||||
this.application.config.stat2.updateOnChange === 'Yes'
|
||||
) {
|
||||
console.log('timer: ' + this.timer)
|
||||
this.check = setTimeout(this.timedChecks, this.timer)
|
||||
}
|
||||
},
|
||||
|
||||
async refreshData() {
|
||||
await this.timedChecks()
|
||||
this.$q.notify({
|
||||
message: this.$t('updated'),
|
||||
type: 'positive',
|
||||
progress: true,
|
||||
position: 'bottom',
|
||||
timeout: 1500
|
||||
})
|
||||
},
|
||||
|
||||
forceCheck() {
|
||||
clearTimeout(this.check)
|
||||
this.checkForData()
|
||||
},
|
||||
|
||||
async checkForData() {
|
||||
if (this.application.config.enhancedType && this.application.config.enhancedType !== 'disabled') {
|
||||
const enhanced = new EnhancedApps(this.application)
|
||||
let call
|
||||
try {
|
||||
call = await enhanced.call()
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
if (!call) {
|
||||
return
|
||||
}
|
||||
const stat1 = this.application.config.stat1.key !== null && this.application.config.stat1.key !== '' ? _.get(call.data.result.stat1, this.application.config.stat1.key, null) : call.data.result.stat1
|
||||
const stat2 = this.application.config.stat2.key !== null && this.application.config.stat2.key !== '' ? _.get(call.data.result.stat2, this.application.config.stat2.key, null) : call.data.result.stat2
|
||||
return {
|
||||
stat1: enhanced.filter(stat1, this.application.config.stat1),
|
||||
stat2: enhanced.filter(stat2, this.application.config.stat2)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
112
resources/assets/js/plugins/EnhancedApps.js
vendored
Normal file
112
resources/assets/js/plugins/EnhancedApps.js
vendored
Normal file
|
@ -0,0 +1,112 @@
|
|||
import axios from 'axios'
|
||||
// import { i18n } from 'boot/i18n.js'
|
||||
export default class EnhancedApps {
|
||||
constructor(application) {
|
||||
this.data = application.config
|
||||
this.id = application.id
|
||||
}
|
||||
|
||||
async call() {
|
||||
const request = await axios.get('enhanced/' + this.id)
|
||||
return request
|
||||
}
|
||||
|
||||
async test() {
|
||||
try {
|
||||
// console.log(this.data)
|
||||
const test = await axios.post('enhanced/test', this.data)
|
||||
/*Notify.create({
|
||||
type: 'positive',
|
||||
message: i18n.t('api_test_success') + ': ' + JSON.stringify(test.data),
|
||||
progress: true,
|
||||
position: 'bottom',
|
||||
timeout: 1500
|
||||
})*/
|
||||
return test
|
||||
} catch (e) {
|
||||
console.log(e.response)
|
||||
/*Notify.create({
|
||||
type: 'negative',
|
||||
message: i18n.t('api_test_failure') + ': ' + JSON.stringify(e.response.data.result),
|
||||
progress: true,
|
||||
position: 'bottom',
|
||||
timeout: 1500
|
||||
})*/
|
||||
}
|
||||
}
|
||||
|
||||
static types() {
|
||||
return [
|
||||
{
|
||||
id: 'disabled',
|
||||
value: 'disabled'
|
||||
},
|
||||
{
|
||||
id: 'none',
|
||||
value: 'none'
|
||||
},
|
||||
{
|
||||
id: 'apikey',
|
||||
value: 'apikey'
|
||||
},
|
||||
{
|
||||
id: 'cookie',
|
||||
value: 'cookie'
|
||||
},
|
||||
{
|
||||
id: 'basic_auth',
|
||||
value: 'basic_auth'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
humanFileSize(size) {
|
||||
const i = size === 0 ? 0 : Math.floor(Math.log(size) / Math.log(1024))
|
||||
return (size / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i]
|
||||
}
|
||||
|
||||
filter(value, stat) {
|
||||
switch (stat.filter) {
|
||||
case 'count':
|
||||
return value.length
|
||||
case 'size':
|
||||
return this.humanFileSize(value)
|
||||
case 'filter':
|
||||
return value.filter(val => {
|
||||
return val[stat.filterBy].toString() === stat.filterByValue.toString()
|
||||
}).length
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
static filters() {
|
||||
return [
|
||||
{
|
||||
id: 'none',
|
||||
value: 'none'
|
||||
},
|
||||
{
|
||||
id: 'size',
|
||||
value: 'size'
|
||||
},
|
||||
{
|
||||
id: 'speed',
|
||||
value: 'speed'
|
||||
},
|
||||
{
|
||||
id: 'count',
|
||||
value: 'count'
|
||||
},
|
||||
{
|
||||
id: 'filter',
|
||||
value: 'filter'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
fields() {
|
||||
if (this.data.type === 1) {
|
||||
return [{}]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -26,17 +26,92 @@
|
|||
<meta name="theme-color" content="#ffffff">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<link rel="stylesheet" href="{{ asset('css/app.css?v=2') }}" type="text/css" />
|
||||
<script src="{{ asset('js/fontawesome.js') }}"></script>
|
||||
<link href="{{ mix('/css/app.css') }}" rel="stylesheet" />
|
||||
<script src="{{ mix('/js/app.js') }}" defer></script>
|
||||
@if(config('app.url') !== 'http://localhost')
|
||||
<base href="{{ config('app.url') }}">
|
||||
@else
|
||||
<base href="{{ url('') }}">
|
||||
@endif
|
||||
@inertiaHead
|
||||
</head>
|
||||
<body>
|
||||
@inertia
|
||||
<div id="app"{!! $alt_bg !!}>
|
||||
<nav class="sidenav">
|
||||
<a class="close-sidenav" href=""><i class="fas fa-times-circle"></i></a>
|
||||
@if(isset($all_apps))
|
||||
<h2>{{ __('app.dash.pinned_items') }}</h2>
|
||||
<ul id="pinlist">
|
||||
@foreach($all_apps as $app)
|
||||
<?php
|
||||
$active = ((bool)$app->pinned === true) ? 'active' : '';
|
||||
?>
|
||||
<li>{{ $app->title }}<a class="{{ $active }}" data-tag="{{ $tag ?? 0 }}" data-id="{{ $app->id }}" href="{{ route('items.pintoggle', [$app->id]) }}"><i class="fas fa-thumbtack"></i></a></li>
|
||||
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</nav>
|
||||
<div class="content">
|
||||
<header class="appheader">
|
||||
<ul>
|
||||
<li><a href="{{ route('dash', []) }}">Dash</a></li><li>
|
||||
<a href="{{ route('items.index', []) }}">Items</a></li>
|
||||
</ul>
|
||||
</header>
|
||||
<main>
|
||||
@if ($message = Session::get('success'))
|
||||
<div class="message-container">
|
||||
<div class="alert alert-success">
|
||||
<p>{{ $message }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if (count($errors) > 0)
|
||||
<div class="message-container">
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if($allusers->count() > 1)
|
||||
<div id="switchuser">
|
||||
@if($current_user->avatar)
|
||||
<img class="user-img" src="{{ asset('/storage/'.$current_user->avatar) }}" />
|
||||
@else
|
||||
<img class="user-img" src="{{ asset('/img/heimdall-icon-small.png') }}" />
|
||||
@endif
|
||||
{{ $current_user->username }}
|
||||
<a class="btn" href="{{ route('user.select') }}">Switch User</a>
|
||||
</div>
|
||||
@endif
|
||||
@yield('content')
|
||||
<div id="config-buttons">
|
||||
|
||||
|
||||
@if(Route::is('dash') || Route::is('tags.show'))
|
||||
<a id="config-button" class="config" href=""><i class="fas fa-exchange"></i></a>
|
||||
@endif
|
||||
|
||||
<a id="dash" class="config" href="{{ route('dash', []) }}"><i class="fas fa-th"></i></a>
|
||||
@if($current_user->id === 1)
|
||||
<a id="users" class="config" href="{{ route('users.index', []) }}"><i class="fas fa-user"></i></a>
|
||||
@endif
|
||||
<a id="items" class="config" href="{{ route('items.index', []) }}"><i class="fas fa-list"></i></a>
|
||||
<a id="folder" class="config" href="{{ route('tags.index', []) }}"><i class="fas fa-tag"></i></a>
|
||||
<a id="settings" class="config" href="{{ route('settings.index', []) }}"><i class="fas fa-cogs"></i></a>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script src="{{ asset('js/jquery-3.3.1.min.js') }}"></script>
|
||||
<script src="{{ asset('js/jquery-ui.min.js') }}"></script>
|
||||
<script src="{{ asset('js/app.js?v=4') }}"></script>
|
||||
@yield('scripts')
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
2
webpack.mix.js
vendored
2
webpack.mix.js
vendored
|
@ -11,6 +11,6 @@ let mix = require('laravel-mix');
|
|||
|
|
||||
*/
|
||||
|
||||
mix.js('resources/assets/js/app.js', 'public/js').vue({ version: 2 })
|
||||
mix.js('resources/assets/js/app.js', 'public/js').vue({ version: 3 })
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue