From 574149db00e9d3bb2ee5ecff1e59fff3a58d5109 Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Mon, 27 Feb 2023 09:50:18 +0100 Subject: [PATCH] 0.0.4 --- source/js/background.js | 4 ++-- source/manifest.json | 5 +++-- source/vue/Popup.vue | 11 +++++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/source/js/background.js b/source/js/background.js index af4f4d6..c98c1a0 100644 --- a/source/js/background.js +++ b/source/js/background.js @@ -4,8 +4,8 @@ import optionsStorage from './options-storage.js'; import { getReasonPhrase } from 'http-status-codes'; // TODO: stable ID https://developer.chrome.com/docs/extensions/mv3/tut_oauth/ -const API_ENDPOINT = 'http://localhost:8004/tasks' -// const API_ENDPOINT = 'http://134.122.58.133:8004/tasks'; +// const API_ENDPOINT = 'http://localhost:8004/tasks' +const API_ENDPOINT = 'http://134.122.58.133:8004/tasks'; const LOGIN_FAILED = `Could not login, make sure your google account email has been granted access by the developers.`; diff --git a/source/manifest.json b/source/manifest.json index 9c23f9a..bd14f70 100644 --- a/source/manifest.json +++ b/source/manifest.json @@ -1,6 +1,6 @@ { "name": "Auto-archiver extension", - "version": "0.0.2", + "version": "0.0.4", "description": "A gateway to effective archiving of online content, including behind private platforms. ", "homepage_url": "https://github.com/bellingcat/auto-archiver-extension", "manifest_version": 3, @@ -34,5 +34,6 @@ "oauth2": { "client_id": "572076445849-4cb2a8be1nfi46l80jm741k56s7cjkd0.apps.googleusercontent.com", "scopes": ["https://www.googleapis.com/auth/userinfo.email"] - } + }, + "key":"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlKYc35vN+NAqABtFbBU60XoTzAQynotX2H/kF14m/czN91kI6QIqQTD5JzAfyab4GgWS60eaQM6ieCc3XeQlhfUdBXUtndQN0HYdqyseTojHkcmQul8esbo1hztgNnuNW12wJ5wwJqjzYcXHjeRCwmWA0Ohld1Xh+HAwAWDpRfcWCB8S06G79SvVvk4C8WvpVYvO5MX6twBGZy/FpsFI+RodgHPK4doefo9iYRoeR47Zw20EYG+W4z8ehWR2xlpf56yq4IlsVVL78RSYqwwG4vLggXWb1MaSvnwjyVpGlcLZMoRfBgmzQrltbNCPZWS/QQ8SHk90s1kkuoiCHUgMlQIDAQAB" } \ No newline at end of file diff --git a/source/vue/Popup.vue b/source/vue/Popup.vue index e7d067f..d1156bd 100644 --- a/source/vue/Popup.vue +++ b/source/vue/Popup.vue @@ -42,7 +42,7 @@ Hello {{ login }}! Issue - tracker + tracker version {{ version }} @@ -58,7 +58,8 @@ export default { onlineTasks: [], isSearchingOnline: false, search: '', - errorMessage: '' + errorMessage: '', + version: chrome.runtime.getManifest().version }; }, methods: { @@ -160,7 +161,9 @@ export default { this.isSearchingOnline = true; { const onlineTasks = await this.callBackground({ action: "search", query: this.search }); if (!onlineTasks) return; - this.onlineTasks = (onlineTasks || []).filter(id => !Object.keys(this.tasks).includes(id)) + console.log(onlineTasks) + console.log(this.tasks) + this.onlineTasks = (onlineTasks || []).filter(task => !Object.keys(this.tasks).includes(task.id)) } this.isSearchingOnline = false; })(); @@ -189,7 +192,7 @@ export default { .sort((t1, t2) => (t1?.result?._processed_at || 0) - (t2?.result?._processed_at || 0)).slice(0, 25) }, noSearchResults() { - return this.search.length > 3 && !this.isSearchingOnline && Object.keys(this.onlineTasks).length == 0; + return this.search.length > 3 && !this.isSearchingOnline && Object.keys(this.onlineTasks).length == 0 && Object.keys(this.displayTasks).length == 0; }, localTasksShownLength() { return Object.keys(this.displayTasks).length > 0;