diff --git a/.github/workflows/artifact.yml b/.github/workflows/artifact.yml index 2a8d95f9..252f7d3c 100644 --- a/.github/workflows/artifact.yml +++ b/.github/workflows/artifact.yml @@ -3,9 +3,9 @@ name: Artifact on: workflow_dispatch: push: - branches: [master] + branches: [main, 'stable*'] pull_request: - branches: [master] + branches: [main, 'stable*'] jobs: artifact: diff --git a/.github/workflows/lint-eslint.yml b/.github/workflows/lint-eslint.yml index ce90ede7..3c8c22c1 100644 --- a/.github/workflows/lint-eslint.yml +++ b/.github/workflows/lint-eslint.yml @@ -3,12 +3,16 @@ name: ESLint on: workflow_dispatch: push: - branches: [master, develop] + branches: [main, 'stable*'] pull_request: - branches: [master, develop] + branches: [main, 'stable*'] env: - NODE_VERSION: 20 + # Must stay >= 24: @nextcloud/files@4 requires node ^24.0.0, and npm 10 + # (bundled with node 20) cannot `npm ci` this lockfile because it tries to + # materialise fdir's *optional* picomatch peer. The release workflow already + # builds with node ^24 / npm ^11.3. + NODE_VERSION: 24 jobs: lint: diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index 7793f0ea..0ca8c8b9 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -3,9 +3,9 @@ name: Lint-php on: workflow_dispatch: push: - branches: [master, develop] + branches: [main, 'stable*'] pull_request: - branches: [master, develop] + branches: [main, 'stable*'] permissions: contents: read diff --git a/.github/workflows/lint-phpcs.yml b/.github/workflows/lint-phpcs.yml index 45fdf2c0..07c9b60c 100644 --- a/.github/workflows/lint-phpcs.yml +++ b/.github/workflows/lint-phpcs.yml @@ -3,9 +3,9 @@ name: Lint-phpcs on: workflow_dispatch: push: - branches: [master, develop] + branches: [main, 'stable*'] pull_request: - branches: [master, develop] + branches: [main, 'stable*'] permissions: contents: read diff --git a/src/desktop.js b/src/desktop.js index f9915b43..87cc102f 100644 --- a/src/desktop.js +++ b/src/desktop.js @@ -21,7 +21,7 @@ * */ -/* global _, _oc_appswebroots, oc_current_user */ +/* global _oc_appswebroots, oc_current_user */ /** * @param {object} OCA Nextcloud OCA object diff --git a/src/directeditor.js b/src/directeditor.js index dbeb6f5a..109a1f06 100644 --- a/src/directeditor.js +++ b/src/directeditor.js @@ -21,8 +21,6 @@ * */ -/* global _ */ - /** * @param {object} OCA Nextcloud OCA object */ diff --git a/src/editor.js b/src/editor.js index ba9dbe99..8e9fed36 100644 --- a/src/editor.js +++ b/src/editor.js @@ -21,7 +21,7 @@ * */ -/* global _, DocsAPI, moment, oc_defaults */ +/* global DocsAPI, moment, oc_defaults */ import axios from '@nextcloud/axios' diff --git a/src/listener.js b/src/listener.js index c982700e..2b6bd063 100644 --- a/src/listener.js +++ b/src/listener.js @@ -21,7 +21,7 @@ * */ -/* global _, OC, OCP, t */ +/* global OC, OCP, t */ import { getLinkWithPicker } from '@nextcloud/vue/components/NcRichText' @@ -98,47 +98,47 @@ import { getLinkWithPicker } from '@nextcloud/vue/components/NcRichText' // the modal manually. The modal's built-in close button dismisses it. OCA.Eurooffice.onSmartPickerRequest = async function(selectedText, source) { if (this.showSmartPicker) { - return; + return } - this.showSmartPicker = true; + this.showSmartPicker = true if (source === 'contextmenu') { - const openAssistantForm = window.OCA?.Assistant?.openAssistantForm; + const openAssistantForm = window.OCA?.Assistant?.openAssistantForm if (typeof openAssistantForm !== 'function') { - console.debug('NC Assistant app is not loaded; smart picker is unavailable'); - this.showSmartPicker = false; - return; + console.debug('NC Assistant app is not loaded; smart picker is unavailable') + this.showSmartPicker = false + return } try { const seedInputs = selectedText ? { prompt: selectedText, input: selectedText, text: selectedText } - : {}; + : {} await openAssistantForm({ appId: OCA.Eurooffice.AppName, taskType: 'core:text2text', inputs: seedInputs, closeOnResult: false, - }); + }) } catch (e) { // Smart Picker cancelled or failed } } else { // Toolbar button: open the Smart Picker provider selection modal if (typeof getLinkWithPicker !== 'function') { - console.error('getLinkWithPicker is not available. Make sure @nextcloud/vue supports the Smart Picker.'); - this.showSmartPicker = false; - return; + console.error('getLinkWithPicker is not available. Make sure @nextcloud/vue supports the Smart Picker.') + this.showSmartPicker = false + return } try { - const linkUrl = await getLinkWithPicker('eurooffice', false); + const linkUrl = await getLinkWithPicker('eurooffice', false) if (linkUrl) { - OCA.Eurooffice.onInsertLink(linkUrl); + OCA.Eurooffice.onInsertLink(linkUrl) } } catch (err) { - console.debug('Smart Picker cancelled or failed:', err); + console.debug('Smart Picker cancelled or failed:', err) } } - this.showSmartPicker = false; + this.showSmartPicker = false } OCA.Eurooffice.onRequestMailMergeRecipients = function(recipientMimes) { @@ -204,10 +204,10 @@ import { getLinkWithPicker } from '@nextcloud/vue/components/NcRichText' OCA.Eurooffice._isDocumentReady = false OCA.Eurooffice._doInsertLink = function(link) { - if (!link) return; - const frame = document.querySelector(OCA.Eurooffice.frameSelector); + if (!link) return + const frame = document.querySelector(OCA.Eurooffice.frameSelector) if (frame && frame.contentWindow && frame.contentWindow.OCA?.Eurooffice?.docEditor) { - frame.contentWindow.OCA.Eurooffice.docEditor.insertLink(link); + frame.contentWindow.OCA.Eurooffice.docEditor.insertLink(link) } } diff --git a/src/main.js b/src/main.js index 4a18dc1e..e3cbceb5 100644 --- a/src/main.js +++ b/src/main.js @@ -23,7 +23,7 @@ /* eslint-disable import/no-unresolved */ -/* global _, _oc_appswebroots */ +/* global _oc_appswebroots */ import { File, diff --git a/src/share.js b/src/share.js index ab73352d..6e526bc9 100644 --- a/src/share.js +++ b/src/share.js @@ -23,8 +23,6 @@ /* eslint-disable import/no-unresolved */ -/* global _ */ - import AppDarkSvg from '../img/app-dark.svg?raw' import axios from '@nextcloud/axios' diff --git a/src/template.js b/src/template.js index e8bd3323..63486dc7 100644 --- a/src/template.js +++ b/src/template.js @@ -21,8 +21,6 @@ * */ -/* global _ */ - import axios from '@nextcloud/axios' import { spawnDialog } from '@nextcloud/vue/functions/dialog' import { defineAsyncComponent } from 'vue'