Skip to content

Commit e63a5fe

Browse files
author
Ivan Efimov
committed
Presets TAB
1 parent 41747c6 commit e63a5fe

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
},
@@ -6205,5 +6214,205 @@
62056214
},
62066215
"cordovaExitAppMessage": {
62076216
"message": "Do you really want to close the configurator?"
6217+
},
6218+
"dropDownSelectAll": {
6219+
"message": "[Select all]",
6220+
"description": "Select all item in the drop down/multiple select"
6221+
},
6222+
"dropDownAll": {
6223+
"message": "All",
6224+
"description": "Text indicating everything is selected in the drop down/multiple select"
6225+
},
6226+
"tabPresets": {
6227+
"message": "Presets",
6228+
"description": "Presets tab title"
6229+
},
6230+
"presetsReload": {
6231+
"message": "Reload",
6232+
"description": "Text on the reload button that appears when there in an error loading presets index"
6233+
},
6234+
"presetsAuthor": {
6235+
"message": "Author:",
6236+
"description": "Hint text in the presets detailed dialog"
6237+
},
6238+
"presetsKeywords": {
6239+
"message": "Keywords:",
6240+
"description": "Hint text in the presets detailed dialog"
6241+
},
6242+
"presetsVersions": {
6243+
"message": "Firmware:",
6244+
"description": "Hint text in the presets detailed dialog"
6245+
},
6246+
"presetsOfficial": {
6247+
"message": "Official",
6248+
"description": "Hint text in the presets detailed dialog indication preset is official"
6249+
},
6250+
"presetsCommunity": {
6251+
"message": "Community",
6252+
"description": "Hint text in the presets detailed dialog indication preset is not official but community"
6253+
},
6254+
"presetsExperimental": {
6255+
"message": "Experimental",
6256+
"description": "Hint text in the presets detailed dialog indication preset is not official but experimental"
6257+
},
6258+
"presetsApply": {
6259+
"message": "Pick",
6260+
"description": "Button to pick a preset"
6261+
},
6262+
"presetsViewOnline": {
6263+
"message": "View online…",
6264+
"description": "Link text for opening preset file online"
6265+
},
6266+
"presetsOpenDiscussion": {
6267+
"message": "Discussion…",
6268+
"description": "Link text for opening preset discussion"
6269+
},
6270+
"presetsShowCli": {
6271+
"message": "Show CLI",
6272+
"description": "Button to show CLI code of a preset"
6273+
},
6274+
"presetsHideCli": {
6275+
"message": "Hide CLI",
6276+
"description": "Button to hide CLI code of a preset"
6277+
},
6278+
"presetsOptions": {
6279+
"message": "Options",
6280+
"description": "Text label for Options drop down select"
6281+
},
6282+
"presetsFilterCategory": {
6283+
"message": "Categories",
6284+
"description": "UI filter name"
6285+
},
6286+
"presetsFilterKeyword": {
6287+
"message": "Keywords",
6288+
"description": "UI filter name"
6289+
},
6290+
"presetsFilterAuthor": {
6291+
"message": "Authors",
6292+
"description": "UI filter name"
6293+
},
6294+
"presetsFilterFirmware": {
6295+
"message": "Firmwares",
6296+
"description": "UI filter name"
6297+
},
6298+
"presetsFilterStatus": {
6299+
"message": "Status",
6300+
"description": "UI filter name - official/community/experimental"
6301+
},
6302+
"presetsLoadError": {
6303+
"message": "Error loading presets from the internet",
6304+
"description": "Error report when failed to load presets index or a specific preset"
6305+
},
6306+
"presetsButtonSave": {
6307+
"message": "Save and Reboot",
6308+
"description": "A button that saves all appied presets - analog to 'save' command in CLI"
6309+
},
6310+
"presetsButtonCancel": {
6311+
"message": "Cancel",
6312+
"description": "A button that restarts FC without saving appied presets - analog to 'exit' command in CLI"
6313+
},
6314+
"presetsApplyingPresets": {
6315+
"message": "Applying configuration...",
6316+
"description": "First label in the progress dialog when applying configuration (presets or user config)"
6317+
},
6318+
"presetsPleaseWait": {
6319+
"message": "Please wait.",
6320+
"description": "Second label in the progress dialog when applying presets"
6321+
},
6322+
"presetsCliErrorsWaring": {
6323+
"message": "<span class='message-negative'>WARNING!</span><br/>Configuration has been applied with CLI errors.",
6324+
"description": "Text to show when there are CLI errors after applying presets or user configuration"
6325+
},
6326+
"presetsSaveAnyway": {
6327+
"message": "Save anyway",
6328+
"description": "Save anyway button on the CLI errors presets dialog"
6329+
},
6330+
"presetsWarningDialogTitle": {
6331+
"message": "WARNING!",
6332+
"description": "Warning title in the warning dialog in the presets"
6333+
},
6334+
"presetsWarningDialogYesButton": {
6335+
"message": "Agree",
6336+
"description": "Agree button in the presets warning dialog"
6337+
},
6338+
"presetsWarningDialogNoButton": {
6339+
"message": "Cancel",
6340+
"description": "Cancel button in the presets warning dialog"
6341+
},
6342+
"presetsWiki": {
6343+
"message": "Presets Wiki",
6344+
"description": "Button to open Presets Wiki link"
6345+
},
6346+
"presetsBackupSave": {
6347+
"message": "Save backup",
6348+
"description": "Button to backup current configuration to file"
6349+
},
6350+
"presetsBackupLoad": {
6351+
"message": "Load backup",
6352+
"description": "Button to load backup from the file"
6353+
},
6354+
"presetsLoadingDumpAll": {
6355+
"message": "Loading current configuration from the flight controller",
6356+
"description": "Title for the waiting dialog when loading dump all into a file"
6357+
},
6358+
"dumpAllNotSavedWarning": {
6359+
"message": "Error occured while saving current configuration",
6360+
"description": "Message appears on presets tab when saving current diff all into a file has failed"
6361+
},
6362+
"presetSources": {
6363+
"message": "Preset sources...",
6364+
"description": "A button to show preset sources dialog"
6365+
},
6366+
"presetsSourcesDialogTitle": {
6367+
"message": "Preset sources",
6368+
"description": "A button to show preset sources dialog"
6369+
},
6370+
"presetsSourcesDialogAddNew": {
6371+
"message": "Add new source",
6372+
"description": "A button to show preset sources dialog"
6373+
},
6374+
"presetsSourcesDialogDefaultSourceName": {
6375+
"message": "New Custom Preset Source",
6376+
"description": "A default preset source (repo) name"
6377+
},
6378+
"presetsSourcesDialogSaveSource": {
6379+
"message": "Save",
6380+
"description": "Presets tab, sources dialog, button to save new or editable source"
6381+
},
6382+
"presetsSourcesDialogResetSource": {
6383+
"message": "Reset",
6384+
"description": "Presets tab, sources dialog, button to reset source after modifications"
6385+
},
6386+
"presetsSourcesDialogMakeSourceActive": {
6387+
"message": "Make Active",
6388+
"description": "Presets tab, sources dialog, button to make selected source active"
6389+
},
6390+
"presetsSourcesDialogDeleteSource": {
6391+
"message": "Delete",
6392+
"description": "Presets tab, sources dialog, button to delete selected source"
6393+
},
6394+
"presetsWarningNotOfficialSource": {
6395+
"message": "<span class=\"message-negative\">WARNING!</span> A third party preset source is selected.",
6396+
"description": "Warning message that shows up when a third party preset source is selected"
6397+
},
6398+
"presetsWarningBackup": {
6399+
"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.",
6400+
"description": "Warning message that shows up at the top of the presets tab"
6401+
},
6402+
"presets_sources_dialog_warning": {
6403+
"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.",
6404+
"description": "Warning message that shows up at the top of the preset sources dialog"
6405+
},
6406+
"presetsWarningWrongVersionConfirmation": {
6407+
"message": "Picked preset requires firmware version $1<br/> Current firmware version is $2",
6408+
"description": "Warning message that shows up at the top of the preset sources dialog"
6409+
},
6410+
"presetsNoPresetsFound": {
6411+
"message": "No presets found for the given search paramteres",
6412+
"description": "Message that apprears on presets tab if no presets were found"
6413+
},
6414+
"presetsTooManyPresetsFound": {
6415+
"message": "Reached the maximum limit of the shown presets number",
6416+
"description": "Message that apprears on presets tab if too many presets found"
62086417
}
62096418
}

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)