Getting ready for 1.2.0 release: many smaller requests implemented
- Implements #7 - Implements #42 and therefore #64 - Improved #53 - Implements #59 - Implements #61 - Implements #63 - Implements #80 - Implements #84 - Added Info page - Removed Help page - Bumped version number to 1.2.0 - Fixed a bug where wide mode was still 720px wide - Created FUNDING.yml - Reorganised arguments in README.MD and documented new options - Updated SECURITY.MD - Added display of last read time and read count - Increased default width to 800px to make UI less cluttered - Reorganised index page - New, better attach file button I want to spend some time testing these changes and let everyone have a look at them before tagging and releasing new artifacts.
This commit is contained in:
parent
769901c895
commit
44b55ae08e
22 changed files with 977 additions and 327 deletions
18
src/main.rs
18
src/main.rs
|
@ -2,7 +2,7 @@ extern crate core;
|
|||
|
||||
use crate::args::ARGS;
|
||||
use crate::endpoints::{
|
||||
create, edit, errors, help, pasta as pasta_endpoint, pastalist, remove, static_resources,
|
||||
create, edit, errors, info, pasta as pasta_endpoint, pastalist, qr, remove, static_resources,
|
||||
};
|
||||
use crate::pasta::Pasta;
|
||||
use crate::util::dbio;
|
||||
|
@ -31,9 +31,10 @@ pub mod endpoints {
|
|||
pub mod create;
|
||||
pub mod edit;
|
||||
pub mod errors;
|
||||
pub mod help;
|
||||
pub mod info;
|
||||
pub mod pasta;
|
||||
pub mod pastalist;
|
||||
pub mod qr;
|
||||
pub mod remove;
|
||||
pub mod static_resources;
|
||||
}
|
||||
|
@ -66,8 +67,14 @@ async fn main() -> std::io::Result<()> {
|
|||
match fs::create_dir_all("./pasta_data/public") {
|
||||
Ok(dir) => dir,
|
||||
Err(error) => {
|
||||
log::error!("Couldn't create data directory ./pasta_data/public/: {:?}", error);
|
||||
panic!("Couldn't create data directory ./pasta_data/public/: {:?}", error);
|
||||
log::error!(
|
||||
"Couldn't create data directory ./pasta_data/public/: {:?}",
|
||||
error
|
||||
);
|
||||
panic!(
|
||||
"Couldn't create data directory ./pasta_data/public/: {:?}",
|
||||
error
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -80,13 +87,14 @@ async fn main() -> std::io::Result<()> {
|
|||
.app_data(data.clone())
|
||||
.wrap(middleware::NormalizePath::trim())
|
||||
.service(create::index)
|
||||
.service(help::help)
|
||||
.service(info::info)
|
||||
.service(pasta_endpoint::getpasta)
|
||||
.service(pasta_endpoint::getrawpasta)
|
||||
.service(pasta_endpoint::redirecturl)
|
||||
.service(edit::get_edit)
|
||||
.service(edit::post_edit)
|
||||
.service(static_resources::static_resources)
|
||||
.service(qr::getqr)
|
||||
.service(actix_files::Files::new("/file", "./pasta_data/public/"))
|
||||
.service(web::resource("/upload").route(web::post().to(create::create)))
|
||||
.default_service(web::route().to(errors::not_found))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue