pinokiod 8.0.117 → 8.1.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.
@@ -5414,12 +5414,18 @@ class RegistryCore {
5414
5414
  where.push(clause.sql)
5415
5415
  values.push(...clause.values)
5416
5416
  }
5417
+ // Folded so a capitalised folder does not lead every lowercase one, and
5418
+ // broken by the raw name so the order is total: this level pages by offset,
5419
+ // and two names differing only in case would otherwise tie and let a page
5420
+ // boundary repeat or skip a row.
5417
5421
  const folded = "pinokio_path_name(name)"
5418
5422
  const order = sizeSort === "asc"
5419
- ? `bytes ASC, ${folded} ASC`
5423
+ ? `bytes ASC, ${folded} ASC, name ASC`
5420
5424
  : sizeSort === "desc"
5421
- ? `bytes DESC, ${folded} ASC`
5422
- : nameSort === "desc" ? `${folded} DESC` : `${folded} ASC`
5425
+ ? `bytes DESC, ${folded} ASC, name ASC`
5426
+ : nameSort === "desc"
5427
+ ? `${folded} DESC, name DESC`
5428
+ : `${folded} ASC, name ASC`
5423
5429
  // Values bind in the order the placeholders appear: the CTE's substr, then
5424
5430
  // its WHERE, then the two separators in the outer select and filter.
5425
5431
  return this.database.prepare(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "8.0.117",
3
+ "version": "8.1.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -9,7 +9,8 @@
9
9
  <aside class="main-sidebar" id="main-sidebar" aria-label="Primary navigation">
10
10
  <nav class="main-sidebar-nav" aria-label="Pinokio navigation">
11
11
  <div class='main-sidebar-section main-sidebar-section-actions' aria-label="Actions">
12
- <a class='tab main-sidebar-action <%= sidebarSelected === 'explore' ? 'selected' : '' %>' id='explore' href="/home?mode=explore"><i class="fa-solid fa-globe main-sidebar-action-icon"></i><div class='caption'>Explore</div></a>
12
+ <a class='tab main-sidebar-action <%= sidebarSelected === 'home' ? 'selected' : '' %>' id='home' href="/home"<% if (sidebarSelected === 'home') { %> aria-current="page"<% } %>><i class="fa-solid fa-layer-group main-sidebar-action-icon"></i><div class='caption'>My Apps</div></a>
13
+ <a class='tab main-sidebar-action <%= sidebarSelected === 'explore' ? 'selected' : '' %>' id='explore' href="/home?mode=explore"<% if (sidebarSelected === 'explore') { %> aria-current="page"<% } %>><i class="fa-solid fa-globe main-sidebar-action-icon"></i><div class='caption'>Explore</div></a>
13
14
  <details class="universal-create-menu">
14
15
  <summary class="tab main-sidebar-action" aria-label="Create options"><i class="fa-solid fa-plus main-sidebar-action-icon"></i><div class='caption'>Create</div></summary>
15
16
  <div class="universal-create-dropdown">
@@ -5,6 +5,18 @@ const test = require('node:test')
5
5
 
6
6
  const sidebarFile = path.resolve(__dirname, '..', 'server', 'views', 'partials', 'main_sidebar.ejs')
7
7
 
8
+ test('main sidebar exposes My Apps before Explore', async () => {
9
+ const source = await fs.readFile(sidebarFile, 'utf8')
10
+
11
+ const myAppsIndex = source.indexOf("<div class='caption'>My Apps</div>")
12
+ const exploreIndex = source.indexOf("<div class='caption'>Explore</div>")
13
+
14
+ assert.notEqual(myAppsIndex, -1)
15
+ assert.notEqual(exploreIndex, -1)
16
+ assert.ok(myAppsIndex < exploreIndex)
17
+ assert.match(source, /sidebarSelected === 'home'[\s\S]*id='home' href="\/home"[\s\S]*aria-current="page"[\s\S]*fa-layer-group[\s\S]*>My Apps</)
18
+ })
19
+
8
20
  test('main sidebar moves Home Server under Configure', async () => {
9
21
  const source = await fs.readFile(sidebarFile, 'utf8')
10
22