diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-03-26 17:06:11 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-04-20 16:06:47 +0300 |
commit | 1061537667fc37e4a0c0500920cc680fe4af92af (patch) | |
tree | 71e828cb15d9e6cd516fa0c3fc1fc9ed87ccf2dd /js/editor-guest.js | |
parent | edbb47d0ff845b1fae5edcf81d2e15890609c1e3 (diff) |
Enable Text to be used by Viewer outside Files app
Since Nextcloud 18.0.4 the Files app triggers the "LoadViewer" event, so
that event can be used to register Text with Viewer instead of doing it
through the "OCA\Files::loadAdditionalScripts" event.
Besides being more correct for the Files app it also makes possible to
use Text when opening files through Viewer in other apps, like Talk.
Note, however, that in public share pages Text is still opened using the
fallback actions instead of through Viewer, as Viewer currently does not
provide the share token of the public shared folder that contains the
file to be opened.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'js/editor-guest.js')
-rw-r--r-- | js/editor-guest.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/editor-guest.js b/js/editor-guest.js index 75a78a025..c3402a308 100644 --- a/js/editor-guest.js +++ b/js/editor-guest.js @@ -1,2 +1,2 @@ -(window.textWebpackJsonp=window.textWebpackJsonp||[]).push([[192],{204:function(e,t,a){var s=a(524);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,a(93).default)("499816ba",s,!0,{})},523:function(e,t,a){"use strict";var s=a(204);a.n(s).a},524:function(e,t,a){(t=a(92)(!1)).push([e.i,"form.guest-name-dialog[data-v-c1266f5a]{display:flex;max-width:200px;margin:auto;margin-top:-2px;padding:3px}form.guest-name-dialog[data-v-c1266f5a] img{margin:0 !important}form.guest-name-dialog input[type=text][data-v-c1266f5a]{flex-grow:1}form.guest-name-dialog label[data-v-c1266f5a]{padding:3px;height:32px}\n",""]),e.exports=t},532:function(e,t,a){"use strict";a.r(t);var s=a(177),n=a.n(s),i=a(223),o={name:"GuestNameDialog",components:{Avatar:a.n(i).a},directives:{tooltip:n.a},props:{syncService:{type:Object,default:null}},data:function(){return{guestName:"",guestNameBuffered:""}},computed:{avatarUrl:function(){var e=OC.generateUrl("/avatar/guest/{user}/{size}",{user:this.guestNameBuffered,size:32});return window.location.protocol+"//"+window.location.host+e}},beforeMount:function(){this.guestName=this.syncService.session.guestName,this.updateBufferedGuestName()},methods:{setGuestName:function(){var e=this,t=this.syncService.session.guestName;this.syncService.updateSession(this.guestName).then((function(){localStorage.setItem("nick",e.guestName),e.updateBufferedGuestName()})).catch((function(a){e.guestName=t}))},updateBufferedGuestName:function(){this.guestNameBuffered=this.guestName}}},u=(a(523),a(20)),r=Object(u.a)(o,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("form",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.t("text","Enter your name so other users can see who is editing"),expression:"t('text', 'Enter your name so other users can see who is editing')"}],staticClass:"guest-name-dialog",on:{submit:function(t){return t.preventDefault(),e.setGuestName()}}},[a("label",[a("Avatar",{attrs:{url:e.avatarUrl,"disable-tooltip":!0,size:32}})],1),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.guestName,expression:"guestName"}],attrs:{type:"text","aria-label":e.t("text","Edit guest name")},domProps:{value:e.guestName},on:{input:function(t){t.target.composing||(e.guestName=t.target.value)}}}),e._v(" "),a("input",{staticClass:"icon-confirm",attrs:{type:"submit","aria-label":e.t("text","Save guest name"),value:""}})])}),[],!1,null,"c1266f5a",null);t.default=r.exports}}]); -//# sourceMappingURL=editor-guest.js.map?v=ed913ea902da5044122e
\ No newline at end of file +(window.textWebpackJsonp=window.textWebpackJsonp||[]).push([[192],{205:function(e,t,a){var s=a(525);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,a(49).default)("499816ba",s,!0,{})},524:function(e,t,a){"use strict";var s=a(205);a.n(s).a},525:function(e,t,a){(t=a(48)(!1)).push([e.i,"form.guest-name-dialog[data-v-c1266f5a]{display:flex;max-width:200px;margin:auto;margin-top:-2px;padding:3px}form.guest-name-dialog[data-v-c1266f5a] img{margin:0 !important}form.guest-name-dialog input[type=text][data-v-c1266f5a]{flex-grow:1}form.guest-name-dialog label[data-v-c1266f5a]{padding:3px;height:32px}\n",""]),e.exports=t},533:function(e,t,a){"use strict";a.r(t);var s=a(178),n=a.n(s),i=a(224),o={name:"GuestNameDialog",components:{Avatar:a.n(i).a},directives:{tooltip:n.a},props:{syncService:{type:Object,default:null}},data:function(){return{guestName:"",guestNameBuffered:""}},computed:{avatarUrl:function(){var e=OC.generateUrl("/avatar/guest/{user}/{size}",{user:this.guestNameBuffered,size:32});return window.location.protocol+"//"+window.location.host+e}},beforeMount:function(){this.guestName=this.syncService.session.guestName,this.updateBufferedGuestName()},methods:{setGuestName:function(){var e=this,t=this.syncService.session.guestName;this.syncService.updateSession(this.guestName).then((function(){localStorage.setItem("nick",e.guestName),e.updateBufferedGuestName()})).catch((function(a){e.guestName=t}))},updateBufferedGuestName:function(){this.guestNameBuffered=this.guestName}}},u=(a(524),a(19)),r=Object(u.a)(o,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("form",{directives:[{name:"tooltip",rawName:"v-tooltip",value:e.t("text","Enter your name so other users can see who is editing"),expression:"t('text', 'Enter your name so other users can see who is editing')"}],staticClass:"guest-name-dialog",on:{submit:function(t){return t.preventDefault(),e.setGuestName()}}},[a("label",[a("Avatar",{attrs:{url:e.avatarUrl,"disable-tooltip":!0,size:32}})],1),e._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:e.guestName,expression:"guestName"}],attrs:{type:"text","aria-label":e.t("text","Edit guest name")},domProps:{value:e.guestName},on:{input:function(t){t.target.composing||(e.guestName=t.target.value)}}}),e._v(" "),a("input",{staticClass:"icon-confirm",attrs:{type:"submit","aria-label":e.t("text","Save guest name"),value:""}})])}),[],!1,null,"c1266f5a",null);t.default=r.exports}}]); +//# sourceMappingURL=editor-guest.js.map?v=2a7a59f5c8bb37f51932
\ No newline at end of file |