Skip to content

Commit

Permalink
small fixes and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
reyamir committed Sep 29, 2023
1 parent 700f3eb commit 09b3eed
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 52 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "lume",
"description": "the communication app",
"private": true,
"version": "1.2.5",
"version": "1.2.6",
"scripts": {
"dev": "vite",
"build": "vite build",
Expand Down
Binary file removed public/wallpapers/1.png
Binary file not shown.
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lume"
version = "1.2.5"
version = "1.2.6"
description = "the communication app"
authors = ["Ren Amamiya"]
license = "GPL-3.0"
Expand All @@ -11,12 +11,13 @@ rust-version = "1.66"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[build-dependencies]
tauri-build = { version = "1.4", features = [] }
tauri-build = { version = "1.4.1", features = [] }

[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.4", features = [ "macos-private-api",
tauri = { version = "1.5", features = [
"macos-private-api",
"window-close",
"window-print",
"window-create",
Expand Down
2 changes: 0 additions & 2 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ fn main() {
apply_vibrancy(&window, NSVisualEffectMaterial::HudWindow, None, None)
.expect("Unsupported platform! 'apply_vibrancy' is only supported on macOS");

#[cfg(target_os = "macos")]
window.set_transparent_titlebar(true);
#[cfg(target_os = "macos")]
window.position_traffic_lights(16.0, 25.0);

Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"package": {
"productName": "Lume",
"version": "1.2.5"
"version": "1.2.6"
},
"tauri": {
"allowlist": {
Expand Down
4 changes: 2 additions & 2 deletions src-tauri/tauri.linux.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"tauri": {
"windows": [
{
"width": 400,
"height": 500,
"width": 300,
"height": 300,
"decorations": false,
"title": "Lume",
"center": true,
Expand Down
6 changes: 3 additions & 3 deletions src-tauri/tauri.macos.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"macOSPrivateApi": true,
"windows": [
{
"width": 400,
"height": 500,
"decorations": true,
"width": 300,
"height": 300,
"decorations": false,
"title": "Lume",
"titleBarStyle": "Overlay",
"hiddenTitle": true,
Expand Down
4 changes: 2 additions & 2 deletions src-tauri/tauri.windows.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"tauri": {
"windows": [
{
"width": 400,
"height": 500,
"width": 300,
"height": 300,
"decorations": false,
"title": "Lume",
"center": true,
Expand Down
2 changes: 1 addition & 1 deletion src/app/auth/create/step-2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function CreateStep2Screen() {
if (!db.secureDB) db.secureDB = stronghold;

// save privkey to secure storage
await db.secureSave(pubkey, privkey, pubkey);
await db.secureSave(pubkey, privkey);

// redirect to next step
navigate('/auth/create/step-3', { replace: true });
Expand Down
2 changes: 1 addition & 1 deletion src/app/auth/import/step-2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function ImportStep2Screen() {
if (!db.secureDB) db.secureDB = stronghold;

// save privkey to secure storage
await db.secureSave(pubkey, privkey, pubkey);
await db.secureSave(pubkey, privkey);

// redirect to next step
navigate('/auth/import/step-3', { replace: true });
Expand Down
41 changes: 6 additions & 35 deletions src/app/splash.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { message } from '@tauri-apps/api/dialog';
import { invoke } from '@tauri-apps/api/tauri';
import { useEffect, useState } from 'react';
import { useEffect } from 'react';

import { useNDK } from '@libs/ndk/provider';
import { useStorage } from '@libs/storage/provider';
Expand All @@ -14,12 +14,6 @@ export function SplashScreen() {
const { ndk } = useNDK();
const { fetchUserData } = useNostr();

const [isLoading, setIsLoading] = useState<boolean>(true);

const skip = async () => {
await invoke('close_splashscreen');
};

useEffect(() => {
async function syncUserData() {
if (!db.account) {
Expand All @@ -40,11 +34,11 @@ export function SplashScreen() {
await invoke('close_splashscreen');
}
} catch (e) {
setIsLoading(false);
await message(e, {
title: 'An unexpected error has occurred',
type: 'error',
});
await invoke('close_splashscreen');
}
}
}
Expand All @@ -59,34 +53,11 @@ export function SplashScreen() {
<div className="relative flex h-screen w-screen items-center justify-center bg-black">
<div data-tauri-drag-region className="absolute left-0 top-0 z-10 h-11 w-full" />
<div className="flex min-h-0 w-full flex-1 items-center justify-center px-8">
<div className="flex flex-col items-center justify-center gap-4">
<div className="flex flex-col items-center justify-center gap-6">
<LoaderIcon className="h-6 w-6 animate-spin text-white" />
{isLoading ? (
<div className="flex flex-col gap-2 text-center">
<h3 className="text-lg font-semibold leading-none text-white">
{!ndk ? 'Connecting to relay...' : 'Syncing user data...'}
</h3>
{ndk ? (
<p className="text-sm text-white/50">
Ensure all your data is sync across all Nostr clients. It may take a few
seconds, please don&apos;t close app.
</p>
) : null}
</div>
) : (
<div className="mt-2 flex flex-col gap-1 text-center">
<h3 className="text-lg font-semibold leading-none text-white">
An unexpected error has occurred
</h3>
<button
type="button"
onClick={skip}
className="mx-auto mt-4 inline-flex h-10 w-max items-center justify-center rounded-md bg-white/10 px-8 text-sm font-medium leading-none text-white backdrop-blur-xl hover:bg-white/20"
>
Skip this step
</button>
</div>
)}
<h3 className="text-lg font-semibold leading-none text-white">
{!ndk ? 'Connecting...' : 'Syncing...'}
</h3>
</div>
</div>
</div>
Expand Down

0 comments on commit 09b3eed

Please sign in to comment.