Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
js/activity-dashboard.js binary
js/activity-sidebar.js binary
js/*.LICENCE.map binary
js/*.js.map binary
js/activity-*.js binary
js/* binary
package-lock.json binary
src/test/__snapshots__/*.snap
4 changes: 2 additions & 2 deletions js/Activity-9797d778.mjs → js/Activity-362f34d9.mjs

Large diffs are not rendered by default.

Large diffs are not rendered by default.

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-1c621de6] .empty-content__icon span{background-size:64px;width:64px;height:64px}.activity__actions[data-v-1c621de6]{display:flex;flex-direction:column;width:100%}")),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 o,d as r,c}from"./index-76a58945-8991307c.mjs";import{d as l,r as u,o as f,e as p,f as v,g as d,t as a}from"./index-83015745.mjs";import{A as g,p as y,v as m,g as h}from"./Activity-9797d778.mjs";import{l as _}from"./logger-2ebf21a4.mjs";import{g as I,a as b,b as A}from"./api-57a0fd84.mjs";import{l as S}from"./activity-sidebar.mjs";import"./index-65a5f423.mjs";const x=l({__name:"ActivitySidebarPlugin",props:{plugin:null,fileInfo:null},emits:["reload-activities"],setup(t,{emit:i}){const e=t,n=u();return f(()=>e.plugin.mount(n.value,{context:p()?.proxy,fileInfo:e.fileInfo,reload:()=>i("reload-activities")})),v(()=>e.plugin.unmount()),{__sfc:!0,props:e,emit:i,attachTarget:n}}});var N=function(){var t=this,i=t._self._c;return t._self._setupProxy,i("div",{ref:"attachTarget"})},P=[],w=o(x,N,P,!1,null,null,null,null);const C=w.exports;const k={name:"ActivityTab",components:{Activity:g,NcEmptyContent:y,NcIconSvgWrapper:m,NcLoadingIcon:r,ActivitySidebarPlugin:C},data(){return{error:"",loading:!0,fileInfo:null,activities:[],lightningBoltSVG:S,sidebarPlugins:[]}},mounted(){this.sidebarPlugins=I()},methods:{async update(t){this.fileInfo=t,this.resetState(),await this.getActivities()},async getActivities(){try{this.loading=!0;const t=this.processActivities(await c.get(d("apps/activity/api/v2/activity/filter"),{params:{format:"json",object_type:"files",object_id:this.fileInfo.id}})),i=await b({fileInfo:this.fileInfo});this.activities=[...t,...i].sort((e,n)=>n.timestamp-e.timestamp)}catch(t){if(t.response!==void 0&&t.response.status===304)return;this.error=a("activity","Unable to load the activity list"),console.error("Error loading the activity list",t)}finally{this.loading=!1}},resetState(){this.loading=!0,this.error="",this.activities=[]},processActivities({data:t}){if(t.ocs&&t.ocs.data&&t.ocs.data.length>0){const i=t.ocs.data.map(n=>new h(n));_.debug(`Processed ${i.length} activity(ies)`,{activities:i,fileInfo:this.fileInfo});const e=A();return i.filter(n=>!e||e.every(s=>s(n)))}},t:a}};var E=function(){var t=this,i=t._self._c;return i("div",{class:{"icon-loading":t.loading}},[t.error?i("NcEmptyContent",{attrs:{name:t.error},scopedSlots:t._u([{key:"icon",fn:function(){return[i("NcIconSvgWrapper",{attrs:{svg:t.lightningBoltSVG}})]},proxy:!0}],null,!1,63559581)}):[t.sidebarPlugins.length>0?i("div",{staticClass:"activity__actions"},t._l(t.sidebarPlugins,function(e,n){return i("ActivitySidebarPlugin",{key:n,attrs:{plugin:e,"file-info":t.fileInfo},on:{"reload-activities":function(s){return t.getActivities()}}})}),1):t._e(),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(e){return i("Activity",{key:e.id,attrs:{activity:e,"show-previews":!1},on:{reload:function(n){return t.getActivities()}}})}),1)]],2)},j=[],L=o(k,E,j,!1,null,"1c621de6",null,null);const O=L.exports;export{O as default};
import{n as o,d as r,c}from"./index-76a58945-8991307c.mjs";import{d as l,r as u,o as f,e as p,f as v,g as d,t as a}from"./index-83015745.mjs";import{A as g,p as y,v as m,g as h}from"./Activity-362f34d9.mjs";import{l as _}from"./logger-2ebf21a4.mjs";import{g as I,a as b,b as A}from"./api-57a0fd84.mjs";import{l as S}from"./activity-sidebar.mjs";import"./index-65a5f423.mjs";const x=l({__name:"ActivitySidebarPlugin",props:{plugin:null,fileInfo:null},emits:["reload-activities"],setup(t,{emit:i}){const e=t,n=u();return f(()=>e.plugin.mount(n.value,{context:p()?.proxy,fileInfo:e.fileInfo,reload:()=>i("reload-activities")})),v(()=>e.plugin.unmount()),{__sfc:!0,props:e,emit:i,attachTarget:n}}});var N=function(){var t=this,i=t._self._c;return t._self._setupProxy,i("div",{ref:"attachTarget"})},P=[],w=o(x,N,P,!1,null,null,null,null);const C=w.exports;const k={name:"ActivityTab",components:{Activity:g,NcEmptyContent:y,NcIconSvgWrapper:m,NcLoadingIcon:r,ActivitySidebarPlugin:C},data(){return{error:"",loading:!0,fileInfo:null,activities:[],lightningBoltSVG:S,sidebarPlugins:[]}},mounted(){this.sidebarPlugins=I()},methods:{async update(t){this.fileInfo=t,this.resetState(),await this.getActivities()},async getActivities(){try{this.loading=!0;const t=this.processActivities(await c.get(d("apps/activity/api/v2/activity/filter"),{params:{format:"json",object_type:"files",object_id:this.fileInfo.id}})),i=await b({fileInfo:this.fileInfo});this.activities=[...t,...i].sort((e,n)=>n.timestamp-e.timestamp)}catch(t){if(t.response!==void 0&&t.response.status===304)return;this.error=a("activity","Unable to load the activity list"),console.error("Error loading the activity list",t)}finally{this.loading=!1}},resetState(){this.loading=!0,this.error="",this.activities=[]},processActivities({data:t}){if(t.ocs&&t.ocs.data&&t.ocs.data.length>0){const i=t.ocs.data.map(n=>new h(n));_.debug(`Processed ${i.length} activity(ies)`,{activities:i,fileInfo:this.fileInfo});const e=A();return i.filter(n=>!e||e.every(s=>s(n)))}},t:a}};var E=function(){var t=this,i=t._self._c;return i("div",{class:{"icon-loading":t.loading}},[t.error?i("NcEmptyContent",{attrs:{name:t.error},scopedSlots:t._u([{key:"icon",fn:function(){return[i("NcIconSvgWrapper",{attrs:{svg:t.lightningBoltSVG}})]},proxy:!0}],null,!1,63559581)}):[t.sidebarPlugins.length>0?i("div",{staticClass:"activity__actions"},t._l(t.sidebarPlugins,function(e,n){return i("ActivitySidebarPlugin",{key:n,attrs:{plugin:e,"file-info":t.fileInfo},on:{"reload-activities":function(s){return t.getActivities()}}})}),1):t._e(),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(e){return i("Activity",{key:e.id,attrs:{activity:e,"show-previews":!1},on:{reload:function(n){return t.getActivities()}}})}),1)]],2)},j=[],L=o(k,E,j,!1,null,"1c621de6",null,null);const O=L.exports;export{O as default};

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/activity-app.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/activity-sidebar.mjs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/*! third party licenses: js/vendor.LICENSE.txt */
import{V as u,t as m,b as v}from"./index-83015745.mjs";import"./index-65a5f423.mjs";const w="modulepreload",y=function(e,i){return e[0]==="."?new URL(e,i).href:e},p={},f=function(e,i,s){if(!i||i.length===0)return e();const d=document.getElementsByTagName("link");return Promise.all(i.map(t=>{if(t=y(t,s),t in p)return;p[t]=!0;const n=t.endsWith(".css"),h=n?'[rel="stylesheet"]':"";if(s)for(let l=d.length-1;l>=0;l--){const c=d[l];if(c.href===t&&(!n||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${t}"]${h}`))return;const o=document.createElement("link");if(o.rel=n?"stylesheet":w,n||(o.as="script",o.crossOrigin=""),o.href=t,document.head.appendChild(o),n)return new Promise((l,c)=>{o.addEventListener("load",l),o.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${t}`)))})})).then(()=>e()).catch(t=>{const n=new Event("vite:preloadError",{cancelable:!0});if(n.payload=t,window.dispatchEvent(n),!n.defaultPrevented)throw t})},g='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-lightning-bolt" viewBox="0 0 24 24"><path d="M11 15H6L13 1V9H18L11 23V15Z" /></svg>';u.prototype.t=m,u.prototype.n=v;let a=null,r=null;const E=new OCA.Files.Sidebar.Tab({id:"activity",name:m("activity","Activity"),iconSvg:g,async mount(e,i,s){if(a===null){const{default:d}=await f(()=>import("./ActivityTab-1f677389.mjs"),[OC.filePath('activity', '', 'js/ActivityTab-1f677389.mjs'),OC.filePath('activity', '', 'js/index-76a58945-8991307c.mjs'),OC.filePath('activity', '', 'js/index-65a5f423.mjs'),OC.filePath('activity', '', 'js/logger-2ebf21a4.mjs'),OC.filePath('activity', '', 'js/index-83015745.mjs'),OC.filePath('activity', '', 'js/Activity-9797d778.mjs'),OC.filePath('activity', '', 'js/api-57a0fd84.mjs')],import.meta.url);a=a??u.extend(d)}r&&r.$destroy(),r=new a({parent:s}),r.update(i),r.$mount(e)},update(e){r.update(e)},destroy(){r.$destroy(),r=null}});window.addEventListener("DOMContentLoaded",async function(){if(OCA.Files&&OCA.Files.Sidebar){OCA.Files.Sidebar.registerTab(E);const{default:e}=await f(()=>import("./ActivityTab-1f677389.mjs"),[OC.filePath('activity', '', 'js/ActivityTab-1f677389.mjs'),OC.filePath('activity', '', 'js/index-76a58945-8991307c.mjs'),OC.filePath('activity', '', 'js/index-65a5f423.mjs'),OC.filePath('activity', '', 'js/logger-2ebf21a4.mjs'),OC.filePath('activity', '', 'js/index-83015745.mjs'),OC.filePath('activity', '', 'js/Activity-9797d778.mjs'),OC.filePath('activity', '', 'js/api-57a0fd84.mjs')],import.meta.url);a=a??u.extend(e)}});export{g as l};
import{V as u,t as m,b as v}from"./index-83015745.mjs";import"./index-65a5f423.mjs";const w="modulepreload",y=function(e,i){return e[0]==="."?new URL(e,i).href:e},p={},f=function(e,i,s){if(!i||i.length===0)return e();const d=document.getElementsByTagName("link");return Promise.all(i.map(t=>{if(t=y(t,s),t in p)return;p[t]=!0;const n=t.endsWith(".css"),h=n?'[rel="stylesheet"]':"";if(s)for(let l=d.length-1;l>=0;l--){const c=d[l];if(c.href===t&&(!n||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${t}"]${h}`))return;const o=document.createElement("link");if(o.rel=n?"stylesheet":w,n||(o.as="script",o.crossOrigin=""),o.href=t,document.head.appendChild(o),n)return new Promise((l,c)=>{o.addEventListener("load",l),o.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${t}`)))})})).then(()=>e()).catch(t=>{const n=new Event("vite:preloadError",{cancelable:!0});if(n.payload=t,window.dispatchEvent(n),!n.defaultPrevented)throw t})},g='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-lightning-bolt" viewBox="0 0 24 24"><path d="M11 15H6L13 1V9H18L11 23V15Z" /></svg>';u.prototype.t=m,u.prototype.n=v;let a=null,r=null;const E=new OCA.Files.Sidebar.Tab({id:"activity",name:m("activity","Activity"),iconSvg:g,async mount(e,i,s){if(a===null){const{default:d}=await f(()=>import("./ActivityTab-5ac69541.mjs"),[OC.filePath('activity', '', 'js/ActivityTab-5ac69541.mjs'),OC.filePath('activity', '', 'js/index-76a58945-8991307c.mjs'),OC.filePath('activity', '', 'js/index-65a5f423.mjs'),OC.filePath('activity', '', 'js/logger-2ebf21a4.mjs'),OC.filePath('activity', '', 'js/index-83015745.mjs'),OC.filePath('activity', '', 'js/Activity-362f34d9.mjs'),OC.filePath('activity', '', 'js/api-57a0fd84.mjs')],import.meta.url);a=a??u.extend(d)}r&&r.$destroy(),r=new a({parent:s}),r.update(i),r.$mount(e)},update(e){r.update(e)},destroy(){r.$destroy(),r=null}});window.addEventListener("DOMContentLoaded",async function(){if(OCA.Files&&OCA.Files.Sidebar){OCA.Files.Sidebar.registerTab(E);const{default:e}=await f(()=>import("./ActivityTab-5ac69541.mjs"),[OC.filePath('activity', '', 'js/ActivityTab-5ac69541.mjs'),OC.filePath('activity', '', 'js/index-76a58945-8991307c.mjs'),OC.filePath('activity', '', 'js/index-65a5f423.mjs'),OC.filePath('activity', '', 'js/logger-2ebf21a4.mjs'),OC.filePath('activity', '', 'js/index-83015745.mjs'),OC.filePath('activity', '', 'js/Activity-362f34d9.mjs'),OC.filePath('activity', '', 'js/api-57a0fd84.mjs')],import.meta.url);a=a??u.extend(e)}});export{g as l};
7 changes: 6 additions & 1 deletion src/components/activities/GenericActivity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<template>
<li class="activity-entry">
<NcAvatar :class="[applyMonochromeIconColor, 'activity-entry__icon', 'activity-icon']"
<NcAvatar :class="[applyMonochromeIconColor, 'activity-entry__icon', 'activity-icon', 'avatardiv--unknown']"
:disable-menu="true"
:disable-tooltip="true"
:url="activity.icon"
Expand Down Expand Up @@ -182,6 +182,11 @@ export default defineComponent({
.avatardiv {
padding-inline: calc((32px - var(--size)) / 2);
box-sizing: content-box!important;
background-color: unset !important;

:deep(img) {
border-radius: 0 !important;
}
}

&__content {
Expand Down