mirror of
https://github.com/Minidoracat/mcp-feedback-enhanced.git
synced 2025-07-27 10:42:25 +08:00
🔥 移除舊版回饋分頁相關程式碼
This commit is contained in:
parent
5e47c1dfa6
commit
9a07a0dbab
@ -12,7 +12,6 @@
|
|||||||
"updateFailed": "Failed to update content, please manually refresh the page to view new AI work summary"
|
"updateFailed": "Failed to update content, please manually refresh the page to view new AI work summary"
|
||||||
},
|
},
|
||||||
"tabs": {
|
"tabs": {
|
||||||
"feedback": "💬 Feedback",
|
|
||||||
"summary": "📋 AI Summary",
|
"summary": "📋 AI Summary",
|
||||||
"commands": "⚡ Commands",
|
"commands": "⚡ Commands",
|
||||||
"command": "⚡ Commands",
|
"command": "⚡ Commands",
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
"updateFailed": "更新内容失败,请手动刷新页面以查看新的 AI 工作摘要"
|
"updateFailed": "更新内容失败,请手动刷新页面以查看新的 AI 工作摘要"
|
||||||
},
|
},
|
||||||
"tabs": {
|
"tabs": {
|
||||||
"feedback": "💬 反馈",
|
|
||||||
"summary": "📋 AI 总结",
|
"summary": "📋 AI 总结",
|
||||||
"commands": "⚡ 命令",
|
"commands": "⚡ 命令",
|
||||||
"command": "⚡ 命令",
|
"command": "⚡ 命令",
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
"updateFailed": "更新內容失敗,請手動刷新頁面以查看新的 AI 工作摘要"
|
"updateFailed": "更新內容失敗,請手動刷新頁面以查看新的 AI 工作摘要"
|
||||||
},
|
},
|
||||||
"tabs": {
|
"tabs": {
|
||||||
"feedback": "💬 回饋",
|
|
||||||
"summary": "📋 AI 摘要",
|
"summary": "📋 AI 摘要",
|
||||||
"commands": "⚡ 命令",
|
"commands": "⚡ 命令",
|
||||||
"command": "⚡ 命令",
|
"command": "⚡ 命令",
|
||||||
|
@ -1380,7 +1380,6 @@ h3.combined-section-title {
|
|||||||
|
|
||||||
/* Placeholder 文本換行修復 - 全局樣式 */
|
/* Placeholder 文本換行修復 - 全局樣式 */
|
||||||
textarea::placeholder,
|
textarea::placeholder,
|
||||||
#feedbackText::placeholder,
|
|
||||||
#combinedFeedbackText::placeholder {
|
#combinedFeedbackText::placeholder {
|
||||||
white-space: pre-line !important;
|
white-space: pre-line !important;
|
||||||
line-height: 1.4 !important;
|
line-height: 1.4 !important;
|
||||||
@ -1391,7 +1390,6 @@ textarea::placeholder,
|
|||||||
|
|
||||||
/* 跨瀏覽器兼容的 placeholder 樣式 */
|
/* 跨瀏覽器兼容的 placeholder 樣式 */
|
||||||
textarea::-webkit-input-placeholder,
|
textarea::-webkit-input-placeholder,
|
||||||
#feedbackText::-webkit-input-placeholder,
|
|
||||||
#combinedFeedbackText::-webkit-input-placeholder {
|
#combinedFeedbackText::-webkit-input-placeholder {
|
||||||
white-space: pre-line !important;
|
white-space: pre-line !important;
|
||||||
line-height: 1.4 !important;
|
line-height: 1.4 !important;
|
||||||
@ -1401,7 +1399,6 @@ textarea::-webkit-input-placeholder,
|
|||||||
}
|
}
|
||||||
|
|
||||||
textarea::-moz-placeholder,
|
textarea::-moz-placeholder,
|
||||||
#feedbackText::-moz-placeholder,
|
|
||||||
#combinedFeedbackText::-moz-placeholder {
|
#combinedFeedbackText::-moz-placeholder {
|
||||||
white-space: pre-line !important;
|
white-space: pre-line !important;
|
||||||
line-height: 1.4 !important;
|
line-height: 1.4 !important;
|
||||||
@ -1411,7 +1408,6 @@ textarea::-moz-placeholder,
|
|||||||
}
|
}
|
||||||
|
|
||||||
textarea:-ms-input-placeholder,
|
textarea:-ms-input-placeholder,
|
||||||
#feedbackText:-ms-input-placeholder,
|
|
||||||
#combinedFeedbackText:-ms-input-placeholder {
|
#combinedFeedbackText:-ms-input-placeholder {
|
||||||
white-space: pre-line !important;
|
white-space: pre-line !important;
|
||||||
line-height: 1.4 !important;
|
line-height: 1.4 !important;
|
||||||
|
@ -468,9 +468,8 @@
|
|||||||
promptModal: this.promptModal
|
promptModal: this.promptModal
|
||||||
});
|
});
|
||||||
|
|
||||||
// 初始化輸入按鈕到所有回饋輸入區域
|
// 初始化輸入按鈕到回饋輸入區域
|
||||||
const inputContainers = [
|
const inputContainers = [
|
||||||
'#feedbackText', // 回饋分頁的 textarea
|
|
||||||
'#combinedFeedbackText' // 工作區分頁的 textarea
|
'#combinedFeedbackText' // 工作區分頁的 textarea
|
||||||
];
|
];
|
||||||
this.promptInputButtons.init(inputContainers);
|
this.promptInputButtons.init(inputContainers);
|
||||||
@ -925,17 +924,10 @@
|
|||||||
* 收集回饋數據
|
* 收集回饋數據
|
||||||
*/
|
*/
|
||||||
FeedbackApp.prototype.collectFeedbackData = function() {
|
FeedbackApp.prototype.collectFeedbackData = function() {
|
||||||
// 根據當前佈局模式獲取回饋內容
|
// 獲取合併模式的回饋內容
|
||||||
let feedback = '';
|
let feedback = '';
|
||||||
const layoutMode = this.settingsManager ? this.settingsManager.get('layoutMode') : 'combined-vertical';
|
const combinedFeedbackInput = window.MCPFeedback.Utils.safeQuerySelector('#combinedFeedbackText');
|
||||||
|
feedback = combinedFeedbackInput ? combinedFeedbackInput.value.trim() : '';
|
||||||
if (layoutMode.startsWith('combined')) {
|
|
||||||
const combinedFeedbackInput = window.MCPFeedback.Utils.safeQuerySelector('#combinedFeedbackText');
|
|
||||||
feedback = combinedFeedbackInput ? combinedFeedbackInput.value.trim() : '';
|
|
||||||
} else {
|
|
||||||
const feedbackInput = window.MCPFeedback.Utils.safeQuerySelector('#feedbackText');
|
|
||||||
feedback = feedbackInput ? feedbackInput.value.trim() : '';
|
|
||||||
}
|
|
||||||
|
|
||||||
const images = this.imageHandler ? this.imageHandler.getImages() : [];
|
const images = this.imageHandler ? this.imageHandler.getImages() : [];
|
||||||
|
|
||||||
@ -1068,21 +1060,12 @@
|
|||||||
FeedbackApp.prototype.focusInput = function() {
|
FeedbackApp.prototype.focusInput = function() {
|
||||||
console.log('🎯 執行聚焦輸入框...');
|
console.log('🎯 執行聚焦輸入框...');
|
||||||
|
|
||||||
// 根據當前佈局模式選擇正確的輸入框
|
// 聚焦到合併模式的輸入框
|
||||||
let targetInput = null;
|
const targetInput = window.MCPFeedback.Utils.safeQuerySelector('#combinedFeedbackText');
|
||||||
const layoutMode = this.settingsManager ? this.settingsManager.get('layoutMode') : 'combined-vertical';
|
|
||||||
|
|
||||||
if (layoutMode.startsWith('combined')) {
|
// 確保在工作區分頁
|
||||||
// 工作區模式:聚焦合併模式的輸入框
|
if (this.uiManager && this.uiManager.getCurrentTab() !== 'combined') {
|
||||||
targetInput = window.MCPFeedback.Utils.safeQuerySelector('#combinedFeedbackText');
|
this.uiManager.switchTab('combined');
|
||||||
} else {
|
|
||||||
// 分離模式:聚焦回饋分頁的輸入框
|
|
||||||
targetInput = window.MCPFeedback.Utils.safeQuerySelector('#feedbackText');
|
|
||||||
|
|
||||||
// 如果不在當前可見的分頁,先切換到回饋分頁
|
|
||||||
if (this.uiManager && this.uiManager.getCurrentTab() !== 'feedback') {
|
|
||||||
this.uiManager.switchTab('feedback');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (targetInput) {
|
if (targetInput) {
|
||||||
@ -1459,14 +1442,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 設定提示詞內容到回饋輸入框
|
// 設定提示詞內容到回饋輸入框
|
||||||
const feedbackInputs = [
|
const feedbackInput = window.MCPFeedback.Utils.safeQuerySelector('#combinedFeedbackText');
|
||||||
window.MCPFeedback.Utils.safeQuerySelector('#feedbackText'),
|
if (feedbackInput) {
|
||||||
window.MCPFeedback.Utils.safeQuerySelector('#combinedFeedbackText')
|
feedbackInput.value = prompt.content;
|
||||||
].filter(function(input) { return input !== null; });
|
}
|
||||||
|
|
||||||
feedbackInputs.forEach(function(input) {
|
|
||||||
input.value = prompt.content;
|
|
||||||
});
|
|
||||||
|
|
||||||
// 顯示自動提交訊息
|
// 顯示自動提交訊息
|
||||||
const message = window.i18nManager ?
|
const message = window.i18nManager ?
|
||||||
|
@ -74,7 +74,6 @@
|
|||||||
this.tabContents = document.querySelectorAll('.tab-content');
|
this.tabContents = document.querySelectorAll('.tab-content');
|
||||||
|
|
||||||
// 回饋相關元素
|
// 回饋相關元素
|
||||||
this.feedbackText = Utils.safeQuerySelector('#feedbackText');
|
|
||||||
this.submitBtn = Utils.safeQuerySelector('#submitBtn');
|
this.submitBtn = Utils.safeQuerySelector('#submitBtn');
|
||||||
|
|
||||||
console.log('✅ UI 元素初始化完成');
|
console.log('✅ UI 元素初始化完成');
|
||||||
@ -257,15 +256,12 @@
|
|||||||
* 更新回饋輸入框狀態
|
* 更新回饋輸入框狀態
|
||||||
*/
|
*/
|
||||||
UIManager.prototype.updateFeedbackInputs = function() {
|
UIManager.prototype.updateFeedbackInputs = function() {
|
||||||
const feedbackInputs = [
|
const feedbackInput = Utils.safeQuerySelector('#combinedFeedbackText');
|
||||||
Utils.safeQuerySelector('#feedbackText'),
|
|
||||||
Utils.safeQuerySelector('#combinedFeedbackText')
|
|
||||||
].filter(function(input) { return input !== null; });
|
|
||||||
|
|
||||||
const canInput = this.feedbackState === Utils.CONSTANTS.FEEDBACK_WAITING;
|
const canInput = this.feedbackState === Utils.CONSTANTS.FEEDBACK_WAITING;
|
||||||
feedbackInputs.forEach(function(input) {
|
|
||||||
input.disabled = !canInput;
|
if (feedbackInput) {
|
||||||
});
|
feedbackInput.disabled = !canInput;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -491,15 +487,11 @@
|
|||||||
console.log('🔄 重置回饋表單...');
|
console.log('🔄 重置回饋表單...');
|
||||||
|
|
||||||
// 清空回饋輸入
|
// 清空回饋輸入
|
||||||
const feedbackInputs = [
|
const feedbackInput = Utils.safeQuerySelector('#combinedFeedbackText');
|
||||||
Utils.safeQuerySelector('#feedbackText'),
|
if (feedbackInput) {
|
||||||
Utils.safeQuerySelector('#combinedFeedbackText')
|
feedbackInput.value = '';
|
||||||
].filter(function(input) { return input !== null; });
|
feedbackInput.disabled = false;
|
||||||
|
}
|
||||||
feedbackInputs.forEach(function(input) {
|
|
||||||
input.value = '';
|
|
||||||
input.disabled = false;
|
|
||||||
});
|
|
||||||
|
|
||||||
// 重新啟用提交按鈕
|
// 重新啟用提交按鈕
|
||||||
const submitButtons = [
|
const submitButtons = [
|
||||||
|
@ -483,13 +483,10 @@
|
|||||||
<!-- 分頁導航 -->
|
<!-- 分頁導航 -->
|
||||||
<div class="tabs">
|
<div class="tabs">
|
||||||
<div class="tab-buttons">
|
<div class="tab-buttons">
|
||||||
<!-- 工作區分頁 - 移到最左邊第一個 -->
|
<!-- 工作區分頁 - 主要分頁 -->
|
||||||
<button class="tab-button hidden" data-tab="combined" data-i18n="tabs.combined">
|
<button class="tab-button active" data-tab="combined" data-i18n="tabs.combined">
|
||||||
📝 工作區
|
📝 工作區
|
||||||
</button>
|
</button>
|
||||||
<button class="tab-button active" data-tab="feedback" data-i18n="tabs.feedback">
|
|
||||||
💬 回饋
|
|
||||||
</button>
|
|
||||||
<button class="tab-button" data-tab="summary" data-i18n="tabs.summary">
|
<button class="tab-button" data-tab="summary" data-i18n="tabs.summary">
|
||||||
📋 AI 摘要
|
📋 AI 摘要
|
||||||
</button>
|
</button>
|
||||||
@ -510,51 +507,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ===== 回饋分頁 ===== -->
|
|
||||||
<div id="tab-feedback" class="tab-content active">
|
|
||||||
<div class="section-description" data-i18n="feedback.description">
|
|
||||||
請提供您對 AI 工作成果的回饋意見。您可以輸入文字回饋並上傳相關圖片。
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 等待回饋狀態指示器 -->
|
|
||||||
{% set id = "feedbackStatusIndicator" %}
|
|
||||||
{% set status = "waiting" %}
|
|
||||||
{% set icon = "⏳" %}
|
|
||||||
{% set title = "等待回饋" %}
|
|
||||||
{% set message = "請提供您的回饋意見" %}
|
|
||||||
{% include 'components/status-indicator.html' %}
|
|
||||||
|
|
||||||
<div class="input-group">
|
|
||||||
<label class="input-label" data-i18n="feedback.textLabel">文字回饋</label>
|
|
||||||
|
|
||||||
<!-- 提示詞按鈕 -->
|
|
||||||
<div class="prompt-input-buttons" id="feedbackPromptButtons">
|
|
||||||
<button type="button" class="prompt-input-btn select-prompt-btn" data-container-index="0">
|
|
||||||
<span>📝</span>
|
|
||||||
<span class="button-text" data-i18n="prompts.buttons.selectPrompt">Templates</span>
|
|
||||||
</button>
|
|
||||||
<button type="button" class="prompt-input-btn last-prompt-btn" data-container-index="0">
|
|
||||||
<span>🔄</span>
|
|
||||||
<span class="button-text" data-i18n="prompts.buttons.useLastPrompt">Last Used</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<textarea
|
|
||||||
id="feedbackText"
|
|
||||||
class="text-input"
|
|
||||||
data-i18n-placeholder="feedback.detailedPlaceholder"
|
|
||||||
placeholder="請在這裡輸入您的回饋...
|
|
||||||
|
|
||||||
💡 小提示:
|
|
||||||
• 按 Ctrl+Enter/Cmd+Enter (支援數字鍵盤) 可快速提交
|
|
||||||
• 按 Ctrl+V/Cmd+V 可直接貼上剪貼板圖片"
|
|
||||||
></textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 圖片上傳組件 -->
|
|
||||||
{% set id_prefix = "feedback" %}
|
|
||||||
{% include 'components/image-upload.html' %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- ===== AI 摘要分頁 ===== -->
|
<!-- ===== AI 摘要分頁 ===== -->
|
||||||
<div id="tab-summary" class="tab-content">
|
<div id="tab-summary" class="tab-content">
|
||||||
@ -598,8 +551,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 工作區分頁 - 移動到此位置 -->
|
<!-- 工作區分頁 - 主要分頁 -->
|
||||||
<div id="tab-combined" class="tab-content">
|
<div id="tab-combined" class="tab-content active">
|
||||||
<div class="combined-content">
|
<div class="combined-content">
|
||||||
<!-- AI 摘要區域 -->
|
<!-- AI 摘要區域 -->
|
||||||
<div class="combined-section">
|
<div class="combined-section">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user