Prechádzať zdrojové kódy

Bug fix, save was not working.

Afshin Darian 7 rokov pred
rodič
commit
11232547c9

+ 7 - 1
packages/coreutils/src/settingregistry.ts

@@ -73,6 +73,9 @@ interface ISchemaValidator {
    *
    * @return A list of errors if the schema fails to validate or `null` if there
    * are no errors.
+   *
+   * #### Notes
+   * It is safe to call this function multiple times with the same plugin name.
    */
   addSchema(plugin: string, schema: ISettingRegistry.ISchema): ISchemaValidator.IError[] | null;
 
@@ -337,6 +340,9 @@ class DefaultSchemaValidator implements ISchemaValidator {
    *
    * @return A list of errors if the schema fails to validate or `null` if there
    * are no errors.
+   *
+   * #### Notes
+   * It is safe to call this function multiple times with the same plugin name.
    */
   addSchema(plugin: string, schema: ISettingRegistry.ISchema): ISchemaValidator.IError[] | null {
     const validate = this._validator.getSchema('main');
@@ -550,7 +556,7 @@ class SettingRegistry {
       return this.load(plugin).then(() => this.set(plugin, key, value));
     }
 
-    plugins[plugin].data[key] = value;
+    plugins[plugin].data.user[key] = value;
 
     return this._save(plugin);
   }

+ 2 - 2
packages/settingeditor-extension/style/settingeditor.css

@@ -49,8 +49,8 @@
   list-style-type: none;
   margin: 0;
   padding: 0;
-  min-width: 200px;
-  width: 200px;
+  min-width: 150px;
+  width: 150px;
 }