itismyskillmarket 1.3.22 → 1.3.23

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/dist/index.js CHANGED
@@ -2151,7 +2151,9 @@ API_ROUTES.GET["/api/skills"] = async (_req, res, url) => {
2151
2151
  });
2152
2152
  const filteredTotal = skills.length;
2153
2153
  const totalPages = Math.ceil(filteredTotal / limit) || 1;
2154
- jsonResponse(res, 200, { skills, page, totalPages, total: filteredTotal, fetchErrors });
2154
+ const start = (page - 1) * limit;
2155
+ const pagedSkills = skills.slice(start, start + limit);
2156
+ jsonResponse(res, 200, { skills: pagedSkills, page, totalPages, total: filteredTotal, fetchErrors });
2155
2157
  } catch (err) {
2156
2158
  jsonResponse(res, 500, {
2157
2159
  error: String(err),
package/gui/app.js CHANGED
@@ -832,6 +832,12 @@ function renderPagination(currentPage, totalPages) {
832
832
  let html = `
833
833
  <button ${currentPage <= 1 ? 'disabled' : ''} onclick="changePage(${currentPage - 1})">${t('pagination.prev')}</button>
834
834
  <span class="page-info">${t('pagination.pageInfo', { page: currentPage, totalPages: totalPages })}</span>
835
+ <span class="page-jump">
836
+ <label>Go to</label>
837
+ <input type="number" id="page-jump-input" min="1" max="${totalPages}" value="${currentPage}"
838
+ onkeydown="if(event.key==='Enter')jumpToPage()">
839
+ <button onclick="jumpToPage()">Go</button>
840
+ </span>
835
841
  <button ${currentPage >= totalPages ? 'disabled' : ''} onclick="changePage(${currentPage + 1})">${t('pagination.next')}</button>
836
842
  `;
837
843
 
@@ -844,6 +850,17 @@ function changePage(page) {
844
850
  loadSkills();
845
851
  }
846
852
 
853
+ function jumpToPage() {
854
+ const input = document.getElementById('page-jump-input');
855
+ if (!input) return;
856
+ const page = parseInt(input.value);
857
+ if (isNaN(page) || page < 1 || page > state.totalPages) {
858
+ input.value = state.currentPage;
859
+ return;
860
+ }
861
+ changePage(page);
862
+ }
863
+
847
864
  // -----------------------------------------------------------------------------
848
865
  // Platforms
849
866
  // -----------------------------------------------------------------------------
package/gui/style.css CHANGED
@@ -366,6 +366,54 @@ body {
366
366
  font-size: 0.85rem;
367
367
  }
368
368
 
369
+ .pagination .page-jump {
370
+ display: flex;
371
+ align-items: center;
372
+ gap: 4px;
373
+ color: var(--text-muted);
374
+ font-size: 0.85rem;
375
+ }
376
+
377
+ .pagination .page-jump input {
378
+ width: 50px;
379
+ padding: 5px 6px;
380
+ background: var(--bg-secondary);
381
+ border: 1px solid var(--border-color);
382
+ color: var(--text-secondary);
383
+ border-radius: 4px;
384
+ font-size: 0.85rem;
385
+ text-align: center;
386
+ }
387
+
388
+ .pagination .page-jump input:focus {
389
+ outline: none;
390
+ border-color: var(--accent);
391
+ }
392
+
393
+ .pagination .page-jump button {
394
+ padding: 5px 10px;
395
+ background: var(--bg-card);
396
+ border: 1px solid var(--border-color);
397
+ color: var(--text-secondary);
398
+ border-radius: 4px;
399
+ cursor: pointer;
400
+ font-size: 0.8rem;
401
+ }
402
+
403
+ .pagination .page-jump button:hover {
404
+ background: var(--bg-hover);
405
+ }
406
+
407
+ /* Hide spinner for number input */
408
+ .pagination .page-jump input::-webkit-outer-spin-button,
409
+ .pagination .page-jump input::-webkit-inner-spin-button {
410
+ -webkit-appearance: none;
411
+ margin: 0;
412
+ }
413
+ .pagination .page-jump input[type=number] {
414
+ -moz-appearance: textfield;
415
+ }
416
+
369
417
  /* -----------------------------------------------------------------------------
370
418
  Skill 详情视图
371
419
  ----------------------------------------------------------------------------- */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itismyskillmarket",
3
- "version": "1.3.22",
3
+ "version": "1.3.23",
4
4
  "description": "Cross-platform skill manager for AI coding tools",
5
5
  "type": "module",
6
6
  "bin": {