196 lines
4.8 KiB
HTML
196 lines
4.8 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<style>
|
|
body {
|
|
width: 350px;
|
|
min-height: 200px;
|
|
margin: 0;
|
|
padding: 16px;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
background: #f8f9fa;
|
|
}
|
|
|
|
.header {
|
|
text-align: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.logo {
|
|
width: 48px;
|
|
height: 48px;
|
|
margin: 0 auto 8px;
|
|
background: #007bff;
|
|
border-radius: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: white;
|
|
font-weight: bold;
|
|
font-size: 20px;
|
|
}
|
|
|
|
.title {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: #333;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.version {
|
|
font-size: 12px;
|
|
color: #666;
|
|
}
|
|
|
|
.status-card {
|
|
background: white;
|
|
border-radius: 8px;
|
|
padding: 12px;
|
|
margin-bottom: 12px;
|
|
border-left: 4px solid #28a745;
|
|
}
|
|
|
|
.status-card.error {
|
|
border-left-color: #dc3545;
|
|
}
|
|
|
|
.status-card.warning {
|
|
border-left-color: #ffc107;
|
|
}
|
|
|
|
.status-title {
|
|
font-weight: 600;
|
|
font-size: 14px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.status-message {
|
|
font-size: 12px;
|
|
color: #666;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.status-detail {
|
|
font-size: 11px;
|
|
color: #888;
|
|
}
|
|
|
|
.button {
|
|
width: 100%;
|
|
padding: 8px 12px;
|
|
background: #007bff;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
margin-bottom: 8px;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.button:hover {
|
|
background: #0056b3;
|
|
}
|
|
|
|
.button:disabled {
|
|
background: #6c757d;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.button.secondary {
|
|
background: #6c757d;
|
|
}
|
|
|
|
.button.secondary:hover {
|
|
background: #545b62;
|
|
}
|
|
|
|
.printers-list {
|
|
background: white;
|
|
border-radius: 8px;
|
|
padding: 12px;
|
|
margin-top: 12px;
|
|
}
|
|
|
|
.printer-item {
|
|
padding: 8px 0;
|
|
border-bottom: 1px solid #eee;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.printer-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.printer-name {
|
|
font-weight: 600;
|
|
color: #333;
|
|
}
|
|
|
|
.printer-details {
|
|
color: #666;
|
|
font-size: 11px;
|
|
}
|
|
|
|
.footer {
|
|
text-align: center;
|
|
margin-top: 16px;
|
|
padding-top: 16px;
|
|
border-top: 1px solid #eee;
|
|
}
|
|
|
|
.footer-link {
|
|
font-size: 11px;
|
|
color: #007bff;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.loading {
|
|
text-align: center;
|
|
padding: 20px;
|
|
color: #666;
|
|
}
|
|
|
|
.hidden {
|
|
display: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="header">
|
|
<div class="logo">QR</div>
|
|
<div class="title">Quality Label Printing Service</div>
|
|
<div class="version">Version 1.0.0</div>
|
|
</div>
|
|
|
|
<div id="loading" class="loading">
|
|
<div>Checking service status...</div>
|
|
</div>
|
|
|
|
<div id="content" class="hidden">
|
|
<div id="service-status" class="status-card">
|
|
<div class="status-title">Print Service Status</div>
|
|
<div class="status-message" id="status-message">Checking...</div>
|
|
<div class="status-detail" id="status-detail"></div>
|
|
</div>
|
|
|
|
<button id="refresh-btn" class="button">Refresh Status</button>
|
|
<button id="test-print-btn" class="button">Test Print</button>
|
|
<button id="get-printers-btn" class="button secondary">Get Printers</button>
|
|
|
|
<div id="printers-container" class="hidden">
|
|
<div class="printers-list">
|
|
<div style="font-weight: 600; margin-bottom: 8px; font-size: 14px;">Available Printers</div>
|
|
<div id="printers-list"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<a href="#" id="help-link" class="footer-link">Help & Documentation</a>
|
|
</div>
|
|
|
|
<script src="popup.js"></script>
|
|
</body>
|
|
</html> |