mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 15:06:02 +01:00
chore(web): add prettier and format
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { debugData } from "../../../utils/debugData";
|
||||
import { AlertProps } from "../../dialog/AlertDialog";
|
||||
import { debugData } from '../../../utils/debugData';
|
||||
import { AlertProps } from '../../dialog/AlertDialog';
|
||||
|
||||
export const debugAlert = () => {
|
||||
debugData<AlertProps>([
|
||||
{
|
||||
action: "sendAlert",
|
||||
action: 'sendAlert',
|
||||
data: {
|
||||
header: "Hello there",
|
||||
content: "General kenobi \n Markdown works",
|
||||
header: 'Hello there',
|
||||
content: 'General kenobi \n Markdown works',
|
||||
centered: true,
|
||||
cancel: true,
|
||||
},
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
import { ContextMenuProps } from "../../../interfaces/context";
|
||||
import { debugData } from "../../../utils/debugData";
|
||||
import { ContextMenuProps } from '../../../interfaces/context';
|
||||
import { debugData } from '../../../utils/debugData';
|
||||
|
||||
export const debugContext = () => {
|
||||
debugData<ContextMenuProps>([
|
||||
{
|
||||
action: "showContext",
|
||||
action: 'showContext',
|
||||
data: {
|
||||
title: "Vehicle garage",
|
||||
title: 'Vehicle garage',
|
||||
options: [
|
||||
{ title: "Empty button" },
|
||||
{ title: 'Empty button' },
|
||||
{
|
||||
title: "Example button",
|
||||
description: "Example button description",
|
||||
icon: "inbox",
|
||||
image: "https://i.imgur.com/YAe7k17.jpeg",
|
||||
metadata: [{ label: "Value 1", value: 300 }],
|
||||
title: 'Example button',
|
||||
description: 'Example button description',
|
||||
icon: 'inbox',
|
||||
image: 'https://i.imgur.com/YAe7k17.jpeg',
|
||||
metadata: [{ label: 'Value 1', value: 300 }],
|
||||
},
|
||||
{
|
||||
title: "Menu button",
|
||||
icon: "bars",
|
||||
menu: "other_example_menu",
|
||||
description: "Takes you to another menu",
|
||||
metadata: ["It also has metadata support"],
|
||||
title: 'Menu button',
|
||||
icon: 'bars',
|
||||
menu: 'other_example_menu',
|
||||
description: 'Takes you to another menu',
|
||||
metadata: ['It also has metadata support'],
|
||||
},
|
||||
{
|
||||
title: "Event button",
|
||||
description: "Open a menu and send event data",
|
||||
icon: "check",
|
||||
title: 'Event button',
|
||||
description: 'Open a menu and send event data',
|
||||
icon: 'check',
|
||||
arrow: true,
|
||||
event: "some_event",
|
||||
args: { value1: 300, value2: "Other value" },
|
||||
event: 'some_event',
|
||||
args: { value1: 300, value2: 'Other value' },
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
import { debugData } from "../../../utils/debugData";
|
||||
import { InputProps } from "../../dialog/InputDialog";
|
||||
import { debugData } from '../../../utils/debugData';
|
||||
import { InputProps } from '../../dialog/InputDialog';
|
||||
|
||||
export const debugInput = () => {
|
||||
debugData<InputProps>([
|
||||
{
|
||||
action: "openDialog",
|
||||
action: 'openDialog',
|
||||
data: {
|
||||
heading: "Police locker",
|
||||
heading: 'Police locker',
|
||||
rows: [
|
||||
{ type: "input", label: "Locker number", placeholder: "420" },
|
||||
{ type: "checkbox", label: "Some checkbox" },
|
||||
{ type: "input", label: "Locker PIN", password: true, icon: "lock" },
|
||||
{ type: "checkbox", label: "Some other checkbox", checked: true },
|
||||
{ type: 'input', label: 'Locker number', placeholder: '420' },
|
||||
{ type: 'checkbox', label: 'Some checkbox' },
|
||||
{ type: 'input', label: 'Locker PIN', password: true, icon: 'lock' },
|
||||
{ type: 'checkbox', label: 'Some other checkbox', checked: true },
|
||||
{
|
||||
type: "select",
|
||||
label: "Locker type",
|
||||
type: 'select',
|
||||
label: 'Locker type',
|
||||
options: [
|
||||
{ value: "option1" },
|
||||
{ value: "option2", label: "Option 2" },
|
||||
{ value: "option3", label: "Option 3" },
|
||||
{ value: 'option1' },
|
||||
{ value: 'option2', label: 'Option 2' },
|
||||
{ value: 'option3', label: 'Option 3' },
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "number",
|
||||
label: "Number counter",
|
||||
type: 'number',
|
||||
label: 'Number counter',
|
||||
default: 12,
|
||||
min: 3,
|
||||
max: 10,
|
||||
},
|
||||
{ type: "slider", label: "Slide bar", min: 10, max: 50, step: 2 },
|
||||
{ type: 'slider', label: 'Slide bar', min: 10, max: 50, step: 2 },
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
import { debugData } from "../../../utils/debugData";
|
||||
import { MenuSettings } from "../../menu/list";
|
||||
import { debugData } from '../../../utils/debugData';
|
||||
import { MenuSettings } from '../../menu/list';
|
||||
|
||||
export const debugMenu = () => {
|
||||
debugData<MenuSettings>([
|
||||
{
|
||||
action: "setMenu",
|
||||
action: 'setMenu',
|
||||
data: {
|
||||
// position: "bottom-left",
|
||||
title: "Vehicle garage",
|
||||
title: 'Vehicle garage',
|
||||
items: [
|
||||
{ label: "Option 1", icon: "heart" },
|
||||
{ label: 'Option 1', icon: 'heart' },
|
||||
{
|
||||
label: "Option 2",
|
||||
icon: "basket-shopping",
|
||||
description: "Tooltip description 1",
|
||||
label: 'Option 2',
|
||||
icon: 'basket-shopping',
|
||||
description: 'Tooltip description 1',
|
||||
},
|
||||
{
|
||||
label: "Vehicle class",
|
||||
values: ["Nice", "Super nice", "Extra nice"],
|
||||
icon: "tag",
|
||||
description: "Tooltip description 2",
|
||||
label: 'Vehicle class',
|
||||
values: ['Nice', 'Super nice', 'Extra nice'],
|
||||
icon: 'tag',
|
||||
description: 'Tooltip description 2',
|
||||
},
|
||||
{ label: "Option 1" },
|
||||
{ label: "Option 2" },
|
||||
{ label: 'Option 1' },
|
||||
{ label: 'Option 2' },
|
||||
{
|
||||
label: "Vehicle class",
|
||||
values: ["Nice", "Super nice", "Extra nice"],
|
||||
label: 'Vehicle class',
|
||||
values: ['Nice', 'Super nice', 'Extra nice'],
|
||||
defaultIndex: 1,
|
||||
},
|
||||
{ label: "Option 1" },
|
||||
{ label: "Option 2" },
|
||||
{ label: 'Option 1' },
|
||||
{ label: 'Option 2' },
|
||||
{
|
||||
label: "Vehicle class",
|
||||
values: ["Nice", "Super nice", "Extra nice"],
|
||||
label: 'Vehicle class',
|
||||
values: ['Nice', 'Super nice', 'Extra nice'],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
import {
|
||||
CustomNotificationProps,
|
||||
NotificationProps,
|
||||
} from "../../notifications/NotificationWrapper";
|
||||
import { debugData } from "../../../utils/debugData";
|
||||
import { CustomNotificationProps, NotificationProps } from '../../notifications/NotificationWrapper';
|
||||
import { debugData } from '../../../utils/debugData';
|
||||
|
||||
export const debugNotification = () => {
|
||||
debugData<NotificationProps>([
|
||||
{
|
||||
action: "notify",
|
||||
action: 'notify',
|
||||
data: {
|
||||
description: "Dunak is nerd",
|
||||
title: "Dunak",
|
||||
description: 'Dunak is nerd',
|
||||
title: 'Dunak',
|
||||
id: 1,
|
||||
},
|
||||
},
|
||||
@@ -20,13 +17,13 @@ export const debugNotification = () => {
|
||||
export const debugCustomNotification = () => {
|
||||
debugData<CustomNotificationProps>([
|
||||
{
|
||||
action: "customNotify",
|
||||
action: 'customNotify',
|
||||
data: {
|
||||
description: "Dunak is nerd",
|
||||
icon: "basket-shopping",
|
||||
description: 'Dunak is nerd',
|
||||
icon: 'basket-shopping',
|
||||
style: {
|
||||
backgroundColor: "#2D3748",
|
||||
color: "white",
|
||||
backgroundColor: '#2D3748',
|
||||
color: 'white',
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { debugData } from "../../../utils/debugData";
|
||||
import { ProgressbarProps } from "../../progress/Progressbar";
|
||||
import { debugData } from '../../../utils/debugData';
|
||||
import { ProgressbarProps } from '../../progress/Progressbar';
|
||||
|
||||
export const debugProgressbar = () => {
|
||||
debugData<ProgressbarProps>([
|
||||
{
|
||||
action: "progress",
|
||||
action: 'progress',
|
||||
data: {
|
||||
label: "Using Lockpick",
|
||||
label: 'Using Lockpick',
|
||||
duration: 8000,
|
||||
},
|
||||
},
|
||||
@@ -16,10 +16,10 @@ export const debugProgressbar = () => {
|
||||
export const debugCircleProgressbar = () => {
|
||||
debugData([
|
||||
{
|
||||
action: "circleProgress",
|
||||
action: 'circleProgress',
|
||||
data: {
|
||||
duration: 8000,
|
||||
label: "Using Armour",
|
||||
label: 'Using Armour',
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { debugData } from "../../../utils/debugData";
|
||||
import { debugData } from '../../../utils/debugData';
|
||||
|
||||
export const debugSettings = () => {
|
||||
debugData([
|
||||
{
|
||||
action: "openSettings",
|
||||
data: true,
|
||||
},
|
||||
]);
|
||||
}
|
||||
{
|
||||
action: 'openSettings',
|
||||
data: true,
|
||||
},
|
||||
]);
|
||||
};
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { TextUiProps } from "../../textui/TextUI";
|
||||
import { debugData } from "../../../utils/debugData";
|
||||
import { TextUiProps } from '../../textui/TextUI';
|
||||
import { debugData } from '../../../utils/debugData';
|
||||
|
||||
export const debugTextUI = () => {
|
||||
debugData<TextUiProps>([
|
||||
{
|
||||
action: "textUi",
|
||||
action: 'textUi',
|
||||
data: {
|
||||
text: "[E] - Access locker inventory \n [G] - Do something else",
|
||||
position: "right-center",
|
||||
icon: "door-open",
|
||||
text: '[E] - Access locker inventory \n [G] - Do something else',
|
||||
position: 'right-center',
|
||||
icon: 'door-open',
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -10,19 +10,16 @@ import {
|
||||
VStack,
|
||||
Divider,
|
||||
useDisclosure,
|
||||
} from "@chakra-ui/react";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { debugAlert } from "./debug/alert";
|
||||
import { debugContext } from "./debug/context";
|
||||
import { debugInput } from "./debug/input";
|
||||
import { debugMenu } from "./debug/menu";
|
||||
import {
|
||||
debugCustomNotification,
|
||||
debugNotification,
|
||||
} from "./debug/notification";
|
||||
import { debugCircleProgressbar, debugProgressbar } from "./debug/progress";
|
||||
import { debugTextUI } from "./debug/textui";
|
||||
import { debugSettings } from "./debug/settings";
|
||||
} from '@chakra-ui/react';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { debugAlert } from './debug/alert';
|
||||
import { debugContext } from './debug/context';
|
||||
import { debugInput } from './debug/input';
|
||||
import { debugMenu } from './debug/menu';
|
||||
import { debugCustomNotification, debugNotification } from './debug/notification';
|
||||
import { debugCircleProgressbar, debugProgressbar } from './debug/progress';
|
||||
import { debugTextUI } from './debug/textui';
|
||||
import { debugSettings } from './debug/settings';
|
||||
|
||||
const Dev: React.FC = () => {
|
||||
const { isOpen, onOpen, onClose } = useDisclosure();
|
||||
|
||||
Reference in New Issue
Block a user