ultra_settings 1.1.0 → 1.1.1

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: 6740e40d7198c0cb0573b24f5e61c0f679e8fb62b0c18bee3ee79a29748bc908
4
- data.tar.gz: d35bb1603d4acfedcf32c8cc7c6063e0deeabb47e825d646ff104568a30de898
3
+ metadata.gz: 03ea6a74f391d7955bf6091ed6573e306d49120a01652740fb3c279297bac1c1
4
+ data.tar.gz: bda3d1a00eee06b8e2d306862134010461c3703a841d44cfcc0df782a9174e7a
5
5
  SHA512:
6
- metadata.gz: 4f4e91264bd4466d0509f813a8b33391a15645ec939395055c353b1d0e162a6de0c89ea78f84139bdffeae3b61033652b58cb373d7cde47b4ee559923e2fe8a5
7
- data.tar.gz: 341535915553d7d4d906c79850c4d42630c115ed030fae69b2e851042b999a654982ec7416a120195e65c0b436587b75e330259d675308facea3dedc5db59b98
6
+ metadata.gz: 7adbf8dce11f66cee346f74bf74a58730c509163bc4cc5dddb574d73fb8668b29639d3af5a20c3a1612208fa209161b56cfee99231ad909fbb68e6b52d1e9c05
7
+ data.tar.gz: 8d5b5e32d41b9a9b9aa79729e7b2f5e04ea8a00b4a5e65961ba4a4470d084d495fbb6f97e1862d2772ed75c58d33af2637488a283a2c52ac0d02b6453ef5cf41
data/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 1.1.1
8
+
9
+ ### Added
10
+
11
+ - Support for deep linking to a specific configuration section in the web UI. This is done by adding a query fragment to the URL matching the configuration name.
12
+
13
+ ### Changed
14
+
15
+ - Changed the title on the Web UI to "Application Configuration" to better match the semantics of configuration objects.
16
+
7
17
  ## 1.1.0
8
18
 
9
19
  ### Added
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.1
data/app/application.js CHANGED
@@ -3,10 +3,12 @@ document.addEventListener("DOMContentLoaded", () => {
3
3
 
4
4
  showCurrentConfiguration = () => {
5
5
  const selectedId = menu.options[menu.selectedIndex].value;
6
+ const hash = selectedId.replace(/^config-/, "");
6
7
 
7
8
  document.querySelectorAll(".ultra-settings-configuration").forEach((configuration) => {
8
9
  if (configuration.id === selectedId) {
9
10
  configuration.style.display = "block";
11
+ window.location.hash = hash;
10
12
  } else {
11
13
  configuration.style.display = "none";
12
14
  }
@@ -15,5 +17,25 @@ document.addEventListener("DOMContentLoaded", () => {
15
17
 
16
18
  menu.addEventListener("change", showCurrentConfiguration);
17
19
 
20
+ const setCurrentSelection = () => {
21
+ const hash = window.location.hash.replace(/^#/, "");
22
+ const selectedId = `config-${hash}`;
23
+ for (const option of menu.options) {
24
+ if (option.value === selectedId) {
25
+ option.selected = true;
26
+ break;
27
+ }
28
+ }
29
+
30
+ showCurrentConfiguration();
31
+ }
32
+
33
+ window.addEventListener('hashchange', setCurrentSelection);
34
+
35
+
36
+ if (window.location.hash) {
37
+ setCurrentSelection()
38
+ }
39
+
18
40
  showCurrentConfiguration();
19
41
  });
data/app/layout.html.erb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <html>
4
4
  <head>
5
- <title>Application Settings</title>
5
+ <title>Application Configuration</title>
6
6
  <meta charset="utf-8">
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1">
8
8
  <style type="text/css">
@@ -12,7 +12,7 @@
12
12
  </head>
13
13
  <body>
14
14
  <header>
15
- <h1>Application Settings</h1>
15
+ <h1>Application Configuration</h1>
16
16
  </header>
17
17
  <main>
18
18
  <%= content %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultra_settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Durand
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-04 00:00:00.000000000 Z
11
+ date: 2024-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler