mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5b9f78fa8 | ||
|
|
11b9caf611 | ||
|
|
8c3a17e672 | ||
|
|
28711c7c5d | ||
|
|
42447e544b | ||
|
|
0f2cc6da35 | ||
|
|
b7ff65f74e | ||
|
|
65c7f46d5f | ||
|
|
2499358f5f |
No files matched your search
@@ -3,7 +3,7 @@
|
|||||||
<img src="https://beta.iodine.gg/zVkK7.png" width="500" height="300" />
|
<img src="https://beta.iodine.gg/zVkK7.png" width="500" height="300" />
|
||||||
|
|
||||||
|
|
||||||
NPWD is our current running project. Our team has been working on the project since Auguest, 2020. This resource isn’t complete yet and currently has no ETA for release. Feel free to test it out in a dev environment by following the installation guide.
|
NPWD is our current running project. Our team has been working on the project since Auguest, 2020. This resource isn’t complete yet and currently has no ETA for release. Feel free to test it out in a dev enviorment by following the installation guide.
|
||||||
|
|
||||||
Written completely by the Project Error Dev Team in [React](https://reactjs.org/) with a [TypeScript](https://www.typescriptlang.org/) client/server environment.
|
Written completely by the Project Error Dev Team in [React](https://reactjs.org/) with a [TypeScript](https://www.typescriptlang.org/) client/server environment.
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,5 @@ ui_page 'resources/html/index.html'
|
|||||||
files {
|
files {
|
||||||
'resources/html/index.html',
|
'resources/html/index.html',
|
||||||
'resources/html/*.js',
|
'resources/html/*.js',
|
||||||
'resources/html/*.map',
|
|
||||||
'resources/html/media/**/*'
|
'resources/html/media/**/*'
|
||||||
}
|
}
|
||||||
+11
-2
@@ -63,7 +63,7 @@ CREATE TABLE IF NOT EXISTS npwd_notes (
|
|||||||
PRIMARY KEY (id)
|
PRIMARY KEY (id)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS npwd_marketplace_listings (
|
CREATE TABLE IF NOT EXISTS npwd_sellout_listings (
|
||||||
id int(11) NOT NULL AUTO_INCREMENT,
|
id int(11) NOT NULL AUTO_INCREMENT,
|
||||||
identifier varchar(255) DEFAULT NULL,
|
identifier varchar(255) DEFAULT NULL,
|
||||||
username varchar(255) DEFAULT NULL,
|
username varchar(255) DEFAULT NULL,
|
||||||
@@ -75,6 +75,12 @@ CREATE TABLE IF NOT EXISTS npwd_marketplace_listings (
|
|||||||
createdAt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
createdAt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
updatedAt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
updatedAt timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
PRIMARY KEY (id)
|
PRIMARY KEY (id)
|
||||||
|
)
|
||||||
|
ENGINE = INNODB,
|
||||||
|
AUTO_INCREMENT = 31,
|
||||||
|
AVG_ROW_LENGTH = 2048,
|
||||||
|
CHARACTER SET utf8mb4,
|
||||||
|
COLLATE utf8mb4_general_ci;
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS npwd_marketplace_reports (
|
CREATE TABLE IF NOT EXISTS npwd_marketplace_reports (
|
||||||
@@ -82,7 +88,10 @@ CREATE TABLE IF NOT EXISTS npwd_marketplace_reports (
|
|||||||
listing_id int(11) DEFAULT NULL,
|
listing_id int(11) DEFAULT NULL,
|
||||||
profile varchar(255) DEFAULT NULL,
|
profile varchar(255) DEFAULT NULL,
|
||||||
PRIMARY KEY (id)
|
PRIMARY KEY (id)
|
||||||
);
|
)
|
||||||
|
ENGINE = INNODB,
|
||||||
|
CHARACTER SET utf8mb4,
|
||||||
|
COLLATE utf8mb4_general_ci;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `npwd_twitter_reports` (
|
CREATE TABLE IF NOT EXISTS `npwd_twitter_reports` (
|
||||||
`id` int NOT NULL AUTO_INCREMENT,
|
`id` int NOT NULL AUTO_INCREMENT,
|
||||||
|
|||||||
+2
-9
@@ -1,4 +1,4 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React from 'react';
|
||||||
import './Phone.css';
|
import './Phone.css';
|
||||||
import './i18n';
|
import './i18n';
|
||||||
import { Route } from 'react-router-dom';
|
import { Route } from 'react-router-dom';
|
||||||
@@ -33,18 +33,11 @@ import { usePhone } from './os/phone/hooks/usePhone';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
function Phone() {
|
function Phone() {
|
||||||
const { t, i18n } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const { apps } = useApps();
|
const { apps } = useApps();
|
||||||
|
|
||||||
const [settings] = useSettings();
|
const [settings] = useSettings();
|
||||||
|
|
||||||
// Set language from local storage
|
|
||||||
// This will only trigger on first mount & settings changes
|
|
||||||
useEffect(() => {
|
|
||||||
i18n.changeLanguage(settings.language.value).catch((e) => console.error(e));
|
|
||||||
}, [i18n, settings.language]);
|
|
||||||
|
|
||||||
useNuiService();
|
useNuiService();
|
||||||
useKeyboardService();
|
useKeyboardService();
|
||||||
usePhoneService();
|
usePhoneService();
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ import React, { useState } from 'react';
|
|||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { BottomNavigation, BottomNavigationAction } from '@material-ui/core';
|
import { BottomNavigation, BottomNavigationAction } from '@material-ui/core';
|
||||||
import { makeStyles } from '@material-ui/core/styles';
|
import { makeStyles } from '@material-ui/core/styles';
|
||||||
import HomeIcon from '@material-ui/icons/Home';
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||||
import LocalAtmIcon from '@material-ui/icons/LocalAtm';
|
import { faHome, faList, faMoneyCheck } from '@fortawesome/free-solid-svg-icons';
|
||||||
import ListIcon from '@material-ui/icons/List';
|
|
||||||
|
|
||||||
const useStyles = makeStyles((theme) => ({
|
const useStyles = makeStyles((theme) => ({
|
||||||
root: {
|
root: {
|
||||||
@@ -31,9 +30,21 @@ export const NavigationBar = () => {
|
|||||||
showLabels
|
showLabels
|
||||||
className={classes.root}
|
className={classes.root}
|
||||||
>
|
>
|
||||||
<BottomNavigationAction component={Link} icon={<HomeIcon />} to="/bank" />
|
<BottomNavigationAction
|
||||||
<BottomNavigationAction component={Link} icon={<LocalAtmIcon />} to="/bank/account" />
|
component={Link}
|
||||||
<BottomNavigationAction component={Link} icon={<ListIcon />} to="/bank/transactions" />
|
icon={<FontAwesomeIcon icon={faHome} />}
|
||||||
|
to="/bank"
|
||||||
|
/>
|
||||||
|
<BottomNavigationAction
|
||||||
|
component={Link}
|
||||||
|
icon={<FontAwesomeIcon icon={faMoneyCheck} />}
|
||||||
|
to="/bank/account"
|
||||||
|
/>
|
||||||
|
<BottomNavigationAction
|
||||||
|
component={Link}
|
||||||
|
icon={<FontAwesomeIcon icon={faList} />}
|
||||||
|
to="/bank/transactions"
|
||||||
|
/>
|
||||||
</BottomNavigation>
|
</BottomNavigation>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { makeStyles, Paper } from '@material-ui/core';
|
import { makeStyles, Paper } from '@material-ui/core';
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
import FolderIcon from '@material-ui/icons/Folder';
|
||||||
import { faStickyNote } from '@fortawesome/free-solid-svg-icons';
|
|
||||||
|
|
||||||
const useStyles = makeStyles((theme) => ({
|
const useStyles = makeStyles((theme) => ({
|
||||||
header: {
|
header: {
|
||||||
@@ -24,7 +23,7 @@ const NotesTitle = () => {
|
|||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
return (
|
return (
|
||||||
<Paper elevation={24} square variant="outlined" className={classes.header}>
|
<Paper elevation={24} square variant="outlined" className={classes.header}>
|
||||||
<FontAwesomeIcon icon={faStickyNote} className={classes.icon} size="lg" />
|
<FolderIcon fontSize="large" />
|
||||||
</Paper>
|
</Paper>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -3,40 +3,31 @@ import { AppWrapper } from '../../ui/components/AppWrapper';
|
|||||||
import { AppContent } from '../../ui/components/AppContent';
|
import { AppContent } from '../../ui/components/AppContent';
|
||||||
import { AppTitle } from '../../ui/components/AppTitle';
|
import { AppTitle } from '../../ui/components/AppTitle';
|
||||||
import { useApp } from '../../os/apps/hooks/useApps';
|
import { useApp } from '../../os/apps/hooks/useApps';
|
||||||
import NoteList from './list/NoteList';
|
|
||||||
import { NoteModal } from './modal/NoteModal';
|
import { NoteModal } from './modal/NoteModal';
|
||||||
import { Fab } from '@material-ui/core';
|
import { Fab } from '@material-ui/core';
|
||||||
import AddIcon from '@material-ui/icons/Add';
|
import AddIcon from '@material-ui/icons/Add';
|
||||||
import { useNoteDetail } from './hooks/useNoteDetail';
|
import { useNoteDetail } from './hooks/useNoteDetail';
|
||||||
import useStyles from './notes.styles';
|
import useStyles from './documents.styles';
|
||||||
import InjectDebugData from '../../os/debug/InjectDebugData';
|
import InjectDebugData from '../../os/debug/InjectDebugData';
|
||||||
import { NotesThemeProvider } from './providers/NotesThemeProvider';
|
import { DocumentsThemeProvider } from './providers/DoucmentsThemeProvider';
|
||||||
import { Route, useHistory } from 'react-router-dom';
|
import { Route, useHistory } from 'react-router-dom';
|
||||||
|
import DocumentList from './list/DoucmentList';
|
||||||
|
import NoteList from './list/NoteList';
|
||||||
|
|
||||||
export const NotesApp = () => {
|
export const NotesApp = () => {
|
||||||
const classes = useStyles();
|
const documentsApp = useApp('DOCUMENTS');
|
||||||
const history = useHistory();
|
|
||||||
const notesApp = useApp('NOTES');
|
|
||||||
const { setDetail } = useNoteDetail();
|
|
||||||
|
|
||||||
const onClickCreate = () => {
|
|
||||||
setDetail({ title: '', content: '' });
|
|
||||||
history.push('/notes/detail');
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NotesThemeProvider>
|
<DocumentsThemeProvider>
|
||||||
<AppWrapper id="notes-app">
|
<AppWrapper id="documents-app">
|
||||||
<AppTitle app={notesApp} />
|
<AppTitle app={documentsApp} />
|
||||||
<Route path="/notes/detail" component={NoteModal} />
|
<Route path="/documents/notes/detail" component={NoteModal} />
|
||||||
<AppContent>
|
<AppContent>
|
||||||
<Route path="/notes" component={NoteList} />
|
<Route path="/documents" exact component={DocumentList} />
|
||||||
<Fab className={classes.absolute} onClick={onClickCreate} color="primary">
|
<Route path="/documents/notes" exact component={NoteList} />
|
||||||
<AddIcon />
|
|
||||||
</Fab>
|
|
||||||
</AppContent>
|
</AppContent>
|
||||||
</AppWrapper>
|
</AppWrapper>
|
||||||
</NotesThemeProvider>
|
</DocumentsThemeProvider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
File renamed without changes.
@@ -0,0 +1,18 @@
|
|||||||
|
import { common, yellow } from '@material-ui/core/colors';
|
||||||
|
|
||||||
|
export const DOCUMENTS_APP_PRIMARY_COLOR = yellow[800];
|
||||||
|
export const DOCUMENTS_APP_ICON_COLOR = common.white;
|
||||||
|
export const DOCUMENTS_APP_TEXT_COLOR = common.black;
|
||||||
|
|
||||||
|
const theme = {
|
||||||
|
palette: {
|
||||||
|
primary: {
|
||||||
|
main: DOCUMENTS_APP_PRIMARY_COLOR,
|
||||||
|
dark: yellow[900],
|
||||||
|
light: yellow[500],
|
||||||
|
contrastText: DOCUMENTS_APP_TEXT_COLOR,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default theme;
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import { List, ListItem, ListItemIcon, ListItemText } from '@material-ui/core';
|
||||||
|
import React, { useState } from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import NoteIcon from '@material-ui/icons/Note';
|
||||||
|
import RecentActorsIcon from '@material-ui/icons/RecentActors';
|
||||||
|
import { useHistory } from 'react-router';
|
||||||
|
|
||||||
|
export default function DoucmentList() {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const history = useHistory();
|
||||||
|
|
||||||
|
const [list, setList] = useState([
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: t('APPS_DOCUMENTS_NOTES_TITLE'),
|
||||||
|
icon: <NoteIcon />,
|
||||||
|
route: '/documents/notes',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: t('APPS_DOCUMENTS_LICENSE_TITLE'),
|
||||||
|
icon: <RecentActorsIcon />,
|
||||||
|
route: '/documents/licenses',
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<List disablePadding>
|
||||||
|
{list.map((l) => (
|
||||||
|
<ListItem divider button key={l.id} onClick={() => history.push(l.route)}>
|
||||||
|
<ListItemIcon>{l.icon}</ListItemIcon>
|
||||||
|
<ListItemText primary={l.name} />
|
||||||
|
</ListItem>
|
||||||
|
))}
|
||||||
|
</List>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { List, ListItem, ListItemText } from '@material-ui/core';
|
import { Fab, List, ListItem, ListItemText, Box, Typography } from '@material-ui/core';
|
||||||
import { useNoteDetail } from '../hooks/useNoteDetail';
|
import { useNoteDetail } from '../hooks/useNoteDetail';
|
||||||
import { useNotes } from '../hooks/useNotes';
|
import { useNotes } from '../hooks/useNotes';
|
||||||
import { useHistory } from 'react-router-dom';
|
import { useHistory } from 'react-router-dom';
|
||||||
|
import useStyles from '../documents.styles';
|
||||||
|
import AddIcon from '@material-ui/icons/Add';
|
||||||
|
|
||||||
// add search bar later
|
// add search bar later
|
||||||
// TODO: Add interface for note
|
// TODO: Add interface for note
|
||||||
@@ -10,20 +12,31 @@ const NoteList = () => {
|
|||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const { notes } = useNotes();
|
const { notes } = useNotes();
|
||||||
const { setDetail } = useNoteDetail();
|
const { setDetail } = useNoteDetail();
|
||||||
|
const classes = useStyles();
|
||||||
|
|
||||||
const handleNoteModal = (note) => {
|
const handleNoteModal = (note) => {
|
||||||
setDetail(note);
|
setDetail(note);
|
||||||
history.push('/notes/detail');
|
history.push('/documents/notes/detail');
|
||||||
|
};
|
||||||
|
|
||||||
|
const onClickCreate = () => {
|
||||||
|
setDetail({ title: '', content: '' });
|
||||||
|
history.push('/documents/notes/detail');
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<div>
|
||||||
<List disablePadding>
|
<List disablePadding>
|
||||||
{notes.map((note) => (
|
{notes.map((note) => (
|
||||||
<ListItem key={note.id} button divider onClick={() => handleNoteModal(note)}>
|
<ListItem key={note.id} button divider onClick={() => handleNoteModal(note)}>
|
||||||
<ListItemText>{note.title}</ListItemText>
|
<ListItemText primary={note.title} secondary={`${note.content.slice(0, 35)}...`} />
|
||||||
</ListItem>
|
</ListItem>
|
||||||
))}
|
))}
|
||||||
</List>
|
</List>
|
||||||
|
<Fab className={classes.absolute} onClick={onClickCreate} color="primary">
|
||||||
|
<AddIcon />
|
||||||
|
</Fab>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
CircularProgress,
|
CircularProgress,
|
||||||
Box,
|
Box,
|
||||||
} from '@material-ui/core';
|
} from '@material-ui/core';
|
||||||
import React from 'react';
|
import React, { useState } from 'react';
|
||||||
import ArrowBackIcon from '@material-ui/icons/ArrowBack';
|
import ArrowBackIcon from '@material-ui/icons/ArrowBack';
|
||||||
import { useNoteDetail } from '../hooks/useNoteDetail';
|
import { useNoteDetail } from '../hooks/useNoteDetail';
|
||||||
import useStyles from './modal.styles';
|
import useStyles from './modal.styles';
|
||||||
@@ -16,6 +16,9 @@ import Nui from '../../../os/nui-events/utils/Nui';
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useHistory } from 'react-router-dom';
|
import { useHistory } from 'react-router-dom';
|
||||||
import { StatusButton } from '../../../ui/components/StatusButton';
|
import { StatusButton } from '../../../ui/components/StatusButton';
|
||||||
|
import ShareIcon from '@material-ui/icons/Share';
|
||||||
|
import Modal from '../../../ui/components/Modal';
|
||||||
|
import { Autocomplete } from '@material-ui/lab';
|
||||||
|
|
||||||
export const NoteModal = () => {
|
export const NoteModal = () => {
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
@@ -23,6 +26,9 @@ export const NoteModal = () => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { detail, setDetail } = useNoteDetail();
|
const { detail, setDetail } = useNoteDetail();
|
||||||
|
|
||||||
|
const [open, setOpen] = useState(false);
|
||||||
|
const [number, setNumber] = useState('');
|
||||||
|
|
||||||
const onClose = () => history.goBack();
|
const onClose = () => history.goBack();
|
||||||
|
|
||||||
const _handleClose = () => {
|
const _handleClose = () => {
|
||||||
@@ -51,9 +57,43 @@ export const NoteModal = () => {
|
|||||||
onClose();
|
onClose();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleShareNoteModal = () => setOpen(true);
|
||||||
|
|
||||||
|
const NoteShareModal = () => {
|
||||||
|
const opts = [
|
||||||
|
{
|
||||||
|
title: 'Nice',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'wtf',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const handleShareNote = () => {
|
||||||
|
Nui.send('phone:shareNote', {});
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Modal visible={open} handleClose={() => setOpen(false)}>
|
||||||
|
<Autocomplete
|
||||||
|
freeSolo
|
||||||
|
disableClearable
|
||||||
|
options={opts.map((op) => op.title)}
|
||||||
|
onChange={(e: any) => setNumber(e.currentTarget.value)}
|
||||||
|
renderInput={(params) => (
|
||||||
|
<TextField {...params} label="Search contacts" margin="normal" />
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<Button onClick={handleShareNote}>Share</Button>
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Slide direction="left" in={!!detail}>
|
<Slide direction="left" in={!!detail}>
|
||||||
<Paper className={classes.modalRoot}>
|
<Paper className={classes.modalRoot}>
|
||||||
|
<NoteShareModal />
|
||||||
|
<div className={open ? classes.backgroundModal : undefined} />
|
||||||
{!detail ? (
|
{!detail ? (
|
||||||
<CircularProgress />
|
<CircularProgress />
|
||||||
) : (
|
) : (
|
||||||
@@ -66,7 +106,7 @@ export const NoteModal = () => {
|
|||||||
startIcon={<ArrowBackIcon fontSize="large" />}
|
startIcon={<ArrowBackIcon fontSize="large" />}
|
||||||
onClick={_handleClose}
|
onClick={_handleClose}
|
||||||
>
|
>
|
||||||
{t('APPS_NOTES')}
|
{t('APPS_DOCUMENTS_NOTES_TITLE')}
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
<TextField
|
<TextField
|
||||||
@@ -126,6 +166,11 @@ export const NoteModal = () => {
|
|||||||
{t('GENERIC_DELETE')}
|
{t('GENERIC_DELETE')}
|
||||||
</StatusButton>
|
</StatusButton>
|
||||||
</Box>
|
</Box>
|
||||||
|
<Box display="inline" p={1}>
|
||||||
|
<Button color="primary" onClick={handleShareNoteModal}>
|
||||||
|
<ShareIcon />
|
||||||
|
</Button>
|
||||||
|
</Box>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -18,6 +18,16 @@ const useStyles = makeStyles((theme) => ({
|
|||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
lineHeight: 1.2,
|
lineHeight: 1.2,
|
||||||
},
|
},
|
||||||
|
backgroundModal: {
|
||||||
|
background: 'black',
|
||||||
|
opacity: '0.6',
|
||||||
|
position: 'absolute',
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0,
|
||||||
|
zIndex: 5,
|
||||||
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
export default useStyles;
|
export default useStyles;
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
import { common, yellow } from '@material-ui/core/colors';
|
|
||||||
|
|
||||||
export const NOTES_APP_PRIMARY_COLOR = yellow[800];
|
|
||||||
export const NOTES_APP_ICON_COLOR = common.white;
|
|
||||||
export const NOTES_APP_TEXT_COLOR = common.black;
|
|
||||||
|
|
||||||
const theme = {
|
|
||||||
palette: {
|
|
||||||
primary: {
|
|
||||||
main: NOTES_APP_PRIMARY_COLOR,
|
|
||||||
dark: yellow[900],
|
|
||||||
light: yellow[500],
|
|
||||||
contrastText: NOTES_APP_TEXT_COLOR,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default theme;
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
import { createAppThemeProvider } from '../../../os/apps/utils/createAppThemeProvider';
|
||||||
|
import notesTheme from '../documents.theme';
|
||||||
|
|
||||||
|
export const DocumentsThemeProvider = createAppThemeProvider(notesTheme);
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
import { createAppThemeProvider } from '../../../os/apps/utils/createAppThemeProvider';
|
|
||||||
import notesTheme from '../notes.theme';
|
|
||||||
|
|
||||||
export const NotesThemeProvider = createAppThemeProvider(notesTheme);
|
|
||||||
@@ -2,8 +2,9 @@ import React, { useState } from 'react';
|
|||||||
import { makeStyles } from '@material-ui/core/styles';
|
import { makeStyles } from '@material-ui/core/styles';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { BottomNavigation, BottomNavigationAction } from '@material-ui/core';
|
import { BottomNavigation, BottomNavigationAction } from '@material-ui/core';
|
||||||
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||||
|
import { faHome } from '@fortawesome/free-solid-svg-icons';
|
||||||
import AddCircleIcon from '@material-ui/icons/AddCircle';
|
import AddCircleIcon from '@material-ui/icons/AddCircle';
|
||||||
import HomeIcon from '@material-ui/icons/Home';
|
|
||||||
|
|
||||||
const useStyles = makeStyles((theme) => ({
|
const useStyles = makeStyles((theme) => ({
|
||||||
root: {
|
root: {
|
||||||
@@ -27,7 +28,11 @@ export const NavigationBar = () => {
|
|||||||
showLabels
|
showLabels
|
||||||
className={classes.root}
|
className={classes.root}
|
||||||
>
|
>
|
||||||
<BottomNavigationAction component={Link} icon={<HomeIcon />} to="/sellout" />
|
<BottomNavigationAction
|
||||||
|
component={Link}
|
||||||
|
icon={<FontAwesomeIcon icon={faHome} />}
|
||||||
|
to="/sellout"
|
||||||
|
/>
|
||||||
<BottomNavigationAction component={Link} icon={<AddCircleIcon />} to="/sellout/new" />
|
<BottomNavigationAction component={Link} icon={<AddCircleIcon />} to="/sellout/new" />
|
||||||
</BottomNavigation>
|
</BottomNavigation>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -67,13 +67,12 @@ interface ISettingSwitch {
|
|||||||
value: boolean;
|
value: boolean;
|
||||||
onClick: any;
|
onClick: any;
|
||||||
icon: JSX.Element;
|
icon: JSX.Element;
|
||||||
secondary: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const SettingSwitch = ({ label, value, onClick, icon, secondary }: ISettingSwitch) => (
|
export const SettingSwitch = ({ label, value, onClick, icon }: ISettingSwitch) => (
|
||||||
<ListItem divider button>
|
<ListItem divider button>
|
||||||
<ListItemIcon>{icon}</ListItemIcon>
|
<ListItemIcon>{icon}</ListItemIcon>
|
||||||
<ListItemText primary={label} secondary={secondary} />
|
<ListItemText primary={label} />
|
||||||
<ListItemSecondaryAction>
|
<ListItemSecondaryAction>
|
||||||
<Switch color="primary" checked={value} onChange={() => onClick(value)} />
|
<Switch color="primary" checked={value} onChange={() => onClick(value)} />
|
||||||
</ListItemSecondaryAction>
|
</ListItemSecondaryAction>
|
||||||
|
|||||||
@@ -25,13 +25,10 @@ import {
|
|||||||
LibraryMusic,
|
LibraryMusic,
|
||||||
VolumeUp,
|
VolumeUp,
|
||||||
FileCopy,
|
FileCopy,
|
||||||
Book,
|
|
||||||
} from '@material-ui/icons';
|
} from '@material-ui/icons';
|
||||||
|
|
||||||
import { ListSubheader } from '@material-ui/core';
|
import { ListSubheader } from '@material-ui/core';
|
||||||
import { useSettings } from '../hooks/useSettings';
|
import { useSettings } from '../hooks/useSettings';
|
||||||
import { setClipboard } from '../../../os/phone/hooks/useClipboard';
|
|
||||||
import { useSnackbar } from '../../../ui/hooks/useSnackbar';
|
|
||||||
|
|
||||||
const SubHeaderComp = (props: { text: string }) => (
|
const SubHeaderComp = (props: { text: string }) => (
|
||||||
<ListSubheader color="primary" component="div" disableSticky>
|
<ListSubheader color="primary" component="div" disableSticky>
|
||||||
@@ -45,8 +42,8 @@ export const SettingsApp = () => {
|
|||||||
const simcard = useSimcard();
|
const simcard = useSimcard();
|
||||||
const [settings, setSettings] = useSettings();
|
const [settings, setSettings] = useSettings();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
// TODO: Uncomment when #135 is merged
|
||||||
const { addAlert } = useSnackbar();
|
// const { addAlert } = useSnackbar();
|
||||||
|
|
||||||
const handleSettingChange = (key: string | number, value: unknown) => {
|
const handleSettingChange = (key: string | number, value: unknown) => {
|
||||||
setSettings({ ...settings, [key]: value });
|
setSettings({ ...settings, [key]: value });
|
||||||
@@ -87,18 +84,16 @@ export const SettingsApp = () => {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const languages = config.languages.map(
|
|
||||||
MapSettingItem(settings.language, (val: SettingOption) => handleSettingChange('language', val)),
|
|
||||||
);
|
|
||||||
|
|
||||||
const handleCopyPhoneNumber = () => {
|
const handleCopyPhoneNumber = () => {
|
||||||
setClipboard(simcard.number);
|
// TODO: Dependent on #132 merge
|
||||||
addAlert({
|
// setClipboard(simcard.number)
|
||||||
message: t('GENERIC_WRITE_TO_CLIPBOARD_MESSAGE', {
|
// TODO: Dependent on #135 merge
|
||||||
content: 'number',
|
// addAlert({
|
||||||
}),
|
// message: t('GENERIC_WRITE_TO_CLIPBOARD_MESSAGE', {
|
||||||
type: 'success',
|
// content: 'number',
|
||||||
});
|
// }),
|
||||||
|
// type: 'success',
|
||||||
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
const [openMenu, closeMenu, ContextMenu, isMenuOpen] = useContextMenu();
|
const [openMenu, closeMenu, ContextMenu, isMenuOpen] = useContextMenu();
|
||||||
@@ -106,7 +101,7 @@ export const SettingsApp = () => {
|
|||||||
<AppWrapper>
|
<AppWrapper>
|
||||||
<AppTitle app={settingsApp} />
|
<AppTitle app={settingsApp} />
|
||||||
<AppContent backdrop={isMenuOpen} onClickBackdrop={closeMenu}>
|
<AppContent backdrop={isMenuOpen} onClickBackdrop={closeMenu}>
|
||||||
<List disablePadding subheader={<SubHeaderComp text={t('SETTINGS.CATEGORY.PHONE')} />}>
|
<List disablePadding subheader={<SubHeaderComp text="Phone" />}>
|
||||||
<SettingItemIconAction
|
<SettingItemIconAction
|
||||||
label={t('APPS_SETTINGS_PHONE_NUMBER')}
|
label={t('APPS_SETTINGS_PHONE_NUMBER')}
|
||||||
labelSecondary={simcard.number}
|
labelSecondary={simcard.number}
|
||||||
@@ -145,20 +140,12 @@ export const SettingsApp = () => {
|
|||||||
/>
|
/>
|
||||||
<SettingSwitch
|
<SettingSwitch
|
||||||
label={t('APPS_SETTINGS_OPTION_STREAMER_MODE')}
|
label={t('APPS_SETTINGS_OPTION_STREAMER_MODE')}
|
||||||
secondary={t('APPS_SETTING_STREAMER_MODE_DESC')}
|
|
||||||
icon={<VisibilityOffIcon />}
|
icon={<VisibilityOffIcon />}
|
||||||
value={settings.streamerMode}
|
value={settings.streamerMode}
|
||||||
onClick={(curr) => handleSettingChange('streamerMode', !curr)}
|
onClick={(curr) => handleSettingChange('streamerMode', !curr)}
|
||||||
/>
|
/>
|
||||||
</List>
|
</List>
|
||||||
<List disablePadding subheader={<SubHeaderComp text={t('SETTINGS.CATEGORY.APPEARANCE')} />}>
|
<List disablePadding subheader={<SubHeaderComp text="Appearance" />}>
|
||||||
<SettingItem
|
|
||||||
label={t('SETTINGS.OPTIONS.LANGUAGE')}
|
|
||||||
value={settings.language.label}
|
|
||||||
options={languages}
|
|
||||||
onClick={openMenu}
|
|
||||||
icon={<Book />}
|
|
||||||
/>
|
|
||||||
<SettingItem
|
<SettingItem
|
||||||
label={t('APPS_SETTINGS_OPTION_THEME')}
|
label={t('APPS_SETTINGS_OPTION_THEME')}
|
||||||
value={settings.theme.label}
|
value={settings.theme.label}
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ export const settingsState = atom({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export interface IPhoneSettings {
|
export interface IPhoneSettings {
|
||||||
language: SettingOption;
|
|
||||||
wallpaper: SettingOption;
|
wallpaper: SettingOption;
|
||||||
frame: SettingOption;
|
frame: SettingOption;
|
||||||
theme: SettingOption;
|
theme: SettingOption;
|
||||||
|
|||||||
@@ -6,8 +6,30 @@ import { usePhone } from '../../../../os/phone/hooks/usePhone';
|
|||||||
import Nui from '../../../../os/nui-events/utils/Nui';
|
import Nui from '../../../../os/nui-events/utils/Nui';
|
||||||
import ReportButton from '../buttons/ReportButton';
|
import ReportButton from '../buttons/ReportButton';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ok this is some bullshit. Due to either scaling issues or the NUI
|
||||||
|
* overlay being different than the display resolution just letting
|
||||||
|
* material-ui determine what the anchor positioning of the popover
|
||||||
|
* is not reliable and has some error that appears to scale vertically.
|
||||||
|
*
|
||||||
|
* This vertical offset raises the popover positioning implementing the
|
||||||
|
* transformOrigin prop that material-ui's Popover element provides.
|
||||||
|
*
|
||||||
|
* These coefficients are NOT based on any known offsets or calc()
|
||||||
|
* functions. They are empiricallly determined. The actual scaling issue
|
||||||
|
* does NOT appear to be linear, but over the comparatively low height
|
||||||
|
* of the phone compared to the window it produces results that are within
|
||||||
|
* acceptable tolerances from the player's perspective.
|
||||||
|
* @param top - the computed distance from the top of the window to the top
|
||||||
|
* of the anchor element
|
||||||
|
*/
|
||||||
|
function calculateVerticalOffset(top: number): number {
|
||||||
|
return top * 0.2 - 38;
|
||||||
|
}
|
||||||
|
|
||||||
export const ShowMore = ({ id, isReported, isMine }) => {
|
export const ShowMore = ({ id, isReported, isMine }) => {
|
||||||
const [anchorEl, setAnchorEl] = useState<Element | null>(null);
|
const [anchorEl, setAnchorEl] = useState<Element | null>(null);
|
||||||
|
const [verticalOffset, setVerticalOffset] = useState(0);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { config } = usePhone();
|
const { config } = usePhone();
|
||||||
|
|
||||||
@@ -16,10 +38,14 @@ export const ShowMore = ({ id, isReported, isMine }) => {
|
|||||||
const handleClick = (event: React.MouseEvent) => {
|
const handleClick = (event: React.MouseEvent) => {
|
||||||
const element = event.currentTarget;
|
const element = event.currentTarget;
|
||||||
setAnchorEl(element);
|
setAnchorEl(element);
|
||||||
|
|
||||||
|
const top = window.pageYOffset + element.getBoundingClientRect().top;
|
||||||
|
setVerticalOffset(calculateVerticalOffset(top));
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
setAnchorEl(null);
|
setAnchorEl(null);
|
||||||
|
setVerticalOffset(0);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDeleteTweet = () => {
|
const handleDeleteTweet = () => {
|
||||||
@@ -46,7 +72,7 @@ export const ShowMore = ({ id, isReported, isMine }) => {
|
|||||||
open={Boolean(anchorEl)}
|
open={Boolean(anchorEl)}
|
||||||
onClose={handleClose}
|
onClose={handleClose}
|
||||||
transformOrigin={{
|
transformOrigin={{
|
||||||
vertical: -30,
|
vertical: verticalOffset,
|
||||||
horizontal: 'left',
|
horizontal: 'left',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"cellProvider": "AT&T",
|
"cellProvider": "AT&T",
|
||||||
"defaultLanguage": "en",
|
"language": "en",
|
||||||
"wallpapers": [
|
"wallpapers": [
|
||||||
{
|
{
|
||||||
"label": "Minimal",
|
"label": "Minimal",
|
||||||
@@ -67,44 +67,6 @@
|
|||||||
"value": 0.7
|
"value": 0.7
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"languages": [
|
|
||||||
{
|
|
||||||
"label": "English",
|
|
||||||
"value": "en"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Español",
|
|
||||||
"value": "es"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Français",
|
|
||||||
"value": "fr"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Türk",
|
|
||||||
"value": "tr"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Norsk",
|
|
||||||
"value": "no"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Svenska",
|
|
||||||
"value": "sv"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Português",
|
|
||||||
"value": "pt"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Português (BR)",
|
|
||||||
"value": "ptbr"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Bosanski",
|
|
||||||
"value": "ba"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"ringtones": [
|
"ringtones": [
|
||||||
{
|
{
|
||||||
"label": "Marimba",
|
"label": "Marimba",
|
||||||
@@ -136,10 +98,6 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"defaultSettings": {
|
"defaultSettings": {
|
||||||
"language": {
|
|
||||||
"label": "English",
|
|
||||||
"value": "en"
|
|
||||||
},
|
|
||||||
"wallpaper": {
|
"wallpaper": {
|
||||||
"label": "Project Error",
|
"label": "Project Error",
|
||||||
"value": "projecterror.jpg"
|
"value": "projecterror.jpg"
|
||||||
@@ -149,7 +107,7 @@
|
|||||||
"value": "default.png"
|
"value": "default.png"
|
||||||
},
|
},
|
||||||
"theme": {
|
"theme": {
|
||||||
"label": "Taso Dark",
|
"label": "taso-dark",
|
||||||
"value": "taso-dark"
|
"value": "taso-dark"
|
||||||
},
|
},
|
||||||
"zoom": {
|
"zoom": {
|
||||||
|
|||||||
+5
-7
@@ -3,7 +3,7 @@ import { initReactI18next } from 'react-i18next';
|
|||||||
import en from './locale/en.json';
|
import en from './locale/en.json';
|
||||||
import es from './locale/es.json';
|
import es from './locale/es.json';
|
||||||
import fr from './locale/fr.json';
|
import fr from './locale/fr.json';
|
||||||
import ba from './locale/ba.json';
|
import bs from './locale/bs.json';
|
||||||
import sv from './locale/sv.json';
|
import sv from './locale/sv.json';
|
||||||
import no from './locale/no.json';
|
import no from './locale/no.json';
|
||||||
import tr from './locale/tr.json';
|
import tr from './locale/tr.json';
|
||||||
@@ -15,7 +15,7 @@ const resources = {
|
|||||||
en,
|
en,
|
||||||
es,
|
es,
|
||||||
fr,
|
fr,
|
||||||
ba,
|
bs,
|
||||||
no,
|
no,
|
||||||
sv,
|
sv,
|
||||||
tr,
|
tr,
|
||||||
@@ -27,11 +27,9 @@ i18n
|
|||||||
.use(initReactI18next) // passes i18n down to react-i18next
|
.use(initReactI18next) // passes i18n down to react-i18next
|
||||||
.init({
|
.init({
|
||||||
resources,
|
resources,
|
||||||
lng: config.defaultLanguage,
|
lng: config.language,
|
||||||
react: {
|
|
||||||
bindI18n: 'languageChanged',
|
keySeparator: false, // we do not use keys in form messages.welcome
|
||||||
},
|
|
||||||
keySeparator: '.', // we do not use keys in form messages.welcome
|
|
||||||
|
|
||||||
interpolation: {
|
interpolation: {
|
||||||
escapeValue: false, // react already safes from xss
|
escapeValue: false, // react already safes from xss
|
||||||
|
|||||||
@@ -0,0 +1,127 @@
|
|||||||
|
{
|
||||||
|
"translation": {
|
||||||
|
"DATE_FORMAT": "MM/DD/YYYY",
|
||||||
|
"DATE_TIME_FORMAT": "MM/DD/YYYY hh:mm A",
|
||||||
|
|
||||||
|
"COMING_SOON": "Coming soon...",
|
||||||
|
|
||||||
|
"APPS_DIALER": "Telephone",
|
||||||
|
"APPS_CONTACTS": "Contacti",
|
||||||
|
"APPS_MESSAGES": "Poruke",
|
||||||
|
"APPS_CALCULATOR": "Calculator",
|
||||||
|
"APPS_SETTINGS": "Postavke",
|
||||||
|
"APPS_BANK": "WhoDis Banka",
|
||||||
|
"APPS_DOCUMENTS": "Bilješke",
|
||||||
|
"APPS_EXAMPLE": "Primjerna Aplikacija",
|
||||||
|
"APPS_TWITTER": "Twitter",
|
||||||
|
"APPS_SELLOUT": "Market",
|
||||||
|
"APPS_CAMERA": "Camera",
|
||||||
|
|
||||||
|
"APPS_DIALER_INCOMING_CALL_TITLE": "Incoming Phone Call",
|
||||||
|
"APPS_DIALER_CURRENT_CALL_TITLE": "Current Phone Call",
|
||||||
|
"APPS_DIALER_CURRENT_CALL_WITH": "In call with {{ transmitter }}",
|
||||||
|
"APPS_DIALER_TRANSMITTER_IS_CALLING": "{{ transmitter }} is calling you!",
|
||||||
|
"APPS_DIALER_ACCEPT_CALL": "Accept",
|
||||||
|
"APPS_DIALER_REJECT_CALL": "Reject",
|
||||||
|
"APPS_DIALER_END_CALL": "End",
|
||||||
|
|
||||||
|
"APPS_TWITTER_TWEET": "Tweet",
|
||||||
|
"APPS_TWITTER_TWEET_MESSAGE_PLACEHOLDER": "Šta ima?",
|
||||||
|
"APPS_TWITTER_IMAGE_PLACEHOLDER": "Link do vašeg slike ili gifa",
|
||||||
|
"APPS_TWITTER_SUBMIT_IMAGE": "Dodati Slike",
|
||||||
|
"APPS_TWITTER_CLOSE_IMAGE": "Zatvori",
|
||||||
|
"APPS_TWITTER_CLOSE": "Zatvori",
|
||||||
|
"APPS_TWITTER_DELETE": "Izbriši",
|
||||||
|
"APPS_TWITTER_REPORT": "Prijavi",
|
||||||
|
"APPS_TWITTER_REPORTED": "Prijavio",
|
||||||
|
"APPS_TWITTER_JUST_NOW": "Tek Sada",
|
||||||
|
"APPS_TWITTER_SEARCH_TWEETS": "Potražite za tweet",
|
||||||
|
"APPS_TWITTER_SEARCH_TWEETS_PLACEHOLDER": "Pretražite sa imenom profila ili poruke",
|
||||||
|
"APPS_TWITTER_TWEET_MESSAGE_CHAR_LIMIT": "Poruka ide preko ograničenje broj Slova",
|
||||||
|
"APPS_TWITTER_TWEET_MESSAGE_NEW_LINE_LIMIT": "Message is over the new line limit",
|
||||||
|
"APPS_TWITTER_CREATE_SUCCESS": "Vaš tweet je uspješno poslan",
|
||||||
|
"APPS_TWITTER_CREATE_FAILED": "Slanje vašeg tweeta nije uspjelo",
|
||||||
|
"APPS_TWITTER_EDIT_PROFILE_AVATAR": "URL za avatar",
|
||||||
|
"APPS_TWITTER_EDIT_PROFILE_NAME": "Ime profila",
|
||||||
|
"APPS_TWITTER_EDIT_PROFILE_BIO": "Descriptcia",
|
||||||
|
"APPS_TWITTER_EDIT_PROFILE_LOCATION": "Lokacija",
|
||||||
|
"APPS_TWITTER_EDIT_PROFILE_JOB": "Posao",
|
||||||
|
"APPS_TWITTER_EDIT_PROFILE_SUCCESS": "Ažuriran vam je profil!",
|
||||||
|
"APPS_TWITTER_EDIT_PROFILE_FAILURE": "Nismo uspjeli ažurirati vaš profil!",
|
||||||
|
"APPS_TWITTER_TIME_JUST_NOW": "Tek Sada",
|
||||||
|
"APPS_TWITTER_TIME_MINUTES": "m",
|
||||||
|
"APPS_TWITTER_TIME_HOURS": "h",
|
||||||
|
"APPS_TWITTER_TIME_DAYS": "d",
|
||||||
|
"APPS_TWITTER_NEW_BROADCAST": "New tweet from @{{ profile_name }}!",
|
||||||
|
"APPS_TWITTER_UNREAD_MESSAGES": "You have {{ count }} new tweets in your timeline!",
|
||||||
|
|
||||||
|
"APPS_BANK_TRANSFER": "Prebaciti Novac",
|
||||||
|
"APPS_BANK_HOME_TITLE": "Dobrodošli!",
|
||||||
|
"APPS_BANK_ACCOUNT_LINK": "Račun",
|
||||||
|
"APPS_BANK_TIME_JUST_NOW": "Tek Sada",
|
||||||
|
"APPS_BANK_ACCOUNT_TITLE": "Sažetak računa",
|
||||||
|
"APPS_BANK_ACCOUNT_TRANSACTIONS": "Transakcije",
|
||||||
|
"APPS_BANK_ACCOUNT_SEE_TRANSACTION": "Vidjeti sve",
|
||||||
|
"APPS_BANK_ACTIONS_TRANSFER": "Prebaciti Novac",
|
||||||
|
"APPS_BANK_ALERT_TRANSFER_SUCCESS": "uspješno prebacio novac!",
|
||||||
|
"APPS_BANK_ALERT_TRANSFER_FAILURE": "Nismo uspjeli prebaciti novac!",
|
||||||
|
|
||||||
|
"APPS_MESSAGES_SEARCH_PLACEHOLDER": "Po tražiti poruke ...",
|
||||||
|
"APPS_MESSAGES_NEW_MESSAGE": "Poruka...",
|
||||||
|
"APPS_MESSAGES_NEW_MESSAGE_FAILED:": "Failed to send message",
|
||||||
|
"APPS_MESSAGES_NEW_MESSAGE_GROUP": "Brojevi Telephona...",
|
||||||
|
"APPS_MESSAGES_GROUP_CHAT_LABEL": "Oznaka grupnog chata...",
|
||||||
|
"APPS_MESSAGES_NEW_MESSAGE_GROUP_SUBMIT": "Pošalji",
|
||||||
|
"APPS_MESSAGES_INVALID_PHONE_NUMBER": "Nije validan brok telephona: ",
|
||||||
|
"APPS_MESSAGES_MESSAGE_GROUP_DUPLICATE": "Ova groupa već postoji!",
|
||||||
|
"APPS_MESSAGES_MESSAGE_GROUP_CREATE_FAILED": "Nismo mogli napraviti ovu groupu!",
|
||||||
|
"APPS_MESSAGES_MESSAGE_GROUP_CREATE_MINE": "Ne možete sami sebe dodati u grupu!",
|
||||||
|
"APPS_MESSAGES_INPUT_NAME_OR_NUMBER": "Search contacts or type number and press enter",
|
||||||
|
|
||||||
|
"APPS_CONTACT_FORM_NAME": "Ime",
|
||||||
|
"APPS_CONTACT_FORM_NUMBER": "Brok",
|
||||||
|
"APPS_CONTACT_FORM_AVATAR": "URL za avatar",
|
||||||
|
|
||||||
|
"APPS_CONTACT_ADD_SUCCESS": "Uspješno napravili novi kontakt!",
|
||||||
|
"APPS_CONTACT_ADD_FAILED": "Nismo uspjeli stvoriti novi kontakt!",
|
||||||
|
"APPS_CONTACT_UPDATE_SUCCESS": "Uspješno ažurirali kontakt!",
|
||||||
|
"APPS_CONTACT_UPDATE_FAILED": "Nismo uspjeli ažurirati kontakt!",
|
||||||
|
"APPS_CONTACT_DELETE_SUCCESS": "Uspješno izbrisali kontakt!",
|
||||||
|
"APPS_CONTACT_DELETE_FAILED": "Nismo uspjeli izbrisati ovaj kontakt!",
|
||||||
|
"APPS_CONTACT_PLACEHOLDER_SEARCH_CONTACTS": "Search contacts",
|
||||||
|
"APPS_CONTACT_MODAL_PLACEHOLDER_NAME": "Name",
|
||||||
|
"APPS_CONTACT_MODAL_PLACEHOLDER_NUMBER": "Number",
|
||||||
|
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Avatar",
|
||||||
|
"APPS_CONTACT_MODAL_BUTTON_ADD": "Add Contact",
|
||||||
|
|
||||||
|
"APPS_DOCUMENTS_ADD_SUCCESS": "Successfully saved note.",
|
||||||
|
"APPS_DOCUMENTS_ADD_FAILED": "Failed to save note.",
|
||||||
|
"APPS_DOCUMENTS_UPDATE_SUCCESS": "Successfully updated note.",
|
||||||
|
"APPS_DOCUMENTS_UPDATE_FAILED": "Failed to update note.",
|
||||||
|
"APPS_DOCUMENTS_DELETE_SUCCESS": "Successfully deleted note.",
|
||||||
|
"APPS_DOCUMENTS_DELETE_FAILED": "Failed to delete note.",
|
||||||
|
|
||||||
|
"APPS_CALCULATOR_COPIED": "Result was copied to clipboard!",
|
||||||
|
|
||||||
|
"APPS_MARKETPLACE_CREATE_LISTING_SUCCESS": "Successfully created a new listing",
|
||||||
|
"APPS_MARKETPALCE_CREATE_LISTING_FAILED": "Failed to create a new listing",
|
||||||
|
|
||||||
|
"APPS_SETTINGS_PHONE_NUMBER": "Phone Number",
|
||||||
|
"APPS_SETTINGS_OPTION_WALLPAPER": "Wallpaper",
|
||||||
|
"APPS_SETTINGS_OPTION_FRAME": "Frame",
|
||||||
|
"APPS_SETTINGS_OPTION_THEME": "Theme",
|
||||||
|
"APPS_SETTINGS_OPTION_ZOOM": "Zoom",
|
||||||
|
"APPS_SETTINGS_OPTION_RINGTONE": "Ringtone",
|
||||||
|
"APPS_SETTINGS_OPTION_RINGTONEVOL": "Ringtone Volume",
|
||||||
|
"APPS_SETTINGS_OPTION_NOTIFICATION": "Notification",
|
||||||
|
"APPS_SETTINGS_OPTION_NOTIFICATIONVOL": "Notification Volume",
|
||||||
|
|
||||||
|
"GENERIC_SAVE": "Save",
|
||||||
|
"GENERIC_UPDATE": "Update",
|
||||||
|
"GENERIC_DELETE": "Delete",
|
||||||
|
"GENERIC_CLOSE": "Close",
|
||||||
|
"GENERIC_CANCEL": "Cancel",
|
||||||
|
"GENERIC_TITLE": "Title",
|
||||||
|
"GENERIC_CONTENT": "Content"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
"APPS_CALCULATOR": "Calculator",
|
"APPS_CALCULATOR": "Calculator",
|
||||||
"APPS_SETTINGS": "Postavke",
|
"APPS_SETTINGS": "Postavke",
|
||||||
"APPS_BANK": "WhoDis Banka",
|
"APPS_BANK": "WhoDis Banka",
|
||||||
"APPS_NOTES": "Bilješke",
|
"APPS_DOCUMENTS": "Bilješke",
|
||||||
"APPS_EXAMPLE": "Primjerna Aplikacija",
|
"APPS_EXAMPLE": "Primjerna Aplikacija",
|
||||||
"APPS_TWITTER": "Twitter",
|
"APPS_TWITTER": "Twitter",
|
||||||
"APPS_SELLOUT": "Market",
|
"APPS_SELLOUT": "Market",
|
||||||
@@ -97,12 +97,12 @@
|
|||||||
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Avatar",
|
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Avatar",
|
||||||
"APPS_CONTACT_MODAL_BUTTON_ADD": "Dodajte kontakt",
|
"APPS_CONTACT_MODAL_BUTTON_ADD": "Dodajte kontakt",
|
||||||
|
|
||||||
"APPS_NOTES_ADD_SUCCESS": "Bilješka je uspješno spremljena.",
|
"APPS_DOCUMENTS_ADD_SUCCESS": "Bilješka je uspješno spremljena.",
|
||||||
"APPS_NOTES_ADD_FAILED": "Spremanje bilješke nije uspjelo.",
|
"APPS_DOCUMENTS_ADD_FAILED": "Spremanje bilješke nije uspjelo.",
|
||||||
"APPS_NOTES_UPDATE_SUCCESS": "Bilješka je uspješno ažurirana.",
|
"APPS_DOCUMENTS_UPDATE_SUCCESS": "Bilješka je uspješno ažurirana.",
|
||||||
"APPS_NOTES_UPDATE_FAILED": "Ažuriranje bilješke nije uspjelo.",
|
"APPS_DOCUMENTS_UPDATE_FAILED": "Ažuriranje bilješke nije uspjelo.",
|
||||||
"APPS_NOTES_DELETE_SUCCESS": "Bilješka je uspješno izbrisana.",
|
"APPS_DOCUMENTS_DELETE_SUCCESS": "Bilješka je uspješno izbrisana.",
|
||||||
"APPS_NOTES_DELETE_FAILED": "Brisanje bilješke nije uspjelo.",
|
"APPS_DOCUMENTS_DELETE_FAILED": "Brisanje bilješke nije uspjelo.",
|
||||||
|
|
||||||
"APPS_CALCULATOR_COPIED": "Rezultat je kopiran u međuspremnik!",
|
"APPS_CALCULATOR_COPIED": "Rezultat je kopiran u međuspremnik!",
|
||||||
|
|
||||||
@@ -2,15 +2,6 @@
|
|||||||
"translation": {
|
"translation": {
|
||||||
"DATE_FORMAT": "MM/DD/YYYY",
|
"DATE_FORMAT": "MM/DD/YYYY",
|
||||||
"DATE_TIME_FORMAT": "MM/DD/YYYY hh:mm A",
|
"DATE_TIME_FORMAT": "MM/DD/YYYY hh:mm A",
|
||||||
"SETTINGS": {
|
|
||||||
"CATEGORY": {
|
|
||||||
"APPEARANCE": "Appearance",
|
|
||||||
"PHONE": "Phone"
|
|
||||||
},
|
|
||||||
"OPTIONS": {
|
|
||||||
"LANGUAGE": "Language"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
"COMING_SOON": "Coming soon...",
|
"COMING_SOON": "Coming soon...",
|
||||||
"INITIALIZING": "Initializing",
|
"INITIALIZING": "Initializing",
|
||||||
@@ -21,7 +12,7 @@
|
|||||||
"APPS_CALCULATOR": "Calculator",
|
"APPS_CALCULATOR": "Calculator",
|
||||||
"APPS_SETTINGS": "Settings",
|
"APPS_SETTINGS": "Settings",
|
||||||
"APPS_BANK": "WhoDis Banking",
|
"APPS_BANK": "WhoDis Banking",
|
||||||
"APPS_NOTES": "Notes",
|
"APPS_DOCUMENTS": "Documents",
|
||||||
"APPS_EXAMPLE": "Example app",
|
"APPS_EXAMPLE": "Example app",
|
||||||
"APPS_TWITTER": "Twitter",
|
"APPS_TWITTER": "Twitter",
|
||||||
"APPS_SELLOUT": "Market",
|
"APPS_SELLOUT": "Market",
|
||||||
@@ -110,12 +101,14 @@
|
|||||||
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Avatar",
|
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Avatar",
|
||||||
"APPS_CONTACT_MODAL_BUTTON_ADD": "Add Contact",
|
"APPS_CONTACT_MODAL_BUTTON_ADD": "Add Contact",
|
||||||
|
|
||||||
"APPS_NOTES_ADD_SUCCESS": "Successfully saved note.",
|
"APPS_DOCUMENTS_NOTES_TITLE": "Notes",
|
||||||
"APPS_NOTES_ADD_FAILED": "Failed to save note.",
|
"APPS_DOCUMENTS_LICENSE_TITLE": "Licenses",
|
||||||
"APPS_NOTES_UPDATE_SUCCESS": "Successfully updated note.",
|
"APPS_DOCUMENTS_ADD_SUCCESS": "Successfully saved note.",
|
||||||
"APPS_NOTES_UPDATE_FAILED": "Failed to update note.",
|
"APPS_DOCUMENTS_ADD_FAILED": "Failed to save note.",
|
||||||
"APPS_NOTES_DELETE_SUCCESS": "Successfully deleted note.",
|
"APPS_DOCUMENTS_UPDATE_SUCCESS": "Successfully updated note.",
|
||||||
"APPS_NOTES_DELETE_FAILED": "Failed to delete note.",
|
"APPS_DOCUMENTS_UPDATE_FAILED": "Failed to update note.",
|
||||||
|
"APPS_DOCUMENTS_DELETE_SUCCESS": "Successfully deleted note.",
|
||||||
|
"APPS_DOCUMENTS_DELETE_FAILED": "Failed to delete note.",
|
||||||
|
|
||||||
"APPS_CALCULATOR_COPIED": "Result was copied to clipboard!",
|
"APPS_CALCULATOR_COPIED": "Result was copied to clipboard!",
|
||||||
|
|
||||||
@@ -130,7 +123,6 @@
|
|||||||
"APPS_SETTINGS_OPTION_NOTIFICATION_FILTER": "Notification Filters",
|
"APPS_SETTINGS_OPTION_NOTIFICATION_FILTER": "Notification Filters",
|
||||||
"APPS_SETTINGS_OPTION_NOTIFICATION": "Notification",
|
"APPS_SETTINGS_OPTION_NOTIFICATION": "Notification",
|
||||||
"APPS_SETTINGS_OPTION_NOTIFICATIONVOL": "Notification Volume",
|
"APPS_SETTINGS_OPTION_NOTIFICATIONVOL": "Notification Volume",
|
||||||
"APPS_SETTING_STREAMER_MODE_DESC": "Hide images before they are shown",
|
|
||||||
|
|
||||||
"APPS_MARKETPLACE_CREATE_LISTING_SUCCESS": "Successfully created a new listing",
|
"APPS_MARKETPLACE_CREATE_LISTING_SUCCESS": "Successfully created a new listing",
|
||||||
"APPS_MARKETPALCE_CREATE_LISTING_FAILED": "Failed to create a new listing",
|
"APPS_MARKETPALCE_CREATE_LISTING_FAILED": "Failed to create a new listing",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"APPS_CALCULATOR": "Calculadora",
|
"APPS_CALCULATOR": "Calculadora",
|
||||||
"APPS_SETTINGS": "Ajustes",
|
"APPS_SETTINGS": "Ajustes",
|
||||||
"APPS_BANK": "Banco WhoDis",
|
"APPS_BANK": "Banco WhoDis",
|
||||||
"APPS_NOTES": "Notas",
|
"APPS_DOCUMENTS": "Notas",
|
||||||
"APPS_EXAMPLE": "App de Ejemplo",
|
"APPS_EXAMPLE": "App de Ejemplo",
|
||||||
"APPS_TWITTER": "Twitter",
|
"APPS_TWITTER": "Twitter",
|
||||||
"APPS_SELLOUT": "Mercado",
|
"APPS_SELLOUT": "Mercado",
|
||||||
@@ -94,12 +94,12 @@
|
|||||||
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Avatar",
|
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Avatar",
|
||||||
"APPS_CONTACT_MODAL_BUTTON_ADD": "Agregar contacto",
|
"APPS_CONTACT_MODAL_BUTTON_ADD": "Agregar contacto",
|
||||||
|
|
||||||
"APPS_NOTES_ADD_SUCCESS": "Se ha guardado la nota.",
|
"APPS_DOCUMENTS_ADD_SUCCESS": "Se ha guardado la nota.",
|
||||||
"APPS_NOTES_ADD_FAILED": "Hubo un error al guardar la nota.",
|
"APPS_DOCUMENTS_ADD_FAILED": "Hubo un error al guardar la nota.",
|
||||||
"APPS_NOTES_UPDATE_SUCCESS": "Se ha actualizado la nota.",
|
"APPS_DOCUMENTS_UPDATE_SUCCESS": "Se ha actualizado la nota.",
|
||||||
"APPS_NOTES_UPDATE_FAILED": "Hubo un error al actualizar la nota.",
|
"APPS_DOCUMENTS_UPDATE_FAILED": "Hubo un error al actualizar la nota.",
|
||||||
"APPS_NOTES_DELETE_SUCCESS": "Se ha borrado la nota.",
|
"APPS_DOCUMENTS_DELETE_SUCCESS": "Se ha borrado la nota.",
|
||||||
"APPS_NOTES_DELETE_FAILED": "Hubo un error al borrar la nota.",
|
"APPS_DOCUMENTS_DELETE_FAILED": "Hubo un error al borrar la nota.",
|
||||||
|
|
||||||
"APPS_CALCULATOR_COPIED": "Se ha copiado el resultado!",
|
"APPS_CALCULATOR_COPIED": "Se ha copiado el resultado!",
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"APPS_CALCULATOR": "Calculatrice",
|
"APPS_CALCULATOR": "Calculatrice",
|
||||||
"APPS_SETTINGS": "Paramètres",
|
"APPS_SETTINGS": "Paramètres",
|
||||||
"APPS_BANK": "WhoDis Banque",
|
"APPS_BANK": "WhoDis Banque",
|
||||||
"APPS_NOTES": "Notes",
|
"APPS_DOCUMENTS": "Notes",
|
||||||
"APPS_EXAMPLE": "App test",
|
"APPS_EXAMPLE": "App test",
|
||||||
"APPS_TWITTER": "Twitter",
|
"APPS_TWITTER": "Twitter",
|
||||||
"APPS_SELLOUT": "Marché",
|
"APPS_SELLOUT": "Marché",
|
||||||
@@ -101,12 +101,12 @@
|
|||||||
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Photo",
|
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Photo",
|
||||||
"APPS_CONTACT_MODAL_BUTTON_ADD": "Ajouter un contact",
|
"APPS_CONTACT_MODAL_BUTTON_ADD": "Ajouter un contact",
|
||||||
|
|
||||||
"APPS_NOTES_ADD_SUCCESS": "Note sauvegardée avec succès.",
|
"APPS_DOCUMENTS_ADD_SUCCESS": "Note sauvegardée avec succès.",
|
||||||
"APPS_NOTES_ADD_FAILED": "Erreur lors de la suppression d'une note.",
|
"APPS_DOCUMENTS_ADD_FAILED": "Erreur lors de la suppression d'une note.",
|
||||||
"APPS_NOTES_UPDATE_SUCCESS": "Mise à jour d'une note réalisée avec succès.",
|
"APPS_DOCUMENTS_UPDATE_SUCCESS": "Mise à jour d'une note réalisée avec succès.",
|
||||||
"APPS_NOTES_UPDATE_FAILED": "Erreur lors de la mise à jour d'une note.",
|
"APPS_DOCUMENTS_UPDATE_FAILED": "Erreur lors de la mise à jour d'une note.",
|
||||||
"APPS_NOTES_DELETE_SUCCESS": "Note supprimée avec succès.",
|
"APPS_DOCUMENTS_DELETE_SUCCESS": "Note supprimée avec succès.",
|
||||||
"APPS_NOTES_DELETE_FAILED": "Erreur lors de la suppression d'une note.",
|
"APPS_DOCUMENTS_DELETE_FAILED": "Erreur lors de la suppression d'une note.",
|
||||||
|
|
||||||
"APPS_CALCULATOR_COPIED": "Résultat copié dans le presse-papier!",
|
"APPS_CALCULATOR_COPIED": "Résultat copié dans le presse-papier!",
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"APPS_CALCULATOR": "Kalkulator",
|
"APPS_CALCULATOR": "Kalkulator",
|
||||||
"APPS_SETTINGS": "Instillinger",
|
"APPS_SETTINGS": "Instillinger",
|
||||||
"APPS_BANK": "WhoDis Bank",
|
"APPS_BANK": "WhoDis Bank",
|
||||||
"APPS_NOTES": "Notater",
|
"APPS_DOCUMENTS": "Notater",
|
||||||
"APPS_EXAMPLE": "Example app",
|
"APPS_EXAMPLE": "Example app",
|
||||||
"APPS_TWITTER": "Twitter",
|
"APPS_TWITTER": "Twitter",
|
||||||
"APPS_SELLOUT": "Marked",
|
"APPS_SELLOUT": "Marked",
|
||||||
@@ -101,12 +101,12 @@
|
|||||||
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Avatar",
|
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Avatar",
|
||||||
"APPS_CONTACT_MODAL_BUTTON_ADD": "Legg til",
|
"APPS_CONTACT_MODAL_BUTTON_ADD": "Legg til",
|
||||||
|
|
||||||
"APPS_NOTES_ADD_SUCCESS": "Lagret notat!",
|
"APPS_DOCUMENTS_ADD_SUCCESS": "Lagret notat!",
|
||||||
"APPS_NOTES_ADD_FAILED": "Kunne ikke lagre notatet!",
|
"APPS_DOCUMENTS_ADD_FAILED": "Kunne ikke lagre notatet!",
|
||||||
"APPS_NOTES_UPDATE_SUCCESS": "Oppdatert notat!",
|
"APPS_DOCUMENTS_UPDATE_SUCCESS": "Oppdatert notat!",
|
||||||
"APPS_NOTES_UPDATE_FAILED": "Kunne ikke oppdatere notatet!",
|
"APPS_DOCUMENTS_UPDATE_FAILED": "Kunne ikke oppdatere notatet!",
|
||||||
"APPS_NOTES_DELETE_SUCCESS": "Slettet notat!",
|
"APPS_DOCUMENTS_DELETE_SUCCESS": "Slettet notat!",
|
||||||
"APPS_NOTES_DELETE_FAILED": "Kunne ikke slette notatet!",
|
"APPS_DOCUMENTS_DELETE_FAILED": "Kunne ikke slette notatet!",
|
||||||
|
|
||||||
"APPS_CALCULATOR_COPIED": "Teskten ble kopiert til utklippstavle",
|
"APPS_CALCULATOR_COPIED": "Teskten ble kopiert til utklippstavle",
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"APPS_CALCULATOR": "Calculadora",
|
"APPS_CALCULATOR": "Calculadora",
|
||||||
"APPS_SETTINGS": "Definições",
|
"APPS_SETTINGS": "Definições",
|
||||||
"APPS_BANK": "WhoDis Banco",
|
"APPS_BANK": "WhoDis Banco",
|
||||||
"APPS_NOTES": "Notas",
|
"APPS_DOCUMENTS": "Notas",
|
||||||
"APPS_EXAMPLE": "Aplicativo exemplo",
|
"APPS_EXAMPLE": "Aplicativo exemplo",
|
||||||
"APPS_TWITTER": "Twitter",
|
"APPS_TWITTER": "Twitter",
|
||||||
"APPS_SELLOUT": "Market",
|
"APPS_SELLOUT": "Market",
|
||||||
@@ -94,12 +94,12 @@
|
|||||||
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Avatar",
|
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Avatar",
|
||||||
"APPS_CONTACT_MODAL_BUTTON_ADD": "Adicionar contacto",
|
"APPS_CONTACT_MODAL_BUTTON_ADD": "Adicionar contacto",
|
||||||
|
|
||||||
"APPS_NOTES_ADD_SUCCESS": "Successfully saved note.",
|
"APPS_DOCUMENTS_ADD_SUCCESS": "Successfully saved note.",
|
||||||
"APPS_NOTES_ADD_FAILED": "Failed to save note.",
|
"APPS_DOCUMENTS_ADD_FAILED": "Failed to save note.",
|
||||||
"APPS_NOTES_UPDATE_SUCCESS": "Successfully updated note.",
|
"APPS_DOCUMENTS_UPDATE_SUCCESS": "Successfully updated note.",
|
||||||
"APPS_NOTES_UPDATE_FAILED": "Failed to update note.",
|
"APPS_DOCUMENTS_UPDATE_FAILED": "Failed to update note.",
|
||||||
"APPS_NOTES_DELETE_SUCCESS": "Successfully deleted note.",
|
"APPS_DOCUMENTS_DELETE_SUCCESS": "Successfully deleted note.",
|
||||||
"APPS_NOTES_DELETE_FAILED": "Failed to delete note.",
|
"APPS_DOCUMENTS_DELETE_FAILED": "Failed to delete note.",
|
||||||
|
|
||||||
"APPS_CALCULATOR_COPIED": "Result was copied to clipboard!",
|
"APPS_CALCULATOR_COPIED": "Result was copied to clipboard!",
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"APPS_CALCULATOR": "Calculadora",
|
"APPS_CALCULATOR": "Calculadora",
|
||||||
"APPS_SETTINGS": "Configurações",
|
"APPS_SETTINGS": "Configurações",
|
||||||
"APPS_BANK": "Banco WhoDis",
|
"APPS_BANK": "Banco WhoDis",
|
||||||
"APPS_NOTES": "Notas",
|
"APPS_DOCUMENTS": "Notas",
|
||||||
"APPS_EXAMPLE": "Aplicativo de exemplo",
|
"APPS_EXAMPLE": "Aplicativo de exemplo",
|
||||||
"APPS_TWITTER": "Twitter",
|
"APPS_TWITTER": "Twitter",
|
||||||
"APPS_SELLOUT": "Market",
|
"APPS_SELLOUT": "Market",
|
||||||
@@ -112,12 +112,12 @@
|
|||||||
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Foto de perfil",
|
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Foto de perfil",
|
||||||
"APPS_CONTACT_MODAL_BUTTON_ADD": "Adcionar contato",
|
"APPS_CONTACT_MODAL_BUTTON_ADD": "Adcionar contato",
|
||||||
|
|
||||||
"APPS_NOTES_ADD_SUCCESS": "Nota salva com sucesso.",
|
"APPS_DOCUMENTS_ADD_SUCCESS": "Nota salva com sucesso.",
|
||||||
"APPS_NOTES_ADD_FAILED": "Falha em salvar nota.",
|
"APPS_DOCUMENTS_ADD_FAILED": "Falha em salvar nota.",
|
||||||
"APPS_NOTES_UPDATE_SUCCESS": "Nota atualizada com sucesso.",
|
"APPS_DOCUMENTS_UPDATE_SUCCESS": "Nota atualizada com sucesso.",
|
||||||
"APPS_NOTES_UPDATE_FAILED": "Falha em atualizar nota.",
|
"APPS_DOCUMENTS_UPDATE_FAILED": "Falha em atualizar nota.",
|
||||||
"APPS_NOTES_DELETE_SUCCESS": "Nota deletada com sucesso.",
|
"APPS_DOCUMENTS_DELETE_SUCCESS": "Nota deletada com sucesso.",
|
||||||
"APPS_NOTES_DELETE_FAILED": "Falha em deletar nota.",
|
"APPS_DOCUMENTS_DELETE_FAILED": "Falha em deletar nota.",
|
||||||
|
|
||||||
"APPS_CALCULATOR_COPIED": "Resultado foi copiado para a área de transferência!",
|
"APPS_CALCULATOR_COPIED": "Resultado foi copiado para a área de transferência!",
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"APPS_CALCULATOR": "Kalkylator",
|
"APPS_CALCULATOR": "Kalkylator",
|
||||||
"APPS_SETTINGS": "Inställningar",
|
"APPS_SETTINGS": "Inställningar",
|
||||||
"APPS_BANK": "WhoDis Bank",
|
"APPS_BANK": "WhoDis Bank",
|
||||||
"APPS_NOTES": "Anteckningar",
|
"APPS_DOCUMENTS": "Anteckningar",
|
||||||
"APPS_EXAMPLE": "Exempel app",
|
"APPS_EXAMPLE": "Exempel app",
|
||||||
"APPS_TWITTER": "Twitter",
|
"APPS_TWITTER": "Twitter",
|
||||||
"APPS_SELLOUT": "Market",
|
"APPS_SELLOUT": "Market",
|
||||||
@@ -94,12 +94,12 @@
|
|||||||
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Avatar",
|
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Avatar",
|
||||||
"APPS_CONTACT_MODAL_BUTTON_ADD": "Add Contact",
|
"APPS_CONTACT_MODAL_BUTTON_ADD": "Add Contact",
|
||||||
|
|
||||||
"APPS_NOTES_ADD_SUCCESS": "Successfully saved note.",
|
"APPS_DOCUMENTS_ADD_SUCCESS": "Successfully saved note.",
|
||||||
"APPS_NOTES_ADD_FAILED": "Failed to save note.",
|
"APPS_DOCUMENTS_ADD_FAILED": "Failed to save note.",
|
||||||
"APPS_NOTES_UPDATE_SUCCESS": "Successfully updated note.",
|
"APPS_DOCUMENTS_UPDATE_SUCCESS": "Successfully updated note.",
|
||||||
"APPS_NOTES_UPDATE_FAILED": "Failed to update note.",
|
"APPS_DOCUMENTS_UPDATE_FAILED": "Failed to update note.",
|
||||||
"APPS_NOTES_DELETE_SUCCESS": "Successfully deleted note.",
|
"APPS_DOCUMENTS_DELETE_SUCCESS": "Successfully deleted note.",
|
||||||
"APPS_NOTES_DELETE_FAILED": "Failed to delete note.",
|
"APPS_DOCUMENTS_DELETE_FAILED": "Failed to delete note.",
|
||||||
|
|
||||||
"APPS_CALCULATOR_COPIED": "Result was copied to clipboard!",
|
"APPS_CALCULATOR_COPIED": "Result was copied to clipboard!",
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"APPS_CALCULATOR": "Hesap makinesi",
|
"APPS_CALCULATOR": "Hesap makinesi",
|
||||||
"APPS_SETTINGS": "Ayarlar",
|
"APPS_SETTINGS": "Ayarlar",
|
||||||
"APPS_BANK": "WhoDis Bankası",
|
"APPS_BANK": "WhoDis Bankası",
|
||||||
"APPS_NOTES": "Notlar",
|
"APPS_DOCUMENTS": "Notlar",
|
||||||
"APPS_EXAMPLE": "Örnek uygulama",
|
"APPS_EXAMPLE": "Örnek uygulama",
|
||||||
"APPS_TWITTER": "Twitter",
|
"APPS_TWITTER": "Twitter",
|
||||||
"APPS_SELLOUT": "Market",
|
"APPS_SELLOUT": "Market",
|
||||||
@@ -94,12 +94,12 @@
|
|||||||
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Avatar",
|
"APPS_CONTACT_MODAL_PLACEHOLDER_AVATAR": "Avatar",
|
||||||
"APPS_CONTACT_MODAL_BUTTON_ADD": "Add Contact",
|
"APPS_CONTACT_MODAL_BUTTON_ADD": "Add Contact",
|
||||||
|
|
||||||
"APPS_NOTES_ADD_SUCCESS": "Successfully saved note.",
|
"APPS_DOCUMENTS_ADD_SUCCESS": "Successfully saved note.",
|
||||||
"APPS_NOTES_ADD_FAILED": "Failed to save note.",
|
"APPS_DOCUMENTS_ADD_FAILED": "Failed to save note.",
|
||||||
"APPS_NOTES_UPDATE_SUCCESS": "Successfully updated note.",
|
"APPS_DOCUMENTS_UPDATE_SUCCESS": "Successfully updated note.",
|
||||||
"APPS_NOTES_UPDATE_FAILED": "Failed to update note.",
|
"APPS_DOCUMENTS_UPDATE_FAILED": "Failed to update note.",
|
||||||
"APPS_NOTES_DELETE_SUCCESS": "Successfully deleted note.",
|
"APPS_DOCUMENTS_DELETE_SUCCESS": "Successfully deleted note.",
|
||||||
"APPS_NOTES_DELETE_FAILED": "Failed to delete note.",
|
"APPS_DOCUMENTS_DELETE_FAILED": "Failed to delete note.",
|
||||||
|
|
||||||
"APPS_CALCULATOR_COPIED": "Result was copied to clipboard!",
|
"APPS_CALCULATOR_COPIED": "Result was copied to clipboard!",
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { faTwitter } from '@fortawesome/free-brands-svg-icons';
|
|||||||
|
|
||||||
import ContactsIcon from '@material-ui/icons/Contacts';
|
import ContactsIcon from '@material-ui/icons/Contacts';
|
||||||
import SettingsIcon from '@material-ui/icons/Settings';
|
import SettingsIcon from '@material-ui/icons/Settings';
|
||||||
|
import FolderIcon from '@material-ui/icons/Folder';
|
||||||
import MessageIcon from '@material-ui/icons/Message';
|
import MessageIcon from '@material-ui/icons/Message';
|
||||||
import { CalculatorIcon } from '../../../apps/calculator/components/CalculatorIcon';
|
import { CalculatorIcon } from '../../../apps/calculator/components/CalculatorIcon';
|
||||||
import CameraAltIcon from '@material-ui/icons/CameraAlt';
|
import CameraAltIcon from '@material-ui/icons/CameraAlt';
|
||||||
@@ -24,7 +25,7 @@ import { MessagesApp } from '../../../apps/messages/components/MessagesApp';
|
|||||||
import { TwitterApp } from '../../../apps/twitter/components/TwitterApp';
|
import { TwitterApp } from '../../../apps/twitter/components/TwitterApp';
|
||||||
import { ExampleApp } from '../../../apps/example/components/ExampleApp';
|
import { ExampleApp } from '../../../apps/example/components/ExampleApp';
|
||||||
import { SelloutApp } from '../../../apps/sellout/components/SelloutApp';
|
import { SelloutApp } from '../../../apps/sellout/components/SelloutApp';
|
||||||
import { NotesApp } from '../../../apps/notes/NotesApp';
|
import { NotesApp } from '../../../apps/notes/DoucmentsApp';
|
||||||
import CameraApp from '../../../apps/camera/components/CameraApp';
|
import CameraApp from '../../../apps/camera/components/CameraApp';
|
||||||
import { AppRoute } from '../components/AppRoute';
|
import { AppRoute } from '../components/AppRoute';
|
||||||
|
|
||||||
@@ -40,7 +41,10 @@ import {
|
|||||||
SELLOUT_APP_PRIMARY_COLOR,
|
SELLOUT_APP_PRIMARY_COLOR,
|
||||||
SELLOUT_APP_ICON_COLOR,
|
SELLOUT_APP_ICON_COLOR,
|
||||||
} from '../../../apps/sellout/sellout.theme';
|
} from '../../../apps/sellout/sellout.theme';
|
||||||
import { NOTES_APP_ICON_COLOR, NOTES_APP_PRIMARY_COLOR } from '../../../apps/notes/notes.theme';
|
import {
|
||||||
|
DOCUMENTS_APP_ICON_COLOR,
|
||||||
|
DOCUMENTS_APP_PRIMARY_COLOR,
|
||||||
|
} from '../../../apps/notes/documents.theme';
|
||||||
import { DIALER_APP_PRIMARY_COLOR, DIALER_APP_TEXT_COLOR } from '../../../apps/dialer/dialer.theme';
|
import { DIALER_APP_PRIMARY_COLOR, DIALER_APP_TEXT_COLOR } from '../../../apps/dialer/dialer.theme';
|
||||||
import {
|
import {
|
||||||
TWITTER_APP_PRIMARY_COLOR,
|
TWITTER_APP_PRIMARY_COLOR,
|
||||||
@@ -140,14 +144,14 @@ export const APPS: IAppConfig[] = [
|
|||||||
Route: () => <AppRoute id="SELLOUT" path="/sellout" component={SelloutApp} />,
|
Route: () => <AppRoute id="SELLOUT" path="/sellout" component={SelloutApp} />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'NOTES',
|
id: 'DOCUMENTS',
|
||||||
nameLocale: 'APPS_NOTES',
|
nameLocale: 'APPS_DOCUMENTS',
|
||||||
icon: <FontAwesomeIcon icon={faStickyNote} fixedWidth />,
|
icon: <FolderIcon fontSize="large" />,
|
||||||
notificationIcon: <FontAwesomeIcon icon={faStickyNote} fixedWidth size="xs" />,
|
notificationIcon: <FontAwesomeIcon icon={faStickyNote} fixedWidth size="xs" />,
|
||||||
backgroundColor: NOTES_APP_PRIMARY_COLOR,
|
backgroundColor: DOCUMENTS_APP_PRIMARY_COLOR,
|
||||||
color: NOTES_APP_ICON_COLOR,
|
color: DOCUMENTS_APP_ICON_COLOR,
|
||||||
path: '/notes',
|
path: '/documents',
|
||||||
Route: () => <AppRoute id="NOTES" path="/notes" component={NotesApp} />,
|
Route: () => <AppRoute id="DOCUMENTS" path="/documents" component={NotesApp} />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'CAMERA',
|
id: 'CAMERA',
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export const getSoundSettings = (
|
|||||||
try {
|
try {
|
||||||
return app
|
return app
|
||||||
? {
|
? {
|
||||||
sound: getPath[type](settings[`${app}_${type}`]?.value || settings[type].value),
|
sound: getPath[type](settings[`${app}_${type}`].value || settings[type].value),
|
||||||
volume: (settings[`${app}_${type}Vol`] || settings[`${type}Vol`]) / 100,
|
volume: (settings[`${app}_${type}Vol`] || settings[`${type}Vol`]) / 100,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export const GridMenu = ({ items, Component = AppIcon, xs = undefined }) => {
|
|||||||
{items &&
|
{items &&
|
||||||
items.length &&
|
items.length &&
|
||||||
items.map((item) => (
|
items.map((item) => (
|
||||||
<Grid item xs={xs} key={item.id}>
|
<Grid item xs={xs} key={item.id} alignItems="center" justify="center">
|
||||||
<Box textAlign="center">
|
<Box textAlign="center">
|
||||||
<Link to={item.path}>
|
<Link to={item.path}>
|
||||||
<Component {...item} />
|
<Component {...item} />
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ const webpack = require('webpack');
|
|||||||
module.exports = (options) => ({
|
module.exports = (options) => ({
|
||||||
mode: options.mode,
|
mode: options.mode,
|
||||||
entry: options.entry,
|
entry: options.entry,
|
||||||
devtool: 'source-maps',
|
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(process.cwd(), '../resources/html'),
|
path: path.resolve(process.cwd(), '../resources/html'),
|
||||||
filename: '[name].js',
|
filename: '[name].js',
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ const exp = (global as any).exports;
|
|||||||
|
|
||||||
RegisterNuiCallbackType(events.PHONE_INITIALIZE_CALL); // Fires when the call is started.
|
RegisterNuiCallbackType(events.PHONE_INITIALIZE_CALL); // Fires when the call is started.
|
||||||
on(`__cfx_nui:${events.PHONE_INITIALIZE_CALL}`, (data: any, cb: Function) => {
|
on(`__cfx_nui:${events.PHONE_INITIALIZE_CALL}`, (data: any, cb: Function) => {
|
||||||
emitNet(events.PHONE_INITIALIZE_CALL, data.number);
|
const start = Date.now();
|
||||||
|
emitNet(events.PHONE_INITIALIZE_CALL, data.number, start);
|
||||||
cb();
|
cb();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -57,7 +58,8 @@ onNet(
|
|||||||
|
|
||||||
RegisterNuiCallbackType(events.PHONE_CALL_REJECTED); // Fires when cancelling and rejecting a call.
|
RegisterNuiCallbackType(events.PHONE_CALL_REJECTED); // Fires when cancelling and rejecting a call.
|
||||||
on(`__cfx_nui:${events.PHONE_CALL_REJECTED}`, (data: any, cb: Function) => {
|
on(`__cfx_nui:${events.PHONE_CALL_REJECTED}`, (data: any, cb: Function) => {
|
||||||
emitNet(events.PHONE_CALL_REJECTED, data.phoneNumber);
|
const end = Date.now();
|
||||||
|
emitNet(events.PHONE_CALL_REJECTED, data.phoneNumber, end);
|
||||||
cb();
|
cb();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ const postToWebhook = async (content: DiscordMessage): Promise<AxiosResponse | v
|
|||||||
// If convar isnt set
|
// If convar isnt set
|
||||||
if (!DISCORD_WEBHOOK) {
|
if (!DISCORD_WEBHOOK) {
|
||||||
discordLogger.warn(
|
discordLogger.warn(
|
||||||
'Got a request to report a listing but discord is not configures. See README on how to configure discord endpoints.',
|
'Got a request to report a listing but discord is not configures. See README o how to configure discord endpoints.',
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import events from '../utils/events';
|
import events from '../utils/events';
|
||||||
import { getIdentifierByPhoneNumber, getPlayer, getSource } from './functions';
|
import { getIdentifierByPhoneNumber, getPlayer, getSource } from './functions';
|
||||||
|
|
||||||
import { getPlayerFromIdentifier } from './functions';
|
import { getPlayerFromIdentifier } from './functions';
|
||||||
import { ICall } from '../../typings/call';
|
import { ICall } from '../../typings/call';
|
||||||
|
|
||||||
@@ -29,11 +30,9 @@ async function fetchCalls(phoneNumber: string): Promise<ICall[]> {
|
|||||||
|
|
||||||
let calls: Map<string, ICall> = new Map();
|
let calls: Map<string, ICall> = new Map();
|
||||||
|
|
||||||
onNet(events.PHONE_INITIALIZE_CALL, async (phoneNumber: string) => {
|
onNet(events.PHONE_INITIALIZE_CALL, async (phoneNumber: string, timestamp: number) => {
|
||||||
const _source = getSource();
|
const _source = getSource();
|
||||||
|
|
||||||
const startCallTimeUnix = new Date().getTime() / 1000;
|
|
||||||
|
|
||||||
const callIdentifier = uuidv4();
|
const callIdentifier = uuidv4();
|
||||||
|
|
||||||
// the client that is calling
|
// the client that is calling
|
||||||
@@ -61,7 +60,7 @@ onNet(events.PHONE_INITIALIZE_CALL, async (phoneNumber: string) => {
|
|||||||
transmitterSource: _source,
|
transmitterSource: _source,
|
||||||
receiver: receiverNumber,
|
receiver: receiverNumber,
|
||||||
receiverSource: xReceiver.source,
|
receiverSource: xReceiver.source,
|
||||||
start: Math.floor(startCallTimeUnix),
|
start: timestamp / 1000,
|
||||||
accepted: false,
|
accepted: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -82,10 +81,6 @@ onNet(events.PHONE_ACCEPT_CALL, async (transmitterNumber: string) => {
|
|||||||
const pSource = getSource();
|
const pSource = getSource();
|
||||||
try {
|
try {
|
||||||
const currentCall = calls.get(transmitterNumber);
|
const currentCall = calls.get(transmitterNumber);
|
||||||
|
|
||||||
// Sanity check if call exists in current set
|
|
||||||
if (!currentCall) new Error('Transmitter number does not exist in set.');
|
|
||||||
|
|
||||||
const channelId = pSource;
|
const channelId = pSource;
|
||||||
|
|
||||||
await updateCall(currentCall, true, null);
|
await updateCall(currentCall, true, null);
|
||||||
@@ -114,9 +109,6 @@ onNet(events.PHONE_CALL_REJECTED, async (transmitterNumber: string, timestamp: n
|
|||||||
const pSource = getSource();
|
const pSource = getSource();
|
||||||
try {
|
try {
|
||||||
const currentCall = calls.get(transmitterNumber);
|
const currentCall = calls.get(transmitterNumber);
|
||||||
|
|
||||||
// Sanity check if call exists in current set
|
|
||||||
if (!currentCall) new Error('Transmitter number does not exist in set.');
|
|
||||||
await updateCall(currentCall, false, timestamp);
|
await updateCall(currentCall, false, timestamp);
|
||||||
|
|
||||||
// player who is called and initiasted the rejection.
|
// player who is called and initiasted the rejection.
|
||||||
@@ -132,17 +124,13 @@ onNet(events.PHONE_CALL_REJECTED, async (transmitterNumber: string, timestamp: n
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
onNet(events.PHONE_END_CALL, async (transmitterNumber: string) => {
|
onNet(events.PHONE_END_CALL, async (transmitterNumber: string, timestamp: number) => {
|
||||||
const pSource = getSource();
|
const pSource = getSource();
|
||||||
try {
|
try {
|
||||||
const currentTimeUnix = new Date().getTime() / 1000;
|
|
||||||
|
|
||||||
const currentCall = calls.get(transmitterNumber);
|
const currentCall = calls.get(transmitterNumber);
|
||||||
|
const endTime = timestamp / 1000;
|
||||||
// Sanity check if call exists in current set
|
await updateCall(currentCall, false, endTime);
|
||||||
if (!currentCall) new Error('Transmitter number does not exist in set.');
|
const accepted = calls.get(pSource);
|
||||||
|
|
||||||
await updateCall(currentCall, false, currentTimeUnix);
|
|
||||||
|
|
||||||
// player who is being called
|
// player who is being called
|
||||||
emitNet(events.PHONE_CALL_WAS_ENDED, currentCall.receiverSource);
|
emitNet(events.PHONE_CALL_WAS_ENDED, currentCall.receiverSource);
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
|
import md5 from 'md5';
|
||||||
|
|
||||||
import events from '../utils/events';
|
import events from '../utils/events';
|
||||||
import { CreateMessageGroupResult, Message, MessageGroup } from '../../typings/messages';
|
import { CreateMessageGroupResult, Message, MessageGroup } from '../../typings/messages';
|
||||||
import { pool, withTransaction } from './db';
|
import { pool, withTransaction } from './db';
|
||||||
import { getIdentifier, getSource, getPlayerFromIdentifier } from './functions';
|
import { getIdentifier, getSource, getPlayerFromIdentifier } from './functions';
|
||||||
import { mainLogger } from './sv_logger';
|
import { mainLogger } from './sv_logger';
|
||||||
|
import { group } from 'console';
|
||||||
|
|
||||||
const messageLogger = mainLogger.child({ module: 'messages' });
|
const messageLogger = mainLogger.child({ module: 'messages' });
|
||||||
|
|
||||||
@@ -42,14 +45,13 @@ interface MessageGroupMapping {
|
|||||||
* @param userIdentifier - identifier of the user creating this message
|
* @param userIdentifier - identifier of the user creating this message
|
||||||
* @param groupId - the message group ID to attach this message to
|
* @param groupId - the message group ID to attach this message to
|
||||||
* @param message - content of the message
|
* @param message - content of the message
|
||||||
* @param participants -
|
|
||||||
*/
|
*/
|
||||||
async function createMessage(
|
async function createMessage(
|
||||||
userIdentifier: string,
|
userIdentifier: string,
|
||||||
groupId: string,
|
groupId: string,
|
||||||
message: string,
|
message: string,
|
||||||
participants: string[],
|
participants: string[],
|
||||||
): Promise<UnformattedMessageGroup[]> {
|
): Promise<any> {
|
||||||
const query = `
|
const query = `
|
||||||
INSERT INTO npwd_messages
|
INSERT INTO npwd_messages
|
||||||
(user_identifier, message, group_id)
|
(user_identifier, message, group_id)
|
||||||
@@ -69,7 +71,7 @@ async function createMessage(
|
|||||||
.map((s) => pool.query(groupQuery, [s, groupId])),
|
.map((s) => pool.query(groupQuery, [s, groupId])),
|
||||||
);
|
);
|
||||||
|
|
||||||
return <UnformattedMessageGroup[]>results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -170,7 +172,7 @@ async function createMessageGroup(
|
|||||||
(user_identifier, group_id, participant_identifier)
|
(user_identifier, group_id, participant_identifier)
|
||||||
VALUES (?, ?, ?)
|
VALUES (?, ?, ?)
|
||||||
`;
|
`;
|
||||||
await pool.query(query, [userIdentifier, groupId, participantIdentifier]);
|
const [results] = await pool.query(query, [userIdentifier, groupId, participantIdentifier]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -377,8 +379,7 @@ function getIdentifiersFromParticipants(groupId: string) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the current message isRead to 0 for said player
|
* Sets the current message isRead to 0 for said player
|
||||||
* @param groupId The unique group ID for the message
|
* @param id
|
||||||
* @param identifier The identifier for the player
|
|
||||||
*/
|
*/
|
||||||
async function setMessageRead(groupId: string, identifier: string) {
|
async function setMessageRead(groupId: string, identifier: string) {
|
||||||
const query =
|
const query =
|
||||||
@@ -407,37 +408,32 @@ onNet(
|
|||||||
const result = await createMessageGroupsFromPhoneNumbers(_identifier, phoneNumbers, label);
|
const result = await createMessageGroupsFromPhoneNumbers(_identifier, phoneNumbers, label);
|
||||||
|
|
||||||
if (result.error && result.duplicate) {
|
if (result.error && result.duplicate) {
|
||||||
return emitNet(events.MESSAGES_ACTION_RESULT, _source, {
|
emitNet(events.MESSAGES_ACTION_RESULT, _source, {
|
||||||
message: 'MESSAGES_MESSAGE_GROUP_DUPLICATE',
|
message: 'MESSAGES_MESSAGE_GROUP_DUPLICATE',
|
||||||
type: 'error',
|
type: 'error',
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
// if the phoneNumber is invalid
|
// if the phoneNumber is invalid
|
||||||
if (result.error && result.phoneNumber) {
|
} else if (result.error && result.phoneNumber) {
|
||||||
return emitNet(events.MESSAGES_ACTION_RESULT, _source, {
|
emitNet(events.MESSAGES_ACTION_RESULT, _source, {
|
||||||
message: 'MESSAGES_INVALID_PHONE_NUMBER',
|
message: 'MESSAGES_INVALID_PHONE_NUMBER',
|
||||||
type: 'error',
|
type: 'error',
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
// if you are try to add yourself
|
// if you are try to add yourself
|
||||||
if (result.error && result.mine) {
|
} else if (result.error && result.mine) {
|
||||||
return emitNet(events.MESSAGES_ACTION_RESULT, _source, {
|
emitNet(events.MESSAGES_ACTION_RESULT, _source, {
|
||||||
message: 'MESSAGES_MESSAGE_GROUP_CREATE_MINE',
|
message: 'MESSAGES_MESSAGE_GROUP_CREATE_MINE',
|
||||||
type: 'error',
|
type: 'error',
|
||||||
});
|
});
|
||||||
}
|
} else if (result.error) {
|
||||||
|
|
||||||
// if it just fails, welp
|
// if it just fails, welp
|
||||||
if (result.error) {
|
|
||||||
emitNet(events.MESSAGES_CREATE_MESSAGE_GROUP_FAILED, _source, result);
|
emitNet(events.MESSAGES_CREATE_MESSAGE_GROUP_FAILED, _source, result);
|
||||||
return emitNet(events.MESSAGES_ACTION_RESULT, _source, {
|
emitNet(events.MESSAGES_ACTION_RESULT, _source, {
|
||||||
message: `MESSAGES_MESSAGE_GROUP_CREATE_FAILED:`,
|
message: `MESSAGES_MESSAGE_GROUP_CREATE_FAILED:`,
|
||||||
type: 'error',
|
type: 'error',
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
|
|
||||||
emitNet(events.MESSAGES_CREATE_MESSAGE_GROUP_SUCCESS, _source, result);
|
emitNet(events.MESSAGES_CREATE_MESSAGE_GROUP_SUCCESS, _source, result);
|
||||||
if (result.identifiers) {
|
if (result.identifiers) {
|
||||||
for (const participantId of result.identifiers) {
|
for (const participantId of result.identifiers) {
|
||||||
@@ -448,6 +444,7 @@ onNet(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
emitNet(events.MESSAGES_CREATE_MESSAGE_GROUP_FAILED, _source);
|
emitNet(events.MESSAGES_CREATE_MESSAGE_GROUP_FAILED, _source);
|
||||||
|
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ onNet(events.NOTE_UPDATE_NOTE, async (note: Note) => {
|
|||||||
type: 'success',
|
type: 'success',
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
const pSource = (global as any).source;
|
||||||
emitNet(events.NOTE_UPDATE_NOTE_FAILURE, pSource);
|
emitNet(events.NOTE_UPDATE_NOTE_FAILURE, pSource);
|
||||||
notesLogger.error(`Failed to update note, ${e.message}`, {
|
notesLogger.error(`Failed to update note, ${e.message}`, {
|
||||||
source: pSource,
|
source: pSource,
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ async function uploadPhoto(identifier: string, image: string) {
|
|||||||
async function getPhotosByIdentifier(identifier: string): Promise<IPhoto[]> {
|
async function getPhotosByIdentifier(identifier: string): Promise<IPhoto[]> {
|
||||||
const query = 'SELECT id, image FROM npwd_phone_gallery WHERE identifier = ? ORDER BY id DESC';
|
const query = 'SELECT id, image FROM npwd_phone_gallery WHERE identifier = ? ORDER BY id DESC';
|
||||||
const [results] = await pool.query(query, [identifier]);
|
const [results] = await pool.query(query, [identifier]);
|
||||||
return <IPhoto[]>results;
|
const photos = <IPhoto[]>results;
|
||||||
|
return photos;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function deletePhoto(photo: IPhoto, identifier: string) {
|
async function deletePhoto(photo: IPhoto, identifier: string) {
|
||||||
@@ -37,15 +38,9 @@ onNet(events.CAMERA_UPLOAD_PHOTO, async (image: string) => {
|
|||||||
|
|
||||||
onNet(events.CAMERA_FETCH_PHOTOS, async () => {
|
onNet(events.CAMERA_FETCH_PHOTOS, async () => {
|
||||||
const _source = getSource();
|
const _source = getSource();
|
||||||
try {
|
|
||||||
const identifier = getIdentifier(_source);
|
const identifier = getIdentifier(_source);
|
||||||
const photos = await getPhotosByIdentifier(identifier);
|
const photos = await getPhotosByIdentifier(identifier);
|
||||||
emitNet(events.CAMERA_SEND_PHOTOS, _source, photos);
|
emitNet(events.CAMERA_SEND_PHOTOS, source, photos);
|
||||||
} catch (e) {
|
|
||||||
photoLogger.error(`Failed to fetch photos, ${e.message}`, {
|
|
||||||
source: _source,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
onNet(events.CAMERA_DELETE_PHOTO, async (photo: IPhoto) => {
|
onNet(events.CAMERA_DELETE_PHOTO, async (photo: IPhoto) => {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import events from '../utils/events';
|
import events from '../utils/events';
|
||||||
import { getIdentifier, getPlayer, getSource } from './functions';
|
import { getIdentifier, getPlayer, getSource } from './functions';
|
||||||
import { ESX } from './server';
|
|
||||||
import { pool } from './db';
|
import { pool } from './db';
|
||||||
import { mainLogger } from './sv_logger';
|
import { mainLogger } from './sv_logger';
|
||||||
import { MarketplaceListing } from '../../typings/marketplace';
|
import { MarketplaceListing } from '../../typings/marketplace';
|
||||||
@@ -9,10 +8,12 @@ import { reportListingToDiscord } from './discord';
|
|||||||
const selloutLogger = mainLogger.child({ module: 'sellout' });
|
const selloutLogger = mainLogger.child({ module: 'sellout' });
|
||||||
|
|
||||||
async function fetchAllListings(): Promise<MarketplaceListing[]> {
|
async function fetchAllListings(): Promise<MarketplaceListing[]> {
|
||||||
const query = 'SELECT * FROM npwd_marketplace_listings ORDER BY id DESC';
|
const query = 'SELECT * FROM npwd_sellout_listings ORDER BY id DESC';
|
||||||
|
|
||||||
const [results] = await pool.query(query);
|
const [results] = await pool.query(query);
|
||||||
return <MarketplaceListing[]>results;
|
const listings = <MarketplaceListing[]>results;
|
||||||
|
|
||||||
|
return listings;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function addListing(
|
async function addListing(
|
||||||
@@ -23,7 +24,7 @@ async function addListing(
|
|||||||
listing: MarketplaceListing,
|
listing: MarketplaceListing,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
const query =
|
const query =
|
||||||
'INSERT INTO npwd_marketplace_listings (identifier, username, name, number, title, url, description) VALUES (?, ?, ?, ?, ?, ?, ?)';
|
'INSERT INTO npwd_sellout_listings (identifier, username, name, number, title, url, description) VALUES (?, ?, ?, ?, ?, ?, ?)';
|
||||||
await pool.query(query, [
|
await pool.query(query, [
|
||||||
identifier,
|
identifier,
|
||||||
username,
|
username,
|
||||||
@@ -36,16 +37,17 @@ async function addListing(
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function deleteListing(listingId: number, identifier: string): Promise<void> {
|
async function deleteListing(listingId: number, identifier: string): Promise<void> {
|
||||||
const query = 'DELETE FROM npwd_marketplace_listings WHERE id = ? AND identifier = ?';
|
const query = 'DELETE FROM npwd_sellout_listings WHERE id = ? AND identifier = ?';
|
||||||
|
|
||||||
await pool.query(query, [listingId, identifier]);
|
await pool.query(query, [listingId, identifier]);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getListing(listingId: number): Promise<MarketplaceListing> {
|
async function getListing(listingId: number): Promise<MarketplaceListing> {
|
||||||
const query = `SELECT * FROM npwd_marketplace_listings WHERE id = ?`;
|
const query = `SELECT * FROM npwd_sellout_listings WHERE id = ?`;
|
||||||
const [results] = await pool.query(query, [listingId]);
|
const [results] = await pool.query(query, [listingId]);
|
||||||
const listings = <MarketplaceListing[]>results;
|
const listings = <MarketplaceListing[]>results;
|
||||||
return listings[0];
|
const listing = listings[0];
|
||||||
|
return listing;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function reportListing(listingId: number, profile: string): Promise<void> {
|
async function reportListing(listingId: number, profile: string): Promise<void> {
|
||||||
@@ -142,19 +144,18 @@ onNet(events.SELLOUT_REPORT_LISTING, async (listing: MarketplaceListing) => {
|
|||||||
if (reportExists) {
|
if (reportExists) {
|
||||||
// send an info alert
|
// send an info alert
|
||||||
selloutLogger.error(`This listing has already been reported`);
|
selloutLogger.error(`This listing has already been reported`);
|
||||||
return emitNet(events.SELLOUT_ACTION_RESULT, pSource, {
|
emitNet(events.SELLOUT_ACTION_RESULT, pSource, {
|
||||||
message: 'MARKETPLACE_REPORT_LISTING_FAILED',
|
message: 'MARKETPLACE_REPORT_LISTING_FAILED',
|
||||||
type: 'info',
|
type: 'info',
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
|
|
||||||
await reportListing(rListing.id, rListing.name);
|
await reportListing(rListing.id, rListing.name);
|
||||||
await reportListingToDiscord(rListing, reportingPlayer);
|
await reportListingToDiscord(rListing, reportingPlayer);
|
||||||
|
|
||||||
emitNet(events.SELLOUT_ACTION_RESULT, pSource, {
|
emitNet(events.SELLOUT_ACTION_RESULT, pSource, {
|
||||||
message: 'MARKETPLACE_REPORT_LISTING_SUCCESS',
|
message: 'MARKETPLACE_REPORT_LISTING_SUCCESS',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
});
|
});
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
selloutLogger.error(`Failed to report listing ${e.message}`, {
|
selloutLogger.error(`Failed to report listing ${e.message}`, {
|
||||||
source: pSource,
|
source: pSource,
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import events from '../utils/events';
|
|||||||
import config from '../utils/config';
|
import config from '../utils/config';
|
||||||
import { reportTweetToDiscord } from './discord';
|
import { reportTweetToDiscord } from './discord';
|
||||||
import { mainLogger } from './sv_logger';
|
import { mainLogger } from './sv_logger';
|
||||||
import { ResultSetHeader } from 'mysql2';
|
|
||||||
|
|
||||||
const twitterLogger = mainLogger.child({ module: 'twitter' });
|
const twitterLogger = mainLogger.child({ module: 'twitter' });
|
||||||
|
|
||||||
@@ -96,7 +95,6 @@ async function fetchTweetsFiltered(profileId: number, searchValue: string): Prom
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve a Tweet by ID
|
* Retrieve a Tweet by ID
|
||||||
* @param profileId Unique id for the twitter profile (NOT user identifier)
|
|
||||||
* @param tweetId - primary key of the tweet ID
|
* @param tweetId - primary key of the tweet ID
|
||||||
*/
|
*/
|
||||||
async function getTweet(profileId: number, tweetId: number): Promise<Tweet> {
|
async function getTweet(profileId: number, tweetId: number): Promise<Tweet> {
|
||||||
@@ -133,11 +131,7 @@ async function createTweet(identifier: string, tweet: NewTweet): Promise<Tweet>
|
|||||||
tweet.images,
|
tweet.images,
|
||||||
tweet.retweet,
|
tweet.retweet,
|
||||||
]);
|
]);
|
||||||
// This should not be an any type and instead should be
|
const insertData = <any>results;
|
||||||
// a Tweet[] according to mysql2 documentation. But instead
|
|
||||||
// this exec promise returns the row itself, not an array of rows like it states
|
|
||||||
// Therefore type assertion doesn't work here for correctly typing this out.
|
|
||||||
const insertData = <ResultSetHeader>results;
|
|
||||||
return await getTweet(profile.id, insertData.insertId);
|
return await getTweet(profile.id, insertData.insertId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,8 +189,7 @@ async function createDefaultProfile(identifier: string): Promise<Profile> {
|
|||||||
INSERT INTO npwd_twitter_profiles (identifier, profile_name)
|
INSERT INTO npwd_twitter_profiles (identifier, profile_name)
|
||||||
VALUES (?, ?)
|
VALUES (?, ?)
|
||||||
`;
|
`;
|
||||||
|
const [result] = await pool.execute(query, [identifier, profileName]);
|
||||||
await pool.execute(query, [identifier, profileName]);
|
|
||||||
return getProfile(identifier);
|
return getProfile(identifier);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -258,7 +251,7 @@ async function deleteTweet(identifier: string, tweetId: number): Promise<void> {
|
|||||||
DELETE FROM npwd_twitter_tweets
|
DELETE FROM npwd_twitter_tweets
|
||||||
WHERE identifier = ? AND id = ?
|
WHERE identifier = ? AND id = ?
|
||||||
`;
|
`;
|
||||||
await pool.execute(query, [identifier, tweetId]);
|
const [result] = await pool.execute(query, [identifier, tweetId]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -435,10 +428,11 @@ onNet(events.TWITTER_RETWEET, async (tweetId: number) => {
|
|||||||
// alert the player that they have already retweeted
|
// alert the player that they have already retweeted
|
||||||
// this post (or that they are the original poster)
|
// this post (or that they are the original poster)
|
||||||
if (await doesRetweetExist(tweetId, identifier)) {
|
if (await doesRetweetExist(tweetId, identifier)) {
|
||||||
return emitNet(events.TWITTER_RETWEET_EXISTS, _source, {
|
emitNet(events.TWITTER_RETWEET_EXISTS, _source, {
|
||||||
message: 'TWITTER_RETWEET_EXISTS',
|
message: 'TWITTER_RETWEET_EXISTS',
|
||||||
type: 'error',
|
type: 'error',
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// our message for this row is blank because when we
|
// our message for this row is blank because when we
|
||||||
@@ -466,13 +460,12 @@ onNet(events.TWITTER_REPORT, async (tweetId: number) => {
|
|||||||
const tweet = await getTweet(profile.id, tweetId);
|
const tweet = await getTweet(profile.id, tweetId);
|
||||||
|
|
||||||
const reportExists = await doesReportExist(tweet.id, profile.id);
|
const reportExists = await doesReportExist(tweet.id, profile.id);
|
||||||
|
|
||||||
if (reportExists) {
|
if (reportExists) {
|
||||||
return twitterLogger.warn('This profile has already reported this tweet');
|
twitterLogger.warn('This profile has already reported this tweet');
|
||||||
}
|
} else {
|
||||||
|
|
||||||
await createTweetReport(tweet.id, profile.id);
|
await createTweetReport(tweet.id, profile.id);
|
||||||
await reportTweetToDiscord(tweet, profile);
|
await reportTweetToDiscord(tweet, profile);
|
||||||
|
}
|
||||||
|
|
||||||
emitNet(events.TWITTER_REPORT_SUCCESS, _source);
|
emitNet(events.TWITTER_REPORT_SUCCESS, _source);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ const server = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
new webpack.DefinePlugin({ 'global.GENTLY': false }),
|
||||||
new RemovePlugin({
|
new RemovePlugin({
|
||||||
before: {
|
before: {
|
||||||
include: [path.resolve(buildPath, 'server')],
|
include: [path.resolve(buildPath, 'server')],
|
||||||
@@ -24,8 +25,6 @@ const server = {
|
|||||||
include: [path.resolve(buildPath, 'server')],
|
include: [path.resolve(buildPath, 'server')],
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
// Ignore cardinal as its optional
|
|
||||||
new webpack.IgnorePlugin(/^cardinal$/, /./),
|
|
||||||
],
|
],
|
||||||
optimization: {
|
optimization: {
|
||||||
minimize: true,
|
minimize: true,
|
||||||
|
|||||||
+1659
-1407
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user