Skip to content

Commit

Permalink
Add types info
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbrand committed Dec 17, 2024
1 parent d49b068 commit 82dc862
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions src/plugins/muc-views/modals/templates/add-muc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import DOMPurify from 'dompurify';
import { __ } from 'i18n';
import { _converse, api } from '@converse/headless';
import { html } from 'lit';
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
import { getAutoCompleteList } from '../../search.js';
import { __ } from 'i18n';

const nickname_input = (el) => {
const nickname_input = () => {
const i18n_nickname = __('Nickname');
const i18n_required_field = __('This field is required');
return html`
Expand All @@ -23,6 +23,9 @@ const nickname_input = (el) => {
`;
};

/**
* @param {import('../add-muc.js').default} el
*/
export default (el) => {
const i18n_join = __('Join');
const muc_domain = el.model.get('muc_domain') || api.settings.get('muc_domain');
Expand Down Expand Up @@ -61,13 +64,13 @@ export default (el) => {
${unsafeHTML(DOMPurify.sanitize(muc_roomid_policy_hint, { 'ALLOWED_TAGS': ['b', 'br', 'em'] }))}
</div>`
: ''}
${!api.settings.get('locked_muc_nickname') ? nickname_input(el) : ''}
${!api.settings.get('locked_muc_nickname') ? nickname_input() : ''}
<input
type="submit"
class="btn btn-primary"
name="join"
value="${i18n_join || ''}"
?disabled=${muc_roomid_policy_error_msg}
?disabled="${muc_roomid_policy_error_msg}"
/>
</form>
`;
Expand Down
2 changes: 1 addition & 1 deletion src/types/plugins/muc-views/modals/templates/add-muc.d.ts
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-muc.js").default): import("lit").TemplateResult<1>;
export default _default;
//# sourceMappingURL=add-muc.d.ts.map

0 comments on commit 82dc862

Please sign in to comment.