nodebb-plugin-internalnotes 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish-npm.yml +33 -0
- package/LICENSE +21 -0
- package/NODEBB_STANDARDS_AUDIT.md +153 -0
- package/README.md +104 -0
- package/eslint.config.mjs +55 -0
- package/languages/en-GB/internalnotes.json +33 -0
- package/lib/controllers.js +9 -0
- package/library.js +434 -0
- package/package.json +32 -0
- package/plugin.json +53 -0
- package/public/lib/acp-main.js +5 -0
- package/public/lib/admin.js +11 -0
- package/public/lib/main.js +631 -0
- package/scss/internalnotes.scss +181 -0
- package/templates/admin/plugins/internalnotes.tpl +44 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Lint and publish to npm
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
lint-and-publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
id-token: write
|
|
13
|
+
contents: read
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Setup Node.js
|
|
19
|
+
uses: actions/setup-node@v4
|
|
20
|
+
with:
|
|
21
|
+
node-version: "20"
|
|
22
|
+
registry-url: "https://registry.npmjs.org"
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: npm ci
|
|
26
|
+
|
|
27
|
+
- name: Lint
|
|
28
|
+
run: npm run lint
|
|
29
|
+
|
|
30
|
+
- name: Publish to npm
|
|
31
|
+
run: npm publish --provenance --access public
|
|
32
|
+
env:
|
|
33
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 BrutalBirdie
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# NodeBB Plugin Standards Audit
|
|
2
|
+
|
|
3
|
+
This document audits **nodebb-plugin-internalnotes** against [NodeBB upstream documentation](https://docs.nodebb.org/development/) and the [nodebb-plugin-quickstart](https://github.com/NodeBB/nodebb-plugin-quickstart) template. References: [development](https://docs.nodebb.org/development/), [quickstart](https://docs.nodebb.org/development/quickstart/), [plugins](https://docs.nodebb.org/development/plugins/), [plugin.json](https://docs.nodebb.org/development/plugins/plugin.json/), [hooks](https://docs.nodebb.org/development/plugins/hooks/), [statics](https://docs.nodebb.org/development/plugins/statics/), [libraries](https://docs.nodebb.org/development/plugins/libraries/), [i18n](https://docs.nodebb.org/development/i18n/), [style guide](https://docs.nodebb.org/development/style-guide/).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. plugin.json
|
|
8
|
+
|
|
9
|
+
| Requirement | Status | Notes |
|
|
10
|
+
|-------------|--------|--------|
|
|
11
|
+
| **id** | ✅ | `nodebb-plugin-internalnotes` (unique, matches npm package name) |
|
|
12
|
+
| **url** | ✅ | Absolute URL to repo |
|
|
13
|
+
| **library** | ✅ | `./library.js` – entry point loaded when plugin is active |
|
|
14
|
+
| **hooks** | ✅ | All hooks have `hook` and `method`; optional `priority` omitted (default 10) |
|
|
15
|
+
| **scss** | ✅ | `scss/internalnotes.scss` |
|
|
16
|
+
| **scripts** | ✅ | `public/lib/main.js` (forum client) |
|
|
17
|
+
| **acpScripts** | ✅ | `public/lib/acp-main.js` (ACP client) |
|
|
18
|
+
| **modules** | ✅ | `../admin/plugins/internalnotes.js` → `./public/lib/admin.js` (ACP page module) |
|
|
19
|
+
| **templates** | ✅ | `templates` |
|
|
20
|
+
| **languages** | ✅ | `languages` |
|
|
21
|
+
| **staticDirs** | ⚪ | Not required; no public static assets |
|
|
22
|
+
| **upgrades** | ⚪ | Optional; add when introducing DB migrations |
|
|
23
|
+
|
|
24
|
+
**Verdict:** Compliant.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 2. package.json & nbbpm
|
|
29
|
+
|
|
30
|
+
| Requirement | Status | Notes |
|
|
31
|
+
|-------------|--------|--------|
|
|
32
|
+
| **name** | ✅ | `nodebb-plugin-internalnotes` (must be prefixed `nodebb-plugin-` for npm and NodeBB) |
|
|
33
|
+
| **main** | ✅ | `library.js` |
|
|
34
|
+
| **nbbpm.compatibility** | ✅ | `^3.0.0` – required for nbbpm listing and installs |
|
|
35
|
+
| **repository / bugs** | ✅ | Present |
|
|
36
|
+
| **keywords** | ✅ | Include `nodebb`, `plugin` |
|
|
37
|
+
| **.npmignore** | ✅ | Added (node_modules, .git, .DS_Store, etc.) so only publishable files are shipped |
|
|
38
|
+
|
|
39
|
+
**Verdict:** Compliant.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 3. Library (library.js)
|
|
44
|
+
|
|
45
|
+
| Requirement | Status | Notes |
|
|
46
|
+
|-------------|--------|-------|
|
|
47
|
+
| **Hook methods** | ✅ | Each hook in `plugin.json` has a matching exported method |
|
|
48
|
+
| **require.main.require** | ✅ | NodeBB modules loaded via `require.main.require('./src/...')` |
|
|
49
|
+
| **Async hooks** | ✅ | `init`, `addRoutes`, filters use async/callbacks appropriately |
|
|
50
|
+
| **formatApiResponse** | ✅ | API routes use `helpers.formatApiResponse()` (and `controllerHelpers` once for 403) |
|
|
51
|
+
| **Route helpers** | ✅ | `routeHelpers.setupAdminPageRoute`, `routeHelpers.setupApiRoute` used correctly |
|
|
52
|
+
|
|
53
|
+
**API route paths:** Routes are registered under `/internalnotes/...`. The client and README use `/plugins/internalnotes/...`. In NodeBB 3, plugin API routes are typically mounted under `/api/v3/plugins/<plugin-id>`; the router passed to `static:api.routes` may be scoped per plugin, so `/internalnotes/:tid` can resolve to `/api/v3/plugins/internalnotes/:tid`. **Ensure the router you receive is the plugin-scoped one**; if the client calls `api.get('/plugins/internalnotes/' + tid)` and the request goes to `/api/v3/plugins/internalnotes/:tid`, the server must serve that path (either by registering `/internalnotes/...` on a router already mounted at `.../plugins/internalnotes`, or by registering `/plugins/internalnotes/...` on the main API router). No code change if your environment already matches; otherwise align server route prefix with client.
|
|
54
|
+
|
|
55
|
+
**Verdict:** Compliant; verify API base path in your NodeBB version.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 4. Client-side (scripts / acpScripts / modules)
|
|
60
|
+
|
|
61
|
+
| Requirement | Status | Notes |
|
|
62
|
+
|-------------|--------|--------|
|
|
63
|
+
| **Forum script** | ✅ | `public/lib/main.js` – loaded via `scripts` |
|
|
64
|
+
| **ACP script** | ✅ | `public/lib/acp-main.js` – loaded via `acpScripts` |
|
|
65
|
+
| **Admin module** | ✅ | `modules` maps `../admin/plugins/internalnotes.js` to admin script; template `admin/plugins/internalnotes` triggers `require('admin/plugins/internalnotes')` and `init()` |
|
|
66
|
+
| **ES5 / minification** | ⚠️ | Style guide recommends ES5 for client code for minification. `main.js` uses async/await and template literals (ES6+). NodeBB 3 build may transpile; if not, consider ES5 or confirm build supports ES6+ |
|
|
67
|
+
| **Admin ES modules** | ✅ | `admin.js` uses `import { save, load } from 'settings'` – ACP is typically built with module support |
|
|
68
|
+
|
|
69
|
+
**Verdict:** Compliant for structure; confirm client build/minification for ES6+ if you hit issues.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 5. Templates
|
|
74
|
+
|
|
75
|
+
| Requirement | Status | Notes |
|
|
76
|
+
|-------------|--------|--------|
|
|
77
|
+
| **Admin template** | ✅ | `templates/admin/plugins/internalnotes.tpl`; controller uses `res.render('admin/plugins/internalnotes', ...)` |
|
|
78
|
+
| **Naming** | ✅ | Matches quickstart pattern `admin/plugins/<name>` |
|
|
79
|
+
|
|
80
|
+
**Verdict:** Compliant.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 6. i18n (languages)
|
|
85
|
+
|
|
86
|
+
| Requirement | Status | Notes |
|
|
87
|
+
|-------------|--------|--------|
|
|
88
|
+
| **Directory** | ✅ | `languages/en-GB/internalnotes.json` |
|
|
89
|
+
| **plugin.json** | ✅ | `"languages": "languages"` |
|
|
90
|
+
| **Usage** | ✅ | Keys like `[[internalnotes:menu.assigned]]` in templates and server; client uses `translator.translate('[[internalnotes:' + key + ']]', ...)` |
|
|
91
|
+
| **defaultLang** | ⚪ | Optional; only needed if you want a non–en-GB fallback |
|
|
92
|
+
|
|
93
|
+
**Verdict:** Compliant.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 7. Hooks usage
|
|
98
|
+
|
|
99
|
+
| Hook | Purpose | Status |
|
|
100
|
+
|------|---------|--------|
|
|
101
|
+
| **static:app.load** | Init, page and admin routes | ✅ |
|
|
102
|
+
| **static:api.routes** | REST API routes (notes, assign, group search) | ✅ |
|
|
103
|
+
| **filter:admin.header.build** | ACP nav item | ✅ |
|
|
104
|
+
| **filter:navigation.available** | “Assigned” nav item | ✅ |
|
|
105
|
+
| **filter:topic.get** | Add notes/assignee to single topic | ✅ |
|
|
106
|
+
| **filter:topics.get** | Add notes/assignee to topic lists | ✅ |
|
|
107
|
+
| **filter:topic.thread_tools** | Thread tools entries | ✅ |
|
|
108
|
+
| **action:topic.purge** | Clean up notes/assignee on topic purge | ✅ |
|
|
109
|
+
|
|
110
|
+
**Verdict:** All hooks used correctly; filters return data in the expected shape.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 8. Static directories & security
|
|
115
|
+
|
|
116
|
+
- No `staticDirs` – no public static assets. Sensitive data is not exposed via static routes.
|
|
117
|
+
- API routes use `middleware.ensureLoggedIn` and custom `ensurePrivileged` (notes visibility).
|
|
118
|
+
**Verdict:** Compliant.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 9. Database
|
|
123
|
+
|
|
124
|
+
- Uses NodeBB `database` API (`getObject`, `setObject`, `sortedSetAdd`, etc.).
|
|
125
|
+
- Keys documented in README; no custom migrations yet (no `upgrades` in plugin.json).
|
|
126
|
+
**Verdict:** Compliant; add `upgrades` when you introduce schema changes.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## 10. Style guide
|
|
131
|
+
|
|
132
|
+
- Core follows Airbnb JS + ESLint; third-party plugins are encouraged but not required to follow.
|
|
133
|
+
- This plugin has `"lint": "eslint ."` in package.json but no local eslint config in the repo; lint may rely on global or NodeBB env.
|
|
134
|
+
**Verdict:** Optional; adding an `eslint.config.mjs` (or similar) would align with best practice.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Summary
|
|
139
|
+
|
|
140
|
+
| Area | Result |
|
|
141
|
+
|------|--------|
|
|
142
|
+
| plugin.json | ✅ Compliant |
|
|
143
|
+
| package.json / nbbpm | ✅ Compliant (.npmignore added) |
|
|
144
|
+
| library.js | ✅ Compliant (verify API path) |
|
|
145
|
+
| Client / ACP | ✅ Compliant (confirm ES5/ES6 build) |
|
|
146
|
+
| Templates | ✅ Compliant |
|
|
147
|
+
| i18n | ✅ Compliant |
|
|
148
|
+
| Hooks | ✅ Compliant |
|
|
149
|
+
| Security | ✅ Compliant |
|
|
150
|
+
| Database | ✅ Compliant |
|
|
151
|
+
| Style / lint | ✅ eslint.config.mjs added (optional; run `npm install -D eslint` for lint) |
|
|
152
|
+
|
|
153
|
+
**Done:** `.npmignore` and a minimal `eslint.config.mjs` were added. For production, confirm in your NodeBB 3 instance that API requests from the client (e.g. `api.get('/plugins/internalnotes/' + tid)`) hit the routes your plugin registers; adjust server route prefix if your NodeBB mounts plugin routes differently.
|
package/README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# nodebb-plugin-internalnotes
|
|
2
|
+
|
|
3
|
+
A NodeBB plugin that adds **internal staff notes** and **topic assignment** to forum topics. By default only administrators can see and manage notes and assignments; you can optionally allow global moderators and/or category moderators in the plugin settings. They are completely invisible to everyone else.
|
|
4
|
+
|
|
5
|
+
**Version:** 1.0.0 · **NodeBB:** 4.x (tested on 4.8.1)
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- **Internal Notes** — Add, view, and delete private notes on any topic. Notes are stored per-topic and include the author and timestamp.
|
|
10
|
+
- **Topic Assignment (User or Group)** — Assign a topic to a specific user or an entire group. All members of an assigned group receive a notification.
|
|
11
|
+
- **"Assign to myself"** — The first option in the assignment modal lets the current user instantly assign the topic to themselves.
|
|
12
|
+
- **Permission-based visibility** — Notes, assignment badges, and the thread tool buttons are completely invisible to regular users. By default only admins can see them; you can enable global moderators and/or category moderators in the plugin settings. No DOM elements are rendered for unprivileged users.
|
|
13
|
+
- **Thread Tools integration** — "Internal Notes" and "Assign Topic" options appear in the topic thread tools dropdown for privileged users only.
|
|
14
|
+
- **Admin settings page** — Configure who can access notes: allow global moderators and/or category moderators (ACP > Plugins > Internal Notes & Assignments).
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
cd /path/to/nodebb
|
|
20
|
+
npm install nodebb-plugin-internalnotes
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Then activate the plugin from the **Admin Control Panel > Extend > Plugins**.
|
|
24
|
+
|
|
25
|
+
### For development
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
cd /path/to/nodebb
|
|
29
|
+
npm link /path/to/nodebb-plugin-internalnotes
|
|
30
|
+
./nodebb build
|
|
31
|
+
./nodebb dev
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Configuration
|
|
35
|
+
|
|
36
|
+
Navigate to **ACP > Plugins > Internal Notes & Assignments** to configure:
|
|
37
|
+
|
|
38
|
+
- **Allow global moderators** — Enable to let global moderators view and manage internal notes and assignments (default: off; only admins have access).
|
|
39
|
+
- **Allow category moderators** — Enable to let category moderators view and manage internal notes in their categories (default: off).
|
|
40
|
+
|
|
41
|
+
## Usage
|
|
42
|
+
|
|
43
|
+
1. Navigate to any topic as a user who has access (admin, or global/category moderator if enabled in settings).
|
|
44
|
+
2. Open the **Thread Tools** dropdown (the wrench icon).
|
|
45
|
+
3. Click **Internal Notes** to open the notes side panel, or **Assign Topic** to assign the topic.
|
|
46
|
+
|
|
47
|
+
### Notes panel
|
|
48
|
+
|
|
49
|
+
- View all existing notes for the topic
|
|
50
|
+
- Add new notes (supports Ctrl+Enter to submit)
|
|
51
|
+
- Delete notes
|
|
52
|
+
- See current assignee (user or group) and unassign
|
|
53
|
+
|
|
54
|
+
### Assignment modal
|
|
55
|
+
|
|
56
|
+
- **Assign to myself** — one-click self-assignment (first option)
|
|
57
|
+
- **User tab** — search and select any user by username
|
|
58
|
+
- **Group tab** — search and select any group by name
|
|
59
|
+
|
|
60
|
+
## Database Keys
|
|
61
|
+
|
|
62
|
+
| Key | Type | Description |
|
|
63
|
+
|-----|------|-------------|
|
|
64
|
+
| `internalnote:<noteId>` | Hash | Individual note (noteId, tid, uid, content, timestamp) |
|
|
65
|
+
| `internalnotes:tid:<tid>` | Sorted Set | Note IDs for a topic (score = timestamp) |
|
|
66
|
+
| `topic:<tid>` → `assignee` | Object Field | UID (for user) or group name (for group) |
|
|
67
|
+
| `topic:<tid>` → `assigneeType` | Object Field | `"user"` or `"group"` |
|
|
68
|
+
| `global` → `nextInternalNoteId` | Object Field | Auto-incrementing note ID counter |
|
|
69
|
+
|
|
70
|
+
## API Endpoints
|
|
71
|
+
|
|
72
|
+
All endpoints require authentication and privileged access.
|
|
73
|
+
|
|
74
|
+
| Method | Endpoint | Description |
|
|
75
|
+
|--------|----------|-------------|
|
|
76
|
+
| `GET` | `/api/v3/plugins/internalnotes/:tid` | Get all notes for a topic |
|
|
77
|
+
| `POST` | `/api/v3/plugins/internalnotes/:tid` | Create a note (`{ content }`) |
|
|
78
|
+
| `DELETE` | `/api/v3/plugins/internalnotes/:tid/:noteId` | Delete a note |
|
|
79
|
+
| `GET` | `/api/v3/plugins/internalnotes/:tid/assign` | Get topic assignee |
|
|
80
|
+
| `PUT` | `/api/v3/plugins/internalnotes/:tid/assign` | Assign topic (`{ type: "user"\|"group", id: uid\|groupName }`) |
|
|
81
|
+
| `DELETE` | `/api/v3/plugins/internalnotes/:tid/assign` | Unassign topic |
|
|
82
|
+
| `GET` | `/api/v3/plugins/internalnotes/groups/search?query=...` | Search groups by name |
|
|
83
|
+
|
|
84
|
+
## Compatibility
|
|
85
|
+
|
|
86
|
+
NodeBB v3.x and v4.x (`nbbpm.compatibility`: `^3.0.0 || ^4.0.0`). Tested on NodeBB 4.8.1.
|
|
87
|
+
|
|
88
|
+
## Development
|
|
89
|
+
|
|
90
|
+
- The plugin follows [NodeBB plugin standards](https://docs.nodebb.org/development/plugins/); see [NODEBB_STANDARDS_AUDIT.md](NODEBB_STANDARDS_AUDIT.md) for a full audit.
|
|
91
|
+
- Lint: `npm run lint` (ESLint).
|
|
92
|
+
|
|
93
|
+
## Publishing to npm
|
|
94
|
+
|
|
95
|
+
A GitHub Action (`.github/workflows/publish-npm.yml`) runs lint and publishes to [npm](https://www.npmjs.com/~brutalbirdie) when:
|
|
96
|
+
|
|
97
|
+
- A **release** is published on GitHub, or
|
|
98
|
+
- The workflow is run manually (**Actions → Lint and publish to npm → Run workflow**).
|
|
99
|
+
|
|
100
|
+
**One-time setup:** In this repo, go to **Settings → Secrets and variables → Actions** and add a secret named `NPM_TOKEN` with an [npm access token](https://www.npmjs.com/settings/brutalbirdie/tokens) (Automation type is recommended). The workflow will only publish if `npm run lint` passes.
|
|
101
|
+
|
|
102
|
+
## License
|
|
103
|
+
|
|
104
|
+
MIT
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Minimal ESLint config for NodeBB plugin (style guide: https://docs.nodebb.org/development/style-guide/)
|
|
2
|
+
// Run: npm run lint
|
|
3
|
+
export default [
|
|
4
|
+
{ ignores: ['eslint.config.mjs'] },
|
|
5
|
+
// Node/CommonJS (library, lib/*.js) — default
|
|
6
|
+
{
|
|
7
|
+
languageOptions: {
|
|
8
|
+
ecmaVersion: 2022,
|
|
9
|
+
sourceType: 'script',
|
|
10
|
+
globals: {
|
|
11
|
+
require: 'readonly',
|
|
12
|
+
module: 'readonly',
|
|
13
|
+
exports: 'writable',
|
|
14
|
+
__dirname: 'readonly',
|
|
15
|
+
__filename: 'readonly',
|
|
16
|
+
process: 'readonly',
|
|
17
|
+
Buffer: 'readonly',
|
|
18
|
+
setTimeout: 'readonly',
|
|
19
|
+
clearTimeout: 'readonly',
|
|
20
|
+
setInterval: 'readonly',
|
|
21
|
+
clearInterval: 'readonly',
|
|
22
|
+
Promise: 'readonly',
|
|
23
|
+
Array: 'readonly',
|
|
24
|
+
Object: 'readonly',
|
|
25
|
+
parseInt: 'readonly',
|
|
26
|
+
parseFloat: 'readonly',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
rules: {
|
|
30
|
+
'no-unused-vars': ['warn', { argsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' }],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
// ES modules (config, public scripts) — override for these files
|
|
34
|
+
{
|
|
35
|
+
files: ['**/*.mjs', 'public/lib/**/*.js'],
|
|
36
|
+
languageOptions: {
|
|
37
|
+
ecmaVersion: 2022,
|
|
38
|
+
sourceType: 'module',
|
|
39
|
+
globals: {
|
|
40
|
+
$: 'readonly',
|
|
41
|
+
alerts: 'readonly',
|
|
42
|
+
app: 'readonly',
|
|
43
|
+
bootbox: 'readonly',
|
|
44
|
+
config: 'readonly',
|
|
45
|
+
socket: 'readonly',
|
|
46
|
+
t: 'readonly',
|
|
47
|
+
translator: 'readonly',
|
|
48
|
+
Promise: 'readonly',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
rules: {
|
|
52
|
+
'no-unused-vars': ['warn', { argsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' }],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"menu.assigned": "Assigned",
|
|
3
|
+
"panel-title": "Internal Notes",
|
|
4
|
+
"placeholder": "Write an internal note…",
|
|
5
|
+
"add-note": "Add Note",
|
|
6
|
+
"delete-note": "Delete",
|
|
7
|
+
"no-notes": "No internal notes yet.",
|
|
8
|
+
"error-loading": "Could not load notes.",
|
|
9
|
+
"note-added": "Note added successfully.",
|
|
10
|
+
"note-deleted": "Note deleted.",
|
|
11
|
+
"confirm-delete": "Are you sure you want to delete this note?",
|
|
12
|
+
"thread-tool-notes": "Internal Notes",
|
|
13
|
+
"thread-tool-assign": "Assign Topic",
|
|
14
|
+
"not-assigned": "Not assigned",
|
|
15
|
+
"assign-change": "Assign / Change",
|
|
16
|
+
"assigned-to": "Assigned to:",
|
|
17
|
+
"unassign": "Unassign",
|
|
18
|
+
"unassigned": "Topic unassigned.",
|
|
19
|
+
"assign-modal-title": "Assign Topic",
|
|
20
|
+
"assign-to-myself": "Assign to myself",
|
|
21
|
+
"assign-no-one": "Assign to no one",
|
|
22
|
+
"tab-user": "User",
|
|
23
|
+
"tab-group": "Group",
|
|
24
|
+
"search-user-placeholder": "Search for a user…",
|
|
25
|
+
"search-group-placeholder": "Search for a group…",
|
|
26
|
+
"selected": "Selected",
|
|
27
|
+
"assign-confirm": "Assign",
|
|
28
|
+
"assigned-success": "Topic assigned successfully.",
|
|
29
|
+
"select-target-first": "Please select a user or group first.",
|
|
30
|
+
"cancel": "Cancel",
|
|
31
|
+
"notif-assigned-user": "You have been assigned to the topic: %1",
|
|
32
|
+
"notif-assigned-group": "Your group %2 has been assigned to the topic: %1"
|
|
33
|
+
}
|