mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-20 09:20:16 +00:00
Public gallery improvements (#409)
- [x] Don't show extension in name field for publish - [x] Open "Your published work" tab after publishing - [x] Continue showing dialog for Report Abuse status - [x] For showing COC in Public Gallery tab show backdrop of thumbnails - [x] Liked -> My Favorites & Your published work -> My published work
This commit is contained in:
@@ -11,6 +11,7 @@ interface GalleryTabOptions extends ViewModels.TabOptions {
|
||||
account: DatabaseAccount;
|
||||
container: Explorer;
|
||||
junoClient: JunoClient;
|
||||
selectedTab: GalleryViewerTab;
|
||||
notebookUrl?: string;
|
||||
galleryItem?: IGalleryItem;
|
||||
isFavorite?: boolean;
|
||||
@@ -21,24 +22,42 @@ interface GalleryTabOptions extends ViewModels.TabOptions {
|
||||
*/
|
||||
export default class GalleryTab extends TabsBase {
|
||||
private container: Explorer;
|
||||
private galleryAndNotebookViewerComponentProps: GalleryAndNotebookViewerComponentProps;
|
||||
public galleryAndNotebookViewerComponentAdapter: GalleryAndNotebookViewerComponentAdapter;
|
||||
|
||||
constructor(options: GalleryTabOptions) {
|
||||
super(options);
|
||||
|
||||
this.container = options.container;
|
||||
const props: GalleryAndNotebookViewerComponentProps = {
|
||||
|
||||
this.galleryAndNotebookViewerComponentProps = {
|
||||
container: options.container,
|
||||
junoClient: options.junoClient,
|
||||
notebookUrl: options.notebookUrl,
|
||||
galleryItem: options.galleryItem,
|
||||
isFavorite: options.isFavorite,
|
||||
selectedTab: GalleryViewerTab.OfficialSamples,
|
||||
selectedTab: options.selectedTab,
|
||||
sortBy: SortBy.MostViewed,
|
||||
searchText: undefined,
|
||||
};
|
||||
this.galleryAndNotebookViewerComponentAdapter = new GalleryAndNotebookViewerComponentAdapter(
|
||||
this.galleryAndNotebookViewerComponentProps
|
||||
);
|
||||
}
|
||||
|
||||
this.galleryAndNotebookViewerComponentAdapter = new GalleryAndNotebookViewerComponentAdapter(props);
|
||||
public reset(options: GalleryTabOptions) {
|
||||
this.container = options.container;
|
||||
|
||||
this.galleryAndNotebookViewerComponentProps.container = options.container;
|
||||
this.galleryAndNotebookViewerComponentProps.junoClient = options.junoClient;
|
||||
this.galleryAndNotebookViewerComponentProps.notebookUrl = options.notebookUrl;
|
||||
this.galleryAndNotebookViewerComponentProps.galleryItem = options.galleryItem;
|
||||
this.galleryAndNotebookViewerComponentProps.isFavorite = options.isFavorite;
|
||||
this.galleryAndNotebookViewerComponentProps.selectedTab = options.selectedTab;
|
||||
this.galleryAndNotebookViewerComponentProps.sortBy = SortBy.MostViewed;
|
||||
this.galleryAndNotebookViewerComponentProps.searchText = undefined;
|
||||
|
||||
this.galleryAndNotebookViewerComponentAdapter.reset();
|
||||
this.galleryAndNotebookViewerComponentAdapter.triggerRender();
|
||||
}
|
||||
|
||||
protected getContainer(): Explorer {
|
||||
|
||||
Reference in New Issue
Block a user