diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-01-23 09:42:09 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-01-23 09:42:09 +0800 |
| commit | f9fa7d65d775959efbc9609ccafd1fdce76129e4 (patch) | |
| tree | 111fc1933cfbe4bdc4e82207f53b6c1b74cc35e3 /src/inputs/status.rs | |
| parent | aee17b68b2b213553cd06406a3a5713ec91f374d (diff) | |
Add localization and refactor status command output
Diffstat (limited to 'src/inputs/status.rs')
| -rw-r--r-- | src/inputs/status.rs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/inputs/status.rs b/src/inputs/status.rs new file mode 100644 index 0000000..eb3b504 --- /dev/null +++ b/src/inputs/status.rs @@ -0,0 +1,43 @@ +use std::{collections::HashMap, time::SystemTime}; + +use just_enough_vcs::vcs::data::{ + local::{ + latest_file_data::LatestFileData, + local_sheet::LocalSheetData, + workspace_analyzer::{AnalyzeResultPure, ModifiedRelativePathBuf}, + }, + member::MemberId, + sheet::SheetName, +}; + +use crate::outputs::status::JVStatusWrongModifyReason; + +pub struct JVStatusInput { + pub current_account: MemberId, + pub current_sheet: SheetName, + pub is_host_mode: bool, + pub in_ref_sheet: bool, + pub analyzed_result: AnalyzeResultPure, + pub latest_file_data: LatestFileData, + pub local_sheet_data: LocalSheetData, + pub wrong_modified_items: HashMap<ModifiedRelativePathBuf, JVStatusWrongModifyReason>, + pub update_time: SystemTime, + pub now_time: SystemTime, +} + +impl Default for JVStatusInput { + fn default() -> Self { + Self { + current_account: MemberId::default(), + current_sheet: SheetName::default(), + is_host_mode: false, + in_ref_sheet: false, + analyzed_result: AnalyzeResultPure::default(), + latest_file_data: LatestFileData::default(), + local_sheet_data: LocalSheetData::default(), + wrong_modified_items: HashMap::new(), + update_time: SystemTime::now(), + now_time: SystemTime::now(), + } + } +} |
