nodebb-plugin-customize 4.1.0 → 4.1.1

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.
@@ -1,128 +1,127 @@
1
1
  <div class="acp-page-container" style="max-width: 1200px;">
2
2
  <div component="settings/main/header" class="row border-bottom py-2 m-0 sticky-top acp-page-main-header align-items-center">
3
- <div class="col-12 col-md-8 px-0 mb-1 mb-md-0">
4
- <h4 class="fw-bold tracking-tight mb-0">{title}</h4>
5
- </div>
6
- <div class="col-12 col-md-4 px-0 px-md-3">
7
- <button id="build" class="btn btn-primary btn-sm fw-semibold ff-secondary w-100 text-center text-nowrap">[[admin/admin:save-changes]]</button>
8
- </div>
9
- </div>
3
+ <div class="col-12 col-md-8 px-0 mb-1 mb-md-0">
4
+ <h4 class="fw-bold tracking-tight mb-0">{title}</h4>
5
+ </div>
6
+ <div class="col-12 col-md-4 px-0 px-md-3">
7
+ <button id="build" class="btn btn-primary btn-sm fw-semibold ff-secondary w-100 text-center text-nowrap">[[admin/admin:save-changes]]</button>
8
+ </div>
9
+ </div>
10
10
 
11
11
  <div class="row m-0">
12
12
  <div id="spy-container" class="col-12 px-0 mb-4" tabindex="0">
13
+ <div class="card">
14
+ <div class="card-header">
15
+ <h4 class="card-title">Translation Customizations</h4>
16
+ </div>
17
+ <table class="table">
18
+ <thead>
19
+ <tr>
20
+ <th>Language</th>
21
+ <th>Namespace</th>
22
+ <th>Key</th>
23
+ <th>Original</th>
24
+ <th>Replacement</th>
25
+ <th></th>
26
+ </tr>
27
+ </thead>
28
+ <tbody id="translations-list">
29
+ <!-- IMPORT partials/admin/plugins/customize/translations-list.tpl -->
30
+ </tbody>
31
+ <tfoot>
32
+ <tr id="translation-edit" class="translation">
33
+ <td>
34
+ <select id="translation-edit-language" class="form-select">
35
+ <option value="">---</option>
36
+ {{{each languages}}}
37
+ <option value="{./code}" {{{if ./selected}}}selected{{{end}}}>{./name} ({./code})</option>
38
+ {{{end}}}
39
+ </select>
40
+ </td>
41
+ <td>
42
+ <select id="translation-edit-namespace" class="form-select">
43
+ <option value="">---</option>
44
+ {{{each namespaces}}}
45
+ <option value="{./name}">{./name}</option>
46
+ {{{end}}}
47
+ </select>
48
+ </td>
49
+ <td>
50
+ <select id="translation-edit-key" class="form-select">
51
+ <!-- automatically fetch possible keys and autopopulate this -->
52
+ </select>
53
+ </td>
54
+ <td>
55
+ <span id="translation-edit-original"><!-- original goes here --></span>
56
+ </td>
57
+ <td>
58
+ <!-- set to original value at first -->
59
+ <textarea id="translation-edit-value" class="form-control"></textarea>
60
+ </td>
61
+ <td>
62
+ <button class="btn btn-ghost" id="translation-edit-submit"><i class="fa fa-fw fa-check text-success"></i></button>
63
+ </td>
64
+ </tr>
65
+ </tfoot>
66
+ </table>
67
+ </div>
13
68
 
