pinokiod 3.145.0 → 3.146.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.145.0",
3
+ "version": "3.146.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -467,8 +467,6 @@ class Server {
467
467
  if (cfg.menu) {
468
468
  ({ menu, ...c } = cfg)
469
469
  }
470
- console.log("Menu", menu)
471
- console.log("c", c)
472
470
  if (index_exists) {
473
471
  return Object.assign({
474
472
  title: name,
@@ -287,13 +287,8 @@ body.dark .navheader2 .btn {
287
287
  background: rgba(0,0,0,0.4);
288
288
  }
289
289
  .navheader2 {
290
- /*
291
- padding: 15px 10px;
292
- */
293
- /*
294
- padding: 10px 0;
295
- */
296
- padding: 0 0 5px;
290
+ margin-top: 1px;
291
+ padding: 5px 0;
297
292
  /*
298
293
  background: white;
299
294
  */
@@ -149,6 +149,7 @@ body.dark .appcanvas_filler {
149
149
  border: none;
150
150
  }
151
151
  .appcanvas_filler {
152
+ display: none;
152
153
  height: 5px;
153
154
  background: #F1F1F1 !important;
154
155
  }
@@ -1327,6 +1328,7 @@ body.dark #fs-status {
1327
1328
  #fs-status {
1328
1329
  padding: 5px;
1329
1330
  background: #F1F1F1 !important;
1331
+ margin-bottom: 1px;
1330
1332
  gap: 4px;
1331
1333
  box-sizing: border-box;
1332
1334
  /*
@@ -2160,6 +2162,7 @@ body.dark {
2160
2162
  .pinokio-modal-body {
2161
2163
  background: var(--pinokio-modal-body-bg);
2162
2164
  color: var(--pinokio-modal-body-text-color);
2165
+ padding: 10px;
2163
2166
  }
2164
2167
 
2165
2168
  .pinokio-modal-body--history {
@@ -2287,6 +2290,7 @@ body.dark {
2287
2290
  align-items: center;
2288
2291
  gap: 8px;
2289
2292
  font-size: 0.85rem;
2293
+ border: 1px solid silver;
2290
2294
  }
2291
2295
 
2292
2296
  .pinokio-fork-checkbox-row label {
@@ -2332,10 +2336,12 @@ body.dark {
2332
2336
  font-size: 0.9rem;
2333
2337
  }
2334
2338
 
2339
+ body.dark .pinokio-fork-dropdown-remote, body.dark .pinokio-publish-dropdown-remote {
2340
+ color: rgba(255, 255, 255, 0.6);
2341
+ }
2335
2342
  .pinokio-fork-dropdown-remote,
2336
2343
  .pinokio-publish-dropdown-remote {
2337
2344
  font-size: 0.75rem;
2338
- color: rgba(255, 255, 255, 0.6);
2339
2345
  word-break: break-word;
2340
2346
  white-space: normal;
2341
2347
  overflow-wrap: anywhere;
@@ -2368,14 +2374,13 @@ body.dark {
2368
2374
  width: 100%;
2369
2375
  height: 100%;
2370
2376
  border: none;
2371
- border-radius: 18px;
2372
2377
  background: var(--pinokio-modal-body-iframe-bg);
2373
2378
  }
2374
2379
 
2375
2380
  .pinokio-modal-form {
2376
2381
  display: flex;
2377
2382
  flex-direction: column;
2378
- gap: 18px;
2383
+ gap: 10px;
2379
2384
  }
2380
2385
 
2381
2386
  .pinokio-modal-label {
@@ -2389,7 +2394,7 @@ body.dark {
2389
2394
  .pinokio-modal-input {
2390
2395
  width: 100%;
2391
2396
  padding: 10px 14px;
2392
- border-radius: 12px;
2397
+ border-radius: 5px;
2393
2398
  border: 1px solid var(--pinokio-modal-input-border);
2394
2399
  background: var(--pinokio-modal-input-bg);
2395
2400
  color: var(--pinokio-modal-input-text);
@@ -2406,7 +2411,7 @@ body.dark {
2406
2411
  .pinokio-modal-checkbox-row {
2407
2412
  display: flex;
2408
2413
  align-items: center;
2409
- gap: 10px;
2414
+ gap: 5px;
2410
2415
  font-size: 13px;
2411
2416
  color: var(--pinokio-modal-checkbox-color);
2412
2417
  }
@@ -2416,6 +2421,7 @@ body.dark {
2416
2421
  height: 16px;
2417
2422
  accent-color: #3a82ff;
2418
2423
  border-radius: 5px;
2424
+ border: 1px solid silver;
2419
2425
  }
2420
2426
 
2421
2427
  .pinokio-commit-message-container {
@@ -2961,17 +2967,9 @@ body.dark {
2961
2967
  </div>
2962
2968
  -->
2963
2969
  <div class='fs-status-dropdown'>
2964
- <button type='button' class='fs-status-btn revealer' data-group='#fs-settings-menu'>
2970
+ <a target="/env/api/<%=name%>" href="/env/api/<%=name%>" class='fs-status-btn frame-link selected' data-index="3" data-mode="refresh" data-type="n">
2965
2971
  <span class='fs-status-label'><i class='fa-solid fa-gear'></i> Settings</span>
2966
- </button>
2967
- <div class='fs-dropdown-menu submenu hidden' id='fs-settings-menu'>
2968
- <a target="/share/<%=name%>" href="/share/<%=name%>" class="fs-dropdown-item frame-link" data-index="2" data-mode="refresh" data-type="n">
2969
- <i class="fa-solid fa-wifi"></i> Share
2970
- </a>
2971
- <a target="/env/api/<%=name%>" href="/env/api/<%=name%>" class="fs-dropdown-item frame-link" data-index="3" data-mode="refresh" data-type="n">
2972
- <i class="fa-solid fa-gear"></i> Configure
2973
- </a>
2974
- </div>
2972
+ </a>
2975
2973
  </div>
2976
2974
  <div class='fs-status-dropdown git-changes'>
2977
2975
  <button id='fs-changes-btn' class='fs-status-btn revealer' data-group='#fs-changes-menu' type='button'>
@@ -6724,6 +6722,22 @@ body.dark {
6724
6722
  publishMenu.append(messageEl)
6725
6723
  }
6726
6724
 
6725
+ const reloadOnModalClose = (promise, predicate) => {
6726
+ if (!promise || typeof promise.then !== 'function') {
6727
+ return promise
6728
+ }
6729
+ promise.then((result) => {
6730
+ let shouldReload = true
6731
+ if (typeof predicate === 'function') {
6732
+ shouldReload = predicate(result)
6733
+ }
6734
+ if (shouldReload) {
6735
+ setTimeout(() => window.location.reload(), 350)
6736
+ }
6737
+ })
6738
+ return promise
6739
+ }
6740
+
6727
6741
  const renderForkDropdown = (repos, options = {}) => {
6728
6742
  if (!forkMenu) {
6729
6743
  return
@@ -7858,7 +7872,7 @@ body.dark {
7858
7872
  `
7859
7873
 
7860
7874
  const lifecycle = createPublishModalLifecycle()
7861
- Swal.fire({
7875
+ const publishModalPromise = Swal.fire({
7862
7876
  html: modalHtml,
7863
7877
  customClass: {
7864
7878
  popup: 'pinokio-modern-modal',
@@ -7874,6 +7888,8 @@ body.dark {
7874
7888
  didOpen: lifecycle.didOpen,
7875
7889
  willClose: lifecycle.willClose
7876
7890
  })
7891
+
7892
+ reloadOnModalClose(publishModalPromise)
7877
7893
  }
7878
7894
 
7879
7895
  const showCreateModal = () => {
@@ -7915,7 +7931,7 @@ body.dark {
7915
7931
  </div>
7916
7932
  `
7917
7933
 
7918
- Swal.fire({
7934
+ const remoteSelectionPromise = Swal.fire({
7919
7935
  html: modalHtml,
7920
7936
  customClass: {
7921
7937
  popup: 'pinokio-modern-modal',
@@ -7944,7 +7960,11 @@ body.dark {
7944
7960
 
7945
7961
  return { remote: selectedRemote, name: repoName }
7946
7962
  }
7947
- }).then((result) => {
7963
+ })
7964
+
7965
+ reloadOnModalClose(remoteSelectionPromise, (result) => !result || result.isDismissed)
7966
+
7967
+ remoteSelectionPromise.then((result) => {
7948
7968
  if (result.isConfirmed) {
7949
7969
  const { remote, name } = result.value
7950
7970
  showFinalPublishModal(pushUri, remote, name)
@@ -7960,7 +7980,7 @@ body.dark {
7960
7980
  const finalUri = `${pushUri}${pushUri.includes('?') ? '&' : '?'}${urlParams.toString()}`
7961
7981
 
7962
7982
  const lifecycle = createPublishModalLifecycle()
7963
- Swal.fire({
7983
+ const forkShellModalPromise = Swal.fire({
7964
7984
  html: `
7965
7985
  <div class="pinokio-modal-surface">
7966
7986
  <div class="pinokio-modal-header">
@@ -7992,6 +8012,8 @@ body.dark {
7992
8012
  didOpen: lifecycle.didOpen,
7993
8013
  willClose: lifecycle.willClose
7994
8014
  })
8015
+
8016
+ reloadOnModalClose(forkShellModalPromise)
7995
8017
  }
7996
8018
 
7997
8019
  const showCreateRepoModal = () => {
@@ -8019,7 +8041,7 @@ body.dark {
8019
8041
  </div>
8020
8042
  `
8021
8043
 
8022
- Swal.fire({
8044
+ const createRepoModalPromise = Swal.fire({
8023
8045
  html: modalHtml,
8024
8046
  customClass: {
8025
8047
  popup: 'pinokio-modern-modal',
@@ -8048,7 +8070,11 @@ body.dark {
8048
8070
 
8049
8071
  return { name: repoName, isPrivate: isPrivate }
8050
8072
  }
8051
- }).then((result) => {
8073
+ })
8074
+
8075
+ reloadOnModalClose(createRepoModalPromise, (result) => !result || result.isDismissed)
8076
+
8077
+ createRepoModalPromise.then((result) => {
8052
8078
  if (result.isConfirmed) {
8053
8079
  const { name, isPrivate } = result.value
8054
8080
  showCreateRepoIframeModal(name, isPrivate)
@@ -8074,7 +8100,7 @@ body.dark {
8074
8100
 
8075
8101
  const finalUri = `${createUri}${createUri.includes('?') ? '&' : '?'}${urlParams.toString()}`
8076
8102
 
8077
- Swal.fire({
8103
+ const createRepoIframePromise = Swal.fire({
8078
8104
  html: `
8079
8105
  <div class="pinokio-modal-surface">
8080
8106
  <div class="pinokio-modal-header">
@@ -8101,6 +8127,8 @@ body.dark {
8101
8127
  buttonsStyling: false,
8102
8128
  focusConfirm: false
8103
8129
  })
8130
+
8131
+ reloadOnModalClose(createRepoIframePromise)
8104
8132
  }
8105
8133
 
8106
8134
  async function showForkModalForRepo(repoParam) {
@@ -8187,7 +8215,7 @@ body.dark {
8187
8215
  </div>
8188
8216
  `
8189
8217
 
8190
- Swal.fire({
8218
+ const forkModalPromise = Swal.fire({
8191
8219
  html: modalHtml,
8192
8220
  customClass: {
8193
8221
  popup: 'pinokio-modern-modal',
@@ -8279,7 +8307,11 @@ body.dark {
8279
8307
  }
8280
8308
  }
8281
8309
  }
8282
- }).then((result) => {
8310
+ })
8311
+
8312
+ reloadOnModalClose(forkModalPromise, (result) => !result || result.isDismissed)
8313
+
8314
+ forkModalPromise.then((result) => {
8283
8315
  if (result.isConfirmed && result.value && result.value.job) {
8284
8316
  showForkShellModal(result.value.job)
8285
8317
  }
@@ -8311,7 +8343,7 @@ body.dark {
8311
8343
  subtitleParts.push(`Org: ${escapeHtml(job.org)}`)
8312
8344
  }
8313
8345
  const subtitleHtml = subtitleParts.join(' · ')
8314
- Swal.fire({
8346
+ const forkShellModalPromise = Swal.fire({
8315
8347
  html: `
8316
8348
  <div class="pinokio-modal-surface">
8317
8349
  <div class="pinokio-modal-header">
@@ -8343,7 +8375,11 @@ body.dark {
8343
8375
  focusConfirm: false,
8344
8376
  didOpen: lifecycle.didOpen,
8345
8377
  willClose: lifecycle.willClose
8346
- }).then(() => {
8378
+ })
8379
+
8380
+ reloadOnModalClose(forkShellModalPromise)
8381
+
8382
+ forkShellModalPromise.then(() => {
8347
8383
  setTimeout(() => {
8348
8384
  updateForkButton()
8349
8385
  check_git()
@@ -304,8 +304,15 @@ header h1 {
304
304
  h4 {
305
305
  margin: 0 0 5px;
306
306
  }
307
+ body.dark form.search {
308
+ background: rgba(255,255,255,0.07);
309
+ }
307
310
  form.search {
308
311
  padding: 10px;
312
+ background: #F1F1F1;
313
+ }
314
+ form.search input[type=search] {
315
+ background: white;
309
316
  }
310
317
  body.dark .btn.file-open {
311
318
  background: rgba(255,255,255,0.1) !important;
@@ -162,6 +162,7 @@ a#customize {
162
162
  }
163
163
  body {
164
164
  display: block;
165
+ padding: 10px;
165
166
  }
166
167
  .card {
167
168
  display: flex;
@@ -921,7 +921,7 @@ body.dark .pinokio-modal-subtitle code {
921
921
  .pinokio-modal-body {
922
922
  background: var(--pinokio-modal-body-bg);
923
923
  border-top: 1px solid var(--pinokio-modal-body-border);
924
- padding: 0;
924
+ padding: 10px;
925
925
  }
926
926
  .pinokio-modal-body--iframe {
927
927
  height: 520px;