1 Commits

Author SHA1 Message Date
16edc19638 Update dependency dart to ^3.8.2
Some checks failed
renovate/artifacts Artifact file update failure
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2025-07-21 00:16:58 +00:00
13 changed files with 1324 additions and 1482 deletions

View File

@@ -87,7 +87,7 @@ dependencies = [
"mime", "mime",
"percent-encoding", "percent-encoding",
"pin-project-lite", "pin-project-lite",
"rand 0.9.2", "rand 0.9.1",
"sha1", "sha1",
"smallvec", "smallvec",
"tokio", "tokio",
@@ -724,9 +724,9 @@ dependencies = [
[[package]] [[package]]
name = "clap" name = "clap"
version = "4.5.42" version = "4.5.41"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed87a9d530bb41a67537289bafcac159cb3ee28460e0a4571123d2a778a6a882" checksum = "be92d32e80243a54711e5d7ce823c35c41c9d929dc4ab58e1276f625841aadf9"
dependencies = [ dependencies = [
"clap_builder", "clap_builder",
"clap_derive", "clap_derive",
@@ -734,9 +734,9 @@ dependencies = [
[[package]] [[package]]
name = "clap_builder" name = "clap_builder"
version = "4.5.42" version = "4.5.41"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64f4f3f3c77c94aff3c7e9aac9a2ca1974a5adf392a8bb751e827d6d127ab966" checksum = "707eab41e9622f9139419d573eca0900137718000c517d47da73045f54331c3d"
dependencies = [ dependencies = [
"anstream", "anstream",
"anstyle", "anstyle",
@@ -2298,7 +2298,7 @@ dependencies = [
"light-openid", "light-openid",
"log", "log",
"mime_guess", "mime_guess",
"rand 0.9.2", "rand 0.9.1",
"rust-embed", "rust-embed",
"rust-s3", "rust-s3",
"rust_xlsxwriter", "rust_xlsxwriter",
@@ -2741,9 +2741,9 @@ dependencies = [
[[package]] [[package]]
name = "rand" name = "rand"
version = "0.9.2" version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97"
dependencies = [ dependencies = [
"rand_chacha 0.9.0", "rand_chacha 0.9.0",
"rand_core 0.9.3", "rand_core 0.9.3",

View File

@@ -8,7 +8,7 @@ env_logger = "0.11.8"
log = "0.4.27" log = "0.4.27"
diesel = { version = "2.2.12", features = ["postgres", "r2d2"] } diesel = { version = "2.2.12", features = ["postgres", "r2d2"] }
diesel_migrations = "2.2.0" diesel_migrations = "2.2.0"
clap = { version = "4.5.42", features = ["env", "derive"] } clap = { version = "4.5.41", features = ["env", "derive"] }
actix-web = "4.11.0" actix-web = "4.11.0"
actix-cors = "0.7.1" actix-cors = "0.7.1"
actix-multipart = "0.7.2" actix-multipart = "0.7.2"
@@ -24,7 +24,7 @@ tokio = "1.45.1"
futures-util = "0.3.31" futures-util = "0.3.31"
serde_json = "1.0.141" serde_json = "1.0.141"
light-openid = "1.0.4" light-openid = "1.0.4"
rand = "0.9.2" rand = "0.9.1"
ipnet = { version = "2.11.0", features = ["serde"] } ipnet = { version = "2.11.0", features = ["serde"] }
lazy-regex = "3.4.1" lazy-regex = "3.4.1"
jwt-simple = { version = "0.12.12", default-features = false, features = ["pure-rust"] } jwt-simple = { version = "0.12.12", default-features = false, features = ["pure-rust"] }

View File

@@ -29,7 +29,7 @@ pub struct AppConfig {
/// Unsecure : for development, bypass authentication, using the account with the given /// Unsecure : for development, bypass authentication, using the account with the given
/// email address by default /// email address by default
#[clap(long, env)] #[clap(long, env)]
unsecure_auto_login_email: Option<String>, pub unsecure_auto_login_email: Option<String>,
/// PostgreSQL database host /// PostgreSQL database host
#[clap(long, env, default_value = "localhost")] #[clap(long, env, default_value = "localhost")]
@@ -126,14 +126,6 @@ pub struct AppConfig {
/// Redis password /// Redis password
#[clap(long, env, default_value = "secretredis")] #[clap(long, env, default_value = "secretredis")]
redis_password: String, redis_password: String,
/// Application download URL
#[clap(
long,
env,
default_value = "https://gitea.communiquons.org/pierre/MoneyMgr/releases/download/latest/moneymgr_mobile_arm64-v8a.apk"
)]
pub apk_download_url: String,
} }
lazy_static::lazy_static! { lazy_static::lazy_static! {
@@ -148,17 +140,9 @@ impl AppConfig {
&ARGS &ARGS
} }
/// Get auto login email (if not empty)
pub fn unsecure_auto_login_email(&self) -> Option<&str> {
match self.unsecure_auto_login_email.as_deref() {
None | Some("") => None,
s => s,
}
}
/// Check if auth is disabled /// Check if auth is disabled
pub fn is_auth_disabled(&self) -> bool { pub fn is_auth_disabled(&self) -> bool {
self.unsecure_auto_login_email().is_some() self.unsecure_auto_login_email.is_some()
} }
/// Get auth cookie domain /// Get auth cookie domain

View File

@@ -70,7 +70,6 @@ impl Default for ServerConstraints {
struct ServerConfig { struct ServerConfig {
auth_disabled: bool, auth_disabled: bool,
oidc_provider_name: &'static str, oidc_provider_name: &'static str,
apk_download_url: &'static str,
accounts_types: &'static [AccountTypeDesc], accounts_types: &'static [AccountTypeDesc],
constraints: ServerConstraints, constraints: ServerConstraints,
} }
@@ -80,7 +79,6 @@ impl Default for ServerConfig {
Self { Self {
auth_disabled: AppConfig::get().is_auth_disabled(), auth_disabled: AppConfig::get().is_auth_disabled(),
oidc_provider_name: AppConfig::get().openid_provider().name, oidc_provider_name: AppConfig::get().openid_provider().name,
apk_download_url: AppConfig::get().apk_download_url.as_str(),
constraints: Default::default(), constraints: Default::default(),
accounts_types: &ACCOUNT_TYPES, accounts_types: &ACCOUNT_TYPES,
} }

View File

@@ -182,7 +182,7 @@ impl FromRequest for AuthExtractor {
} }
// Check if login is hard-coded as program argument // Check if login is hard-coded as program argument
if let Some(email) = &AppConfig::get().unsecure_auto_login_email() { if let Some(email) = &AppConfig::get().unsecure_auto_login_email {
let user = users_service::get_user_by_email(email).map_err(|e| { let user = users_service::get_user_by_email(email).map_err(|e| {
log::error!("Failed to retrieve dev user: {e}"); log::error!("Failed to retrieve dev user: {e}");
ErrorPreconditionFailed("Unable to retrieve dev user!") ErrorPreconditionFailed("Unable to retrieve dev user!")

View File

@@ -38,7 +38,7 @@ async fn main() -> std::io::Result<()> {
db_connection::initialize_conn().expect("Failed to connect to PostgresSQL database!"); db_connection::initialize_conn().expect("Failed to connect to PostgresSQL database!");
// Auto create default account, if requested // Auto create default account, if requested
if let Some(mail) = &AppConfig::get().unsecure_auto_login_email() { if let Some(mail) = &AppConfig::get().unsecure_auto_login_email {
users_service::create_or_update_user(mail, "Anonymous") users_service::create_or_update_user(mail, "Anonymous")
.await .await
.expect("Failed to create default account!"); .expect("Failed to create default account!");

View File

@@ -1,10 +1,8 @@
import 'dart:typed_data'; import 'dart:typed_data';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:logging/logging.dart'; import 'package:logging/logging.dart';
import 'package:moneymgr_mobile/services/router/routes_list.dart';
import 'package:moneymgr_mobile/services/storage/expenses.dart'; import 'package:moneymgr_mobile/services/storage/expenses.dart';
import 'package:moneymgr_mobile/services/storage/prefs.dart'; import 'package:moneymgr_mobile/services/storage/prefs.dart';
import 'package:moneymgr_mobile/utils/ocr_utils.dart'; import 'package:moneymgr_mobile/utils/ocr_utils.dart';
@@ -57,9 +55,7 @@ class ScanScreen extends HookConsumerWidget {
fileContent: value.$1!, fileContent: value.$1!,
fileMimeType: "application/pdf", fileMimeType: "application/pdf",
); );
if (context.mounted) { restartScan();
context.pushReplacement(scansPage);
}
}, },
onRescan: restartScan, onRescan: restartScan,
), ),

View File

@@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1 version: 1.0.0+1
environment: environment:
sdk: ^3.8.3 sdk: ^3.8.2
# Dependencies specify other packages that your package needs in order to work. # Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions # To automatically upgrade your package dependencies to the latest versions
@@ -111,7 +111,7 @@ dev_dependencies:
flutter_launcher_icons: ^0.14.4 flutter_launcher_icons: ^0.14.4
# Generate source code # Generate source code
build_runner: ^2.6.0 build_runner: ^2.5.4
# Riverpod code generation # Riverpod code generation
riverpod_generator: ^2.6.5 riverpod_generator: ^2.6.5

File diff suppressed because it is too large Load Diff

View File

@@ -18,26 +18,26 @@
"@mdi/react": "^1.6.1", "@mdi/react": "^1.6.1",
"@mui/icons-material": "^7.1.2", "@mui/icons-material": "^7.1.2",
"@mui/material": "^7.1.2", "@mui/material": "^7.1.2",
"@mui/x-charts": "^8.9.2", "@mui/x-charts": "^8.8.0",
"@mui/x-data-grid": "^8.9.2", "@mui/x-data-grid": "^8.8.0",
"@mui/x-date-pickers": "^8.9.0", "@mui/x-date-pickers": "^8.8.0",
"date-and-time": "^3.6.0", "date-and-time": "^3.6.0",
"dayjs": "^1.11.13", "dayjs": "^1.11.13",
"filesize": "^10.1.6", "filesize": "^10.1.6",
"qrcode.react": "^4.2.0", "qrcode.react": "^4.2.0",
"react": "^19.1.1", "react": "^19.1.0",
"react-dom": "^19.1.1", "react-dom": "^19.1.0",
"react-router": "^7.6.3", "react-router": "^7.6.3",
"react-router-dom": "^7.6.3", "react-router-dom": "^7.6.3",
"ts-pattern": "^5.7.1" "ts-pattern": "^5.7.1"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.32.0", "@eslint/js": "^9.31.0",
"@types/react": "^19.1.9", "@types/react": "^19.1.8",
"@types/react-dom": "^19.1.7", "@types/react-dom": "^19.1.6",
"@vitejs/plugin-react": "^4.7.0", "@vitejs/plugin-react": "^4.6.0",
"eslint": "^9.31.0", "eslint": "^9.26.0",
"eslint-plugin-react-dom": "^1.52.3", "eslint-plugin-react-dom": "^1.49.0",
"eslint-plugin-react-hooks": "^5.2.0", "eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^00.4.20", "eslint-plugin-react-refresh": "^00.4.20",
"eslint-plugin-react-x": "^1.52.3", "eslint-plugin-react-x": "^1.52.3",

View File

@@ -3,7 +3,6 @@ import { APIClient } from "./ApiClient";
export interface ServerConfig { export interface ServerConfig {
auth_disabled: boolean; auth_disabled: boolean;
oidc_provider_name: string; oidc_provider_name: string;
apk_download_url: string;
accounts_types: AccountType[]; accounts_types: AccountType[];
constraints: ServerConstraints; constraints: ServerConstraints;
} }

View File

@@ -280,8 +280,6 @@ function CreatedToken(p: { token: TokenWithSecret }): React.ReactElement {
The API token was successfully created. Please note the following The API token was successfully created. Please note the following
information as they won't be available next. information as they won't be available next.
<br /> <br />
API URL : <CopyTextChip text={APIClient.ActualBackendURL()} />
<br />
Token ID: <CopyTextChip text={p.token.id.toString()} /> Token ID: <CopyTextChip text={p.token.id.toString()} />
<br /> <br />
Token value: <CopyTextChip text={p.token.token} /> Token value: <CopyTextChip text={p.token.token} />

View File

@@ -1,6 +1,5 @@
import { mdiApi, mdiCash } from "@mdi/js"; import { mdiApi, mdiCash } from "@mdi/js";
import Icon from "@mdi/react"; import Icon from "@mdi/react";
import AndroidIcon from "@mui/icons-material/Android";
import CloudDownloadIcon from "@mui/icons-material/CloudDownload"; import CloudDownloadIcon from "@mui/icons-material/CloudDownload";
import LogoutIcon from "@mui/icons-material/Logout"; import LogoutIcon from "@mui/icons-material/Logout";
import SettingsIcon from "@mui/icons-material/Settings"; import SettingsIcon from "@mui/icons-material/Settings";
@@ -11,7 +10,6 @@ import MenuItem from "@mui/material/MenuItem";
import Toolbar from "@mui/material/Toolbar"; import Toolbar from "@mui/material/Toolbar";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import * as React from "react"; import * as React from "react";
import { ServerApi } from "../api/ServerApi";
import { useAuthInfo } from "./BaseAuthenticatedPage"; import { useAuthInfo } from "./BaseAuthenticatedPage";
import { DarkThemeButton } from "./DarkThemeButtonWidget"; import { DarkThemeButton } from "./DarkThemeButtonWidget";
import { PublicModeButton } from "./PublicModeButtonWidget"; import { PublicModeButton } from "./PublicModeButtonWidget";
@@ -102,18 +100,6 @@ export function MoneyWebAppBar(p: {
</MenuItem> </MenuItem>
</RouterLink> </RouterLink>
{/* APK download */}
<RouterLink to={ServerApi.Config.apk_download_url}>
<MenuItem>
<ListItemIcon>
<AndroidIcon />
</ListItemIcon>
<ListItemText secondary="Scan expenses from your smartphone">
Mobile Application
</ListItemText>
</MenuItem>
</RouterLink>
<Divider /> <Divider />
{/* Sign out */} {/* Sign out */}