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
36 changes: 36 additions & 0 deletions .github/workflows/block-unconventional-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
#
# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT

name: Block unconventional commits

on:
pull_request:
types: [opened, ready_for_review, reopened, synchronize]

permissions:
contents: read

concurrency:
group: block-unconventional-commits-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
block-unconventional-commits:
name: Block unconventional commits

runs-on: ubuntu-latest-low

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- uses: webiny/action-conventional-commits@8bc41ff4e7d423d56fa4905f6ff79209a78776c7 # v1.3.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 5 additions & 5 deletions cypress/e2e/settings.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,27 +84,27 @@ describe('Check that user\'s settings survive a reload', () => {
it('Activity summary survive a reload', () => {
cy.intercept({ method: 'POST', url: '**/activity/settings' }).as('apiCall')

cy.contains('[data-cy-checkbox]', 'Send daily activity summary in the morning')
cy.contains('.checkbox-radio-switch-checkbox', 'Send daily activity summary in the morning')
.find('input')
.check({ force: true })
cy.contains('[data-cy-checkbox]', 'Send daily activity summary in the morning')
cy.contains('.checkbox-radio-switch-checkbox', 'Send daily activity summary in the morning')
.find('input')
.should('be.checked')
cy.wait('@apiCall')
.reload()

cy.contains('[data-cy-checkbox]', 'Send daily activity summary in the morning')
cy.contains('.checkbox-radio-switch-checkbox', 'Send daily activity summary in the morning')
.scrollIntoView()
.find('input')
.should('be.checked')

cy.contains('[data-cy-checkbox]', 'Send daily activity summary in the morning')
cy.contains('.checkbox-radio-switch-checkbox', 'Send daily activity summary in the morning')
.find('input')
.uncheck({ force: true })
cy.wait('@apiCall')
.reload()

cy.contains('[data-cy-checkbox]', 'Send daily activity summary in the morning')
cy.contains('.checkbox-radio-switch-checkbox', 'Send daily activity summary in the morning')
.scrollIntoView()
.find('input')
.should('not.be.checked')
Expand Down
4 changes: 2 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* SPDX-License-Identifier: CC0-1.0
*/

import { recommendedVue2 } from '@nextcloud/eslint-config'
import { recommended } from '@nextcloud/eslint-config'

export default [
...recommendedVue2,
...recommended,
{
ignores: [
'js/**',
Expand Down
77 changes: 0 additions & 77 deletions js/ActivityComponent-CQakH_Zc.chunk.mjs

This file was deleted.

1 change: 0 additions & 1 deletion js/ActivityComponent-CQakH_Zc.chunk.mjs.map

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions js/ActivityTab-B3IKkXvI.chunk.mjs

This file was deleted.

1 change: 0 additions & 1 deletion js/ActivityTab-B3IKkXvI.chunk.mjs.map

This file was deleted.

3 changes: 3 additions & 0 deletions js/ActivityTab-BHNw_dVJ.chunk.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".activity[data-v-2fda9824]{display:flex;flex-direction:column;overflow:hidden;height:100%}.activity__actions[data-v-2fda9824]{display:flex;flex-direction:column;width:100%}.activity__list[data-v-2fda9824]{flex-grow:1;overflow:scroll}.activity__empty-content[data-v-2fda9824]{height:100%}[data-v-2fda9824] .empty-content__icon span{background-size:64px;width:64px;height:64px}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
import{l as w}from"./activity-sidebar.mjs";import{f as S,d as N,v as C,b as x}from"./_plugin-vue_export-helper-BGAprzst.chunk.mjs";import{k as I,r as E,x as R,C as j,y as G,c as s,o as a,H as g,E as L,b as o,d as l,h as d,g as m,G as y,l as B,I as u,f as T,n as V}from"./translation-CD_FiYBO-D7oPP82T.chunk.mjs";import{N as W,b as H,_ as U,A as $}from"./ActivityComponent.vue_vue_type_script_setup_true_lang-Dl2LPLoe.chunk.mjs";import{g as q,a as z,b as h}from"./api-AEva7FRs.chunk.mjs";import{l as _}from"./logger-bSyXKk3f.chunk.mjs";import"./preload-helper-Dh9HmuEY.chunk.mjs";import"./_commonjsHelpers-Cqwegr3R.chunk.mjs";const D=I({__name:"ActivitySidebarPlugin",props:{plugin:{},fileInfo:{}},emits:["reload-activities"],setup(i,{emit:t}){const e=i,n=t,r=E();return R(()=>e.plugin.mount(r.value,{context:j()?.proxy,fileInfo:e.fileInfo,reload:()=>n("reload-activities")})),G(()=>e.plugin.unmount()),(b,f)=>(a(),s("div",{ref_key:"attachTarget",ref:r},null,512))}}),F=I({name:"ActivityTab",components:{ActivityComponent:U,NcEmptyContent:H,NcIconSvgWrapper:W,NcLoadingIcon:S,ActivitySidebarPlugin:D},expose:["update"],data(){return{error:"",loading:!0,fileInfo:null,activities:[],lightningBoltSVG:w,sidebarPlugins:[]}},mounted(){this.sidebarPlugins=h()},methods:{async update(i){this.sidebarPlugins=[];const t=h();t.length>0&&L(()=>{this.sidebarPlugins=t}),this.fileInfo=i,this.resetState(),await this.getActivities()},async getActivities(){try{this.loading=!0;const i=await this.processActivities(await this.loadRealActivities()),t=await z({fileInfo:this.fileInfo});this.activities=[...i,...t].sort((e,n)=>n.timestamp-e.timestamp)}catch(i){this.error=g("activity","Unable to load the activity list"),_.error("Error loading the activity list",{error:i})}finally{this.loading=!1}},resetState(){this.loading=!0,this.error="",this.activities=[]},async loadRealActivities(){try{const{data:i}=await N.get(C("apps/activity/api/v2/activity/filter"),{params:{format:"json",object_type:"files",object_id:this.fileInfo.id}});return i.ocs.data}catch(i){if(i.response!==void 0&&i.response.status===304)return[];throw i}},processActivities(i){i=i.map(e=>new $(e)),_.debug(`Processed ${i.length} activity(ies)`,{activities:i,fileInfo:this.fileInfo});const t=q();return i.filter(e=>!t||t.every(n=>n(e)))},t:g}}),J={key:0,class:"activity__actions"},K={key:3,class:"activity__list"};function M(i,t,e,n,r,b){const f=o("NcIconSvgWrapper"),v=o("NcEmptyContent"),A=o("ActivitySidebarPlugin"),k=o("NcLoadingIcon"),P=o("ActivityComponent");return a(),s("div",{class:V([{"icon-loading":i.loading},"activity"])},[i.error||i.fileInfo===null?(a(),l(v,{key:0,name:i.error},{icon:d(()=>[m(f,{svg:i.lightningBoltSVG},null,8,["svg"])]),_:1},8,["name"])):(a(),s(y,{key:1},[i.sidebarPlugins.length>0?(a(),s("div",J,[(a(!0),s(y,null,u(i.sidebarPlugins,(c,p)=>(a(),l(A,{key:p,plugin:c,"file-info":i.fileInfo,onReloadActivities:t[0]||(t[0]=O=>i.getActivities())},null,8,["plugin","file-info"]))),128))])):B("",!0),i.loading?(a(),l(v,{key:1,class:"activity__empty-content",name:i.t("activity","Loading activities")},{icon:d(()=>[m(k)]),_:1},8,["name"])):i.activities.length===0?(a(),l(v,{key:2,class:"activity__empty-content",name:i.t("activity","No activity yet")},{icon:d(()=>t[2]||(t[2]=[T("span",{class:"icon-activity"},null,-1)])),_:1},8,["name"])):(a(),s("ul",K,[(a(!0),s(y,null,u(i.activities,c=>(a(),l(P,{key:c.id,activity:c,"show-previews":!1,onReload:t[1]||(t[1]=p=>i.getActivities())},null,8,["activity"]))),128))]))],64))],2)}const si=x(F,[["render",M],["__scopeId","data-v-2fda9824"]]);export{si as default};
//# sourceMappingURL=ActivityTab-BHNw_dVJ.chunk.mjs.map
Loading
Loading