Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into pr/10727-mikaelmel…
Browse files Browse the repository at this point in the history
…lo-develop
  • Loading branch information
ggazzo committed May 28, 2018
2 parents fec1225 + 02c13a4 commit 5c80c28
Show file tree
Hide file tree
Showing 66 changed files with 3,713 additions and 1,358 deletions.
2 changes: 1 addition & 1 deletion packages/rocketchat-api/server/v1/push.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RocketChat.API.v1.addRoute('push.token', { authRequired: true }, {
}

if (!value || typeof value !== 'string') {
throw new Meteor.Error('error-token-param-not-valid', 'The required "token" body param is missing or invalid.');
throw new Meteor.Error('error-token-param-not-valid', 'The required "value" body param is missing or invalid.');
}

if (!appName || typeof appName !== 'string') {
Expand Down
8 changes: 8 additions & 0 deletions packages/rocketchat-apps/assets/stylesheets/apps.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@ div.apps-error {
width: 100%;
font-size: 45px;
}

.preferences-page--apps .rc-table-tr {
opacity: 0.5;
}

.preferences-page--apps .rc-table-tr.active {
opacity: 1;
}
3 changes: 3 additions & 0 deletions packages/rocketchat-apps/client/admin/appManage.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<span class="rc-switch__button">
<span class="rc-switch__button-inside"></span>
</span>
<span class="rc-switch__text">
{{_ "Activate"}}
</span>
</label>
</div>

Expand Down
14 changes: 12 additions & 2 deletions packages/rocketchat-apps/client/admin/apps.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@
<!-- TODO: fix this class -->
<section class="preferences-page preferences-page--apps">
{{#header sectionName="Manage_Apps" hideHelp=true fixedHeight=true}}
<button class="rc-button rc-button--small rc-button--primary rc-directory-plus rc-tooltip rc-tooltip--down" data-button="install" aria-label="{{_ 'Install_package'}}">{{> icon icon="plus"}}</button>
<div class="rc-directory-header">
<div class="rc-input rc-input--small rc-directory-search">
<label class="rc-input__label">
<div class="rc-input__wrapper">
{{> icon icon="magnifier" block="rc-input__icon" }}
<input type="text" class="rc-input__element rc-input__element--small js-search" name="app-filter" id="app-filter" placeholder={{_ "Search"}} autocomplete="off">
</div>
</label>
</div>
<button class="rc-button rc-button--small rc-button--primary rc-directory-plus rc-tooltip rc-tooltip--down" data-button="install" aria-label="{{_ 'Install_package'}}">{{> icon icon="plus"}}</button>
</div>
{{/header}}
<div class="rc-directory-content">
{{#requiresPermission 'manage-apps'}}
Expand All @@ -17,7 +27,7 @@
</thead>
<tbody class="rc-table-body">
{{#each apps}}
<tr class="rc-table-tr" data-name="{{name}}">
<tr class="rc-table-tr {{activeClass status}}" data-name="{{name}}">
<td class="rc-table-td rc-table-td--name">
<div class="rc-directory-channel-wrapper">
<div class="rc-directory-channel-avatar" style="background-image:url({{iconFileContent}})"></div>
Expand Down
23 changes: 21 additions & 2 deletions packages/rocketchat-apps/client/admin/apps.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
import { AppEvents } from '../communication';
const ENABLED_STATUS = ['auto_enabled', 'manually_enabled'];
const enabled = ({status}) => ENABLED_STATUS.includes(status);
const sortByStatus = (a, b) => {
if (enabled(a)) {
if (enabled(b)) {
return a.name > b.name;
}
return -1;
}
return 1;
};

Template.apps.onCreated(function() {
const instance = this;
this.ready = new ReactiveVar(false);
this.apps = new ReactiveVar([]);
this.filter = new ReactiveVar('');

RocketChat.API.get('apps').then((result) => {
instance.apps.set(result.apps);
Expand Down Expand Up @@ -53,10 +65,15 @@ Template.apps.helpers({
return false;
},
apps() {
return Template.instance().apps.get();
const instance = Template.instance();
const filter = instance.filter.get().toLowerCase();
return instance.apps.get().filter(({name}) => name.toLowerCase().includes(filter)).sort(sortByStatus);
},
parseStatus(status) {
return t(`App_status_${ status }`);
},
activeClass(status) {
return enabled({status}) ? 'active' : '';
}
});

Expand All @@ -70,8 +87,10 @@ Template.apps.events({
// show an error ? I don't think this should ever happen
}
},

'click [data-button="install"]'() {
FlowRouter.go('/admin/app/install');
},
'keyup #app-filter'(e, t) {
t.filter.set(e.currentTarget.value);
}
});
7 changes: 7 additions & 0 deletions packages/rocketchat-i18n/i18n/af.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,17 @@
"Accounts_PasswordReset": "Wagwoord Herstel",
"Accounts_Registration_AuthenticationServices_Default_Roles": "Verstekrolle vir verifikasiedienste",
"Accounts_Registration_AuthenticationServices_Default_Roles_Description": "Verstek rolle (komma geskei) gebruikers sal gegee word wanneer jy registreer deur verifikasie dienste",
"Accounts_OAuth_Wordpress_server_type_custom": "Custom",
"Accounts_Registration_AuthenticationServices_Enabled": "Registrasie met verifikasiedienste",
"Accounts_OAuth_Wordpress_identity_path": "Identiteitspad",
"Accounts_RegistrationForm": "Registrasievorm",
"Accounts_OAuth_Wordpress_identity_token_sent_via": "Identiteits Token Sent Via",
"Accounts_RegistrationForm_Disabled": "gestremde",
"Accounts_OAuth_Wordpress_token_path": "Token Pad",
"Accounts_RegistrationForm_LinkReplacementText": "Registrasievorm Link Vervangingsteks",
"Accounts_OAuth_Wordpress_authorize_path": "Gee pad toe",
"Accounts_RegistrationForm_Public": "openbare",
"Accounts_OAuth_Wordpress_scope": "omvang",
"Accounts_RegistrationForm_Secret_URL": "Geheime URL",
"Accounts_RegistrationForm_SecretURL": "Registrasievorm Geheime URL",
"Accounts_RegistrationForm_SecretURL_Description": "Jy moet 'n ewekansige string verskaf wat by jou registrasie-URL gevoeg sal word. Voorbeeld: https://open.rocket.chat/register/[secret_hash]",
Expand Down Expand Up @@ -1270,6 +1276,7 @@
"Logout_Others": "Logout Uit Ander Logged In Locations",
"mail-messages": "Pos boodskappe",
"mail-messages_description": "Toestemming om die posboodskap opsie te gebruik",
"Livechat_registration_form": "Registrasievorm",
"Mail_Message_Invalid_emails": "Jy het een of meer ongeldige e-posse verskaf:% s",
"Mail_Message_Missing_to": "U moet een of meer gebruikers kies of een of meer e-posadresse verskaf, geskei deur kommas.",
"Mail_Message_No_messages_selected_select_all": "Jy het geen boodskappe gekies nie",
Expand Down
8 changes: 8 additions & 0 deletions packages/rocketchat-i18n/i18n/ar.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,17 @@
"Accounts_PasswordReset": "إعادة تعيين كلمة السر",
"Accounts_Registration_AuthenticationServices_Default_Roles": "الأدوار الافتراضية لخدمات المصادقة",
"Accounts_Registration_AuthenticationServices_Default_Roles_Description": "سيتم تعيين الأدوار الافتراضية للمستخدمين عند التسجيل عبر خدمات المصادقة (افصل بينها بفاصلة)",
"Accounts_OAuth_Wordpress_server_type_custom": "عرف",
"Accounts_Registration_AuthenticationServices_Enabled": "تسجيل مع خدمات المصادقة",
"Accounts_OAuth_Wordpress_identity_path": "مسار الهوية",
"Accounts_RegistrationForm": "استمارة التسجيل",
"Accounts_OAuth_Wordpress_identity_token_sent_via": "رمز الهوية المرسلة عبر",
"Accounts_RegistrationForm_Disabled": "معطل",
"Accounts_OAuth_Wordpress_token_path": "مسار رمزي",
"Accounts_RegistrationForm_LinkReplacementText": "نص نموذج التسجيل رابط بديل",
"Accounts_OAuth_Wordpress_authorize_path": "يأذن مسار",
"Accounts_RegistrationForm_Public": "عام",
"Accounts_OAuth_Wordpress_scope": "نطاق",
"Accounts_RegistrationForm_Secret_URL": "رابط سري",
"Accounts_RegistrationForm_SecretURL": "رابط استمارة التسجيل السري",
"Accounts_RegistrationForm_SecretURL_Description": "يجب توفير سلسلة العشوائية التي ستضاف إلى URL تسجيلك. على سبيل المثال: https://open.rocket.chat/register/[secret_hash]",
Expand Down Expand Up @@ -1024,6 +1030,7 @@
"InternalHubot_PathToLoadCustomScripts": "مجلد لتحميل البرامج النصية",
"InternalHubot_reload": "أعد تحميل النصوص البرمجية",
"InternalHubot_ScriptsToLoad": "مخطوطات لتحميل",
"InternalHubot_ScriptsToLoad_Description": "الرجاء إدخال قائمة مفصولة بفواصل من مخطوطات لتحميل من https://github.com/github/hubot-scripts/tree/master/src/scripts",
"InternalHubot_Username_Description": "هذا يجب أن يكون اسم مستخدم صالح من بوت مسجلة على الخادم الخاص بك.",
"InternalHubot_EnableForChannels": "تمكين للقنوات العامة",
"InternalHubot_EnableForDirectMessages": "تمكين للرسائل المباشرة",
Expand Down Expand Up @@ -1269,6 +1276,7 @@
"Logout_Others": "تسجيل الخروج من الأجهزة الأخرى",
"mail-messages": "رسلائل البريد",
"mail-messages_description": "إذن لاستخدام خيار رسائل البريد",
"Livechat_registration_form": "استمارة التسجيل",
"Mail_Message_Invalid_emails": "لقد قدمت رسائل البريد الإلكتروني واحدة أو أكثر غير صالحة:٪ ق",
"Mail_Message_Missing_to": "يجب عليك اختيار واحد أو أكثر من المستخدمين أو تقديم واحدة أو أكثر من عناوين البريد الإلكتروني، مفصولة بفواصل.",
"Mail_Message_No_messages_selected_select_all": "لم تقم بتحديد أي رسالة. هل تريد أن <a href='#' class='select-all'>تحدد جميع</a> الرسائل الظاهرة؟",
Expand Down
7 changes: 7 additions & 0 deletions packages/rocketchat-i18n/i18n/az.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,17 @@
"Accounts_PasswordReset": "Parolun sıfırlanması",
"Accounts_Registration_AuthenticationServices_Default_Roles": "Kimlik Doğrulama Xidmətləri üçün Standart Roles",
"Accounts_Registration_AuthenticationServices_Default_Roles_Description": "Doğrulama xidmətləri vasitəsilə qeydiyyatdan keçərkən standart rollar (vergüllə ayrılmış) istifadəçilər veriləcək",
"Accounts_OAuth_Wordpress_server_type_custom": "Xüsusi",
"Accounts_Registration_AuthenticationServices_Enabled": "Doğrulama Xidmətləri ilə qeydiyyatdan keçin",
"Accounts_OAuth_Wordpress_identity_path": "Kimlik Yolu",
"Accounts_RegistrationForm": "Uçot vərəqəsi",
"Accounts_OAuth_Wordpress_identity_token_sent_via": "Kimlik Token göndərildi",
"Accounts_RegistrationForm_Disabled": "Əlil",
"Accounts_OAuth_Wordpress_token_path": "Token yolu",
"Accounts_RegistrationForm_LinkReplacementText": "Qeydiyyat formu Link dəyişdirmə mətni",
"Accounts_OAuth_Wordpress_authorize_path": "Yola icazə verin",
"Accounts_RegistrationForm_Public": "İctimai",
"Accounts_OAuth_Wordpress_scope": "Sahə",
"Accounts_RegistrationForm_Secret_URL": "Gizli URL",
"Accounts_RegistrationForm_SecretURL": "Qeydiyyatın Forması Gizli URL",
"Accounts_RegistrationForm_SecretURL_Description": "Qeydiyyatınızın URL'sinə əlavə olunacaq təsadüfi bir simli təqdim etməlisiniz. Məsələn: https://open.rocket.chat/register/[secret_hash]",
Expand Down Expand Up @@ -1270,6 +1276,7 @@
"Logout_Others": "Digər Daxil olan yerlərdən çıxın",
"mail-messages": "Mail Mesajları",
"mail-messages_description": "E-poçt mesajlarından istifadə etmək üçün icazə",
"Livechat_registration_form": "Uçot vərəqəsi",
"Mail_Message_Invalid_emails": "Bir və ya daha çox etibarsız e-poçt göndərdiniz:% s",
"Mail_Message_Missing_to": "Bir və ya daha çox istifadəçi seçməlisiniz və ya virgülle ayrılmış bir və ya daha çox e-poçt ünvanını təqdim etməlisiniz.",
"Mail_Message_No_messages_selected_select_all": "Siz heç bir mesaj seçmədiniz",
Expand Down
Loading

0 comments on commit 5c80c28

Please sign in to comment.