mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-10-26 09:31:34 +08:00
remove username from options
This commit is contained in:
parent
711e4f8ebd
commit
5007ec4703
@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Trilium Web Clipper (dev)",
|
||||
"version": "0.3.1",
|
||||
"version": "1.0.0",
|
||||
"description": "Save web clippings to Trilium Notes.",
|
||||
"homepage_url": "https://github.com/zadam/trilium-web-clipper",
|
||||
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
|
||||
@ -60,8 +60,8 @@
|
||||
"default": "Alt+Shift+S"
|
||||
}
|
||||
},
|
||||
"saveScreenshot": {
|
||||
"description": "Take a screenshot of the current page",
|
||||
"saveCroppedScreenshot": {
|
||||
"description": "Take a cropped screenshot of the current page",
|
||||
"suggested_key": {
|
||||
"default": "Ctrl+Shift+E"
|
||||
}
|
||||
|
||||
@ -41,13 +41,6 @@
|
||||
<th>Trilium server URL:</th>
|
||||
<td><input type="text" id="trilium-server-url"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Username:</th>
|
||||
<td><input type="text" id="trilium-server-username"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: center; font-style: italic">Note: Username is needed only for Trilium v0.49 and earlier</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Password:</th>
|
||||
<td><input type="password" id="trilium-server-password"/></td>
|
||||
@ -58,7 +51,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>Note that the entered credentials are not stored anywhere, they will be only used to retrieve an authorization token from the server instance which will be then used to send the clipped notes.</p>
|
||||
<p>Note that the entered password is not stored anywhere, it will be only used to retrieve an authorization token from the server instance which will be then used to send the clipped notes.</p>
|
||||
</form>
|
||||
|
||||
<script src="../lib/cash.min.js"></script>
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
const $triliumServerUrl = $("#trilium-server-url");
|
||||
const $triliumServerUsername = $("#trilium-server-username");
|
||||
const $triliumServerPassword = $("#trilium-server-password");
|
||||
|
||||
const $errorMessage = $("#error-message");
|
||||
@ -19,9 +18,8 @@ async function saveTriliumServerSetup(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if ($triliumServerUrl.val().trim().length === 0
|
||||
|| $triliumServerUsername.val().trim().length === 0
|
||||
|| $triliumServerPassword.val().trim().length === 0) {
|
||||
showError("One or more mandatory inputs are missing. Please fill in server URL, username and password.");
|
||||
showError("One or more mandatory inputs are missing. Please fill in server URL and password.");
|
||||
|
||||
return;
|
||||
}
|
||||
@ -36,7 +34,6 @@ async function saveTriliumServerSetup(e) {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
username: $triliumServerUsername.val(),
|
||||
password: $triliumServerPassword.val()
|
||||
})
|
||||
});
|
||||
@ -57,7 +54,6 @@ async function saveTriliumServerSetup(e) {
|
||||
|
||||
showSuccess("Authentication against Trilium server has been successful.");
|
||||
|
||||
$triliumServerUsername.val('');
|
||||
$triliumServerPassword.val('');
|
||||
|
||||
browser.storage.sync.set({
|
||||
@ -116,7 +112,6 @@ async function restoreOptions() {
|
||||
$successMessage.hide();
|
||||
|
||||
$triliumServerUrl.val('');
|
||||
$triliumServerUsername.val('');
|
||||
$triliumServerPassword.val('');
|
||||
|
||||
if (triliumServerUrl && authToken) {
|
||||
@ -137,4 +132,4 @@ async function restoreOptions() {
|
||||
$triliumDesktopPort.val(triliumDesktopPort);
|
||||
}
|
||||
|
||||
$(restoreOptions);
|
||||
$(restoreOptions);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user