mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
Rename CustomSettingsScreen to ModuleSettings
This commit is contained in:
committed by
Bartosz Sosnowski
parent
f77945111b
commit
892fed6011
@@ -57,7 +57,7 @@ Defines the main App component, containing the UI layout, navigation menu, dialo
|
||||
#### [src/components/GeneralSettings.tsx](./src/components/GeneralSettings.tsx)
|
||||
Defines the PowerToys General Settings component, including logic to construct the object sent to PowerToys to change the General settings.
|
||||
|
||||
#### [src/components/CustomSettingsScreen.tsx](./src/components/CustomSettingsScreen.tsx)
|
||||
#### [src/components/ModuleSettings.tsx](./src/components/ModuleSettings.tsx)
|
||||
Defines the component that generates the settings screen for a PowerToy depending on its settings definition.
|
||||
|
||||
#### [src/components/BaseSettingsControl.tsx](./src/components/BaseSettingsControl.tsx)
|
||||
@@ -154,14 +154,14 @@ Each settings property has a `editor_type` field that's used to differentiate be
|
||||
```
|
||||
|
||||
A new Settings control component can be added to [`src/components/`](./src/components/).
|
||||
To render the new Settings control, its `editor_type` and component instance need to be added to the [`CustomSettingsScreen` component render()](./src/components/CustomSettingsScreen.tsx):
|
||||
To render the new Settings control, its `editor_type` and component instance need to be added to the [`ModuleSettings` component render()](./src/components/ModuleSettings.tsx):
|
||||
```tsx
|
||||
import React from 'react';
|
||||
import {StringTextSettingsControl} from './StringTextSettingsControl';
|
||||
|
||||
...
|
||||
|
||||
export class CustomSettingsScreen extends React.Component <any, any> {
|
||||
export class ModuleSettings extends React.Component <any, any> {
|
||||
references: any;
|
||||
parent_on_change: Function;
|
||||
...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import {Stack, Text, Nav, DefaultButton, PrimaryButton, ScrollablePane, INavLink, Spinner, SpinnerSize, Dialog, DialogType, DialogFooter} from 'office-ui-fabric-react';
|
||||
import {GeneralSettings} from './GeneralSettings';
|
||||
import {CustomSettingsScreen} from './CustomSettingsScreen';
|
||||
import {ModuleSettings} from './ModuleSettings';
|
||||
import '../css/layout.css';
|
||||
import {setup_powertoys_icons} from '../setup_icons';
|
||||
|
||||
@@ -233,7 +233,7 @@ export class App extends React.Component <any, any> {
|
||||
ref={(input:any) => {this.settings_screen_ref = input;}}
|
||||
/>
|
||||
} else if( this.state.settings.hasOwnProperty('powertoys') && this.state.selected_menu in this.state.settings.powertoys) {
|
||||
return <CustomSettingsScreen
|
||||
return <ModuleSettings
|
||||
key={this.state.selected_menu}
|
||||
settings_key={this.state.selected_menu}
|
||||
powertoy={this.state.settings.powertoys[this.state.selected_menu]}
|
||||
|
||||
@@ -9,7 +9,7 @@ import {HotkeySettingsControl} from './HotkeySettingsControl';
|
||||
import {ChoiceGroupSettingsControl} from './ChoiceGroupSettingsControl';
|
||||
import {DropdownSettingsControl} from './DropdownSettingsControl';
|
||||
|
||||
export class CustomSettingsScreen extends React.Component <any, any> {
|
||||
export class ModuleSettings extends React.Component <any, any> {
|
||||
references: any;
|
||||
parent_on_change: Function;
|
||||
|
||||
Reference in New Issue
Block a user