Skip to content

Commit

Permalink
fix things
Browse files Browse the repository at this point in the history
  • Loading branch information
Atsukoro1 committed Aug 21, 2024
1 parent bebad8e commit 5a72bb8
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 11 deletions.
Binary file modified bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"@tanstack/solid-form": "0.28.0",
"@tanstack/zod-form-adapter": "0.28.0",
"@tauri-apps/api": "2.0.0-rc.0",
"@tauri-apps/plugin-os": "github:tauri-apps/tauri-plugin-os#v2",
"@tauri-apps/plugin-shell": "github:tauri-apps/tauri-plugin-shell#v2",
"@tauri-apps/plugin-os": "2.0.0-rc.0",
"@tauri-apps/plugin-shell": "2.0.0-rc.0",
"@uiw/codemirror-theme-material": "4.23.0",
"@unocss/reset": "0.61.5",
"apexcharts": "3.51.0",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/commands/company.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ pub async fn create_company(

let password_hash = match data.new_password {
Some(password) => Some(
hash(password, DEFAULT_COST).map_err(|e| QueryError::PasswordHashing(e.to_string()))?,
hash(password, DEFAULT_COST).map_err(|e| CoreError::PasswordHashingError(e.to_string())).unwrap(),
),
None => None,
};
Expand Down
6 changes: 3 additions & 3 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use window_ext::{ToolbarThickness, WindowExt};
use window_vibrancy::NSVisualEffectMaterial;

#[cfg(target_os = "windows")]
use window_vibrancy::apply_acrylic;
use window_vibrancy::apply_blur;
#[cfg(target_os = "macos")]
use window_vibrancy::apply_vibrancy;

Expand Down Expand Up @@ -85,8 +85,8 @@ async fn main() {
.expect("Unsupported platform! 'apply_vibrancy' is only supported on macOS");

#[cfg(target_os = "windows")]
apply_acrylic(&window)
.expect("Unsupported platform! 'apply_acrylic' is only supported on Windows");
apply_blur(&window, None)
.expect("Unsupported platform! 'apply blur' is only supported on Windows");

Ok(())
})
Expand Down
7 changes: 6 additions & 1 deletion src/screens/Dashboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ const Dashboard: ParentComponent = (props) => {
const [company] = createResource(state.companyId, fetchCompany);

return (
<div class="flex flex-row items-start w-screen">
<div class="flex flex-row items-start w-screen"
classList={{
"dark:bg-neutral-800/70 bg-neutral-100/70": state.platform === "windows",
}
}
>
<Suspense fallback={<LoadingIcon />}>
<Show when={company()}>
<Sidebar />
Expand Down
6 changes: 5 additions & 1 deletion src/screens/Login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ const Login: Component = () => {
};

return (
<div class="w-screen h-screen flex flex-col justify-center items-center" data-tauri-drag-region>
<div class="w-screen h-screen flex flex-col justify-center items-center" data-tauri-drag-region
classList={{
"dark:bg-neutral-900/40 bg-neutral-100/20": stateService.state.platform === "windows",
}}
>
<div class="w-96 bg-primary rounded-lg shadow-xl flex flex-col items-center justify-between p-6 gap-4">
<h2 class="text-2xl font-bold text-primary">{t("pages.login.manageAccounts")}</h2>
<p class="text-sm text-secondary -mt-2">{t("pages.login.switchAccountsDescription")}</p>
Expand Down
10 changes: 7 additions & 3 deletions src/screens/Setup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const SetupWizard: Component = () => {
const [t] = useI18n();
const [currentStep, setCurrentStep] = createSignal(Number(params.step) || 0);
const navigate = useNavigate();
const updateState = useSelector((state) => state.stateService.updateState);
const stateService = useSelector((state) => state.stateService);

const templates = [
{ id: 1, name: t("setup.step2.template.basic"), icon: "📄" },
Expand Down Expand Up @@ -56,7 +56,7 @@ const SetupWizard: Component = () => {
try {
const result = await createCompany(userData.value);

updateState({ companyId: result });
stateService.updateState({ companyId: result });
toast.success(t("setup.company_created"));
navigate("/");
} catch (error) {
Expand All @@ -78,7 +78,11 @@ const SetupWizard: Component = () => {
};

return (
<div class="flex justify-center items-end w-screen h-screen px-3 pt-37px pb-3" data-tauri-drag-region>
<div class="flex justify-center items-end w-screen h-screen px-3 pt-37px pb-3" data-tauri-drag-region
classList={{
"dark:bg-neutral-900/40 bg-neutral-100/20": stateService.state.platform === "windows",
}}
>
<div class="absolute top-0 left-0 w-full bg-transparent h-37px z-30 " data-tauri-drag-region>
<Show when={!params.step}>
<ProgressDots count={3} active={currentStep()} />
Expand Down

0 comments on commit 5a72bb8

Please sign in to comment.