diff --git a/Makefile.toml b/Makefile.toml index 45c1c7e..1a3eab1 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -75,9 +75,9 @@ clear = true install_crate = { rustup_component_name = "clippy", binary = "cargo-clippy", test_arg = "--help" } command = "cargo" args = ["clippy", "--all-features", "--", - "--deny", "warnings", - "--deny", "clippy::pedantic", - "--deny", "clippy::nursery", + "--warn", "warnings", + "--warn", "clippy::pedantic", + "--warn", "clippy::nursery", "--allow", "clippy::wildcard_imports", # for `use seed::{prelude::*, *};` "--allow", "clippy::future_not_send", # JS/WASM is single threaded "--allow", "clippy::used_underscore_binding", # some libraries break this rule diff --git a/README.md b/README.md index 789d0cc..306502e 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,11 @@ The target audience of this tool are small entities that need a url shortener. T So in general this is more a shared short url bookmark webpage than a shorturl service. -![Screenshot](./doc/img/pslinkscreenshot.png) +![Screenshot](./doc/img/screenshot.png) +![Screenshot](./doc/img/screenshot_edit.png) The Page comes with a basic commandline interface to setup the environment. -> This branch is under development the commands below are slightly different. To build use: `cargo make build` to use pslink use the `target/debug/pslink` file. - ## Usage ### install binary @@ -33,7 +32,10 @@ Pslink can be compiled and installed with cargo. Setup cargo as guided here: htt After that install pslink using: ```bash -$ cargo install pslink +$ cargo install cargo-make +$ cargo make build_release +# or +$ cargo make start_release ``` If that succeeds you should now be able to call pslink. @@ -43,10 +45,10 @@ If that succeeds you should now be able to call pslink. When building manually with cargo you have to have a sqlite database present or build it in offline mode. So on your first build you will most likely need to call: ```bash -SQLX_OFFLINE=1 cargo run +SQLX_OFFLINE=1 cargo make build_release # or $ export SQLX_OFFLINE=1 -$ cargo run +$ cargo make build_release ``` If pslink is built with `cargo build release --target=x86_64-unknown-linux-musl` everything is embedded and it should be portable to any 64bit linux system. diff --git a/app/src/lib.rs b/app/src/lib.rs index 0f8827a..956f036 100644 --- a/app/src/lib.rs +++ b/app/src/lib.rs @@ -96,8 +96,8 @@ pub fn get_host() -> String { } /// The pages: -/// * Home for listing of links -/// * ListUsers for listing of users +/// * `Home` for listing of links +/// * `ListUsers` for listing of users #[derive(Debug)] enum Page { Home(pages::list_links::Model), diff --git a/app/src/pages/list_users.rs b/app/src/pages/list_users.rs index 3dcb313..4450b70 100644 --- a/app/src/pages/list_users.rs +++ b/app/src/pages/list_users.rs @@ -250,8 +250,9 @@ pub fn process_user_edit_messages( model.user_edit = None; orders.send_msg(Msg::Query(UserQueryMsg::Fetch)); } - UserEditMsg::MakeAdmin(user) => update_privileges(user, orders), - UserEditMsg::MakeRegular(user) => update_privileges(user, orders), + UserEditMsg::MakeAdmin(user) | UserEditMsg::MakeRegular(user) => { + update_privileges(user, orders) + } } } diff --git a/doc/img/pslinkscreenshot.png b/doc/img/pslinkscreenshot.png deleted file mode 100644 index f9080bb..0000000 Binary files a/doc/img/pslinkscreenshot.png and /dev/null differ diff --git a/doc/img/screenshot.png b/doc/img/screenshot.png new file mode 100644 index 0000000..287fc7c Binary files /dev/null and b/doc/img/screenshot.png differ diff --git a/doc/img/screenshot_edit.png b/doc/img/screenshot_edit.png new file mode 100644 index 0000000..4cf2700 Binary files /dev/null and b/doc/img/screenshot_edit.png differ diff --git a/pslink/src/bin/pslink/cli.rs b/pslink/src/bin/pslink/cli.rs index bb1f3fd..6e8a83f 100644 --- a/pslink/src/bin/pslink/cli.rs +++ b/pslink/src/bin/pslink/cli.rs @@ -210,7 +210,7 @@ async fn parse_args_to_config(config: ArgMatches<'_>) -> ServerConfig { /// /// # Panics /// This funcion panics if preconditions like the availability of the database are not met. -pub(crate) async fn setup() -> Result, ServerError> { +pub async fn setup() -> Result, ServerError> { // load the environment .env file if available. dotenv().ok(); diff --git a/shared/src/apirequests/links.rs b/shared/src/apirequests/links.rs index 6c6f2b1..acbacc0 100644 --- a/shared/src/apirequests/links.rs +++ b/shared/src/apirequests/links.rs @@ -53,7 +53,7 @@ impl From for LinkDelta { } impl From for LinkDelta { - /// Automatically create a `LinkDelta` from a FullLink. + /// Automatically create a `LinkDelta` from a `FullLink`. fn from(l: FullLink) -> Self { Self { edit: EditMode::Edit,