fix: resolve CI linting issues for Astroglobe
Fix all ESLint, Stylelint, PHP CS Fixer, and Psalm workflow errors. Changes: - ESLint fixes: - Remove unused APP_NAME constant - Remove unused TextBoxOutline and TextBoxRemoveOutline components - Remove unused container variable in adminSettings.js - Auto-fix trailing commas, line breaks, attribute ordering - PHP CS Fixer: - Add trailing commas after last function parameters - Convert double quotes to single quotes in log messages - Remove unused NoCSRFRequired import - Fix arrow function formatting - Stylelint: - Update config to use @nextcloud/stylelint-config - Fix extends directive (was using non-existent package) - Psalm workflow: - Fix jq object indexing (.include[0] instead of .[0]) - Correctly extract OCP version from matrix output All checks now pass locally. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Vendored
+35
-22
@@ -118,7 +118,7 @@
|
||||
min="0"
|
||||
max="100"
|
||||
step="5"
|
||||
class="mcp-score-slider" />
|
||||
class="mcp-score-slider">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -248,29 +248,43 @@
|
||||
|
||||
<div v-else-if="vectorStatus" class="mcp-status-cards">
|
||||
<div class="mcp-status-card">
|
||||
<div class="mcp-status-label">{{ t('astroglobe', 'Sync Status') }}</div>
|
||||
<div class="mcp-status-label">
|
||||
{{ t('astroglobe', 'Sync Status') }}
|
||||
</div>
|
||||
<div class="mcp-status-value" :class="'status-' + vectorStatus.status">
|
||||
{{ vectorStatus.status }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mcp-status-card">
|
||||
<div class="mcp-status-label">{{ t('astroglobe', 'Indexed Documents') }}</div>
|
||||
<div class="mcp-status-value">{{ vectorStatus.indexed_documents || 0 }}</div>
|
||||
<div class="mcp-status-label">
|
||||
{{ t('astroglobe', 'Indexed Documents') }}
|
||||
</div>
|
||||
<div class="mcp-status-value">
|
||||
{{ vectorStatus.indexed_documents || 0 }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mcp-status-card">
|
||||
<div class="mcp-status-label">{{ t('astroglobe', 'Pending Documents') }}</div>
|
||||
<div class="mcp-status-value">{{ vectorStatus.pending_documents || 0 }}</div>
|
||||
<div class="mcp-status-label">
|
||||
{{ t('astroglobe', 'Pending Documents') }}
|
||||
</div>
|
||||
<div class="mcp-status-value">
|
||||
{{ vectorStatus.pending_documents || 0 }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="vectorStatus.last_sync_time" class="mcp-status-card">
|
||||
<div class="mcp-status-label">{{ t('astroglobe', 'Last Sync') }}</div>
|
||||
<div class="mcp-status-value">{{ vectorStatus.last_sync_time }}</div>
|
||||
<div class="mcp-status-label">
|
||||
{{ t('astroglobe', 'Last Sync') }}
|
||||
</div>
|
||||
<div class="mcp-status-value">
|
||||
{{ vectorStatus.last_sync_time }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<NcButton type="secondary" @click="loadVectorStatus" :disabled="statusLoading">
|
||||
<NcButton type="secondary" :disabled="statusLoading" @click="loadVectorStatus">
|
||||
<template #icon>
|
||||
<Refresh :size="20" />
|
||||
</template>
|
||||
@@ -308,9 +322,15 @@
|
||||
|
||||
<!-- Text Viewer (for non-PDFs) -->
|
||||
<div v-else class="mcp-text-viewer">
|
||||
<div v-if="viewerContext.before" class="mcp-context-text">{{ viewerContext.before }}</div>
|
||||
<div class="mcp-highlighted-chunk">{{ viewerContext.chunk }}</div>
|
||||
<div v-if="viewerContext.after" class="mcp-context-text">{{ viewerContext.after }}</div>
|
||||
<div v-if="viewerContext.before" class="mcp-context-text">
|
||||
{{ viewerContext.before }}
|
||||
</div>
|
||||
<div class="mcp-highlighted-chunk">
|
||||
{{ viewerContext.chunk }}
|
||||
</div>
|
||||
<div v-if="viewerContext.after" class="mcp-context-text">
|
||||
{{ viewerContext.after }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -337,8 +357,6 @@ import Cog from 'vue-material-design-icons/Cog.vue'
|
||||
import ChevronDown from 'vue-material-design-icons/ChevronDown.vue'
|
||||
import ChevronUp from 'vue-material-design-icons/ChevronUp.vue'
|
||||
import Refresh from 'vue-material-design-icons/Refresh.vue'
|
||||
import TextBoxOutline from 'vue-material-design-icons/TextBoxOutline.vue'
|
||||
import TextBoxRemoveOutline from 'vue-material-design-icons/TextBoxRemoveOutline.vue'
|
||||
import OpenInNew from 'vue-material-design-icons/OpenInNew.vue'
|
||||
import Eye from 'vue-material-design-icons/Eye.vue'
|
||||
import Close from 'vue-material-design-icons/Close.vue'
|
||||
@@ -354,16 +372,13 @@ import * as pdfjsLib from 'pdfjs-dist'
|
||||
try {
|
||||
pdfjsLib.GlobalWorkerOptions.workerSrc = new URL(
|
||||
'pdfjs-dist/build/pdf.worker.mjs',
|
||||
import.meta.url
|
||||
import.meta.url,
|
||||
).toString()
|
||||
} catch (e) {
|
||||
console.warn('Failed to set PDF.js worker, will use fallback', e)
|
||||
// PDF.js will use fake worker automatically
|
||||
}
|
||||
|
||||
// App name for translations
|
||||
const APP_NAME = 'astroglobe'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
@@ -385,8 +400,6 @@ export default {
|
||||
ChevronDown,
|
||||
ChevronUp,
|
||||
Refresh,
|
||||
TextBoxOutline,
|
||||
TextBoxRemoveOutline,
|
||||
OpenInNew,
|
||||
Eye,
|
||||
Close,
|
||||
@@ -754,7 +767,7 @@ export default {
|
||||
|
||||
closeViewer() {
|
||||
this.showViewer = false
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -1177,7 +1190,7 @@ a.mcp-result-title {
|
||||
.mcp-checkbox-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
|
||||
.mcp-modal {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
+5
-6
@@ -59,7 +59,7 @@ function initSearchSettingsForm() {
|
||||
const response = await axios.post(
|
||||
generateUrl('/apps/astroglobe/api/admin/search-settings'),
|
||||
data,
|
||||
{ headers: { 'Content-Type': 'application/json' } }
|
||||
{ headers: { 'Content-Type': 'application/json' } },
|
||||
)
|
||||
|
||||
if (response.data.success) {
|
||||
@@ -91,7 +91,7 @@ async function initWebhookManagement() {
|
||||
try {
|
||||
// Load webhook presets from API
|
||||
const response = await axios.get(
|
||||
generateUrl('/apps/astroglobe/api/admin/webhooks/presets')
|
||||
generateUrl('/apps/astroglobe/api/admin/webhooks/presets'),
|
||||
)
|
||||
|
||||
if (!response.data.success) {
|
||||
@@ -115,7 +115,7 @@ async function initWebhookManagement() {
|
||||
* Render webhook preset cards.
|
||||
*
|
||||
* @param {HTMLElement} container Container element
|
||||
* @param {Object} presets Preset configurations
|
||||
* @param {object} presets Preset configurations
|
||||
*/
|
||||
function renderWebhookPresets(container, presets) {
|
||||
const presetIds = Object.keys(presets)
|
||||
@@ -147,7 +147,7 @@ function renderWebhookPresets(container, presets) {
|
||||
* Create a webhook preset card.
|
||||
*
|
||||
* @param {string} presetId Preset ID
|
||||
* @param {Object} preset Preset configuration
|
||||
* @param {object} preset Preset configuration
|
||||
* @return {HTMLElement} Card element
|
||||
*/
|
||||
function createPresetCard(presetId, preset) {
|
||||
@@ -212,7 +212,6 @@ async function togglePreset(presetId, currentlyEnabled) {
|
||||
}
|
||||
|
||||
// Reload presets to update UI
|
||||
const container = document.getElementById('webhook-presets-container')
|
||||
await initWebhookManagement()
|
||||
|
||||
// Show success notification
|
||||
@@ -227,7 +226,7 @@ async function togglePreset(presetId, currentlyEnabled) {
|
||||
// Show error notification
|
||||
OC.Notification.showTemporary(
|
||||
error.message || 'Failed to toggle webhook preset',
|
||||
{ type: 'error' }
|
||||
{ type: 'error' },
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -8,8 +8,8 @@
|
||||
<AlertCircle :size="48" />
|
||||
<p>{{ error }}</p>
|
||||
</div>
|
||||
<div v-else class="pdf-canvas-container" ref="container">
|
||||
<canvas ref="canvas"></canvas>
|
||||
<div v-else ref="container" class="pdf-canvas-container">
|
||||
<canvas ref="canvas" />
|
||||
</div>
|
||||
<div v-if="!loading && !error && totalPages > 0" class="pdf-controls">
|
||||
<NcButton
|
||||
@@ -178,7 +178,7 @@ export default {
|
||||
// Render page to canvas
|
||||
const renderContext = {
|
||||
canvasContext: context,
|
||||
viewport: viewport,
|
||||
viewport,
|
||||
}
|
||||
|
||||
await page.render(renderContext).promise
|
||||
|
||||
Reference in New Issue
Block a user