From 7d31580d0bb6d504dda891658a733a847acd3462 Mon Sep 17 00:00:00 2001 From: Uday Samsani Date: Mon, 5 Jun 2023 00:39:15 +0530 Subject: [PATCH] Modified manifest file --- LICENSE | 2 +- manifest.json | 4 ++-- package.json | 4 ++-- src/Settings/settings.ts | 2 +- src/main.ts | 14 +++++++------- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/LICENSE b/LICENSE index ee29279..9c3cc36 100755 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 Jordan Handy +Copyright (c) 2021 Uday Samsani Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/manifest.json b/manifest.json index f5a0f32..7e6b3b9 100755 --- a/manifest.json +++ b/manifest.json @@ -1,8 +1,8 @@ { "id": "cloudinary", "name": "Cloudinary", - "description": "This plugin allows you to upload content(images, videos, audio) to Cloudinary and insert(copy or drag both) them into your notes.", - "author": "Uday Samsani", + "description": "Make you notes lighter by uploading all content(images, videos, audio) to Cloudinary and insert(copy or drag both) them into your notes.", + "author": "Uday Samsani, Jordan Handy", "isDesktopOnly": true, "minAppVersion": "0.11.0", "version": "1.1.0" diff --git a/package.json b/package.json index 2a42aa1..c510cfe 100755 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "obsidian-cloudinary", - "version": "1.1.0", + "version": "1.1.1", "author": "Uday Samsani", - "description": "This plugin allows you to upload content(images, videos, audio) to Cloudinary and insert(copy or drag both) them into your notes.", + "description": "Upload content(images, videos, audio) to Cloudinary and insert(copy or drag both) them into your notes.", "main": "lib/main.js", "license": "MIT", "scripts": { diff --git a/src/Settings/settings.ts b/src/Settings/settings.ts index 43eb8e9..6e3ab73 100755 --- a/src/Settings/settings.ts +++ b/src/Settings/settings.ts @@ -92,7 +92,7 @@ export default class CloudinaryUploaderSettingTab extends PluginSettingTab { desc.createEl("br"), "Check the ", desc.createEl("a", { - href: "https://silentvoid13.github.io/Templater/", + href: "https://cloudinary.com/documentation/cloudinary_glossary#cloud_name", text: "documentation", }), " to get know about cloud name" diff --git a/src/main.ts b/src/main.ts index 2097302..052925e 100755 --- a/src/main.ts +++ b/src/main.ts @@ -2,7 +2,7 @@ import { Notice, Plugin, - Editor, MarkdownView, + Editor, MarkdownView, requestUrl, } from "obsidian"; // For API requests @@ -21,7 +21,7 @@ export default class CloudinaryUploader extends Plugin { private isUploading = false; private validate = () => { - if(this.settings.cloudName===""){ + if (this.settings.cloudName === "") { new Notice("☁️ Cloudinary: Cloud Empty ⚠️\nKindly fill cloudinary name & try again", 5000) this.isUploading = false; this.statusBar.setText("☁️ Cloudinary: Cloud Name Empty ⚠️") @@ -30,7 +30,7 @@ export default class CloudinaryUploader extends Plugin { }, 10000); return false; } - if (this.settings.globalUploadPreset===""){ + if (this.settings.globalUploadPreset === "") { new Notice("☁️ Cloudinary: Global Upload preset Empty ⚠️\nKindly fill upload preset & try again", 5000) this.isUploading = false; this.statusBar.setText("☁️ Cloudinary: Global Upload Preset Empty ⚠️") @@ -90,7 +90,7 @@ export default class CloudinaryUploader extends Plugin { // upload files to cloudinary private uploadFiles = async (files: FileList, event, editor) => { - if(!this.validate()){ + if (!this.validate()) { return; } if (files.length > 0) { @@ -126,6 +126,7 @@ export default class CloudinaryUploader extends Plugin { method: 'POST', data: formData }) + // Get response public URL of uploaded image let url = objectPath.get(data, 'secure_url') @@ -225,7 +226,6 @@ export default class CloudinaryUploader extends Plugin { // Plugin load steps async onload(): Promise { - new Notice("Cloudinary plugin is loaded", 5000) await this.loadSettings(); // this.setupPasteHandler(); this.setupHandlers(); @@ -235,10 +235,10 @@ export default class CloudinaryUploader extends Plugin { // Plugin shutdown steps onunload(): void { - new Notice("Cloudinary plugin is unloaded", 5000) + this.statusBar?.remove(); } - // Load settings infromation + // Load settings information async loadSettings(): Promise { this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData()); }