diff --git a/build/ui/assets/css/index.css b/build/ui/assets/css/index.css new file mode 100644 index 0000000..46c36de --- /dev/null +++ b/build/ui/assets/css/index.css @@ -0,0 +1,26 @@ +* { + font-family: "Geist", sans-serif; + color: #E2E2E2; + transition: ease-in-out 200ms all; +} + +::-webkit-scrollbar { + display: none; +} + +.text-muted { + color: #a1a1aa; +} + +.bg-body { + background-color: #0c0c0f8a; +} + +.bg-title { + background-color: #27272aa1; + backdrop-filter: blur(1px); +} + +.bg-weapons { + background-color: #27272a69; +} \ No newline at end of file diff --git a/build/ui/assets/css/tailwind/output.css b/build/ui/assets/css/tailwind/output.css new file mode 100644 index 0000000..5cdda27 --- /dev/null +++ b/build/ui/assets/css/tailwind/output.css @@ -0,0 +1,467 @@ +/*! tailwindcss v4.1.5 | MIT License | https://tailwindcss.com */ +@layer properties; +@layer theme, base, components, utilities; +@layer theme { + :root, :host { + --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", + "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", + "Courier New", monospace; + --color-white: #fff; + --spacing: 0.25rem; + --text-sm: 0.875rem; + --text-sm--line-height: calc(1.25 / 0.875); + --text-xl: 1.25rem; + --text-xl--line-height: calc(1.75 / 1.25); + --text-5xl: 3rem; + --text-5xl--line-height: 1; + --font-weight-semibold: 600; + --font-weight-bold: 700; + --font-weight-extrabold: 800; + --tracking-tighter: -0.05em; + --radius-lg: 0.5rem; + --blur-sm: 8px; + --default-font-family: var(--font-sans); + --default-mono-font-family: var(--font-mono); + } +} +@layer base { + *, ::after, ::before, ::backdrop, ::file-selector-button { + box-sizing: border-box; + margin: 0; + padding: 0; + border: 0 solid; + } + html, :host { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + tab-size: 4; + font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); + font-feature-settings: var(--default-font-feature-settings, normal); + font-variation-settings: var(--default-font-variation-settings, normal); + -webkit-tap-highlight-color: transparent; + } + hr { + height: 0; + color: inherit; + border-top-width: 1px; + } + abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + h1, h2, h3, h4, h5, h6 { + font-size: inherit; + font-weight: inherit; + } + a { + color: inherit; + -webkit-text-decoration: inherit; + text-decoration: inherit; + } + b, strong { + font-weight: bolder; + } + code, kbd, samp, pre { + font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); + font-feature-settings: var(--default-mono-font-feature-settings, normal); + font-variation-settings: var(--default-mono-font-variation-settings, normal); + font-size: 1em; + } + small { + font-size: 80%; + } + sub, sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + sub { + bottom: -0.25em; + } + sup { + top: -0.5em; + } + table { + text-indent: 0; + border-color: inherit; + border-collapse: collapse; + } + :-moz-focusring { + outline: auto; + } + progress { + vertical-align: baseline; + } + summary { + display: list-item; + } + ol, ul, menu { + list-style: none; + } + img, svg, video, canvas, audio, iframe, embed, object { + display: block; + vertical-align: middle; + } + img, video { + max-width: 100%; + height: auto; + } + button, input, select, optgroup, textarea, ::file-selector-button { + font: inherit; + font-feature-settings: inherit; + font-variation-settings: inherit; + letter-spacing: inherit; + color: inherit; + border-radius: 0; + background-color: transparent; + opacity: 1; + } + :where(select:is([multiple], [size])) optgroup { + font-weight: bolder; + } + :where(select:is([multiple], [size])) optgroup option { + padding-inline-start: 20px; + } + ::file-selector-button { + margin-inline-end: 4px; + } + ::placeholder { + opacity: 1; + } + @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) { + ::placeholder { + color: currentcolor; + @supports (color: color-mix(in lab, red, red)) { + color: color-mix(in oklab, currentcolor 50%, transparent); + } + } + } + textarea { + resize: vertical; + } + ::-webkit-search-decoration { + -webkit-appearance: none; + } + ::-webkit-date-and-time-value { + min-height: 1lh; + text-align: inherit; + } + ::-webkit-datetime-edit { + display: inline-flex; + } + ::-webkit-datetime-edit-fields-wrapper { + padding: 0; + } + ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field { + padding-block: 0; + } + :-moz-ui-invalid { + box-shadow: none; + } + button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button { + appearance: button; + } + ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { + height: auto; + } + [hidden]:where(:not([hidden="until-found"])) { + display: none !important; + } +} +@layer utilities { + .fixed { + position: fixed; + } + .me-4 { + margin-inline-end: calc(var(--spacing) * 4); + } + .mt-36 { + margin-top: calc(var(--spacing) * 36); + } + .mb-2 { + margin-bottom: calc(var(--spacing) * 2); + } + .mb-4 { + margin-bottom: calc(var(--spacing) * 4); + } + .mb-8 { + margin-bottom: calc(var(--spacing) * 8); + } + .flex { + display: flex; + } + .h-\[600px\] { + height: 600px; + } + .h-screen { + height: 100vh; + } + .w-16 { + width: calc(var(--spacing) * 16); + } + .w-\[80\%\] { + width: 80%; + } + .w-full { + width: 100%; + } + .flex-row { + flex-direction: row; + } + .items-center { + align-items: center; + } + .justify-between { + justify-content: space-between; + } + .justify-center { + justify-content: center; + } + .overflow-y-auto { + overflow-y: auto; + } + .rounded-lg { + border-radius: var(--radius-lg); + } + .rounded-t-lg { + border-top-left-radius: var(--radius-lg); + border-top-right-radius: var(--radius-lg); + } + .border { + border-style: var(--tw-border-style); + border-width: 1px; + } + .border-\[\#27272a\] { + border-color: #27272a; + } + .bg-\[\#0c0c0f\] { + background-color: #0c0c0f; + } + .bg-\[\#1c1c1f\] { + background-color: #1c1c1f; + } + .bg-\[\#09090B\] { + background-color: #09090B; + } + .bg-\[\#27272a\]\/50 { + background-color: color-mix(in oklab, #27272a 50%, transparent); + } + .p-6 { + padding: calc(var(--spacing) * 6); + } + .px-4 { + padding-inline: calc(var(--spacing) * 4); + } + .px-6 { + padding-inline: calc(var(--spacing) * 6); + } + .py-1\.5 { + padding-block: calc(var(--spacing) * 1.5); + } + .py-3 { + padding-block: calc(var(--spacing) * 3); + } + .text-5xl { + font-size: var(--text-5xl); + line-height: var(--tw-leading, var(--text-5xl--line-height)); + } + .text-sm { + font-size: var(--text-sm); + line-height: var(--tw-leading, var(--text-sm--line-height)); + } + .text-xl { + font-size: var(--text-xl); + line-height: var(--tw-leading, var(--text-xl--line-height)); + } + .font-bold { + --tw-font-weight: var(--font-weight-bold); + font-weight: var(--font-weight-bold); + } + .font-extrabold { + --tw-font-weight: var(--font-weight-extrabold); + font-weight: var(--font-weight-extrabold); + } + .font-semibold { + --tw-font-weight: var(--font-weight-semibold); + font-weight: var(--font-weight-semibold); + } + .tracking-tighter { + --tw-tracking: var(--tracking-tighter); + letter-spacing: var(--tracking-tighter); + } + .shadow-lg { + --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .backdrop-blur-sm { + --tw-backdrop-blur: blur(var(--blur-sm)); + -webkit-backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,); + backdrop-filter: var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,); + } + .hover\:bg-\[\#27272a\] { + &:hover { + @media (hover: hover) { + background-color: #27272a; + } + } + } + .focus\:border-white { + &:focus { + border-color: var(--color-white); + } + } + .focus\:outline-none { + &:focus { + --tw-outline-style: none; + outline-style: none; + } + } +} +@property --tw-border-style { + syntax: "*"; + inherits: false; + initial-value: solid; +} +@property --tw-font-weight { + syntax: "*"; + inherits: false; +} +@property --tw-tracking { + syntax: "*"; + inherits: false; +} +@property --tw-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-shadow-color { + syntax: "*"; + inherits: false; +} +@property --tw-shadow-alpha { + syntax: ""; + inherits: false; + initial-value: 100%; +} +@property --tw-inset-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-inset-shadow-color { + syntax: "*"; + inherits: false; +} +@property --tw-inset-shadow-alpha { + syntax: ""; + inherits: false; + initial-value: 100%; +} +@property --tw-ring-color { + syntax: "*"; + inherits: false; +} +@property --tw-ring-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-inset-ring-color { + syntax: "*"; + inherits: false; +} +@property --tw-inset-ring-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-ring-inset { + syntax: "*"; + inherits: false; +} +@property --tw-ring-offset-width { + syntax: ""; + inherits: false; + initial-value: 0px; +} +@property --tw-ring-offset-color { + syntax: "*"; + inherits: false; + initial-value: #fff; +} +@property --tw-ring-offset-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-backdrop-blur { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-brightness { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-contrast { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-grayscale { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-hue-rotate { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-invert { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-opacity { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-saturate { + syntax: "*"; + inherits: false; +} +@property --tw-backdrop-sepia { + syntax: "*"; + inherits: false; +} +@layer properties { + @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) { + *, ::before, ::after, ::backdrop { + --tw-border-style: solid; + --tw-font-weight: initial; + --tw-tracking: initial; + --tw-shadow: 0 0 #0000; + --tw-shadow-color: initial; + --tw-shadow-alpha: 100%; + --tw-inset-shadow: 0 0 #0000; + --tw-inset-shadow-color: initial; + --tw-inset-shadow-alpha: 100%; + --tw-ring-color: initial; + --tw-ring-shadow: 0 0 #0000; + --tw-inset-ring-color: initial; + --tw-inset-ring-shadow: 0 0 #0000; + --tw-ring-inset: initial; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-offset-shadow: 0 0 #0000; + --tw-backdrop-blur: initial; + --tw-backdrop-brightness: initial; + --tw-backdrop-contrast: initial; + --tw-backdrop-grayscale: initial; + --tw-backdrop-hue-rotate: initial; + --tw-backdrop-invert: initial; + --tw-backdrop-opacity: initial; + --tw-backdrop-saturate: initial; + --tw-backdrop-sepia: initial; + } + } +} diff --git a/build/ui/assets/css/tailwind/tailwind-full.css b/build/ui/assets/css/tailwind/tailwind-full.css new file mode 100644 index 0000000..392de1c --- /dev/null +++ b/build/ui/assets/css/tailwind/tailwind-full.css @@ -0,0 +1,2 @@ +/*! tailwindcss v4.1.5 | MIT License | https://tailwindcss.com */ +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-white:#fff;--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-tighter:-.05em;--radius-lg:.5rem;--blur-sm:8px;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.fixed{position:fixed}.me-4{margin-inline-end:calc(var(--spacing)*4)}.mt-36{margin-top:calc(var(--spacing)*36)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.flex{display:flex}.h-\[600px\]{height:600px}.h-screen{height:100vh}.w-16{width:calc(var(--spacing)*16)}.w-\[80\%\]{width:80%}.w-full{width:100%}.flex-row{flex-direction:row}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.overflow-y-auto{overflow-y:auto}.rounded-lg{border-radius:var(--radius-lg)}.rounded-t-lg{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-\[\#27272a\]{border-color:#27272a}.bg-\[\#0c0c0f\]{background-color:#0c0c0f}.bg-\[\#1c1c1f\]{background-color:#1c1c1f}.bg-\[\#09090B\]{background-color:#09090b}.bg-\[\#27272a\]\/50{background-color:oklab(27.3936% .00151277 -.00526419/.5)}.p-6{padding:calc(var(--spacing)*6)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-3{padding-block:calc(var(--spacing)*3)}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}@media (hover:hover){.hover\:bg-\[\#27272a\]:hover{background-color:#27272a}}.focus\:border-white:focus{border-color:var(--color-white)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false} \ No newline at end of file diff --git a/build/ui/assets/img/WEAPON_FN509.png b/build/ui/assets/img/WEAPON_FN509.png new file mode 100644 index 0000000..525bc39 Binary files /dev/null and b/build/ui/assets/img/WEAPON_FN509.png differ diff --git a/build/ui/assets/img/WEAPON_FNX45.png b/build/ui/assets/img/WEAPON_FNX45.png new file mode 100644 index 0000000..fb7d5e5 Binary files /dev/null and b/build/ui/assets/img/WEAPON_FNX45.png differ diff --git a/build/ui/assets/img/WEAPON_G22.png b/build/ui/assets/img/WEAPON_G22.png new file mode 100644 index 0000000..14576be Binary files /dev/null and b/build/ui/assets/img/WEAPON_G22.png differ diff --git a/build/ui/assets/img/WEAPON_G23B.png b/build/ui/assets/img/WEAPON_G23B.png new file mode 100644 index 0000000..1d29e9d Binary files /dev/null and b/build/ui/assets/img/WEAPON_G23B.png differ diff --git a/build/ui/assets/img/WEAPON_G26.png b/build/ui/assets/img/WEAPON_G26.png new file mode 100644 index 0000000..3d13fb3 Binary files /dev/null and b/build/ui/assets/img/WEAPON_G26.png differ diff --git a/build/ui/assets/img/WEAPON_MICROSMG.png b/build/ui/assets/img/WEAPON_MICROSMG.png new file mode 100644 index 0000000..c7acf49 Binary files /dev/null and b/build/ui/assets/img/WEAPON_MICROSMG.png differ diff --git a/build/ui/assets/img/WEAPON_PISTOL.png b/build/ui/assets/img/WEAPON_PISTOL.png new file mode 100644 index 0000000..66f8f0d Binary files /dev/null and b/build/ui/assets/img/WEAPON_PISTOL.png differ diff --git a/build/ui/assets/img/WEAPON_XDM.png b/build/ui/assets/img/WEAPON_XDM.png new file mode 100644 index 0000000..8f51de2 Binary files /dev/null and b/build/ui/assets/img/WEAPON_XDM.png differ diff --git a/build/ui/assets/img/weapon_g23.png b/build/ui/assets/img/weapon_g23.png new file mode 100644 index 0000000..07e6ba6 Binary files /dev/null and b/build/ui/assets/img/weapon_g23.png differ diff --git a/build/ui/assets/img/weapon_gh.png b/build/ui/assets/img/weapon_gh.png new file mode 100644 index 0000000..9f10fc5 Binary files /dev/null and b/build/ui/assets/img/weapon_gh.png differ diff --git a/build/ui/assets/js/app.js b/build/ui/assets/js/app.js new file mode 100644 index 0000000..f84667e --- /dev/null +++ b/build/ui/assets/js/app.js @@ -0,0 +1,96 @@ +let weapons = []; + +document.body.style.display = "none"; + +function closeMenu() { + document.body.style.display = "none"; + fetch(`https://${GetParentResourceName()}/closeMenu`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({}) + }); +} + +window.addEventListener('message', (event) => { + const data = event.data; + + if (data.action === true) { + document.body.style.display = "flex"; + } else if (data.action === false) { + document.body.style.display = "none"; + } +}); + +addEventListener("keyup", function (event) { + if (event.key === "Escape") { + closeMenu(); + } +}); + +// const closeBtn = document.getElementById('closeBtn'); + +// closeBtn.addEventListener('click', function () { +// closeMenu(); +// }); + +fetch(`https://${GetParentResourceName()}/getWeapons`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({}) + }) + .then(res => res.json()) + .then(data => { + weapons = data; + renderWeapons(); + }); + +const list = document.getElementById('weapon-list'); +const search = document.getElementById('search'); + +function renderWeapons(filter = "") { + list.innerHTML = ""; + + let filterLower = filter.toLowerCase(); + let found = false; + + for (let i = 0; i < weapons.length; i++) { + let w = weapons[i]; + let nameLower = w.name.toLowerCase(); + + if (nameLower.includes(filterLower)) { + found = true; + list.innerHTML += ` +
+
+
+
+ image of ${w.name} +
+
+

${w.name}

+

${w.code}

+
+
+ + Give +
+
+ `; + } + } + list.innerHTML += `${found === false ? `

No weapons found

` : ``}`; +} + +search.addEventListener('input', (e) => { + renderWeapons(e.target.value); +}); + +function giveWeapon(weaponCode, weaponLabel) { + fetch(`https://${GetParentResourceName()}/giveWeapon`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ weapon: weaponCode, label: weaponLabel }) + }).then(() => { + document.body.style.display = "none"; + }); +} diff --git a/build/ui/index.html b/build/ui/index.html new file mode 100644 index 0000000..949f35c --- /dev/null +++ b/build/ui/index.html @@ -0,0 +1,55 @@ + + + + + + + UI - Weapon Script + + + + + + + + + + + + + + + +
+ +
+
+

Weapon Tablet

+

Find all the guns of your server in one place!

+
+ +
+ +
+
+ +
+
+ +
+
+
+
+ +
+ + + + + + + + \ No newline at end of file diff --git a/client.lua b/client.lua new file mode 100644 index 0000000..0da86da --- /dev/null +++ b/client.lua @@ -0,0 +1,31 @@ +local menuOpen = false + +RegisterNetEvent("openWeaponMenu") +AddEventHandler("openWeaponMenu", function() + menuOpen = true + SetNuiFocus(true, true) + SendNUIMessage({ + action = menuOpen + }) +end) + +RegisterNUICallback("closeMenu", function(data, cb) + menuOpen = false + SetNuiFocus(false, false) + cb({}) +end) + +RegisterNUICallback('getWeapons', function(data, cb) + cb(Config.Weapons) +end) + +RegisterNUICallback("giveWeapon", function(data, cb) + local weapon = data.weapon + local label = data.label + + TriggerServerEvent("weapons:giveWeapon", weapon, label) + + menuOpen = false + SetNuiFocus(false, false) + cb({}) +end) \ No newline at end of file diff --git a/config.lua b/config.lua new file mode 100644 index 0000000..3a5e6ff --- /dev/null +++ b/config.lua @@ -0,0 +1,14 @@ +Config = {} + +Config.Weapons = { + { name = "Glock 26", code = "WEAPON_G26" }, + { name = "FN 509", code = "WEAPON_FN509" }, + { name = "Glock 22", code = "WEAPON_G22" }, + { name = "Glock 23 With A Beam", code = "WEAPON_G23B" }, + { name = "Ghost Glock With a Muzzle", code = "WEAPON_GH" }, + { name = "Glock 23", code = "WEAPON_G23" }, + { name = "FNX 45", code = "WEAPON_FNX45" }, + { name = "XDM Elite", code = "WEAPON_XDM" }, + { name = "Pistol", code = "WEAPON_PISTOL" }, + { name = "UZI", code = "WEAPON_MICROSMG" }, +} \ No newline at end of file diff --git a/fxmanifest.lua b/fxmanifest.lua new file mode 100644 index 0000000..519b951 --- /dev/null +++ b/fxmanifest.lua @@ -0,0 +1,28 @@ +fx_version 'cerulean' +game 'gta5' +lua54 'yes' + +author 'real! (c1pps.web)' +discord 'https://discord.gg/Z6MgxcWH97' +description 'Weapon Tablet for Staffs' + +dependency 'ox_inventory' + +ui_page 'build/ui/index.html' + +files { + 'build/ui/**/*' +} + +shared_scripts { + 'config.lua', + '@ox_lib/init.lua', +} + +client_scripts { + 'client.lua' +} + +server_scripts { + 'server.lua' +} \ No newline at end of file diff --git a/server.lua b/server.lua new file mode 100644 index 0000000..1c6f6f3 --- /dev/null +++ b/server.lua @@ -0,0 +1,35 @@ +RegisterCommand("weapons", function(source) + local src = source + + if IsPlayerAceAllowed(src, "weapon.menu") then + TriggerClientEvent("openWeaponMenu", src) + else + TriggerClientEvent('ox_lib:notify', src, { + title = 'Permission', + description = 'You don\'t have the permission to open this menu.', + type = 'error' + }) + end +end, false) + + +RegisterServerEvent("weapons:giveWeapon") +AddEventHandler("weapons:giveWeapon", function(weapon, label) + local src = source + + local success = exports.ox_inventory:AddItem(src, weapon, 1) + + if success then + TriggerClientEvent('ox_lib:notify', src, { + title = 'Weapon Menu', + description = 'You received : ' .. label, + type = 'success' + }) + else + TriggerClientEvent('ox_lib:notify', src, { + title = 'Weapon Menu', + description = 'Impossible to receive the weapon ' .. weapon, + type = 'error' + }) + end +end) \ No newline at end of file