Bundled output for commit 35f76bce60

Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
This commit is contained in:
flarum-bot 2024-09-28 11:55:36 +00:00
parent 35f76bce60
commit ae03e6d473
39 changed files with 39 additions and 38 deletions

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
import AdminPage from './AdminPage'; import AdminPage from './AdminPage';
import type { IPageAttrs } from '../../common/components/Page'; import type { IPageAttrs } from '../../common/components/Page';
import type Mithril from 'mithril'; import type Mithril from 'mithril';

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
import AdminPage from './AdminPage'; import AdminPage from './AdminPage';
import ItemList from '../../common/utils/ItemList'; import ItemList from '../../common/utils/ItemList';
import type Mithril from 'mithril'; import type Mithril from 'mithril';

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
import ItemList from '../../common/utils/ItemList'; import ItemList from '../../common/utils/ItemList';
import AdminPage from './AdminPage'; import AdminPage from './AdminPage';
import type { IPageAttrs } from '../../common/components/Page'; import type { IPageAttrs } from '../../common/components/Page';

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
import FormModal, { IFormModalAttrs } from '../../common/components/FormModal'; import FormModal, { IFormModalAttrs } from '../../common/components/FormModal';
import ItemList from '../../common/utils/ItemList'; import ItemList from '../../common/utils/ItemList';
import Stream from '../../common/utils/Stream'; import Stream from '../../common/utils/Stream';

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
import ItemList from '../../common/utils/ItemList'; import ItemList from '../../common/utils/ItemList';
import AdminPage from './AdminPage'; import AdminPage from './AdminPage';
import type { Children } from 'mithril'; import type { Children } from 'mithril';

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
/// <reference types="mithril" /> /// <reference types="mithril" />
import SettingsModal from './SettingsModal'; import SettingsModal from './SettingsModal';
export default class EditCustomCssModal extends SettingsModal { export default class EditCustomCssModal extends SettingsModal {

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
/// <reference types="mithril" /> /// <reference types="mithril" />
import SettingsModal from './SettingsModal'; import SettingsModal from './SettingsModal';
export default class EditCustomFooterModal extends SettingsModal { export default class EditCustomFooterModal extends SettingsModal {

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
/// <reference types="mithril" /> /// <reference types="mithril" />
import SettingsModal from './SettingsModal'; import SettingsModal from './SettingsModal';
export default class EditCustomHeaderModal extends SettingsModal { export default class EditCustomHeaderModal extends SettingsModal {

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
import Modal, { IInternalModalAttrs } from '../../common/components/Modal'; import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
export interface ILoadingModalAttrs extends IInternalModalAttrs { export interface ILoadingModalAttrs extends IInternalModalAttrs {
} }

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
import AdminPage from './AdminPage'; import AdminPage from './AdminPage';
import type { IPageAttrs } from '../../common/components/Page'; import type { IPageAttrs } from '../../common/components/Page';
import type { AlertIdentifier } from '../../common/states/AlertManagerState'; import type { AlertIdentifier } from '../../common/states/AlertManagerState';

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
/// <reference types="mithril" /> /// <reference types="mithril" />
import AdminPage from './AdminPage'; import AdminPage from './AdminPage';
export default class PermissionsPage extends AdminPage { export default class PermissionsPage extends AdminPage {

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
import Modal, { IInternalModalAttrs } from '../../common/components/Modal'; import Modal, { IInternalModalAttrs } from '../../common/components/Modal';
import ExtensionReadme from '../models/ExtensionReadme'; import ExtensionReadme from '../models/ExtensionReadme';
import type Mithril from 'mithril'; import type Mithril from 'mithril';

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
import Mithril from 'mithril'; import Mithril from 'mithril';
import type User from '../../common/models/User'; import type User from '../../common/models/User';
import type { IPageAttrs } from '../../common/components/Page'; import type { IPageAttrs } from '../../common/components/Page';

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
import FormModal, { IFormModalAttrs } from '../../common/components/FormModal'; import FormModal, { IFormModalAttrs } from '../../common/components/FormModal';
import ItemList from '../utils/ItemList'; import ItemList from '../utils/ItemList';
import Stream from '../utils/Stream'; import Stream from '../utils/Stream';

View File

@ -1,5 +1,5 @@
import IExtender, { IExtensionModule } from './IExtender'; import IExtender, { IExtensionModule } from './IExtender';
import Application from '../Application'; import type Application from '../Application';
import ActualModel from '../Model'; import ActualModel from '../Model';
export default class Model implements IExtender { export default class Model implements IExtender {
private readonly model; private readonly model;

View File

@ -1,4 +1,5 @@
import Application, { AsyncNewComponent, NewComponent } from '../Application'; import type Application from '../Application';
import type { AsyncNewComponent, NewComponent } from '../Application';
import IExtender, { IExtensionModule } from './IExtender'; import IExtender, { IExtensionModule } from './IExtender';
declare type HelperRoute = (...args: any) => string; declare type HelperRoute = (...args: any) => string;
export default class Routes implements IExtender { export default class Routes implements IExtender {

View File

@ -1,4 +1,4 @@
import Application from '../Application'; import type Application from '../Application';
import IExtender, { IExtensionModule } from './IExtender'; import IExtender, { IExtensionModule } from './IExtender';
import Model from '../Model'; import Model from '../Model';
export default class Store implements IExtender { export default class Store implements IExtender {

View File

@ -1,4 +1,4 @@
import Application from '../Application'; import type Application from '../Application';
import IExtender, { IExtensionModule } from './IExtender'; import IExtender, { IExtensionModule } from './IExtender';
export default class ThemeMode implements IExtender { export default class ThemeMode implements IExtender {
private readonly colorSchemes; private readonly colorSchemes;

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
import FormModal, { IFormModalAttrs } from '../../common/components/FormModal'; import FormModal, { IFormModalAttrs } from '../../common/components/FormModal';
import Stream from '../../common/utils/Stream'; import Stream from '../../common/utils/Stream';
import type Mithril from 'mithril'; import type Mithril from 'mithril';

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
import FormModal, { IFormModalAttrs } from '../../common/components/FormModal'; import FormModal, { IFormModalAttrs } from '../../common/components/FormModal';
import Mithril from 'mithril'; import Mithril from 'mithril';
import ItemList from '../../common/utils/ItemList'; import ItemList from '../../common/utils/ItemList';

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
import Notification from './Notification'; import Notification from './Notification';
/** /**
* The `DiscussionRenamedNotification` component displays a notification which * The `DiscussionRenamedNotification` component displays a notification which

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
import FormModal, { IFormModalAttrs } from '../../common/components/FormModal'; import FormModal, { IFormModalAttrs } from '../../common/components/FormModal';
import Stream from '../../common/utils/Stream'; import Stream from '../../common/utils/Stream';
import Mithril from 'mithril'; import Mithril from 'mithril';

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
import FormModal, { IFormModalAttrs } from '../../common/components/FormModal'; import FormModal, { IFormModalAttrs } from '../../common/components/FormModal';
import ItemList from '../../common/utils/ItemList'; import ItemList from '../../common/utils/ItemList';
import Stream from '../../common/utils/Stream'; import Stream from '../../common/utils/Stream';

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
import FormModal, { IFormModalAttrs } from '../../common/components/FormModal'; import FormModal, { IFormModalAttrs } from '../../common/components/FormModal';
import Stream from '../../common/utils/Stream'; import Stream from '../../common/utils/Stream';
import Mithril from 'mithril'; import Mithril from 'mithril';

View File

@ -1,4 +1,4 @@
/// <reference path="../../@types/translator-icu-rich.d.ts" /> /// <reference path="../../../src/@types/translator-icu-rich.d.ts" />
import FormModal, { IFormModalAttrs } from '../../common/components/FormModal'; import FormModal, { IFormModalAttrs } from '../../common/components/FormModal';
import ItemList from '../../common/utils/ItemList'; import ItemList from '../../common/utils/ItemList';
import Stream from '../../common/utils/Stream'; import Stream from '../../common/utils/Stream';

2
framework/core/js/dist/admin.js generated vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
framework/core/js/dist/forum.js generated vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
"use strict";(self.webpackChunkflarum_core=self.webpackChunkflarum_core||[]).push([[437],{6778:(s,e,t)=>{t.d(e,{Z:()=>u});var o=t(7905),i=t(2190),r=t(5226);class n extends i.Z{handler(){return this.attrs.when()||void 0}oncreate(s){super.oncreate(s),this.boundHandler=this.handler.bind(this),$(window).on("beforeunload",this.boundHandler)}onremove(s){super.onremove(s),$(window).off("beforeunload",this.boundHandler)}view(s){return m("[",null,s.children)}}flarum.reg.add("core","common/components/ConfirmDocumentUnload",n);var a=t(4944),d=t(1268),l=t(4041),c=t(3344),h=t(7323);class u extends i.Z{constructor(){super(...arguments),(0,o.Z)(this,"loading",!1),(0,o.Z)(this,"composer",void 0),(0,o.Z)(this,"jumpToPreview",void 0)}oninit(s){super.oninit(s),this.composer=this.attrs.composer,this.attrs.confirmExit&&this.composer.preventClosingWhen((()=>this.hasChanges()),this.attrs.confirmExit),this.composer.fields.content(this.attrs.originalContent||"")}view(){var s;return m(n,{when:this.hasChanges.bind(this)},m("div",{className:(0,c.Z)("ComposerBody",this.attrs.className)},m(h.Z,{user:this.attrs.user,className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},(0,d.Z)(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"},m(a.Z,{submitLabel:this.attrs.submitLabel,placeholder:this.attrs.placeholder,disabled:this.loading||this.attrs.disabled,composer:this.composer,preview:null==(s=this.jumpToPreview)?void 0:s.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()}))),m(r.Z,{display:"unset",containerClassName:(0,c.Z)("ComposerBody-loading",this.loading&&"active"),size:"large"})))}hasChanges(){const s=this.composer.fields.content();return Boolean(s)&&s!==this.attrs.originalContent}headerItems(){return new l.Z}loaded(){this.loading=!1,m.redraw()}}(0,o.Z)(u,"focusOnSelector",null),flarum.reg.add("core","forum/components/ComposerBody",u)},3829:(s,e,t)=>{t.r(e),t.d(e,{default:()=>a});var o=t(6789),i=t(6778),r=t(1552),n=t(6458);class a extends i.Z{static initAttrs(s){super.initAttrs(s),s.placeholder=s.placeholder||(0,r.Z)(o.Z.translator.trans("core.forum.composer_discussion.body_placeholder")),s.submitLabel=s.submitLabel||o.Z.translator.trans("core.forum.composer_discussion.submit_button"),s.confirmExit=s.confirmExit||(0,r.Z)(o.Z.translator.trans("core.forum.composer_discussion.discard_confirmation")),s.titlePlaceholder=s.titlePlaceholder||(0,r.Z)(o.Z.translator.trans("core.forum.composer_discussion.title_placeholder")),s.className="ComposerBody--discussion"}oninit(s){super.oninit(s),this.composer.fields.title=this.composer.fields.title||(0,n.Z)(""),this.title=this.composer.fields.title}headerItems(){const s=super.headerItems();return s.add("title",m("h3",null,o.Z.translator.trans("core.forum.composer_discussion.title")),100),s.add("discussionTitle",m("h3",null,m("input",{className:"FormControl",bidi:this.title,placeholder:this.attrs.titlePlaceholder,disabled:!!this.attrs.disabled,onkeydown:this.onkeydown.bind(this)}))),s}onkeydown(s){13===s.which&&(s.preventDefault(),this.composer.editor.moveCursorTo(0)),s.redraw=!1}hasChanges(){return this.title()||this.composer.fields.content()}data(){return{title:this.title(),content:this.composer.fields.content()}}onsubmit(){this.loading=!0;const s=this.data();o.Z.store.createRecord("discussions").save(s).then((s=>{this.composer.hide(),o.Z.discussions.refresh(),m.route.set(o.Z.route.discussion(s))}),this.loaded.bind(this))}}flarum.reg.add("core","forum/components/DiscussionComposer",a)}}]); "use strict";(self.webpackChunkflarum_core=self.webpackChunkflarum_core||[]).push([[437],{3958:(s,e,t)=>{t.d(e,{Z:()=>u});var o=t(7905),i=t(2190),r=t(5226);class n extends i.Z{handler(){return this.attrs.when()||void 0}oncreate(s){super.oncreate(s),this.boundHandler=this.handler.bind(this),$(window).on("beforeunload",this.boundHandler)}onremove(s){super.onremove(s),$(window).off("beforeunload",this.boundHandler)}view(s){return m("[",null,s.children)}}flarum.reg.add("core","common/components/ConfirmDocumentUnload",n);var a=t(4944),d=t(1268),l=t(4041),c=t(3344),h=t(7323);class u extends i.Z{constructor(){super(...arguments),(0,o.Z)(this,"loading",!1),(0,o.Z)(this,"composer",void 0),(0,o.Z)(this,"jumpToPreview",void 0)}oninit(s){super.oninit(s),this.composer=this.attrs.composer,this.attrs.confirmExit&&this.composer.preventClosingWhen((()=>this.hasChanges()),this.attrs.confirmExit),this.composer.fields.content(this.attrs.originalContent||"")}view(){var s;return m(n,{when:this.hasChanges.bind(this)},m("div",{className:(0,c.Z)("ComposerBody",this.attrs.className)},m(h.Z,{user:this.attrs.user,className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},(0,d.Z)(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"},m(a.Z,{submitLabel:this.attrs.submitLabel,placeholder:this.attrs.placeholder,disabled:this.loading||this.attrs.disabled,composer:this.composer,preview:null==(s=this.jumpToPreview)?void 0:s.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()}))),m(r.Z,{display:"unset",containerClassName:(0,c.Z)("ComposerBody-loading",this.loading&&"active"),size:"large"})))}hasChanges(){const s=this.composer.fields.content();return Boolean(s)&&s!==this.attrs.originalContent}headerItems(){return new l.Z}loaded(){this.loading=!1,m.redraw()}}(0,o.Z)(u,"focusOnSelector",null),flarum.reg.add("core","forum/components/ComposerBody",u)},3829:(s,e,t)=>{t.r(e),t.d(e,{default:()=>a});var o=t(6789),i=t(3958),r=t(1552),n=t(6458);class a extends i.Z{static initAttrs(s){super.initAttrs(s),s.placeholder=s.placeholder||(0,r.Z)(o.Z.translator.trans("core.forum.composer_discussion.body_placeholder")),s.submitLabel=s.submitLabel||o.Z.translator.trans("core.forum.composer_discussion.submit_button"),s.confirmExit=s.confirmExit||(0,r.Z)(o.Z.translator.trans("core.forum.composer_discussion.discard_confirmation")),s.titlePlaceholder=s.titlePlaceholder||(0,r.Z)(o.Z.translator.trans("core.forum.composer_discussion.title_placeholder")),s.className="ComposerBody--discussion"}oninit(s){super.oninit(s),this.composer.fields.title=this.composer.fields.title||(0,n.Z)(""),this.title=this.composer.fields.title}headerItems(){const s=super.headerItems();return s.add("title",m("h3",null,o.Z.translator.trans("core.forum.composer_discussion.title")),100),s.add("discussionTitle",m("h3",null,m("input",{className:"FormControl",bidi:this.title,placeholder:this.attrs.titlePlaceholder,disabled:!!this.attrs.disabled,onkeydown:this.onkeydown.bind(this)}))),s}onkeydown(s){13===s.which&&(s.preventDefault(),this.composer.editor.moveCursorTo(0)),s.redraw=!1}hasChanges(){return this.title()||this.composer.fields.content()}data(){return{title:this.title(),content:this.composer.fields.content()}}onsubmit(){this.loading=!0;const s=this.data();o.Z.store.createRecord("discussions").save(s).then((s=>{this.composer.hide(),o.Z.discussions.refresh(),m.route.set(o.Z.route.discussion(s))}),this.loaded.bind(this))}}flarum.reg.add("core","forum/components/DiscussionComposer",a)}}]);
//# sourceMappingURL=DiscussionComposer.js.map //# sourceMappingURL=DiscussionComposer.js.map

View File

@ -1,2 +1,2 @@
"use strict";(self.webpackChunkflarum_core=self.webpackChunkflarum_core||[]).push([[293],{6778:(t,s,e)=>{e.d(s,{Z:()=>h});var o=e(7905),r=e(2190),i=e(5226);class n extends r.Z{handler(){return this.attrs.when()||void 0}oncreate(t){super.oncreate(t),this.boundHandler=this.handler.bind(this),$(window).on("beforeunload",this.boundHandler)}onremove(t){super.onremove(t),$(window).off("beforeunload",this.boundHandler)}view(t){return m("[",null,t.children)}}flarum.reg.add("core","common/components/ConfirmDocumentUnload",n);var a=e(4944),d=e(1268),c=e(4041),l=e(3344),u=e(7323);class h extends r.Z{constructor(){super(...arguments),(0,o.Z)(this,"loading",!1),(0,o.Z)(this,"composer",void 0),(0,o.Z)(this,"jumpToPreview",void 0)}oninit(t){super.oninit(t),this.composer=this.attrs.composer,this.attrs.confirmExit&&this.composer.preventClosingWhen((()=>this.hasChanges()),this.attrs.confirmExit),this.composer.fields.content(this.attrs.originalContent||"")}view(){var t;return m(n,{when:this.hasChanges.bind(this)},m("div",{className:(0,l.Z)("ComposerBody",this.attrs.className)},m(u.Z,{user:this.attrs.user,className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},(0,d.Z)(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"},m(a.Z,{submitLabel:this.attrs.submitLabel,placeholder:this.attrs.placeholder,disabled:this.loading||this.attrs.disabled,composer:this.composer,preview:null==(t=this.jumpToPreview)?void 0:t.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()}))),m(i.Z,{display:"unset",containerClassName:(0,l.Z)("ComposerBody-loading",this.loading&&"active"),size:"large"})))}hasChanges(){const t=this.composer.fields.content();return Boolean(t)&&t!==this.attrs.originalContent}headerItems(){return new c.Z}loaded(){this.loading=!1,m.redraw()}}(0,o.Z)(h,"focusOnSelector",null),flarum.reg.add("core","forum/components/ComposerBody",h)},500:(t,s,e)=>{e.r(s),e.d(s,{default:()=>c});var o=e(6789),r=e(6778),i=e(8312),n=e(6597),a=e(9133);function d(t){o.Z.composer.isFullScreen()&&(o.Z.composer.minimize(),t.stopPropagation())}class c extends r.Z{static initAttrs(t){super.initAttrs(t),t.submitLabel=t.submitLabel||o.Z.translator.trans("core.forum.composer_edit.submit_button"),t.confirmExit=t.confirmExit||o.Z.translator.trans("core.forum.composer_edit.discard_confirmation"),t.originalContent=t.originalContent||t.post.content(),t.user=t.user||t.post.user(),t.post.editedContent=t.originalContent}headerItems(){const t=super.headerItems(),s=this.attrs.post;return t.add("title",m("h3",null,m(a.Z,{name:"fas fa-pencil-alt"})," ",m(n.Z,{href:o.Z.route.discussion(s.discussion(),s.number()),onclick:d},o.Z.translator.trans("core.forum.composer_edit.post_link",{number:s.number(),discussion:s.discussion().title()})))),t}jumpToPreview(t){d(t),m.route.set(o.Z.route.post(this.attrs.post))}data(){return{content:this.composer.fields.content()}}onsubmit(){const t=this.attrs.post.discussion();this.loading=!0;const s=this.data();this.attrs.post.save(s).then((s=>{if(o.Z.viewingDiscussion(t))o.Z.current.get("stream").goToNumber(s.number());else{const t=o.Z.alerts.show({type:"success",controls:[m(i.Z,{className:"Button Button--link",onclick:()=>{m.route.set(o.Z.route.post(s)),o.Z.alerts.dismiss(t)}},o.Z.translator.trans("core.forum.composer_edit.view_button"))]},o.Z.translator.trans("core.forum.composer_edit.edited_message"))}this.composer.hide()}),this.loaded.bind(this))}}flarum.reg.add("core","forum/components/EditPostComposer",c)}}]); "use strict";(self.webpackChunkflarum_core=self.webpackChunkflarum_core||[]).push([[293],{3958:(t,s,e)=>{e.d(s,{Z:()=>h});var o=e(7905),r=e(2190),i=e(5226);class n extends r.Z{handler(){return this.attrs.when()||void 0}oncreate(t){super.oncreate(t),this.boundHandler=this.handler.bind(this),$(window).on("beforeunload",this.boundHandler)}onremove(t){super.onremove(t),$(window).off("beforeunload",this.boundHandler)}view(t){return m("[",null,t.children)}}flarum.reg.add("core","common/components/ConfirmDocumentUnload",n);var a=e(4944),d=e(1268),c=e(4041),l=e(3344),u=e(7323);class h extends r.Z{constructor(){super(...arguments),(0,o.Z)(this,"loading",!1),(0,o.Z)(this,"composer",void 0),(0,o.Z)(this,"jumpToPreview",void 0)}oninit(t){super.oninit(t),this.composer=this.attrs.composer,this.attrs.confirmExit&&this.composer.preventClosingWhen((()=>this.hasChanges()),this.attrs.confirmExit),this.composer.fields.content(this.attrs.originalContent||"")}view(){var t;return m(n,{when:this.hasChanges.bind(this)},m("div",{className:(0,l.Z)("ComposerBody",this.attrs.className)},m(u.Z,{user:this.attrs.user,className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},(0,d.Z)(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"},m(a.Z,{submitLabel:this.attrs.submitLabel,placeholder:this.attrs.placeholder,disabled:this.loading||this.attrs.disabled,composer:this.composer,preview:null==(t=this.jumpToPreview)?void 0:t.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()}))),m(i.Z,{display:"unset",containerClassName:(0,l.Z)("ComposerBody-loading",this.loading&&"active"),size:"large"})))}hasChanges(){const t=this.composer.fields.content();return Boolean(t)&&t!==this.attrs.originalContent}headerItems(){return new c.Z}loaded(){this.loading=!1,m.redraw()}}(0,o.Z)(h,"focusOnSelector",null),flarum.reg.add("core","forum/components/ComposerBody",h)},500:(t,s,e)=>{e.r(s),e.d(s,{default:()=>c});var o=e(6789),r=e(3958),i=e(8312),n=e(6597),a=e(9133);function d(t){o.Z.composer.isFullScreen()&&(o.Z.composer.minimize(),t.stopPropagation())}class c extends r.Z{static initAttrs(t){super.initAttrs(t),t.submitLabel=t.submitLabel||o.Z.translator.trans("core.forum.composer_edit.submit_button"),t.confirmExit=t.confirmExit||o.Z.translator.trans("core.forum.composer_edit.discard_confirmation"),t.originalContent=t.originalContent||t.post.content(),t.user=t.user||t.post.user(),t.post.editedContent=t.originalContent}headerItems(){const t=super.headerItems(),s=this.attrs.post;return t.add("title",m("h3",null,m(a.Z,{name:"fas fa-pencil-alt"})," ",m(n.Z,{href:o.Z.route.discussion(s.discussion(),s.number()),onclick:d},o.Z.translator.trans("core.forum.composer_edit.post_link",{number:s.number(),discussion:s.discussion().title()})))),t}jumpToPreview(t){d(t),m.route.set(o.Z.route.post(this.attrs.post))}data(){return{content:this.composer.fields.content()}}onsubmit(){const t=this.attrs.post.discussion();this.loading=!0;const s=this.data();this.attrs.post.save(s).then((s=>{if(o.Z.viewingDiscussion(t))o.Z.current.get("stream").goToNumber(s.number());else{const t=o.Z.alerts.show({type:"success",controls:[m(i.Z,{className:"Button Button--link",onclick:()=>{m.route.set(o.Z.route.post(s)),o.Z.alerts.dismiss(t)}},o.Z.translator.trans("core.forum.composer_edit.view_button"))]},o.Z.translator.trans("core.forum.composer_edit.edited_message"))}this.composer.hide()}),this.loaded.bind(this))}}flarum.reg.add("core","forum/components/EditPostComposer",c)}}]);
//# sourceMappingURL=EditPostComposer.js.map //# sourceMappingURL=EditPostComposer.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
"use strict";(self.webpackChunkflarum_core=self.webpackChunkflarum_core||[]).push([[630],{6778:(s,e,t)=>{t.d(e,{Z:()=>h});var o=t(7905),r=t(2190),i=t(5226);class n extends r.Z{handler(){return this.attrs.when()||void 0}oncreate(s){super.oncreate(s),this.boundHandler=this.handler.bind(this),$(window).on("beforeunload",this.boundHandler)}onremove(s){super.onremove(s),$(window).off("beforeunload",this.boundHandler)}view(s){return m("[",null,s.children)}}flarum.reg.add("core","common/components/ConfirmDocumentUnload",n);var a=t(4944),c=t(1268),l=t(4041),d=t(3344),u=t(7323);class h extends r.Z{constructor(){super(...arguments),(0,o.Z)(this,"loading",!1),(0,o.Z)(this,"composer",void 0),(0,o.Z)(this,"jumpToPreview",void 0)}oninit(s){super.oninit(s),this.composer=this.attrs.composer,this.attrs.confirmExit&&this.composer.preventClosingWhen((()=>this.hasChanges()),this.attrs.confirmExit),this.composer.fields.content(this.attrs.originalContent||"")}view(){var s;return m(n,{when:this.hasChanges.bind(this)},m("div",{className:(0,d.Z)("ComposerBody",this.attrs.className)},m(u.Z,{user:this.attrs.user,className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},(0,c.Z)(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"},m(a.Z,{submitLabel:this.attrs.submitLabel,placeholder:this.attrs.placeholder,disabled:this.loading||this.attrs.disabled,composer:this.composer,preview:null==(s=this.jumpToPreview)?void 0:s.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()}))),m(i.Z,{display:"unset",containerClassName:(0,d.Z)("ComposerBody-loading",this.loading&&"active"),size:"large"})))}hasChanges(){const s=this.composer.fields.content();return Boolean(s)&&s!==this.attrs.originalContent}headerItems(){return new l.Z}loaded(){this.loading=!1,m.redraw()}}(0,o.Z)(h,"focusOnSelector",null),flarum.reg.add("core","forum/components/ComposerBody",h)},2925:(s,e,t)=>{t.r(e),t.d(e,{default:()=>d});var o=t(6789),r=t(6778),i=t(8312),n=t(6597),a=t(1552),c=t(9133);function l(s){o.Z.composer.isFullScreen()&&(o.Z.composer.minimize(),s.stopPropagation())}class d extends r.Z{static initAttrs(s){super.initAttrs(s),s.placeholder=s.placeholder||(0,a.Z)(o.Z.translator.trans("core.forum.composer_reply.body_placeholder")),s.submitLabel=s.submitLabel||o.Z.translator.trans("core.forum.composer_reply.submit_button"),s.confirmExit=s.confirmExit||(0,a.Z)(o.Z.translator.trans("core.forum.composer_reply.discard_confirmation"))}headerItems(){const s=super.headerItems(),e=this.attrs.discussion;return s.add("title",m("h3",null,m(c.Z,{name:"fas fa-reply"})," ",m(n.Z,{href:o.Z.route.discussion(e),onclick:l},e.title()))),s}jumpToPreview(s){l(s),m.route.set(o.Z.route.discussion(this.attrs.discussion,"reply"))}data(){return{content:this.composer.fields.content(),relationships:{discussion:this.attrs.discussion}}}onsubmit(){const s=this.attrs.discussion;this.loading=!0,m.redraw();const e=this.data();o.Z.store.createRecord("posts").save(e).then((e=>{if(o.Z.viewingDiscussion(s)){const s=o.Z.current.get("stream");s.update().then((()=>s.goToNumber(e.number())))}else{let s;const t=m(i.Z,{className:"Button Button--link",onclick:()=>{m.route.set(o.Z.route.post(e)),o.Z.alerts.dismiss(s)}},o.Z.translator.trans("core.forum.composer_reply.view_button"));s=o.Z.alerts.show({type:"success",controls:[t]},o.Z.translator.trans("core.forum.composer_reply.posted_message"))}this.composer.hide()}),this.loaded.bind(this))}}flarum.reg.add("core","forum/components/ReplyComposer",d)}}]); "use strict";(self.webpackChunkflarum_core=self.webpackChunkflarum_core||[]).push([[630],{3958:(s,e,t)=>{t.d(e,{Z:()=>h});var o=t(7905),r=t(2190),i=t(5226);class n extends r.Z{handler(){return this.attrs.when()||void 0}oncreate(s){super.oncreate(s),this.boundHandler=this.handler.bind(this),$(window).on("beforeunload",this.boundHandler)}onremove(s){super.onremove(s),$(window).off("beforeunload",this.boundHandler)}view(s){return m("[",null,s.children)}}flarum.reg.add("core","common/components/ConfirmDocumentUnload",n);var a=t(4944),c=t(1268),l=t(4041),d=t(3344),u=t(7323);class h extends r.Z{constructor(){super(...arguments),(0,o.Z)(this,"loading",!1),(0,o.Z)(this,"composer",void 0),(0,o.Z)(this,"jumpToPreview",void 0)}oninit(s){super.oninit(s),this.composer=this.attrs.composer,this.attrs.confirmExit&&this.composer.preventClosingWhen((()=>this.hasChanges()),this.attrs.confirmExit),this.composer.fields.content(this.attrs.originalContent||"")}view(){var s;return m(n,{when:this.hasChanges.bind(this)},m("div",{className:(0,d.Z)("ComposerBody",this.attrs.className)},m(u.Z,{user:this.attrs.user,className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},(0,c.Z)(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"},m(a.Z,{submitLabel:this.attrs.submitLabel,placeholder:this.attrs.placeholder,disabled:this.loading||this.attrs.disabled,composer:this.composer,preview:null==(s=this.jumpToPreview)?void 0:s.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()}))),m(i.Z,{display:"unset",containerClassName:(0,d.Z)("ComposerBody-loading",this.loading&&"active"),size:"large"})))}hasChanges(){const s=this.composer.fields.content();return Boolean(s)&&s!==this.attrs.originalContent}headerItems(){return new l.Z}loaded(){this.loading=!1,m.redraw()}}(0,o.Z)(h,"focusOnSelector",null),flarum.reg.add("core","forum/components/ComposerBody",h)},2925:(s,e,t)=>{t.r(e),t.d(e,{default:()=>d});var o=t(6789),r=t(3958),i=t(8312),n=t(6597),a=t(1552),c=t(9133);function l(s){o.Z.composer.isFullScreen()&&(o.Z.composer.minimize(),s.stopPropagation())}class d extends r.Z{static initAttrs(s){super.initAttrs(s),s.placeholder=s.placeholder||(0,a.Z)(o.Z.translator.trans("core.forum.composer_reply.body_placeholder")),s.submitLabel=s.submitLabel||o.Z.translator.trans("core.forum.composer_reply.submit_button"),s.confirmExit=s.confirmExit||(0,a.Z)(o.Z.translator.trans("core.forum.composer_reply.discard_confirmation"))}headerItems(){const s=super.headerItems(),e=this.attrs.discussion;return s.add("title",m("h3",null,m(c.Z,{name:"fas fa-reply"})," ",m(n.Z,{href:o.Z.route.discussion(e),onclick:l},e.title()))),s}jumpToPreview(s){l(s),m.route.set(o.Z.route.discussion(this.attrs.discussion,"reply"))}data(){return{content:this.composer.fields.content(),relationships:{discussion:this.attrs.discussion}}}onsubmit(){const s=this.attrs.discussion;this.loading=!0,m.redraw();const e=this.data();o.Z.store.createRecord("posts").save(e).then((e=>{if(o.Z.viewingDiscussion(s)){const s=o.Z.current.get("stream");s.update().then((()=>s.goToNumber(e.number())))}else{let s;const t=m(i.Z,{className:"Button Button--link",onclick:()=>{m.route.set(o.Z.route.post(e)),o.Z.alerts.dismiss(s)}},o.Z.translator.trans("core.forum.composer_reply.view_button"));s=o.Z.alerts.show({type:"success",controls:[t]},o.Z.translator.trans("core.forum.composer_reply.posted_message"))}this.composer.hide()}),this.loaded.bind(this))}}flarum.reg.add("core","forum/components/ReplyComposer",d)}}]);
//# sourceMappingURL=ReplyComposer.js.map //# sourceMappingURL=ReplyComposer.js.map

View File

@ -1,2 +1,2 @@
"use strict";(self.webpackChunkflarum_core=self.webpackChunkflarum_core||[]).push([[395],{8686:(t,s,e)=>{e.r(s),e.d(s,{default:()=>h});var a=e(7905),r=e(6789),o=e(899),i=e(8312),n=e(6403),l=e(1552),d=e(4041),u=e(6458);class h extends o.Z{constructor(){super(...arguments),(0,a.Z)(this,"username",void 0),(0,a.Z)(this,"email",void 0),(0,a.Z)(this,"password",void 0)}oninit(t){super.oninit(t),this.username=(0,u.Z)(this.attrs.username||""),this.email=(0,u.Z)(this.attrs.email||""),this.password=(0,u.Z)(this.attrs.password||"")}className(){return"Modal--small SignUpModal"}title(){return r.Z.translator.trans("core.forum.sign_up.title")}content(){return[m("div",{className:"Modal-body"},this.body()),m("div",{className:"Modal-footer"},this.footer())]}isProvided(t){var s,e;return null!=(s=null==(e=this.attrs.provided)?void 0:e.includes(t))&&s}body(){return[!this.attrs.token&&m(n.Z,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]}fields(){const t=new d.Z,s=(0,l.Z)(r.Z.translator.trans("core.forum.sign_up.username_placeholder")),e=(0,l.Z)(r.Z.translator.trans("core.forum.sign_up.email_placeholder")),a=(0,l.Z)(r.Z.translator.trans("core.forum.sign_up.password_placeholder"));return t.add("username",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"username",type:"text",placeholder:s,"aria-label":s,bidi:this.username,disabled:this.loading||this.isProvided("username")})),30),t.add("email",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:e,"aria-label":e,bidi:this.email,disabled:this.loading||this.isProvided("email")})),20),this.attrs.token||t.add("password",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",autocomplete:"new-password",placeholder:a,"aria-label":a,bidi:this.password,disabled:this.loading})),10),t.add("submit",m("div",{className:"Form-group"},m(i.Z,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},r.Z.translator.trans("core.forum.sign_up.submit_button"))),-10),t}footer(){return[m("p",{className:"SignUpModal-logIn"},r.Z.translator.trans("core.forum.sign_up.log_in_text",{a:m(i.Z,{className:"Button Button--text Button--link",onclick:this.logIn.bind(this)})}))]}logIn(){const t={identification:this.email()||this.username()};r.Z.modal.show((()=>e.e(460).then(e.bind(e,7561))),t)}onready(){this.attrs.username&&!this.attrs.email?this.$("[name=email]").select():this.$("[name=username]").select()}onsubmit(t){t.preventDefault(),this.loading=!0;const s=this.submitData();r.Z.request({url:r.Z.forum.attribute("baseUrl")+"/register",method:"POST",body:s,errorHandler:this.onerror.bind(this)}).then((()=>window.location.reload()),this.loaded.bind(this))}submitData(){const t=this.attrs.token?{token:this.attrs.token}:{password:this.password()};return{username:this.username(),email:this.email(),...t}}}flarum.reg.add("core","forum/components/SignUpModal",h)},6403:(t,s,e)=>{e.d(s,{Z:()=>o});var a=e(2190),r=e(4041);class o extends a.Z{view(){return m("div",{className:"LogInButtons"},this.items().toArray())}items(){return new r.Z}}flarum.reg.add("core","forum/components/LogInButtons",o)}}]); "use strict";(self.webpackChunkflarum_core=self.webpackChunkflarum_core||[]).push([[395],{8686:(t,s,a)=>{a.r(s),a.d(s,{default:()=>h});var e=a(7905),r=a(6789),i=a(899),o=a(8312),n=a(6403),l=a(1552),d=a(4041),u=a(6458);class h extends i.Z{constructor(){super(...arguments),(0,e.Z)(this,"username",void 0),(0,e.Z)(this,"email",void 0),(0,e.Z)(this,"password",void 0)}oninit(t){super.oninit(t),this.username=(0,u.Z)(this.attrs.username||""),this.email=(0,u.Z)(this.attrs.email||""),this.password=(0,u.Z)(this.attrs.password||"")}className(){return"Modal--small SignUpModal"}title(){return r.Z.translator.trans("core.forum.sign_up.title")}content(){return[m("div",{className:"Modal-body"},this.body()),m("div",{className:"Modal-footer"},this.footer())]}isProvided(t){var s,a;return null!=(s=null==(a=this.attrs.provided)?void 0:a.includes(t))&&s}body(){return[!this.attrs.token&&m(n.Z,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]}fields(){const t=new d.Z,s=(0,l.Z)(r.Z.translator.trans("core.forum.sign_up.username_placeholder")),a=(0,l.Z)(r.Z.translator.trans("core.forum.sign_up.email_placeholder")),e=(0,l.Z)(r.Z.translator.trans("core.forum.sign_up.password_placeholder"));return t.add("username",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"username",type:"text",placeholder:s,"aria-label":s,bidi:this.username,disabled:this.loading||this.isProvided("username")})),30),t.add("email",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:a,"aria-label":a,bidi:this.email,disabled:this.loading||this.isProvided("email")})),20),this.attrs.token||t.add("password",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"password",type:"password",autocomplete:"new-password",placeholder:e,"aria-label":e,bidi:this.password,disabled:this.loading})),10),t.add("submit",m("div",{className:"Form-group"},m(o.Z,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},r.Z.translator.trans("core.forum.sign_up.submit_button"))),-10),t}footer(){return[m("p",{className:"SignUpModal-logIn"},r.Z.translator.trans("core.forum.sign_up.log_in_text",{a:m(o.Z,{className:"Button Button--text Button--link",onclick:this.logIn.bind(this)})}))]}logIn(){const t={identification:this.email()||this.username()};r.Z.modal.show((()=>a.e(460).then(a.bind(a,7561))),t)}onready(){this.attrs.username&&!this.attrs.email?this.$("[name=email]").select():this.$("[name=username]").select()}onsubmit(t){t.preventDefault(),this.loading=!0;const s=this.submitData();r.Z.request({url:r.Z.forum.attribute("baseUrl")+"/register",method:"POST",body:s,errorHandler:this.onerror.bind(this)}).then((()=>window.location.reload()),this.loaded.bind(this))}submitData(){const t=this.attrs.token?{token:this.attrs.token}:{password:this.password()};return{username:this.username(),email:this.email(),...t}}}flarum.reg.add("core","forum/components/SignUpModal",h)}}]);
//# sourceMappingURL=SignUpModal.js.map //# sourceMappingURL=SignUpModal.js.map

File diff suppressed because one or more lines are too long