plain.admin 0.29.1__py3-none-any.whl → 0.30.0__py3-none-any.whl

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.
@@ -6,136 +6,138 @@ We shouldn't use many custom classes in here (like .btn) because the user
6
6
  could unintentionally overwrite those since our CSS is combined.
7
7
  */
8
8
  table {
9
- width: 100%;
10
- font-size: .875rem;
11
- line-height: 1.25rem;
12
- table-layout: auto;
9
+ width: 100%;
10
+ font-size: .875rem;
11
+ line-height: 1.25rem;
12
+ table-layout: auto;
13
13
  }
14
14
 
15
15
  th {
16
- text-align: left;
17
- padding: 0.5rem 0.5rem;
16
+ text-align: left;
17
+ padding: 0.5rem 0.5rem;
18
18
  }
19
19
 
20
20
  table th a {
21
- color: rgba(255, 255, 255, 0.60);
21
+ color: rgba(255, 255, 255, 0.6);
22
22
  }
23
23
 
24
24
  table td a {
25
- color: white;
25
+ color: white;
26
26
 
27
- &:hover {
28
- text-decoration: none;
29
- }
27
+ &:hover {
28
+ text-decoration: none;
29
+ }
30
30
  }
31
31
 
32
32
  tbody tr:hover {
33
- background-color: rgb(255, 255, 255, 0.1);
33
+ background-color: rgb(255, 255, 255, 0.1);
34
34
  }
35
35
 
36
36
  td {
37
- padding: 0.5rem 0.5rem;
38
- white-space: nowrap;
39
- border-bottom: 1px solid rgb(255, 255, 255, 0.1);
37
+ padding: 0.5rem 0.5rem;
38
+ white-space: nowrap;
39
+ border-bottom: 1px solid rgb(255, 255, 255, 0.1);
40
40
  }
41
41
  tr:last-child td {
42
- border-bottom: none;
42
+ border-bottom: none;
43
43
  }
44
44
 
45
45
  table img {
46
- height: 1.2rem;
47
- border-radius: 2px;
46
+ height: 1.2rem;
47
+ border-radius: 2px;
48
48
  }
49
49
 
50
50
  main a {
51
- color: rgb(37, 99, 235);
51
+ color: rgb(37, 99, 235);
52
52
  }
53
53
 
54
54
  main a:hover {
55
- text-decoration: underline;
55
+ text-decoration: underline;
56
56
  }
57
57
 
58
58
  select {
59
- border-radius: 6px;
60
- background-color: rgba(255, 255, 255, 0.05);
61
- border: 1px solid rgba(255, 255, 255, 0.1);
62
- }
63
-
64
- .actions a, .actions button, main button {
65
- display: inline-block;
66
- padding: 8px 16px;
67
- font-size: 14px;
68
- font-weight: 500;
69
- color: #ffffff;
70
- text-align: center;
71
- text-decoration: none;
72
- background-color: #2a2826;
73
- border: 1px solid #3f3d3b;
74
- border-radius: 6px;
75
- transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
76
- cursor: pointer;
77
- flex-shrink: 0;
78
-
79
- @media (max-width: 640px) {
80
- font-size: 12px;
81
- padding: 6px 12px;
82
- }
83
-
84
- &:hover {
85
- background-color: #2a2928;
86
- border-color: #504e4c;
87
- transform: translateY(-1px);
88
- }
89
-
90
- &:active {
91
- background-color: #141312;
92
- border-color: #3f3d3b;
93
- transform: translateY(0);
94
- }
95
-
96
- &:focus {
97
- outline: 2px solid #e5e7eb;
98
- outline-offset: 2px;
99
- }
59
+ border-radius: 6px;
60
+ background-color: rgba(255, 255, 255, 0.05);
61
+ border: 1px solid rgba(255, 255, 255, 0.1);
62
+ }
63
+
64
+ .actions a,
65
+ .actions button,
66
+ main button {
67
+ display: inline-block;
68
+ padding: 8px 16px;
69
+ font-size: 14px;
70
+ font-weight: 500;
71
+ color: #ffffff;
72
+ text-align: center;
73
+ text-decoration: none;
74
+ background-color: #2a2826;
75
+ border: 1px solid #3f3d3b;
76
+ border-radius: 6px;
77
+ transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
78
+ cursor: pointer;
79
+ flex-shrink: 0;
80
+
81
+ @media (max-width: 640px) {
82
+ font-size: 12px;
83
+ padding: 6px 12px;
84
+ }
85
+
86
+ &:hover {
87
+ background-color: #2a2928;
88
+ border-color: #504e4c;
89
+ transform: translateY(-1px);
90
+ }
91
+
92
+ &:active {
93
+ background-color: #141312;
94
+ border-color: #3f3d3b;
95
+ transform: translateY(0);
96
+ }
97
+
98
+ &:focus {
99
+ outline: 2px solid #e5e7eb;
100
+ outline-offset: 2px;
101
+ }
100
102
  }
