Browse Source

Media viewer fixes:

Button menu styles
Download avatar
master
morethanwords 4 years ago
parent
commit
092869e6bd
  1. 6
      src/components/appMediaViewer.ts
  2. 2
      src/components/buttonMenuToggle.ts
  3. 2
      src/scss/partials/_mediaViewer.scss

6
src/components/appMediaViewer.ts

@ -1092,7 +1092,7 @@ export default class AppMediaViewer extends AppMediaViewerBase<'caption', 'delet @@ -1092,7 +1092,7 @@ export default class AppMediaViewer extends AppMediaViewerBase<'caption', 'delet
text: 'Download',
onClick: this.onDownloadClick
}, {
icon: 'delete',
icon: 'delete danger btn-disabled',
text: 'Delete',
onClick: () => {}
}]);
@ -1297,7 +1297,7 @@ export class AppMediaViewerAvatar extends AppMediaViewerBase<'', 'delete', AppMe @@ -1297,7 +1297,7 @@ export class AppMediaViewerAvatar extends AppMediaViewerBase<'', 'delete', AppMe
text: 'Download',
onClick: this.onDownloadClick
}, {
icon: 'delete',
icon: 'delete danger btn-disabled',
text: 'Delete',
onClick: () => {}
}]);
@ -1318,7 +1318,7 @@ export class AppMediaViewerAvatar extends AppMediaViewerBase<'', 'delete', AppMe @@ -1318,7 +1318,7 @@ export class AppMediaViewerAvatar extends AppMediaViewerBase<'', 'delete', AppMe
};
onDownloadClick = (e: MouseEvent) => {
appPhotosManager.savePhotoFile(appPhotosManager.getPhoto(this.currentPhotoID));
};
protected loadMoreMedia = (older = true) => {

2
src/components/buttonMenuToggle.ts

@ -3,7 +3,7 @@ import ButtonMenu, { ButtonMenuItemOptions } from "./buttonMenu"; @@ -3,7 +3,7 @@ import ButtonMenu, { ButtonMenuItemOptions } from "./buttonMenu";
import { openBtnMenu } from "./misc";
const ButtonMenuToggle = (options: Partial<{noRipple: true, onlyMobile: true}> = {}, direction: 'bottom-left', buttons: ButtonMenuItemOptions[]) => {
const button = ButtonIcon('more', options);
const button = ButtonIcon('more btn-menu-toggle', options);
const btnMenu = ButtonMenu(buttons);
btnMenu.classList.add(direction);
ButtonMenuToggleHandler(button);

2
src/scss/partials/_mediaViewer.scss

@ -365,7 +365,7 @@ $move-duration: .35s; @@ -365,7 +365,7 @@ $move-duration: .35s;
}
@include respond-to(handhelds) {
.menu-mobile-close {
.tgico-close.only-handhelds {
left: 20px;
}

Loading…
Cancel
Save