-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1398 from nextcloud/feat/open-in-viewer
feat: Open previews in Viewer
- Loading branch information
Showing
15 changed files
with
134 additions
and
54 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 @@ | ||
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("[data-v-93c7e6f5] .empty-content__icon span{background-size:64px;width:64px;height:64px}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})(); | ||
/*! third party licenses: js/vendor.LICENSE.txt */ | ||
import{n as e,d as o,c as n,b as c}from"./logger-496b5c71.mjs";import{b as r,t as a}from"./index-a6a8c3a6.mjs";import{A as l,p as v,v as p,g as d}from"./Activity-92762149.mjs";import{l as y}from"./activity-sidebar.mjs";const f={name:"ActivityTab",components:{Activity:l,NcEmptyContent:v,NcIconSvgWrapper:p,NcLoadingIcon:o},data(){return{error:"",loading:!0,fileInfo:null,activities:[],lightningBoltSVG:y}},methods:{async update(t){this.fileInfo=t,this.resetState(),await this.getActivities()},async getActivities(){try{this.loading=!0;const t=await n.get(r("apps/activity/api/v2/activity/filter"),{params:{format:"json",object_type:"files",object_id:this.fileInfo.id}});this.loading=!1,this.processActivities(t)}catch(t){if(t.response!==void 0&&t.response.status===304){this.loading=!1;return}this.error=a("activity","Unable to load the activity list"),this.loading=!1,console.error("Error loading the activity list",t)}},resetState(){this.loading=!0,this.error="",this.activities=[]},processActivities({data:t}){t.ocs&&t.ocs.data&&t.ocs.data.length>0&&(this.activities=t.ocs.data.map(i=>new d(i)).sort((i,s)=>s.timestamp-i.timestamp),c.debug(`Processed ${this.activities.length} activity(ies)`,{activities:this.activities,fileInfo:this.fileInfo}))},t:a}};var g=function(){var t=this,i=t._self._c;return i("div",{class:{"icon-loading":t.loading}},[t.error?i("NcEmptyContent",{attrs:{title:t.error},scopedSlots:t._u([{key:"icon",fn:function(){return[i("NcIconSvgWrapper",{attrs:{svg:t.lightningBoltSVG}})]},proxy:!0}],null,!1,63559581)}):[t.loading?i("NcEmptyContent",{attrs:{name:t.t("activity","Loading activities")},scopedSlots:t._u([{key:"icon",fn:function(){return[i("NcLoadingIcon")]},proxy:!0}],null,!1,3085876643)}):t.activities.length===0?i("NcEmptyContent",{attrs:{name:t.t("activity","No activity yet")},scopedSlots:t._u([{key:"icon",fn:function(){return[i("span",{staticClass:"icon-activity"})]},proxy:!0}])}):i("ul",t._l(t.activities,function(s){return i("Activity",{key:s.id,attrs:{activity:s}})}),1)]],2)},h=[],u=e(f,g,h,!1,null,"93c7e6f5",null,null);const S=u.exports;export{S as default}; | ||
import{n as e,d as o,c as n,b as c}from"./logger-496b5c71.mjs";import{b as r,t as a}from"./index-a6a8c3a6.mjs";import{A as l,p as v,v as p,g as d}from"./Activity-1286fb30.mjs";import{l as y}from"./activity-sidebar.mjs";const f={name:"ActivityTab",components:{Activity:l,NcEmptyContent:v,NcIconSvgWrapper:p,NcLoadingIcon:o},data(){return{error:"",loading:!0,fileInfo:null,activities:[],lightningBoltSVG:y}},methods:{async update(t){this.fileInfo=t,this.resetState(),await this.getActivities()},async getActivities(){try{this.loading=!0;const t=await n.get(r("apps/activity/api/v2/activity/filter"),{params:{format:"json",object_type:"files",object_id:this.fileInfo.id}});this.loading=!1,this.processActivities(t)}catch(t){if(t.response!==void 0&&t.response.status===304){this.loading=!1;return}this.error=a("activity","Unable to load the activity list"),this.loading=!1,console.error("Error loading the activity list",t)}},resetState(){this.loading=!0,this.error="",this.activities=[]},processActivities({data:t}){t.ocs&&t.ocs.data&&t.ocs.data.length>0&&(this.activities=t.ocs.data.map(i=>new d(i)).sort((i,s)=>s.timestamp-i.timestamp),c.debug(`Processed ${this.activities.length} activity(ies)`,{activities:this.activities,fileInfo:this.fileInfo}))},t:a}};var g=function(){var t=this,i=t._self._c;return i("div",{class:{"icon-loading":t.loading}},[t.error?i("NcEmptyContent",{attrs:{title:t.error},scopedSlots:t._u([{key:"icon",fn:function(){return[i("NcIconSvgWrapper",{attrs:{svg:t.lightningBoltSVG}})]},proxy:!0}],null,!1,63559581)}):[t.loading?i("NcEmptyContent",{attrs:{name:t.t("activity","Loading activities")},scopedSlots:t._u([{key:"icon",fn:function(){return[i("NcLoadingIcon")]},proxy:!0}],null,!1,3085876643)}):t.activities.length===0?i("NcEmptyContent",{attrs:{name:t.t("activity","No activity yet")},scopedSlots:t._u([{key:"icon",fn:function(){return[i("span",{staticClass:"icon-activity"})]},proxy:!0}])}):i("ul",t._l(t.activities,function(s){return i("Activity",{key:s.id,attrs:{activity:s}})}),1)]],2)},h=[],u=e(f,g,h,!1,null,"93c7e6f5",null,null);const S=u.exports;export{S as default}; |
2 changes: 1 addition & 1 deletion
2
js/ActivityTab-36ce947d.mjs.map → js/ActivityTab-8179f03c.mjs.map
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.