administration-zero 1.0.2 → 1.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d82b34403451e2ff66cae9d8475b235f3c63f063a4781b323502054c0e73f398
4
- data.tar.gz: a09b53b077a1f327e064e28f0faeb0a875c61c9cef1227691897fd219cdaf0fd
3
+ metadata.gz: 70d7f8e45906155c94abff9d0806c85fdf9c22ad45179a3cc96bf117bbc4aa53
4
+ data.tar.gz: b3ffdb6e02eb904ea4198c6e30a31c1e2913d1078c6c41c7bcde2f3d0be64cd4
5
5
  SHA512:
6
- metadata.gz: 742d6bcb516e30d8a0bda81e221092271277422fee9bbdd67623354e20080cd147ec538a8d41c11f5e0ba3dd274e42aec3edd64076e42e60aef567cd1dce52b8
7
- data.tar.gz: 44cc0737abd7a70eed80bd4f1c9292568d9db70798b6a5e778bbedd5bf8a58624c6baa237e667e2a6f810890d7500b682e38592dba160e50006e94a56e852a5b
6
+ metadata.gz: d25cd7127b720c6f88d70c8563dfdd69d9e62a96fd693777ab0832ccdf700b0ec914fd3246c8c380f7af0813a5da0ea6c74a1a3ffea629ce267bba71759eb95d
7
+ data.tar.gz: b147a78d2bbfdfa5b4c93cea8dfa239e5d76eb2f8c788e947c1d31fc3d63c1e172c8c085684bab3a35d4c10042ca0050d572f42ae5c0dfc596f5e7540e513ccc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- administration-zero (1.0.2)
4
+ administration-zero (1.0.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module AdministrationZero
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.4"
3
3
  end
@@ -1,12 +1,12 @@
1
1
  class Admin::BaseController < ActionController::Base
2
2
  include Pagy::Backend
3
3
 
4
- before_action :set_time_zone
4
+ around_action :set_time_zone
5
5
  before_action :authenticate
6
6
 
7
7
  private
8
8
  def set_time_zone
9
- Time.zone = cookies[:time_zone]
9
+ Time.use_zone(cookies[:time_zone]) { yield }
10
10
  end
11
11
 
12
12
  def authenticate
@@ -1,21 +1,19 @@
1
- <script src="https://cdn.jsdelivr.net/npm/@tabler/core@1.0.0-beta17/dist/js/tabler.min.js"></script>
2
- <script src="https://cdn.jsdelivr.net/npm/@rails/ujs@7.0.4-2/lib/assets/compiled/rails-ujs.min.js"></script>
1
+ <script src="https://cdn.jsdelivr.net/npm/@tabler/core@1.0.0-beta19/dist/js/tabler.min.js"></script>
2
+ <script src="https://cdn.jsdelivr.net/npm/@rails/ujs@7.0.6/lib/assets/compiled/rails-ujs.min.js"></script>
3
3
 
4
- <!-- Stimulus controllers -->
4
+ <!-- Stimulus -->
5
5
  <script type="module">
6
- import { Application, Controller } from "https://cdn.jsdelivr.net/npm/stimulus@3.2.1/dist/stimulus.min.js"
6
+ import { Application, Controller } from "https://cdn.jsdelivr.net/npm/@hotwired/stimulus@3.2.1/+esm"
7
7
  window.Stimulus = Application.start()
8
8
 
9
9
  Stimulus.register("flash-message", class extends Controller {
10
- connect() {
11
- new bootstrap.Toast(this.element).show()
12
- }
10
+ connect() { new bootstrap.Toast(this.element).show() }
13
11
  })
14
12
  </script>
15
13
 
16
- <!-- Time zone cookie -->
14
+ <!-- Time zone -->
17
15
  <script type="module">
18
- import Cookies from "https://cdn.jsdelivr.net/npm/js-cookie@3.0.1/dist/js.cookie.min.mjs"
16
+ import jsCookie from "https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/+esm"
19
17
  const { timeZone } = new Intl.DateTimeFormat().resolvedOptions()
20
- Cookies.set("time_zone", timeZone, { expires: 365 })
18
+ jsCookie.set("time_zone", timeZone, { expires: 365 })
21
19
  </script>
@@ -1,5 +1,5 @@
1
1
  <!-- Tabler Core -->
2
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tabler/core@1.0.0-beta17/dist/css/tabler.min.css">
2
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tabler/core@1.0.0-beta19/dist/css/tabler.min.css">
3
3
 
4
4
  <!-- Customize tabler here -->
5
5
  <style>body {
@@ -1,3 +1,3 @@
1
1
  class Admin::Current < ActiveSupport::CurrentAttributes
2
- attribute :user; resets { Time.zone = nil }
2
+ attribute :user
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: administration-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nixon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-21 00:00:00.000000000 Z
11
+ date: 2023-07-31 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: