Tao Zhou | 4fd32d5 | 2020-04-06 17:23:10 +0200 | [diff] [blame] | 1 | /** |
| 2 | * @license |
| 3 | * Copyright (C) 2020 The Android Open Source Project |
| 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | */ |
| 17 | |
| 18 | /** |
Tao Zhou | 4fd32d5 | 2020-04-06 17:23:10 +0200 | [diff] [blame] | 19 | * @desc Tab names for primary tabs on change view page. |
| 20 | */ |
Ben Rohlfs | 3a6ff7e | 2021-01-18 14:08:39 +0100 | [diff] [blame] | 21 | import {DiffPreferencesInfo} from '../types/diff'; |
| 22 | import {EditPreferencesInfo, PreferencesInfo} from '../types/common'; |
| 23 | |
Dmitrii Filippov | a1ae1ba | 2020-07-28 14:01:25 +0200 | [diff] [blame] | 24 | export enum PrimaryTab { |
| 25 | FILES = 'files', |
Gal Paikin | e6d6e1d | 2020-05-07 18:31:22 +0200 | [diff] [blame] | 26 | /** |
Ben Rohlfs | 4449660 | 2020-11-20 16:58:45 +0100 | [diff] [blame] | 27 | * When renaming 'comments' or 'findings', UrlFormatter.java must be updated. |
Gal Paikin | e6d6e1d | 2020-05-07 18:31:22 +0200 | [diff] [blame] | 28 | */ |
Dmitrii Filippov | a1ae1ba | 2020-07-28 14:01:25 +0200 | [diff] [blame] | 29 | COMMENT_THREADS = 'comments', |
| 30 | FINDINGS = 'findings', |
Ben Rohlfs | 4449660 | 2020-11-20 16:58:45 +0100 | [diff] [blame] | 31 | CHECKS = 'checks', |
Dmitrii Filippov | a1ae1ba | 2020-07-28 14:01:25 +0200 | [diff] [blame] | 32 | } |
Tao Zhou | 4fd32d5 | 2020-04-06 17:23:10 +0200 | [diff] [blame] | 33 | |
| 34 | /** |
Tao Zhou | 4fd32d5 | 2020-04-06 17:23:10 +0200 | [diff] [blame] | 35 | * @desc Tab names for secondary tabs on change view page. |
| 36 | */ |
Dmitrii Filippov | a1ae1ba | 2020-07-28 14:01:25 +0200 | [diff] [blame] | 37 | export enum SecondaryTab { |
| 38 | CHANGE_LOG = '_changeLog', |
| 39 | } |
Tao Zhou | 4fd32d5 | 2020-04-06 17:23:10 +0200 | [diff] [blame] | 40 | |
Tao Zhou | 0ae7596 | 2020-04-27 14:34:10 +0200 | [diff] [blame] | 41 | /** |
Tao Zhou | 0ae7596 | 2020-04-27 14:34:10 +0200 | [diff] [blame] | 42 | * @desc Tag names of change log messages. |
| 43 | */ |
Dmitrii Filippov | a1ae1ba | 2020-07-28 14:01:25 +0200 | [diff] [blame] | 44 | export enum MessageTag { |
| 45 | TAG_DELETE_REVIEWER = 'autogenerated:gerrit:deleteReviewer', |
| 46 | TAG_NEW_PATCHSET = 'autogenerated:gerrit:newPatchSet', |
| 47 | TAG_NEW_WIP_PATCHSET = 'autogenerated:gerrit:newWipPatchSet', |
| 48 | TAG_REVIEWER_UPDATE = 'autogenerated:gerrit:reviewerUpdate', |
| 49 | TAG_SET_PRIVATE = 'autogenerated:gerrit:setPrivate', |
| 50 | TAG_UNSET_PRIVATE = 'autogenerated:gerrit:unsetPrivate', |
| 51 | TAG_SET_READY = 'autogenerated:gerrit:setReadyForReview', |
| 52 | TAG_SET_WIP = 'autogenerated:gerrit:setWorkInProgress', |
| 53 | TAG_SET_ASSIGNEE = 'autogenerated:gerrit:setAssignee', |
| 54 | TAG_UNSET_ASSIGNEE = 'autogenerated:gerrit:deleteAssignee', |
| 55 | } |
Dhruv Srivastava | 9c853fc | 2020-05-05 13:48:25 +0200 | [diff] [blame] | 56 | |
| 57 | /** |
Dhruv Srivastava | 9c853fc | 2020-05-05 13:48:25 +0200 | [diff] [blame] | 58 | * @desc Modes for gr-diff-cursor |
| 59 | * The scroll behavior for the cursor. Values are 'never' and |
| 60 | * 'keep-visible'. 'keep-visible' will only scroll if the cursor is beyond |
| 61 | * the viewport. |
| 62 | */ |
Dmitrii Filippov | a1ae1ba | 2020-07-28 14:01:25 +0200 | [diff] [blame] | 63 | export enum ScrollMode { |
| 64 | KEEP_VISIBLE = 'keep-visible', |
| 65 | NEVER = 'never', |
| 66 | } |
Dmitrii Filippov | 4e4522e | 2020-05-06 12:50:49 +0200 | [diff] [blame] | 67 | |
| 68 | /** |
Dmitrii Filippov | 4e4522e | 2020-05-06 12:50:49 +0200 | [diff] [blame] | 69 | * @desc Specifies status for a change |
| 70 | */ |
Dmitrii Filippov | a1ae1ba | 2020-07-28 14:01:25 +0200 | [diff] [blame] | 71 | export enum ChangeStatus { |
| 72 | ABANDONED = 'ABANDONED', |
| 73 | MERGED = 'MERGED', |
| 74 | NEW = 'NEW', |
| 75 | } |
Dhruv Srivastava | dc6739b | 2020-05-06 17:24:31 +0200 | [diff] [blame] | 76 | |
| 77 | /** |
Dhruv Srivastava | dc6739b | 2020-05-06 17:24:31 +0200 | [diff] [blame] | 78 | * @desc Special file paths |
| 79 | */ |
Dmitrii Filippov | a1ae1ba | 2020-07-28 14:01:25 +0200 | [diff] [blame] | 80 | export enum SpecialFilePath { |
| 81 | PATCHSET_LEVEL_COMMENTS = '/PATCHSET_LEVEL', |
| 82 | COMMIT_MESSAGE = '/COMMIT_MSG', |
| 83 | MERGE_LIST = '/MERGE_LIST', |
| 84 | } |
Dmitrii Filippov | bfbd275 | 2020-07-28 14:51:25 +0200 | [diff] [blame] | 85 | |
| 86 | /** |
| 87 | * @desc The reviewer state |
| 88 | */ |
| 89 | export enum RequirementStatus { |
| 90 | OK = 'OK', |
| 91 | NOT_READY = 'NOT_READY', |
| 92 | RULE_ERROR = 'RULE_ERROR', |
| 93 | } |
| 94 | |
| 95 | /** |
| 96 | * @desc The reviewer state |
| 97 | */ |
| 98 | export enum ReviewerState { |
| 99 | REVIEWER = 'REVIEWER', |
| 100 | CC = 'CC', |
| 101 | REMOVED = 'REMOVED', |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * @desc The patchset kind |
| 106 | */ |
| 107 | export enum RevisionKind { |
| 108 | REWORK = 'REWORK', |
| 109 | TRIVIAL_REBASE = 'TRIVIAL_REBASE', |
| 110 | MERGE_FIRST_PARENT_UPDATE = 'MERGE_FIRST_PARENT_UPDATE', |
| 111 | NO_CODE_CHANGE = 'NO_CODE_CHANGE', |
| 112 | NO_CHANGE = 'NO_CHANGE', |
| 113 | } |
| 114 | |
| 115 | /** |
| 116 | * @desc The status of fixing the problem |
| 117 | */ |
| 118 | export enum ProblemInfoStatus { |
| 119 | FIXED = 'FIXED', |
| 120 | FIX_FAILED = 'FIX_FAILED', |
| 121 | } |
| 122 | |
| 123 | /** |
| 124 | * @desc The status of the file |
| 125 | */ |
| 126 | export enum FileInfoStatus { |
| 127 | ADDED = 'A', |
| 128 | DELETED = 'D', |
| 129 | RENAMED = 'R', |
| 130 | COPIED = 'C', |
| 131 | REWRITTEN = 'W', |
Tao Zhou | 7a51422 | 2020-08-03 15:21:07 +0200 | [diff] [blame] | 132 | // Modifed = 'M', // but API not set it if the file was modified |
| 133 | UNMODIFIED = 'U', // Not returned by BE, but added by UI for certain files |
Dmitrii Filippov | bfbd275 | 2020-07-28 14:51:25 +0200 | [diff] [blame] | 134 | } |
| 135 | |
| 136 | /** |
| 137 | * @desc The status of the file |
| 138 | */ |
| 139 | export enum GpgKeyInfoStatus { |
| 140 | BAD = 'BAD', |
| 141 | OK = 'OK', |
| 142 | TRUSTED = 'TRUSTED', |
| 143 | } |
Ben Rohlfs | ee775eb | 2020-07-31 16:10:15 +0200 | [diff] [blame] | 144 | |
| 145 | /** |
| 146 | * @desc Used for server config of accounts |
| 147 | */ |
| 148 | export enum DefaultDisplayNameConfig { |
| 149 | USERNAME = 'USERNAME', |
| 150 | FIRST_NAME = 'FIRST_NAME', |
| 151 | FULL_NAME = 'FULL_NAME', |
| 152 | } |
Dmitrii Filippov | ec5d946 | 2020-08-04 15:33:20 +0200 | [diff] [blame] | 153 | |
| 154 | /** |
| 155 | * @desc The state of the projects |
| 156 | */ |
| 157 | export enum ProjectState { |
| 158 | ACTIVE = 'ACTIVE', |
| 159 | READ_ONLY = 'READ_ONLY', |
| 160 | HIDDEN = 'HIDDEN', |
| 161 | } |
Ben Rohlfs | 5f02faa | 2020-08-06 11:02:31 +0200 | [diff] [blame] | 162 | |
| 163 | export enum Side { |
| 164 | LEFT = 'left', |
| 165 | RIGHT = 'right', |
| 166 | } |
Ben Rohlfs | 322b13e | 2020-08-07 21:41:44 +0200 | [diff] [blame] | 167 | |
| 168 | /** |
| 169 | * The type in ConfigParameterInfo entity. |
| 170 | * https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#config-parameter-info |
| 171 | */ |
| 172 | export enum ConfigParameterInfoType { |
Dmitrii Filippov | 782f055 | 2020-08-14 13:28:34 +0200 | [diff] [blame] | 173 | // Should be kept in sync with |
| 174 | // gerrit/java/com/google/gerrit/extensions/api/projects/ProjectConfigEntryType.java. |
Ben Rohlfs | 322b13e | 2020-08-07 21:41:44 +0200 | [diff] [blame] | 175 | STRING = 'STRING', |
| 176 | INT = 'INT', |
| 177 | LONG = 'LONG', |
| 178 | BOOLEAN = 'BOOLEAN', |
| 179 | LIST = 'LIST', |
| 180 | ARRAY = 'ARRAY', |
| 181 | } |
| 182 | |
| 183 | /** |
| 184 | * All supported submit types. |
| 185 | * https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#submit-type-info |
| 186 | */ |
| 187 | export enum SubmitType { |
| 188 | MERGE_IF_NECESSARY = 'MERGE_IF_NECESSARY', |
| 189 | FAST_FORWARD_ONLY = 'FAST_FORWARD_ONLY', |
| 190 | REBASE_IF_NECESSARY = 'REBASE_IF_NECESSARY', |
| 191 | REBASE_ALWAYS = 'REBASE_ALWAYS', |
| 192 | MERGE_ALWAYS = 'MERGE_ALWAYS ', |
| 193 | CHERRY_PICK = 'CHERRY_PICK', |
| 194 | INHERIT = 'INHERIT', |
| 195 | } |
| 196 | |
Milutin Kristofic | bec88f1 | 2020-10-13 16:53:28 +0200 | [diff] [blame] | 197 | /** |
| 198 | * https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#mergeable-info |
| 199 | */ |
| 200 | export enum MergeStrategy { |
| 201 | RECURSIVE = 'recursive', |
| 202 | RESOLVE = 'resolve', |
| 203 | SIMPLE_TWO_WAY_IN_CORE = 'simple-two-way-in-core', |
| 204 | OURS = 'ours', |
| 205 | THEIRS = 'theirs', |
| 206 | } |
| 207 | |
Ben Rohlfs | 322b13e | 2020-08-07 21:41:44 +0200 | [diff] [blame] | 208 | /* |
| 209 | * Enum for possible configured value in InheritedBooleanInfo. |
| 210 | * https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#inherited-boolean-info |
| 211 | */ |
| 212 | export enum InheritedBooleanInfoConfiguredValue { |
| 213 | TRUE = 'TRUE', |
| 214 | FALSE = 'FALSE', |
| 215 | INHERITED = 'INHERITED', |
| 216 | } |
Ben Rohlfs | 417a3fd | 2020-08-11 16:53:20 +0200 | [diff] [blame] | 217 | |
| 218 | export enum AccountTag { |
| 219 | SERVICE_USER = 'SERVICE_USER', |
| 220 | } |
Dmitrii Filippov | d5b1dc7 | 2020-08-11 11:06:03 +0200 | [diff] [blame] | 221 | |
| 222 | /** |
| 223 | * Enum for possible PermissionRuleInfo actions |
| 224 | * https://gerrit-review.googlesource.com/Documentation/rest-api-access.html#permission-info |
| 225 | */ |
| 226 | export enum PermissionAction { |
| 227 | ALLOW = 'ALLOW', |
| 228 | DENY = 'DENY', |
| 229 | BLOCK = 'BLOCK', |
| 230 | // Special values for global capabilities |
| 231 | INTERACTIVE = 'INTERACTIVE', |
| 232 | BATCH = 'BATCH', |
| 233 | } |
| 234 | |
| 235 | /** |
| 236 | * This capability allows users to use the thread pool reserved for 'Non-Interactive Users'. |
| 237 | * https://gerrit-review.googlesource.com/Documentation/access-control.html#capability_priority |
| 238 | */ |
| 239 | export enum UserPriority { |
| 240 | BATCH = 'BATCH', |
| 241 | INTERACTIVE = 'INTERACTIVE', |
| 242 | } |
| 243 | |
| 244 | /** |
| 245 | * Enum for all http methods used in Gerrit. |
| 246 | */ |
| 247 | export enum HttpMethod { |
| 248 | HEAD = 'HEAD', |
| 249 | POST = 'POST', |
| 250 | GET = 'GET', |
| 251 | DELETE = 'DELETE', |
| 252 | PUT = 'PUT', |
| 253 | } |
| 254 | |
| 255 | /** |
| 256 | * The side on which the comment was added |
| 257 | * https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#comment-info |
| 258 | */ |
| 259 | export enum CommentSide { |
| 260 | REVISION = 'REVISION', |
| 261 | PARENT = 'PARENT', |
| 262 | } |
| 263 | |
| 264 | /** |
| 265 | * Allowed app themes |
| 266 | * https://gerrit-review.googlesource.com/Documentation/rest-api-accounts.html#preferences-input |
| 267 | */ |
| 268 | export enum AppTheme { |
| 269 | DARK = 'DARK', |
| 270 | LIGHT = 'LIGHT', |
| 271 | } |
| 272 | |
| 273 | /** |
| 274 | * Date formats in preferences |
| 275 | * https://gerrit-review.googlesource.com/Documentation/rest-api-accounts.html#preferences-input |
| 276 | */ |
| 277 | export enum DateFormat { |
| 278 | STD = 'STD', |
| 279 | US = 'US', |
| 280 | ISO = 'ISO', |
| 281 | EURO = 'EURO', |
| 282 | UK = 'UK', |
| 283 | } |
| 284 | |
| 285 | /** |
| 286 | * Time formats in preferences |
| 287 | * https://gerrit-review.googlesource.com/Documentation/rest-api-accounts.html#preferences-input |
| 288 | */ |
| 289 | export enum TimeFormat { |
| 290 | HHMM_12 = 'HHMM_12', |
| 291 | HHMM_24 = 'HHMM_24', |
| 292 | } |
| 293 | |
| 294 | /** |
| 295 | * Diff type in preferences |
| 296 | * https://gerrit-review.googlesource.com/Documentation/rest-api-accounts.html#preferences-input |
| 297 | */ |
| 298 | export enum DiffViewMode { |
| 299 | SIDE_BY_SIDE = 'SIDE_BY_SIDE', |
| 300 | UNIFIED = 'UNIFIED_DIFF', |
| 301 | } |
| 302 | |
| 303 | /** |
| 304 | * The type of email strategy to use. |
| 305 | * https://gerrit-review.googlesource.com/Documentation/rest-api-accounts.html#preferences-input |
| 306 | */ |
| 307 | export enum EmailStrategy { |
| 308 | ENABLED = 'ENABLED', |
| 309 | CC_ON_OWN_COMMENTS = 'CC_ON_OWN_COMMENTS', |
Ben Rohlfs | 868fad4 | 2020-10-13 11:40:50 +0200 | [diff] [blame] | 310 | ATTENTION_SET_ONLY = 'ATTENTION_SET_ONLY', |
Dmitrii Filippov | d5b1dc7 | 2020-08-11 11:06:03 +0200 | [diff] [blame] | 311 | DISABLED = 'DISABLED', |
| 312 | } |
| 313 | |
| 314 | /** |
Dmitrii Filippov | d883c79 | 2020-10-09 16:10:51 +0200 | [diff] [blame] | 315 | * The type of email format to use. |
| 316 | * Doesn't mentioned in doc, but exists in Java class GeneralPreferencesInfo. |
| 317 | */ |
| 318 | |
| 319 | export enum EmailFormat { |
| 320 | PLAINTEXT = 'PLAINTEXT', |
| 321 | HTML_PLAINTEXT = 'HTML_PLAINTEXT', |
| 322 | } |
| 323 | |
| 324 | /** |
Dmitrii Filippov | d5b1dc7 | 2020-08-11 11:06:03 +0200 | [diff] [blame] | 325 | * The base which should be pre-selected in the 'Diff Against' drop-down list when the change screen is opened for a merge commit |
| 326 | * https://gerrit-review.googlesource.com/Documentation/rest-api-accounts.html#preferences-input |
| 327 | */ |
| 328 | export enum DefaultBase { |
| 329 | AUTO_MERGE = 'AUTO_MERGE', |
| 330 | FIRST_PARENT = 'FIRST_PARENT', |
| 331 | } |
| 332 | |
| 333 | /** |
Dmitrii Filippov | d5b1dc7 | 2020-08-11 11:06:03 +0200 | [diff] [blame] | 334 | * how draft comments are handled |
| 335 | */ |
| 336 | export enum DraftsAction { |
| 337 | PUBLISH = 'PUBLISH', |
| 338 | PUBLISH_ALL_REVISIONS = 'PUBLISH_ALL_REVISIONS', |
| 339 | KEEP = 'KEEP', |
| 340 | } |
| 341 | |
| 342 | export enum NotifyType { |
| 343 | NONE = 'NONE', |
| 344 | OWNER = 'OWNER', |
| 345 | OWNER_REVIEWERS = 'OWNER_REVIEWERS', |
| 346 | ALL = 'ALL', |
| 347 | } |
Dmitrii Filippov | ad72bf9 | 2020-10-14 10:37:58 +0200 | [diff] [blame] | 348 | |
| 349 | /** |
| 350 | * The authentication type that is configured on the server. |
| 351 | * https://gerrit-review.googlesource.com/Documentation/rest-api-config.html#auth-info |
| 352 | */ |
| 353 | export enum AuthType { |
| 354 | OPENID = 'OPENID', |
| 355 | OPENID_SSO = 'OPENID_SSO', |
| 356 | OAUTH = 'OAUTH', |
| 357 | HTTP = 'HTTP', |
| 358 | HTTP_LDAP = 'HTTP_LDAP', |
| 359 | CLIENT_SSL_CERT_LDAP = 'CLIENT_SSL_CERT_LDAP', |
| 360 | LDAP = 'LDAP', |
| 361 | LDAP_BIND = 'LDAP_BIND', |
| 362 | CUSTOM_EXTENSION = 'CUSTOM_EXTENSION', |
| 363 | DEVELOPMENT_BECOME_ANY_ACCOUNT = 'DEVELOPMENT_BECOME_ANY_ACCOUNT', |
| 364 | } |
Dmitrii Filippov | 78448cd | 2020-10-26 17:39:11 +0100 | [diff] [blame] | 365 | |
| 366 | /** |
| 367 | * Controls visibility of other users' dashboard pages and completion suggestions to web users |
| 368 | * https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#accounts.visibility |
| 369 | */ |
| 370 | export enum AccountsVisibility { |
| 371 | ALL = 'ALL', |
| 372 | SAME_GROUP = 'SAME_GROUP', |
| 373 | VISIBLE_GROUP = 'VISIBLE_GROUP', |
| 374 | NONE = 'NONE', |
| 375 | } |
| 376 | |
| 377 | /** |
| 378 | * Account fields that are editable |
| 379 | * https://gerrit-review.googlesource.com/Documentation/rest-api-config.html#auth-info |
| 380 | */ |
| 381 | export enum EditableAccountField { |
| 382 | FULL_NAME = 'FULL_NAME', |
| 383 | USER_NAME = 'USER_NAME', |
| 384 | REGISTER_NEW_EMAIL = 'REGISTER_NEW_EMAIL', |
| 385 | } |
| 386 | |
| 387 | /** |
| 388 | * This setting determines when Gerrit computes if a change is mergeable or not. |
| 389 | * https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#change.mergeabilityComputationBehavior |
| 390 | */ |
| 391 | export enum MergeabilityComputationBehavior { |
| 392 | API_REF_UPDATED_AND_CHANGE_REINDEX = 'API_REF_UPDATED_AND_CHANGE_REINDEX', |
| 393 | REF_UPDATED_AND_CHANGE_REINDEX = 'REF_UPDATED_AND_CHANGE_REINDEX', |
| 394 | NEVER = 'NEVER', |
| 395 | } |
Ben Rohlfs | 3a6ff7e | 2021-01-18 14:08:39 +0100 | [diff] [blame] | 396 | |
| 397 | // TODO(TS): Many properties are omitted here, but they are required. |
| 398 | // Add default values for missing properties. |
| 399 | export function createDefaultPreferences() { |
| 400 | return { |
| 401 | changes_per_page: 25, |
| 402 | default_diff_view: DiffViewMode.SIDE_BY_SIDE, |
| 403 | diff_view: DiffViewMode.SIDE_BY_SIDE, |
| 404 | size_bar_in_change_table: true, |
| 405 | } as PreferencesInfo; |
| 406 | } |
| 407 | |
| 408 | // These defaults should match the defaults in |
| 409 | // java/com/google/gerrit/extensions/client/DiffPreferencesInfo.java |
| 410 | // NOTE: There are some settings that don't apply to PolyGerrit |
| 411 | // (Render mode being at least one of them). |
| 412 | export function createDefaultDiffPrefs(): DiffPreferencesInfo { |
| 413 | return { |
| 414 | auto_hide_diff_table_header: true, |
| 415 | context: 10, |
| 416 | cursor_blink_rate: 0, |
| 417 | font_size: 12, |
| 418 | ignore_whitespace: 'IGNORE_NONE', |
| 419 | intraline_difference: true, |
| 420 | line_length: 100, |
| 421 | line_wrapping: false, |
| 422 | show_line_endings: true, |
| 423 | show_tabs: true, |
| 424 | show_whitespace_errors: true, |
| 425 | syntax_highlighting: true, |
| 426 | tab_size: 8, |
| 427 | theme: 'DEFAULT', |
| 428 | }; |
| 429 | } |
| 430 | |
| 431 | // These defaults should match the defaults in |
| 432 | // java/com/google/gerrit/extensions/client/EditPreferencesInfo.java |
| 433 | export function createDefaultEditPrefs(): EditPreferencesInfo { |
| 434 | return { |
| 435 | auto_close_brackets: false, |
| 436 | cursor_blink_rate: 0, |
| 437 | hide_line_numbers: false, |
| 438 | hide_top_menu: false, |
| 439 | indent_unit: 2, |
| 440 | indent_with_tabs: false, |
| 441 | key_map_type: 'DEFAULT', |
| 442 | line_length: 100, |
| 443 | line_wrapping: false, |
| 444 | match_brackets: true, |
| 445 | show_base: false, |
| 446 | show_tabs: true, |
| 447 | show_whitespace_errors: true, |
| 448 | syntax_highlighting: true, |
| 449 | tab_size: 8, |
| 450 | theme: 'DEFAULT', |
| 451 | }; |
| 452 | } |