Skip to content

Commit d604a4a

Browse files
Merge branch 'develop' into pagetitles2
2 parents 6d79ad2 + a966613 commit d604a4a

29 files changed

+215
-82
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ In addition to our standard nest of supported games, our community is constantly
4343
## Credits
4444
This software would not be possible without the work of other open-source authors who provide tools such as:
4545

46-
[Ace Editor](https://ace.c9.io), [AdminLTE](https://almsaeedstudio.com), [Animate.css](http://daneden.github.io/animate.css/), [AnsiUp](https://github.com/drudru/ansi_up), [Async.js](https://github.com/caolan/async),
46+
[Ace Editor](https://ace.c9.io), [AdminLTE](https://adminlte.io), [Animate.css](http://daneden.github.io/animate.css/), [AnsiUp](https://github.com/drudru/ansi_up), [Async.js](https://github.com/caolan/async),
4747
[Bootstrap](http://getbootstrap.com), [Bootstrap Notify](http://bootstrap-notify.remabledesigns.com), [Chart.js](http://www.chartjs.org), [FontAwesome](http://fontawesome.io),
4848
[FontAwesome Animations](https://github.com/l-lin/font-awesome-animation), [jQuery](http://jquery.com), [Laravel](https://laravel.com), [Lodash](https://lodash.com),
4949
[Select2](https://select2.github.io), [Socket.io](http://socket.io), [Socket.io File Upload](https://github.com/vote539/socketio-file-upload), [SweetAlert](http://t4t5.github.io/sweetalert),

app/Http/Requests/Admin/Settings/BaseSettingsFormRequest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public function rules()
1919
'app:name' => 'required|string|max:255',
2020
'pterodactyl:auth:2fa_required' => 'required|integer|in:0,1,2',
2121
'app:locale' => ['required', 'string', Rule::in(array_keys($this->getAvailableLanguages()))],
22+
'app:analytics' => 'nullable|string',
2223
];
2324
}
2425

@@ -31,6 +32,7 @@ public function attributes()
3132
'app:name' => 'Company Name',
3233
'pterodactyl:auth:2fa_required' => 'Require 2-Factor Authentication',
3334
'app:locale' => 'Default Language',
35+
'app:analytics' => 'Google Analytics',
3436
];
3537
}
3638
}

app/Http/ViewComposers/AssetComposer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public function compose(View $view)
3737
'enabled' => config('recaptcha.enabled', false),
3838
'siteKey' => config('recaptcha.website_key') ?? '',
3939
],
40+
'analytics' => config('app.analytics') ?? '',
4041
]);
4142
}
4243
}

app/Providers/SettingsServiceProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class SettingsServiceProvider extends ServiceProvider
2121
protected $keys = [
2222
'app:name',
2323
'app:locale',
24+
'app:analytics',
2425
'recaptcha:enabled',
2526
'recaptcha:secret_key',
2627
'recaptcha:website_key',

app/Transformers/Api/Client/StatsTransformer.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ public function transform(array $data)
2727
'current_state' => Arr::get($data, 'state', 'stopped'),
2828
'is_suspended' => Arr::get($data, 'suspended', false),
2929
'resources' => [
30-
'memory_bytes' => Arr::get($data, 'resources.memory_bytes', 0),
31-
'cpu_absolute' => Arr::get($data, 'resources.cpu_absolute', 0),
32-
'disk_bytes' => Arr::get($data, 'resources.disk_bytes', 0),
33-
'network_rx_bytes' => Arr::get($data, 'resources.network.rx_bytes', 0),
34-
'network_tx_bytes' => Arr::get($data, 'resources.network.tx_bytes', 0),
30+
'memory_bytes' => Arr::get($data, 'memory_bytes', 0),
31+
'cpu_absolute' => Arr::get($data, 'cpu_absolute', 0),
32+
'disk_bytes' => Arr::get($data, 'disk_bytes', 0),
33+
'network_rx_bytes' => Arr::get($data, 'network.rx_bytes', 0),
34+
'network_tx_bytes' => Arr::get($data, 'network.tx_bytes', 0),
3535
],
3636
];
3737
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"path": "^0.12.7",
2424
"query-string": "^6.7.0",
2525
"react": "^16.13.1",
26+
"react-ga": "^3.1.2",
2627
"react-dom": "npm:@hot-loader/react-dom",
2728
"react-fast-compare": "^3.2.0",
2829
"react-google-recaptcha": "^2.0.1",

