Skip to content

Commit 474ff80

Browse files
authored
Auto merged - #2489 at Fri, 26 Nov 2021 01:17:29 GMT
Presets for Betaflight Configurator
2 parents ddf817c + e63a5fe commit 474ff80

39 files changed

+3375
-19
lines changed

locales/en/messages.json

Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
"noticeTitle": {
3232
"message": "Notice"
3333
},
34+
"dontShowAgain": {
35+
"message": "Don't show again"
36+
},
3437
"operationNotSupported": {
3538
"message": "This operation is not supported by your hardware."
3639
},
@@ -68,6 +71,9 @@
6871
"close": {
6972
"message": "Close"
7073
},
74+
"OK": {
75+
"message": "OK"
76+
},
7177
"cancel": {
7278
"message": "Cancel"
7379
},
@@ -86,6 +92,9 @@
8692
"permanentExpertMode": {
8793
"message": "Permanently enable Expert Mode"
8894
},
95+
"warningSettings": {
96+
"message": "Show warnings"
97+
},
8998
"rememberLastTab": {
9099
"message": "Reopen last tab on connect"
91100
},
@@ -6275,5 +6284,205 @@
62756284
},
62766285
"cordovaExitAppMessage": {
62776286
"message": "Do you really want to close the configurator?"
6287+
},
6288+
"dropDownSelectAll": {
6289+
"message": "[Select all]",
6290+
"description": "Select all item in the drop down/multiple select"
6291+
},
6292+
"dropDownAll": {
6293+
"message": "All",
6294+
"description": "Text indicating everything is selected in the drop down/multiple select"
6295+
},
6296+
"tabPresets": {
6297+
"message": "Presets",
6298+
"description": "Presets tab title"
6299+
},
6300+
"presetsReload": {
6301+
"message": "Reload",
6302+
"description": "Text on the reload button that appears when there in an error loading presets index"
6303+
},
6304+
"presetsAuthor": {
6305+
"message": "Author:",
6306+
"description": "Hint text in the presets detailed dialog"
6307+
},
6308+
"presetsKeywords": {
6309+
"message": "Keywords:",
6310+
"description": "Hint text in the presets detailed dialog"
6311+
},
6312+
"presetsVersions": {
6313+
"message": "Firmware:",
6314+
"description": "Hint text in the presets detailed dialog"
6315+
},
6316+
"presetsOfficial": {
6317+
"message": "Official",
6318+
"description": "Hint text in the presets detailed dialog indication preset is official"
6319+
},
6320+
"presetsCommunity": {
6321+
"message": "Community",
6322+
"description": "Hint text in the presets detailed dialog indication preset is not official but community"
6323+
},
6324+
"presetsExperimental": {
6325+
"message": "Experimental",
6326+
"description": "Hint text in the presets detailed dialog indication preset is not official but experimental"
6327+
},
6328+
"presetsApply": {
6329+
"message": "Pick",
6330+
"description": "Button to pick a preset"
6331+
},
6332+
"presetsViewOnline": {
6333+
"message": "View online…",
6334+
"description": "Link text for opening preset file online"
6335+
},
6336+
"presetsOpenDiscussion": {
6337+
"message": "Discussion…",
6338+
"description": "Link text for opening preset discussion"
6339+
},
6340+
"presetsShowCli": {
6341+
"message": "Show CLI",
6342+
"description": "Button to show CLI code of a preset"
6343+
},
6344+
"presetsHideCli": {
6345+
"message": "Hide CLI",
6346+
"description": "Button to hide CLI code of a preset"
6347+
},
6348+
"presetsOptions": {
6349+
"message": "Options",
6350+
"description": "Text label for Options drop down select"
6351+
},
6352+
"presetsFilterCategory": {
6353+
"message": "Categories",
6354+
"description": "UI filter name"
6355+
},
6356+
"presetsFilterKeyword": {
6357+
"message": "Keywords",
6358+
"description": "UI filter name"
6359+
},
6360+
"presetsFilterAuthor": {
6361+
"message": "Authors",
6362+
"description": "UI filter name"
6363+
},
6364+
"presetsFilterFirmware": {
6365+
"message": "Firmwares",
6366+
"description": "UI filter name"
6367+
},
6368+
"presetsFilterStatus": {
6369+
"message": "Status",
6370+
"description": "UI filter name - official/community/experimental"
6371+
},
6372+
"presetsLoadError": {
6373+
"message": "Error loading presets from the internet",
6374+
"description": "Error report when failed to load presets index or a specific preset"
6375+
},
6376+
"presetsButtonSave": {
6377+
"message": "Save and Reboot",
6378+
"description": "A button that saves all appied presets - analog to 'save' command in CLI"
6379+
},
6380+
"presetsButtonCancel": {
6381+
"message": "Cancel",
6382+
"description": "A button that restarts FC without saving appied presets - analog to 'exit' command in CLI"
6383+
},
6384+
"presetsApplyingPresets": {
6385+
"message": "Applying configuration...",
6386+
"description": "First label in the progress dialog when applying configuration (presets or user config)"
6387+
},
6388+
"presetsPleaseWait": {
6389+
"message": "Please wait.",
6390+
"description": "Second label in the progress dialog when applying presets"
6391+
},
6392+
"presetsCliErrorsWaring": {
6393+
"message": "<span class='message-negative'>WARNING!</span><br/>Configuration has been applied with CLI errors.",
6394+
"description": "Text to show when there are CLI errors after applying presets or user configuration"
6395+
},
6396+
"presetsSaveAnyway": {
6397+
"message": "Save anyway",
6398+
"description": "Save anyway button on the CLI errors presets dialog"
6399+
},
6400+
"presetsWarningDialogTitle": {
6401+
"message": "WARNING!",
6402+
"description": "Warning title in the warning dialog in the presets"
6403+
},
6404+
"presetsWarningDialogYesButton": {
6405+
"message": "Agree",
6406+
"description": "Agree button in the presets warning dialog"
6407+
},
6408+
"presetsWarningDialogNoButton": {
6409+
"message": "Cancel",
6410+
"description": "Cancel button in the presets warning dialog"
6411+
},
6412+
"presetsWiki": {
6413+
"message": "Presets Wiki",
6414+
"description": "Button to open Presets Wiki link"
6415+
},
6416+
"presetsBackupSave": {
6417+
"message": "Save backup",
6418+
"description": "Button to backup current configuration to file"
6419+
},
6420+
"presetsBackupLoad": {
6421+
"message": "Load backup",
6422+
"description": "Button to load backup from the file"
6423+
},
6424+
"presetsLoadingDumpAll": {
6425+
"message": "Loading current configuration from the flight controller",
6426+
"description": "Title for the waiting dialog when loading dump all into a file"
6427+
},
6428+
"dumpAllNotSavedWarning": {
6429+
"message": "Error occured while saving current configuration",
6430+
"description": "Message appears on presets tab when saving current diff all into a file has failed"
6431+
},
6432+
"presetSources": {
6433+
"message": "Preset sources...",
6434+
"description": "A button to show preset sources dialog"
6435+
},
6436+
"presetsSourcesDialogTitle": {
6437+
"message": "Preset sources",
6438+
"description": "A button to show preset sources dialog"
6439+
},
6440+
"presetsSourcesDialogAddNew": {
6441+
"message": "Add new source",
6442+
"description": "A button to show preset sources dialog"
6443+
},
6444+
"presetsSourcesDialogDefaultSourceName": {
6445+
"message": "New Custom Preset Source",
6446+
"description": "A default preset source (repo) name"
6447+
},
6448+
"presetsSourcesDialogSaveSource": {
6449+
"message": "Save",
6450+
"description": "Presets tab, sources dialog, button to save new or editable source"
6451+
},
6452+
"presetsSourcesDialogResetSource": {
6453+
"message": "Reset",
6454+
"description": "Presets tab, sources dialog, button to reset source after modifications"
6455+
},
6456+
"presetsSourcesDialogMakeSourceActive": {
6457+
"message": "Make Active",
6458+
"description": "Presets tab, sources dialog, button to make selected source active"
6459+
},
6460+
"presetsSourcesDialogDeleteSource": {
6461+
"message": "Delete",
6462+
"description": "Presets tab, sources dialog, button to delete selected source"
6463+
},
6464+
"presetsWarningNotOfficialSource": {
6465+
"message": "<span class=\"message-negative\">WARNING!</span> A third party preset source is selected.",
6466+
"description": "Warning message that shows up when a third party preset source is selected"
6467+
},
6468+
"presetsWarningBackup": {
6469+
"message": "Please make sure you backup your current configuration ('$t(presetsBackupSave.message)' button or via CLI if the button is disabled) <strong>before</strong> picking and applying presets. Otherwise there is no way to return to previous configuration after applying presets.",
6470+
"description": "Warning message that shows up at the top of the presets tab"
6471+
},
6472+
"presets_sources_dialog_warning": {
6473+
"message": "<span class=\"message-negative\">WARNING!</span> Using third party preset sources could be dangerous.<br/>Make sure you add and use only trusted sources. Malicious or bad preset sources will break your drone configuration and can potentially harm your devices.",
6474+
"description": "Warning message that shows up at the top of the preset sources dialog"
6475+
},
6476+
"presetsWarningWrongVersionConfirmation": {
6477+
"message": "Picked preset requires firmware version $1<br/> Current firmware version is $2",
6478+
"description": "Warning message that shows up at the top of the preset sources dialog"
6479+
},
6480+
"presetsNoPresetsFound": {
6481+
"message": "No presets found for the given search paramteres",
6482+
"description": "Message that apprears on presets tab if no presets were found"
6483+
},
6484+
"presetsTooManyPresetsFound": {
6485+
"message": "Reached the maximum limit of the shown presets number",
6486+
"description": "Message that apprears on presets tab if too many presets found"
62786487
}
62796488
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"jquery-ui-npm": "^1.12.0",
6565
"lru_map": "^0.3.3",
6666
"marked": "^0.8.0",
67+
"multiple-select": "^1.5.2",
6768
"nw-vue-devtools-prebuilt": "^0.0.10",
6869
"object-hash": "^2.0.3",
6970
"select2": "^4.0.13",
@@ -125,7 +126,7 @@
125126
"temp": "^0.9.1",
126127
"vinyl-source-stream": "^2.0.0",
127128
"vue-template-compiler": "^2.6.12",
128-
"yarn": "^1.22.0"
129+
"yarn": "^1.22.17"
129130
},
130131
"optionalDependencies": {
131132
"gulp-appdmg": "^1.0.3"

src/css/dark-theme.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ dialog {
111111
border: 1px solid #ffbb2a;
112112
}
113113

114+
.standard_input {
115+
background: var(--boxBackground);
116+
color: white;
117+
}
118+
114119
#quad-status_wrapper {
115120
color: #393b3a;
116121
}

