Skip to content

Commit

Permalink
Merge pull request #10767 from rtibbles/peer_to_peer
Browse files Browse the repository at this point in the history
Fixes for peer to peer import
  • Loading branch information
rtibbles authored Jun 5, 2023
2 parents 54927e4 + d5574ce commit 70842ee
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>

<ImmersivePage
:appBarTitle="toolbarTitle()"
:appBarTitle="toolbarTitle"
:route="backRoute"
>
<KPageContainer class="device-container">
Expand Down Expand Up @@ -265,6 +265,19 @@
return '';
}
},
toolbarTitle() {
switch (this.transferType) {
case TransferTypes.LOCALIMPORT:
return this.$tr('importFromDisk', { driveName: this.selectedDrive.name });
case TransferTypes.PEERIMPORT:
return this.$tr('importFromPeer', {
deviceName: this.selectedPeer.device_name || this.selectedPeer.nickname,
address: this.selectedPeer.base_url,
});
default:
return this.$tr('importFromKolibriStudio');
}
},
channelsAreLoading() {
return this.status === 'LOADING_CHANNELS_FROM_KOLIBRI_STUDIO';
},
Expand Down Expand Up @@ -299,19 +312,6 @@
}
},
methods: {
toolbarTitle(transferType) {
switch (transferType) {
case TransferTypes.LOCALIMPORT:
return this.$tr('importFromDisk', { driveName: this.selectedDrive.name });
case TransferTypes.PEERIMPORT:
return this.$tr('importFromPeer', {
deviceName: this.selectedPeer.device_name || this.selectedPeer.nickname,
address: this.selectedPeer.base_url,
});
default:
return this.$tr('importFromKolibriStudio');
}
},
channelIsOnDevice(channel) {
const match = this.installedChannelsWithResources.find(({ id }) => id === channel.id);
return Boolean(match);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function startImportTask(params) {

if (importSource.type === 'peer' || importSource.type === 'studio') {
if (importSource.id) {
taskParams.peer_id = importSource.id;
taskParams.peer = importSource.id;
}
taskParams.type = TaskTypes.REMOTECONTENTIMPORT;
} else if (importSource.type === 'drive') {
Expand Down

0 comments on commit 70842ee

Please sign in to comment.