Refactor terminal and remove duplicate code.

This commit is contained in:
Ankit Mahato
2025-09-28 13:55:32 +05:30
parent dc7aa246d7
commit 3545c75cd5
21 changed files with 91 additions and 253 deletions

View File

@@ -3,7 +3,6 @@ import 'package:apidash_design_system/apidash_design_system.dart';
import 'package:apidash_core/apidash_core.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
// Terminal enums moved here from models to avoid circular imports and simplify usage
const kDiscordUrl = "https://bit.ly/heyfoss";
const kGitUrl = "https://github.com/foss42/apidash";
@@ -86,15 +85,6 @@ enum HistoryRetentionPeriod {
final IconData icon;
}
/// Source category of a terminal entry
enum TerminalSource { network, js, system }
/// Severity level of a terminal entry
enum TerminalLevel { debug, info, warn, error }
/// Phase of a network log lifecycle
enum NetworkPhase { started, progress, completed, failed }
enum ItemMenuOption {
edit("Rename"),
delete("Delete"),
@@ -521,3 +511,6 @@ const kMsgClearHistorySuccess = 'History cleared successfully';
const kMsgClearHistoryError = 'Error clearing history';
const kMsgShareError = "Unable to share";
const kLabelGenerateUI = "Generate UI";
// Terminal Page
const kMsgNoLogs = 'No logs yet';
const kMsgSendToView = 'Send a request to view its details in the console.';