resources/scripts/api/server/files/loadDirectory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import http from '@/api/http';
22
import { rawDataToFileObject } from '@/api/transformers';
33

44
export interface FileObject {
5-
uuid: string;
5+
key: string;
66
name: string;
77
mode: string;
88
size: number;

resources/scripts/api/transformers.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Allocation } from '@/api/server/getServer';
22
import { FractalResponseData } from '@/api/http';
33
import { FileObject } from '@/api/server/files/loadDirectory';
4-
import v4 from 'uuid/v4';
54

65
export const rawDataToServerAllocation = (data: FractalResponseData): Allocation => ({
76
id: data.attributes.id,
@@ -13,7 +12,7 @@ export const rawDataToServerAllocation = (data: FractalResponseData): Allocation
1312
});
1413

1514
export const rawDataToFileObject = (data: FractalResponseData): FileObject => ({
16-
uuid: v4(),
15+
key: `${data.attributes.is_file ? 'file' : 'dir'}_${data.attributes.name}`,
1716
name: data.attributes.name,
1817
mode: data.attributes.mode,
1918
size: Number(data.attributes.size),

resources/scripts/assets/css/GlobalStylesheet.ts

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ export default createGlobalStyle`
66
${tw`font-sans bg-neutral-800 text-neutral-200`};
77
letter-spacing: 0.015em;
88
}
9-
9+
1010
h1, h2, h3, h4, h5, h6 {
1111
${tw`font-medium tracking-normal font-header`};
1212
}
13-
13+
1414
p {
1515
${tw`text-neutral-200 leading-snug font-sans`};
1616
}
17-
17+
1818
form {
1919
${tw`m-0`};
2020
}
21-
21+
2222
textarea, select, input, button, button:focus, button:focus-visible {
2323
${tw`outline-none`};
2424
}
@@ -32,4 +32,41 @@ export default createGlobalStyle`
3232
input[type=number] {
3333
-moz-appearance: textfield !important;
3434
}
35+
36+
/* Scroll Bar Style */
37+
::-webkit-scrollbar {
38+
background: none;
39+
width: 16px;
40+
height: 16px;
41+
}
42+
43+
::-webkit-scrollbar-thumb {
44+
border: solid 0 rgb(0 0 0 / 0%);
45+
border-right-width: 4px;
46+
border-left-width: 4px;
47+
-webkit-border-radius: 9px 4px;
48+
-webkit-box-shadow: inset 0 0 0 1px hsl(211, 10%, 53%), inset 0 0 0 4px hsl(209deg 18% 30%);
49+
}
50+
51+
::-webkit-scrollbar-track-piece {
52+
margin: 4px 0;
53+
}
54+
55+
::-webkit-scrollbar-thumb:horizontal {
56+
border-right-width: 0;
57+
border-left-width: 0;
58+
border-top-width: 4px;
59+
border-bottom-width: 4px;
60+
-webkit-border-radius: 4px 9px;
61+
}
62+
63+
::-webkit-scrollbar-thumb:hover {
64+
-webkit-box-shadow:
65+
inset 0 0 0 1px hsl(212, 92%, 43%),
66+
inset 0 0 0 4px hsl(212, 92%, 43%);
67+
}
68+
69+
::-webkit-scrollbar-corner {
70+
background: transparent;
71+
}
3572
`;

resources/scripts/components/App.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import * as React from 'react';
1+
import React, { useEffect } from 'react';
2+
import ReactGA from 'react-ga';
23
import { hot } from 'react-hot-loader/root';
34
import { BrowserRouter, Route, Switch } from 'react-router-dom';
45
import { StoreProvider } from 'easy-peasy';
@@ -48,6 +49,11 @@ const App = () => {
4849
store.getActions().settings.setSettings(SiteConfiguration!);
4950
}
5051

52+
useEffect(() => {
53+
ReactGA.initialize(SiteConfiguration!.analytics);
54+
ReactGA.pageview(location.pathname);
55+
}, []);
56+
5157
return (
5258
<>
5359
<GlobalStylesheet/>

0 commit comments

Comments
 (0)