Skip to content

Commit

Permalink
Merge branch 'dev' into fix-icons-on-storage
Browse files Browse the repository at this point in the history
  • Loading branch information
lgmarchi authored Feb 2, 2024
2 parents 0b8eac5 + 7bb2774 commit 5689d67
Show file tree
Hide file tree
Showing 14 changed files with 2 additions and 75 deletions.
Binary file removed ui/extra/images/AU-flag.png
Binary file not shown.
Binary file removed ui/extra/images/BL-flag.png
Binary file not shown.
Binary file removed ui/extra/images/BR-flag.png
Binary file not shown.
Binary file removed ui/extra/images/DE-flag.png
Binary file not shown.
Binary file removed ui/extra/images/IN-flag.png
Binary file not shown.
Binary file removed ui/extra/images/IT-flag.png
Binary file not shown.
Binary file removed ui/extra/images/JP-flag.png
Binary file not shown.
Binary file removed ui/extra/images/MX-flag.png
Binary file not shown.
Binary file removed ui/extra/images/PT-flag.png
Binary file not shown.
Binary file removed ui/extra/images/UK-flag.png
Binary file not shown.
Binary file removed ui/extra/images/UR-flag.png
Binary file not shown.
Binary file removed ui/extra/images/USA-flag.png
Binary file not shown.
8 changes: 1 addition & 7 deletions ui/src/components/settings/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,4 @@
right: 0;
border-radius: 0;
background: rgba(0, 0, 0, 0.5);
}

.flags img {
width: 30px;
height: 25px;
margin-right: 5px;
}
}
69 changes: 1 addition & 68 deletions ui/src/components/settings/sub_pages/about.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::process::Command;

use common::get_images_dir;
use common::language::get_local_text;
use common::state::{Action, ToastNotification};
use common::{icons::outline::Shape as Icon, state::State};
Expand All @@ -9,8 +8,6 @@ use dioxus_desktop::use_window;
use futures::StreamExt;
use kit::elements::{button::Button, Appearance};

use tracing::log;

use crate::get_download_modal;
use crate::utils::auto_updater::{DownloadProgress, DownloadState, SoftwareDownloadCmd};
use crate::{
Expand Down Expand Up @@ -80,27 +77,6 @@ pub fn AboutPage(cx: Scope) -> Element {
let stage = download_state.read().stage;
let pending_key = format!("btn-pending{}", download_state.read().progress);

let image_path_flag_AU = get_flag_image_path("AU");
let image_path_flag_USA = get_flag_image_path("USA");
let image_path_flag_MX = get_flag_image_path("MX");
let image_path_flag_DE = get_flag_image_path("DE");
let image_path_flag_PT = get_flag_image_path("PT");
let image_path_flag_BR = get_flag_image_path("BR");
let image_path_flag_IT = get_flag_image_path("IT");
let image_path_flag_UR = get_flag_image_path("UR");
let image_path_flag_BL = get_flag_image_path("BL");
let image_path_flag_JP = get_flag_image_path("JP");
let image_path_flag_IN = get_flag_image_path("IN");

fn get_flag_image_path(flag: &str) -> String {
get_images_dir()
.unwrap_or_default()
.join(format!("{}-flag.png", flag))
.to_str()
.map(|x| x.to_string())
.unwrap_or_default()
}

let about_button = cx.render(rsx!(match opt {
None if stage == DownloadProgress::Idle => {
rsx!(Button {
Expand Down Expand Up @@ -252,50 +228,7 @@ pub fn AboutPage(cx: Scope) -> Element {
section_description: get_local_text("settings-about.team"),
div {
class: "flags",
img {
src: "{image_path_flag_USA}",
alt: "USA Flag",
},
img {
src: "{image_path_flag_MX}",
alt: "Mexico Flag",
}
img {
src: "{image_path_flag_DE}",
alt: "Germany Flag",
}
img {
src: "{image_path_flag_PT}",
alt: "Portugal Flag",
}
img {
src: "{image_path_flag_BR}",
alt: "Brazil Flag",
}
img {
src: "{image_path_flag_IT}",
alt: "Italy Flag",
}
img {
src: "{image_path_flag_UR}",
alt: "Ukraine Flag",
}
img {
src: "{image_path_flag_BL}",
alt: "Belarus Flag",
}
img {
src: "{image_path_flag_JP}",
alt: "Japan Flag",
}
img {
src: "{image_path_flag_AU}",
alt: "Australia Flag",
}
img {
src: "{image_path_flag_IN}",
alt: "Indonesia Flag",
}
"🇺🇸🇲🇽🇩🇪🇵🇹🇧🇷🇮🇹🇺🇦🇧🇾🇯🇵🇦🇺🇮🇩"
}
}
}
Expand Down

0 comments on commit 5689d67

Please sign in to comment.