src/css/main.css

Lines changed: 81 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,18 @@ a.disabled {
7878
background-position: center;
7979
}
8080

81+
.standard_input {
82+
padding-left: 3px;
83+
height: 20px;
84+
line-height: 20px;
85+
text-align: left;
86+
border-radius: 3px;
87+
font-size: 12px;
88+
font-weight: normal;
89+
border: 1px solid var(--subtleAccent);
90+
background: var(--boxBackground);
91+
}
92+
8193
/* Help-Icon */
8294
.helpicon {
8395
float: right;
@@ -740,8 +752,19 @@ input[type="number"]::-webkit-inner-spin-button {
740752
background-image: url(../images/icons/cf_icon_link_active.svg);
741753
}
742754

755+
/** Header (not phones) **/
756+
@media not all and (max-width: 575px) {
757+
.visible-on-phone-only {
758+
display: none !important;
759+
}
760+
}
761+
743762
/** Header (phones) **/
744763
@media all and (max-width: 575px) {
764+
.visible-on-desktop-only {
765+
display: none !important;
766+
}
767+
745768
.headerbar {
746769
height: 56px;
747770
background: rgba(0, 0, 0, 0.15);
@@ -1541,10 +1564,67 @@ dialog .dialog_toolbar .btn a.disabled {
15411564
opacity: 0.5;
15421565
}
15431566

1567+
.dialogYesNo .dialogYesNoContent {
1568+
margin-bottom: 12px;
1569+
margin-top: 12px;
1570+
white-space: pre-line;
1571+
}
1572+
1573+
.dialogYesNo .dialogYesNo-yesButton, .dialogYesNo .dialogYesNo-noButton {
1574+
margin: 0px;
1575+
}
1576+
1577+
.dialogYesNo .dialogYesNo-yesButton {
1578+
margin-right: 12px;
1579+
}
1580+
1581+
.dialogYesNo {
1582+
width: fit-content;
1583+
max-width: 400px;
1584+
}
1585+
1586+
.dialogWait {
1587+
width: fit-content;
1588+
max-width: 500px;
1589+
min-width: 300px;
1590+
}
1591+
1592+
.dialogWait .data-loading {
1593+
margin-top: 16px;
1594+
margin-bottom: 16px;
1595+
margin-left: auto;
1596+
margin-right: auto;
1597+
width: 100px;
1598+
height: 100px;
1599+
}
1600+
1601+
.dialogWait .dialogWaitTitle {
1602+
margin-left: auto;
1603+
margin-right: auto;
1604+
margin-bottom: 16px;
1605+
width: fit-content;
1606+
}
1607+
1608+
.dialogInformation .dialogInformationContent {
1609+
margin-bottom: 12px;
1610+
margin-top: 12px;
1611+
white-space: pre-line;
1612+
}
1613+
1614+
.dialogInformation .dialogInformation-confirmButton {
1615+
margin: 0px;
1616+
}
1617+
1618+
.dialogInformation {
1619+
width: fit-content;
1620+
max-width: 400px;
1621+
}
1622+
15441623
@media all and (max-width: 575px) {
15451624
dialog {
15461625
position: fixed;
1547-
width: calc(100% - 2em) !important;
1626+
width: calc(100% - 2em - 2px) !important; /* 2px - border */
1627+
max-width: unset;
15481628
height: auto !important;
15491629
bottom: 0;
15501630
top: 56px;
@@ -2348,7 +2428,6 @@ input {
23482428
.noUi-connect {
23492429
box-shadow: none;
23502430
}
2351-
23522431
/** Responsive grid **/
23532432
@media all and (max-width: 575px) {
23542433
.sm, .md, .lg, .xl {

src/css/tabs/firmware_flasher.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
cursor: default;
201201
color: #fff;
202202
background-color: #AFAFAF;
203-
border: none;
203+
border: 1px solid #AFAFAF;
204204
pointer-events: none;
205205
text-shadow: none;
206206
opacity: 0.5;

src/css/tabs/options.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
}
88
.tab-options .margin-bottom {
99
margin-bottom: 10px;
10+
display: grid;
11+
grid-template-columns: fit-content(300px) 1fr;
1012
}
1113
.tab-options select {
1214
background: var(--boxBackground);

0 commit comments

Comments
 (0)