Compare commits
	
		
			5 Commits
		
	
	
		
			1.0.5
			...
			421fe6bb72
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 421fe6bb72 | |||
| 9ef84ba63a | |||
| 56e5ae6629 | |||
| 4443131516 | |||
| 365d7589b1 | 
@@ -126,6 +126,14 @@ pub struct AppConfig {
 | 
			
		||||
    /// Redis password
 | 
			
		||||
    #[clap(long, env, default_value = "secretredis")]
 | 
			
		||||
    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! {
 | 
			
		||||
 
 | 
			
		||||
@@ -70,6 +70,7 @@ impl Default for ServerConstraints {
 | 
			
		||||
struct ServerConfig {
 | 
			
		||||
    auth_disabled: bool,
 | 
			
		||||
    oidc_provider_name: &'static str,
 | 
			
		||||
    apk_download_url: &'static str,
 | 
			
		||||
    accounts_types: &'static [AccountTypeDesc],
 | 
			
		||||
    constraints: ServerConstraints,
 | 
			
		||||
}
 | 
			
		||||
@@ -79,6 +80,7 @@ impl Default for ServerConfig {
 | 
			
		||||
        Self {
 | 
			
		||||
            auth_disabled: AppConfig::get().is_auth_disabled(),
 | 
			
		||||
            oidc_provider_name: AppConfig::get().openid_provider().name,
 | 
			
		||||
            apk_download_url: AppConfig::get().apk_download_url.as_str(),
 | 
			
		||||
            constraints: Default::default(),
 | 
			
		||||
            accounts_types: &ACCOUNT_TYPES,
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -36,8 +36,8 @@ class ScanScreen extends HookConsumerWidget {
 | 
			
		||||
 | 
			
		||||
    restartScan() async {
 | 
			
		||||
      try {
 | 
			
		||||
        final val = ref.refresh(_scanDocumentProvider);
 | 
			
		||||
        Logger.root.info("Load again startup result: $val");
 | 
			
		||||
        ref.invalidate(_scanDocumentProvider);
 | 
			
		||||
        Logger.root.info("Load again startup");
 | 
			
		||||
      } catch (e, s) {
 | 
			
		||||
        Logger.root.shout("Failed to try again startup loading! $e $s");
 | 
			
		||||
      }
 | 
			
		||||
 
 | 
			
		||||
@@ -40,6 +40,15 @@ class ExpenseEditor extends HookConsumerWidget {
 | 
			
		||||
 | 
			
		||||
    final (:pending, :snapshot, :hasError) = useAsyncTask();
 | 
			
		||||
 | 
			
		||||
    // Force refresh of field if required
 | 
			
		||||
    final previousData = useState<BaseExpenseInfo?>(null);
 | 
			
		||||
    if (initialData != previousData.value) {
 | 
			
		||||
      previousData.value = initialData;
 | 
			
		||||
      labelController.text = initialData?.label ?? "";
 | 
			
		||||
      costController.text = initialData?.cost.toString() ?? "";
 | 
			
		||||
      timeController.value = initialData?.time ?? DateTime.now();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Clear cost value
 | 
			
		||||
    handleClearCost() {
 | 
			
		||||
      costController.text = "";
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2385
									
								
								moneymgr_web/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2385
									
								
								moneymgr_web/package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -36,8 +36,8 @@
 | 
			
		||||
    "@types/react": "^19.1.8",
 | 
			
		||||
    "@types/react-dom": "^19.1.6",
 | 
			
		||||
    "@vitejs/plugin-react": "^4.6.0",
 | 
			
		||||
    "eslint": "^9.26.0",
 | 
			
		||||
    "eslint-plugin-react-dom": "^1.49.0",
 | 
			
		||||
    "eslint": "^9.31.0",
 | 
			
		||||
    "eslint-plugin-react-dom": "^1.52.3",
 | 
			
		||||
    "eslint-plugin-react-hooks": "^5.2.0",
 | 
			
		||||
    "eslint-plugin-react-refresh": "^00.4.20",
 | 
			
		||||
    "eslint-plugin-react-x": "^1.52.3",
 | 
			
		||||
 
 | 
			
		||||
@@ -3,6 +3,7 @@ import { APIClient } from "./ApiClient";
 | 
			
		||||
export interface ServerConfig {
 | 
			
		||||
  auth_disabled: boolean;
 | 
			
		||||
  oidc_provider_name: string;
 | 
			
		||||
  apk_download_url: string;
 | 
			
		||||
  accounts_types: AccountType[];
 | 
			
		||||
  constraints: ServerConstraints;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,6 @@
 | 
			
		||||
import { mdiApi, mdiCash } from "@mdi/js";
 | 
			
		||||
import Icon from "@mdi/react";
 | 
			
		||||
import AndroidIcon from "@mui/icons-material/Android";
 | 
			
		||||
import CloudDownloadIcon from "@mui/icons-material/CloudDownload";
 | 
			
		||||
import LogoutIcon from "@mui/icons-material/Logout";
 | 
			
		||||
import SettingsIcon from "@mui/icons-material/Settings";
 | 
			
		||||
@@ -10,6 +11,7 @@ import MenuItem from "@mui/material/MenuItem";
 | 
			
		||||
import Toolbar from "@mui/material/Toolbar";
 | 
			
		||||
import Typography from "@mui/material/Typography";
 | 
			
		||||
import * as React from "react";
 | 
			
		||||
import { ServerApi } from "../api/ServerApi";
 | 
			
		||||
import { useAuthInfo } from "./BaseAuthenticatedPage";
 | 
			
		||||
import { DarkThemeButton } from "./DarkThemeButtonWidget";
 | 
			
		||||
import { PublicModeButton } from "./PublicModeButtonWidget";
 | 
			
		||||
@@ -100,6 +102,18 @@ export function MoneyWebAppBar(p: {
 | 
			
		||||
              </MenuItem>
 | 
			
		||||
            </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 />
 | 
			
		||||
 | 
			
		||||
            {/* Sign out */}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user