101
103
 
102
104
  main button[type="submit"] {
103
- background-color: #2563eb;
104
- border-color: #2563eb;
105
+ background-color: #2563eb;
106
+ border-color: #2563eb;
105
107
 
106
- &:hover {
107
- background-color: #1d4ed8;
108
- border-color: #1d4ed8;
109
- }
110
- &:focus {
111
- outline: 2px solid #2563eb;
112
- outline-offset: 2px;
113
- }
108
+ &:hover {
109
+ background-color: #1d4ed8;
110
+ border-color: #1d4ed8;
111
+ }
112
+ &:focus {
113
+ outline: 2px solid #2563eb;
114
+ outline-offset: 2px;
115
+ }
114
116
  }
115
117
 
116
118
  /* Cards use these? */
117
119
  section {
118
- border: rgba(255, 255, 255, 0.1) 1px solid;
119
- border-radius: 0.275rem;
120
- overflow: auto;
121
- background-color: rgba(255, 255, 255, 0.05);
122
- color: rgba(255, 255, 255, 0.8);
123
- display: flex;
124
- flex-direction: column;
120
+ border: rgba(255, 255, 255, 0.1) 1px solid;
121
+ border-radius: 0.275rem;
122
+ overflow: auto;
123
+ background-color: rgba(255, 255, 255, 0.05);
124
+ color: rgba(255, 255, 255, 0.8);
125
+ display: flex;
126
+ flex-direction: column;
125
127
  }
126
128
 
127
129
  section > header {
128
- padding: 0.5rem;
129
- /* background-color: #FFFCF0; */
130
- border-bottom: rgba(255, 255, 255, 0.05) 1px solid;
130
+ padding: 0.5rem;
131
+ /* background-color: #FFFCF0; */
132
+ border-bottom: rgba(255, 255, 255, 0.05) 1px solid;
131
133
  }
132
134
 
133
135
  section > div {
134
- padding: 0.75rem 0.5rem;
135
- flex-grow: 1;
136
- display: flex;
137
- flex-direction: column;
138
- align-items: center;
139
- justify-content: center;
140
- overflow: auto;
136
+ padding: 0.75rem 0.5rem;
137
+ flex-grow: 1;
138
+ display: flex;
139
+ flex-direction: column;
140
+ align-items: center;
141
+ justify-content: center;
142
+ overflow: auto;
141
143
  }
