Skip to content

Commit 1061016

Browse files
authored
fix: add option to not show version in footer (#1522)
1 parent 4bc3b7d commit 1061016

File tree

5 files changed

+26
-1
lines changed

5 files changed

+26
-1
lines changed

Configuration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ Notes:
8686
| --------- | ------------------ | --- |
8787
| PWP__DEFAULT_LOCALE | Sets the default language for the application. See the [documentation](https://github.com/pglombardo/PasswordPusher#internationalization). | `en` |
8888
| PWP__RELATIVE_ROOT | Runs the application in a subfolder. e.g. With a value of `pwp` the front page will then be at `https://url/pwp` | `Not set` |
89+
| PWP__SHOW_VERSION | Show the version in the footer | `true` |
8990

9091
## Password Push Expiration Settings
9192

app/views/shared/_footer.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<footer class="footer mt-auto py-3">
22
<div class="container">
33
<div class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top">
4-
<p class="col-md-5 mb-0 text-muted">&copy; 2023 <%= _('Peter') %> Giacomo Lombardo, v<%= Version.current %></p>
4+
<p class="col-md-5 mb-0 text-muted">&copy; 2023 <%= _('Peter') %> Giacomo Lombardo<% if Settings.show_version %>, v<%= Version.current %><% end %></p>
55

66
<%= link_to root_path(locale: locale.to_s), class: "col-md-2 d-flex align-items-center justify-content-center mb-3 mb-md-0 me-md-auto link-dark text-decoration-none" do %>
77
<picture>

config/defaults/settings.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,17 @@ host_protocol: 'https'
138138
#
139139
# override_base_url: 'https://pwpush.mydomain.com'
140140

141+
### Show version on the footer
142+
#
143+
# Enable/disable PasswordPusher verison on the footer.
144+
#
145+
# Environment variable override:
146+
# PWP__SHOW_VERSION=true
147+
#
148+
# Default: true
149+
150+
show_version: true
151+
141152
### Allowed Hosts
142153
#
143154
# This is a list of allowed hosts for the application. This is used to

config/settings.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,17 @@ host_protocol: 'https'
138138
#
139139
# override_base_url: 'https://pwpush.mydomain.com'
140140

141+
### Show version on the footer
142+
#
143+
# Enable/disable PasswordPusher verison on the footer.
144+
#
145+
# Environment variable override:
146+
# PWP__SHOW_VERSION=true
147+
#
148+
# Default: true
149+
150+
show_version: true
151+
141152
### Allowed Hosts
142153
#
143154
# This is a list of allowed hosts for the application. This is used to

containers/examples/pwpush-and-nginx/env-file

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ export PWP__HOST_DOMAIN=localhost.dev
1515
export PWP__HOST_PROTOCOL=https
1616
export PWP__MAIL__MAILER_SENDER='"Your Name" <[email protected]>'
1717

18+
export PWP__SHOW_VERSION=false
19+
1820
export PWP__ENABLE_FILE_PUSHES=true
1921

2022
export PWP__FILES__EXPIRE_AFTER_DAYS_DEFAULT=2

0 commit comments

Comments
 (0)