Skip to content

Commit

Permalink
Merge pull request #29 from beclab/feat/search
Browse files Browse the repository at this point in the history
fix: update open url
  • Loading branch information
wushuangs authored Aug 9, 2024
2 parents b0ae473 + 511ee26 commit b39c267
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions packages/frontend/src/pages/Search/TextSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,26 +235,30 @@ const keydownEnter = (event: any) => {
};
const open = (item: any) => {
console.log('itemitem', item);
if (props.item?.name === 'Drive') {
const url = '/Files' + item.path;
const filesApp = props.commandList?.find(
(el: { appid: string }) => el.appid && el.appid === 'files'
);
filesApp.url = filesApp.url + url;
window.open(filesApp.url);
const openUrl = filesApp.url.startsWith('https')
? filesApp.url
: 'https://' + filesApp.url;
window.open(openUrl);
} else if (props.item?.name === 'Wise') {
const filesApp = props.commandList?.find(
(el: { appid: string }) => el.appid && el.appid === 'wise'
);
console.log('filesAppfilesApp', filesApp);
filesApp.url =
filesApp.url + '/' + item.meta.file_type + '/' + item.meta.id;
window.open(filesApp.url);
const openUrl = filesApp.url.startsWith('https')
? filesApp.url
: 'https://' + filesApp.url;
window.open(openUrl);
}
// emits('openCommand', resource_uri);
Expand Down

0 comments on commit b39c267

Please sign in to comment.