pinokiod 3.312.0 → 3.313.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.312.0",
3
+ "version": "3.313.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -5114,6 +5114,7 @@ class Server {
5114
5114
  if (this.kernel.homedir) {
5115
5115
  system_env = await Environment.get(this.kernel.homedir, this.kernel)
5116
5116
  }
5117
+ const hasHome = !!this.kernel.homedir
5117
5118
  let configArray = [{
5118
5119
  key: "home",
5119
5120
  val: this.kernel.homedir ? this.kernel.homedir : _home,
@@ -512,9 +512,9 @@ document.addEventListener('DOMContentLoaded', function() {
512
512
  </select>
513
513
  <% } else { %>
514
514
  <% if (c.val) { %>
515
- <input class='homepath' name="<%=c.key%>" type='text' value="<%=c.val%>" placeholder="<%=c.placeholder ? c.placeholder : ''%>">
515
+ <input class='homepath' name="<%=c.key%>" type='text' value="<%=c.val%>" placeholder="<%=c.placeholder ? c.placeholder : ''%>" <%= c.key === 'home' && !hasHome ? `data-first-home=\"true\"` : "" %>>
516
516
  <% } else { %>
517
- <input class='homepath' name="<%=c.key%>" type='text' placeholder="<%=c.placeholder ? c.placeholder : ''%>">
517
+ <input class='homepath' name="<%=c.key%>" type='text' placeholder="<%=c.placeholder ? c.placeholder : ''%>" <%= c.key === 'home' && !hasHome ? `data-first-home=\"true\"` : "" %>>
518
518
  <% } %>
519
519
  <% } %>
520
520
  <% if (c.description) { %>
@@ -653,6 +653,7 @@ document.addEventListener("DOMContentLoaded", async () => {
653
653
  const homeInput = document.querySelector('input.homepath[name="home"]')
654
654
  let showHomeWarning = () => {}
655
655
  const originalHome = homeInput ? (homeInput.defaultValue || '') : ''
656
+ const isFirstHome = homeInput ? homeInput.dataset.firstHome === 'true' : false
656
657
  if (homeInput) {
657
658
  const warning = document.createElement('div')
658
659
  warning.className = 'home-warning hidden'
@@ -829,7 +830,7 @@ document.addEventListener("DOMContentLoaded", async () => {
829
830
  return
830
831
  }
831
832
  const isChanged = val !== originalHome
832
- if (homeInput && isChanged) {
833
+ if (homeInput && (isFirstHome || isChanged)) {
833
834
  const confirmResult = await Swal.fire({
834
835
  title: 'Reminder',
835
836
  html: 'exFAT drives often break permissions/metadata.<br>Please double-check the path isn\u2019t on exFAT. If it looks good, click \u201cSelect\u201d to continue.',