spina 2.17.0 → 2.18.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of spina might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0077bbb44829d71ab719fc2b7e51d625eff7a904c6d96d73fa4fb5d1b53c124
4
- data.tar.gz: 685b9ed0d11538e6118b13cf72627fe70d8a4edf76d5ff2bbe00e72386d9e55e
3
+ metadata.gz: a3f9ec18d2a07a7aedd9c210abd460a3e0098b92342087d4103a7315921692ad
4
+ data.tar.gz: fa6abb6f02ec21bbe17d8f004dffe8154e36dc762be8e8d7f9c8284e4d33e5df
5
5
  SHA512:
6
- metadata.gz: 208e7e279bd356cdb47d9a12cafc7545caa73a824f25328cd119abb1d34c11c6a667f3feb49ec85390c8e836a024ce9bcde3c6cf764f8e8112a2123bc53be34f
7
- data.tar.gz: b1eb0d8626ffc0873833ee45eec600ab7434392691c44877eac6353a3b9ebad0daf7641e0cbf4f5f84dcb66c5320c4f12cf91a74318211d4d0dc273741f87020
6
+ metadata.gz: a40c89a073e8b3355cd7b36269c1406b8a05ddd7e8d7ff6d7aa143e324daaf6b575fe673e730217eee7bc8b5219bbbd8bc3b36e64c32eb25f9c302d3cc8f1fb4
7
+ data.tar.gz: 5269cfc9d62772413beb28f28f49045ec845695308a65a72b0f000408694bce3fc3c7b4345e61cca33bce02ed17f3198c7d841410a41343eed8f162563e789fa
@@ -1,10 +1,8 @@
1
1
  module Spina::SpinaHelper
2
- def spina_importmap_tags(entry_point = "application", shim: true)
2
+ def spina_importmap_tags(entry_point = "application")
3
3
  safe_join [
4
4
  javascript_inline_importmap_tag(Spina.config.importmap.to_json(resolver: self)),
5
5
  javascript_importmap_module_preload_tags(Spina.config.importmap),
6
- (javascript_importmap_shim_nonce_configuration_tag if shim),
7
- (javascript_importmap_shim_tag if shim),
8
6
  javascript_import_module_tag(entry_point)
9
7
  ], "\n"
10
8
  end
@@ -6,7 +6,7 @@ module Spina
6
6
  # NavigationItems can be of two different kinds:
7
7
  # - A link to a page
8
8
  # - A link to a URL
9
- enum(:kind, {page: "page", url: "url"}, default: :page, suffix: true)
9
+ enum kind: {page: "page", url: "url"}, _suffix: true
10
10
 
11
11
  has_ancestry
12
12
 
@@ -13,7 +13,10 @@ module Spina
13
13
  signed_blob_id.present?
14
14
  end
15
15
 
16
- def signed_id(expires_in: nil)
16
+ # Rails 7.1 started using 'expires_at', so we
17
+ # include both expires_in and expires_at for backwards
18
+ # compatibility
19
+ def signed_id(expires_at: nil, expires_in: nil)
17
20
  signed_blob_id
18
21
  end
19
22
  end
@@ -8,7 +8,7 @@
8
8
 
9
9
  <link rel="icon" href="<%= image_url('spina/favicon.png') %>" />
10
10
 
11
- <title>Spina CMS</title>
11
+ <title><%= Spina.config.backend_title %></title>
12
12
 
13
13
  <!-- Stylesheets -->
14
14
  <%= stylesheet_link_tag "spina/tailwind", "spina/fonts", "spina/animate", "data-turbo-track": "reload" %>
@@ -8,7 +8,7 @@
8
8
  <div class="text-left truncate"><%= navigation_item.menu_title %></div>
9
9
 
10
10
  <% if navigation_item.url_kind? %>
11
- <%= link_to navigation_item.url, target: :blank, class: "h-7 flex items-center pl-1 text-gray-400 hover:text-gray-700" do %>
11
+ <%= link_to navigation_item.url, class: "h-7 flex items-center pl-1 text-gray-400 hover:text-gray-700" do %>
12
12
  <%= heroicon("external-link", style: :mini, class: "w-4 h-4") %>
13
13
  <% end %>
14
14
  <% end %>
@@ -4,7 +4,7 @@
4
4
  <% if @page.draft? %>
