GithubHelp home page GithubHelp logo

gruppe-adler / nodebb-plugin-arma3-slotting Goto Github PK

View Code? Open in Web Editor NEW
2.0 6.0 2.0 589 KB

NodeBB plugin: create an ORBAT-like structure and have your users select a slot

JavaScript 25.92% CSS 8.86% Smarty 3.70% TypeScript 61.51%
nodebb-plugin nodebb web

nodebb-plugin-arma3-slotting's Introduction

nodebb-plugin-arma3-slotting's People

Contributors

dahlgren avatar dependabot[bot] avatar derzade avatar fusselwurm avatar nomisum avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nodebb-plugin-arma3-slotting's Issues

disable inheritance of reservations

currently due to inheritance its not possible to have other clans in leading (parent) elements with non-restricted slots inside them.

its probably easiest to just disable inheritance, as the extra work to block every squad is tolerable.

Slot-Mechanics

Admins

  • Klick on free slot toggles: reserve for Event guest - reserve for myself - dont reserve
  • Klick on occupied slot: prompt OK cancel. OK : kick user out of slot, cancel: dont do anything

Users

  • Klick on free slot toggles: reserve for myself - dont reserve
  • Klick on occupied slot: Dont do anything

Condition: If user is in "maybe" or "no" state, he will be prompted to change his status to "yes" (OK) or no action is taken (cancel)

  • Dont allow editing after 20.00
  • Every Slot needs at least a shortcut (string) and a tooltip (string)
  • Dont allow editing while debug-boolean is set true || when OP is in editmode
    (might be extended to additional specific timeframes)

group notifications by thread only, not by thread/user

One notification by thread should be enough, we dont need 20 notifications for different users, when the notification links to a place where you see all the changes in one place anyway.

-> Group by thread, concat user names.

Remove optionsHandle

We do not need to set the cors headers in the optionsHandle manually, because those headers are set by the forum itself.

const optionsHandle = function (req: INodebbRequest, res: Response) {
const headers = {};
headers["Access-Control-Allow-Origin"] = encodeURI(meta.config['access-control-allow-origin'] || '*');
headers["Access-Control-Allow-Methods"] = encodeURI(meta.config['access-control-allow-methods'] || '');
headers["Access-Control-Allow-Credentials"] = true;
headers["Access-Control-Max-Age"] = '86400'; // 24 hours
headers["Access-Control-Allow-Headers"] = encodeURI(meta.config['access-control-allow-headers'] || '');
res.writeHead(200, headers);
res.end();
};

Also we do not need the methodNotAllowed, because it will catch any requests and close the connection, before the forum can set the cors http headers.

const methodNotAllowed = function (req: INodebbRequest, res: Response) {
if(req.method === 'OPTIONS') {
optionsHandle(req, res);
return;
}
res.status(405).json({message: "Method not allowed"});
};

visualize forum groups

it would be reaaally nice if we could see the forum groups everyone is a member of.

e.g. have a toggle to switch from displaying avatars to forum groups (symbolized by color/initial letter)

xml edit loads only on refresh

on page
http://192.168.10.2/arma3-slotting/2/match/<matchID>/edit
first time after pressing "edit" is always

Not Found

You seem to have stumbled upon a page that does not exist. Return to the home page.

on refresh page loads fine

fix templates

german template for zugführer results in gruppenführer

More expressive error messages

Error messages like das ging schief :( are not really helpful for the user. Giving an unique error message could improve the error finding process.

Also the XML-Parser should output where exactly the xml is wrong so the user doesn't has to rely on external xml validator tools.

Possible Future Enhancements

  • Frequencies
  • Team Type as Icon
  • Enable optional description of vehicle
  • Support more than one round
    Spoiler Function/hide function

when updating a match, user/slot associations are not removed for slots that are being removed

separate from the match definition tid:<topic-id>:arma3-slotting:matches , slotting saves the user/slot associations into a hash tid:<topic-id>:arma3-slotting:match:<match-uuid>:users

when changing the match definition results in slots being removed, there is no check that removes orphaned user/slot associations.

example:

  • create match A with slots 1 and 2
  • user X slots into 1
  • user Y slots into 2
  • update match A: remove slot 1, create slot 3
  • user X is still slotted into 1

Necessary hooks for CSS

Incomplete list:

  • data-slot: <slot-shortcut> (MED, TL, RF, AMG, MG, ...)
  • data-grouptype: <group-type> (infantry, mech. inf, armor, air, ...)
  • data-level: <hierarchy-level> maybe a number is sufficient here

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.