Release 0.65.0 (#10893)
* changed saml integration to store data on mongo instead of memory * Update saml_server.js * [FIX] Fix create channel, when created a readonly channel (#10665) [FIX] Channel owner was being set as muted when creating a read-only channel * Correct links to Rocket.Chat documentation (#10674) Correct links in README file * Fix flickering on message-box emoji icon (#10678) [FIX] Message box emoji icon was flickering when typing a text * add `npm run postinstall` into build script (#10524) Add `npm run postinstall` into example build script * [FIX] Improve desktop notification formatting (#10445) * Improved notification formatting * Fixed lint issues * Changed body format * Fixed the problem of missing descriptions on message attachments (#10705) * [BREAK] Improvements to notifications logic (#10686) [NEW] Improvements to notifications logic * LingoHub Update 🚀 (#10691) Manual push by LingoHub User: Rodrigo Nascimento. Project: Rocket.Chat Made with ❤️ by https://lingohub.com * [NEW] Setup Wizard (#10523) * welcome * . * stylelint * new ilustration * new layout * . * implements dicts * added all setup wizard settings to wizard * fix some setup wizard css * fix setup wizard js linter errors * remove old setup wizard templaates * setup wizard has just one main tag now * setup wizard registration fields filter is more readable * add register server page to setup wizard * fix setup wizard progress bar on RTL * setup wizard is registering users * Add setup wizard tests, routes and fix batch * fix setup wizard tests * add api test back * comment rocketchat:google-natural-language package and remove logs * add some translation keys for setup wizard * remove old setup wizard template * fix sort code on setup wizard * fix getWizardSetting method * new migration for setupwizard * setup wizard setting migration * fix setupwizard migration * Update versions * fix some setup wizard code logic * fix setup wizard registerServer setting * rever package-lock.json * rever google-natural-language .npm folder * rever meteor packages file and add setup wizard * remove some default values from setup wizard settings * add advocacy option on setup wizard industry setting * change key name to setting to make the filter more readable on setup wizard * change key name to setting to make the filter more readable on setup wizard * add findWizardSettings on models Settings and handle errors of getWizardSettings method * change setting to key to make the filter more readable on setup wizard * fix setup wizard settings filter map * remove serverHasAdminUser method on setup wizard * fix setup wizard tests * fix setup wizard final step workspace link * fix setup wizard tests * [FIX] Improve wordpress OAuth settings (#10724) [NEW] Add more options for Wordpress OAuth configuration * [NEW] Add /api/v1/channels.roles & /api/v1/groups.roles (#10607) [NEW] Add REST endpoints `channels.roles` & `groups.roles` * Changes source of text for announcement modal content (#10733) [FIX] Regression: Empty content on announcement modal * [FIX] Send a message when muted returns inconsistent result in chat.sendMessage (#10720) * Change the message that returns, when a muted or blocked user tries to send a message using that endpoint * Remove origin provide to sendMessage method, simply throwing an error when the user is muted or blocked * More improvements on send notifications logic (#10736) * Denormalize the User’s Highlights * Find subscriptions for each type of notification * Change email preference values * General improvements * Use just one query to get all subscriptions to notify * Get hightlights from subscriptions on method notifyUsersOnMessage * Keep compatibility of emailNotifications preference in subscription save * Prevent group mentions on large rooms * Fix notifications for direct messages (#10760) * Add setting and expose prometheus on port 9100 (#10766) * Add setting and expose prometheus on port 9100 * Prometheus: Add number of connected users * Send statistics to prometheus * Prometheus: Add methods, subscriptions and callbacks data * Prometheus: Add metrics of REST API calls * Prometheus: Record subscriptions time * Add metrics to notifications * Wizard improvements (#10776) * Change wizard state from boolean to `pending`, `in_progress` or `completed` * Add migration to change the wizard setting to new values and fix the old migration * Make the wizard responsive for small screens * Do not publish wizard settings to the client * Do not show wizard for unlogged users after admin was created * Add badge back to push notifications (#10779) * Better metric for notifications (#10786) * Improvement to push notifications on direct messages (#10788) * Prometheus: Improve metric names (#10789) * [FIX] Not escaping special chars on mentions (#10793) * Regression: Fix wrong wizard field name (#10804) * Prometheus: Fix notification metric (#10803) * Regression: Autorun of wizard was not destroyed after completion (#10802) * Prometheus: Add metric to track hooks time (#10798) * Prevent setup wizard redirects (#10811) * Prevent setup wizard redirects * Fix setup wizard layout * Prometheus: Track user agent * Stop caching private settings (#10625) * [NEW] Add REST API endpoints `channels.setCustomFields` and `groups.setCustomFields` (#9733) * Add channels.setCustomFields and groups.setCustomFields Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * Delete unused `user` parameter Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * Add tests for channels.setCustomFields and groups.setCustomFields Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * Fix lint Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * Fix lint Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * Propogate setCustomFields to Subscriptions Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * Fix semicolon Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * [NEW] Add REST API endpoints `channels.counters`, `groups.counters and `im.counters` (#9679) * Add countVisibleByRoomIdBetweenTimestampsInclusive Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * Add channels.counters, groups.counters, im.counters Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * Fix spaces Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * Fixes Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * Small fix Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * Small fix #2 Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * Small fix #3 Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * Add channels.couters and groups.couters tests Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * Fix tests, last message and unread message times Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * Fix last message and unread message times for IM Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * Add im.counters test Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * Fix for msgs=0 Signed-off-by: Eugene Bolshakov <pub@relvarsoft.com> * [FIX] UI was not disabling the actions when users has had no permissions to create channels or add users to rooms (#10564) * hide plus icon when user doesn't have both permission for create-c and create-p * add helper to checkout two permissions set initial value for the room type * hide the plus icon in directory if user doesn't have both create-c and creat-p permissions * get permissions for create channels and groups * check if user can add channel hide and groups, hide button based upon correct state * prevent add user button from being hidden when user has permission add user to joined room * removed the if statement and use short hand if else syntax * better code for disabling checkbox in create room feature if user doesn't have permission * add missing simicolon * put canShowAddUsersButton into seperate function call function in events and helpers * move the canShowAddUsersButton function to define before it's called * fix bug that prevents the viewing of the keyboard shortcuts button in groups and direct messages * fix permissions * Add verification to authorize get images with X-user-id and X-auth-token (#10741) * [FIX] Fix rest /me endpoint (#10662) [NEW] REST API endpoint `/me` now returns all the settings, including the default values * Add REST endpoint to mark messages as unread (#10778) [NEW] Add REST endpoint `subscriptions.unread` to mark messages as unread * [NEW] REST API endpoint `settings` now allow set colors and trigger actions (#10488) * edited settings-api to execute button event * FIx identation and defer await * removing the defer and waiting for the method to execute * Add Rest endpoint to get username suggestion (#10702) * major dependencies update (#10661) * Remove old translations (#10448) * [FIX] disable/enable System Messages (#10704) [FIX] Missing option to disable/enable System Messages * [NEW] View pinned message's attachment (#10214) * displays pinned file's attachments * handles pin for replies and quotes * fix review * [FIX] Enabling "Collapse Embedded Media by Default" hides replies, quotes (#10427) [FIX] Enabling `Collapse Embedded Media by Default` was hiding replies and quotes * [NEW] lazy load image attachments (#10608) [NEW] Lazy load image attachments * Develop sync (#10815) * add redhat dockerfile to master (#10408) * add redhat dockerfile to master * Add redhat dockerfile to set-version helper script * Release 0.63.2 (#10476) * [FIX] Even TypeErrors with SAML (#10475) * Bump version to 0.63.2 * Added one2mail.info to default blocked domain list (#10218) * [FIX] The 'channel.messages' REST API Endpoint error (#10485) * Bump version to 0.63.3 * Add the history of v0.63.3 * Bump version to 0.64.0-rc.0 * Bump version to 0.64.0-rc.1 * Bump version to 0.64.0-rc.2 * Bump version to 0.64.0-rc.3 * Bump version to 0.64.0-rc.4 * Bump version to 0.64.0 * Bump version to 0.64.1 * Bump version to 0.65.0-develop * [NEW] Return the result of the `/me` endpoint within the result of the `/login` endpoint (#10677) * Add response of the /me endpoint to /login endpoint * change underscore use to ES6 object destructuring * The Livechat settings of the 'color' types were not appearing correctly in the administrative area. (#10612) * [NEW] Enable/disable Livechat registration form fields (#10584) [NEW] Options to enable/disable each Livechat registration form field * When a manager tried to send a message in a live room, an error was being displayed because there is no subscription for the manager. (#10663) [FIX] Livechat managers were not being able to send messages in some cases * [NEW] Implement a local password policy (#9857) * Implement a local password policy * Improve ValidatePasswordPolicy and create tests * Validate user’s password on method saveUserProfile * Fix typo PasswordPoliceClass * Apps: Command Previews, Message and Room Removal Events (#10822) * Add message and room removal events for Apps, fix a few other issues * First very rough draft of the slash command preview * Add the command preview rest api and make the previews selectable via the keyboard * Add loading i18n * Remove duplicated toLowerCase() * Bump version to 0.65.0-rc.0 * Update room.html (#10715) Fix working of cancel button in progress bar, while uploading file. * [NEW] Add view-broadcast-member-list permission (#10753) [NEW] Add permission `view-broadcast-member-list` * [FIX] Livechat sidebar using "Unread on Top" user preference (#10734) [FIX] User's preference `Unread on Top` wasn't working for LiveChat rooms * Fix REST /me regression (#10833) Fix: Regression in REST API endpoint `/me` * [FIX] Broadcast/ Read only issues (#10835) [FIX] Broadcast channels were showing reply button for deleted messages and generating wrong reply links some times * Create temp folder if it doesn't exist (#10837) * Fix: Regression on users avatar in admin pages (#10836) * fix avatar admin lists * Update messagePopup.js * Bump version to 0.65.0-rc.1 * Fix: Clarify the wording of the release issue template (#10520) * Clarify the wording of the release issue template * Update release.md * Regression: Make settings `Site_Name` and `Language` public again (#10848) * Fix layout badge cutting on unread messages for long names (#10846) [FIX] Layout badge cutting on unread messages for long names * [FIX] Missing pagination fields in the response of REST /directory endpoint (#10840) * Add missing pagination fields in the response of REST /directory endpoint * Add support to choose sort field in REST directory * Allow click on command previews and add setting to control apps enablement (#10853) * Regression: Fix email notification preference not showing correct selected value (#10847) * Fix email notification preference not showing correct selected value Closes #10844 * Save email notification preferences correctly Closes #10787 * Create room with user notification preferences * Add back the uploaded file message on push notifications * Bump version to 0.65.0-rc.2 * [FIX] The first users was not set as admin some times (#10878) * Fixed a typo on error message for push token API (#10857) Fix: typo on error message for push token API * Adds flex-box to preview commands (#10883) * Fix: Regression Lazyload fix shuffle avatars (#10887) * fix avatar admin lists * test to fix shuffle avatars * LingoHub Update 🚀 (#10886) Manual push by LingoHub User: Rodrigo Nascimento. Project: Rocket.Chat Made with ❤️ by https://lingohub.com * [FIX] Manage apps layout (#10882) Fix: Manage apps layout was a bit confuse * Fixed slackbridge (#10875) * Bump version to 0.65.0-rc.3 * Bump version to 0.65.0pull/10901/head
parent
105715ef27
commit
6d6d8be980
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,56 @@ |
||||
const getInfoFromUserObject = (user) => { |
||||
const { |
||||
_id, |
||||
name, |
||||
emails, |
||||
status, |
||||
statusConnection, |
||||
username, |
||||
utcOffset, |
||||
active, |
||||
language, |
||||
roles, |
||||
settings |
||||
} = user; |
||||
return { |
||||
_id, |
||||
name, |
||||
emails, |
||||
status, |
||||
statusConnection, |
||||
username, |
||||
utcOffset, |
||||
active, |
||||
language, |
||||
roles, |
||||
settings |
||||
}; |
||||
}; |
||||
|
||||
|
||||
RocketChat.API.helperMethods.set('getUserInfo', function _getUserInfo(user) { |
||||
const me = getInfoFromUserObject(user); |
||||
const isVerifiedEmail = () => { |
||||
if (me && me.emails && Array.isArray(me.emails)) { |
||||
return me.emails.find((email) => email.verified); |
||||
} |
||||
return false; |
||||
}; |
||||
const getUserPreferences = () => { |
||||
const defaultUserSettingPrefix = 'Accounts_Default_User_Preferences_'; |
||||
const allDefaultUserSettings = RocketChat.settings.get(new RegExp(`^${ defaultUserSettingPrefix }.*$`)); |
||||
|
||||
return allDefaultUserSettings.reduce((accumulator, setting) => { |
||||
const settingWithoutPrefix = setting.key.replace(defaultUserSettingPrefix, ' ').trim(); |
||||
accumulator[settingWithoutPrefix] = RocketChat.getUserPreference(user, settingWithoutPrefix); |
||||
return accumulator; |
||||
}, {}); |
||||
}; |
||||
const verifiedEmail = isVerifiedEmail(); |
||||
me.email = verifiedEmail ? verifiedEmail.address : undefined; |
||||
me.settings = { |
||||
preferences: getUserPreferences() |
||||
}; |
||||
|
||||
return me; |
||||
}); |
||||
@ -0,0 +1,26 @@ |
||||
<template name="appWhatIsIt"> |
||||
<section class="page-container page-home page-static content-background-color"> |
||||
{{> header sectionName="Apps_WhatIsIt" hideHelp=true fixedHeight=true}} |
||||
<div class="content"> |
||||
{{#if isLoading}} |
||||
{{> loading}} |
||||
{{else if hasError}} |
||||
<div class="apps-error error-color"> |
||||
<i class="icon-attention"></i> |
||||
<p>Sadly, an error has occured while loading this page.</p> |
||||
</div> |
||||
{{else}} |
||||
<p>{{_ "Apps_WhatIsIt_paragraph1"}}</p> |
||||
<p>{{_ "Apps_WhatIsIt_paragraph2"}}</p> |
||||
<p> |
||||
{{_ "Apps_WhatIsIt_paragraph3"}} |
||||
<a href="https://github.com/RocketChat/Rocket.Chat.Apps-dev-environment/blob/master/README.md" target="_blank">https://github.com/RocketChat/Rocket.Chat.Apps-dev-environment/blob/master/README.md</a> |
||||
</p> |
||||
<p> |
||||
{{_ "Apps_WhatIsIt_paragraph4"}} |
||||
<button class="rc-button rc-button--primary js-enable">{{_ "Enable" }}</button> |
||||
</p> |
||||
{{/if}} |
||||
</div> |
||||
</section> |
||||
</template> |
||||
@ -0,0 +1,39 @@ |
||||
Template.appWhatIsIt.onCreated(function() { |
||||
this.isLoading = new ReactiveVar(false); |
||||
this.hasError = new ReactiveVar(false); |
||||
}); |
||||
|
||||
Template.appWhatIsIt.helpers({ |
||||
isLoading() { |
||||
if (Template.instance().isLoading) { |
||||
return Template.instance().isLoading.get(); |
||||
} |
||||
|
||||
return false; |
||||
}, |
||||
hasError() { |
||||
if (Template.instance().hasError) { |
||||
return Template.instance().hasError.get(); |
||||
} |
||||
|
||||
return false; |
||||
} |
||||
}); |
||||
|
||||
Template.appWhatIsIt.events({ |
||||
'click .js-enable'(e, t) { |
||||
t.isLoading.set(true); |
||||
|
||||
Meteor.call('apps/go-enable', function _appsMightHaveBeenEnabled(error) { |
||||
if (error) { |
||||
t.hasError.set(true); |
||||
t.isLoading.set(false); |
||||
return; |
||||
} |
||||
|
||||
window.Apps.load(true); |
||||
|
||||
FlowRouter.go('/admin/apps'); |
||||
}); |
||||
} |
||||
}); |
||||
@ -0,0 +1,18 @@ |
||||
RocketChat.saveRoomCustomFields = function(rid, roomCustomFields) { |
||||
if (!Match.test(rid, String)) { |
||||
throw new Meteor.Error('invalid-room', 'Invalid room', { |
||||
'function': 'RocketChat.saveRoomCustomFields' |
||||
}); |
||||
} |
||||
if (!Match.test(roomCustomFields, Object)) { |
||||
throw new Meteor.Error('invalid-roomCustomFields-type', 'Invalid roomCustomFields type', { |
||||
'function': 'RocketChat.saveRoomCustomFields' |
||||
}); |
||||
} |
||||
const ret = RocketChat.models.Rooms.setCustomFieldsById(rid, roomCustomFields); |
||||
|
||||
// Update customFields of any user's Subscription related with this rid
|
||||
RocketChat.models.Subscriptions.updateCustomFieldsByRoomId(rid, roomCustomFields); |
||||
|
||||
return ret; |
||||
}; |
||||
@ -0,0 +1,322 @@ |
||||
{ |
||||
"#channel": "#канал", |
||||
"0_Errors_Only": "0 - Толькі памылкі", |
||||
"1_Errors_and_Information": "1 - Памылкі і інфармацыя", |
||||
"2_Erros_Information_and_Debug": "2 - Памылкі, інфармацыя і адладка", |
||||
"403": "Забаронена", |
||||
"500": "Унутраная памылка сервера", |
||||
"@username": "@лагін", |
||||
"@username_message": "@лагін <message>", |
||||
"__username__is_no_longer__role__defined_by__user_by_": "__username__ более не __role__ па рашэнні __user_by__", |
||||
"__username__was_set__role__by__user_by_": "__username__ быў усталяваны __role__ па рашэнні __user_by__", |
||||
"Accept": "Прыняць", |
||||
"Accept_incoming_livechat_requests_even_if_there_are_no_online_agents": "Прымаць уваходныя запыты Livechat, нават калі няма онлайн агентаў", |
||||
"Accept_with_no_online_agents": "Прымаць з неподключеннымі супрацоўнікамі", |
||||
"access-mailer": "Доступ да старонцы мейлера", |
||||
"access-mailer_description": "Дазвол на масавую рассылку электроннай пошты для ўсіх карыстальнікаў.", |
||||
"access-permissions": "Доступ да старонцы дазволаў", |
||||
"access-permissions_description": "Змена правоў доступу для розных роляў.", |
||||
"Access_not_authorized": "Доступ не аўтарызаваны", |
||||
"Access_Token_URL": "URL токена доступу", |
||||
"Accessing_permissions": "Доступ дазволаў", |
||||
"Account_SID": "SID ўліковага запісу", |
||||
"Accounts": "Рахункі", |
||||
"Accounts_AllowAnonymousRead": "Дазволіць ананімны доступ карыстальнікам", |
||||
"Accounts_AllowAnonymousWrite": "Дазволіць пісаць ананімным карыстальнікам", |
||||
"Accounts_AllowDeleteOwnAccount": "Дазволіць карыстальнікам удаляць ўласную ўліковую запіс", |
||||
"Accounts_AllowedDomainsList": "Дазволены спіс даменаў", |
||||
"Accounts_AllowedDomainsList_Description": "Падзеленых коскамі спіс дазволеных даменаў", |
||||
"Accounts_AllowEmailChange": "Дазволiць змяненне адрасу электроннай пошты", |
||||
"Accounts_AllowPasswordChange": "Дазволіць змену пароля ", |
||||
"Accounts_AllowUserAvatarChange": "Дазволіць карыстальніку змяняць аватар", |
||||
"Accounts_AllowRealNameChange": "Дазволіць змяніць імя", |
||||
"Accounts_AllowUsernameChange": "Дазволіць Імя карыстальніка змяніць", |
||||
"Accounts_AllowUserProfileChange": "Дазволіць змяненне профілю карыстальніку", |
||||
"Accounts_AvatarResize": "Змена памеру аватара", |
||||
"Accounts_AvatarSize": "Памер аватара", |
||||
"Accounts_BlockedDomainsList": "Заблакаваны спіс даменаў", |
||||
"Accounts_BlockedDomainsList_Description": "Падзелены коскамі спіс заблакаваных даменаў", |
||||
"Accounts_BlockedUsernameList": "Спіс заблакаваных карыстальнікаў", |
||||
"Accounts_BlockedUsernameList_Description": "Спіс заблакаваных імёнаў карыстальнікаў (без уліку рэгістра), падзеленых коскамі", |
||||
"Accounts_CustomFieldsToShowInUserInfo": "Кастомныя поля, якія адлюстроўваюцца ў інфармацыі аб карыстальніку", |
||||
"Accounts_DefaultUsernamePrefixSuggestion": "Прэфікс імя карыстальніка па змаўчанні", |
||||
"Accounts_Default_User_Preferences": "Налады карыстальніка па змаўчанні", |
||||
"Accounts_Default_User_Preferences_audioNotifications": "Сігнал па змаўчанні для дэсктопных апавяшчэнняў", |
||||
"Accounts_Default_User_Preferences_desktopNotifications": "Стандартныя абвесткі для дэсктопных апавяшчэнняў", |
||||
"Accounts_Default_User_Preferences_mobileNotifications": "Сігнал па змаўчанні для мабільных апавяшчэнняў", |
||||
"Accounts_Default_User_Preferences_not_available": "Не атрымалася атрымаць прыстасаваныя налады карыстальніка, так як яны яшчэ не былі ўсталяваны карыстальнікам", |
||||
"Accounts_denyUnverifiedEmail": "Забараніць непацверджаныя адрасы электроннай пошты", |
||||
"Accounts_EmailVerification": "Пацвярджэнне адрасу электроннай пошты", |
||||
"Accounts_EmailVerification_Description": "Пераканайцеся, што ў вас верныя налады SMTP для выкарыстання гэтай функцыі", |
||||
"Accounts_Email_Approved": "[name] <br/><br/><p>Ваш уліковы запіс быў адобраны. </p>", |
||||
"Accounts_Email_Activated": "[name] <br/><br/><p>Ваш уліковы запіс быў актывізаваны. </p>", |
||||
"Accounts_Email_Deactivated": "[name] <br/><br/><p>Ваш уліковы запіс быў дэактываваны. </p>", |
||||
"Accounts_Email_Approved_Subject": "Уліковы запіс зацверджаны", |
||||
"Accounts_Email_Activated_Subject": "Уліковы запіс актываваны", |
||||
"Accounts_Email_Deactivated_Subject": "Уліковы запіс заблакаваны", |
||||
"Accounts_Enrollment_Email": "Электроннае паведамленне пры рэгістрацыі", |
||||
"Accounts_Enrollment_Email_Subject_Default": "Сардэчна запрашаем на [site_name]", |
||||
"Accounts_Admin_Email_Approval_Needed_Subject_Default": "Новы карыстальнік быў зарэгістраваны. Патрабуецца адабрэнне.", |
||||
"Accounts_ForgetUserSessionOnWindowClose": "Забыць сесію карыстальніка пры закрыцці вокна", |
||||
"Accounts_Iframe_api_method": "Метад API", |
||||
"Accounts_Iframe_api_url": "API URL", |
||||
"Accounts_iframe_enabled": "Уключана", |
||||
"Accounts_iframe_url": "Iframe URL", |
||||
"Accounts_LoginExpiration": "Заканчэнне тэрміну аўтарызацыі ў днях", |
||||
"Accounts_ManuallyApproveNewUsers": "Пацвярджаць новых карыстальнікаў ўручную", |
||||
"Accounts_OAuth_Custom_Authorize_Path": "Шлях да аўтарызацыі", |
||||
"Accounts_OAuth_Custom_Button_Color": "Колер кнопкі", |
||||
"Accounts_OAuth_Custom_Button_Label_Color": "Колер тэкста кнопкі", |
||||
"Accounts_OAuth_Custom_Button_Label_Text": "Тэкст кнопкі", |
||||
"Accounts_OAuth_Custom_Enable": "Ўключыць", |
||||
"Accounts_OAuth_Custom_id": "Ідэнтыфікатар", |
||||
"Accounts_OAuth_Custom_Identity_Path": "Identity Path", |
||||
"Accounts_OAuth_Custom_Login_Style": "Выгляд лагіна", |
||||
"Accounts_OAuth_Custom_Merge_Users": "Аб'яднаць карыстальнікаў", |
||||
"Accounts_OAuth_Custom_Scope": "Вобласць", |
||||
"Accounts_OAuth_Custom_Secret": "Ключ", |
||||
"Accounts_OAuth_Custom_Token_Path": "Token Path", |
||||
"Accounts_OAuth_Custom_Token_Sent_Via": "Token Sent Via", |
||||
"Accounts_OAuth_Custom_Identity_Token_Sent_Via": "Identity Token Sent Via", |
||||
"Accounts_OAuth_Custom_Username_Field": "Поле імя карыстальніка", |
||||
"Accounts_OAuth_Drupal": "Ўключыць уваход праз Drupal", |
||||
"Accounts_OAuth_Drupal_callback_url": "Drupal oAuth2 Redirect URI", |
||||
"Accounts_OAuth_Drupal_id": "Drupal oAuth2 Client ID", |
||||
"Accounts_OAuth_Drupal_secret": "Сакрэтны ключ кліента Drupal oAuth2", |
||||
"Accounts_OAuth_Facebook": "\n Facebook Login", |
||||
"Accounts_OAuth_Google": "Google Login", |
||||
"Accounts_OAuth_Wordpress_identity_path": "Identity Path", |
||||
"Accounts_OAuth_Wordpress_identity_token_sent_via": "Identity Token Sent Via", |
||||
"Accounts_OAuth_Wordpress_token_path": "Token Path", |
||||
"Accounts_OAuth_Wordpress_authorize_path": "Шлях да аўтарызацыі", |
||||
"Accounts_OAuth_Wordpress_scope": "Вобласць", |
||||
"Activate": "Актываваць", |
||||
"Activity": "Дзейнасць", |
||||
"Add": "Дадаць", |
||||
"add-user": "Дадаць карыстальніка", |
||||
"Add_User": "Дадаць карыстальніка", |
||||
"Additional_Feedback": "Дадатковая сувязь", |
||||
"All": "Усе", |
||||
"All_channels": "Усе каналы", |
||||
"All_messages": "Усе паведамленні", |
||||
"All_users": "Усе карыстальнікі", |
||||
"Alphabetical": "Па алфавіце", |
||||
"Analytics_features_enabled": "Функцыі", |
||||
"and": "і", |
||||
"Announcement": "Аб'ява", |
||||
"App_status_auto_enabled": "Уключана", |
||||
"App_status_manually_enabled": "Уключана", |
||||
"Appearance": "знешні выгляд", |
||||
"Apply": "Прымяніць", |
||||
"Apply_and_refresh_all_clients": "Прымяніць і абнавіць ўсіх кліентаў", |
||||
"Archive": "Архіў", |
||||
"archive-room": "Архіў Room", |
||||
"Audio_Notifications_Default_Alert": "Сігнал па змаўчанні для дэсктопных апавяшчэнняў", |
||||
"Cancel": "Адмяніць", |
||||
"Cancel_message_input": "Адмяніць", |
||||
"CAS_enabled": "Уключана", |
||||
"Chatpal_All_Results": "Усе", |
||||
"Desktop_Notifications_Default_Alert": "Стандартныя абвесткі для дэсктопных апавяшчэнняў", |
||||
"Enable": "Ўключыць", |
||||
"Enabled": "Уключана", |
||||
"Features_Enabled": "Доступныя функцыі", |
||||
"How_friendly_was_the_chat_agent": "Як дружалюбны быў чат агент?", |
||||
"How_knowledgeable_was_the_chat_agent": "Наколькі кампетэнтны быў супрацоўнік чата?", |
||||
"How_responsive_was_the_chat_agent": "Наколькі спагадны быў супрацоўнік чата?", |
||||
"How_satisfied_were_you_with_this_chat": "Наколькі вы былі задаволены гэтым чатам?", |
||||
"Installation": "Ўстаноўка", |
||||
"LDAP_User_Search_Scope": "Вобласць", |
||||
"LDAP_Authentication": "Ўключыць", |
||||
"LDAP_Enable": "Ўключыць", |
||||
"Mobile_Notifications_Default_Alert": "Сігнал па змаўчанні для мабільных апавяшчэнняў", |
||||
"New_messages": "Новыя паведамленні", |
||||
"Please_answer_survey": "Калі ласка, знайдзіце час, каб адказаць на экспрэс-апытанне аб гэтым чаце", |
||||
"Please_fill_name_and_email": "Запоўніце, калі ласка, імя і адрас электроннай пошты", |
||||
"Push_enable": "Ўключыць", |
||||
"Scope": "Вобласць", |
||||
"Select_a_department": "Выберыце аддзел", |
||||
"Send": "Паслаць", |
||||
"Skip": "Прапусціць", |
||||
"Start_Chat": "Пачаць чат", |
||||
"Survey": "Апытанне", |
||||
"Survey_instructions": "Ацаніце кожнае пытанне па вашай задаволенасці, 1 азначае, што вы цалкам незадаволеныя і 5 азначае, што вы цалкам задаволеныя.", |
||||
"Thank_you_for_your_feedback": "Дзякуй за ваш водгук", |
||||
"Type_your_email": "Увядзіце адрас электроннай пошты", |
||||
"Type_your_message": "Увядзіце ваша паведамленне", |
||||
"Type_your_name": "Увядзіце сваё імя", |
||||
"We_are_offline_Sorry_for_the_inconvenience": "Мы не ў сеткі. Прабачце за дастаўленыя нязручнасці.", |
||||
"Yes": "Да", |
||||
"You": "Вы", |
||||
"Country_Canada": "Канада", |
||||
"Country_Cape_Verde": "Каба-Вэрдэ", |
||||
"Country_Central_African_Republic": "Цэнтральна-Афрыканская Рэспубліка", |
||||
"Country_Chad": "Чад", |
||||
"Country_Chile": "чылі", |
||||
"Country_China": "Кітай", |
||||
"Country_Christmas_Island": "Нэпал", |
||||
"Country_Colombia": "Калумбія", |
||||
"Country_Congo": "Конга", |
||||
"Country_Congo_The_Democratic_Republic_of_The": "Конга, Дэмакратычная Рэспубліка", |
||||
"Country_Costa_Rica": "Коста-Рыка", |
||||
"Country_Djibouti": "Джыбуці", |
||||
"Country_Dominica": "Дамініка", |
||||
"Country_Dominican_Republic": "Дамініканская Рэспубліка", |
||||
"Country_Ecuador": "Эквадор", |
||||
"Country_Egypt": "Егіпет", |
||||
"Country_El_Salvador": "Сальвадор", |
||||
"Country_Equatorial_Guinea": "Гвінея", |
||||
"Country_Eritrea": "Эрытрэя", |
||||
"Country_Estonia": "Эстонія", |
||||
"Country_Ethiopia": "Эфіопія", |
||||
"Country_Faroe_Islands": "Фарэрскія острава", |
||||
"Country_Fiji": "Фіджы", |
||||
"Country_Finland": "Фінляндыя", |
||||
"Country_France": "Францыя", |
||||
"Country_French_Guiana": "Французская Гвіяна", |
||||
"Country_French_Polynesia": "Французская Палінезія", |
||||
"Country_French_Southern_Territories": "Французскія Паўднёвыя Тэрыторыі", |
||||
"Country_Gabon": "Габон", |
||||
"Country_Gambia": "Гамбія", |
||||
"Country_Georgia": "Грузія", |
||||
"Country_Germany": "Германія", |
||||
"Country_Ghana": "Гана", |
||||
"Country_Gibraltar": "Гібралтар", |
||||
"Country_Greece": "Грэцыя", |
||||
"Country_Greenland": "Грэнландыя", |
||||
"Country_Grenada": "Грэнада", |
||||
"Country_Guadeloupe": "Гвадэлупа", |
||||
"Country_Guam": "Гуам", |
||||
"Country_Guatemala": "Гватэмала", |
||||
"Country_Guinea": "Гвінея", |
||||
"Country_Guinea_bissau": "Гвінея-Бісау", |
||||
"Country_Guyana": "Гаяна", |
||||
"Country_Haiti": "Гаіці", |
||||
"Country_Holy_See_Vatican_City_State": "Апостальская Сталіца (Ватыкан)", |
||||
"Country_Honduras": "Гандурас", |
||||
"Country_Hong_Kong": "Ганконг", |
||||
"Country_Hungary": "Венгрыя", |
||||
"Country_Iceland": "Ісландыя", |
||||
"Country_India": "Індыя", |
||||
"Country_Indonesia": "Інданезія", |
||||
"Country_Iran_Islamic_Republic_of": "Іран, Ісламская Рэспубліка", |
||||
"Country_Iraq": "Ірак", |
||||
"Country_Ireland": "Ірландыя", |
||||
"Country_Israel": "Ізраіль", |
||||
"Country_Italy": "Італія", |
||||
"Country_Jamaica": "Ямайка", |
||||
"Country_Japan": "Японія", |
||||
"Country_Jordan": "Іарданія", |
||||
"Country_Kazakhstan": "Казахстан", |
||||
"Country_Kenya": "Кенія", |
||||
"Country_Kiribati": "Кірыбаці", |
||||
"Country_Korea_Democratic_Peoples_Republic_of": "Карэя, Карэйская Народна-Дэмакратычная Рэспубліка", |
||||
"Country_Korea_Republic_of": "Карэя, Рэспубліка", |
||||
"Country_Kuwait": "Кувейт", |
||||
"Country_Kyrgyzstan": "Кіргізія", |
||||
"Country_Latvia": "Латвія", |
||||
"Country_Lebanon": "Ліван", |
||||
"Country_Lesotho": "Лесота", |
||||
"Country_Liberia": "Ліберыя", |
||||
"Country_Libyan_Arab_Jamahiriya": "Лівійская Араб Джамахірыя", |
||||
"Country_Liechtenstein": "Ліхтэнштэйн", |
||||
"Country_Lithuania": "Літва", |
||||
"Country_Luxembourg": "Люксембург", |
||||
"Country_Macao": "Macao", |
||||
"Country_Macedonia_The_Former_Yugoslav_Republic_of": "Былая югаслаўская Рэспубліка Македонія,", |
||||
"Country_Madagascar": "Мадагаскар", |
||||
"Country_Malawi": "Малаві", |
||||
"Country_Malaysia": "Малайзія", |
||||
"Country_Maldives": "Мальдывы", |
||||
"Country_Mali": "Малі", |
||||
"Country_Malta": "Мальта", |
||||
"Country_Marshall_Islands": "Маршалавы острава", |
||||
"Country_Martinique": "Марцініка", |
||||
"Country_Mauritania": "Маўрытанія", |
||||
"Country_Mauritius": "Маўрыкій", |
||||
"Country_Mayotte": "Маёта", |
||||
"Country_Mexico": "Мексіка", |
||||
"Country_Moldova_Republic_of": "Малдова", |
||||
"Country_Mongolia": "Манголія", |
||||
"Country_Montserrat": "Монсеррат", |
||||
"Country_Morocco": "Марока", |
||||
"Country_Mozambique": "Мазамбік", |
||||
"Country_Myanmar": "М'янма", |
||||
"Country_Namibia": "Намібія", |
||||
"Country_Nauru": "Науру", |
||||
"Country_Nepal": "Непал", |
||||
"Country_Netherlands": "Нідэрланды", |
||||
"Country_New_Caledonia": "Новая Каледонія", |
||||
"Country_New_Zealand": "Новая Зеландыя", |
||||
"Country_Nicaragua": "Нікарагуа", |
||||
"Country_Niger": "Нігер", |
||||
"Country_Nigeria": "Нігерыя", |
||||
"Country_Norway": "Нарвегія", |
||||
"Country_Oman": "Аман", |
||||
"Country_Pakistan": "Пакістан", |
||||
"Country_Palau": "Палау", |
||||
"Country_Panama": "Панама", |
||||
"Country_Papua_New_Guinea": "Папуа-Новая Гвінея", |
||||
"Country_Paraguay": "Парагвай", |
||||
"Country_Peru": "Перу", |
||||
"Country_Philippines": "Філіпіны", |
||||
"Country_Pitcairn": "Піткэрн", |
||||
"Country_Poland": "Польшча", |
||||
"Country_Portugal": "Партугалія", |
||||
"Country_Puerto_Rico": "Пуэрта-Рыка", |
||||
"Country_Qatar": "Катар", |
||||
"Country_Romania": "Румынія", |
||||
"Country_Russian_Federation": "Расійская Федэрацыя", |
||||
"Country_Rwanda": "Руанда", |
||||
"Country_Saint_Helena": "Святой Алёны", |
||||
"Country_Saint_Kitts_and_Nevis": "Сэнт-Кітс і Нэвіс", |
||||
"Country_Saint_Lucia": "Сэнт-Люсія", |
||||
"Country_Saint_Pierre_and_Miquelon": "Сен-П'ер і Міквэлон", |
||||
"Country_Saint_Vincent_and_The_Grenadines": "Сэнт-Вінсэнт і Грэнадыны", |
||||
"Country_Samoa": "Самоа", |
||||
"Country_San_Marino": "Сан - Марына", |
||||
"Country_Saudi_Arabia": "Саўдаўская Аравія", |
||||
"Country_Senegal": "Сенегал", |
||||
"Country_Serbia_and_Montenegro": "Сербія і Чарнагорыя", |
||||
"Country_Seychelles": "Сейшэльскія вострава", |
||||
"Country_Sierra_Leone": "Сьера-Леонэ", |
||||
"Country_Singapore": "Сінгапур", |
||||
"Country_Slovakia": "Славакія", |
||||
"Country_Slovenia": "Славенія", |
||||
"Country_Somalia": "Самалі", |
||||
"Country_South_Africa": "Паўднёвая Афрыка", |
||||
"Country_Spain": "Іспанія", |
||||
"Country_Sri_Lanka": "Шры Ланка", |
||||
"Country_Sudan": "Судан", |
||||
"Country_Suriname": "Сурынам", |
||||
"Country_Swaziland": "Свазіленд", |
||||
"Country_Sweden": "Швецыя", |
||||
"Country_Switzerland": "Швейцарыя", |
||||
"Country_Syrian_Arab_Republic": "Сірыйская Арабская Рэспубліка", |
||||
"Country_Taiwan_Province_of_China": "Тайвань, правінцыя Кітая", |
||||
"Country_Tajikistan": "Таджыкістан", |
||||
"Country_Tanzania_United_Republic_of": "Танзанія, Аб'яднаная Рэспубліка", |
||||
"Country_Thailand": "Тайланд", |
||||
"Country_Timor_leste": "Усходні Тымор", |
||||
"Country_Tokelau": "Такелаў", |
||||
"Country_Trinidad_and_Tobago": "Трынідад і Табага", |
||||
"Country_Tunisia": "Туніс", |
||||
"Country_Turkey": "Турція", |
||||
"Country_Turkmenistan": "Туркменістан", |
||||
"Country_Tuvalu": "Тувалу", |
||||
"Country_Uganda": "Уганда", |
||||
"Country_Ukraine": "Украіна", |
||||
"Country_United_Arab_Emirates": "Абяднаныя Арабскія Эміраты", |
||||
"Country_United_Kingdom": "Злучанае Каралеўства", |
||||
"Country_United_States": "Злучаныя Штаты", |
||||
"Country_Uruguay": "Уругвай", |
||||
"Country_Uzbekistan": "Узбекістан", |
||||
"Country_Vanuatu": "Вануату", |
||||
"Country_Venezuela": "Венесуэла", |
||||
"Country_Viet_Nam": "В'етнам", |
||||
"Country_Virgin_Islands_US": "Віргінскія астравы, ЗША", |
||||
"Country_Wallis_and_Futuna": "Уоліс і Футуна", |
||||
"Country_Western_Sahara": "Заходняя Сахара", |
||||
"Country_Yemen": "Емен", |
||||
"Country_Zambia": "Замбія", |
||||
"Country_Zimbabwe": "Зімбабвэ" |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,59 @@ |
||||
import _ from 'underscore'; |
||||
import './lazyloadImage'; |
||||
export const fixCordova = function(url) { |
||||
if (url && url.indexOf('data:image') === 0) { |
||||
return url; |
||||
} |
||||
if (Meteor.isCordova && (url && url[0] === '/')) { |
||||
url = Meteor.absoluteUrl().replace(/\/$/, '') + url; |
||||
const query = `rc_uid=${ Meteor.userId() }&rc_token=${ Meteor._localStorage.getItem( |
||||
'Meteor.loginToken' |
||||
) }`;
|
||||
if (url.indexOf('?') === -1) { |
||||
url = `${ url }?${ query }`; |
||||
} else { |
||||
url = `${ url }&${ query }`; |
||||
} |
||||
} |
||||
if (Meteor.settings['public'].sandstorm || url.match(/^(https?:)?\/\//i)) { |
||||
return url; |
||||
} else if (navigator.userAgent.indexOf('Electron') > -1) { |
||||
return __meteor_runtime_config__.ROOT_URL_PATH_PREFIX + url; |
||||
} else { |
||||
return Meteor.absoluteUrl().replace(/\/$/, '') + url; |
||||
} |
||||
}; |
||||
|
||||
const loadImage = instance => { |
||||
|
||||
const img = new Image(); |
||||
const src = instance.firstNode.getAttribute('data-src'); |
||||
instance.firstNode.className = instance.firstNode.className.replace('lazy-img', ''); |
||||
img.onload = function() { |
||||
instance.loaded.set(true); |
||||
instance.firstNode.removeAttribute('data-src'); |
||||
}; |
||||
img.src = fixCordova(src); |
||||
}; |
||||
|
||||
const isVisible = (instance) => { |
||||
requestAnimationFrame(() => { |
||||
const rect = instance.firstNode.getBoundingClientRect(); |
||||
if (rect.top >= -100 && rect.left >= 0 && rect.top <= (window.innerHeight || document.documentElement.clientHeight)) { |
||||
return loadImage(instance); |
||||
} |
||||
}); |
||||
|
||||
}; |
||||
|
||||
window.addEventListener('resize', window.lazyloadtick); |
||||
|
||||
export const lazyloadtick = _.debounce(() => { |
||||
[...document.querySelectorAll('.lazy-img[data-src]')].forEach(el => |
||||
isVisible(Blaze.getView(el)._templateInstance) |
||||
); |
||||
}, 500); |
||||
|
||||
window.lazyloadtick = lazyloadtick; |
||||
|
||||
export const addImage = instance => isVisible(instance); |
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue