fix: resolve toolbar syntax error and unused imports
Some checks failed
Build MIPS Binary / build (push) Failing after 34s
Some checks failed
Build MIPS Binary / build (push) Failing after 34s
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
use leptos::prelude::*;
|
// use leptos::prelude::*;
|
||||||
|
|
||||||
pub fn use_random_id_for(prefix: &str) -> String {
|
pub fn use_random_id_for(prefix: &str) -> String {
|
||||||
format!("{}_{}", prefix, js_sys::Math::random().to_string().replace(".", ""))
|
format!("{}_{}", prefix, js_sys::Math::random().to_string().replace(".", ""))
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use leptos::prelude::*;
|
use leptos::prelude::*;
|
||||||
use icons::{PanelLeft, Plus};
|
use icons::{PanelLeft, Plus};
|
||||||
use crate::components::torrent::add_torrent::AddTorrentDialogContent;
|
use crate::components::torrent::add_torrent::AddTorrentDialogContent;
|
||||||
use crate::components::ui::button::{ButtonVariant, ButtonSize};
|
use crate::components::ui::button::{Button, ButtonVariant, ButtonSize};
|
||||||
use crate::components::ui::sheet::{Sheet, SheetContent, SheetTrigger, SheetDirection};
|
use crate::components::ui::sheet::{Sheet, SheetContent, SheetTrigger, SheetDirection};
|
||||||
use crate::components::ui::dialog::{Dialog, DialogContent, DialogTrigger};
|
use crate::components::ui::dialog::{Dialog, DialogContent, DialogTrigger};
|
||||||
use crate::components::layout::sidebar::Sidebar;
|
use crate::components::layout::sidebar::Sidebar;
|
||||||
@@ -12,8 +12,6 @@ pub fn Toolbar(
|
|||||||
) -> impl IntoView {
|
) -> impl IntoView {
|
||||||
view! {
|
view! {
|
||||||
<div class="flex min-h-14 h-auto items-center border-b border-border bg-background px-4" style="padding-top: env(safe-area-inset-top);">
|
<div class="flex min-h-14 h-auto items-center border-b border-border bg-background px-4" style="padding-top: env(safe-area-inset-top);">
|
||||||
// Sol kısım: Menü butonu (Mobil) + Add Torrent
|
|
||||||
<div class="flex items-center gap-3">
|
|
||||||
// Sol kısım: Menü butonu (Mobil) + Add Torrent
|
// Sol kısım: Menü butonu (Mobil) + Add Torrent
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
// Desktop Toggle
|
// Desktop Toggle
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// * Reuse @table.rs
|
// * Reuse @table.rs
|
||||||
pub use crate::components::ui::table::{
|
pub use crate::components::ui::table::{
|
||||||
Table as DataTable, TableBody as DataTableBody, TableCaption as DataTableCaption, TableCell as DataTableCell,
|
Table as DataTable, TableBody as DataTableBody, TableCell as DataTableCell,
|
||||||
TableFooter as DataTableFooter, TableHead as DataTableHead, TableHeader as DataTableHeader,
|
TableHead as DataTableHead, TableHeader as DataTableHeader,
|
||||||
TableRow as DataTableRow, TableWrapper as DataTableWrapper,
|
TableRow as DataTableRow, TableWrapper as DataTableWrapper,
|
||||||
};
|
};
|
||||||
@@ -5,7 +5,7 @@ use leptos_ui::clx;
|
|||||||
use tw_merge::*;
|
use tw_merge::*;
|
||||||
|
|
||||||
use crate::components::hooks::use_random::use_random_id_for;
|
use crate::components::hooks::use_random::use_random_id_for;
|
||||||
pub use crate::components::ui::separator::Separator as DropdownMenuSeparator;
|
// pub use crate::components::ui::separator::Separator as DropdownMenuSeparator;
|
||||||
|
|
||||||
mod components {
|
mod components {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use shared::{AppEvent, GlobalStats, NotificationLevel, Torrent};
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use struct_patch::traits::Patch;
|
use struct_patch::traits::Patch;
|
||||||
use base64::{Engine as _, engine::general_purpose::URL_SAFE_NO_PAD as BASE64_URL};
|
use base64::{Engine as _, engine::general_purpose::URL_SAFE_NO_PAD as BASE64_URL};
|
||||||
use base64::{Engine as _, engine::general_purpose::STANDARD as BASE64};
|
// use base64::{Engine as _, engine::general_purpose::STANDARD as BASE64};
|
||||||
use wasm_bindgen::JsCast;
|
use wasm_bindgen::JsCast;
|
||||||
|
|
||||||
use crate::components::ui::toast::{ToastType, toast};
|
use crate::components::ui::toast::{ToastType, toast};
|
||||||
@@ -192,7 +192,7 @@ pub async fn subscribe_to_push_notifications() {
|
|||||||
let key_array = js_sys::Uint8Array::from(&decoded_key[..]);
|
let key_array = js_sys::Uint8Array::from(&decoded_key[..]);
|
||||||
|
|
||||||
// 3. Prepare Options
|
// 3. Prepare Options
|
||||||
let mut options = web_sys::PushSubscriptionOptionsInit::new();
|
let options = web_sys::PushSubscriptionOptionsInit::new();
|
||||||
options.set_user_visible_only(true);
|
options.set_user_visible_only(true);
|
||||||
options.set_application_server_key(&key_array.into());
|
options.set_application_server_key(&key_array.into());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user