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

N21-1918 External Tool Thumbnails #3339

Merged
merged 6 commits into from
Jul 29, 2024
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
Expand Up @@ -9,6 +9,8 @@ export type ExternalToolDisplayData = {

logoUrl?: string;

thumbnailUrl?: string;

openInNewTab: boolean;

status: ContextExternalToolConfigurationStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ useErrorNotification(launchError);
const displayData: ComputedRef<MediaElementDisplay> = computed(() => ({
title: props.element.name,
description: props.element.description,
thumbnail: props.element?.logoUrl,
thumbnail: props.element.thumbnailUrl || props.element.logoUrl,
}));

const loadAvailableLineElementData = async (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const elementDisplayData: Ref<MediaElementDisplay | undefined> = computed(() =>
? {
title: displayData.value.name,
description: displayData.value.description,
thumbnail: displayData.value.logoUrl,
thumbnail: displayData.value.thumbnailUrl || displayData.value.logoUrl,
}
: undefined
);
Expand Down
30 changes: 30 additions & 0 deletions src/serverApi/v3/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2547,6 +2547,12 @@ export interface ExternalToolCreateParams {
* @memberof ExternalToolCreateParams
*/
logoUrl?: string;
/**
* URL of the thumbnail of the external tool
* @type {string}
* @memberof ExternalToolCreateParams
*/
thumbnailUrl?: string;
/**
* Configuration of the external tool
* @type {BasicToolConfigParams | Lti11ToolConfigCreateParams | Oauth2ToolConfigCreateParams}
Expand Down Expand Up @@ -2758,6 +2764,12 @@ export interface ExternalToolResponse {
* @memberof ExternalToolResponse
*/
logoUrl?: string;
/**
* URL of the thumbnail of the external tool
* @type {string}
* @memberof ExternalToolResponse
*/
thumbnailUrl?: string;
/**
* Configuration of the external tool
* @type {BasicToolConfigParams | Lti11ToolConfigCreateParams | Oauth2ToolConfigCreateParams}
Expand Down Expand Up @@ -2868,6 +2880,12 @@ export interface ExternalToolUpdateParams {
* @memberof ExternalToolUpdateParams
*/
logoUrl?: string;
/**
* URL of the thumbnail of the external tool
* @type {string}
* @memberof ExternalToolUpdateParams
*/
thumbnailUrl?: string;
/**
* Configuration of the external tool
* @type {BasicToolConfigParams | Lti11ToolConfigUpdateParams | Oauth2ToolConfigUpdateParams}
Expand Down Expand Up @@ -4183,6 +4201,12 @@ export interface MediaAvailableLineElementResponse {
* @memberof MediaAvailableLineElementResponse
*/
logoUrl?: string;
/**
* Thumbnail url of the media available line element
* @type {string}
* @memberof MediaAvailableLineElementResponse
*/
thumbnailUrl?: string;
}
/**
*
Expand Down Expand Up @@ -7627,6 +7651,12 @@ export interface ToolReferenceResponse {
* @memberof ToolReferenceResponse
*/
logoUrl?: string;
/**
* The url of the thumbnail which is stored in the db
* @type {string}
* @memberof ToolReferenceResponse
*/
thumbnailUrl?: string;
/**
* The display name of the tool
* @type {string}
Expand Down
1 change: 1 addition & 0 deletions src/store/external-tool/mapper/external-tool.mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export class ExternalToolMapper {
response.status
),
logoUrl: response.logoUrl,
thumbnailUrl: response.thumbnailUrl,
openInNewTab: response.openInNewTab,
};

Expand Down
Loading