Git Product home page Git Product logo

tabby's Introduction

Tabby

NUI Tablet for FiveM Servers for anyone to use. You may add to the tablet for your needs but by no means is it to be re-released without my permission.

Getting Started

These instructions will get you a copy of the project up and running on your server for production use.

Prerequisites

  • You should already have a functioning FiveM Server set up and running before you can install this mod.
  • Basic HTML experience.

Download Link

https://github.com/AminYabut/tabby

Installing

A step by step series of examples that tell you how to get the tablet up and running on your server.

1.) Place the "tab" folder under your resources folder in your FiveM server files.

2.) Add "start tab" to your server config file.

3.) Either restart your server or use the /refresh then /start tab command.

** Do Not Change The File Name From Tab It Is Made To Work With That Name. **

Usage

  • "M" key to open the tablet.

  • "ESC" to close the tablet and leave it on the page you were on next time it opens.

  • The tablet button on the bottom of the tablet will bring you back to the home screen with one click and then click it again to close.

  • Hover over an app to see a description of it. Select the app you wish to open.

  • To edit the web pages you'll need to find the page you wish to edit (the actual HTML page in the files). I have left templates from my old server in there to help you with ideas and things to add in. For your CAD/MDT make sure you add your address in the iframe correctly on the opencad.html page.

Photos

To Be Added

Update Notes

We are working on a new version of the tablet, release date unknown at this point. Any major issues will be fixed right away if needed.

  • V0.2 2018/01/17

  • New home screen

  • New home screen menu

  • Added new apps and information

  • Added home button functions click once to return to home screen click again to exit

  • Changed design of tablet to allow full web pages

  • Added theme

Known Bugs

  • Some tablet "apps" don't render full screen on the tablet.

  • When closing with the "ESC" key, the "M" key may need to be pressed twice to open the tablet.

  • UPDATE Some bubble apps are not appearing or they hide drop-down menus. For the drop down menus please use your arrow keys. If your Bubble app is displaying blank, please contact support at bubble and request for your app to be allowed to be iframed.

  • The tablet doesn't seem to like pop out/pop-ups web pages or redirects. Also, a lot of sites block iframes and may result in a white page display. E.G. Don't click the watch on YouTube button, that makes a pop-up. Don't click on any links that will make a pop up on web pages people may add. I'm sure there are lots more examples.

  • Please report any bugs you find to the author.

Support

Please file an issue on GitHub or check the readme on GitHub for information on how to reach the author. You can also get more one on one support on our discord:

https://discord.gg/fvxGCUa

Now offering hosting for tablet friendly websites for your communities. Please contact us on discord for more information. We have Cad systems, blogs, forums, wikis and much more.

Authors

  • Amin Yabut - Initial work

License

Not to be shared without explicit permission.

Community Shared Additions(tested)

Discord found by @Chip_W_Gaming

1 - Invite this bot to your Discord server: https://discordapp.com/oauth2/authorize?=&client_id=299403260031139840&scope=bot&permissions=536083583 https://forum.fivem.net/uploads/default/original/3X/0/0/00c187a74a6160c670f983e737942c230ff54a35.png

2 - Visit this website: https://titanembeds.com/ and login in the upper right corner with your Discord login, then click “Start here”

3 - On the next page, authorize the bot.

4 - The page after that, select the server you invited the bot to by clicking “Modify” https://forum.fivem.net/uploads/default/original/3X/b/2/b2a45dad834ed98d82c354f278794bdc2b553711.png

5 - The page you are brought to will have a bunch of configurable settings. Edit as you see fit. When you edit the settings on the Titan website, you can set it to not open the sign in part in a separate popup.

Set this option to “true”.

6 - Once you get to the bottom of the page, you will see some links. Copy the “Embed” link

https://forum.fivem.net/uploads/default/original/3X/6/b/6b04175227ea9d18cda0c163d72d94b0284048f0.png

7 - Now open the “ui.html”

8 - Add a new link

