diff --git a/src/pages/panel/sitekey/list.rs b/src/pages/panel/sitekey/list.rs index 85971ce6..29f6dbbe 100644 --- a/src/pages/panel/sitekey/list.rs +++ b/src/pages/panel/sitekey/list.rs @@ -1,19 +1,19 @@ /* -* Copyright (C) 2021 Aravinth Manivannan -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Affero General Public License as -* published by the Free Software Foundation, either version 3 of the -* License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU Affero General Public License for more details. -* -* You should have received a copy of the GNU Affero General Public License -* along with this program. If not, see . -*/ + * Copyright (C) 2021 Aravinth Manivannan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ use actix_identity::Identity; use actix_web::{HttpResponse, Responder}; diff --git a/templates/panel/header/taskbar/index.html b/templates/panel/header/taskbar/index.html index c7458988..e1928aa7 100644 --- a/templates/panel/header/taskbar/index.html +++ b/templates/panel/header/taskbar/index.html @@ -1,14 +1,7 @@
    -
  • - - - + <. include!("./new-sitekey-btn.html"); .>
  • -
  • + + diff --git a/templates/panel/index.html b/templates/panel/index.html index 65bd0f2e..8c90ee07 100644 --- a/templates/panel/index.html +++ b/templates/panel/index.html @@ -11,16 +11,8 @@ include!("./navbar/index.html"); .> <. include!("./help-banner/index.html"); .>
    <. if sitekeys.is_empty() { .> -
      -

      - It looks like you don't have any sitekeys. Click - here to add new - sitekey. -

      -
    - + <. include!("./sitekey/list/empty-sitekey.html"); .> <.} else {.> - @@ -53,16 +45,15 @@ include!("./navbar/index.html"); .> <. } .>
    -
    - <. let key = format!("/sitekey/{}", &sitekey.key); .> - <. include!("./sitekey/view/__edit-sitekey-icon.html"); .> -
    +
    + <. let key = format!("/sitekey/{}", &sitekey.key); .> + <. include!("./sitekey/view/__edit-sitekey-icon.html"); .> +
    - <.}.>
    <. include!("../components/footers.html"); .> diff --git a/templates/panel/sitekey/list/empty-sitekey.html b/templates/panel/sitekey/list/empty-sitekey.html new file mode 100644 index 00000000..a4625112 --- /dev/null +++ b/templates/panel/sitekey/list/empty-sitekey.html @@ -0,0 +1,6 @@ +
      +

      + It looks like you don't have any sitekeys. Click <. + include!("../../header/taskbar/new-sitekey-btn.html"); .> to add new sitekey. +

      +
    diff --git a/templates/panel/sitekey/list/index.html b/templates/panel/sitekey/list/index.html index a677a5b0..7b0a855f 100644 --- a/templates/panel/sitekey/list/index.html +++ b/templates/panel/sitekey/list/index.html @@ -12,47 +12,51 @@ include!("../../navbar/index.html"); .>
    - - - - - - - - <. for sitekey in sitekeys.iter() { .> - - - + + + + <. } .> + +
    - Your Sitekeys -
    - - <.= sitekey.name .> - - -
    - <. let clipboard_data = ("sitekey", &sitekey.key); .> - <. include!("../../../components/clipboard/index.html"); .> + <. if sitekeys.is_empty() { .> + <. include!("./empty-sitekey.html"); .> + <.} else {.> + + + + + + + + <. for sitekey in sitekeys.iter() { .> + + - - - <. } .> - -
    + Your Sitekeys +
    - <.= &sitekey.key[0..5] .> + <.= sitekey.name .> - - -
    - <. let key = format!("/sitekey/{}", &sitekey.key); .> - <. include!("../view/__edit-sitekey-icon.html"); .> -
    -
    +
    +
    + <. let clipboard_data = ("sitekey", &sitekey.key); .> + <. include!("../../../components/clipboard/index.html"); .> + + <.= &sitekey.key[0..5] .> + +
    +
    +
    + <. let key = format!("/sitekey/{}", &sitekey.key); .> + <. include!("../view/__edit-sitekey-icon.html"); .> +
    +
    + <.}.>
    <. include!("../../../components/footers.html"); .>