Browse Source

trying to fix jsdoc error

sisyphus
Dustin Falgout 9 years ago
parent
commit
10398f0612
  1. 105
      themes/_vendor/js/mock.js

105
themes/_vendor/js/mock.js vendored

@ -47,7 +47,8 @@ String.prototype.capitalize = function() {
* created by the theme's code, but rather by the {@link LightDMGreeter} class.
* @interface
*/
let LightDMSession = ({comment, key, name}) => ({
let LightDMSession = function( { comment, key, name } ) {
return {
/**
* The comment for the session.
* @type {String}
@ -68,7 +69,8 @@ let LightDMSession = ({comment, key, name}) => ({
* @readonly
*/
name
});
}
};
/**
@ -76,7 +78,8 @@ let LightDMSession = ({comment, key, name}) => ({
* created by the theme's code, but rather by the {@link LightDMGreeter} class.
* @interface
*/
let LightDMLanguage = ({code, name, territory}) => ({
let LightDMLanguage = function( { code, name, territory } ) {
return {
/**
* The code for the language.
* @type {String}
@ -97,7 +100,8 @@ let LightDMLanguage = ({code, name, territory}) => ({
* @readonly
*/
territory
});
}
};
/**
@ -105,7 +109,8 @@ let LightDMLanguage = ({code, name, territory}) => ({
* objects are not created by the theme's code, but rather by the {@link LightDMGreeter} class.
* @interface
*/
let LightDMLayout = ({description, name, short_description}) => ({
let LightDMLayout = function( { description, name, short_description } ) {
return {
/**
* The description for the layout.
* @type {String}
@ -126,7 +131,8 @@ let LightDMLayout = ({description, name, short_description}) => ({
* @readonly
*/
short_description
});
}
};
/**
@ -134,7 +140,8 @@ let LightDMLayout = ({description, name, short_description}) => ({
* objects are not created by the theme's code, but rather by the {@link LightDMGreeter} class.
* @interface
*/
let LightDMUser = ( user_info ) => ({
let LightDMUser = function( user_info ) {
return {
/**
* The display name for the user.
* @type {String}
@ -206,7 +213,8 @@ let LightDMUser = ( user_info ) => ({
* @readonly
*/
real_name: user_info.real_name || ''
});
}
};
/**
@ -253,7 +261,12 @@ class GreeterUtil {
* @returns {String}
*/
txt2html( text ) {
let entities_map = { '"': '&quot;', '&': '&amp;', '<': '&lt;', '>': '&gt;' };
let entities_map = {
'"': '&quot;',
'&': '&amp;',
'<': '&lt;',
'>': '&gt;'
};
return text.replace(/[\"&<>]/g, a => entities_map[a]);
}
@ -688,7 +701,13 @@ class LightDMGreeter {
*/
MockData = () => ({
greeter: {
default_values: {string: () => '', int: () => 0, bool: () => false, list: () => [], 'null': () => null},
default_values: {
string: () => '',
int: () => 0,
bool: () => false,
list: () => [],
'null': () => null
},
hostname: 'Mock Greeter',
properties: {
string: ['authentication_user', 'autologin_user', 'default_session', 'hostname', 'num_users'],
@ -703,21 +722,65 @@ MockData = () => ({
}
},
languages: [
{name: 'English', code: 'en_US.utf8', territory: 'USA'},
{name: 'Catalan', code: 'ca_ES.utf8', territory: 'Spain'},
{name: 'French', code: 'fr_FR.utf8', territory: 'France'}
{
name: 'English',
code: 'en_US.utf8',
territory: 'USA'
},
{
name: 'Catalan',
code: 'ca_ES.utf8',
territory: 'Spain'
},
{
name: 'French',
code: 'fr_FR.utf8',
territory: 'France'
}
],
layouts: [
{name: 'us', short_description: 'en', description: 'English (US)'},
{name: 'at', short_description: 'de', description: 'German (Austria)'},
{name: 'us rus', short_description: 'ru', description: 'Russian (US, phonetic)'}
{
name: 'us',
short_description: 'en',
description: 'English (US)'
},
{
name: 'at',
short_description: 'de',
description: 'German (Austria)'
},
{
name: 'us rus',
short_description: 'ru',
description: 'Russian (US, phonetic)'
}
],
sessions: [
{key: 'gnome', name: 'GNOME', comment: 'This session logs you into GNOME'},
{key: 'cinnamon', name: 'Cinnamon', comment: 'This session logs you into Cinnamon'},
{key: 'plasma', name: 'Plasma', comment: 'Plasma by KDE'},
{key: 'mate', name: 'MATE', comment: 'This session logs you into MATE'},
{key: 'openbox', name: 'Openbox', comment: 'This session logs you into Openbox'}
{
key: 'gnome',
name: 'GNOME',
comment: 'This session logs you into GNOME'
},
{
key: 'cinnamon',
name: 'Cinnamon',
comment: 'This session logs you into Cinnamon'
},
{
key: 'plasma',
name: 'Plasma',
comment: 'Plasma by KDE'
},
{
key: 'mate',
name: 'MATE',
comment: 'This session logs you into MATE'
},
{
key: 'openbox',
name: 'Openbox',
comment: 'This session logs you into Openbox'
}
],
users: [
{

Loading…
Cancel
Save