From 4182018cb78c1b5f11058e61fef141db4f510003 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 11 Feb 2021 22:04:39 +0300 Subject: generated feed: use client dialog --- js/CommonDialogs.js | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 3 deletions(-) (limited to 'js/CommonDialogs.js') diff --git a/js/CommonDialogs.js b/js/CommonDialogs.js index 08a32de86..72c3653b3 100644 --- a/js/CommonDialogs.js +++ b/js/CommonDialogs.js @@ -370,7 +370,7 @@ const CommonDialogs = { dijit.byId("publicOPMLDlg").destroyRecursive(); const dialog = new dijit.Dialog({ - title: "Public OPML URL", + title: __("Public OPML URL"), id: 'publicOPMLDlg', style: "width: 600px", onCancel: function () { @@ -386,7 +386,7 @@ const CommonDialogs = {
${__("Your Public OPML URL is:")}
+ + ` + }); + + dialog.show(); + + Notify.close(); + + } catch (e) { + this.Error.report(e); + } + }); + }, + generatedFeed: function(feed, is_cat, rss_url) { + + Notify.progress("Loading, please wait...", true); + + xhrJson("backend.php", {op: "pref-feeds", method: "getFeedKey", id: feed, is_cat: is_cat}, (reply) => { + try { + if (dijit.byId("genFeedDlg")) + dijit.byId("genFeedDlg").destroyRecursive(); + + const feed_title = Feeds.getName(feed, is_cat); + + const secret_url = rss_url + "&key=" + encodeURIComponent(reply.link); + + const dialog = new dijit.Dialog({ + title: __("Show as feed"), + id: 'genFeedDlg', + style: "width: 600px", + onCancel: function () { + return true; + }, + onExecute: function () { + return true; + }, + onClose: function () { + return true; + }, + content: ` +
${__("%s can be accessed via the following secret URL:").replace("%s", feed_title)}
+
+ +
+ ` }); -- cgit v1.2.3-54-g00ecf