Add console preferences
This will allow to use console preferences using normal userconfig framework. Issue #13466 Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
4f2709fe01
commit
a2fd98d9f1
@ -3302,6 +3302,62 @@ Default options for Transformations
|
||||
:type: array
|
||||
:default: array('', '', '')
|
||||
|
||||
Console settings
|
||||
----------------
|
||||
|
||||
.. note::
|
||||
|
||||
These settings are mostly meant to be changed by user.
|
||||
|
||||
.. config:option:: $cfg['Console']['StartHistory']
|
||||
|
||||
:type: boolean
|
||||
:default: false
|
||||
|
||||
Show query history at start
|
||||
|
||||
.. config:option:: $cfg['Console']['AlwaysExpand']
|
||||
|
||||
:type: boolean
|
||||
:default: false
|
||||
|
||||
Always expand query messages
|
||||
|
||||
.. config:option:: $cfg['Console']['CurrentQuery']
|
||||
|
||||
:type: boolean
|
||||
:default: true
|
||||
|
||||
Show current browsing query
|
||||
|
||||
.. config:option:: $cfg['Console']['EnterExecutes']
|
||||
|
||||
:type: boolean
|
||||
:default: false
|
||||
|
||||
Execute queries on Enter and insert new line with Shift + Enter
|
||||
|
||||
.. config:option:: $cfg['Console']['DarkTheme']
|
||||
|
||||
:type: boolean
|
||||
:default: false
|
||||
|
||||
Switch to dark theme
|
||||
|
||||
.. config:option:: $cfg['Console']['Mode']
|
||||
|
||||
:type: string
|
||||
:default: 'info'
|
||||
|
||||
Console mode
|
||||
|
||||
.. config:option:: $cfg['Console']['Height']
|
||||
|
||||
:type: integer
|
||||
:default: 92
|
||||
|
||||
Console height
|
||||
|
||||
Developer
|
||||
---------
|
||||
|
||||
|
||||
@ -599,6 +599,8 @@ class Descriptions
|
||||
return __('Warnings');
|
||||
case 'Form_Warnings_desc':
|
||||
return __('Disable some of the warnings shown by phpMyAdmin.');
|
||||
case 'Form_Console_name':
|
||||
return __('Console');
|
||||
case 'GZipDump_desc':
|
||||
return __(
|
||||
'Enable gzip compression for import '
|
||||
@ -1456,6 +1458,20 @@ class Descriptions
|
||||
);
|
||||
case 'ZeroConf_name':
|
||||
return __('Enable Zero Configuration mode');
|
||||
case 'Console_StartHistory_name':
|
||||
return __('Show query history at start');
|
||||
case 'Console_AlwaysExpand_name':
|
||||
return __('Always expand query messages');
|
||||
case 'Console_CurrentQuery_name':
|
||||
return __('Show current browsing query');
|
||||
case 'Console_EnterExecutes_name':
|
||||
return __('Execute queries on Enter and insert new line with Shift + Enter');
|
||||
case 'Console_DarkTheme_name':
|
||||
return __('Switch to dark theme');
|
||||
case 'Console_Height_name':
|
||||
return __('Console height');
|
||||
case 'Console_Mode_name':
|
||||
return __('Console mode');
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -53,6 +53,15 @@ class FeaturesForm extends BaseForm
|
||||
'LoginCookieValidityDisableWarning',
|
||||
'ReservedWordDisableWarning'
|
||||
),
|
||||
'Console' => array(
|
||||
'Console/Mode',
|
||||
'Console/StartHistory',
|
||||
'Console/AlwaysExpand',
|
||||
'Console/CurrentQuery',
|
||||
'Console/EnterExecutes',
|
||||
'Console/DarkTheme',
|
||||
'Console/Height',
|
||||
),
|
||||
);
|
||||
// skip Developer form if no setting is available
|
||||
if ($GLOBALS['cfg']['UserprefsDeveloperTab']) {
|
||||
|
||||
@ -3115,6 +3115,21 @@ $cfg['MysqlMinVersion'] = array(
|
||||
*/
|
||||
$cfg['DisableShortcutKeys'] = false;
|
||||
|
||||
/**
|
||||
* Console configuration
|
||||
*
|
||||
* This is mostly meant for user preferences.
|
||||
*/
|
||||
$cfg['Console'] = [
|
||||
'StartHistory' => false,
|
||||
'AlwaysExpand' => false,
|
||||
'CurrentQuery' => true,
|
||||
'EnterExecutes' => false,
|
||||
'DarkTheme' => false,
|
||||
'Mode' => 'info',
|
||||
'Height' => 92,
|
||||
];
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Default options for transformations
|
||||
|
||||
@ -210,6 +210,11 @@ $cfg_db['Export']['odt_structure_or_data'] = $cfg_db['Export']['_sod_select'];
|
||||
$cfg_db['Export']['texytext_structure_or_data'] = $cfg_db['Export']['_sod_select'];
|
||||
$cfg_db['Export']['texytext_null'] = 'short_string';
|
||||
|
||||
$cfg_db['Console']['Mode'] = array(
|
||||
'info', 'show', 'collapse'
|
||||
);
|
||||
$cfg_db['Console']['Height'] = 'integer';
|
||||
|
||||
/**
|
||||
* Default values overrides
|
||||
* Use only full paths
|
||||
|
||||
Loading…
Reference in New Issue
Block a user