Browse Source

improvements

master
Igor Zhukov 9 years ago
parent
commit
be56e6df41
  1. 2
      app/js/lib/config.js
  2. 9
      app/js/lib/schema.tl.txt
  3. 7
      app/js/services.js
  4. 8
      app/partials/desktop/full_gif.html

2
app/js/lib/config.js

File diff suppressed because one or more lines are too long

9
app/js/lib/schema.tl.txt

@ -58,7 +58,6 @@ inputVideoFileLocation#3d0364ec id:long access_hash:long = InputFileLocation;
inputEncryptedFileLocation#f5235d55 id:long access_hash:long = InputFileLocation; inputEncryptedFileLocation#f5235d55 id:long access_hash:long = InputFileLocation;
inputAudioFileLocation#74dc404d id:long access_hash:long = InputFileLocation; inputAudioFileLocation#74dc404d id:long access_hash:long = InputFileLocation;
inputDocumentFileLocation#4e45abe9 id:long access_hash:long = InputFileLocation; inputDocumentFileLocation#4e45abe9 id:long access_hash:long = InputFileLocation;
inputDocumentSubfileLocation#594d60dc id:long access_hash:long type:string = InputFileLocation;
inputPhotoCropAuto#ade6b004 = InputPhotoCrop; inputPhotoCropAuto#ade6b004 = InputPhotoCrop;
inputPhotoCrop#d9915325 crop_left:double crop_top:double crop_width:double = InputPhotoCrop; inputPhotoCrop#d9915325 crop_left:double crop_top:double crop_width:double = InputPhotoCrop;
@ -84,7 +83,7 @@ fileLocationUnavailable#7c596b46 volume_id:long local_id:int secret:long = FileL
fileLocation#53d69076 dc_id:int volume_id:long local_id:int secret:long = FileLocation; fileLocation#53d69076 dc_id:int volume_id:long local_id:int secret:long = FileLocation;
userEmpty#200250ba id:int = User; userEmpty#200250ba id:int = User;
user#22e49072 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true explicit_content:flags.18?true id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int = User; user#3289b590 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restiction_reason:flags.18?string = User;
userProfilePhotoEmpty#4f11bae1 = UserProfilePhoto; userProfilePhotoEmpty#4f11bae1 = UserProfilePhoto;
userProfilePhoto#d559d8c8 photo_id:long photo_small:FileLocation photo_big:FileLocation = UserProfilePhoto; userProfilePhoto#d559d8c8 photo_id:long photo_small:FileLocation photo_big:FileLocation = UserProfilePhoto;
@ -99,7 +98,7 @@ userStatusLastMonth#77ebc742 = UserStatus;
chatEmpty#9ba2d800 id:int = Chat; chatEmpty#9ba2d800 id:int = Chat;
chat#d91cdd54 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true admins_enabled:flags.3?true admin:flags.4?true deactivated:flags.5?true id:int title:string photo:ChatPhoto participants_count:int date:int version:int migrated_to:flags.6?InputChannel = Chat; chat#d91cdd54 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true admins_enabled:flags.3?true admin:flags.4?true deactivated:flags.5?true id:int title:string photo:ChatPhoto participants_count:int date:int version:int migrated_to:flags.6?InputChannel = Chat;
chatForbidden#7328bdb id:int title:string = Chat; chatForbidden#7328bdb id:int title:string = Chat;
channel#678e9587 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true editor:flags.3?true moderator:flags.4?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true explicit_content:flags.9?true id:int access_hash:long title:string username:flags.6?string photo:ChatPhoto date:int version:int = Chat; channel#e834ce68 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true editor:flags.3?true moderator:flags.4?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true id:int access_hash:long title:string username:flags.6?string photo:ChatPhoto date:int version:int restiction_reason:flags.9?string = Chat;
channelForbidden#2d85832c id:int access_hash:long title:string = Chat; channelForbidden#2d85832c id:int access_hash:long title:string = Chat;
chatFull#2e02a614 id:int participants:ChatParticipants chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:Vector<BotInfo> = ChatFull; chatFull#2e02a614 id:int participants:ChatParticipants chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:Vector<BotInfo> = ChatFull;
@ -398,7 +397,6 @@ documentAttributeSticker#3a556302 alt:string stickerset:InputStickerSet = Docume
documentAttributeVideo#5910cccb duration:int w:int h:int = DocumentAttribute; documentAttributeVideo#5910cccb duration:int w:int h:int = DocumentAttribute;
documentAttributeAudio#ded218e0 duration:int title:string performer:string = DocumentAttribute; documentAttributeAudio#ded218e0 duration:int title:string performer:string = DocumentAttribute;
documentAttributeFilename#15590068 file_name:string = DocumentAttribute; documentAttributeFilename#15590068 file_name:string = DocumentAttribute;
documentAttributeSubfile#4d711989 type:string mime_type:string size:int = DocumentAttribute;
messages.stickersNotModified#f1749a22 = messages.Stickers; messages.stickersNotModified#f1749a22 = messages.Stickers;
messages.stickers#8a8ecd32 hash:string stickers:Vector<Document> = messages.Stickers; messages.stickers#8a8ecd32 hash:string stickers:Vector<Document> = messages.Stickers;
@ -420,7 +418,7 @@ contactLinkContact#d502c2d0 = ContactLink;
webPageEmpty#eb1477e8 id:long = WebPage; webPageEmpty#eb1477e8 id:long = WebPage;
webPagePending#c586da1c id:long date:int = WebPage; webPagePending#c586da1c id:long date:int = WebPage;
webPage#ca820ed7 flags:# id:long url:string display_url:string type:flags.0?string site_name:flags.1?string title:flags.2?string description:flags.3?string photo:flags.4?Photo embed_url:flags.5?string embed_type:flags.5?string embed_width:flags.6?int embed_height:flags.6?int duration:flags.7?int author:flags.8?string document:flags.9?Document = WebPage; webPage#ca820ed7 flags:# id:long url:string display_url:string type:flags.0?string site_name:flags.1?string title:flags.2?string description:flags.3?string photo:flags.4?Photo embed_url:flags.5?string embed_type:flags.5?string embed_width:flags.6?int embed_height:flags.6?int duration:flags.7?int author:flags.8?string document:flags.9?Document = WebPage;
webPageExternal#25a4afd7 flags:# url:string display_url:string type:flags.0?string title:flags.1?string description:flags.2?string thumb_url:flags.3?string content_url:flags.4?string mp4_url:flags.5?string w:flags.6?int h:flags.6?int duration:flags.7?int = WebPage; webPageExternal#cf73f207 flags:# url:string display_url:string type:flags.0?string title:flags.1?string description:flags.2?string thumb_url:flags.3?string content_url:flags.4?string w:flags.5?int h:flags.5?int duration:flags.6?int = WebPage;
authorization#7bf2e6f6 hash:long flags:int device_model:string platform:string system_version:string api_id:int app_name:string app_version:string date_created:int date_active:int ip:string country:string region:string = Authorization; authorization#7bf2e6f6 hash:long flags:int device_model:string platform:string system_version:string api_id:int app_name:string app_version:string date_created:int date_active:int ip:string country:string region:string = Authorization;
@ -638,6 +636,7 @@ messages.editChatAdmin#a9e69f2e chat_id:int user_id:InputUser is_admin:Bool = Bo
messages.migrateChat#15a3b8e3 chat_id:int = Updates; messages.migrateChat#15a3b8e3 chat_id:int = Updates;
messages.searchGlobal#9e3cacb0 q:string offset_date:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages; messages.searchGlobal#9e3cacb0 q:string offset_date:int offset_peer:InputPeer offset_id:int limit:int = messages.Messages;
messages.reorderStickerSets#9fcfbc30 order:Vector<long> = Bool; messages.reorderStickerSets#9fcfbc30 order:Vector<long> = Bool;
messages.getDocumentByHash#338e2464 sha256:bytes size:int mime_type:string = Document;
messages.searchGifs#bf9a776b q:string offset:int = messages.FoundGifs; messages.searchGifs#bf9a776b q:string offset:int = messages.FoundGifs;
updates.getState#edd4882a = updates.State; updates.getState#edd4882a = updates.State;