14
- <div class="card">
15
- <div class="card-header">
16
- <h4 class="card-title">Translation Customizations</h4>
17
- </div>
18
- <table class="table">
19
- <thead>
20
- <tr>
21
- <th>Language</th>
22
- <th>Namespace</th>
23
- <th>Key</th>
24
- <th>Original</th>
25
- <th>Replacement</th>
26
- <th></th>
27
- </tr>
28
- </thead>
29
- <tbody id="translations-list">
30
- <!-- IMPORT partials/admin/plugins/customize/translations-list.tpl -->
31
- </tbody>
32
- <tfoot>
33
- <tr id="translation-edit" class="translation">
34
- <td>
35
- <select id="translation-edit-language" class="form-select">
36
- <option value="">---</option>
37
- {{{each languages}}}
38
- <option value="{./code}" {{{if ./selected}}}selected{{{end}}}>{./name} ({./code})</option>
39
- {{{end}}}
40
- </select>
41
- </td>
42
- <td>
43
- <select id="translation-edit-namespace" class="form-select">
44
- <option value="">---</option>
45
- {{{each namespaces}}}
46
- <option value="{./name}">{./name}</option>
47
- {{{end}}}
48
- </select>
49
- </td>
50
- <td>
51
- <select id="translation-edit-key" class="form-select">
52
- <!-- automatically fetch possible keys and autopopulate this -->
53
- </select>
54
- </td>
55
- <td>
56
- <span id="translation-edit-original"><!-- original goes here --></span>
57
- </td>
58
- <td>
59
- <!-- set to original value at first -->
60
- <textarea id="translation-edit-value" class="form-control"></textarea>
61
- </td>
62
- <td>
63
- <button class="btn btn-ghost" id="translation-edit-submit"><i class="fa fa-fw fa-check text-success"></i></button>
64
- </td>
65
- </tr>
66
- </tfoot>
67
- </table>
68
- </div>
69
-
70
- <div class="card">
71
- <div class="card-header">
72
- <h4 class="card-title">Template Customizations</h4>
73
- </div>
74
- <table class="table">
75
- <thead>
76
- <tr>
77
- <th>Template</th>
78
- <th>Diff</th>
79
- <th></th>
80
- </tr>
81
- </thead>
82
- <tbody id="templates-list">
83
- <!-- IMPORT partials/admin/plugins/customize/templates-list.tpl -->
84
- </tbody>
85
- <tfoot>
86
- <tr id="template-edit" class="template">
87
- <td>
88
- <select id="template-edit-path" class="form-select">
89
- <option value="">---</option>
90
- {{{each templatePaths}}}
91
- <option value="{@value}">{@value}</option>
92
- {{{end}}}
93
- </select>
94
- </td>
95
- <td>
96
- <pre class="diff-preview"><code id="template-edit-diff"><!-- diff goes here --></code></pre>
97
- </td>
98
- <td>
99
- <div class="d-flex gap-2">
100
- <button class="btn btn-sm btn-primary" id="template-edit-open" data-bs-toggle="modal" data-bs-target="#template-edit-modal"><i class="fa fa-fw fa-pencil"></i></a>
101
- <button class="btn btn-sm btn-success" id="template-edit-submit"><i class="fa fa-fw fa-check"></i></button>
102
- </div>
103
- </td>
104
- </tr>
105
- </tfoot>
106
- </table>
107
- </div>
69
+ <div class="card">
70
+ <div class="card-header">
71
+ <h4 class="card-title">Template Customizations</h4>
72
+ </div>
73
+ <table class="table">
74
+ <thead>
75
+ <tr>
76
+ <th>Template</th>
77
+ <th>Diff</th>
78
+ <th></th>
79
+ </tr>
80
+ </thead>
81
+ <tbody id="templates-list">
82
+ <!-- IMPORT partials/admin/plugins/customize/templates-list.tpl -->
83
+ </tbody>
84
+ <tfoot>
85
+ <tr id="template-edit" class="template">
86
+ <td>
87
+ <select id="template-edit-path" class="form-select">
88
+ <option value="">---</option>
89
+ {{{each templatePaths}}}
90
+ <option value="{@value}">{@value}</option>
91
+ {{{end}}}
92
+ </select>
93
+ </td>
94
+ <td>
95
+ <pre class="diff-preview"><code id="template-edit-diff"><!-- diff goes here --></code></pre>
96
+ </td>
97
+ <td>
98
+ <div class="d-flex gap-2">
99
+ <button class="btn btn-sm btn-primary" id="template-edit-open" data-bs-toggle="modal" data-bs-target="#template-edit-modal"><i class="fa fa-fw fa-pencil"></i></a>
100
+ <button class="btn btn-sm btn-success" id="template-edit-submit"><i class="fa fa-fw fa-check"></i></button>
101
+ </div>
102
+ </td>
103
+ </tr>
104
+ </tfoot>
105
+ </table>
106
+ </div>
108
107
 
109
- <div class="modal fade" id="template-edit-modal" tabindex="-1" role="dialog" aria-labelledby="template-edit-modal-label">
110
- <div class="modal-dialog modal-fullscreen" role="document">
111
- <div class="modal-content">
112
- <div class="modal-header">
113
- <h4 class="modal-title" id="template-edit-modal-label">Edit Template Customization</h4>
114
- <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"><span aria-hidden="true"></span></button>
115
- </div>
116
- <div class="modal-body row">
117
- <div class="col-md" id="template-edit-old"></div>
118
- <div class="col-md" id="template-edit-value"></div>
119
- </div>
120
- <div class="modal-footer">
121
- <button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Done</button>
122
- </div>
123
- </div>
124
- </div>
125
- </div>
108
+ <div class="modal fade" id="template-edit-modal" tabindex="-1" role="dialog" aria-labelledby="template-edit-modal-label">
109
+ <div class="modal-dialog modal-fullscreen" role="document">
110
+ <div class="modal-content">
111
+ <div class="modal-header">
112
+ <h4 class="modal-title" id="template-edit-modal-label">Edit Template Customization</h4>
113
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"><span aria-hidden="true"></span></button>
114
+ </div>
115
+ <div class="modal-body row">
116
+ <div class="col-md" id="template-edit-old"></div>
117
+ <div class="col-md" id="template-edit-value"></div>
118
+ </div>
119
+ <div class="modal-footer">
120
+ <button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Done</button>
121
+ </div>
122
+ </div>
123
+ </div>
124
+ </div>
126
125
  </div>
127
126
  </div>
128
127
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-customize",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "description": "Customize NodeBB translations and templates",
5
5
  "main": "build/lib",
6
6
  "author": "Peter Jaszkowiak <p.jaszkow@gmail.com> (https://github.com/pitaj)",
@@ -1,13 +0,0 @@
1
- <div class="alert alert-danger">
2
- <strong>[[global:400.title]]</strong>
3
- <!-- IF error -->
4
- <p>{error}</p>
5
- <!-- ELSE -->
6
- <p>[[global:400.message, {config.relative_path}]]</p>
7
- <!-- ENDIF error -->
8
-
9
- <!-- IF returnLink -->
10
- <p>[[error:goback]]</p>
11
- <!-- ENDIF returnLink -->
12
- </div>
13
- asdasd
@@ -1,12 +0,0 @@
1
- <div class="flex-fill">
2
- <h2 class="fw-semibold tracking-tight text-center">[[global:404.title]]</h2>
3
- it works
4
- <div class="mx-auto">
5
- <div class="d-flex flex-column gap-3 justify-content-center text-center">
6
- <div class="mx-auto p-4 bg-light border rounded">
7
- <i class="text-secondary fa fa-fw fa-4x {{{ if icon }}}{icon}{{{ else }}}fa-otter{{{ end }}}"></i>
8
- </div>
9
- {{{ if error }}}{error}{{{ else }}}[[global:404.message, {config.relative_path}]]{{{ end }}}
10
- </div>
11
- </div>
12
- </div>