mirror of
https://github.com/neocities/neocities.git
synced 2025-07-25 03:48:22 +02:00
initial browsing page
This commit is contained in:
parent
b057ecc7a1
commit
d0a359283e
4 changed files with 21 additions and 8 deletions
9
app.rb
9
app.rb
|
@ -34,6 +34,11 @@ get '/?' do
|
|||
slim :index
|
||||
end
|
||||
|
||||
get '/browse' do
|
||||
@sites = Site.order(:id.desc).filter(initial_index_changed: true).all
|
||||
slim :browse
|
||||
end
|
||||
|
||||
get '/new' do
|
||||
dashboard_if_signed_in
|
||||
@site = Site.new
|
||||
|
@ -145,6 +150,8 @@ post '/site_files/upload' do
|
|||
|
||||
Backburner.enqueue(ScreenshotJob, current_site.username) if sanitized_filename =~ /index\.html/
|
||||
|
||||
current_site.update initial_index_changed: true if current_site.initial_index_changed == false
|
||||
|
||||
flash[:success] = "Successfully uploaded file #{sanitized_filename}."
|
||||
redirect '/dashboard'
|
||||
end
|
||||
|
@ -205,6 +212,8 @@ post '/site_files/save/:filename' do |filename|
|
|||
|
||||
Backburner.enqueue(ScreenshotJob, current_site.username) if sanitized_filename =~ /index\.html/
|
||||
|
||||
current_site.update initial_index_changed: true if current_site.initial_index_changed == false
|
||||
|
||||
'ok'
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue