Styleguide: Incoming/outgoing attachments of all types

This commit is contained in:
Scott Nonnenberg 2018-04-05 09:19:00 -07:00
parent 1206b3c448
commit 3a76c3c86e
No known key found for this signature in database
GPG key ID: 5F82280C35134661
7 changed files with 212 additions and 3 deletions

View file

@ -10,12 +10,33 @@
window.PROTO_ROOT = '/protos';
window.nodeSetImmediate = () => {};
window.libphonenumber = {
parse: number => ({
e164: number,
isValidNumber: true,
getCountryCode: () => '1',
getNationalNumber: () => number,
}),
isValidNumber: () => true,
getRegionCodeForNumber: () => '1',
format: number => number.e164,
PhoneNumberFormat: {},
};
window.Signal = {};
window.Signal.Backup = {};
window.Signal.Crypto = {};
window.Signal.Logs = {};
window.Signal.Migrations = {
getPlaceholderMigrations: () => {},
getPlaceholderMigrations: () => [{
migrate: (transaction, next) => {
console.log('migration version 1');
transaction.db.createObjectStore('conversations');
next();
},
version: 1
}],
loadAttachmentData: attachment => Promise.resolve(attachment),
};
window.Signal.Components = {};

View file

@ -49,4 +49,13 @@ window.Whisper.View.Templates = {
expirationTimerUpdate: `
<span class='content'><span class='icon clock'></span> {{ content }}</span>
`,
'file-view': `
<div class='icon {{ mediaType }}'></div>
<div class='text'>
<div class='fileName' title='{{ altText }}'>
{{ fileName }}
</div>
<div class='fileSize'>{{ fileSize }}</div>
</div>
`,
};