Skip to content

Commit

Permalink
feat!: V2 Rewrite (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
antond15 authored Dec 8, 2024
1 parent b51e313 commit ba9a679
Show file tree
Hide file tree
Showing 88 changed files with 1,847 additions and 3,695 deletions.
7 changes: 5 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ body:
description: |
What release version was this issue encountered on?
Use the version number, not `latest` or similar useless stuff.
placeholder: v1.0.2
placeholder: v2.0.0
validations:
required: true

Expand All @@ -28,8 +28,9 @@ body:
description: What framework are you getting this error on?
options:
- ox_core
- es_extended
- qbx_core
- qb-core
- es_extended
multiple: true
validations:
required: true
Expand Down Expand Up @@ -68,3 +69,5 @@ body:
required: true
- label: "I have provided a **detailed** issue description and **detailed** reproduction steps."
required: true
- label: "I have read the documentation."
required: true
36 changes: 14 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,51 @@
name: Create new release

on:
workflow_dispatch:
push:
tags:
- 'v*.*.*'

jobs:
new-release:
name: Build and create new release
release:
runs-on: ubuntu-latest

steps:
- name: Get latest code
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: latest
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: 16.x
cache: 'pnpm'
cache-dependency-path: 'web/pnpm-lock.yaml'
bun-version: latest

- name: Install dependencies
run: pnpm install
run: bun install
working-directory: web

- name: Run build script
run: pnpm build
run: bun run build
working-directory: web

- name: Update tag
uses: EndBug/latest-tag@v1.5.0
uses: EndBug/latest-tag@v1
with:
ref: ${{ github.ref_name }}

- name: Install zip
run: sudo apt install zip

- name: Bundle built files
- name: Bundle files
run: |
mkdir -p ./temp/ac_scoreboard
mkdir -p ./temp/ac_scoreboard/web/
cp ./{LICENSE,README.md,fxmanifest.lua,config.lua} ./temp/ac_scoreboard
cp -r ./{resource,locales} ./temp/ac_scoreboard
mkdir ./temp/ac_scoreboard/web/
cp -r ./{locales,modules,resource} ./temp/ac_scoreboard
cp -r ./web/build ./temp/ac_scoreboard/web/
cd ./temp && zip -r ../ac_scoreboard.zip ./ac_scoreboard
- name: Create release
uses: marvinpinto/action-[email protected]
uses: softprops/action-gh-release@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ github.token }}
prerelease: false
files: ac_scoreboard.zip
23 changes: 2 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
AC Scoreboard
Copyright © 2024 AC Scripts (<https://github.com/acscripts>)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -647,25 +647,6 @@ the "copyright" line and a pointer to where the full notice is found.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.

The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
Expand Down
52 changes: 37 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,48 @@
### Introduction
ac_scoreboard is the ultimate standalone scoreboard solution for your server.
![](https://img.shields.io/github/downloads/acscripts/ac_scoreboard/total?logo=github)
![](https://img.shields.io/github/v/release/acscripts/ac_scoreboard?logo=github)

You can use any supported framework to enable additional features such as group (job) list.
Supported frameworks are [ox_core](https://github.com/overextended/ox_core), [es_extended](https://github.com/esx-framework/esx-legacy) and [qb-core](https://github.com/qbcore-framework/qb-core).
## Introduction
**AC Scoreboard** is the ultimate standalone scoreboard solution for your server.

Report bugs using [GitHub issues](https://github.com/antond15/ac_scoreboard/issues). Use the official [Discord server](https://discord.gg/2ZezMw2xvR) for support.
You can use any supported framework to enable additional features such as group list.
Supported frameworks are [ox_core](https://github.com/overextended/ox_core), [qbx_core](https://github.com/Qbox-project/qbx_core), [qb-core](https://github.com/qbcore-framework/qb-core) and [es_extended](https://github.com/esx-framework/esx_core).

### Features
- Customizable server name
Report bugs using [GitHub issues](https://github.com/acscripts/ac_scoreboard/issues). Use the official [Discord server](https://discord.acscripts.dev) for support.

## Features
- Customizable title (server name and logo)
- Group list with each group's player count
- Player list with their server ID
- Status indicators that can be used for anything (e.g. if players can rob stores)
- Select on which side of the screen is the scoreboard
- Customizable UI settings (background blur, close behavior)
- Choose what parts should be visible
- Detailed config explanation
- Total player count and copyable server ID
- Configurable key mapping and command name
- Support for custom locales

### Common issues
Possible solutions can be found [here](./docs/common_issues.md).
## Documentation
➡️ [docs.acscripts.dev/scoreboard](https://docs.acscripts.dev/scoreboard) ⬅️

## Showcase
<a href="https://youtu.be/D_S4OmYOKJA">
<img src="https://i3.ytimg.com/vi/D_S4OmYOKJA/maxresdefault.jpg" alt="YouTube Showcase" width="600">
</a>

[youtu.be/D_S4OmYOKJA](https://youtu.be/D_S4OmYOKJA)

---

## Copyright
Copyright © 2024 AC Scripts (<https://github.com/acscripts>)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

### Preview
https://youtu.be/M7YQ5vicwKo
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

<img src='https://raw.githubusercontent.com/antond15/antond15/main/assets/scoreboard_preview.png' alt='scoreboard preview' height='500' />
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
122 changes: 76 additions & 46 deletions config.lua
Original file line number Diff line number Diff line change
@@ -1,47 +1,77 @@
---------------------------------------------------------------------------------------------
-- More detailed description of each config option can be found in 'docs/config.md' file.
---------------------------------------------------------------------------------------------

ac = {
-- Language for the UI
locale = 'en',

-- Whether to check for newer resource version and notify in server console.
versionCheck = true,

-- Server name shown in the scoreboard header.
serverName = 'AC Scoreboard',

-- Command name to open the scoreboard UI.
commandName = 'scoreboard',

-- Default keybind for the '/scoreboard' command.
commandKey = 'DELETE',

-- Which parts of the scoreboard should be visible (both, groups, players).
visibleParts = 'both',

-- On which side of the screen the scoreboard should be (left, right).
drawerSide = 'right',

-- Group list shown in the scoreboard.
groupList = {
{
label = 'Police',
groups = {'police', 'sheriff'}
},
{
label = 'EMS',
groups = {'ambulance'},
separator = true
},
{
label = 'Taxi',
groups = {'taxi'}
},
{
label = 'Mechanic',
groups = {'mechanic', 'lsc', 'bennys'}
}
}
-----------------------------------------------------------------
-- Visit https://docs.acscripts.dev/scoreboard for documentation
-----------------------------------------------------------------

return {
settings = {
title = {
text = 'AC Scoreboard',
logo = 'https://cfx-nui-ac_scoreboard/web/build/logo.svg',
},

side = 'right',

showOverlay = false,

closeOnEscape = true,

closeOnOutsideClick = true,

uppercaseNames = false,

highlightEmptyGroups = true,

compactPlayers = false,

compactGroups = false,

playerColumns = 1,

groupColumns = 1,
},

visibleSections = {
groups = true,
players = true,
playerNames = true,
playerIds = true,
statusIndicators = true,
footer = true,
},

-- Command name for opening the scoreboard
commandName = 'scoreboard',

-- Default keybind for the '/scoreboard' command
commandKey = 'DELETE',

-- Whether to include off-duty players in group count
includeOffDuty = false,

-- Group list shown in the scoreboard
groups = {
{
label = 'Police',
groups = {'police', 'sheriff'},
},
{
label = 'EMS',
groups = {'ambulance'},
},
{
label = 'Mechanics',
groups = {'lsc', 'bennys', 'hayes'},
},
{
label = 'Taxi',
groups = {'taxi'},
},
},

-- Status indicators shown in the scoreboard
statusIndicators = {
{ id = 'house_robbery', label = 'House robbery', icon = 'mdi:house', defaultState = true },
{ id = 'store_robbery', label = 'Store robbery', icon = 'mdi:store', defaultState = false },
{ id = 'bank_robbery', label = 'Bank robbery', icon = 'mdi:bank' },
},
}
22 changes: 0 additions & 22 deletions docs/common_issues.md

This file was deleted.

Loading

0 comments on commit ba9a679

Please sign in to comment.