7
app/js/services.js

@ -1932,6 +1932,8 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
break; break;
case 'documentAttributeVideo': case 'documentAttributeVideo':
apiDoc.duration = attribute.duration; apiDoc.duration = attribute.duration;
apiDoc.w = attribute.w;
apiDoc.h = attribute.h;
break; break;
case 'documentAttributeSticker': case 'documentAttributeSticker':
apiDoc.sticker = 1; apiDoc.sticker = 1;
@ -1953,6 +1955,9 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
apiDoc.w = attribute.w; apiDoc.w = attribute.w;
apiDoc.h = attribute.h; apiDoc.h = attribute.h;
break; break;
case 'documentAttributeAnimated':
apiDoc.animated = true;
break;
} }
}); });
apiDoc.file_name = apiDoc.file_name || ''; apiDoc.file_name = apiDoc.file_name || '';
@ -1972,7 +1977,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
} }
var doc = angular.copy(docs[docID]), var doc = angular.copy(docs[docID]),
isGif = doc.mime_type == 'image/gif', isGif = doc.mime_type == 'image/gif' || doc.animated && doc.mime_type == 'video/mp4',
isSticker = doc.mime_type == 'image/webp' && doc.sticker, isSticker = doc.mime_type == 'image/webp' && doc.sticker,
thumbPhotoSize = doc.thumb, thumbPhotoSize = doc.thumb,
width, height, thumb, dim; width, height, thumb, dim;

8
app/partials/desktop/full_gif.html

@ -2,11 +2,11 @@
<div class="img_gif_image_wrap"> <div class="img_gif_image_wrap">
<div ng-if="document.videoUrl || document.url" ng-show="document.downloaded &amp;&amp; isActive" ng-switch="document.videoSubfile"> <div ng-if="document.url" ng-show="document.downloaded &amp;&amp; isActive" ng-switch="document.mime_type == 'video/mp4'">
<video ng-switch-when="true" width="{{video.full.width}}" height="{{video.full.height}}" loop autoplay class="img_gif_video"> <video ng-switch-when="true" width="{{document.thumb.width}}" height="{{document.thumb.height}}" loop autoplay class="img_gif_video">
<source ng-src="{{document.videoUrl}}" type="video/mp4"> <source ng-src="{{document.url}}" type="video/mp4">
</video> </video>
<img ng-switch-default class="img_gif_image" ng-src="{{document.url}}" /> <img ng-switch-default class="img_gif_image" ng-src="{{document.url}}" width="{{document.thumb.width}}" height="{{document.thumb.height}}" />
</div> </div>
<img ng-hide="document.downloaded &amp;&amp; isActive" class="img_gif_thumb" my-load-thumb thumb="document.thumb" /> <img ng-hide="document.downloaded &amp;&amp; isActive" class="img_gif_thumb" my-load-thumb thumb="document.thumb" />

Loading…
Cancel
Save