Skip to content

Commit ba77e16

Browse files
committed
é infelizmente teria que att uns plugins antigos para fazer aquilo
1 parent d6c4293 commit ba77e16

10 files changed

Lines changed: 102 additions & 310 deletions

File tree

app/Http/Controllers/Admin/Jexactyl/StoreController.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ public function index(): View
4141
'mpago_enabled' => $this->settings->get($prefix . 'mpago:enabled', false),
4242
'mpago_discord_webhook' => $this->settings->get($prefix . 'mpago:discord:webhook', 0),
4343
'mpago_discord_enabled' => $this->settings->get($prefix . 'mpago:discord:enabled', false),
44-
'store_images_one' => $this->settings->get($prefix . 'images:one', 0),
45-
'store_images_two' => $this->settings->get($prefix . 'images:two', 0),
46-
'store_images_three' => $this->settings->get($prefix . 'images:three', 0),
4744

4845
'selected_currency' => $this->settings->get($prefix . 'currency', 'BRL'),
4946
'currencies' => $currencies,

app/Http/Requests/Admin/Jexactyl/StoreFormRequest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ public function rules(): array
3535
'store:limit:port' => 'required|int|min:1',
3636
'store:limit:backup' => 'required|int|min:1',
3737
'store:limit:database' => 'required|int|min:1',
38-
39-
'store:images:one' => 'string|nullable',
40-
'store:images:two' => 'string|nullable',
41-
'store:images:three' => 'string|nullable',
4238
];
4339
}
4440
}

app/Http/ViewComposers/StoreComposer.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ public function compose(View $view)
4848
'enabled' => $this->setting('earn:enabled', Composer::TYPE_BOOL),
4949
'amount' => $this->setting('earn:amount', Composer::TYPE_INT),
5050
],
51-
'images' => [
52-
'one' => $this->setting('store:images:one', Composer::TYPE_STR),
53-
'two' => $this->setting('store:images:two', Composer::TYPE_STR),
54-
'three' => $this->setting('store:images:three', Composer::TYPE_STR),
55-
]
5651
]);
5752
}
5853
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"reaptcha": "^1.7.2",
4646
"sockette": "^2.0.6",
4747
"strip-ansi": "^7.0.1",
48-
"styled-components": "^6.1.0",
48+
"styled-components": "^5.2.1",
4949
"styled-components-breakpoint": "^3.0.0-preview.20",
5050
"swr": "^0.2.3",
5151
"tailwindcss": "^3.0.24",

resources/scripts/assets/css/GlobalStylesheet.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
import tw from 'twin.macro';
2-
import { createGlobalStyle } from 'styled-components';
2+
import { createGlobalStyle } from 'styled-components/macro';
33

44
export default createGlobalStyle`
55
body {
66
${tw`bg-neutral-900 font-sans font-medium text-gray-200`};
77
}
88
9-
*{
10-
--jexactyl_image_store_one: ${(props) => `url(${props.theme.one})`}
11-
--jexactyl_image_store_two: ${(props) => `url(${props.theme.two})`}
12-
--jexactyl_image_store_three: ${(props) => `url(${props.theme.three})`}
13-
}
14-
159
h1, h2, h3, h4, h5, h6 {
1610
${tw`tracking-normal`};
1711
}

resources/scripts/components/App.tsx

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import React from 'react';
22
import tw from 'twin.macro';
33
import '@/assets/tailwind.css';
44
import { store } from '@/state';
@@ -7,12 +7,10 @@ import { hot } from 'react-hot-loader/root';
77
import { history } from '@/components/history';
88
import { SiteSettings } from '@/state/settings';
99
import IndexRouter from '@/routers/IndexRouter';
10-
import { ThemeProvider } from "styled-components";
1110
import earnCredits from '@/api/account/earnCredits';
1211
import { setupInterceptors } from '@/api/interceptors';
1312
import { StorefrontSettings } from '@/state/storefront';
1413
import GlobalStylesheet from '@/assets/css/GlobalStylesheet';
15-
import { Theme } from '@/theme';
1614

1715
interface ExtendedWindow extends Window {
1816
SiteConfiguration?: SiteSettings;
@@ -39,7 +37,7 @@ setupInterceptors(history);
3937

4038
const App = () => {
4139
const { JexactylUser, SiteConfiguration, StoreConfiguration } = window as ExtendedWindow;
42-
const [theme, setTheme] = useState<StorefrontSettings["images"]>()
40+
4341
if (JexactylUser && !store.getState().user.data) {
4442
store.getActions().user.setUserData({
4543
uuid: JexactylUser.uuid,
@@ -72,19 +70,15 @@ const App = () => {
7270
}
7371
}
7472
earn();
75-
if (!theme) {
76-
setTheme(Theme(store.getState().storefront.data!))
77-
}
73+
7874
return (
7975
<>
80-
<ThemeProvider theme={theme}>
81-
<GlobalStylesheet />
82-
<StoreProvider store={store}>
83-
<div css={tw`mx-auto w-auto`}>
84-
<IndexRouter />
85-
</div>
86-
</StoreProvider>
87-
</ThemeProvider>
76+
<GlobalStylesheet />
77+
<StoreProvider store={store}>
78+
<div css={tw`mx-auto w-auto`}>
79+
<IndexRouter />
80+
</div>
81+
</StoreProvider>
8882
</>
8983
);
9084
};

resources/scripts/state/storefront.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ export interface StorefrontSettings {
3333
enabled: boolean;
3434
amount: number;
3535
};
36-
images: {
37-
one: string;
38-
two: string;
39-
three: string;
40-
}
4136
}
4237

4338
export interface StorefrontStore {

resources/scripts/theme.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { BreakpointFunction, createBreakpoint } from 'styled-components-breakpoint';
2-
import { StorefrontSettings } from './state/storefront';
32

43
type Breakpoints = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
54

@@ -10,11 +9,3 @@ export const breakpoint: BreakpointFunction<Breakpoints> = createBreakpoint<Brea
109
lg: 1024,
1110
xl: 1280,
1211
});
13-
14-
export function Theme(data: StorefrontSettings ) {
15-
return {
16-
one: data?.images.one ?? 'https://www.minecraft.net/content/dam/games/minecraft/key-art/MC-Vanilla_Block-Column-Image_Boat-Trip_800x800.jpg',
17-
two: data?.images.two ?? 'https://www.minecraft.net/content/dam/games/minecraft/key-art/MC-Vanilla_Block-Column-Image_Beach-Cabin_800x800.jpg',
18-
three: data?.images.three ?? 'https://www.minecraft.net/content/dam/games/minecraft/key-art/MC-Vanilla_Block-Column-Image_Mining_800x800.jpg'
19-
}
20-
}

tailwind.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ module.exports = {
77
theme: {
88
extend: {
99
backgroundImage: {
10-
'storeone': "var(--jexactyl_image_store_one)",
11-
'storetwo': "var(--jexactyl_image_store_two)",
12-
'storethree': "var(--jexactyl_image_store_three)",
10+
'storeone': "url('https://www.minecraft.net/content/dam/games/minecraft/key-art/MC-Vanilla_Block-Column-Image_Boat-Trip_800x800.jpg')",
11+
'storetwo': "url('https://www.minecraft.net/content/dam/games/minecraft/key-art/MC-Vanilla_Block-Column-Image_Beach-Cabin_800x800.jpg')",
12+
'storethree': "url('https://www.minecraft.net/content/dam/games/minecraft/key-art/MC-Vanilla_Block-Column-Image_Mining_800x800.jpg')",
1313
},
1414
colors: {
1515
black: '#000',

0 commit comments

Comments
 (0)