alchemy_cms 8.4.6 → 8.4.7

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.
@@ -7,12 +7,14 @@ module Alchemy
7
7
  if update_check_result[:update_available]
8
8
  render json: {
9
9
  status: false,
10
+ update_available: true,
10
11
  latest_version: update_check_result[:latest_version],
11
12
  message: Alchemy.t("Update available")
12
13
  }
13
14
  else
14
15
  render json: {
15
16
  status: true,
17
+ update_available: false,
16
18
  latest_version: update_check_result[:latest_version],
17
19
  message: Alchemy.t("Alchemy is up to date")
18
20
  }
@@ -26,7 +26,7 @@ class UpdateCheck extends HTMLElement {
26
26
  }
27
27
 
28
28
  showStatus(responseJSON) {
29
- if (responseJSON["status"] == "true") {
29
+ if (responseJSON["update_available"] === true) {
30
30
  this.querySelector(".update_available").classList.remove("hidden")
31
31
  } else {
32
32
  this.querySelector(".up_to_date").classList.remove("hidden")
@@ -62,9 +62,7 @@ export class Uploader extends HTMLElement {
62
62
  event.preventDefault()
63
63
  this.#toggleDropzoneClass(false)
64
64
 
65
- const files = [...event.dataTransfer.items].map((item) => item.getAsFile())
66
-
67
- this.uploadFiles(files)
65
+ this.uploadFiles([...event.dataTransfer.files])
68
66
  }
69
67
 
70
68
  #onDropzoneDragover = (event) => {
@@ -153,9 +153,10 @@ export const dropdownMessages = {
153
153
  </div>`
154
154
  },
155
155
  // Tom Select prepends this above the results it already has, which would
156
- // shift them.
156
+ // shift them. Without results it must render, though, or Tom Select closes
157
+ // the dropdown and the typed text is lost.
157
158
  loading() {
158
- if (Object.keys(this.options).length > 0) return
159
+ if (this.dropdown_content.querySelector(".option")) return
159
160
  return `<div class="loading-results">${translate("Please wait, loading")}&hellip;</div>`
160
161
  },
161
162
  no_results() {
@@ -3,7 +3,7 @@
3
3
  module Alchemy
4
4
  extend self
5
5
 
6
- VERSION = "8.4.6"
6
+ VERSION = "8.4.7"
7
7
 
8
8
  def version
9
9
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.4.6
4
+ version: 8.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen