env_bro 0.1.2 โ†’ 0.2.0

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.
@@ -1,151 +0,0 @@
1
- <style nonce="<%= content_security_policy_nonce %>">
2
- :root {
3
- --bg: #f6f7f9; --panel: #ffffff; --text: #1d2330; --muted: #6b7385; --border: #e1e4ea;
4
- --accent: #3b5bdb; --accent-text: #ffffff; --danger: #c92a2a; --warn-bg: #fff4e0; --warn: #9a5b00;
5
- --ok-bg: #e6f6ec; --ok: #1f7a3f; --code-bg: #f1f3f6;
6
- --added: #1f7a3f; --added-bg: #e6f6ec; --removed: #c92a2a; --removed-bg: #fdecec;
7
- --changed: #9a5b00; --changed-bg: #fff4e0;
8
- --radius: 8px;
9
- --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
10
- }
11
- @media (prefers-color-scheme: dark) {
12
- :root {
13
- --bg: #12151b; --panel: #1b1f27; --text: #e4e7ee; --muted: #8d95a7; --border: #2c323d;
14
- --accent: #6d8bff; --accent-text: #0d1020; --danger: #ff6b6b; --warn-bg: #3a2c12; --warn: #ffc566;
15
- --ok-bg: #143122; --ok: #6fdc98; --code-bg: #232833;
16
- --added: #6fdc98; --added-bg: #143122; --removed: #ff8787; --removed-bg: #3a1a1a;
17
- --changed: #ffc566; --changed-bg: #3a2c12;
18
- }
19
- }
20
- * { box-sizing: border-box; }
21
- body { margin: 0; background: var(--bg); color: var(--text);
22
- font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
23
- a { color: var(--accent); text-decoration: none; }
24
- a:hover { text-decoration: underline; }
25
- h1 { font-size: 1.5rem; margin: 0 0 4px; }
26
- h2 { font-size: 1.1rem; margin: 0 0 12px; }
27
- p { margin: 0 0 12px; }
28
- code, .mono { font-family: var(--mono); font-size: .9em; }
29
- .wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
30
- main.wrap { padding-top: 24px; padding-bottom: 64px; }
31
-
32
- .topbar { background: var(--panel); border-bottom: 1px solid var(--border); }
33
- .topbar-inner { display: flex; align-items: center; gap: 24px; height: 56px; }
34
- .brand { font-weight: 700; color: var(--text); font-size: 1.05rem; }
35
- .brand:hover { text-decoration: none; }
36
- .nav { display: flex; gap: 16px; flex: 1; }
37
- .nav a { color: var(--muted); }
38
- .nav a:hover { color: var(--text); text-decoration: none; }
39
-
40
- .page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
41
- .muted { color: var(--muted); }
42
- .small { font-size: .85rem; }
43
-
44
- .panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
45
- .split { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
46
- @media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
47
-
48
-
49
- .btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 6px;
50
- border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; font-size: .9rem;
51
- cursor: pointer; line-height: 1.2; }
52
- .btn:hover { text-decoration: none; border-color: var(--muted); }
53
- .btn-primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
54
- .btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }
55
- .btn-small { padding: 3px 8px; font-size: .8rem; }
56
- .btn-link { background: none; border: none; color: var(--accent); padding: 0; cursor: pointer; font: inherit; font-size: .85rem; }
57
- .btn-danger { color: var(--danger); }
58
- .btn[disabled] { opacity: .5; cursor: not-allowed; }
59
-
60
- label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 4px; }
61
- input[type=text], input[type=search], select, textarea {
62
- width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px;
63
- background: var(--bg); color: var(--text); font: inherit; }
64
- textarea { font-family: var(--mono); font-size: .85rem; min-height: 38px; resize: vertical; }
65
- input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
66
- input[type=file] { font: inherit; font-size: .9rem; }
67
- .field { margin-bottom: 16px; }
68
- .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; font-weight: normal; }
69
-
70
- .alert { padding: 12px 14px; border-radius: 6px; margin-bottom: 16px; font-size: .9rem; }
71
- .alert-error { background: var(--removed-bg); color: var(--removed); }
72
- .alert-warn { background: var(--warn-bg); color: var(--warn); }
73
- .alert-ok { background: var(--ok-bg); color: var(--ok); }
74
-
75
- table { width: 100%; border-collapse: collapse; font-size: .9rem; }
76
- th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
77
- th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
78
- tr:last-child td { border-bottom: none; }
79
- td.key { font-family: var(--mono); font-size: .85rem; overflow-wrap: anywhere; min-width: 180px; }
80
- td.nowrap, th.nowrap { white-space: nowrap; }
81
- .row-added td.key { color: var(--added); }
82
- .row-removed td.key { color: var(--removed); }
83
- .row-changed td.key { color: var(--changed); }
84
- .row-unchanged { color: var(--muted); }
85
-
86
- .badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
87
- .badge-added { background: var(--added-bg); color: var(--added); }
88
- .badge-removed { background: var(--removed-bg); color: var(--removed); }
89
- .badge-changed { background: var(--changed-bg); color: var(--changed); }
90
- .badge-unchanged, .badge-neutral { background: var(--code-bg); color: var(--muted); }
91
- .badge-ok { background: var(--ok-bg); color: var(--ok); }
92
- .badge-danger { background: var(--removed-bg); color: var(--removed); }
93
-
94
- .mask { letter-spacing: 2px; color: var(--muted); }
95
- code.value { display: inline-block; background: var(--code-bg); padding: 2px 6px; border-radius: 4px;
96
- white-space: pre-wrap; word-break: break-all; max-width: 100%; }
97
-
98
- .panel-flush { padding: 0; overflow: hidden; }
99
- .panel-pad { padding: 16px 20px 0; }
100
- .filter { max-width: 240px; padding: 6px 10px; font-size: .85rem; }
101
- .hidden { display: none !important; }
102
- .icon-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 6px; border-radius: 4px; }
103
- .icon-btn:hover { color: var(--danger); background: var(--removed-bg); }
104
-
105
- .newkey-row { display: grid; grid-template-columns: minmax(180px, 2fr) 3fr 32px; gap: 8px; margin-bottom: 8px; align-items: start; }
106
- @media (max-width: 640px) { .newkey-row { grid-template-columns: 1fr 32px; } .newkey-row textarea { grid-column: 1; } }
107
-
108
- /* Existing keys, laid out like the YAML file. */
109
- .yaml { font-family: var(--mono); font-size: .875rem; border-top: 1px solid var(--border); margin-top: 16px; }
110
- .yaml-line { display: grid; grid-template-columns: minmax(200px, 38%) 1fr auto; gap: 12px; align-items: center;
111
- padding: 4px 20px; border-left: 3px solid transparent; }
112
- .yaml-line:hover { background: var(--code-bg); }
113
- .yaml-group { padding-top: 10px; padding-bottom: 2px; }
114
- .yaml-group:hover { background: none; }
115
- .yaml-group .yaml-key { color: var(--muted); font-weight: 600; }
116
- .yaml-key { font-weight: normal; font-size: inherit; margin: 0; overflow-wrap: anywhere; cursor: text; }
117
- .depth-1 { padding-left: 20px; } .depth-2 { padding-left: 40px; } .depth-3 { padding-left: 60px; }
118
- .depth-4 { padding-left: 80px; } .depth-5 { padding-left: 100px; } .depth-6 { padding-left: 120px; }
119
- .yaml-line textarea, .newkey-row textarea { resize: none; overflow: hidden; }
120
- .yaml-line textarea { min-height: 32px; padding: 5px 10px; background: transparent; border-color: transparent; }
121
- .yaml-line:hover textarea, .yaml-line textarea:focus { background: var(--bg); border-color: var(--border); }
122
- .yaml-line textarea::placeholder { color: var(--muted); letter-spacing: 1px; }
123
- .yaml-line.is-changed { border-left-color: var(--changed); background: var(--changed-bg); }
124
- .yaml-line.is-changed .yaml-key { color: var(--changed); }
125
- .yaml-line.is-changed textarea { background: var(--bg); border-color: var(--border); }
126
- .yaml-line.is-removed { border-left-color: var(--removed); background: var(--removed-bg); }
127
- .yaml-line.is-removed .yaml-key { color: var(--removed); text-decoration: line-through; }
128
- .yaml-line.is-removed textarea { visibility: hidden; }
129
- .remove-toggle { display: flex; align-items: center; gap: 4px; margin: 0; font: inherit; font-size: .8rem; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
130
- font-weight: normal; color: var(--muted); cursor: pointer; white-space: nowrap; }
131
- .yaml-line.is-removed .remove-toggle { color: var(--removed); }
132
- .yaml .empty { font-family: inherit; }
133
-
134
- .submitbar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 16px;
135
- background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 20px; margin-bottom: 16px;
136
- box-shadow: 0 -4px 16px rgba(0, 0, 0, .08); }
137
- .submitbar [data-summary].has-changes { color: var(--text); font-weight: 600; }
138
-
139
- .steps { margin: 0; padding-left: 20px; font-size: .9rem; }
140
- .steps li { margin-bottom: 6px; overflow-wrap: anywhere; }
141
- .meta { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: .9rem; margin: 0; }
142
- .meta dt { color: var(--muted); }
143
- .meta dd { margin: 0; }
144
- .summary { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
145
- .empty { text-align: center; padding: 32px; color: var(--muted); }
146
- .toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
147
- .toolbar h2 { margin: 0; }
148
- .mt-12 { margin-top: 12px; }
149
- .mt-16 { margin-top: 16px; margin-bottom: 0; }
150
- details summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
151
- </style>
@@ -1,38 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1">
6
- <meta name="robots" content="noindex, nofollow">
7
- <title><%= content_for?(:title) ? "#{yield(:title)} ยท EnvBro" : "EnvBro" %></title>
8
- <%= csrf_meta_tags %>
9
- <%= csp_meta_tag %>
10
- <%= render "env_bro/shared/styles" %>
11
- </head>
12
- <body>
13
- <header class="topbar">
14
- <div class="wrap topbar-inner">
15
- <%= link_to root_path, class: "brand" do %>
16
- <span class="brand-mark">๐Ÿ”</span> EnvBro
17
- <% end %>
18
- <span class="badge badge-neutral"><%= @environment.name %></span>
19
- <nav class="nav">
20
- <% if env_bro_can?(:propose) %><%= link_to "Propose", new_proposal_path %><% end %>
21
- <% if env_bro_can?(:review) %>
22
- <%= link_to "Review", new_review_path %>
23
- <%= link_to "Audit log", audit_path %>
24
- <% end %>
25
- </nav>
26
- <% if env_bro_user %>
27
- <span class="whoami muted small"><%= EnvBro.config.user_label.call(env_bro_user) %></span>
28
- <% end %>
29
- </div>
30
- </header>
31
-
32
- <main class="wrap">
33
- <%= yield %>
34
- </main>
35
-
36
- <%= render "env_bro/shared/script" %>
37
- </body>
38
- </html>