-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #228 from BitsAndDroids/main
App v0.5.0
- Loading branch information
Showing
23 changed files
with
273 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#[cfg(test)] | ||
use crate::types::connector_settings::ConnectorSettings; | ||
|
||
use super::SavedConnectorSettings; | ||
|
||
#[test] | ||
fn test_setting_default_settings_missing_settings() { | ||
let saved_settings = SavedConnectorSettings { | ||
adc_resolution: None, | ||
send_every_ms: None, | ||
use_trs: None, | ||
installed_wasm_version: None, | ||
}; | ||
let settings = ConnectorSettings::from(saved_settings); | ||
assert_eq!(settings.adc_resolution, 1023); | ||
assert_eq!(settings.send_every_ms, 6); | ||
assert!(!settings.use_trs); | ||
assert_eq!(settings.installed_wasm_version, ""); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import { Output } from "@/model/Output"; | ||
interface CategoryCheckboxesProps { | ||
outputs: Output[]; | ||
dialogOpen: boolean; | ||
toggleOutput: (output: Output) => void; | ||
} | ||
|
||
export const OutputSelectRow = ({ | ||
outputs, | ||
dialogOpen, | ||
toggleOutput, | ||
}: CategoryCheckboxesProps) => { | ||
return ( | ||
<div className="flex flex-col h-full w-full overflow-y-scroll pl-2"> | ||
{outputs.map((output, index) => { | ||
return ( | ||
<div key={output.id} className="flex flex-row items-center"> | ||
<input | ||
type="checkbox" | ||
className="text-green-600 focus:ring-green-500 rounded-md mr-2 h-6 w-6 -mt-1 accent-green-600" | ||
onChange={() => { | ||
toggleOutput(output); | ||
}} | ||
tabIndex={dialogOpen ? -1 : 1} | ||
checked={output.selected} | ||
/> | ||
<div | ||
className={`p-2 w-full bg-gradient-to-r from-[rgba(255,255,255,0.9)] ${output.selected ? "to-[rgba(200,255,200,0.7)]" : "to-[rgba(200,200,220,0.7)]"} rounded-md mb-2 flex flex-row items-center drop-shadow mr-2 align-middle shadow-[inset_0_-2px_4px_rgba(180,255,255,0.9)]`} | ||
> | ||
<div className="flex flex-col w-3/4"> | ||
<span className="has-tooltip"> | ||
<span | ||
className={`${index === 0 ? "tooltip-bot" : "tooltip"} rounded shadow-lg p-1 bg-gray-100`} | ||
> | ||
{output.simvar} | ||
</span> | ||
<p className="rounded-md font-bold text-lg"> | ||
{output.cb_text} | ||
</p> | ||
</span> | ||
<div className="flex flex-row"> | ||
<span className="has-tooltip"> | ||
<span className="tooltip rounded shadow-lg p-1 bg-gray-100"> | ||
category | ||
</span> | ||
<img | ||
src="https://api.iconify.design/tabler:category-2.svg" | ||
className={"fill-amber-50 mr-2"} | ||
alt="update_every" | ||
/> | ||
</span> | ||
<p className="text-xs text-gray-500 ">{output.category}</p> | ||
</div> | ||
</div> | ||
<div className="ml-2 flex flex-row items-center"> | ||
<span className="has-tooltip"> | ||
<span className="tooltip rounded shadow-lg p-1 bg-gray-100"> | ||
update every X | ||
</span> | ||
<img | ||
src="https://api.iconify.design/lucide:between-horizontal-start.svg" | ||
className={"fill-amber-50 mr-2"} | ||
alt="update_every" | ||
/> | ||
</span> | ||
<p className="">{output.update_every}</p> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
})} | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.