Skip to content

Commit

Permalink
[v1.3.0] Code cleanup and add various enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
GriefMoDz committed Feb 11, 2023
1 parent 60e2e61 commit 29bdbb4
Show file tree
Hide file tree
Showing 21 changed files with 2,663 additions and 467 deletions.
14 changes: 9 additions & 5 deletions .eslintrc.yml
Expand Up @@ -31,27 +31,31 @@ rules:
node/shebang: off
no-process-exit: off
no-undef: off
no-undefined: off
no-unused-vars: off
"@typescript-eslint/no-unused-vars": error
new-cap: off
"@typescript-eslint/no-unused-vars":
- error
- argsIgnorePattern: "^_"

overrides:
- files: "**/*.ts"
- files: "**/*.{ts,tsx}"
extends: eslint-config-dmitmel/presets/typescript-addon
rules:
node/no-missing-import: off
eqeqeq: off
"@typescript-eslint/no-dynamic-delete": off
\@typescript-eslint/no-dynamic-delete: off
no-return-assign: off
no-void: off
consistent-return: off

- files: "**/src/**/*.ts"
- files: "**/src/**/*.{ts,tsx}"
extends: eslint-config-dmitmel/rules/typescript/with-type-checking

- files: "**/*.d.ts"
rules:
no-var: off

- files: "src/**/*.ts"
- files: "src/**/*.{ts,tsx}"
parserOptions:
project: tsconfig.json
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Expand Up @@ -29,7 +29,7 @@ jobs:
run: pnpm install

- name: Build TypeScript and bundle into asar
run: pnpm run build-and-bundle
run: pnpm run bundle

- uses: ncipollo/release-action@v1
with:
Expand Down
8 changes: 6 additions & 2 deletions README.md
@@ -1,6 +1,9 @@
# Statistic Counter
Formally known as "Online Friends Count", this is a Replugged plug-in that has been ported from Powercord which introduces an interchangeable statistic counter in-between the home button and servers list.

![License: MIT](https://img.shields.io/github/license/griefmodz/statistic-counter?color=3ba55c&style=for-the-badge)
![Total Downloads](https://img.shields.io/github/downloads/griefmodz/statistic-counter/total?color=3ba55c&style=for-the-badge)

## Features

- Multiple counters (i.e. number of friends online, total number of friends, incoming friend requests, blocked users, and total number of servers joined).
Expand All @@ -9,10 +12,10 @@ Formally known as "Online Friends Count", this is a Replugged plug-in that has b
## Planned Features
- [x] Add a settings page
- [x] Display a real-time preview under the settings page
- [ ] Implement a context menu to quickly change settings
- [x] Implement a context menu to quickly change settings

## Settings
To customize the counter, you can use the settings page or manually set your preferences by entering the following method under your DevTools console (`Ctrl` + `Shift` + `I` and click on the "Console" tab):
To customize the counter, you can either use the settings page, the counter context menu, or manually set your preferences by entering the following method under your DevTools console (`Ctrl` + `Shift` + `I` and click on the "Console" tab):

```js
// Replace the `key` and `value` respectively - you can use the table below as a reference
Expand All @@ -25,6 +28,7 @@ To customize the counter, you can use the settings page or manually set your pre
| `autoRotationDelay` | Delay between rotations | `5e3` |
| `autoRotationHoverPause` | Pause the rotation upon hover | `true` |
| `preserveLastCounter` | Remember the last counter | `false` |
| `viewOrder` | Change counter order | `['online', 'friends', 'pending', 'blocked', 'guilds']` |
| `online` | Enable online counter | `true` |
| `friends` | Enable friends counter | `true` |
| `pending` | Enable pending counter | `true` |
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Expand Up @@ -7,7 +7,7 @@
"discordID": "350227339784880130",
"github": "griefmodz"
},
"version": "1.2.1",
"version": "1.3.0",
"updater": {
"type": "github",
"id": "griefmodz/statistic-counter"
Expand Down
25 changes: 11 additions & 14 deletions package.json
@@ -1,15 +1,14 @@
{
"name": "statistic-counter",
"version": "1.2.1",
"version": "1.3.0",
"description": "A Replugged plug-in that has been ported from Powercord which introduces an interchangeable statistic counter in-between the home button and servers list.",
"engines": {
"node": ">=14.0.0"
},
"scripts": {
"build": "tsx scripts/build.ts",
"watch": "tsx scripts/build.ts --watch",
"bundle": "tsx scripts/bundle.ts",
"build-and-bundle": "pnpm run build --no-install && pnpm run bundle",
"build": "replugged build plugin",
"watch": "replugged build plugin --watch",
"bundle": "replugged bundle plugin",
"check": "tsc --noEmit",
"prettier:check": "prettier ./src --check",
"eslint:check": "eslint ./src",
Expand All @@ -22,18 +21,16 @@
"author": "",
"license": "MIT",
"devDependencies": {
"@electron/asar": "^3.2.3",
"@types/node": "^18.11.18",
"@types/node": "^18.11.2",
"@typescript-eslint/eslint-plugin": "^5.49.0",
"@typescript-eslint/parser": "^5.49.0",
"@typescript-eslint/parser": "^5.40.1",
"esbuild": "^0.15.18",
"eslint": "^8.32.0",
"eslint": "^8.25.0",
"eslint-config-dmitmel": "github:dmitmel/eslint-config-dmitmel",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-react": "^7.32.1",
"prettier": "^2.8.3",
"replugged": "4.0.0-beta0.22",
"tsx": "^3.12.2",
"typescript": "^4.9.4"
"eslint-plugin-react": "^7.31.10",
"prettier": "^2.8.1",
"replugged": "4.0.0-beta0.25",
"typescript": "^4.8.4"
}
}

0 comments on commit 29bdbb4

Please sign in to comment.