Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Commit

Permalink
new feature: show version info after logging in
Browse files Browse the repository at this point in the history
  • Loading branch information
jprjr committed Aug 12, 2018
1 parent 9db0acb commit 41167dd
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 2 deletions.
2 changes: 2 additions & 0 deletions etc/config.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,5 @@ sockexec_path: '/tmp/exec.sock'
ping: '1m'
ping_timeout: '30s'

### whether to show the version info (default: true)
show_version: true
4 changes: 4 additions & 0 deletions lib/multistreamer/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ local function loadconfig(filename)
yaml_config.ping_timeout = '30s';
end

if yaml_config.show_version == nil then
yaml_config.show_version = true
end

if yaml_config.lang_id == nil or len(yaml_config.lang_id) == 0 or langs[yaml_config.lang_id] == nil then
yaml_config.lang_id = 'en_us'
end
Expand Down
4 changes: 2 additions & 2 deletions lib/multistreamer/version.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
return {
MAJOR = 12,
MINOR = 0,
MINOR = 1,
PATCH = 0,
STRING = '12.0.0',
STRING = '12.1.0',
}
1 change: 1 addition & 0 deletions lib/multistreamer/views/index.etlua
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@
<p><%= config.lang.ssl:format(public_irc_ssl and config.lang.enabled or config.lang.disabled) %></p>
<p><a href="irc<%= public_irc_ssl and 's' or ''%>://<%=public_irc_hostname%>:<%=public_irc_port %>/,needpass">Login</a></p>

<% if config.show_version then %> <h6 class="center">Multistreamer Version <%= version.STRING %></h6> <% end %>
2 changes: 2 additions & 0 deletions lib/multistreamer/webapp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ local StreamAccount = require'multistreamer.models.stream_account'
local SharedAccount = require'multistreamer.models.shared_account'
local SharedStream = require'multistreamer.models.shared_stream'
local Webhook = require'multistreamer.models.webhook'
local version = require'multistreamer.version'

local respond_to = lapis.application.respond_to
local to_json = require('lapis.util').to_json
Expand Down Expand Up @@ -46,6 +47,7 @@ app:enable('etlua')
app.layout = require'multistreamer.views.layout'

