diff --git a/src/App.vue b/src/App.vue
index e781206..05eedbb 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,16 +1,14 @@
-
-
-
-
-
-
-
- Privacy Policy
- Terms of Service
-
-
-
+
+
+
+
+
+
+ Privacy Policy
+ Terms of Service
+
+
\ No newline at end of file
diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue
index cbf51ab..b98eb65 100644
--- a/src/components/NavBar.vue
+++ b/src/components/NavBar.vue
@@ -1,29 +1,60 @@
+
Bellingcat Auto Archiver demo
- Sign In
+
+
+
+
+ ERROR: {{ $store.state.errorMessage }}
+
-
+
active
-
+
inactive
- {{ user.email }}
- {{ activeUserMessage }}
+ {{ user.email }}
+ {{ activeUserMessage }}
- Sign Out
+
+ Sign In
+
+
+
+
+
+
+
+ URL
+
+
+ Sheet
+
+
+ Sign Out
+
+
+
+
\ No newline at end of file
diff --git a/src/main.js b/src/main.js
index 76e9853..64ca840 100644
--- a/src/main.js
+++ b/src/main.js
@@ -2,6 +2,7 @@ import { createApp } from "vue";
import { createVuetify } from "vuetify";
import * as components from 'vuetify/components';
import * as directives from 'vuetify/directives';
+import { VDateInput } from 'vuetify/labs/VDateInput';
import App from "./App.vue";
import router from "./router";
import store from "./store";
@@ -10,7 +11,7 @@ import "@mdi/font/css/materialdesignicons.css";
import "./styles/global.css";
const vuetify = createVuetify({
- components,
+ components: { ...components, VDateInput, },
directives,
});
diff --git a/src/router/index.js b/src/router/index.js
index 0d6b6b3..1f8a8f9 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1,6 +1,7 @@
import { createRouter, createWebHistory } from 'vue-router';
import HomeView from '../views/HomeView.vue';
import SheetView from '../views/SheetView.vue';
+import UrlView from '../views/UrlView.vue';
const routes = [
{
@@ -10,9 +11,14 @@ const routes = [
},
{
path: '/sheets',
- name: 'sheets',
+ name: 'Google Sheets Archiving',
component: SheetView,
},
+ {
+ path: '/urls',
+ name: 'URL Archiving',
+ component: UrlView,
+ },
{
path: '/privacy',
name: 'Privacy Policy',
diff --git a/src/store/index.js b/src/store/index.js
index 26afc2c..a6c7ed7 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -430,6 +430,7 @@ export default createStore({
if (!state.access_token) return true;
try {
const response = await fetch(`https://oauth2.googleapis.com/tokeninfo?access_token=${state.access_token}`);
+ if (response.status !== 200) return true;
const data = await response.json();
if (data.expires_in > 0) return false;
} catch (error) {
diff --git a/src/styles/global.css b/src/styles/global.css
index 4d1bb9b..1213724 100644
--- a/src/styles/global.css
+++ b/src/styles/global.css
@@ -1,3 +1,13 @@
html {
overflow-y: auto;
+}
+
+a {
+ color: #1a73e8;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #0c47a1;
+ text-decoration: underline;
}
\ No newline at end of file
diff --git a/src/utils/misc.js b/src/utils/misc.js
new file mode 100644
index 0000000..c10c11d
--- /dev/null
+++ b/src/utils/misc.js
@@ -0,0 +1,19 @@
+
+
+export function urlValidator(url) {
+ if (!url) return true;
+ if (url.length < 10) return "URL is too short";
+ try {
+ new URL(url);
+ return true;
+ } catch (_) {
+ return "Not a valid URL";
+ }
+}
+
+export function getUrlFromResult(item) {
+ const final_media = item.result?.media?.filter(m => m?.properties?.id == '_final_media');
+ if (final_media && final_media.length > 0) {
+ return final_media[0].urls;
+ }
+};
\ No newline at end of file
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
index aafd69c..6c68542 100644
--- a/src/views/HomeView.vue
+++ b/src/views/HomeView.vue
@@ -1,14 +1,14 @@
-
+
-
+
This is a prototype demo service provided on a
best-effort basis.
Do not use for mission critical or sensitive
data.
-
- To use this tool you need a Google account and permission from the Bellingcat team.
+
+ To use this tool you need a Google account and permission from the Bellingcat team.
You can do so HERE: TODO.
@@ -20,9 +20,9 @@
This tool can be used to archive digital content via single URLs or
Google sheets.
-
+
To use this tool you need a Google account and permission from the Bellingcat team.
-
+
This tool uses Bellingcat's Auto Archiver to
archive online content. For more information about the Auto Archiver see
@@ -33,40 +33,24 @@
-
+
diff --git a/src/views/SheetView.vue b/src/views/SheetView.vue
index 2f0ffe0..ddb98d7 100644
--- a/src/views/SheetView.vue
+++ b/src/views/SheetView.vue
@@ -1,5 +1,5 @@
-
+
@@ -132,15 +132,7 @@
if it is not
- {{ $store.state.errorMessage }}
+
+
+
+
+
+
+ Search archives by URL
+ TODO: toggle between all/and my latest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Search
+
+
+
+
+
+
+
+ {{ snackbarMessage }}
+
+
+ Close
+
+
+
+
+
+ {{ item.result?.status
+ }}
+
+
+ {{ item.url }}
+
+
+
+
+
+ {{ ((item?.result?.metadata?.total_bytes || 0) / (1024 * 1024)).toFixed(2) }}
+
+
+ {{ item?.result?.media?.length }}
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+ {{ media?.properties?.id }}
+
+
+
+
+ {{ media?.properties?.hash }}
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+