@@ -1,83 +1,89 @@
1
- jQuery(function($) {
2
- $("[data-toggle]").on("click", function(e) {
3
- e.preventDefault();
4
- var targets = $(this).data("toggle").split(",");
5
- $.each(targets, function(index, target) {
6
- var $target = $(target);
7
- if ($target.data("toggle-class")) {
8
- $target.toggleClass($target.data("toggle-class"));
9
- } else {
10
- $target.toggle();
11
- }
12
- });
1
+ jQuery(($) => {
2
+ $("[data-toggle]").on("click", function (e) {
3
+ e.preventDefault();
4
+ const targets = $(this).data("toggle").split(",");
5
+ $.each(targets, (index, target) => {
6
+ const $target = $(target);
7
+ if ($target.data("toggle-class")) {
8
+ $target.toggleClass($target.data("toggle-class"));
9
+ } else {
10
+ $target.toggle();
11
+ }
13
12
  });
13
+ });
14
14
 
15
- $("[data-autosubmit]").on("change", function(e) {
16
- $(this).closest("form").submit();
17
- });
15
+ $("[data-autosubmit]").on("change", function (e) {
16
+ $(this).closest("form").submit();
17
+ });
18
18
 
19
- function createDropdowns(target) {
20
- $(target).find("[data-dropdown]").each(function() {
21
- var template = this.querySelector("template");
22
- tippy(this, {
23
- content: template.innerHTML,
24
- trigger: "click",
25
- allowHTML: true,
26
- interactive: true,
27
- duration: 100,
28
- placement: "bottom-end",
29
- offset: [0, 6],
30
- arrow: false,
31
- appendTo: () => document.body,
32
- onCreate: (instance) => {
33
- instance.popper.classList.add("*:bg-white/15")
34
- instance.popper.classList.add("*:w-48")
35
- instance.popper.classList.add("*:rounded-md")
36
- instance.popper.classList.add("*:shadow-lg")
37
- instance.popper.classList.add("*:ring-1")
38
- instance.popper.classList.add("*:ring-white/20")
39
- },
40
- });
19
+ function createDropdowns(target) {
20
+ $(target)
21
+ .find("[data-dropdown]")
22
+ .each(function () {
23
+ const template = this.querySelector("template");
24
+ tippy(this, {
25
+ content: template.innerHTML,
26
+ trigger: "click",
27
+ allowHTML: true,
28
+ interactive: true,
29
+ duration: 100,
30
+ placement: "bottom-end",
31
+ offset: [0, 6],
32
+ arrow: false,
33
+ appendTo: () => document.body,
34
+ onCreate: (instance) => {
35
+ instance.popper.classList.add("*:bg-white/15");
36
+ instance.popper.classList.add("*:w-48");
37
+ instance.popper.classList.add("*:rounded-md");
38
+ instance.popper.classList.add("*:shadow-lg");
39
+ instance.popper.classList.add("*:ring-1");
40
+ instance.popper.classList.add("*:ring-white/20");
41
+ },
41
42
  });
42
- }
43
+ });
44
+ }
43
45
 
44
- function createTooltips(target) {
45
- $(target).find("[data-tooltip]").each(function() {
46
- tippy(this, {
47
- content: this.dataset.tooltip,
48
- duration: 100,
49
- });
46
+ function createTooltips(target) {
47
+ $(target)
48
+ .find("[data-tooltip]")
49
+ .each(function () {
50
+ tippy(this, {
51
+ content: this.dataset.tooltip,
52
+ duration: 100,
50
53
  });
51
- }
54
+ });
55
+ }
52
56
 
53
- function autolinkColumns(target) {
54
- $(target).find("[data-column-autolink]").each(function() {
55
- var $this = $(this);
56
- if ($this.find("a").length > 0) {
57
- // Column already has a link, so don't add another
58
- return;
59
- }
60
- var autolinkUrl = $this.data("column-autolink");
61
- if (!autolinkUrl) {
62
- // No URL, so don't add a link
63
- return;
64
- }
65
- var $link = $(document.createElement("a"));
66
- $link.attr("href", autolinkUrl);
67
- $link.addClass("flex p-2 -m-2 text-white/80 hover:no-underline");
68
- $(this).wrapInner($link);
69
- })
70
- }
57
+ function autolinkColumns(target) {
58
+ $(target)
59
+ .find("[data-column-autolink]")
60
+ .each(function () {
61
+ const $this = $(this);
62
+ if ($this.find("a").length > 0) {
63
+ // Column already has a link, so don't add another
64
+ return;
65
+ }
66
+ const autolinkUrl = $this.data("column-autolink");
67
+ if (!autolinkUrl) {
68
+ // No URL, so don't add a link
69
+ return;
70
+ }
71
+ const $link = $(document.createElement("a"));
72
+ $link.attr("href", autolinkUrl);
73
+ $link.addClass("flex p-2 -m-2 text-white/80 hover:no-underline");
74
+ $(this).wrapInner($link);
75
+ });
76
+ }
71
77
 
72
- createDropdowns(document);
73
- createTooltips(document);
74
- autolinkColumns(document);
78
+ createDropdowns(document);
79
+ createTooltips(document);
80
+ autolinkColumns(document);
75
81
 
76
- // Search uses htmx to load elements,
77
- // so we need to hook those up too.
78
- htmx.on("htmx:afterSwap", function(evt) {
79
- createDropdowns(evt.detail.target);
80
- createTooltips(evt.detail.target);
81
- autolinkColumns(evt.detail.target);
82
- });
82
+ // Search uses htmx to load elements,
83
+ // so we need to hook those up too.
84
+ htmx.on("htmx:afterSwap", (evt) => {
85
+ createDropdowns(evt.detail.target);
86
+ createTooltips(evt.detail.target);
87
+ autolinkColumns(evt.detail.target);
88
+ });
83
89
  });
@@ -1,12 +1,12 @@
1
- jQuery(function ($) {
2
- var $actionCheckbox = $("[data-action-checkbox]");
3
- var $actionPks = $('[name="action_pks"]');
4
- var $actionSelect = $('[name="action_name"]');
5
- var $actionSubmit = $('[data-actions-form] [type="submit"]');
6
- var $lastActionCheckboxChecked = null;
1
+ jQuery(($) => {
2
+ const $actionCheckbox = $("[data-action-checkbox]");
3
+ const $actionPks = $('[name="action_pks"]');
4
+ const $actionSelect = $('[name="action_name"]');
5
+ const $actionSubmit = $('[data-actions-form] [type="submit"]');
6
+ let $lastActionCheckboxChecked = null;
7
7
 
8
- $actionCheckbox.on("change", function () {
9
- var pks = [];
8
+ $actionCheckbox.on("change", () => {
9
+ const pks = [];
10
10
  $actionCheckbox.each(function () {
11
11
  if ($(this).is(":checked")) {
12
12
  pks.push($(this).attr("name"));
@@ -17,7 +17,7 @@ jQuery(function ($) {
17
17
  updateActionSubmit();
18
18
  });
19
19
 
20
- $actionSelect.on("change", function () {
20
+ $actionSelect.on("change", () => {
21
21
  updateActionSubmit();
22
22
  });
23
23
 
@@ -33,12 +33,12 @@ jQuery(function ($) {
33
33
  // Enable shift-clicking to select a range of checkboxes
34
34
  $actionCheckbox.on("click", function (e) {
35
35
  if (e.shiftKey) {
36
- var $this = $(this);
37
- var thisIndex = $actionCheckbox.index($this);
38
- var lastIndex = $actionCheckbox.index($lastActionCheckboxChecked);
39
- var minIndex = Math.min(thisIndex, lastIndex);
40
- var maxIndex = Math.max(thisIndex, lastIndex);
41
- var $checkboxes = $actionCheckbox.slice(minIndex, maxIndex + 1);
36
+ const $this = $(this);
37
+ const thisIndex = $actionCheckbox.index($this);
38
+ const lastIndex = $actionCheckbox.index($lastActionCheckboxChecked);
39
+ const minIndex = Math.min(thisIndex, lastIndex);
40
+ const maxIndex = Math.max(thisIndex, lastIndex);
41
+ const $checkboxes = $actionCheckbox.slice(minIndex, maxIndex + 1);
42
42
  $checkboxes.prop("checked", $this.is(":checked"));
43
43
  } else {
44
44
  $lastActionCheckboxChecked = $(this);
@@ -47,9 +47,10 @@ jQuery(function ($) {
47
47
 
48
48
  // Merge query params with the current url and the link url
49
49
  $("[data-merge-params]").each(function () {
50
- var currentUrl = new URL(window.location.href);
51
- var params = new URL($(this).attr("href"), window.location.href).searchParams;
52
- params.forEach(function (value, key) {
50
+ const currentUrl = new URL(window.location.href);
51
+ const params = new URL($(this).attr("href"), window.location.href)
52
+ .searchParams;
53
+ params.forEach((value, key) => {
53
54
  currentUrl.searchParams.set(key, value);
54
55
  });
55
56
  $(this).attr("href", currentUrl.toString());
@@ -1,8 +1,8 @@
1
1
  // Make this available to the JS console for the user
2
- var plainToolbar = {
2
+ const plainToolbar = {
3
3
  hide: function () {
4
4
  // Hide by inserting a style so it doesn't flash on page load
5
- var style = document.createElement("style");
5
+ const style = document.createElement("style");
6
6
  style.innerHTML = "#plaintoolbar { display: none; }";
7
7
  document.getElementsByTagName("head")[0].appendChild(style);
8
8
  this.stylesheet = style;
@@ -13,15 +13,14 @@ var plainToolbar = {
13
13
  this.stylesheet.remove();
14
14
  }
15
15
  },
16
- shouldHide: function () {
17
- var hiddenUntil = localStorage.getItem("plaintoolbar.hidden_until");
16
+ shouldHide: () => {
17
+ const hiddenUntil = localStorage.getItem("plaintoolbar.hidden_until");
18
18
  if (hiddenUntil) {
19
19
  if (Date.now() < hiddenUntil) {
20
20
  return true;
21
- } else {
22
- localStorage.removeItem("plaintoolbar.hidden_until");
23
- return false;
24
21
  }
22
+ localStorage.removeItem("plaintoolbar.hidden_until");
23
+ return false;
25
24
  }
26
25
  return false;
27
26
  },
@@ -32,33 +31,33 @@ var plainToolbar = {
32
31
  toggleExpand: function () {
33
32
  this.expanded = !this.expanded;
34
33
  document.querySelector("#plaintoolbar-details").classList.toggle("hidden");
35
- localStorage.setItem('plaintoolbar.expanded', this.expanded ? '1' : '0');
34
+ localStorage.setItem("plaintoolbar.expanded", this.expanded ? "1" : "0");
36
35
  },
37
36
  expand: function () {
38
37
  this.expanded = true;
39
38
  document.querySelector("#plaintoolbar-details").classList.remove("hidden");
40
- localStorage.setItem('plaintoolbar.expanded', '1');
39
+ localStorage.setItem("plaintoolbar.expanded", "1");
41
40
  },
42
41
  collapse: function () {
43
42
  this.expanded = false;
44
43
  document.querySelector("#plaintoolbar-details").classList.add("hidden");
45
- localStorage.setItem('plaintoolbar.expanded', '0');
44
+ localStorage.setItem("plaintoolbar.expanded", "0");
46
45
  },
47
46
  showTab: function (tabName) {
48
47
  this.expand();
49
48
 
50
- var toolbar = document.querySelector("#plaintoolbar");
51
- var tab = toolbar.querySelector("div[data-toolbar-tab=" + tabName + "]");
49
+ const toolbar = document.querySelector("#plaintoolbar");
50
+ const tab = toolbar.querySelector(`div[data-toolbar-tab=${tabName}]`);
52
51
 
53
52
  // If the tab doesn't exist for some reason, quit
54
53
  if (!tab) {
55
- console.warn("Toolbar tab " + tabName + " does not exist");
54
+ console.warn(`Toolbar tab ${tabName} does not exist`);
56
55
  return;
57
56
  }
58
57
 
59
58
  // Hide all children in the tab parent
60
- for (var i = 0; i < tab.parentNode.children.length; i++) {
61
- var child = tab.parentNode.children[i];
59
+ for (let i = 0; i < tab.parentNode.children.length; i++) {
60
+ const child = tab.parentNode.children[i];
62
61
  if (child !== tab) {
63
62
  child.style.display = "none";
64
63
  }
@@ -66,14 +65,14 @@ var plainToolbar = {
66
65
 
67
66
  tab.style.display = "block";
68
67
 
69
- toolbar.querySelectorAll("button[data-toolbar-tab]").forEach(function (tab) {
68
+ for (const tab of toolbar.querySelectorAll("button[data-toolbar-tab]")) {
70
69
  if (tab.dataset.toolbarTab === tabName) {
71
70
  tab.setAttribute("data-active", true);
72
71
  } else {
73
72
  tab.removeAttribute("data-active");
74
73
  }
75
- });
76
- localStorage.setItem('plaintoolbar.tab', tabName);
74
+ }
75
+ localStorage.setItem("plaintoolbar.tab", tabName);
77
76
  },
78
77
  };
79
78
 
@@ -82,85 +81,85 @@ if (plainToolbar.shouldHide()) {
82
81
  plainToolbar.hide();
83
82
  }
84
83
 
85
- window.addEventListener("load", function() {
84
+ window.addEventListener("load", () => {
86
85
  // Restore expanded/collapsed state
87
- var state = localStorage.getItem('plaintoolbar.expanded');
88
- if (state === '1') {
86
+ const state = localStorage.getItem("plaintoolbar.expanded");
87
+ if (state === "1") {
89
88
  plainToolbar.expand();
90
89
  // Restore last active tab
91
- var lastTab = localStorage.getItem('plaintoolbar.tab');
90
+ const lastTab = localStorage.getItem("plaintoolbar.tab");
92
91
  if (lastTab) {
93
92
  plainToolbar.showTab(lastTab);
94
93
  }
95
- } else if (state === '0') {
94
+ } else if (state === "0") {
96
95
  plainToolbar.collapse();
97
96
  }
98
- var toolbar = document.querySelector("#plaintoolbar");
97
+ const toolbar = document.querySelector("#plaintoolbar");
99
98
 
100
- toolbar.querySelectorAll("button[data-toolbar-tab]").forEach(function (tab) {
101
- tab.addEventListener("click", function () {
99
+ for (const tab of toolbar.querySelectorAll("button[data-toolbar-tab]")) {
100
+ tab.addEventListener("click", () => {
102
101
  plainToolbar.showTab(tab.dataset.toolbarTab);
103
102
  });
104
- });
103
+ }
105
104
 
106
- toolbar.querySelectorAll('[data-plaintoolbar-hide]').forEach(function(btn) {
107
- btn.addEventListener('click', function() {
105
+ for (const btn of toolbar.querySelectorAll("[data-plaintoolbar-hide]")) {
106
+ btn.addEventListener("click", () => {
108
107
  plainToolbar.hide();
109
108
  });
110
- });
109
+ }
111
110
 
112
- toolbar.querySelectorAll('[data-plaintoolbar-hideuntil]').forEach(function(btn) {
113
- btn.addEventListener('click', function() {
111
+ for (const btn of toolbar.querySelectorAll("[data-plaintoolbar-hideuntil]")) {
112
+ btn.addEventListener("click", () => {
114
113
  console.log("Hiding admin toolbar for 1 hour");
115
114
  plainToolbar.hideUntil(Date.now() + 3600000);
116
115
  });
117
- });
116
+ }
118
117
 
119
- toolbar.querySelectorAll('[data-plaintoolbar-expand]').forEach(function(btn) {
120
- btn.addEventListener('click', function() {
118
+ for (const btn of toolbar.querySelectorAll("[data-plaintoolbar-expand]")) {
119
+ btn.addEventListener("click", () => {
121
120
  plainToolbar.toggleExpand();
122
121
  });
123
- });
122
+ }
124
123
 
125
124
  // Enable manual resize of the expanded toolbar via drag handle
126
- var details = document.getElementById('plaintoolbar-details');
125
+ const details = document.getElementById("plaintoolbar-details");
127
126
  if (details) {
128
- var handle = details.querySelector('[data-resizer]');
129
- var content = handle.nextElementSibling;
130
- var isDragging = false;
131
- var startY = 0;
132
- var startHeight = 0;
127
+ const handle = details.querySelector("[data-resizer]");
128
+ const content = handle.nextElementSibling;
129
+ let isDragging = false;
130
+ let startY = 0;
131
+ let startHeight = 0;
133
132
  if (handle && content) {
134
133
  // Initial cursor
135
- handle.style.cursor = 'grab';
134
+ handle.style.cursor = "grab";
136
135
  // Start dragging
137
- handle.addEventListener('mousedown', function(e) {
136
+ handle.addEventListener("mousedown", (e) => {
138
137
  isDragging = true;
139
138
  startY = e.clientY;
140
139
  startHeight = content.offsetHeight;
141
- handle.style.cursor = 'grabbing';
140
+ handle.style.cursor = "grabbing";
142
141
  // Prevent text selection while dragging
143
- document.body.style.userSelect = 'none';
142
+ document.body.style.userSelect = "none";
144
143
  e.preventDefault();
145
144
  });
146
145
  // Handle dragging
147
- document.addEventListener('mousemove', function(e) {
146
+ document.addEventListener("mousemove", (e) => {
148
147
  if (!isDragging) return;
149
- var delta = e.clientY - startY;
148
+ const delta = e.clientY - startY;
150
149
  // Calculate new height: dragging up increases height
151
- var newHeight = startHeight - delta;
150
+ let newHeight = startHeight - delta;
152
151
  // Clamp between reasonable bounds
153
- var minHeight = 50;
154
- var maxHeight = window.innerHeight - 100;
152
+ const minHeight = 50;
153
+ const maxHeight = window.innerHeight - 100;
155
154
  newHeight = Math.max(minHeight, Math.min(maxHeight, newHeight));
156
- content.style.height = newHeight + 'px';
155
+ content.style.height = `${newHeight}px`;
157
156
  });
158
157
  // End dragging
159
- document.addEventListener('mouseup', function() {
158
+ document.addEventListener("mouseup", () => {
160
159
  if (isDragging) {
161
160
  isDragging = false;
162
- handle.style.cursor = 'grab';
163
- document.body.style.userSelect = '';
161
+ handle.style.cursor = "grab";
162
+ document.body.style.userSelect = "";
164
163
  }
165
164
  });
166
165
  }
@@ -13,11 +13,11 @@
13
13
  {% tailwind_css %}
14
14
  {% htmx_js %}
15
15
  <link href="{{ asset('admin/admin.css') }}" rel="stylesheet">
16
- <script src="{{ asset('admin/jquery-3.6.1.slim.min.js') }}"></script>
17
- <script src="{{ asset('admin/chart.js') }}" defer></script>
16
+ <script src="{{ asset('admin/vendor/jquery-3.6.1.slim.min.js') }}"></script>
17
+ <script src="{{ asset('admin/vendor/chart.js') }}" defer></script>
18
18
  <script src="{{ asset('admin/admin.js') }}" defer></script>
19
- <script src="{{ asset('admin/popper.min.js') }}" defer></script>
20
- <script src="{{ asset('admin/tippy-bundle.umd.min.js') }}" defer></script>
19
+ <script src="{{ asset('admin/vendor/popper.min.js') }}" defer></script>
20
+ <script src="{{ asset('admin/vendor/tippy-bundle.umd.min.js') }}" defer></script>
21
21
  {% block header_scripts %}{% endblock %}
22
22
  </head>
23
23
  <body class="flex min-h-screen bg-stone-950">
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plain.admin
3
- Version: 0.29.1
3
+ Version: 0.30.0
4
4
  Summary: Admin dashboard and tools for Plain.
5
5
  Author-email: Dave Gaeddert <dave.gaeddert@dropseed.dev>
6
6
  License-Expression: BSD-3-Clause
@@ -7,14 +7,14 @@ plain/admin/middleware.py,sha256=k3yP1o3CzvLiZZSoxqq-DvAZlp4sICRauaT-kD3FJKM,398
7
7
  plain/admin/templates.py,sha256=0xgMQmJEbh5U45ZlN2f15Xs42Y2A_lSS-_wdMp1BeD4,854
8
8
  plain/admin/toolbar.py,sha256=nYZOtsN4li_qFpdClk6mOwwv8ApCleCMcaGXFzAEW4Y,2782
9
9
  plain/admin/urls.py,sha256=sriMi2RCkcrkjCX3CIIP1-Qzs_zDm2pxXeOw28vc7Y4,1301
10
- plain/admin/assets/admin/admin.css,sha256=Gu6GpRymJriFitAaKh_P5Sm8ZKrX9jdw6Uflxgypff8,2786
11
- plain/admin/assets/admin/admin.js,sha256=2-o4g6EtiiF2HGZIKfnVkC8shXFjY1xFSehDlR9550s,2852
12
- plain/admin/assets/admin/chart.js,sha256=GZiCYXjL6SmyuSCGE0Df80QvOUkw6H2YD-zsVID05lo,205089
13
- plain/admin/assets/admin/jquery-3.6.1.slim.min.js,sha256=W2eb4M1jdKpuZ_-_KnDgqI9X9SwGLrXtO0dknpNPJyE,72534
14
- plain/admin/assets/admin/list.js,sha256=_DPneRvk3VSzjVzfEaxyif4vLD75sCWz7bkHYp89uL8,1826
15
- plain/admin/assets/admin/popper.min.js,sha256=SgCxkjQZdrt2puqn62YUu9hknpCBGBEAy9uhQ9PPZaI,20083
16
- plain/admin/assets/admin/tippy-bundle.umd.min.js,sha256=oVWBpeGTKMG_iBWGkQF02JnGIMFPYuFqTjUWeJY3pZ0,25668
17
- plain/admin/assets/toolbar/toolbar.js,sha256=v4gUy9YEOOPmBg7_fa80QDX_6X2Fb0mU7TzM-77ZSmg,5422
10
+ plain/admin/assets/admin/admin.css,sha256=x_8rGnClG6YNXBbXhhcE_6ETrGHO550Dsu8tFoHhsSI,2593
11
+ plain/admin/assets/admin/admin.js,sha256=g_yruWKl63v1zprP5AWJHQN9BF-WRatK67aXx-LdWjQ,2569
12
+ plain/admin/assets/admin/list.js,sha256=SDmDpSqsbbgLeAaV6V6JKbI-nG7WdjCD3MqFeO4LS_0,1835
13
+ plain/admin/assets/admin/vendor/chart.js,sha256=GZiCYXjL6SmyuSCGE0Df80QvOUkw6H2YD-zsVID05lo,205089
14
+ plain/admin/assets/admin/vendor/jquery-3.6.1.slim.min.js,sha256=W2eb4M1jdKpuZ_-_KnDgqI9X9SwGLrXtO0dknpNPJyE,72534
15
+ plain/admin/assets/admin/vendor/popper.min.js,sha256=SgCxkjQZdrt2puqn62YUu9hknpCBGBEAy9uhQ9PPZaI,20083
16
+ plain/admin/assets/admin/vendor/tippy-bundle.umd.min.js,sha256=oVWBpeGTKMG_iBWGkQF02JnGIMFPYuFqTjUWeJY3pZ0,25668
17
+ plain/admin/assets/toolbar/toolbar.js,sha256=MTO7ya8kLXQLCCIOvrud2KT79nDJ3vNeW5jH5Bz6Gh4,5349
18
18
  plain/admin/cards/__init__.py,sha256=8NfWrguyJRriJFUc3_QeGaDILhgeU3d1aXktzIuAR1E,172
19
19
  plain/admin/cards/base.py,sha256=ESYY0tX3OossyZi9ubCrLxwxUZ0Z3snZUCVmLvTIg-U,2247
20
20
  plain/admin/cards/charts.py,sha256=uUNO_uN_GVdkwYNSTx1bt1j2L-89rEyIg0vDaxP-9NE,4929
@@ -33,7 +33,7 @@ plain/admin/querystats/core.py,sha256=6_SJIxS0T_KIFcS-5mMajp074vnkEKGBv9TamVeI0V
33
33
  plain/admin/querystats/middleware.py,sha256=isMjV5X-8SP-8IQEaJMfXWarZQaQBQsI5uXV0JHKXnY,3347
34
34
  plain/admin/querystats/urls.py,sha256=H8wMpqKBnXqA8ZsdwdxTKQguNYJ0JsMRqqMunccBm2I,198
35
35
  plain/admin/querystats/views.py,sha256=cXmHZtEgRwXNN5d9HsKBe5G_VnDgSNwpwoRaEvuJ7vo,2375
36
- plain/admin/templates/admin/base.html,sha256=npIwsxHa7Gf5FYTmsXfgSor2bbYIWwTSk0-UFmnqmfE,8481
36
+ plain/admin/templates/admin/base.html,sha256=urUvdcgcZZWjevZSvkagXdcrUe5LYUeaWme7S2gckMU,8509
37
37
  plain/admin/templates/admin/delete.html,sha256=lNuU2G-BR6TH6NUmh7VcvjnEuFeI84rwwk_oO1jkUq0,431
38
38
  plain/admin/templates/admin/detail.html,sha256=AizpXs6HguFzwbk7JDbH8poJB5dM2CaVVaQ4FThAHaw,730
39
39
  plain/admin/templates/admin/index.html,sha256=b65tcZhv9QfvmjePySU7MmzUlpMECIXP8dBH-a3Eyxw,69
@@ -79,7 +79,7 @@ plain/admin/views/objects.py,sha256=eKL8A2B1ZMgTrCbTXnh6vCeju_HObxwetn_xc1vYlfY,
79
79
  plain/admin/views/registry.py,sha256=Lxib4YSQCMHb_zACnLKymJakV8jCZPWYll7J8-aV9Xw,3712
80
80
  plain/admin/views/types.py,sha256=ONMMdUoapgMoUVYgSIe-4YCdfvaVMQ4jgPWYiMo0pDk,178
81
81
  plain/admin/views/viewsets.py,sha256=dqMlQ6kLn9iqd9BwBWAZT1S271wH1FdfM5HXbOgBMEw,1655
82
- plain_admin-0.29.1.dist-info/METADATA,sha256=C-04W9fmY2BslH6UKSCOrOUglKjTXu3Vj_kMv2gSV_U,4237
83
- plain_admin-0.29.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
84
- plain_admin-0.29.1.dist-info/licenses/LICENSE,sha256=cvKM3OlqHx3ijD6e34zsSUkPvzl-ya3Dd63A6EHL94U,1500
85
- plain_admin-0.29.1.dist-info/RECORD,,
82
+ plain_admin-0.30.0.dist-info/METADATA,sha256=AmNGFjfpAsDIGFKciwDBDyw1Hraz2wX2DfXxlHfhMuA,4237
83
+ plain_admin-0.30.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
84
+ plain_admin-0.30.0.dist-info/licenses/LICENSE,sha256=cvKM3OlqHx3ijD6e34zsSUkPvzl-ya3Dd63A6EHL94U,1500
85
+ plain_admin-0.30.0.dist-info/RECORD,,
File without changes