app:before_filter(function(self)
self.version = version
self.config = config
self.networks = networks
self.user = User.read_session(self)
Expand Down
95 changes: 95 additions & 0 deletions rockspecs/multistreamer-12.1.0-0.rockspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
package = "multistreamer"
version = "12.1.0-0"

source = {
url = "https://github.com/jprjr/multistreamer/archive/12.1.0.tar.gz",
file = "multistreamer-12.1.0.tar.gz",
}

dependencies = {
"lua >= 5.1",
"lua-resty-exec",
"lua-resty-jit-uuid",
"lua-resty-http",
"lapis",
"etlua",
"luacrypto",
"luaposix",
"luafilesystem",
"lyaml",
"redis-lua",
"md5",
}

build = {
type = "none",
install = {
bin = {
["multistreamer"] = "bin/multistreamer.lua",
},
conf = {
["config.yaml"] = "etc/config.yaml.example",
},
lua = {
["multistreamer.api.v1"] = "lib/multistreamer/api/v1.lua",
["multistreamer.chat_manager"] = "lib/multistreamer/chat_manager.lua",
["multistreamer.cli"] = "lib/multistreamer/cli.lua",
["multistreamer.config"] = "lib/multistreamer/config.lua",
["multistreamer.getopt"] = "lib/multistreamer/getopt.lua",
["multistreamer.http"] = "lib/multistreamer/http.lua",
["multistreamer.migrations"] = "lib/multistreamer/migrations.lua",
["multistreamer.nginx-conf"] = "lib/multistreamer/nginx-conf.lua",
["multistreamer.process_manager"] = "lib/multistreamer/process_manager.lua",
["multistreamer.redis"] = "lib/multistreamer/redis.lua",
["multistreamer.shell"] = "lib/multistreamer/shell.lua",
["multistreamer.string"] = "lib/multistreamer/string.lua",
["multistreamer.version"] = "lib/multistreamer/version.lua",
["multistreamer.webapp"] = "lib/multistreamer/webapp.lua",
["multistreamer.irc"] = "lib/multistreamer/irc.lua",
["multistreamer.irc.client"] = "lib/multistreamer/irc/client.lua",
["multistreamer.irc.server"] = "lib/multistreamer/irc/server.lua",
["multistreamer.irc.state"] = "lib/multistreamer/irc/state.lua",
["multistreamer.models"] = "lib/multistreamer/models.lua",
["multistreamer.models.account"] = "lib/multistreamer/models/account.lua",
["multistreamer.models.keystore"] = "lib/multistreamer/models/keystore.lua",
["multistreamer.models.shared_account"] = "lib/multistreamer/models/shared_account.lua",
["multistreamer.models.shared_stream"] = "lib/multistreamer/models/shared_stream.lua",
["multistreamer.models.stream"] = "lib/multistreamer/models/stream.lua",
["multistreamer.models.stream_account"] = "lib/multistreamer/models/stream_account.lua",
["multistreamer.models.user"] = "lib/multistreamer/models/user.lua",
["multistreamer.models.webhook"] = "lib/multistreamer/models/webhook.lua",
["multistreamer.networks"] = "lib/multistreamer/networks.lua",
["multistreamer.networks.facebook"] = "lib/multistreamer/networks/facebook.lua",
["multistreamer.networks.mixer"] = "lib/multistreamer/networks/mixer.lua",
["multistreamer.networks.rtmp"] = "lib/multistreamer/networks/rtmp.lua",
["multistreamer.networks.twitch"] = "lib/multistreamer/networks/twitch.lua",
["multistreamer.networks.youtube"] = "lib/multistreamer/networks/youtube.lua",
["multistreamer.views.account"] = "lib/multistreamer/views/account.etlua",
["multistreamer.views.account-delete"] = "lib/multistreamer/views/account-delete.etlua",
["multistreamer.views.account-share"] = "lib/multistreamer/views/account-share.etlua",
["multistreamer.views.chat"] = "lib/multistreamer/views/chat.etlua",
["multistreamer.views.chat-widget-config"] = "lib/multistreamer/views/chat-widget-config.etlua",
["multistreamer.views.chatlayout"] = "lib/multistreamer/views/chatlayout.etlua",
["multistreamer.views.index"] = "lib/multistreamer/views/index.etlua",
["multistreamer.views.layout"] = "lib/multistreamer/views/layout.etlua",
["multistreamer.views.login"] = "lib/multistreamer/views/login.etlua",
["multistreamer.views.plain"] = "lib/multistreamer/views/plain.etlua",
["multistreamer.views.profile"] = "lib/multistreamer/views/profile.etlua",
["multistreamer.views.simplelayout"] = "lib/multistreamer/views/simplelayout.etlua",
["multistreamer.views.stream"] = "lib/multistreamer/views/stream.etlua",
["multistreamer.views.stream-accounts"] = "lib/multistreamer/views/stream-accounts.etlua",
["multistreamer.views.stream-advanced"] = "lib/multistreamer/views/stream-advanced.etlua",
["multistreamer.views.stream-dashboard"] = "lib/multistreamer/views/stream-dashboard.etlua",
["multistreamer.views.stream-delete"] = "lib/multistreamer/views/stream-delete.etlua",
["multistreamer.views.stream-functions"] = "lib/multistreamer/views/stream-functions.etlua",
["multistreamer.views.stream-menu"] = "lib/multistreamer/views/stream-menu.etlua",
["multistreamer.views.stream-permissions"] = "lib/multistreamer/views/stream-permissions.etlua",
["multistreamer.views.stream-webhooks"] = "lib/multistreamer/views/stream-webhooks.etlua",
["multistreamer.websocket.server"] = "lib/multistreamer/websocket/server.lua",
},
},
copy_directories = {
"share/multistreamer/html",
},
}

4 changes: 4 additions & 0 deletions share/multistreamer/html/static/css/multistreamer.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
h6.center {
text-align: center;
}

span.error {
color: red;
}
Expand Down

0 comments on commit 41167dd

Please sign in to comment.