mirror of
https://github.com/bellingcat/auto-archiver-extension.git
synced 2026-06-08 03:28:34 +03:00
0.0.4
This commit is contained in:
@@ -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.`;
|
||||
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
@@ -42,7 +42,7 @@
|
||||
<small>
|
||||
<span v-if="login">Hello {{ login }}!</span>
|
||||
<span class="right"><a href="https://github.com/bellingcat/auto-archiver-extension/issues" target="_blank">Issue
|
||||
tracker</a></span>
|
||||
tracker</a> version {{ version }}</span>
|
||||
</small>
|
||||
</template>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user