mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
updated interfaces and events
This commit is contained in:
1 parent
b37e72d168
commit
ead995eb69
9 files changed
+84
-10
No files matched your search
@@ -1,5 +1,24 @@
|
|||||||
export interface Message {
|
export interface Message {
|
||||||
id?: number;
|
id?: number;
|
||||||
name: string;
|
content: string;
|
||||||
message: string;
|
user_id: number;
|
||||||
}
|
user_name?: string;
|
||||||
|
conversation_id: number;
|
||||||
|
isRead: boolean;
|
||||||
|
createdAt?: string;
|
||||||
|
updatedAt?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ConversationParticpant {
|
||||||
|
id?: number;
|
||||||
|
user_id: number;
|
||||||
|
conversation_id: number;
|
||||||
|
createdAt?: string;
|
||||||
|
updatedAt?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Conversation {
|
||||||
|
participants: ConversationParticpant[];
|
||||||
|
createdAt?: string;
|
||||||
|
updatedAt?: string;
|
||||||
|
}
|
||||||
@@ -1 +1,44 @@
|
|||||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="%PUBLIC_URL%/favicon.ico"/><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"/><link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><title>React App</title></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="main.js"></script></body></html>
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="icon" href="/favicon.ico" />
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<meta name="theme-color" content="#000000" />
|
||||||
|
<meta
|
||||||
|
name="description"
|
||||||
|
content="Web site created using create-react-app"
|
||||||
|
/>
|
||||||
|
<!--
|
||||||
|
manifest.json provides metadata used when your web app is installed on a
|
||||||
|
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Notice the use of in the tags above.
|
||||||
|
It will be replaced with the URL of the `public` folder during the build.
|
||||||
|
Only files inside the `public` folder can be referenced from the HTML.
|
||||||
|
|
||||||
|
Unlike "/favicon.ico" or "favicon.ico", "/favicon.ico" will
|
||||||
|
work correctly both with client-side routing and a non-root public URL.
|
||||||
|
Learn how to configure a non-root public URL by running `npm run build`.
|
||||||
|
-->
|
||||||
|
<title>React App</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
|
<div id="root"></div>
|
||||||
|
<!--
|
||||||
|
This HTML file is a template.
|
||||||
|
If you open it directly in the browser, you will see an empty page.
|
||||||
|
|
||||||
|
You can add webfonts, meta tags, or analytics to this file.
|
||||||
|
The build step will place the bundled scripts into the <body> tag.
|
||||||
|
|
||||||
|
To begin the development, run `npm start` or `yarn start`.
|
||||||
|
To create a production bundle, use `npm run build` or `yarn build`.
|
||||||
|
-->
|
||||||
|
<script src="dev.js"></script></body>
|
||||||
|
</html>
|
||||||
Binary file not shown.
@@ -1,4 +1,5 @@
|
|||||||
import { pool } from './db';
|
import { pool } from './db';
|
||||||
|
import { ESX } from "./server";
|
||||||
|
|
||||||
interface IPhoneNumber {
|
interface IPhoneNumber {
|
||||||
phone_number: string;
|
phone_number: string;
|
||||||
@@ -9,4 +10,10 @@ export async function usePhoneNumber(identifier: string): Promise<string> {
|
|||||||
const [results] = await pool.query(query, [identifier]);
|
const [results] = await pool.query(query, [identifier]);
|
||||||
const phoneNumber = <IPhoneNumber[]>results;
|
const phoneNumber = <IPhoneNumber[]>results;
|
||||||
return phoneNumber[0].phone_number;
|
return phoneNumber[0].phone_number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getSource = () => parseInt(source);
|
||||||
|
|
||||||
|
export async function useIdentifier(): Promise<string> {
|
||||||
|
return ESX.GetPlayerFromId(getSource()).getIdentifier();
|
||||||
}
|
}
|
||||||
@@ -11,4 +11,3 @@ export let ESX: ESXServer = null;
|
|||||||
|
|
||||||
emit("esx:getSharedObject", (obj: ESXServer) => (ESX = obj));
|
emit("esx:getSharedObject", (obj: ESXServer) => (ESX = obj));
|
||||||
|
|
||||||
export const getSource = () => parseInt(source);
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import events from '../utils/events';
|
import events from '../utils/events';
|
||||||
import { ESX, getSource } from './server';
|
import { ESX } from './server';
|
||||||
|
import { getSource } from "./functions";
|
||||||
import { pool } from './db';
|
import { pool } from './db';
|
||||||
import { resourceLimits } from 'worker_threads';
|
import { resourceLimits } from 'worker_threads';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
import events from '../utils/events';
|
import events from '../utils/events';
|
||||||
import { ESX, getSource } from './server';
|
import { ESX } from './server';
|
||||||
|
import { getSource } from "./functions";
|
||||||
import { pool } from './db';
|
import { pool } from './db';
|
||||||
import { usePhoneNumber } from './functions';
|
import { usePhoneNumber } from './functions';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { pool } from "./db";
|
import { pool } from "./db";
|
||||||
import { ESX, getSource } from "./server";
|
import { ESX } from "./server";
|
||||||
|
import { getSource } from "./functions";
|
||||||
import { Tweet, Profile } from '../../phone/src/common/interfaces/twitter';
|
import { Tweet, Profile } from '../../phone/src/common/interfaces/twitter';
|
||||||
import events from "../utils/events";
|
import events from "../utils/events";
|
||||||
import config from "../utils/config";
|
import config from "../utils/config";
|
||||||
|
|||||||
@@ -39,11 +39,14 @@ export default {
|
|||||||
SELLOUT_FETCH_LISTING: 'phone:fetchAllListings',
|
SELLOUT_FETCH_LISTING: 'phone:fetchAllListings',
|
||||||
SELLOUT_SEND_LISTING: 'phone:sendAllListings',
|
SELLOUT_SEND_LISTING: 'phone:sendAllListings',
|
||||||
|
|
||||||
// Bank
|
//
|
||||||
BANK_ADD_TRANSFER: 'phone:addTransfer',
|
BANK_ADD_TRANSFER: 'phone:addTransfer',
|
||||||
BANK_FETCH_TRANSACTIONS: 'phone:fetchAllTransactions',
|
BANK_FETCH_TRANSACTIONS: 'phone:fetchAllTransactions',
|
||||||
BANK_SEND_TRANSFERS: 'phone:sendTransfers',
|
BANK_SEND_TRANSFERS: 'phone:sendTransfers',
|
||||||
BANK_TRANSACTION_ALERT: 'phone:transactionAlert',
|
BANK_TRANSACTION_ALERT: 'phone:transactionAlert',
|
||||||
BANK_SEND_CREDENTIALS: 'phone:sendBankCredentials',
|
BANK_SEND_CREDENTIALS: 'phone:sendBankCredentials',
|
||||||
BANK_GET_CREDENTIALS: 'phone:getBankCredentials'
|
BANK_GET_CREDENTIALS: 'phone:getBankCredentials',
|
||||||
|
|
||||||
|
//messages
|
||||||
|
MESSAGES_SEND_MESSAGE: 'phone:sendMessage',
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user