v1.0.25: add Check for Updates button
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -88,6 +88,26 @@
|
||||
}
|
||||
#credStatus.ok { color: #4caf50; }
|
||||
#credStatus.error { color: #e57373; }
|
||||
#updateBtn {
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
padding: 6px;
|
||||
background: #2a2a2a;
|
||||
border: 1px solid #444;
|
||||
border-radius: 4px;
|
||||
color: #ccc;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
#updateBtn:hover { background: #333; }
|
||||
#updateStatus {
|
||||
font-size: 11px;
|
||||
color: #888;
|
||||
text-align: center;
|
||||
margin-top: 4px;
|
||||
min-height: 14px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -125,6 +145,8 @@
|
||||
|
||||
<p id="statusText"></p>
|
||||
<p id="versionText"></p>
|
||||
<button id="updateBtn">Check for Updates</button>
|
||||
<p id="updateStatus"></p>
|
||||
|
||||
<script src="libs/constants.js"></script>
|
||||
<script src="libs/prototypes.js"></script>
|
||||
@@ -229,6 +251,10 @@
|
||||
document.getElementById("projectSelect").addEventListener("change", save);
|
||||
document.getElementById("notionToken").addEventListener("input", scheduleCredSave);
|
||||
document.getElementById("userId").addEventListener("change", saveCredentials);
|
||||
document.getElementById("updateBtn").addEventListener("click", function() {
|
||||
document.getElementById("updateStatus").textContent = "";
|
||||
$PI.sendToPlugin({ event: "checkForUpdates" });
|
||||
});
|
||||
});
|
||||
|
||||
$PI.onDidReceiveGlobalSettings(function(jsn) {
|
||||
@@ -268,6 +294,9 @@
|
||||
|
||||
$PI.onSendToPropertyInspector(ACTION_UUID, function(jsn) {
|
||||
var payload = jsn.payload;
|
||||
if (payload.event === "updateStatus") {
|
||||
document.getElementById("updateStatus").textContent = payload.message;
|
||||
}
|
||||
if (payload.event === "projects") {
|
||||
if (payload.version) {
|
||||
document.getElementById("versionText").textContent = "v" + payload.version;
|
||||
|
||||
Reference in New Issue
Block a user