<li data-title="Discord">
     	<a class="nav-myframe" href="https://titanembeds.com/embed/yourlink">
     	<i class="myicon material-icons">group</i>
     	</a>
    </li>

9 - To change the icon, visit: https://material.io/tools/icons/?style=baseline Use one of the image names here and replace the word “group” in the code above.

10 - Restart the resource and open it. The first time you enter it, you will be asked for a name to use. DO NOT CLICK ANYTHING!!! Type in your name and press the ENTER key. You will need to log in again if you are away from it for too long or you restart your server.

Chat Command to Open Tablet

In the client.lua go to the bottom and comment out this block of code:

if (IsControlJustPressed(1, whatever this number will be)) then
                tabEnabled = not tabEnabled -- Toggle tablet visible state
                REQUEST_NUI_FOCUS(tabEnabled)
                print("The tablet state is: " .. tostring(tabEnabled))
                Citizen.Wait(0)
 end

Then above it add in this block of code to open the tablet with a chat command instead:

RegisterCommand("tab", function()
                tabEnabled = not tabEnabled -- Toggle tablet visible state
                REQUEST_NUI_FOCUS(tabEnabled)
                print("The tablet state is: " .. tostring(tabEnabled))
                Citizen.Wait(0)
 end)

Now /tab should open it instead of using a keybind. Thanks to @Chip_W_Gaming for writing the code. We will include it in the next update as an option.

Acknowledgments

  • This wouldn't have been possible without the help of @throwarray.
  • Hat tip to anyone else who's code was used.
  • Big thanks to codepen.io for ideas and examples.
  • Inspiration.

tabby's People

Contributors

aminyabut avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tabby's Issues

cookies

when i use rocketcad it said cookies need to be inabled

problem for put me web

no run web iun tab wwithe windows show

i put in opencad.html

<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <style>
        body {
            overflow: hidden;
            margin: 0;
        }

        #opencad {
            width: 100%;
            height: 100%;
            overflow: auto;
        }
    </style>
    <!-- ADD YOUR CAD/MDT SITE ADDRESS HERE -->
    <iframe id="opencad" src="https://trello.com/"></iframe>
</body>

</html>

and in ui

<li data-title="OpenCAD"> <a class="nav-myframe" href="html/opencad.html"> <i class="myicon material-icons">dashboard</i> </a> </li>

Can't load custom sites

First of all thank you for this script,
So there is a problem if I fill in a custom address like facebook.com or something. It doesn't load and I just see a blank page.

Mouse stays active after closing

After the tablet is closed either by hitting escape or the main menu button, the mouse still stays on the screen.
The only way to get rid of the mouse is to either relog or restart the script.
I am currently running FXServer build: 3352
I even reverted back to FXServer build: 3184 and got same outcome

I also do not see any errors in the console after closing the tablet.

Resource warning

I've been running Tabby on our server for a couple of days now. Unfortunately people at random receive a resource warning that tab is using too much memory (RAM). Highest people have been getting is 80MB. Only was to fix the message is by relogging.

Any ideas as to why this happens?

Doesn't work with local files ?

Hello AminYabut ! Thanks for the amazing work :)

I don't have access to my "localhost/website" (write php), and i use the "opencad.html" without modification except the <iframe> line... I try on many browser (chrome, firefox, ie) and it works, but on game i have the white screen...

The 23 line :
<iframe id="opencad" src="http://localhost/paneluser"></iframe>

Like i say, when i open "opencad.html" on Chrome/FireFox/I.E it's work !
Any idea ?

crash on start linux server with a Sytem.NullReferenceExeption

When I start my Linux fxserver with the tabby plugin, I get this error server side and the fxserver stops.

Stacktrace:

