Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for peer to peer import #10767

Merged
merged 2 commits into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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