foam-framework
Version:
MVC metaprogramming framework
56 lines (52 loc) • 1.13 kB
JavaScript
/**
* @license
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
CLASS({
package: 'foam.apps.builder',
name: 'Identity',
ids: [ 'id' ],
properties: [
{
model_: 'StringProperty',
name: 'id',
},
{
model_: 'StringProperty',
name: 'displayName',
},
{
model_: 'StringProperty',
name: 'email',
},
{
model_: 'StringProperty',
name: 'iconUrl',
view: {
factory_: 'foam.ui.ImageView',
extraClassName: 'profile-image',
},
},
'oauth',
{
model_: 'foam.core.types.StringEnumProperty',
name: 'authType',
required: true,
choices: [
['CHROME_IDENTITY', 'Chrome Identity'],
['WEB', 'Web'],
],
},
{
model_: 'StringProperty',
name: 'label',
defaultValueFn: function() { return this.displayName; },
},
],
});