Skip to content

Commit

Permalink
remove ipfs provider
Browse files Browse the repository at this point in the history
  • Loading branch information
vol4tim committed Oct 4, 2023
1 parent 3b1f96d commit c228722
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 275 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"leaflet.tilelayer.colorfilter": "^1.2.5",
"libp2p": "^0.46.11",
"moment": "^2.29.4",
"multiaddr": "^10.0.1",
"pinia": "^2.0.23",
"socket.io-client": "^2.3.0",
"vue": "^3.2.38",
Expand Down
6 changes: 3 additions & 3 deletions src/components/footer/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
type="date"
v-model="start"
:max="maxDate"
:disabled="currentProvider == 'ipfs'"
:disabled="currentProvider == 'realtime'"
/>
<Switcher
id="realtime"
Expand Down Expand Up @@ -88,7 +88,7 @@ export default {
isActive: false,
isActiveMenu: false,
realtime: this.currentProvider === "ipfs",
realtime: this.currentProvider === "realtime",
wind: false,
messages: config.SHOW_MESSAGES,
start: moment().format("YYYY-MM-DD"),
Expand All @@ -112,7 +112,7 @@ export default {
await this.$router.push({
name: "main",
params: {
provider: v ? "ipfs" : "remote",
provider: v ? "realtime" : "remote",
type: this.$route.params.type,
zoom: this.$route.params.zoom,
lat: this.$route.params.lat,
Expand Down
2 changes: 1 addition & 1 deletion src/components/measures/Measures.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default {
await this.$router.push({
name: "main",
params: {
provider: this.$route.params.provider || "ipfs",
provider: this.$route.params.provider || "realtime",
type: this.type,
zoom: this.$route.params.zoom,
lat: this.$route.params.lat,
Expand Down
30 changes: 0 additions & 30 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,6 @@ export default {
"/dns4/3.pubsub.aira.life/tcp/443/wss/ipfs/QmWZSKTEQQ985mnNzMqhGCrwQ1aTA6sxVsorsycQz9cQrw",
],
},
IPFS: {
fallback: {
repo: "ipfs/robonomics/5",
config: {
Addresses: {
Swarm: [
"/dns4/1.webrtcstar.aira.life/tcp/443/wss/p2p-webrtc-star/",
"/dns4/2.webrtcstar.aira.life/tcp/443/wss/p2p-webrtc-star/",
"/dns4/3.webrtcstar.aira.life/tcp/443/wss/p2p-webrtc-star/",
],
},
Bootstrap: [
"/dns4/1.pubsub.aira.life/tcp/443/wss/ipfs/QmdfQmbmXt6sqjZyowxPUsmvBsgSGQjm4VXrV7WGy62dv8",
"/dns4/2.pubsub.aira.life/tcp/443/wss/ipfs/QmPTFt7GJ2MfDuVYwJJTULr6EnsQtGVp8ahYn9NSyoxmd9",
"/dns4/3.pubsub.aira.life/tcp/443/wss/ipfs/QmWZSKTEQQ985mnNzMqhGCrwQ1aTA6sxVsorsycQz9cQrw",
],
},
},
cdn: "https://cdn.jsdelivr.net/npm/ipfs@0.61.0/index.min.js",
permission: [
"id",
"files.cat",
"files.add",
"pubsub.peers",
"pubsub.publish",
"pubsub.subscribe",
"swarm.peers",
"swarm.connect",
],
},
REMOTE_PROVIDER: "https://roseman.airalab.org/",
// REMOTE_PROVIDER: "http://localhost:3000/",
WIND_PROVIDER: "https://wind.airalab.org/latest",
Expand Down
33 changes: 5 additions & 28 deletions src/config.template.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,9 @@
export default {
IPFS: {
fallback: {
repo: "ipfs/robonomics/5",
config: {
Addresses: {
Swarm: [
"/dns4/1.webrtcstar.aira.life/tcp/443/wss/p2p-webrtc-star/",
"/dns4/2.webrtcstar.aira.life/tcp/443/wss/p2p-webrtc-star/",
"/dns4/3.webrtcstar.aira.life/tcp/443/wss/p2p-webrtc-star/",
],
},
Bootstrap: [
"/dns4/1.pubsub.aira.life/tcp/443/wss/ipfs/QmdfQmbmXt6sqjZyowxPUsmvBsgSGQjm4VXrV7WGy62dv8",
"/dns4/2.pubsub.aira.life/tcp/443/wss/ipfs/QmPTFt7GJ2MfDuVYwJJTULr6EnsQtGVp8ahYn9NSyoxmd9",
"/dns4/3.pubsub.aira.life/tcp/443/wss/ipfs/QmWZSKTEQQ985mnNzMqhGCrwQ1aTA6sxVsorsycQz9cQrw",
],
},
},
cdn: "https://cdn.jsdelivr.net/npm/ipfs@0.61.0/index.min.js",
permission: [
"id",
"files.cat",
"files.add",
"pubsub.peers",
"pubsub.publish",
"pubsub.subscribe",
"swarm.peers",
"swarm.connect",
LIBP2P: {
bootstrappers: [
"/dns4/1.pubsub.aira.life/tcp/443/wss/ipfs/QmdfQmbmXt6sqjZyowxPUsmvBsgSGQjm4VXrV7WGy62dv8",
"/dns4/2.pubsub.aira.life/tcp/443/wss/ipfs/QmPTFt7GJ2MfDuVYwJJTULr6EnsQtGVp8ahYn9NSyoxmd9",
"/dns4/3.pubsub.aira.life/tcp/443/wss/ipfs/QmWZSKTEQQ985mnNzMqhGCrwQ1aTA6sxVsorsycQz9cQrw",
],
},
REMOTE_PROVIDER: "",
Expand Down
1 change: 0 additions & 1 deletion src/providers/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { default as Ipfs } from "./ipfs";
export { default as Libp2p } from "./libp2p";
export { default as Remote } from "./remote";
128 changes: 0 additions & 128 deletions src/providers/ipfs.js

This file was deleted.

80 changes: 0 additions & 80 deletions src/utils/ipfs.js

This file was deleted.

7 changes: 4 additions & 3 deletions src/views/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
:zoom="zoom"
:lat="lat"
:lng="lng"
:availableWind="provider === 'ipfs'"
:availableWind="provider === 'realtime'"
@clickMarker="handlerClick"
@city="handlerChangeCity"
/>
Expand Down Expand Up @@ -124,15 +124,16 @@ export default {
},
computed: {
isLoader() {
return this.provider === "ipfs" && Object.keys(this.points).length === 0;
return (
this.provider === "realtime" && Object.keys(this.points).length === 0
);
},
},
mounted() {
if (this.provider === "remote") {
this.providerObj = new providers.Remote(config.REMOTE_PROVIDER);
} else {
this.providerObj = new providers.Libp2p(config.LIBP2P);
// this.providerObj = new providers.Ipfs(config.IPFS);
}
this.providerObj.ready().then(() => {
this.providerReady = true;
Expand Down

0 comments on commit c228722

Please sign in to comment.