-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NEW] Add Search Provider Framework (#10110)
[NEW] Search Provider Framework
- Loading branch information
Showing
75 changed files
with
3,761 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FlowRouter.route('/admin/chatpal', { | ||
name: 'chatpal-admin', | ||
action() { | ||
return BlazeLayout.render('main', { | ||
center: 'ChatpalAdmin', | ||
pageTitle: t('Chatpal_AdminPage') | ||
}); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,310 @@ | ||
.chatpal-admin-link { | ||
color:red !important; | ||
text-decoration: underline !important; | ||
} | ||
|
||
.chatpalProvider .search-form { | ||
padding: 0 24px; | ||
} | ||
|
||
.chatpal_search-loader { | ||
position: relative; | ||
margin-top: 50px; | ||
} | ||
|
||
.chatpal-search-container { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1; | ||
} | ||
|
||
.chatpal-search-result { | ||
position: relative; | ||
overflow: auto; | ||
overflow-x: hidden; | ||
padding: 0 24px 24px; | ||
background-color: #f1f1f1; | ||
flex: 1; | ||
} | ||
|
||
.chatpal-search-typefilter { | ||
display: flex; | ||
} | ||
|
||
.chatpal-search-typefilter li { | ||
cursor: pointer; | ||
display: flex; | ||
flex: 0 0 50%; | ||
border-bottom: 4px solid white; | ||
height: 35px; | ||
justify-content: center; | ||
padding-top: 10px; | ||
} | ||
|
||
.chatpal-search-typefilter li.selected { | ||
border-bottom: 4px solid #125074; | ||
} | ||
|
||
.chatpal-admin-header { | ||
font-size: 18px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.chatpal-search-result-header { | ||
margin: 20px 0; | ||
font-weight: bold; | ||
} | ||
|
||
.chatpal-search-result-single { | ||
background-color: white; | ||
padding: 10px; | ||
border: 1px solid #e6e6e6; | ||
margin-bottom: 10px; | ||
min-height: 92px; | ||
position: relative; | ||
} | ||
|
||
|
||
.chatpal-search-result-user { | ||
background-color: white; | ||
padding: 10px; | ||
border: 1px solid #e6e6e6; | ||
margin-bottom: 10px; | ||
min-height: 40px; | ||
position: relative; | ||
} | ||
|
||
.chatpal-search-result-user .chatpal-avatar { | ||
width: 36px; | ||
height: 36px; | ||
position: absolute; | ||
} | ||
|
||
.chatpal-search-result-user .chatpal-avatar .chatpal-avatar-image { | ||
background-repeat: no-repeat; | ||
background-size: contain; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
.chatpal-search-result-user h2 { | ||
padding-left: 45px; | ||
margin-bottom: 5px; | ||
} | ||
|
||
.chatpal-search-result-user .direct-message { | ||
padding-left: 45px; | ||
font-size: 14px; | ||
font-weight: bold; | ||
} | ||
|
||
.chatpal-channel { | ||
flex: 1 1 auto; | ||
} | ||
|
||
.chatpal-search-result-user .chatpal-channel { | ||
font-weight: bold; | ||
} | ||
|
||
.chatpal-show-more-messages { | ||
font-size: 14px; | ||
font-weight: bold; | ||
color: #125074; | ||
text-align: center; | ||
cursor: pointer; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.chatpal-show-more-messages:hover { | ||
text-decoration: underline; | ||
} | ||
|
||
.chatpal-search-result-user .direct-message a { | ||
color: #125074; | ||
} | ||
|
||
.chatpal-search-result-user .direct-message a:hover { | ||
text-decoration: underline; | ||
} | ||
|
||
.chatpal-search-result-single h2 { | ||
margin-bottom: 20px; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.chatpal-search-result-single .chatpal-avatar { | ||
width: 36px; | ||
height: 36px; | ||
position: absolute; | ||
} | ||
|
||
.chatpal-search-result-single .chatpal-avatar .chatpal-avatar-image { | ||
background-repeat: no-repeat; | ||
background-size: contain; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
.chatpal-search-result-single .chatpal-name { | ||
padding: 0 0 0 46px; | ||
font-size: 14px; | ||
color: #444; | ||
font-weight: bold; | ||
} | ||
|
||
.chatpal-search-result-single .chatpal-date { | ||
font-size: 12px; | ||
color: #a0a0a0; | ||
font-weight: normal; | ||
} | ||
|
||
.chatpal-search-result-single .chatpal-time { | ||
font-size: 12px; | ||
color: #a0a0a0; | ||
margin-left: 3px; | ||
} | ||
|
||
.chatpal-search-result-single .chatpal-message { | ||
padding: 0 0 0 46px; | ||
line-height: 20px; | ||
margin-top: 5px; | ||
overflow-x: hidden; | ||
} | ||
|
||
.chatpal-search-result-single .chatpal-message em { | ||
font-style: normal; | ||
background-color: #FAF9C8; | ||
} | ||
|
||
.chatpal-search-result-single .chatpal-link { | ||
display: none; | ||
flex: 20; | ||
color: #125074; | ||
} | ||
|
||
.chatpal-search-result-single .chatpal-link:hover { | ||
text-decoration: underline; | ||
} | ||
|
||
.chatpal-search-result-single:hover .chatpal-link { | ||
display: inline-block; | ||
} | ||
|
||
.chatpal-paging { | ||
text-align: center; | ||
margin: 30px 0 50px 0; | ||
} | ||
|
||
.chatpal-paging-text { | ||
display: inline-block; | ||
position: relative; | ||
top: -2px; | ||
} | ||
|
||
.chatpal-paging .chatpal-paging-button { | ||
color: #125074; | ||
cursor: pointer; | ||
font-size: 20px; | ||
display: inline-block; | ||
} | ||
|
||
.chatpal-paging .chatpal-paging-prev { | ||
padding-right: 10px; | ||
} | ||
|
||
.chatpal-paging .chatpal-paging-next { | ||
padding-left: 10px; | ||
} | ||
|
||
.chatpal-search-info { | ||
margin-top: 40px; | ||
padding: 10px; | ||
} | ||
|
||
.chatpal-search-welcome { | ||
text-align: center; | ||
padding-top: 40px; | ||
} | ||
|
||
.chatpal-search-result-room h2 { | ||
padding-left: 0 !important; | ||
} | ||
|
||
.chatpal-search-result-list em { | ||
font-style: normal; | ||
background-color: #FAF9C8; | ||
} | ||
|
||
.chatpal-search-result-room .chatpal-link { | ||
display: none; | ||
margin-left: 3px; | ||
color: #125074; | ||
} | ||
|
||
.chatpal-search-result-room:hover .chatpal-link { | ||
display: inline-block; | ||
} | ||
|
||
.chatpal-search-result-room .chatpal-link:hover{ | ||
text-decoration: underline; | ||
} | ||
|
||
.chatpal-search-pills div { | ||
background-color: #f1f1f1; | ||
padding: 2px 5px; | ||
display: inline-block; | ||
margin-right: 5px; | ||
border-radius: 3px; | ||
margin-top: 5px; | ||
} | ||
|
||
.apikey h2 { | ||
margin-top: 20px; | ||
} | ||
|
||
.apikey .key { | ||
background-color: #f1f1f1; | ||
position: relative; | ||
margin: 20px 0; | ||
font-size: 20px; | ||
text-align: center; | ||
padding: 10px; | ||
} | ||
|
||
.apikey a { | ||
text-decoration: underline; | ||
} | ||
|
||
.chatpal-suggestion { | ||
padding: 10px; | ||
display: flex; | ||
justify-items: center; | ||
} | ||
|
||
.chatpal-suggestion-text { | ||
flex: 1 1 auto; | ||
} | ||
|
||
.chatpal-suggestion-hint { | ||
display: none; | ||
} | ||
|
||
.rocket-search-suggestion-item.active .chatpal-suggestion-hint { | ||
display: block; | ||
} | ||
|
||
.chatpalProvider .rc-input__icon { | ||
width: 26px; | ||
left: 10px; | ||
top: 3px; | ||
} | ||
|
||
.chatpalProvider .rc-input__icon-svg { | ||
font-size: 26px !important; | ||
} | ||
|
||
.chatpalProvider .rocket-search-suggestion-item.active, .chatpalProvider .rocket-search-suggestion-item:hover { | ||
background-color: #125074; | ||
color: white; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<template name="ChatpalAdmin"> | ||
<section class="page-container page-list"> | ||
<header class="rc-header"> | ||
<div class="rc-header__wrap"> | ||
<span class="rc-header__block"> | ||
{{_ pageTitle}} | ||
</span> | ||
</div> | ||
</header> | ||
<div class="content"> | ||
{{#unless isAdmin}} | ||
<p>{{_ "You_are_not_authorized_to_view_this_page"}}</p> | ||
{{else}} | ||
<form> | ||
<div class="rocket-form"> | ||
<fieldset> | ||
<div class="input-line"> | ||
<label>{{_ "Chatpal_Email_Address"}}</label> | ||
<div> | ||
<input class="rc-input__element" type="text" autocomplete="off" name="email"> | ||
</div> | ||
</div> | ||
<div class="input-line"> | ||
<label>{{_ "Chatpal_Terms_and_Conditions"}}</label> | ||
<div id="chatpal-tac" class="chatpal-tac rc-input__element"> | ||
{{{tac}}} | ||
</div> | ||
</div> | ||
<div class="input-line"> | ||
<div> | ||
<label> | ||
<input type="checkbox" name="readtac"> | ||
{{_ "Chatpal_TAC_read"}} | ||
</label> | ||
</div> | ||
</div> | ||
</fieldset> | ||
<div class="submit"> | ||
<button class="button primary send"><span>{{_ "Chatpal_create_key"}}</span></button> | ||
</div> | ||
</div> | ||
</form> | ||
{{#if apiKey}} | ||
<div class="apikey"> | ||
<h2>Here is your Chatpal Api Key</h2> | ||
<div class="key"> | ||
{{apiKey}} | ||
</div><!-- TODO copy to clipboard --> | ||
<p>Please copy the key and insert it in the key field of the Chatpal Provider in the <a href="./admin/Search">Search Admin Page</a>.</p> | ||
</div> | ||
{{/if}} | ||
{{/unless}} | ||
</div> | ||
</section> | ||
</template> |
Oops, something went wrong.