mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-09-04 16:23:21 +00:00
Refactor core structure and notification UI
Major refactor to centralize QBCore and replace the web UI stack: - Move QBConfig into a unified QBCore.Config and initialize QBCore.PlayerData; add shared/functions.lua. - Remove legacy client/main.lua and server/main.lua exports and update fxmanifest to include shared/functions and drop those main scripts. - Update client event handling: adapt player data events to QBCore:Client:OnPlayerUpdated and trigger job/gang update events; remove deprecated exploitable handlers. - Web UI rewrite: remove Vue/Quasar dependency and config module; implement a lightweight vanilla JS notification system (html/js/app.js) with updated html and css assets, plus drawtext tweaks. - CSS overhaul for notification styling and animations; HTML head/meta/font cleanup. - Server fixes: use QBCore.Shared.Locations in teleport command and strengthen numeric parsing/validation for coords. - Add .gitattributes for consistent text/eol handling and small code cleanups (thread/comment removal). These changes consolidate config/shared logic under QBCore, simplify the frontend dependencies, and fix a few parsing/event issues.
This commit is contained in:
+3
-30
@@ -1,35 +1,8 @@
|
||||
:root {
|
||||
/* Typography */
|
||||
--font-primary: "Exo 2", sans-serif;
|
||||
--font-weight-regular: 400;
|
||||
--font-weight-medium: 500;
|
||||
--font-weight-bold: 700;
|
||||
--font-weight-light: 300;
|
||||
/* Colors */
|
||||
--md-primary: #1c75d2;
|
||||
--md-primary-container: #6facec;
|
||||
--md-error: #c10114;
|
||||
--md-error-container: #fe4255;
|
||||
--md-success: #20bb44;
|
||||
--md-success-container: #6ae587;
|
||||
--md-warning: #ff9800;
|
||||
--md-warning-container: #ffc107;
|
||||
--md-info: #2197f2;
|
||||
--md-info-container: #7ac1f7;
|
||||
--md-surface: #fffbff;
|
||||
--md-on-surface: #1c1b1f;
|
||||
|
||||
/* Custom Variables */
|
||||
--primary-bg: rgba(23, 23, 23, 90%);
|
||||
--active-bg: var(--md-error);
|
||||
--font-color: white;
|
||||
|
||||
/* Elevation */
|
||||
--primary-bg: #211f26;
|
||||
--active-bg: #c10114;
|
||||
--font-color: #e6e1e5;
|
||||
--md-elevation-1: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);
|
||||
|
||||
/* Border Radius */
|
||||
--md-radius-small: 5px;
|
||||
--md-radius-medium: 10px;
|
||||
--md-radius-extra-small: 0.15rem;
|
||||
}
|
||||
|
||||
|
||||
+93
-117
@@ -1,49 +1,8 @@
|
||||
:root {
|
||||
/* Typography */
|
||||
--font-primary: "Exo 2", sans-serif;
|
||||
--font-weight-regular: 400;
|
||||
--font-weight-medium: 500;
|
||||
--font-weight-bold: 700;
|
||||
--font-weight-light: 300;
|
||||
|
||||
/* Colors */
|
||||
--md-primary: #0061a4;
|
||||
--md-on-primary: #ffffff;
|
||||
--md-primary-container: #d1e4ff;
|
||||
--md-on-primary-container: #001d36;
|
||||
|
||||
--md-error: #ba1a1a;
|
||||
--md-on-error: #ffffff;
|
||||
--md-error-container: #ffdad6;
|
||||
--md-on-error-container: #410002;
|
||||
|
||||
--md-success: #006e1c;
|
||||
--md-on-success: #ffffff;
|
||||
--md-success-container: #9df996;
|
||||
--md-on-success-container: #002106;
|
||||
|
||||
--md-warning: #7d5800;
|
||||
--md-on-warning: #ffffff;
|
||||
--md-warning-container: #ffdf93;
|
||||
--md-on-warning-container: #271900;
|
||||
|
||||
--md-info: #0062a1;
|
||||
--md-on-info: #ffffff;
|
||||
--md-info-container: #d0e4ff;
|
||||
--md-on-info-container: #001d35;
|
||||
|
||||
/* Surface colors */
|
||||
--md-surface: #fcfcff;
|
||||
--md-on-surface: #1a1c1e;
|
||||
--md-surface-variant: #dfe2eb;
|
||||
--md-on-surface-variant: #43474e;
|
||||
|
||||
/* Elevation */
|
||||
--md-elevation-1: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);
|
||||
|
||||
/* Border Radius */
|
||||
--md-radius-small: 4px;
|
||||
--md-radius-medium: 8px;
|
||||
}
|
||||
|
||||
* {
|
||||
@@ -55,94 +14,111 @@ html::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (width: 3840px) and (height: 2160px) {
|
||||
.success {
|
||||
background-color: rgba(23, 23, 23, 90%);
|
||||
color: var(--md-on-surface);
|
||||
box-shadow: var(--md-elevation-1);
|
||||
border-left: 0.5rem solid var(--md-success);
|
||||
font-size: 1.5vh;
|
||||
}
|
||||
|
||||
.primary {
|
||||
background-color: rgba(23, 23, 23, 90%);
|
||||
color: var(--md-on-surface);
|
||||
box-shadow: var(--md-elevation-1);
|
||||
border-left: 5px solid var(--md-primary);
|
||||
font-size: 1.5vh;
|
||||
}
|
||||
|
||||
.error {
|
||||
background-color: rgba(23, 23, 23, 90%);
|
||||
color: var(--md-on-surface);
|
||||
box-shadow: var(--md-elevation-1);
|
||||
border-left: 5px solid var(--md-error);
|
||||
font-size: 1.5vh;
|
||||
}
|
||||
|
||||
.warning {
|
||||
background-color: rgba(23, 23, 23, 90%);
|
||||
color: var(--md-on-surface);
|
||||
box-shadow: var(--md-elevation-1);
|
||||
border-left: 5px solid var(--md-warning);
|
||||
font-size: 1.5vh;
|
||||
}
|
||||
|
||||
.police {
|
||||
background-color: rgba(23, 23, 23, 90%);
|
||||
color: var(--md-on-surface);
|
||||
box-shadow: var(--md-elevation-1);
|
||||
border-left: 5px solid var(--md-info);
|
||||
font-size: 1.5vh;
|
||||
}
|
||||
|
||||
.ambulance {
|
||||
background-color: rgba(23, 23, 23, 90%);
|
||||
color: var(--md-on-surface);
|
||||
box-shadow: var(--md-elevation-1);
|
||||
border-left: 5px solid var(--md-error);
|
||||
font-size: 1.5vh;
|
||||
}
|
||||
}
|
||||
|
||||
.success {
|
||||
background-color: var(--md-success-container);
|
||||
color: var(--md-on-success-container);
|
||||
padding: 12px 16px;
|
||||
font-weight: var(--font-weight-medium);
|
||||
--accent: #006e1c;
|
||||
}
|
||||
|
||||
.primary {
|
||||
background-color: var(--md-primary-container);
|
||||
color: var(--md-on-primary-container);
|
||||
padding: 12px 16px;
|
||||
font-weight: var(--font-weight-medium);
|
||||
--accent: #0061a4;
|
||||
}
|
||||
|
||||
.warning {
|
||||
background-color: var(--md-warning-container);
|
||||
color: var(--md-on-warning-container);
|
||||
padding: 12px 16px;
|
||||
font-weight: var(--font-weight-medium);
|
||||
--accent: #7d5800;
|
||||
}
|
||||
|
||||
.error {
|
||||
background-color: var(--md-error-container);
|
||||
color: var(--md-on-error-container);
|
||||
padding: 12px 16px;
|
||||
font-weight: var(--font-weight-medium);
|
||||
--accent: #ba1a1a;
|
||||
}
|
||||
|
||||
.police {
|
||||
background-color: var(--md-info-container);
|
||||
color: var(--md-on-info-container);
|
||||
padding: 12px 16px;
|
||||
font-weight: var(--font-weight-medium);
|
||||
--accent: #0062a1;
|
||||
}
|
||||
.ambulance {
|
||||
--accent: #006874;
|
||||
}
|
||||
|
||||
.success,
|
||||
.primary,
|
||||
.warning,
|
||||
.error,
|
||||
.police,
|
||||
.ambulance {
|
||||
background-color: var(--md-error-container);
|
||||
color: var(--md-on-error-container);
|
||||
background-color: #211f26;
|
||||
color: #e6e1e5;
|
||||
padding: 12px 16px;
|
||||
font-weight: var(--font-weight-medium);
|
||||
box-shadow: var(--md-elevation-1);
|
||||
}
|
||||
|
||||
.notify-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
border-radius: 0;
|
||||
min-width: 280px;
|
||||
max-width: 400px;
|
||||
opacity: 0;
|
||||
transform: translateX(16px);
|
||||
transition:
|
||||
opacity 0.2s ease,
|
||||
transform 0.2s ease;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.notify-item.notify-show {
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
.notify-item.notify-hide {
|
||||
opacity: 0;
|
||||
transform: translateX(16px);
|
||||
transition:
|
||||
opacity 0.3s ease,
|
||||
transform 0.3s ease;
|
||||
}
|
||||
|
||||
.notify-icon {
|
||||
color: var(--accent);
|
||||
flex-shrink: 0;
|
||||
font-size: 20px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.notify-content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.notify-message {
|
||||
font-size: clamp(12px, 1.1vw, 16px);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.notify-multiline {
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.notify-caption {
|
||||
font-size: clamp(10px, 0.9vw, 14px);
|
||||
margin-top: 2px;
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
.notify-progress {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 3px;
|
||||
width: 100%;
|
||||
background: var(--accent);
|
||||
opacity: 0.35;
|
||||
animation: notify-shrink linear forwards;
|
||||
}
|
||||
|
||||
@keyframes notify-shrink {
|
||||
from {
|
||||
width: 100%;
|
||||
}
|
||||
to {
|
||||
width: 0%;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user