/proc/self/maps:
40699000-407bc000 rwxp 00000000 00:00 0 
40bf5000-40c05000 rwxp 00000000 00:00 0 
416b2000-41782000 rwxp 00000000 00:00 0 
41fdd000-42112000 rwxp 00000000 00:00 0 
42c8fb80000-42c8fc00000 rw-p 00000000 00:00 0 
69182000000-69182080000 rw-p 00000000 00:00 0 
70c70780000-70c70783000 rw-p 00000000 00:00 0 
70c70783000-70c70800000 r--p 00000000 00:00 0 
be6ff000000-be6ff080000 rw-p 00000000 00:00 0 
1110f5780000-1110f5800000 rw-p 00000000 00:00 0 
1118dd800000-1118dd803000 rw-p 00000000 00:00 0 
133f0ae00000-133f0ae80000 rw-p 00000000 00:00 0 
16127df80000-16127e000000 rw-p 00000000 00:00 0 
1d7df6680000-1d7df6700000 rw-p 00000000 00:00 0 
20810b200000-20810b280000 rw-p 00000000 00:00 0 
246496900000-24649692f000 rw-p 00000000 00:00 0 
25201a180000-25201a200000 rw-p 00000000 00:00 0 
2bf0e7c00000-2bf0e7c80000 rw-p 00000000 00:00 0 
2f00c1f00000-2f00c200a000 rw-p 00000000 00:00 0 
318ed3380000-318ed3400000 rw-p 00000000 00:00 0 
326f25b00000-326f25b80000 rw-p 00000000 00:00 0 
33f960000000-33f960080000 rw-p 00000000 00:00 0 
340592b00000-340592b80000 rw-p 00000000 00:00 0 
35c61415c000-35c614180000 ---p 00000000 00:00 0 
35c614180000-35c614183000 rw-p 00000000 00:00 0 

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
Unhandled exception in Mono script environment: System.NullReferenceException: Object reference not set to an instance of an object
(null)GlobalError: UnhanAborted (core dumped)

But on a windows fxserver it runs normal.
What could this be? I checked the _resource of misspelling and only what I could find is that 'Discription' is misspeld. It should be 'Description'.
But that does not give this error I got. Is there a part of the code that held a Null or something?
I can't find it :-( and I am lost. Please help.

Crashing using Linux

/proc/self/maps:
40648000-406a8000 rwxp 00000000 00:00 0
154f180000-154f41b000 rw-p 00000000 00:00 0
1be85680000-1be8591b000 rw-p 00000000 00:00 0
1d64f580000-1d64f600000 rw-p 00000000 00:00 0
542427fd000-54242800000 ---p 00000000 00:00 0
54242800000-54242803000 rw-p 00000000 00:00 0
54242803000-54242804000 ---p 00000000 00:00 0
54242804000-5424287f000 r-xp 00000000 00:00 0
5424287f000-54242880000 ---p 00000000 00:00 0
54242880000-54242883000 rw-p 00000000 00:00 0
54242883000-54242884000 ---p 00000000 00:00 0
54242884000-542428ff000 r-xp 00000000 00:00 0
542428ff000-54242900000 ---p 00000000 00:00 0
54242900000-54242903000 rw-p 00000000 00:00 0
54242903000-54242904000 ---p 00000000 00:00 0
54242904000-54242919000 r-xp 00000000 00:00 0
54242919000-54242980000 ---p 00000000 00:00 0
54242980000-54242983000 rw-p 00000000 00:00 0
54242983000-54242984000 ---p 00000000 00:00 0
54242984000-54242999000 r-xp 00000000 00:00 0
54242999000-54242a00000 ---p 00000000 00:00 0
54242a00000-54242a03000 rw-p 00000000 00:00 0
54242a03000-54242a04000 ---p 00000000 00:00 0
54242a04000-54242a19000 r-xp 00000000 00:00 0
54242a19000-5424a7fd000 ---p 00000000 00:00 0

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
GlobalError: Unhandled exception in Mono script environment: System.NullReferenceException: Object reference not set to an instance of an object
(null)
Unhandled exception in Mono script environment: System.NullReferenceException: Object reference not set to an instance of an object
(null)Aborted (core dumped)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.