Add dashboard

This commit is contained in:
2022-09-20 00:27:25 +01:00
parent bdfe02f776
commit e689c852e7
96 changed files with 16313 additions and 1 deletions

31
config.ru Normal file
View File

@@ -0,0 +1,31 @@
require 'dashing'
configure do
set :auth_token, 'auth_token'
set :default_dashboard, 'home'
# enable :sessions
# See http://www.sinatrarb.com/intro.html > Available Template Languages on
# how to add additional template languages.
set :template_languages, %i[html erb]
set :show_exceptions, false
helpers do
def protected!
# if session.include?('auth_token') && authenticated?(session['auth_token'])
# return
# end
# unless authenticated?(params['token'])
# response['WWW-Authenticate'] = %(Basic realm="Restricted Area")
# throw(:halt, [401, "Not authorized\n"])
# end
# session['auth_token'] = params['token']
end
end
end
map Sinatra::Application.assets_prefix do
run Sinatra::Application.sprockets
end
run Sinatra::Application