Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend-defined package settings #2104

Merged
merged 42 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
14f23a8
settings wip shizzle
joeyballentine Jul 21, 2023
467bdd2
Merge branch 'main' into settings-stuff
joeyballentine Jul 31, 2023
edf50fd
gpu dropdown
joeyballentine Jul 31, 2023
d8171b9
Option to enable GUI hardware acceleration (#2055)
stonerl Aug 5, 2023
3de1b90
Fixed release CI (#2059)
RunDevelopment Aug 5, 2023
c5dfb91
Bump to 0.19.1 (#2061)
RunDevelopment Aug 6, 2023
fedc6d3
Added sorting back to Image File Iterator (#2067)
theflyingzamboni Aug 7, 2023
cc33b98
fix duplicating nodes and exporting firing twice (#2068)
stonerl Aug 8, 2023
79364ac
changes to theme selection (#2060)
stonerl Aug 8, 2023
c4c1370
Mac Stuff (#2069)
stonerl Aug 8, 2023
42b1a92
Features (#2053)
RunDevelopment Aug 10, 2023
37a9f7a
Merge branch 'main' into settings-stuff
joeyballentine Aug 10, 2023
1088aef
UI changes for backend settings
joeyballentine Aug 10, 2023
b34aba4
some wip stuff
joeyballentine Aug 10, 2023
23e8b8f
Merge branch 'main' into settings-stuff
joeyballentine Aug 12, 2023
39814a2
Merge branch 'main' into settings-stuff
joeyballentine Aug 13, 2023
c12d91e
Fix setting state
joeyballentine Aug 13, 2023
918b452
fix some typing and stuff
joeyballentine Aug 13, 2023
fd92811
use immer
joeyballentine Aug 13, 2023
2f128d6
some changes
joeyballentine Aug 14, 2023
bdfef91
Merge branch 'main' into settings-stuff
joeyballentine Aug 15, 2023
5ff35f1
wip
joeyballentine Aug 16, 2023
aec8004
Merge remote-tracking branch 'chaiNNer-org/main' into settings-stuff
joeyballentine Aug 16, 2023
1adf5b2
refactor execution settings
joeyballentine Aug 16, 2023
3aa64a1
Update backend/src/api.py
joeyballentine Aug 17, 2023
c62727c
wip
joeyballentine Aug 18, 2023
ffae6e7
Merge branch 'main' into settings-stuff
joeyballentine Aug 18, 2023
61d1a44
refactor stuff
joeyballentine Aug 18, 2023
efdcb79
fix cache stuff
joeyballentine Aug 19, 2023
a4ea53a
ncnn settings
joeyballentine Aug 19, 2023
0bdc9e7
cleanup
joeyballentine Aug 19, 2023
9df57da
lint
joeyballentine Aug 19, 2023
786059f
remove unnecessary typevar
joeyballentine Aug 21, 2023
8a04fb7
remove TODO
joeyballentine Aug 21, 2023
ab99030
Some PR suggestions
joeyballentine Aug 21, 2023
9c706c7
...
joeyballentine Aug 21, 2023
dd4d471
Merge remote-tracking branch 'chaiNNer-org/main' into settings-stuff
joeyballentine Aug 21, 2023
c43c590
linting
joeyballentine Aug 21, 2023
055670f
Require icon and color
RunDevelopment Aug 22, 2023
e8ba63c
More settings (#2137)
RunDevelopment Aug 25, 2023
cf8d559
Merge branch 'main' into settings-stuff
RunDevelopment Aug 25, 2023
19b1995
Merge branch 'main' into settings-stuff
joeyballentine Aug 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix setting state
  • Loading branch information
joeyballentine committed Aug 13, 2023
commit c12d91ee9b59db58cf7c3b1d6952686fd3fa60c5
2 changes: 1 addition & 1 deletion src/common/common-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ export interface ISetting {
readonly label: string;
readonly key: string;
readonly description: string;
readonly default: unknown;
readonly default: string | number | boolean;
readonly disabled: boolean;
}

Expand Down
14 changes: 8 additions & 6 deletions src/renderer/components/SettingsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ function Dropdown<T>({
interface CacheSettingProps extends SettingsItemProps {
isDisabled?: boolean;
value: boolean;
onChange: (value: unknown) => void;
onChange: (value: boolean) => void;
cacheKey: string;
}

Expand All @@ -192,7 +192,7 @@ function CacheSetting({
title={title}
value={value}
onToggle={() => {
onChange((prev: boolean) => !prev);
onChange(!value);
}}
/>
<Button
Expand All @@ -218,8 +218,8 @@ function CacheSetting({

interface SettingWrapperProps {
setting: Setting;
settingValue: unknown;
setSettingValue: (value: unknown) => void;
settingValue: string | number | boolean | undefined;
setSettingValue: (value: string | number | boolean | undefined) => void;
}

// eslint-disable-next-line prefer-arrow-functions/prefer-arrow-functions, react-memo/require-memo
Expand All @@ -239,7 +239,7 @@ function SettingWrapper({ setting, settingValue, setSettingValue }: SettingWrapp
title={setting.label}
value={Boolean(settingValue)}
onToggle={() => {
setSettingValue((prev: boolean) => !prev);
setSettingValue(!settingValue);
}}
/>
);
Expand Down Expand Up @@ -286,7 +286,9 @@ function SettingWrapper({ setting, settingValue, setSettingValue }: SettingWrapp
isDisabled={setting.disabled}
title={setting.label}
value={Boolean(settingValue)}
onChange={setSettingValue}
onChange={(v) => {
setSettingValue(v);
}}
/>
);
default:
Expand Down