-
-
Notifications
You must be signed in to change notification settings - Fork 776
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a modal to start chats with non-roster contacts
- Loading branch information
Showing
15 changed files
with
114 additions
and
55 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
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,20 @@ | ||
import { __ } from 'i18n'; | ||
import { html } from 'lit'; | ||
|
||
/** | ||
* @param {import('../new-chat.js').default} el | ||
*/ | ||
export default (el) => { | ||
const i18n_start_chat = __('Start Chat'); | ||
const i18n_xmpp_address = __('XMPP Address'); | ||
return html` <div class="modal-body"> | ||
<span class="modal-alert"></span> | ||
<form @submit=${/** @param {SubmitEvent} ev */(ev) => el.startChatFromForm(ev)}> | ||
<div class="mb-3"> | ||
<label class="form-label" for="jid">${i18n_xmpp_address}</label> | ||
<input type="text" name="jid" class="form-control" required /> | ||
</div> | ||
<button type="submit" class="btn btn-primary">${i18n_start_chat}</button> | ||
</form> | ||
</div>`; | ||
}; |
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
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 |
---|---|---|
@@ -1,9 +1,21 @@ | ||
export default class AddContactModal extends BaseModal { | ||
renderModal(): import("lit").TemplateResult<1>; | ||
getModalTitle(): any; | ||
validateSubmission(jid: any): boolean; | ||
afterSubmission(_form: any, jid: any, name: any, group: any): void; | ||
addContactFromForm(ev: any): Promise<void>; | ||
/** | ||
* @param {string} jid | ||
*/ | ||
validateSubmission(jid: string): boolean; | ||
/** | ||
* @param {HTMLFormElement} _form | ||
* @param {string} jid | ||
* @param {string} name | ||
* @param {FormDataEntryValue} group | ||
*/ | ||
afterSubmission(_form: HTMLFormElement, jid: string, name: string, group: FormDataEntryValue): Promise<void>; | ||
/** | ||
* @param {Event} ev | ||
*/ | ||
addContactFromForm(ev: Event): Promise<void>; | ||
} | ||
import BaseModal from 'plugins/modal/modal.js'; | ||
//# sourceMappingURL=add-contact.d.ts.map |
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,19 @@ | ||
export default class NewChatModal extends BaseModal { | ||
renderModal(): import("lit").TemplateResult<1>; | ||
getModalTitle(): any; | ||
/** | ||
* @param {string} jid | ||
*/ | ||
validateSubmission(jid: string): boolean; | ||
/** | ||
* @param {HTMLFormElement} _form | ||
* @param {string} jid | ||
*/ | ||
afterSubmission(_form: HTMLFormElement, jid: string): Promise<void>; | ||
/** | ||
* @param {SubmitEvent} ev | ||
*/ | ||
startChatFromForm(ev: SubmitEvent): Promise<void>; | ||
} | ||
import BaseModal from 'plugins/modal/modal.js'; | ||
//# sourceMappingURL=new-chat.d.ts.map |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
declare function _default(el: any): import("lit").TemplateResult<1>; | ||
declare function _default(el: import("../add-contact.js").default): import("lit").TemplateResult<1>; | ||
export default _default; | ||
//# sourceMappingURL=add-contact.d.ts.map |
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,3 @@ | ||
declare function _default(el: import("../new-chat.js").default): import("lit").TemplateResult<1>; | ||
export default _default; | ||
//# sourceMappingURL=new-chat.d.ts.map |
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
declare function _default(el: RosterView): import("lit").TemplateResult<1>; | ||
declare function _default(el: import("../rosterview").default): import("lit").TemplateResult<1>; | ||
export default _default; | ||
export type RosterView = import("../rosterview").default; | ||
//# sourceMappingURL=roster.d.ts.map |