5
5
  <span class="text-gray-400 ml-2 text-sm">(<%= Spina::Page.human_attribute_name(:draft) %>)</span>
6
6
  <% end %>
7
- <%= link_to @page.materialized_path(locale: @locale), class: 'px-3 py-2 flex items-center text-gray-400 hover:text-gray-700', target: :blank, data: {turbo: false} do %>
7
+ <%= link_to @page.materialized_path(locale: @locale), class: 'px-3 py-2 flex items-center text-gray-400 hover:text-gray-700', data: {turbo: false} do %>
8
8
  <%= heroicon("external-link", style: :mini, class: "w-4 h-4") %>
9
9
  <% end %>
10
10
  <% end %>
@@ -1,4 +1,11 @@
1
1
  <%= render Spina::UserInterface::HeaderComponent.new do |header| %>
2
+ <% header.with_after_breadcrumbs do %>
3
+ <%= link_to "/", class: 'px-3 py-1.5 flex items-center text-gray-400 hover:text-gray-700', data: {turbo: false} do %>
4
+ <%= heroicon("external-link", style: :mini, class: "w-4 h-4") %>
5
+ <span class="text-sm ml-1"><%=t "spina.preview_website" %></span>
6
+ <% end %>
7
+ <% end %>
8
+
2
9
  <% header.with_actions do %>
3
10
  <% if @resource %>
4
11
  <%= link_to spina.edit_admin_resource_path(@resource), class: 'btn btn-default' do %>
@@ -16,7 +16,9 @@
16
16
 
17
17
  <%= render Spina::MainNavigation::LinkComponent.new t('spina.website.pages'), spina.admin_pages_path, active: controller_name.in?(%w(pages resources)) %>
18
18
 
19
- <%= render Spina::MainNavigation::LinkComponent.new t('spina.navigations.navigations'), spina.admin_navigations_path, active: controller_name == "navigations" %>
19
+ <% if Spina::Current.theme.navigations.present? %>
20
+ <%= render Spina::MainNavigation::LinkComponent.new t('spina.navigations.navigations'), spina.admin_navigations_path, active: controller_name == "navigations" %>
21
+ <% end %>
20
22
 
21
23
  <% if Spina::Current.theme.layout_parts.present? %>
22
24
  <%= render Spina::MainNavigation::LinkComponent.new t('spina.layout.layout'), spina.edit_admin_layout_path, active: controller_name == "layout" %>
@@ -281,7 +281,7 @@ nl:
281
281
  select_page: Kies pagina
282
282
  search_engines: Zoekmachines
283
283
  show_in_menu: onzichtbaar
284
- skip_to_first_child: doorsturen naar 1<sup>e</sup> subpagina
284
+ skip_to_first_child: doorsturen naar eerste subpagina
285
285
  sorting_saved: Volgorde opgeslagen
286
286
  page_translations:
287
287
  delete: Verwijder vertaling (%{translation})
@@ -4,6 +4,11 @@ Spina.configure do |config|
4
4
  # All locales your content should be available in.
5
5
  # Defaults to I18n.default_locale
6
6
  # config.locales = [:en, :nl]
7
+
8
+ # Backend title
9
+ # ===============
10
+ # Set <title> for the admin panel. Defaults to "Spina CMS"
11
+ # config.backend_title = "Spina CMS"
7
12
 
8
13
  # Backend path
9
14
  # ===============
data/lib/spina/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Spina
2
- VERSION = "2.17.0"
2
+ VERSION = "2.18.0"
3
3
  end
data/lib/spina.rb CHANGED
@@ -23,6 +23,7 @@ module Spina
23
23
  config_accessor :api_key,
24
24
  :api_path,
25
25
  :authentication,
26
+ :backend_title,
26
27
  :backend_path,
27
28
  :importmap,
28
29
  :frontend_parent_controller,
@@ -44,6 +45,7 @@ module Spina
44
45
  self.api_key = nil
45
46
  self.api_path = "api"
46
47
  self.authentication = "Spina::Authentication::Sessions"
48
+ self.backend_title = "Spina CMS"
47
49
  self.backend_path = "admin"
48
50
  self.disable_frontend_routes = false
49
51
  self.disable_decorator_load = false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spina
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.17.0
4
+ version: 2.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bram Jetten
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-06 00:00:00.000000000 Z
11
+ date: 2024-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails