', i)) {
+ // avoid emojifying on invisible text
+ invisible = 1;
+ tagChars = tagCharsWithoutEmojis;
+ }
+ }
+ }
+ i = rend;
+ } else { // matched to unicode emoji
+ const { filename, shortCode } = unicodeMapping[match];
+ const title = shortCode ? `:${shortCode}:` : '';
+ replacement = ``;
+ rend = i + match.length;
+ }
+ rtn += str.slice(0, i) + replacement;
+ str = str.slice(rend);
+ }
+ return rtn + str;
+};
+
+export default emojify;
+
+export const buildCustomEmojis = (customEmojis) => {
+ const emojis = [];
+
+ customEmojis.forEach(emoji => {
+ const shortcode = emoji.get('shortcode');
+ const url = autoPlayGif ? emoji.get('url') : emoji.get('static_url');
+ const name = shortcode.replace(':', '');
+
+ emojis.push({
+ id: name,
+ name,
+ short_names: [name],
+ text: '',
+ emoticons: [],
+ keywords: [name],
+ imageUrl: url,
+ custom: true,
+ });
+ });
+
+ return emojis;
+};
diff --git a/app/javascript/mastodon/features/emoji/emoji_compressed.js b/app/javascript/mastodon/features/emoji/emoji_compressed.js
new file mode 100644
index 0000000000..e5b834a74e
--- /dev/null
+++ b/app/javascript/mastodon/features/emoji/emoji_compressed.js
@@ -0,0 +1,93 @@
+// @preval
+// http://www.unicode.org/Public/emoji/5.0/emoji-test.txt
+// This file contains the compressed version of the emoji data from
+// both emoji_map.json and from emoji-mart's emojiIndex and data objects.
+// It's designed to be emitted in an array format to take up less space
+// over the wire.
+
+const { unicodeToFilename } = require('./unicode_to_filename');
+const { unicodeToUnifiedName } = require('./unicode_to_unified_name');
+const emojiMap = require('./emoji_map.json');
+const { emojiIndex } = require('emoji-mart');
+const { default: emojiMartData } = require('emoji-mart/dist/data');
+
+const excluded = ['®', '©', '™'];
+const skins = ['🏻', '🏼', '🏽', '🏾', '🏿'];
+const shortcodeMap = {};
+
+const shortCodesToEmojiData = {};
+const emojisWithoutShortCodes = [];
+
+Object.keys(emojiIndex.emojis).forEach(key => {
+ shortcodeMap[emojiIndex.emojis[key].native] = emojiIndex.emojis[key].id;
+});
+
+const stripModifiers = unicode => {
+ skins.forEach(tone => {
+ unicode = unicode.replace(tone, '');
+ });
+
+ return unicode;
+};
+
+Object.keys(emojiMap).forEach(key => {
+ if (excluded.includes(key)) {
+ delete emojiMap[key];
+ return;
+ }
+
+ const normalizedKey = stripModifiers(key);
+ let shortcode = shortcodeMap[normalizedKey];
+
+ if (!shortcode) {
+ shortcode = shortcodeMap[normalizedKey + '\uFE0F'];
+ }
+
+ const filename = emojiMap[key];
+
+ const filenameData = [key];
+
+ if (unicodeToFilename(key) !== filename) {
+ // filename can't be derived using unicodeToFilename
+ filenameData.push(filename);
+ }
+
+ if (typeof shortcode === 'undefined') {
+ emojisWithoutShortCodes.push(filenameData);
+ } else {
+ if (!Array.isArray(shortCodesToEmojiData[shortcode])) {
+ shortCodesToEmojiData[shortcode] = [[]];
+ }
+ shortCodesToEmojiData[shortcode][0].push(filenameData);
+ }
+});
+
+Object.keys(emojiIndex.emojis).forEach(key => {
+ const { native } = emojiIndex.emojis[key];
+ let { short_names, search, unified } = emojiMartData.emojis[key];
+ if (short_names[0] !== key) {
+ throw new Error('The compresser expects the first short_code to be the ' +
+ 'key. It may need to be rewritten if the emoji change such that this ' +
+ 'is no longer the case.');
+ }
+
+ short_names = short_names.slice(1); // first short name can be inferred from the key
+
+ const searchData = [native, short_names, search];
+ if (unicodeToUnifiedName(native) !== unified) {
+ // unified name can't be derived from unicodeToUnifiedName
+ searchData.push(unified);
+ }
+
+ shortCodesToEmojiData[key].push(searchData);
+});
+
+// JSON.parse/stringify is to emulate what @preval is doing and avoid any
+// inconsistent behavior in dev mode
+module.exports = JSON.parse(JSON.stringify([
+ shortCodesToEmojiData,
+ emojiMartData.skins,
+ emojiMartData.categories,
+ emojiMartData.short_names,
+ emojisWithoutShortCodes,
+]));
diff --git a/app/javascript/mastodon/features/emoji/emoji_map.json b/app/javascript/mastodon/features/emoji/emoji_map.json
new file mode 100644
index 0000000000..13753ba84c
--- /dev/null
+++ b/app/javascript/mastodon/features/emoji/emoji_map.json
@@ -0,0 +1 @@
+{"😀":"1f600","😁":"1f601","😂":"1f602","🤣":"1f923","😃":"1f603","😄":"1f604","😅":"1f605","😆":"1f606","😉":"1f609","😊":"1f60a","😋":"1f60b","😎":"1f60e","😍":"1f60d","😘":"1f618","😗":"1f617","😙":"1f619","😚":"1f61a","☺":"263a","🙂":"1f642","🤗":"1f917","🤩":"1f929","🤔":"1f914","🤨":"1f928","😐":"1f610","😑":"1f611","😶":"1f636","🙄":"1f644","😏":"1f60f","😣":"1f623","😥":"1f625","😮":"1f62e","🤐":"1f910","😯":"1f62f","😪":"1f62a","😫":"1f62b","😴":"1f634","😌":"1f60c","😛":"1f61b","😜":"1f61c","😝":"1f61d","🤤":"1f924","😒":"1f612","😓":"1f613","😔":"1f614","😕":"1f615","🙃":"1f643","🤑":"1f911","😲":"1f632","☹":"2639","🙁":"1f641","😖":"1f616","😞":"1f61e","😟":"1f61f","😤":"1f624","😢":"1f622","😭":"1f62d","😦":"1f626","😧":"1f627","😨":"1f628","😩":"1f629","🤯":"1f92f","😬":"1f62c","😰":"1f630","😱":"1f631","😳":"1f633","🤪":"1f92a","😵":"1f635","😡":"1f621","😠":"1f620","🤬":"1f92c","😷":"1f637","🤒":"1f912","🤕":"1f915","🤢":"1f922","🤮":"1f92e","🤧":"1f927","😇":"1f607","🤠":"1f920","🤡":"1f921","🤥":"1f925","🤫":"1f92b","🤭":"1f92d","🧐":"1f9d0","🤓":"1f913","😈":"1f608","👿":"1f47f","👹":"1f479","👺":"1f47a","💀":"1f480","☠":"2620","👻":"1f47b","👽":"1f47d","👾":"1f47e","🤖":"1f916","💩":"1f4a9","😺":"1f63a","😸":"1f638","😹":"1f639","😻":"1f63b","😼":"1f63c","😽":"1f63d","🙀":"1f640","😿":"1f63f","😾":"1f63e","🙈":"1f648","🙉":"1f649","🙊":"1f64a","👶":"1f476","🧒":"1f9d2","👦":"1f466","👧":"1f467","🧑":"1f9d1","👨":"1f468","👩":"1f469","🧓":"1f9d3","👴":"1f474","👵":"1f475","👮":"1f46e","🕵":"1f575","💂":"1f482","👷":"1f477","🤴":"1f934","👸":"1f478","👳":"1f473","👲":"1f472","🧕":"1f9d5","🧔":"1f9d4","👱":"1f471","🤵":"1f935","👰":"1f470","🤰":"1f930","🤱":"1f931","👼":"1f47c","🎅":"1f385","🤶":"1f936","🧙":"1f9d9","🧚":"1f9da","🧛":"1f9db","🧜":"1f9dc","🧝":"1f9dd","🧞":"1f9de","🧟":"1f9df","🙍":"1f64d","🙎":"1f64e","🙅":"1f645","🙆":"1f646","💁":"1f481","🙋":"1f64b","🙇":"1f647","🤦":"1f926","🤷":"1f937","💆":"1f486","💇":"1f487","🚶":"1f6b6","🏃":"1f3c3","💃":"1f483","🕺":"1f57a","👯":"1f46f","🧖":"1f9d6","🧗":"1f9d7","🧘":"1f9d8","🛀":"1f6c0","🛌":"1f6cc","🕴":"1f574","🗣":"1f5e3","👤":"1f464","👥":"1f465","🤺":"1f93a","🏇":"1f3c7","⛷":"26f7","🏂":"1f3c2","🏌":"1f3cc","🏄":"1f3c4","🚣":"1f6a3","🏊":"1f3ca","⛹":"26f9","🏋":"1f3cb","🚴":"1f6b4","🚵":"1f6b5","🏎":"1f3ce","🏍":"1f3cd","🤸":"1f938","🤼":"1f93c","🤽":"1f93d","🤾":"1f93e","🤹":"1f939","👫":"1f46b","👬":"1f46c","👭":"1f46d","💏":"1f48f","💑":"1f491","👪":"1f46a","🤳":"1f933","💪":"1f4aa","👈":"1f448","👉":"1f449","☝":"261d","👆":"1f446","🖕":"1f595","👇":"1f447","✌":"270c","🤞":"1f91e","🖖":"1f596","🤘":"1f918","🤙":"1f919","🖐":"1f590","✋":"270b","👌":"1f44c","👍":"1f44d","👎":"1f44e","✊":"270a","👊":"1f44a","🤛":"1f91b","🤜":"1f91c","🤚":"1f91a","👋":"1f44b","🤟":"1f91f","✍":"270d","👏":"1f44f","👐":"1f450","🙌":"1f64c","🤲":"1f932","🙏":"1f64f","🤝":"1f91d","💅":"1f485","👂":"1f442","👃":"1f443","👣":"1f463","👀":"1f440","👁":"1f441","🧠":"1f9e0","👅":"1f445","👄":"1f444","💋":"1f48b","💘":"1f498","❤":"2764","💓":"1f493","💔":"1f494","💕":"1f495","💖":"1f496","💗":"1f497","💙":"1f499","💚":"1f49a","💛":"1f49b","🧡":"1f9e1","💜":"1f49c","🖤":"1f5a4","💝":"1f49d","💞":"1f49e","💟":"1f49f","❣":"2763","💌":"1f48c","💤":"1f4a4","💢":"1f4a2","💣":"1f4a3","💥":"1f4a5","💦":"1f4a6","💨":"1f4a8","💫":"1f4ab","💬":"1f4ac","🗨":"1f5e8","🗯":"1f5ef","💭":"1f4ad","🕳":"1f573","👓":"1f453","🕶":"1f576","👔":"1f454","👕":"1f455","👖":"1f456","🧣":"1f9e3","🧤":"1f9e4","🧥":"1f9e5","🧦":"1f9e6","👗":"1f457","👘":"1f458","👙":"1f459","👚":"1f45a","👛":"1f45b","👜":"1f45c","👝":"1f45d","🛍":"1f6cd","🎒":"1f392","👞":"1f45e","👟":"1f45f","👠":"1f460","👡":"1f461","👢":"1f462","👑":"1f451","👒":"1f452","🎩":"1f3a9","🎓":"1f393","🧢":"1f9e2","⛑":"26d1","📿":"1f4ff","💄":"1f484","💍":"1f48d","💎":"1f48e","🐵":"1f435","🐒":"1f412","🦍":"1f98d","🐶":"1f436","🐕":"1f415","🐩":"1f429","🐺":"1f43a","🦊":"1f98a","🐱":"1f431","🐈":"1f408","🦁":"1f981","🐯":"1f42f","🐅":"1f405","🐆":"1f406","🐴":"1f434","🐎":"1f40e","🦄":"1f984","🦓":"1f993","🦌":"1f98c","🐮":"1f42e","🐂":"1f402","🐃":"1f403","🐄":"1f404","🐷":"1f437","🐖":"1f416","🐗":"1f417","🐽":"1f43d","🐏":"1f40f","🐑":"1f411","🐐":"1f410","🐪":"1f42a","🐫":"1f42b","🦒":"1f992","🐘":"1f418","🦏":"1f98f","🐭":"1f42d","🐁":"1f401","🐀":"1f400","🐹":"1f439","🐰":"1f430","🐇":"1f407","🐿":"1f43f","🦔":"1f994","🦇":"1f987","🐻":"1f43b","🐨":"1f428","🐼":"1f43c","🐾":"1f43e","🦃":"1f983","🐔":"1f414","🐓":"1f413","🐣":"1f423","🐤":"1f424","🐥":"1f425","🐦":"1f426","🐧":"1f427","🕊":"1f54a","🦅":"1f985","🦆":"1f986","🦉":"1f989","🐸":"1f438","🐊":"1f40a","🐢":"1f422","🦎":"1f98e","🐍":"1f40d","🐲":"1f432","🐉":"1f409","🦕":"1f995","🦖":"1f996","🐳":"1f433","🐋":"1f40b","🐬":"1f42c","🐟":"1f41f","🐠":"1f420","🐡":"1f421","🦈":"1f988","🐙":"1f419","🐚":"1f41a","🦀":"1f980","🦐":"1f990","🦑":"1f991","🐌":"1f40c","🦋":"1f98b","🐛":"1f41b","🐜":"1f41c","🐝":"1f41d","🐞":"1f41e","🦗":"1f997","🕷":"1f577","🕸":"1f578","🦂":"1f982","💐":"1f490","🌸":"1f338","💮":"1f4ae","🏵":"1f3f5","🌹":"1f339","🥀":"1f940","🌺":"1f33a","🌻":"1f33b","🌼":"1f33c","🌷":"1f337","🌱":"1f331","🌲":"1f332","🌳":"1f333","🌴":"1f334","🌵":"1f335","🌾":"1f33e","🌿":"1f33f","☘":"2618","🍀":"1f340","🍁":"1f341","🍂":"1f342","🍃":"1f343","🍇":"1f347","🍈":"1f348","🍉":"1f349","🍊":"1f34a","🍋":"1f34b","🍌":"1f34c","🍍":"1f34d","🍎":"1f34e","🍏":"1f34f","🍐":"1f350","🍑":"1f351","🍒":"1f352","🍓":"1f353","🥝":"1f95d","🍅":"1f345","🥥":"1f965","🥑":"1f951","🍆":"1f346","🥔":"1f954","🥕":"1f955","🌽":"1f33d","🌶":"1f336","🥒":"1f952","🥦":"1f966","🍄":"1f344","🥜":"1f95c","🌰":"1f330","🍞":"1f35e","🥐":"1f950","🥖":"1f956","🥨":"1f968","🥞":"1f95e","🧀":"1f9c0","🍖":"1f356","🍗":"1f357","🥩":"1f969","🥓":"1f953","🍔":"1f354","🍟":"1f35f","🍕":"1f355","🌭":"1f32d","🥪":"1f96a","🌮":"1f32e","🌯":"1f32f","🥙":"1f959","🥚":"1f95a","🍳":"1f373","🥘":"1f958","🍲":"1f372","🥣":"1f963","🥗":"1f957","🍿":"1f37f","🥫":"1f96b","🍱":"1f371","🍘":"1f358","🍙":"1f359","🍚":"1f35a","🍛":"1f35b","🍜":"1f35c","🍝":"1f35d","🍠":"1f360","🍢":"1f362","🍣":"1f363","🍤":"1f364","🍥":"1f365","🍡":"1f361","🥟":"1f95f","🥠":"1f960","🥡":"1f961","🍦":"1f366","🍧":"1f367","🍨":"1f368","🍩":"1f369","🍪":"1f36a","🎂":"1f382","🍰":"1f370","🥧":"1f967","🍫":"1f36b","🍬":"1f36c","🍭":"1f36d","🍮":"1f36e","🍯":"1f36f","🍼":"1f37c","🥛":"1f95b","☕":"2615","🍵":"1f375","🍶":"1f376","🍾":"1f37e","🍷":"1f377","🍸":"1f378","🍹":"1f379","🍺":"1f37a","🍻":"1f37b","🥂":"1f942","🥃":"1f943","🥤":"1f964","🥢":"1f962","🍽":"1f37d","🍴":"1f374","🥄":"1f944","🔪":"1f52a","🏺":"1f3fa","🌍":"1f30d","🌎":"1f30e","🌏":"1f30f","🌐":"1f310","🗺":"1f5fa","🗾":"1f5fe","🏔":"1f3d4","⛰":"26f0","🌋":"1f30b","🗻":"1f5fb","🏕":"1f3d5","🏖":"1f3d6","🏜":"1f3dc","🏝":"1f3dd","🏞":"1f3de","🏟":"1f3df","🏛":"1f3db","🏗":"1f3d7","🏘":"1f3d8","🏙":"1f3d9","🏚":"1f3da","🏠":"1f3e0","🏡":"1f3e1","🏢":"1f3e2","🏣":"1f3e3","🏤":"1f3e4","🏥":"1f3e5","🏦":"1f3e6","🏨":"1f3e8","🏩":"1f3e9","🏪":"1f3ea","🏫":"1f3eb","🏬":"1f3ec","🏭":"1f3ed","🏯":"1f3ef","🏰":"1f3f0","💒":"1f492","🗼":"1f5fc","🗽":"1f5fd","⛪":"26ea","🕌":"1f54c","🕍":"1f54d","⛩":"26e9","🕋":"1f54b","⛲":"26f2","⛺":"26fa","🌁":"1f301","🌃":"1f303","🌄":"1f304","🌅":"1f305","🌆":"1f306","🌇":"1f307","🌉":"1f309","♨":"2668","🌌":"1f30c","🎠":"1f3a0","🎡":"1f3a1","🎢":"1f3a2","💈":"1f488","🎪":"1f3aa","🎭":"1f3ad","🖼":"1f5bc","🎨":"1f3a8","🎰":"1f3b0","🚂":"1f682","🚃":"1f683","🚄":"1f684","🚅":"1f685","🚆":"1f686","🚇":"1f687","🚈":"1f688","🚉":"1f689","🚊":"1f68a","🚝":"1f69d","🚞":"1f69e","🚋":"1f68b","🚌":"1f68c","🚍":"1f68d","🚎":"1f68e","🚐":"1f690","🚑":"1f691","🚒":"1f692","🚓":"1f693","🚔":"1f694","🚕":"1f695","🚖":"1f696","🚗":"1f697","🚘":"1f698","🚙":"1f699","🚚":"1f69a","🚛":"1f69b","🚜":"1f69c","🚲":"1f6b2","🛴":"1f6f4","🛵":"1f6f5","🚏":"1f68f","🛣":"1f6e3","🛤":"1f6e4","⛽":"26fd","🚨":"1f6a8","🚥":"1f6a5","🚦":"1f6a6","🚧":"1f6a7","🛑":"1f6d1","⚓":"2693","⛵":"26f5","🛶":"1f6f6","🚤":"1f6a4","🛳":"1f6f3","⛴":"26f4","🛥":"1f6e5","🚢":"1f6a2","✈":"2708","🛩":"1f6e9","🛫":"1f6eb","🛬":"1f6ec","💺":"1f4ba","🚁":"1f681","🚟":"1f69f","🚠":"1f6a0","🚡":"1f6a1","🛰":"1f6f0","🚀":"1f680","🛸":"1f6f8","🛎":"1f6ce","🚪":"1f6aa","🛏":"1f6cf","🛋":"1f6cb","🚽":"1f6bd","🚿":"1f6bf","🛁":"1f6c1","⌛":"231b","⏳":"23f3","⌚":"231a","⏰":"23f0","⏱":"23f1","⏲":"23f2","🕰":"1f570","🕛":"1f55b","🕧":"1f567","🕐":"1f550","🕜":"1f55c","🕑":"1f551","🕝":"1f55d","🕒":"1f552","🕞":"1f55e","🕓":"1f553","🕟":"1f55f","🕔":"1f554","🕠":"1f560","🕕":"1f555","🕡":"1f561","🕖":"1f556","🕢":"1f562","🕗":"1f557","🕣":"1f563","🕘":"1f558","🕤":"1f564","🕙":"1f559","🕥":"1f565","🕚":"1f55a","🕦":"1f566","🌑":"1f311","🌒":"1f312","🌓":"1f313","🌔":"1f314","🌕":"1f315","🌖":"1f316","🌗":"1f317","🌘":"1f318","🌙":"1f319","🌚":"1f31a","🌛":"1f31b","🌜":"1f31c","🌡":"1f321","☀":"2600","🌝":"1f31d","🌞":"1f31e","⭐":"2b50","🌟":"1f31f","🌠":"1f320","☁":"2601","⛅":"26c5","⛈":"26c8","🌤":"1f324","🌥":"1f325","🌦":"1f326","🌧":"1f327","🌨":"1f328","🌩":"1f329","🌪":"1f32a","🌫":"1f32b","🌬":"1f32c","🌀":"1f300","🌈":"1f308","🌂":"1f302","☂":"2602","☔":"2614","⛱":"26f1","⚡":"26a1","❄":"2744","☃":"2603","⛄":"26c4","☄":"2604","🔥":"1f525","💧":"1f4a7","🌊":"1f30a","🎃":"1f383","🎄":"1f384","🎆":"1f386","🎇":"1f387","✨":"2728","🎈":"1f388","🎉":"1f389","🎊":"1f38a","🎋":"1f38b","🎍":"1f38d","🎎":"1f38e","🎏":"1f38f","🎐":"1f390","🎑":"1f391","🎀":"1f380","🎁":"1f381","🎗":"1f397","🎟":"1f39f","🎫":"1f3ab","🎖":"1f396","🏆":"1f3c6","🏅":"1f3c5","🥇":"1f947","🥈":"1f948","🥉":"1f949","⚽":"26bd","⚾":"26be","🏀":"1f3c0","🏐":"1f3d0","🏈":"1f3c8","🏉":"1f3c9","🎾":"1f3be","🎱":"1f3b1","🎳":"1f3b3","🏏":"1f3cf","🏑":"1f3d1","🏒":"1f3d2","🏓":"1f3d3","🏸":"1f3f8","🥊":"1f94a","🥋":"1f94b","🥅":"1f945","🎯":"1f3af","⛳":"26f3","⛸":"26f8","🎣":"1f3a3","🎽":"1f3bd","🎿":"1f3bf","🛷":"1f6f7","🥌":"1f94c","🎮":"1f3ae","🕹":"1f579","🎲":"1f3b2","♠":"2660","♥":"2665","♦":"2666","♣":"2663","🃏":"1f0cf","🀄":"1f004","🎴":"1f3b4","🔇":"1f507","🔈":"1f508","🔉":"1f509","🔊":"1f50a","📢":"1f4e2","📣":"1f4e3","📯":"1f4ef","🔔":"1f514","🔕":"1f515","🎼":"1f3bc","🎵":"1f3b5","🎶":"1f3b6","🎙":"1f399","🎚":"1f39a","🎛":"1f39b","🎤":"1f3a4","🎧":"1f3a7","📻":"1f4fb","🎷":"1f3b7","🎸":"1f3b8","🎹":"1f3b9","🎺":"1f3ba","🎻":"1f3bb","🥁":"1f941","📱":"1f4f1","📲":"1f4f2","☎":"260e","📞":"1f4de","📟":"1f4df","📠":"1f4e0","🔋":"1f50b","🔌":"1f50c","💻":"1f4bb","🖥":"1f5a5","🖨":"1f5a8","⌨":"2328","🖱":"1f5b1","🖲":"1f5b2","💽":"1f4bd","💾":"1f4be","💿":"1f4bf","📀":"1f4c0","🎥":"1f3a5","🎞":"1f39e","📽":"1f4fd","🎬":"1f3ac","📺":"1f4fa","📷":"1f4f7","📸":"1f4f8","📹":"1f4f9","📼":"1f4fc","🔍":"1f50d","🔎":"1f50e","🔬":"1f52c","🔭":"1f52d","📡":"1f4e1","🕯":"1f56f","💡":"1f4a1","🔦":"1f526","🏮":"1f3ee","📔":"1f4d4","📕":"1f4d5","📖":"1f4d6","📗":"1f4d7","📘":"1f4d8","📙":"1f4d9","📚":"1f4da","📓":"1f4d3","📒":"1f4d2","📃":"1f4c3","📜":"1f4dc","📄":"1f4c4","📰":"1f4f0","🗞":"1f5de","📑":"1f4d1","🔖":"1f516","🏷":"1f3f7","💰":"1f4b0","💴":"1f4b4","💵":"1f4b5","💶":"1f4b6","💷":"1f4b7","💸":"1f4b8","💳":"1f4b3","💹":"1f4b9","💱":"1f4b1","💲":"1f4b2","✉":"2709","📧":"1f4e7","📨":"1f4e8","📩":"1f4e9","📤":"1f4e4","📥":"1f4e5","📦":"1f4e6","📫":"1f4eb","📪":"1f4ea","📬":"1f4ec","📭":"1f4ed","📮":"1f4ee","🗳":"1f5f3","✏":"270f","✒":"2712","🖋":"1f58b","🖊":"1f58a","🖌":"1f58c","🖍":"1f58d","📝":"1f4dd","💼":"1f4bc","📁":"1f4c1","📂":"1f4c2","🗂":"1f5c2","📅":"1f4c5","📆":"1f4c6","🗒":"1f5d2","🗓":"1f5d3","📇":"1f4c7","📈":"1f4c8","📉":"1f4c9","📊":"1f4ca","📋":"1f4cb","📌":"1f4cc","📍":"1f4cd","📎":"1f4ce","🖇":"1f587","📏":"1f4cf","📐":"1f4d0","✂":"2702","🗃":"1f5c3","🗄":"1f5c4","🗑":"1f5d1","🔒":"1f512","🔓":"1f513","🔏":"1f50f","🔐":"1f510","🔑":"1f511","🗝":"1f5dd","🔨":"1f528","⛏":"26cf","⚒":"2692","🛠":"1f6e0","🗡":"1f5e1","⚔":"2694","🔫":"1f52b","🏹":"1f3f9","🛡":"1f6e1","🔧":"1f527","🔩":"1f529","⚙":"2699","🗜":"1f5dc","⚗":"2697","⚖":"2696","🔗":"1f517","⛓":"26d3","💉":"1f489","💊":"1f48a","🚬":"1f6ac","⚰":"26b0","⚱":"26b1","🗿":"1f5ff","🛢":"1f6e2","🔮":"1f52e","🛒":"1f6d2","🏧":"1f3e7","🚮":"1f6ae","🚰":"1f6b0","♿":"267f","🚹":"1f6b9","🚺":"1f6ba","🚻":"1f6bb","🚼":"1f6bc","🚾":"1f6be","🛂":"1f6c2","🛃":"1f6c3","🛄":"1f6c4","🛅":"1f6c5","⚠":"26a0","🚸":"1f6b8","⛔":"26d4","🚫":"1f6ab","🚳":"1f6b3","🚭":"1f6ad","🚯":"1f6af","🚱":"1f6b1","🚷":"1f6b7","📵":"1f4f5","🔞":"1f51e","☢":"2622","☣":"2623","⬆":"2b06","↗":"2197","➡":"27a1","↘":"2198","⬇":"2b07","↙":"2199","⬅":"2b05","↖":"2196","↕":"2195","↔":"2194","↩":"21a9","↪":"21aa","⤴":"2934","⤵":"2935","🔃":"1f503","🔄":"1f504","🔙":"1f519","🔚":"1f51a","🔛":"1f51b","🔜":"1f51c","🔝":"1f51d","🛐":"1f6d0","⚛":"269b","🕉":"1f549","✡":"2721","☸":"2638","☯":"262f","✝":"271d","☦":"2626","☪":"262a","☮":"262e","🕎":"1f54e","🔯":"1f52f","♈":"2648","♉":"2649","♊":"264a","♋":"264b","♌":"264c","♍":"264d","♎":"264e","♏":"264f","♐":"2650","♑":"2651","♒":"2652","♓":"2653","⛎":"26ce","🔀":"1f500","🔁":"1f501","🔂":"1f502","▶":"25b6","⏩":"23e9","⏭":"23ed","⏯":"23ef","◀":"25c0","⏪":"23ea","⏮":"23ee","🔼":"1f53c","⏫":"23eb","🔽":"1f53d","⏬":"23ec","⏸":"23f8","⏹":"23f9","⏺":"23fa","⏏":"23cf","🎦":"1f3a6","🔅":"1f505","🔆":"1f506","📶":"1f4f6","📳":"1f4f3","📴":"1f4f4","♀":"2640","♂":"2642","⚕":"2695","♻":"267b","⚜":"269c","🔱":"1f531","📛":"1f4db","🔰":"1f530","⭕":"2b55","✅":"2705","☑":"2611","✔":"2714","✖":"2716","❌":"274c","❎":"274e","➕":"2795","➖":"2796","➗":"2797","➰":"27b0","➿":"27bf","〽":"303d","✳":"2733","✴":"2734","❇":"2747","‼":"203c","⁉":"2049","❓":"2753","❔":"2754","❕":"2755","❗":"2757","〰":"3030","©":"a9","®":"ae","™":"2122","🔟":"1f51f","💯":"1f4af","🔠":"1f520","🔡":"1f521","🔢":"1f522","🔣":"1f523","🔤":"1f524","🅰":"1f170","🆎":"1f18e","🅱":"1f171","🆑":"1f191","🆒":"1f192","🆓":"1f193","ℹ":"2139","🆔":"1f194","Ⓜ":"24c2","🆕":"1f195","🆖":"1f196","🅾":"1f17e","🆗":"1f197","🅿":"1f17f","🆘":"1f198","🆙":"1f199","🆚":"1f19a","🈁":"1f201","🈂":"1f202","🈷":"1f237","🈶":"1f236","🈯":"1f22f","🉐":"1f250","🈹":"1f239","🈚":"1f21a","🈲":"1f232","🉑":"1f251","🈸":"1f238","🈴":"1f234","🈳":"1f233","㊗":"3297","㊙":"3299","🈺":"1f23a","🈵":"1f235","▪":"25aa","▫":"25ab","◻":"25fb","◼":"25fc","◽":"25fd","◾":"25fe","⬛":"2b1b","⬜":"2b1c","🔶":"1f536","🔷":"1f537","🔸":"1f538","🔹":"1f539","🔺":"1f53a","🔻":"1f53b","💠":"1f4a0","🔘":"1f518","🔲":"1f532","🔳":"1f533","⚪":"26aa","⚫":"26ab","🔴":"1f534","🔵":"1f535","🏁":"1f3c1","🚩":"1f6a9","🎌":"1f38c","🏴":"1f3f4","🏳":"1f3f3","☺️":"263a","☹️":"2639","☠️":"2620","👶🏻":"1f476-1f3fb","👶🏼":"1f476-1f3fc","👶🏽":"1f476-1f3fd","👶🏾":"1f476-1f3fe","👶🏿":"1f476-1f3ff","🧒🏻":"1f9d2-1f3fb","🧒🏼":"1f9d2-1f3fc","🧒🏽":"1f9d2-1f3fd","🧒🏾":"1f9d2-1f3fe","🧒🏿":"1f9d2-1f3ff","👦🏻":"1f466-1f3fb","👦🏼":"1f466-1f3fc","👦🏽":"1f466-1f3fd","👦🏾":"1f466-1f3fe","👦🏿":"1f466-1f3ff","👧🏻":"1f467-1f3fb","👧🏼":"1f467-1f3fc","👧🏽":"1f467-1f3fd","👧🏾":"1f467-1f3fe","👧🏿":"1f467-1f3ff","🧑🏻":"1f9d1-1f3fb","🧑🏼":"1f9d1-1f3fc","🧑🏽":"1f9d1-1f3fd","🧑🏾":"1f9d1-1f3fe","🧑🏿":"1f9d1-1f3ff","👨🏻":"1f468-1f3fb","👨🏼":"1f468-1f3fc","👨🏽":"1f468-1f3fd","👨🏾":"1f468-1f3fe","👨🏿":"1f468-1f3ff","👩🏻":"1f469-1f3fb","👩🏼":"1f469-1f3fc","👩🏽":"1f469-1f3fd","👩🏾":"1f469-1f3fe","👩🏿":"1f469-1f3ff","🧓🏻":"1f9d3-1f3fb","🧓🏼":"1f9d3-1f3fc","🧓🏽":"1f9d3-1f3fd","🧓🏾":"1f9d3-1f3fe","🧓🏿":"1f9d3-1f3ff","👴🏻":"1f474-1f3fb","👴🏼":"1f474-1f3fc","👴🏽":"1f474-1f3fd","👴🏾":"1f474-1f3fe","👴🏿":"1f474-1f3ff","👵🏻":"1f475-1f3fb","👵🏼":"1f475-1f3fc","👵🏽":"1f475-1f3fd","👵🏾":"1f475-1f3fe","👵🏿":"1f475-1f3ff","👮🏻":"1f46e-1f3fb","👮🏼":"1f46e-1f3fc","👮🏽":"1f46e-1f3fd","👮🏾":"1f46e-1f3fe","👮🏿":"1f46e-1f3ff","🕵️":"1f575","🕵🏻":"1f575-1f3fb","🕵🏼":"1f575-1f3fc","🕵🏽":"1f575-1f3fd","🕵🏾":"1f575-1f3fe","🕵🏿":"1f575-1f3ff","💂🏻":"1f482-1f3fb","💂🏼":"1f482-1f3fc","💂🏽":"1f482-1f3fd","💂🏾":"1f482-1f3fe","💂🏿":"1f482-1f3ff","👷🏻":"1f477-1f3fb","👷🏼":"1f477-1f3fc","👷🏽":"1f477-1f3fd","👷🏾":"1f477-1f3fe","👷🏿":"1f477-1f3ff","🤴🏻":"1f934-1f3fb","🤴🏼":"1f934-1f3fc","🤴🏽":"1f934-1f3fd","🤴🏾":"1f934-1f3fe","🤴🏿":"1f934-1f3ff","👸🏻":"1f478-1f3fb","👸🏼":"1f478-1f3fc","👸🏽":"1f478-1f3fd","👸🏾":"1f478-1f3fe","👸🏿":"1f478-1f3ff","👳🏻":"1f473-1f3fb","👳🏼":"1f473-1f3fc","👳🏽":"1f473-1f3fd","👳🏾":"1f473-1f3fe","👳🏿":"1f473-1f3ff","👲🏻":"1f472-1f3fb","👲🏼":"1f472-1f3fc","👲🏽":"1f472-1f3fd","👲🏾":"1f472-1f3fe","👲🏿":"1f472-1f3ff","🧕🏻":"1f9d5-1f3fb","🧕🏼":"1f9d5-1f3fc","🧕🏽":"1f9d5-1f3fd","🧕🏾":"1f9d5-1f3fe","🧕🏿":"1f9d5-1f3ff","🧔🏻":"1f9d4-1f3fb","🧔🏼":"1f9d4-1f3fc","🧔🏽":"1f9d4-1f3fd","🧔🏾":"1f9d4-1f3fe","🧔🏿":"1f9d4-1f3ff","👱🏻":"1f471-1f3fb","👱🏼":"1f471-1f3fc","👱🏽":"1f471-1f3fd","👱🏾":"1f471-1f3fe","👱🏿":"1f471-1f3ff","🤵🏻":"1f935-1f3fb","🤵🏼":"1f935-1f3fc","🤵🏽":"1f935-1f3fd","🤵🏾":"1f935-1f3fe","🤵🏿":"1f935-1f3ff","👰🏻":"1f470-1f3fb","👰🏼":"1f470-1f3fc","👰🏽":"1f470-1f3fd","👰🏾":"1f470-1f3fe","👰🏿":"1f470-1f3ff","🤰🏻":"1f930-1f3fb","🤰🏼":"1f930-1f3fc","🤰🏽":"1f930-1f3fd","🤰🏾":"1f930-1f3fe","🤰🏿":"1f930-1f3ff","🤱🏻":"1f931-1f3fb","🤱🏼":"1f931-1f3fc","🤱🏽":"1f931-1f3fd","🤱🏾":"1f931-1f3fe","🤱🏿":"1f931-1f3ff","👼🏻":"1f47c-1f3fb","👼🏼":"1f47c-1f3fc","👼🏽":"1f47c-1f3fd","👼🏾":"1f47c-1f3fe","👼🏿":"1f47c-1f3ff","🎅🏻":"1f385-1f3fb","🎅🏼":"1f385-1f3fc","🎅🏽":"1f385-1f3fd","🎅🏾":"1f385-1f3fe","🎅🏿":"1f385-1f3ff","🤶🏻":"1f936-1f3fb","🤶🏼":"1f936-1f3fc","🤶🏽":"1f936-1f3fd","🤶🏾":"1f936-1f3fe","🤶🏿":"1f936-1f3ff","🧙🏻":"1f9d9-1f3fb","🧙🏼":"1f9d9-1f3fc","🧙🏽":"1f9d9-1f3fd","🧙🏾":"1f9d9-1f3fe","🧙🏿":"1f9d9-1f3ff","🧚🏻":"1f9da-1f3fb","🧚🏼":"1f9da-1f3fc","🧚🏽":"1f9da-1f3fd","🧚🏾":"1f9da-1f3fe","🧚🏿":"1f9da-1f3ff","🧛🏻":"1f9db-1f3fb","🧛🏼":"1f9db-1f3fc","🧛🏽":"1f9db-1f3fd","🧛🏾":"1f9db-1f3fe","🧛🏿":"1f9db-1f3ff","🧜🏻":"1f9dc-1f3fb","🧜🏼":"1f9dc-1f3fc","🧜🏽":"1f9dc-1f3fd","🧜🏾":"1f9dc-1f3fe","🧜🏿":"1f9dc-1f3ff","🧝🏻":"1f9dd-1f3fb","🧝🏼":"1f9dd-1f3fc","🧝🏽":"1f9dd-1f3fd","🧝🏾":"1f9dd-1f3fe","🧝🏿":"1f9dd-1f3ff","🙍🏻":"1f64d-1f3fb","🙍🏼":"1f64d-1f3fc","🙍🏽":"1f64d-1f3fd","🙍🏾":"1f64d-1f3fe","🙍🏿":"1f64d-1f3ff","🙎🏻":"1f64e-1f3fb","🙎🏼":"1f64e-1f3fc","🙎🏽":"1f64e-1f3fd","🙎🏾":"1f64e-1f3fe","🙎🏿":"1f64e-1f3ff","🙅🏻":"1f645-1f3fb","🙅🏼":"1f645-1f3fc","🙅🏽":"1f645-1f3fd","🙅🏾":"1f645-1f3fe","🙅🏿":"1f645-1f3ff","🙆🏻":"1f646-1f3fb","🙆🏼":"1f646-1f3fc","🙆🏽":"1f646-1f3fd","🙆🏾":"1f646-1f3fe","🙆🏿":"1f646-1f3ff","💁🏻":"1f481-1f3fb","💁🏼":"1f481-1f3fc","💁🏽":"1f481-1f3fd","💁🏾":"1f481-1f3fe","💁🏿":"1f481-1f3ff","🙋🏻":"1f64b-1f3fb","🙋🏼":"1f64b-1f3fc","🙋🏽":"1f64b-1f3fd","🙋🏾":"1f64b-1f3fe","🙋🏿":"1f64b-1f3ff","🙇🏻":"1f647-1f3fb","🙇🏼":"1f647-1f3fc","🙇🏽":"1f647-1f3fd","🙇🏾":"1f647-1f3fe","🙇🏿":"1f647-1f3ff","🤦🏻":"1f926-1f3fb","🤦🏼":"1f926-1f3fc","🤦🏽":"1f926-1f3fd","🤦🏾":"1f926-1f3fe","🤦🏿":"1f926-1f3ff","🤷🏻":"1f937-1f3fb","🤷🏼":"1f937-1f3fc","🤷🏽":"1f937-1f3fd","🤷🏾":"1f937-1f3fe","🤷🏿":"1f937-1f3ff","💆🏻":"1f486-1f3fb","💆🏼":"1f486-1f3fc","💆🏽":"1f486-1f3fd","💆🏾":"1f486-1f3fe","💆🏿":"1f486-1f3ff","💇🏻":"1f487-1f3fb","💇🏼":"1f487-1f3fc","💇🏽":"1f487-1f3fd","💇🏾":"1f487-1f3fe","💇🏿":"1f487-1f3ff","🚶🏻":"1f6b6-1f3fb","🚶🏼":"1f6b6-1f3fc","🚶🏽":"1f6b6-1f3fd","🚶🏾":"1f6b6-1f3fe","🚶🏿":"1f6b6-1f3ff","🏃🏻":"1f3c3-1f3fb","🏃🏼":"1f3c3-1f3fc","🏃🏽":"1f3c3-1f3fd","🏃🏾":"1f3c3-1f3fe","🏃🏿":"1f3c3-1f3ff","💃🏻":"1f483-1f3fb","💃🏼":"1f483-1f3fc","💃🏽":"1f483-1f3fd","💃🏾":"1f483-1f3fe","💃🏿":"1f483-1f3ff","🕺🏻":"1f57a-1f3fb","🕺🏼":"1f57a-1f3fc","🕺🏽":"1f57a-1f3fd","🕺🏾":"1f57a-1f3fe","🕺🏿":"1f57a-1f3ff","🧖🏻":"1f9d6-1f3fb","🧖🏼":"1f9d6-1f3fc","🧖🏽":"1f9d6-1f3fd","🧖🏾":"1f9d6-1f3fe","🧖🏿":"1f9d6-1f3ff","🧗🏻":"1f9d7-1f3fb","🧗🏼":"1f9d7-1f3fc","🧗🏽":"1f9d7-1f3fd","🧗🏾":"1f9d7-1f3fe","🧗🏿":"1f9d7-1f3ff","🧘🏻":"1f9d8-1f3fb","🧘🏼":"1f9d8-1f3fc","🧘🏽":"1f9d8-1f3fd","🧘🏾":"1f9d8-1f3fe","🧘🏿":"1f9d8-1f3ff","🛀🏻":"1f6c0-1f3fb","🛀🏼":"1f6c0-1f3fc","🛀🏽":"1f6c0-1f3fd","🛀🏾":"1f6c0-1f3fe","🛀🏿":"1f6c0-1f3ff","🛌🏻":"1f6cc-1f3fb","🛌🏼":"1f6cc-1f3fc","🛌🏽":"1f6cc-1f3fd","🛌🏾":"1f6cc-1f3fe","🛌🏿":"1f6cc-1f3ff","🕴️":"1f574","🕴🏻":"1f574-1f3fb","🕴🏼":"1f574-1f3fc","🕴🏽":"1f574-1f3fd","🕴🏾":"1f574-1f3fe","🕴🏿":"1f574-1f3ff","🗣️":"1f5e3","🏇🏻":"1f3c7-1f3fb","🏇🏼":"1f3c7-1f3fc","🏇🏽":"1f3c7-1f3fd","🏇🏾":"1f3c7-1f3fe","🏇🏿":"1f3c7-1f3ff","⛷️":"26f7","🏂🏻":"1f3c2-1f3fb","🏂🏼":"1f3c2-1f3fc","🏂🏽":"1f3c2-1f3fd","🏂🏾":"1f3c2-1f3fe","🏂🏿":"1f3c2-1f3ff","🏌️":"1f3cc","🏌🏻":"1f3cc-1f3fb","🏌🏼":"1f3cc-1f3fc","🏌🏽":"1f3cc-1f3fd","🏌🏾":"1f3cc-1f3fe","🏌🏿":"1f3cc-1f3ff","🏄🏻":"1f3c4-1f3fb","🏄🏼":"1f3c4-1f3fc","🏄🏽":"1f3c4-1f3fd","🏄🏾":"1f3c4-1f3fe","🏄🏿":"1f3c4-1f3ff","🚣🏻":"1f6a3-1f3fb","🚣🏼":"1f6a3-1f3fc","🚣🏽":"1f6a3-1f3fd","🚣🏾":"1f6a3-1f3fe","🚣🏿":"1f6a3-1f3ff","🏊🏻":"1f3ca-1f3fb","🏊🏼":"1f3ca-1f3fc","🏊🏽":"1f3ca-1f3fd","🏊🏾":"1f3ca-1f3fe","🏊🏿":"1f3ca-1f3ff","⛹️":"26f9","⛹🏻":"26f9-1f3fb","⛹🏼":"26f9-1f3fc","⛹🏽":"26f9-1f3fd","⛹🏾":"26f9-1f3fe","⛹🏿":"26f9-1f3ff","🏋️":"1f3cb","🏋🏻":"1f3cb-1f3fb","🏋🏼":"1f3cb-1f3fc","🏋🏽":"1f3cb-1f3fd","🏋🏾":"1f3cb-1f3fe","🏋🏿":"1f3cb-1f3ff","🚴🏻":"1f6b4-1f3fb","🚴🏼":"1f6b4-1f3fc","🚴🏽":"1f6b4-1f3fd","🚴🏾":"1f6b4-1f3fe","🚴🏿":"1f6b4-1f3ff","🚵🏻":"1f6b5-1f3fb","🚵🏼":"1f6b5-1f3fc","🚵🏽":"1f6b5-1f3fd","🚵🏾":"1f6b5-1f3fe","🚵🏿":"1f6b5-1f3ff","🏎️":"1f3ce","🏍️":"1f3cd","🤸🏻":"1f938-1f3fb","🤸🏼":"1f938-1f3fc","🤸🏽":"1f938-1f3fd","🤸🏾":"1f938-1f3fe","🤸🏿":"1f938-1f3ff","🤽🏻":"1f93d-1f3fb","🤽🏼":"1f93d-1f3fc","🤽🏽":"1f93d-1f3fd","🤽🏾":"1f93d-1f3fe","🤽🏿":"1f93d-1f3ff","🤾🏻":"1f93e-1f3fb","🤾🏼":"1f93e-1f3fc","🤾🏽":"1f93e-1f3fd","🤾🏾":"1f93e-1f3fe","🤾🏿":"1f93e-1f3ff","🤹🏻":"1f939-1f3fb","🤹🏼":"1f939-1f3fc","🤹🏽":"1f939-1f3fd","🤹🏾":"1f939-1f3fe","🤹🏿":"1f939-1f3ff","🤳🏻":"1f933-1f3fb","🤳🏼":"1f933-1f3fc","🤳🏽":"1f933-1f3fd","🤳🏾":"1f933-1f3fe","🤳🏿":"1f933-1f3ff","💪🏻":"1f4aa-1f3fb","💪🏼":"1f4aa-1f3fc","💪🏽":"1f4aa-1f3fd","💪🏾":"1f4aa-1f3fe","💪🏿":"1f4aa-1f3ff","👈🏻":"1f448-1f3fb","👈🏼":"1f448-1f3fc","👈🏽":"1f448-1f3fd","👈🏾":"1f448-1f3fe","👈🏿":"1f448-1f3ff","👉🏻":"1f449-1f3fb","👉🏼":"1f449-1f3fc","👉🏽":"1f449-1f3fd","👉🏾":"1f449-1f3fe","👉🏿":"1f449-1f3ff","☝️":"261d","☝🏻":"261d-1f3fb","☝🏼":"261d-1f3fc","☝🏽":"261d-1f3fd","☝🏾":"261d-1f3fe","☝🏿":"261d-1f3ff","👆🏻":"1f446-1f3fb","👆🏼":"1f446-1f3fc","👆🏽":"1f446-1f3fd","👆🏾":"1f446-1f3fe","👆🏿":"1f446-1f3ff","🖕🏻":"1f595-1f3fb","🖕🏼":"1f595-1f3fc","🖕🏽":"1f595-1f3fd","🖕🏾":"1f595-1f3fe","🖕🏿":"1f595-1f3ff","👇🏻":"1f447-1f3fb","👇🏼":"1f447-1f3fc","👇🏽":"1f447-1f3fd","👇🏾":"1f447-1f3fe","👇🏿":"1f447-1f3ff","✌️":"270c","✌🏻":"270c-1f3fb","✌🏼":"270c-1f3fc","✌🏽":"270c-1f3fd","✌🏾":"270c-1f3fe","✌🏿":"270c-1f3ff","🤞🏻":"1f91e-1f3fb","🤞🏼":"1f91e-1f3fc","🤞🏽":"1f91e-1f3fd","🤞🏾":"1f91e-1f3fe","🤞🏿":"1f91e-1f3ff","🖖🏻":"1f596-1f3fb","🖖🏼":"1f596-1f3fc","🖖🏽":"1f596-1f3fd","🖖🏾":"1f596-1f3fe","🖖🏿":"1f596-1f3ff","🤘🏻":"1f918-1f3fb","🤘🏼":"1f918-1f3fc","🤘🏽":"1f918-1f3fd","🤘🏾":"1f918-1f3fe","🤘🏿":"1f918-1f3ff","🤙🏻":"1f919-1f3fb","🤙🏼":"1f919-1f3fc","🤙🏽":"1f919-1f3fd","🤙🏾":"1f919-1f3fe","🤙🏿":"1f919-1f3ff","🖐️":"1f590","🖐🏻":"1f590-1f3fb","🖐🏼":"1f590-1f3fc","🖐🏽":"1f590-1f3fd","🖐🏾":"1f590-1f3fe","🖐🏿":"1f590-1f3ff","✋🏻":"270b-1f3fb","✋🏼":"270b-1f3fc","✋🏽":"270b-1f3fd","✋🏾":"270b-1f3fe","✋🏿":"270b-1f3ff","👌🏻":"1f44c-1f3fb","👌🏼":"1f44c-1f3fc","👌🏽":"1f44c-1f3fd","👌🏾":"1f44c-1f3fe","👌🏿":"1f44c-1f3ff","👍🏻":"1f44d-1f3fb","👍🏼":"1f44d-1f3fc","👍🏽":"1f44d-1f3fd","👍🏾":"1f44d-1f3fe","👍🏿":"1f44d-1f3ff","👎🏻":"1f44e-1f3fb","👎🏼":"1f44e-1f3fc","👎🏽":"1f44e-1f3fd","👎🏾":"1f44e-1f3fe","👎🏿":"1f44e-1f3ff","✊🏻":"270a-1f3fb","✊🏼":"270a-1f3fc","✊🏽":"270a-1f3fd","✊🏾":"270a-1f3fe","✊🏿":"270a-1f3ff","👊🏻":"1f44a-1f3fb","👊🏼":"1f44a-1f3fc","👊🏽":"1f44a-1f3fd","👊🏾":"1f44a-1f3fe","👊🏿":"1f44a-1f3ff","🤛🏻":"1f91b-1f3fb","🤛🏼":"1f91b-1f3fc","🤛🏽":"1f91b-1f3fd","🤛🏾":"1f91b-1f3fe","🤛🏿":"1f91b-1f3ff","🤜🏻":"1f91c-1f3fb","🤜🏼":"1f91c-1f3fc","🤜🏽":"1f91c-1f3fd","🤜🏾":"1f91c-1f3fe","🤜🏿":"1f91c-1f3ff","🤚🏻":"1f91a-1f3fb","🤚🏼":"1f91a-1f3fc","🤚🏽":"1f91a-1f3fd","🤚🏾":"1f91a-1f3fe","🤚🏿":"1f91a-1f3ff","👋🏻":"1f44b-1f3fb","👋🏼":"1f44b-1f3fc","👋🏽":"1f44b-1f3fd","👋🏾":"1f44b-1f3fe","👋🏿":"1f44b-1f3ff","🤟🏻":"1f91f-1f3fb","🤟🏼":"1f91f-1f3fc","🤟🏽":"1f91f-1f3fd","🤟🏾":"1f91f-1f3fe","🤟🏿":"1f91f-1f3ff","✍️":"270d","✍🏻":"270d-1f3fb","✍🏼":"270d-1f3fc","✍🏽":"270d-1f3fd","✍🏾":"270d-1f3fe","✍🏿":"270d-1f3ff","👏🏻":"1f44f-1f3fb","👏🏼":"1f44f-1f3fc","👏🏽":"1f44f-1f3fd","👏🏾":"1f44f-1f3fe","👏🏿":"1f44f-1f3ff","👐🏻":"1f450-1f3fb","👐🏼":"1f450-1f3fc","👐🏽":"1f450-1f3fd","👐🏾":"1f450-1f3fe","👐🏿":"1f450-1f3ff","🙌🏻":"1f64c-1f3fb","🙌🏼":"1f64c-1f3fc","🙌🏽":"1f64c-1f3fd","🙌🏾":"1f64c-1f3fe","🙌🏿":"1f64c-1f3ff","🤲🏻":"1f932-1f3fb","🤲🏼":"1f932-1f3fc","🤲🏽":"1f932-1f3fd","🤲🏾":"1f932-1f3fe","🤲🏿":"1f932-1f3ff","🙏🏻":"1f64f-1f3fb","🙏🏼":"1f64f-1f3fc","🙏🏽":"1f64f-1f3fd","🙏🏾":"1f64f-1f3fe","🙏🏿":"1f64f-1f3ff","💅🏻":"1f485-1f3fb","💅🏼":"1f485-1f3fc","💅🏽":"1f485-1f3fd","💅🏾":"1f485-1f3fe","💅🏿":"1f485-1f3ff","👂🏻":"1f442-1f3fb","👂🏼":"1f442-1f3fc","👂🏽":"1f442-1f3fd","👂🏾":"1f442-1f3fe","👂🏿":"1f442-1f3ff","👃🏻":"1f443-1f3fb","👃🏼":"1f443-1f3fc","👃🏽":"1f443-1f3fd","👃🏾":"1f443-1f3fe","👃🏿":"1f443-1f3ff","👁️":"1f441","❤️":"2764","❣️":"2763","🗨️":"1f5e8","🗯️":"1f5ef","🕳️":"1f573","🕶️":"1f576","🛍️":"1f6cd","⛑️":"26d1","🐿️":"1f43f","🕊️":"1f54a","🕷️":"1f577","🕸️":"1f578","🏵️":"1f3f5","☘️":"2618","🌶️":"1f336","🍽️":"1f37d","🗺️":"1f5fa","🏔️":"1f3d4","⛰️":"26f0","🏕️":"1f3d5","🏖️":"1f3d6","🏜️":"1f3dc","🏝️":"1f3dd","🏞️":"1f3de","🏟️":"1f3df","🏛️":"1f3db","🏗️":"1f3d7","🏘️":"1f3d8","🏙️":"1f3d9","🏚️":"1f3da","⛩️":"26e9","♨️":"2668","🖼️":"1f5bc","🛣️":"1f6e3","🛤️":"1f6e4","🛳️":"1f6f3","⛴️":"26f4","🛥️":"1f6e5","✈️":"2708","🛩️":"1f6e9","🛰️":"1f6f0","🛎️":"1f6ce","🛏️":"1f6cf","🛋️":"1f6cb","⏱️":"23f1","⏲️":"23f2","🕰️":"1f570","🌡️":"1f321","☀️":"2600","☁️":"2601","⛈️":"26c8","🌤️":"1f324","🌥️":"1f325","🌦️":"1f326","🌧️":"1f327","🌨️":"1f328","🌩️":"1f329","🌪️":"1f32a","🌫️":"1f32b","🌬️":"1f32c","☂️":"2602","⛱️":"26f1","❄️":"2744","☃️":"2603","☄️":"2604","🎗️":"1f397","🎟️":"1f39f","🎖️":"1f396","⛸️":"26f8","🕹️":"1f579","♠️":"2660","♥️":"2665","♦️":"2666","♣️":"2663","🎙️":"1f399","🎚️":"1f39a","🎛️":"1f39b","☎️":"260e","🖥️":"1f5a5","🖨️":"1f5a8","⌨️":"2328","🖱️":"1f5b1","🖲️":"1f5b2","🎞️":"1f39e","📽️":"1f4fd","🕯️":"1f56f","🗞️":"1f5de","🏷️":"1f3f7","✉️":"2709","🗳️":"1f5f3","✏️":"270f","✒️":"2712","🖋️":"1f58b","🖊️":"1f58a","🖌️":"1f58c","🖍️":"1f58d","🗂️":"1f5c2","🗒️":"1f5d2","🗓️":"1f5d3","🖇️":"1f587","✂️":"2702","🗃️":"1f5c3","🗄️":"1f5c4","🗑️":"1f5d1","🗝️":"1f5dd","⛏️":"26cf","⚒️":"2692","🛠️":"1f6e0","🗡️":"1f5e1","⚔️":"2694","🛡️":"1f6e1","⚙️":"2699","🗜️":"1f5dc","⚗️":"2697","⚖️":"2696","⛓️":"26d3","⚰️":"26b0","⚱️":"26b1","🛢️":"1f6e2","⚠️":"26a0","☢️":"2622","☣️":"2623","⬆️":"2b06","↗️":"2197","➡️":"27a1","↘️":"2198","⬇️":"2b07","↙️":"2199","⬅️":"2b05","↖️":"2196","↕️":"2195","↔️":"2194","↩️":"21a9","↪️":"21aa","⤴️":"2934","⤵️":"2935","⚛️":"269b","🕉️":"1f549","✡️":"2721","☸️":"2638","☯️":"262f","✝️":"271d","☦️":"2626","☪️":"262a","☮️":"262e","▶️":"25b6","⏭️":"23ed","⏯️":"23ef","◀️":"25c0","⏮️":"23ee","⏸️":"23f8","⏹️":"23f9","⏺️":"23fa","⏏️":"23cf","♀️":"2640","♂️":"2642","⚕️":"2695","♻️":"267b","⚜️":"269c","☑️":"2611","✔️":"2714","✖️":"2716","〽️":"303d","✳️":"2733","✴️":"2734","❇️":"2747","‼️":"203c","⁉️":"2049","〰️":"3030","©️":"a9","®️":"ae","™️":"2122","#⃣":"23-20e3","*⃣":"2a-20e3","0⃣":"30-20e3","1⃣":"31-20e3","2⃣":"32-20e3","3⃣":"33-20e3","4⃣":"34-20e3","5⃣":"35-20e3","6⃣":"36-20e3","7⃣":"37-20e3","8⃣":"38-20e3","9⃣":"39-20e3","🅰️":"1f170","🅱️":"1f171","ℹ️":"2139","Ⓜ️":"24c2","🅾️":"1f17e","🅿️":"1f17f","🈂️":"1f202","🈷️":"1f237","㊗️":"3297","㊙️":"3299","▪️":"25aa","▫️":"25ab","◻️":"25fb","◼️":"25fc","🏳️":"1f3f3","🇦🇨":"1f1e6-1f1e8","🇦🇩":"1f1e6-1f1e9","🇦🇪":"1f1e6-1f1ea","🇦🇫":"1f1e6-1f1eb","🇦🇬":"1f1e6-1f1ec","🇦🇮":"1f1e6-1f1ee","🇦🇱":"1f1e6-1f1f1","🇦🇲":"1f1e6-1f1f2","🇦🇴":"1f1e6-1f1f4","🇦🇶":"1f1e6-1f1f6","🇦🇷":"1f1e6-1f1f7","🇦🇸":"1f1e6-1f1f8","🇦🇹":"1f1e6-1f1f9","🇦🇺":"1f1e6-1f1fa","🇦🇼":"1f1e6-1f1fc","🇦🇽":"1f1e6-1f1fd","🇦🇿":"1f1e6-1f1ff","🇧🇦":"1f1e7-1f1e6","🇧🇧":"1f1e7-1f1e7","🇧🇩":"1f1e7-1f1e9","🇧🇪":"1f1e7-1f1ea","🇧🇫":"1f1e7-1f1eb","🇧🇬":"1f1e7-1f1ec","🇧🇭":"1f1e7-1f1ed","🇧🇮":"1f1e7-1f1ee","🇧🇯":"1f1e7-1f1ef","🇧🇱":"1f1e7-1f1f1","🇧🇲":"1f1e7-1f1f2","🇧🇳":"1f1e7-1f1f3","🇧🇴":"1f1e7-1f1f4","🇧🇶":"1f1e7-1f1f6","🇧🇷":"1f1e7-1f1f7","🇧🇸":"1f1e7-1f1f8","🇧🇹":"1f1e7-1f1f9","🇧🇻":"1f1e7-1f1fb","🇧🇼":"1f1e7-1f1fc","🇧🇾":"1f1e7-1f1fe","🇧🇿":"1f1e7-1f1ff","🇨🇦":"1f1e8-1f1e6","🇨🇨":"1f1e8-1f1e8","🇨🇩":"1f1e8-1f1e9","🇨🇫":"1f1e8-1f1eb","🇨🇬":"1f1e8-1f1ec","🇨🇭":"1f1e8-1f1ed","🇨🇮":"1f1e8-1f1ee","🇨🇰":"1f1e8-1f1f0","🇨🇱":"1f1e8-1f1f1","🇨🇲":"1f1e8-1f1f2","🇨🇳":"1f1e8-1f1f3","🇨🇴":"1f1e8-1f1f4","🇨🇵":"1f1e8-1f1f5","🇨🇷":"1f1e8-1f1f7","🇨🇺":"1f1e8-1f1fa","🇨🇻":"1f1e8-1f1fb","🇨🇼":"1f1e8-1f1fc","🇨🇽":"1f1e8-1f1fd","🇨🇾":"1f1e8-1f1fe","🇨🇿":"1f1e8-1f1ff","🇩🇪":"1f1e9-1f1ea","🇩🇬":"1f1e9-1f1ec","🇩🇯":"1f1e9-1f1ef","🇩🇰":"1f1e9-1f1f0","🇩🇲":"1f1e9-1f1f2","🇩🇴":"1f1e9-1f1f4","🇩🇿":"1f1e9-1f1ff","🇪🇦":"1f1ea-1f1e6","🇪🇨":"1f1ea-1f1e8","🇪🇪":"1f1ea-1f1ea","🇪🇬":"1f1ea-1f1ec","🇪🇭":"1f1ea-1f1ed","🇪🇷":"1f1ea-1f1f7","🇪🇸":"1f1ea-1f1f8","🇪🇹":"1f1ea-1f1f9","🇪🇺":"1f1ea-1f1fa","🇫🇮":"1f1eb-1f1ee","🇫🇯":"1f1eb-1f1ef","🇫🇰":"1f1eb-1f1f0","🇫🇲":"1f1eb-1f1f2","🇫🇴":"1f1eb-1f1f4","🇫🇷":"1f1eb-1f1f7","🇬🇦":"1f1ec-1f1e6","🇬🇧":"1f1ec-1f1e7","🇬🇩":"1f1ec-1f1e9","🇬🇪":"1f1ec-1f1ea","🇬🇫":"1f1ec-1f1eb","🇬🇬":"1f1ec-1f1ec","🇬🇭":"1f1ec-1f1ed","🇬🇮":"1f1ec-1f1ee","🇬🇱":"1f1ec-1f1f1","🇬🇲":"1f1ec-1f1f2","🇬🇳":"1f1ec-1f1f3","🇬🇵":"1f1ec-1f1f5","🇬🇶":"1f1ec-1f1f6","🇬🇷":"1f1ec-1f1f7","🇬🇸":"1f1ec-1f1f8","🇬🇹":"1f1ec-1f1f9","🇬🇺":"1f1ec-1f1fa","🇬🇼":"1f1ec-1f1fc","🇬🇾":"1f1ec-1f1fe","🇭🇰":"1f1ed-1f1f0","🇭🇲":"1f1ed-1f1f2","🇭🇳":"1f1ed-1f1f3","🇭🇷":"1f1ed-1f1f7","🇭🇹":"1f1ed-1f1f9","🇭🇺":"1f1ed-1f1fa","🇮🇨":"1f1ee-1f1e8","🇮🇩":"1f1ee-1f1e9","🇮🇪":"1f1ee-1f1ea","🇮🇱":"1f1ee-1f1f1","🇮🇲":"1f1ee-1f1f2","🇮🇳":"1f1ee-1f1f3","🇮🇴":"1f1ee-1f1f4","🇮🇶":"1f1ee-1f1f6","🇮🇷":"1f1ee-1f1f7","🇮🇸":"1f1ee-1f1f8","🇮🇹":"1f1ee-1f1f9","🇯🇪":"1f1ef-1f1ea","🇯🇲":"1f1ef-1f1f2","🇯🇴":"1f1ef-1f1f4","🇯🇵":"1f1ef-1f1f5","🇰🇪":"1f1f0-1f1ea","🇰🇬":"1f1f0-1f1ec","🇰🇭":"1f1f0-1f1ed","🇰🇮":"1f1f0-1f1ee","🇰🇲":"1f1f0-1f1f2","🇰🇳":"1f1f0-1f1f3","🇰🇵":"1f1f0-1f1f5","🇰🇷":"1f1f0-1f1f7","🇰🇼":"1f1f0-1f1fc","🇰🇾":"1f1f0-1f1fe","🇰🇿":"1f1f0-1f1ff","🇱🇦":"1f1f1-1f1e6","🇱🇧":"1f1f1-1f1e7","🇱🇨":"1f1f1-1f1e8","🇱🇮":"1f1f1-1f1ee","🇱🇰":"1f1f1-1f1f0","🇱🇷":"1f1f1-1f1f7","🇱🇸":"1f1f1-1f1f8","🇱🇹":"1f1f1-1f1f9","🇱🇺":"1f1f1-1f1fa","🇱🇻":"1f1f1-1f1fb","🇱🇾":"1f1f1-1f1fe","🇲🇦":"1f1f2-1f1e6","🇲🇨":"1f1f2-1f1e8","🇲🇩":"1f1f2-1f1e9","🇲🇪":"1f1f2-1f1ea","🇲🇫":"1f1f2-1f1eb","🇲🇬":"1f1f2-1f1ec","🇲🇭":"1f1f2-1f1ed","🇲🇰":"1f1f2-1f1f0","🇲🇱":"1f1f2-1f1f1","🇲🇲":"1f1f2-1f1f2","🇲🇳":"1f1f2-1f1f3","🇲🇴":"1f1f2-1f1f4","🇲🇵":"1f1f2-1f1f5","🇲🇶":"1f1f2-1f1f6","🇲🇷":"1f1f2-1f1f7","🇲🇸":"1f1f2-1f1f8","🇲🇹":"1f1f2-1f1f9","🇲🇺":"1f1f2-1f1fa","🇲🇻":"1f1f2-1f1fb","🇲🇼":"1f1f2-1f1fc","🇲🇽":"1f1f2-1f1fd","🇲🇾":"1f1f2-1f1fe","🇲🇿":"1f1f2-1f1ff","🇳🇦":"1f1f3-1f1e6","🇳🇨":"1f1f3-1f1e8","🇳🇪":"1f1f3-1f1ea","🇳🇫":"1f1f3-1f1eb","🇳🇬":"1f1f3-1f1ec","🇳🇮":"1f1f3-1f1ee","🇳🇱":"1f1f3-1f1f1","🇳🇴":"1f1f3-1f1f4","🇳🇵":"1f1f3-1f1f5","🇳🇷":"1f1f3-1f1f7","🇳🇺":"1f1f3-1f1fa","🇳🇿":"1f1f3-1f1ff","🇴🇲":"1f1f4-1f1f2","🇵🇦":"1f1f5-1f1e6","🇵🇪":"1f1f5-1f1ea","🇵🇫":"1f1f5-1f1eb","🇵🇬":"1f1f5-1f1ec","🇵🇭":"1f1f5-1f1ed","🇵🇰":"1f1f5-1f1f0","🇵🇱":"1f1f5-1f1f1","🇵🇲":"1f1f5-1f1f2","🇵🇳":"1f1f5-1f1f3","🇵🇷":"1f1f5-1f1f7","🇵🇸":"1f1f5-1f1f8","🇵🇹":"1f1f5-1f1f9","🇵🇼":"1f1f5-1f1fc","🇵🇾":"1f1f5-1f1fe","🇶🇦":"1f1f6-1f1e6","🇷🇪":"1f1f7-1f1ea","🇷🇴":"1f1f7-1f1f4","🇷🇸":"1f1f7-1f1f8","🇷🇺":"1f1f7-1f1fa","🇷🇼":"1f1f7-1f1fc","🇸🇦":"1f1f8-1f1e6","🇸🇧":"1f1f8-1f1e7","🇸🇨":"1f1f8-1f1e8","🇸🇩":"1f1f8-1f1e9","🇸🇪":"1f1f8-1f1ea","🇸🇬":"1f1f8-1f1ec","🇸🇭":"1f1f8-1f1ed","🇸🇮":"1f1f8-1f1ee","🇸🇯":"1f1f8-1f1ef","🇸🇰":"1f1f8-1f1f0","🇸🇱":"1f1f8-1f1f1","🇸🇲":"1f1f8-1f1f2","🇸🇳":"1f1f8-1f1f3","🇸🇴":"1f1f8-1f1f4","🇸🇷":"1f1f8-1f1f7","🇸🇸":"1f1f8-1f1f8","🇸🇹":"1f1f8-1f1f9","🇸🇻":"1f1f8-1f1fb","🇸🇽":"1f1f8-1f1fd","🇸🇾":"1f1f8-1f1fe","🇸🇿":"1f1f8-1f1ff","🇹🇦":"1f1f9-1f1e6","🇹🇨":"1f1f9-1f1e8","🇹🇩":"1f1f9-1f1e9","🇹🇫":"1f1f9-1f1eb","🇹🇬":"1f1f9-1f1ec","🇹🇭":"1f1f9-1f1ed","🇹🇯":"1f1f9-1f1ef","🇹🇰":"1f1f9-1f1f0","🇹🇱":"1f1f9-1f1f1","🇹🇲":"1f1f9-1f1f2","🇹🇳":"1f1f9-1f1f3","🇹🇴":"1f1f9-1f1f4","🇹🇷":"1f1f9-1f1f7","🇹🇹":"1f1f9-1f1f9","🇹🇻":"1f1f9-1f1fb","🇹🇼":"1f1f9-1f1fc","🇹🇿":"1f1f9-1f1ff","🇺🇦":"1f1fa-1f1e6","🇺🇬":"1f1fa-1f1ec","🇺🇲":"1f1fa-1f1f2","🇺🇳":"1f1fa-1f1f3","🇺🇸":"1f1fa-1f1f8","🇺🇾":"1f1fa-1f1fe","🇺🇿":"1f1fa-1f1ff","🇻🇦":"1f1fb-1f1e6","🇻🇨":"1f1fb-1f1e8","🇻🇪":"1f1fb-1f1ea","🇻🇬":"1f1fb-1f1ec","🇻🇮":"1f1fb-1f1ee","🇻🇳":"1f1fb-1f1f3","🇻🇺":"1f1fb-1f1fa","🇼🇫":"1f1fc-1f1eb","🇼🇸":"1f1fc-1f1f8","🇽🇰":"1f1fd-1f1f0","🇾🇪":"1f1fe-1f1ea","🇾🇹":"1f1fe-1f1f9","🇿🇦":"1f1ff-1f1e6","🇿🇲":"1f1ff-1f1f2","🇿🇼":"1f1ff-1f1fc","👨⚕":"1f468-200d-2695-fe0f","👩⚕":"1f469-200d-2695-fe0f","👨🎓":"1f468-200d-1f393","👩🎓":"1f469-200d-1f393","👨🏫":"1f468-200d-1f3eb","👩🏫":"1f469-200d-1f3eb","👨⚖":"1f468-200d-2696-fe0f","👩⚖":"1f469-200d-2696-fe0f","👨🌾":"1f468-200d-1f33e","👩🌾":"1f469-200d-1f33e","👨🍳":"1f468-200d-1f373","👩🍳":"1f469-200d-1f373","👨🔧":"1f468-200d-1f527","👩🔧":"1f469-200d-1f527","👨🏭":"1f468-200d-1f3ed","👩🏭":"1f469-200d-1f3ed","👨💼":"1f468-200d-1f4bc","👩💼":"1f469-200d-1f4bc","👨🔬":"1f468-200d-1f52c","👩🔬":"1f469-200d-1f52c","👨💻":"1f468-200d-1f4bb","👩💻":"1f469-200d-1f4bb","👨🎤":"1f468-200d-1f3a4","👩🎤":"1f469-200d-1f3a4","👨🎨":"1f468-200d-1f3a8","👩🎨":"1f469-200d-1f3a8","👨✈":"1f468-200d-2708-fe0f","👩✈":"1f469-200d-2708-fe0f","👨🚀":"1f468-200d-1f680","👩🚀":"1f469-200d-1f680","👨🚒":"1f468-200d-1f692","👩🚒":"1f469-200d-1f692","👮♂":"1f46e-200d-2642-fe0f","👮♀":"1f46e-200d-2640-fe0f","🕵♂":"1f575-fe0f-200d-2642-fe0f","🕵♀":"1f575-fe0f-200d-2640-fe0f","💂♂":"1f482-200d-2642-fe0f","💂♀":"1f482-200d-2640-fe0f","👷♂":"1f477-200d-2642-fe0f","👷♀":"1f477-200d-2640-fe0f","👳♂":"1f473-200d-2642-fe0f","👳♀":"1f473-200d-2640-fe0f","👱♂":"1f471-200d-2642-fe0f","👱♀":"1f471-200d-2640-fe0f","🧙♀":"1f9d9-200d-2640-fe0f","🧙♂":"1f9d9-200d-2642-fe0f","🧚♀":"1f9da-200d-2640-fe0f","🧚♂":"1f9da-200d-2642-fe0f","🧛♀":"1f9db-200d-2640-fe0f","🧛♂":"1f9db-200d-2642-fe0f","🧜♀":"1f9dc-200d-2640-fe0f","🧜♂":"1f9dc-200d-2642-fe0f","🧝♀":"1f9dd-200d-2640-fe0f","🧝♂":"1f9dd-200d-2642-fe0f","🧞♀":"1f9de-200d-2640-fe0f","🧞♂":"1f9de-200d-2642-fe0f","🧟♀":"1f9df-200d-2640-fe0f","🧟♂":"1f9df-200d-2642-fe0f","🙍♂":"1f64d-200d-2642-fe0f","🙍♀":"1f64d-200d-2640-fe0f","🙎♂":"1f64e-200d-2642-fe0f","🙎♀":"1f64e-200d-2640-fe0f","🙅♂":"1f645-200d-2642-fe0f","🙅♀":"1f645-200d-2640-fe0f","🙆♂":"1f646-200d-2642-fe0f","🙆♀":"1f646-200d-2640-fe0f","💁♂":"1f481-200d-2642-fe0f","💁♀":"1f481-200d-2640-fe0f","🙋♂":"1f64b-200d-2642-fe0f","🙋♀":"1f64b-200d-2640-fe0f","🙇♂":"1f647-200d-2642-fe0f","🙇♀":"1f647-200d-2640-fe0f","🤦♂":"1f926-200d-2642-fe0f","🤦♀":"1f926-200d-2640-fe0f","🤷♂":"1f937-200d-2642-fe0f","🤷♀":"1f937-200d-2640-fe0f","💆♂":"1f486-200d-2642-fe0f","💆♀":"1f486-200d-2640-fe0f","💇♂":"1f487-200d-2642-fe0f","💇♀":"1f487-200d-2640-fe0f","🚶♂":"1f6b6-200d-2642-fe0f","🚶♀":"1f6b6-200d-2640-fe0f","🏃♂":"1f3c3-200d-2642-fe0f","🏃♀":"1f3c3-200d-2640-fe0f","👯♂":"1f46f-200d-2642-fe0f","👯♀":"1f46f-200d-2640-fe0f","🧖♀":"1f9d6-200d-2640-fe0f","🧖♂":"1f9d6-200d-2642-fe0f","🧗♀":"1f9d7-200d-2640-fe0f","🧗♂":"1f9d7-200d-2642-fe0f","🧘♀":"1f9d8-200d-2640-fe0f","🧘♂":"1f9d8-200d-2642-fe0f","🏌♂":"1f3cc-fe0f-200d-2642-fe0f","🏌♀":"1f3cc-fe0f-200d-2640-fe0f","🏄♂":"1f3c4-200d-2642-fe0f","🏄♀":"1f3c4-200d-2640-fe0f","🚣♂":"1f6a3-200d-2642-fe0f","🚣♀":"1f6a3-200d-2640-fe0f","🏊♂":"1f3ca-200d-2642-fe0f","🏊♀":"1f3ca-200d-2640-fe0f","⛹♂":"26f9-fe0f-200d-2642-fe0f","⛹♀":"26f9-fe0f-200d-2640-fe0f","🏋♂":"1f3cb-fe0f-200d-2642-fe0f","🏋♀":"1f3cb-fe0f-200d-2640-fe0f","🚴♂":"1f6b4-200d-2642-fe0f","🚴♀":"1f6b4-200d-2640-fe0f","🚵♂":"1f6b5-200d-2642-fe0f","🚵♀":"1f6b5-200d-2640-fe0f","🤸♂":"1f938-200d-2642-fe0f","🤸♀":"1f938-200d-2640-fe0f","🤼♂":"1f93c-200d-2642-fe0f","🤼♀":"1f93c-200d-2640-fe0f","🤽♂":"1f93d-200d-2642-fe0f","🤽♀":"1f93d-200d-2640-fe0f","🤾♂":"1f93e-200d-2642-fe0f","🤾♀":"1f93e-200d-2640-fe0f","🤹♂":"1f939-200d-2642-fe0f","🤹♀":"1f939-200d-2640-fe0f","👨👦":"1f468-200d-1f466","👨👧":"1f468-200d-1f467","👩👦":"1f469-200d-1f466","👩👧":"1f469-200d-1f467","👁🗨":"1f441-200d-1f5e8","#️⃣":"23-20e3","*️⃣":"2a-20e3","0️⃣":"30-20e3","1️⃣":"31-20e3","2️⃣":"32-20e3","3️⃣":"33-20e3","4️⃣":"34-20e3","5️⃣":"35-20e3","6️⃣":"36-20e3","7️⃣":"37-20e3","8️⃣":"38-20e3","9️⃣":"39-20e3","🏳🌈":"1f3f3-fe0f-200d-1f308","👨⚕️":"1f468-200d-2695-fe0f","👨🏻⚕":"1f468-1f3fb-200d-2695-fe0f","👨🏼⚕":"1f468-1f3fc-200d-2695-fe0f","👨🏽⚕":"1f468-1f3fd-200d-2695-fe0f","👨🏾⚕":"1f468-1f3fe-200d-2695-fe0f","👨🏿⚕":"1f468-1f3ff-200d-2695-fe0f","👩⚕️":"1f469-200d-2695-fe0f","👩🏻⚕":"1f469-1f3fb-200d-2695-fe0f","👩🏼⚕":"1f469-1f3fc-200d-2695-fe0f","👩🏽⚕":"1f469-1f3fd-200d-2695-fe0f","👩🏾⚕":"1f469-1f3fe-200d-2695-fe0f","👩🏿⚕":"1f469-1f3ff-200d-2695-fe0f","👨🏻🎓":"1f468-1f3fb-200d-1f393","👨🏼🎓":"1f468-1f3fc-200d-1f393","👨🏽🎓":"1f468-1f3fd-200d-1f393","👨🏾🎓":"1f468-1f3fe-200d-1f393","👨🏿🎓":"1f468-1f3ff-200d-1f393","👩🏻🎓":"1f469-1f3fb-200d-1f393","👩🏼🎓":"1f469-1f3fc-200d-1f393","👩🏽🎓":"1f469-1f3fd-200d-1f393","👩🏾🎓":"1f469-1f3fe-200d-1f393","👩🏿🎓":"1f469-1f3ff-200d-1f393","👨🏻🏫":"1f468-1f3fb-200d-1f3eb","👨🏼🏫":"1f468-1f3fc-200d-1f3eb","👨🏽🏫":"1f468-1f3fd-200d-1f3eb","👨🏾🏫":"1f468-1f3fe-200d-1f3eb","👨🏿🏫":"1f468-1f3ff-200d-1f3eb","👩🏻🏫":"1f469-1f3fb-200d-1f3eb","👩🏼🏫":"1f469-1f3fc-200d-1f3eb","👩🏽🏫":"1f469-1f3fd-200d-1f3eb","👩🏾🏫":"1f469-1f3fe-200d-1f3eb","👩🏿🏫":"1f469-1f3ff-200d-1f3eb","👨⚖️":"1f468-200d-2696-fe0f","👨🏻⚖":"1f468-1f3fb-200d-2696-fe0f","👨🏼⚖":"1f468-1f3fc-200d-2696-fe0f","👨🏽⚖":"1f468-1f3fd-200d-2696-fe0f","👨🏾⚖":"1f468-1f3fe-200d-2696-fe0f","👨🏿⚖":"1f468-1f3ff-200d-2696-fe0f","👩⚖️":"1f469-200d-2696-fe0f","👩🏻⚖":"1f469-1f3fb-200d-2696-fe0f","👩🏼⚖":"1f469-1f3fc-200d-2696-fe0f","👩🏽⚖":"1f469-1f3fd-200d-2696-fe0f","👩🏾⚖":"1f469-1f3fe-200d-2696-fe0f","👩🏿⚖":"1f469-1f3ff-200d-2696-fe0f","👨🏻🌾":"1f468-1f3fb-200d-1f33e","👨🏼🌾":"1f468-1f3fc-200d-1f33e","👨🏽🌾":"1f468-1f3fd-200d-1f33e","👨🏾🌾":"1f468-1f3fe-200d-1f33e","👨🏿🌾":"1f468-1f3ff-200d-1f33e","👩🏻🌾":"1f469-1f3fb-200d-1f33e","👩🏼🌾":"1f469-1f3fc-200d-1f33e","👩🏽🌾":"1f469-1f3fd-200d-1f33e","👩🏾🌾":"1f469-1f3fe-200d-1f33e","👩🏿🌾":"1f469-1f3ff-200d-1f33e","👨🏻🍳":"1f468-1f3fb-200d-1f373","👨🏼🍳":"1f468-1f3fc-200d-1f373","👨🏽🍳":"1f468-1f3fd-200d-1f373","👨🏾🍳":"1f468-1f3fe-200d-1f373","👨🏿🍳":"1f468-1f3ff-200d-1f373","👩🏻🍳":"1f469-1f3fb-200d-1f373","👩🏼🍳":"1f469-1f3fc-200d-1f373","👩🏽🍳":"1f469-1f3fd-200d-1f373","👩🏾🍳":"1f469-1f3fe-200d-1f373","👩🏿🍳":"1f469-1f3ff-200d-1f373","👨🏻🔧":"1f468-1f3fb-200d-1f527","👨🏼🔧":"1f468-1f3fc-200d-1f527","👨🏽🔧":"1f468-1f3fd-200d-1f527","👨🏾🔧":"1f468-1f3fe-200d-1f527","👨🏿🔧":"1f468-1f3ff-200d-1f527","👩🏻🔧":"1f469-1f3fb-200d-1f527","👩🏼🔧":"1f469-1f3fc-200d-1f527","👩🏽🔧":"1f469-1f3fd-200d-1f527","👩🏾🔧":"1f469-1f3fe-200d-1f527","👩🏿🔧":"1f469-1f3ff-200d-1f527","👨🏻🏭":"1f468-1f3fb-200d-1f3ed","👨🏼🏭":"1f468-1f3fc-200d-1f3ed","👨🏽🏭":"1f468-1f3fd-200d-1f3ed","👨🏾🏭":"1f468-1f3fe-200d-1f3ed","👨🏿🏭":"1f468-1f3ff-200d-1f3ed","👩🏻🏭":"1f469-1f3fb-200d-1f3ed","👩🏼🏭":"1f469-1f3fc-200d-1f3ed","👩🏽🏭":"1f469-1f3fd-200d-1f3ed","👩🏾🏭":"1f469-1f3fe-200d-1f3ed","👩🏿🏭":"1f469-1f3ff-200d-1f3ed","👨🏻💼":"1f468-1f3fb-200d-1f4bc","👨🏼💼":"1f468-1f3fc-200d-1f4bc","👨🏽💼":"1f468-1f3fd-200d-1f4bc","👨🏾💼":"1f468-1f3fe-200d-1f4bc","👨🏿💼":"1f468-1f3ff-200d-1f4bc","👩🏻💼":"1f469-1f3fb-200d-1f4bc","👩🏼💼":"1f469-1f3fc-200d-1f4bc","👩🏽💼":"1f469-1f3fd-200d-1f4bc","👩🏾💼":"1f469-1f3fe-200d-1f4bc","👩🏿💼":"1f469-1f3ff-200d-1f4bc","👨🏻🔬":"1f468-1f3fb-200d-1f52c","👨🏼🔬":"1f468-1f3fc-200d-1f52c","👨🏽🔬":"1f468-1f3fd-200d-1f52c","👨🏾🔬":"1f468-1f3fe-200d-1f52c","👨🏿🔬":"1f468-1f3ff-200d-1f52c","👩🏻🔬":"1f469-1f3fb-200d-1f52c","👩🏼🔬":"1f469-1f3fc-200d-1f52c","👩🏽🔬":"1f469-1f3fd-200d-1f52c","👩🏾🔬":"1f469-1f3fe-200d-1f52c","👩🏿🔬":"1f469-1f3ff-200d-1f52c","👨🏻💻":"1f468-1f3fb-200d-1f4bb","👨🏼💻":"1f468-1f3fc-200d-1f4bb","👨🏽💻":"1f468-1f3fd-200d-1f4bb","👨🏾💻":"1f468-1f3fe-200d-1f4bb","👨🏿💻":"1f468-1f3ff-200d-1f4bb","👩🏻💻":"1f469-1f3fb-200d-1f4bb","👩🏼💻":"1f469-1f3fc-200d-1f4bb","👩🏽💻":"1f469-1f3fd-200d-1f4bb","👩🏾💻":"1f469-1f3fe-200d-1f4bb","👩🏿💻":"1f469-1f3ff-200d-1f4bb","👨🏻🎤":"1f468-1f3fb-200d-1f3a4","👨🏼🎤":"1f468-1f3fc-200d-1f3a4","👨🏽🎤":"1f468-1f3fd-200d-1f3a4","👨🏾🎤":"1f468-1f3fe-200d-1f3a4","👨🏿🎤":"1f468-1f3ff-200d-1f3a4","👩🏻🎤":"1f469-1f3fb-200d-1f3a4","👩🏼🎤":"1f469-1f3fc-200d-1f3a4","👩🏽🎤":"1f469-1f3fd-200d-1f3a4","👩🏾🎤":"1f469-1f3fe-200d-1f3a4","👩🏿🎤":"1f469-1f3ff-200d-1f3a4","👨🏻🎨":"1f468-1f3fb-200d-1f3a8","👨🏼🎨":"1f468-1f3fc-200d-1f3a8","👨🏽🎨":"1f468-1f3fd-200d-1f3a8","👨🏾🎨":"1f468-1f3fe-200d-1f3a8","👨🏿🎨":"1f468-1f3ff-200d-1f3a8","👩🏻🎨":"1f469-1f3fb-200d-1f3a8","👩🏼🎨":"1f469-1f3fc-200d-1f3a8","👩🏽🎨":"1f469-1f3fd-200d-1f3a8","👩🏾🎨":"1f469-1f3fe-200d-1f3a8","👩🏿🎨":"1f469-1f3ff-200d-1f3a8","👨✈️":"1f468-200d-2708-fe0f","👨🏻✈":"1f468-1f3fb-200d-2708-fe0f","👨🏼✈":"1f468-1f3fc-200d-2708-fe0f","👨🏽✈":"1f468-1f3fd-200d-2708-fe0f","👨🏾✈":"1f468-1f3fe-200d-2708-fe0f","👨🏿✈":"1f468-1f3ff-200d-2708-fe0f","👩✈️":"1f469-200d-2708-fe0f","👩🏻✈":"1f469-1f3fb-200d-2708-fe0f","👩🏼✈":"1f469-1f3fc-200d-2708-fe0f","👩🏽✈":"1f469-1f3fd-200d-2708-fe0f","👩🏾✈":"1f469-1f3fe-200d-2708-fe0f","👩🏿✈":"1f469-1f3ff-200d-2708-fe0f","👨🏻🚀":"1f468-1f3fb-200d-1f680","👨🏼🚀":"1f468-1f3fc-200d-1f680","👨🏽🚀":"1f468-1f3fd-200d-1f680","👨🏾🚀":"1f468-1f3fe-200d-1f680","👨🏿🚀":"1f468-1f3ff-200d-1f680","👩🏻🚀":"1f469-1f3fb-200d-1f680","👩🏼🚀":"1f469-1f3fc-200d-1f680","👩🏽🚀":"1f469-1f3fd-200d-1f680","👩🏾🚀":"1f469-1f3fe-200d-1f680","👩🏿🚀":"1f469-1f3ff-200d-1f680","👨🏻🚒":"1f468-1f3fb-200d-1f692","👨🏼🚒":"1f468-1f3fc-200d-1f692","👨🏽🚒":"1f468-1f3fd-200d-1f692","👨🏾🚒":"1f468-1f3fe-200d-1f692","👨🏿🚒":"1f468-1f3ff-200d-1f692","👩🏻🚒":"1f469-1f3fb-200d-1f692","👩🏼🚒":"1f469-1f3fc-200d-1f692","👩🏽🚒":"1f469-1f3fd-200d-1f692","👩🏾🚒":"1f469-1f3fe-200d-1f692","👩🏿🚒":"1f469-1f3ff-200d-1f692","👮♂️":"1f46e-200d-2642-fe0f","👮🏻♂":"1f46e-1f3fb-200d-2642-fe0f","👮🏼♂":"1f46e-1f3fc-200d-2642-fe0f","👮🏽♂":"1f46e-1f3fd-200d-2642-fe0f","👮🏾♂":"1f46e-1f3fe-200d-2642-fe0f","👮🏿♂":"1f46e-1f3ff-200d-2642-fe0f","👮♀️":"1f46e-200d-2640-fe0f","👮🏻♀":"1f46e-1f3fb-200d-2640-fe0f","👮🏼♀":"1f46e-1f3fc-200d-2640-fe0f","👮🏽♀":"1f46e-1f3fd-200d-2640-fe0f","👮🏾♀":"1f46e-1f3fe-200d-2640-fe0f","👮🏿♀":"1f46e-1f3ff-200d-2640-fe0f","🕵♂️":"1f575-fe0f-200d-2642-fe0f","🕵️♂":"1f575-fe0f-200d-2642-fe0f","🕵🏻♂":"1f575-1f3fb-200d-2642-fe0f","🕵🏼♂":"1f575-1f3fc-200d-2642-fe0f","🕵🏽♂":"1f575-1f3fd-200d-2642-fe0f","🕵🏾♂":"1f575-1f3fe-200d-2642-fe0f","🕵🏿♂":"1f575-1f3ff-200d-2642-fe0f","🕵♀️":"1f575-fe0f-200d-2640-fe0f","🕵️♀":"1f575-fe0f-200d-2640-fe0f","🕵🏻♀":"1f575-1f3fb-200d-2640-fe0f","🕵🏼♀":"1f575-1f3fc-200d-2640-fe0f","🕵🏽♀":"1f575-1f3fd-200d-2640-fe0f","🕵🏾♀":"1f575-1f3fe-200d-2640-fe0f","🕵🏿♀":"1f575-1f3ff-200d-2640-fe0f","💂♂️":"1f482-200d-2642-fe0f","💂🏻♂":"1f482-1f3fb-200d-2642-fe0f","💂🏼♂":"1f482-1f3fc-200d-2642-fe0f","💂🏽♂":"1f482-1f3fd-200d-2642-fe0f","💂🏾♂":"1f482-1f3fe-200d-2642-fe0f","💂🏿♂":"1f482-1f3ff-200d-2642-fe0f","💂♀️":"1f482-200d-2640-fe0f","💂🏻♀":"1f482-1f3fb-200d-2640-fe0f","💂🏼♀":"1f482-1f3fc-200d-2640-fe0f","💂🏽♀":"1f482-1f3fd-200d-2640-fe0f","💂🏾♀":"1f482-1f3fe-200d-2640-fe0f","💂🏿♀":"1f482-1f3ff-200d-2640-fe0f","👷♂️":"1f477-200d-2642-fe0f","👷🏻♂":"1f477-1f3fb-200d-2642-fe0f","👷🏼♂":"1f477-1f3fc-200d-2642-fe0f","👷🏽♂":"1f477-1f3fd-200d-2642-fe0f","👷🏾♂":"1f477-1f3fe-200d-2642-fe0f","👷🏿♂":"1f477-1f3ff-200d-2642-fe0f","👷♀️":"1f477-200d-2640-fe0f","👷🏻♀":"1f477-1f3fb-200d-2640-fe0f","👷🏼♀":"1f477-1f3fc-200d-2640-fe0f","👷🏽♀":"1f477-1f3fd-200d-2640-fe0f","👷🏾♀":"1f477-1f3fe-200d-2640-fe0f","👷🏿♀":"1f477-1f3ff-200d-2640-fe0f","👳♂️":"1f473-200d-2642-fe0f","👳🏻♂":"1f473-1f3fb-200d-2642-fe0f","👳🏼♂":"1f473-1f3fc-200d-2642-fe0f","👳🏽♂":"1f473-1f3fd-200d-2642-fe0f","👳🏾♂":"1f473-1f3fe-200d-2642-fe0f","👳🏿♂":"1f473-1f3ff-200d-2642-fe0f","👳♀️":"1f473-200d-2640-fe0f","👳🏻♀":"1f473-1f3fb-200d-2640-fe0f","👳🏼♀":"1f473-1f3fc-200d-2640-fe0f","👳🏽♀":"1f473-1f3fd-200d-2640-fe0f","👳🏾♀":"1f473-1f3fe-200d-2640-fe0f","👳🏿♀":"1f473-1f3ff-200d-2640-fe0f","👱♂️":"1f471-200d-2642-fe0f","👱🏻♂":"1f471-1f3fb-200d-2642-fe0f","👱🏼♂":"1f471-1f3fc-200d-2642-fe0f","👱🏽♂":"1f471-1f3fd-200d-2642-fe0f","👱🏾♂":"1f471-1f3fe-200d-2642-fe0f","👱🏿♂":"1f471-1f3ff-200d-2642-fe0f","👱♀️":"1f471-200d-2640-fe0f","👱🏻♀":"1f471-1f3fb-200d-2640-fe0f","👱🏼♀":"1f471-1f3fc-200d-2640-fe0f","👱🏽♀":"1f471-1f3fd-200d-2640-fe0f","👱🏾♀":"1f471-1f3fe-200d-2640-fe0f","👱🏿♀":"1f471-1f3ff-200d-2640-fe0f","🧙♀️":"1f9d9-200d-2640-fe0f","🧙🏻♀":"1f9d9-1f3fb-200d-2640-fe0f","🧙🏼♀":"1f9d9-1f3fc-200d-2640-fe0f","🧙🏽♀":"1f9d9-1f3fd-200d-2640-fe0f","🧙🏾♀":"1f9d9-1f3fe-200d-2640-fe0f","🧙🏿♀":"1f9d9-1f3ff-200d-2640-fe0f","🧙♂️":"1f9d9-200d-2642-fe0f","🧙🏻♂":"1f9d9-1f3fb-200d-2642-fe0f","🧙🏼♂":"1f9d9-1f3fc-200d-2642-fe0f","🧙🏽♂":"1f9d9-1f3fd-200d-2642-fe0f","🧙🏾♂":"1f9d9-1f3fe-200d-2642-fe0f","🧙🏿♂":"1f9d9-1f3ff-200d-2642-fe0f","🧚♀️":"1f9da-200d-2640-fe0f","🧚🏻♀":"1f9da-1f3fb-200d-2640-fe0f","🧚🏼♀":"1f9da-1f3fc-200d-2640-fe0f","🧚🏽♀":"1f9da-1f3fd-200d-2640-fe0f","🧚🏾♀":"1f9da-1f3fe-200d-2640-fe0f","🧚🏿♀":"1f9da-1f3ff-200d-2640-fe0f","🧚♂️":"1f9da-200d-2642-fe0f","🧚🏻♂":"1f9da-1f3fb-200d-2642-fe0f","🧚🏼♂":"1f9da-1f3fc-200d-2642-fe0f","🧚🏽♂":"1f9da-1f3fd-200d-2642-fe0f","🧚🏾♂":"1f9da-1f3fe-200d-2642-fe0f","🧚🏿♂":"1f9da-1f3ff-200d-2642-fe0f","🧛♀️":"1f9db-200d-2640-fe0f","🧛🏻♀":"1f9db-1f3fb-200d-2640-fe0f","🧛🏼♀":"1f9db-1f3fc-200d-2640-fe0f","🧛🏽♀":"1f9db-1f3fd-200d-2640-fe0f","🧛🏾♀":"1f9db-1f3fe-200d-2640-fe0f","🧛🏿♀":"1f9db-1f3ff-200d-2640-fe0f","🧛♂️":"1f9db-200d-2642-fe0f","🧛🏻♂":"1f9db-1f3fb-200d-2642-fe0f","🧛🏼♂":"1f9db-1f3fc-200d-2642-fe0f","🧛🏽♂":"1f9db-1f3fd-200d-2642-fe0f","🧛🏾♂":"1f9db-1f3fe-200d-2642-fe0f","🧛🏿♂":"1f9db-1f3ff-200d-2642-fe0f","🧜♀️":"1f9dc-200d-2640-fe0f","🧜🏻♀":"1f9dc-1f3fb-200d-2640-fe0f","🧜🏼♀":"1f9dc-1f3fc-200d-2640-fe0f","🧜🏽♀":"1f9dc-1f3fd-200d-2640-fe0f","🧜🏾♀":"1f9dc-1f3fe-200d-2640-fe0f","🧜🏿♀":"1f9dc-1f3ff-200d-2640-fe0f","🧜♂️":"1f9dc-200d-2642-fe0f","🧜🏻♂":"1f9dc-1f3fb-200d-2642-fe0f","🧜🏼♂":"1f9dc-1f3fc-200d-2642-fe0f","🧜🏽♂":"1f9dc-1f3fd-200d-2642-fe0f","🧜🏾♂":"1f9dc-1f3fe-200d-2642-fe0f","🧜🏿♂":"1f9dc-1f3ff-200d-2642-fe0f","🧝♀️":"1f9dd-200d-2640-fe0f","🧝🏻♀":"1f9dd-1f3fb-200d-2640-fe0f","🧝🏼♀":"1f9dd-1f3fc-200d-2640-fe0f","🧝🏽♀":"1f9dd-1f3fd-200d-2640-fe0f","🧝🏾♀":"1f9dd-1f3fe-200d-2640-fe0f","🧝🏿♀":"1f9dd-1f3ff-200d-2640-fe0f","🧝♂️":"1f9dd-200d-2642-fe0f","🧝🏻♂":"1f9dd-1f3fb-200d-2642-fe0f","🧝🏼♂":"1f9dd-1f3fc-200d-2642-fe0f","🧝🏽♂":"1f9dd-1f3fd-200d-2642-fe0f","🧝🏾♂":"1f9dd-1f3fe-200d-2642-fe0f","🧝🏿♂":"1f9dd-1f3ff-200d-2642-fe0f","🧞♀️":"1f9de-200d-2640-fe0f","🧞♂️":"1f9de-200d-2642-fe0f","🧟♀️":"1f9df-200d-2640-fe0f","🧟♂️":"1f9df-200d-2642-fe0f","🙍♂️":"1f64d-200d-2642-fe0f","🙍🏻♂":"1f64d-1f3fb-200d-2642-fe0f","🙍🏼♂":"1f64d-1f3fc-200d-2642-fe0f","🙍🏽♂":"1f64d-1f3fd-200d-2642-fe0f","🙍🏾♂":"1f64d-1f3fe-200d-2642-fe0f","🙍🏿♂":"1f64d-1f3ff-200d-2642-fe0f","🙍♀️":"1f64d-200d-2640-fe0f","🙍🏻♀":"1f64d-1f3fb-200d-2640-fe0f","🙍🏼♀":"1f64d-1f3fc-200d-2640-fe0f","🙍🏽♀":"1f64d-1f3fd-200d-2640-fe0f","🙍🏾♀":"1f64d-1f3fe-200d-2640-fe0f","🙍🏿♀":"1f64d-1f3ff-200d-2640-fe0f","🙎♂️":"1f64e-200d-2642-fe0f","🙎🏻♂":"1f64e-1f3fb-200d-2642-fe0f","🙎🏼♂":"1f64e-1f3fc-200d-2642-fe0f","🙎🏽♂":"1f64e-1f3fd-200d-2642-fe0f","🙎🏾♂":"1f64e-1f3fe-200d-2642-fe0f","🙎🏿♂":"1f64e-1f3ff-200d-2642-fe0f","🙎♀️":"1f64e-200d-2640-fe0f","🙎🏻♀":"1f64e-1f3fb-200d-2640-fe0f","🙎🏼♀":"1f64e-1f3fc-200d-2640-fe0f","🙎🏽♀":"1f64e-1f3fd-200d-2640-fe0f","🙎🏾♀":"1f64e-1f3fe-200d-2640-fe0f","🙎🏿♀":"1f64e-1f3ff-200d-2640-fe0f","🙅♂️":"1f645-200d-2642-fe0f","🙅🏻♂":"1f645-1f3fb-200d-2642-fe0f","🙅🏼♂":"1f645-1f3fc-200d-2642-fe0f","🙅🏽♂":"1f645-1f3fd-200d-2642-fe0f","🙅🏾♂":"1f645-1f3fe-200d-2642-fe0f","🙅🏿♂":"1f645-1f3ff-200d-2642-fe0f","🙅♀️":"1f645-200d-2640-fe0f","🙅🏻♀":"1f645-1f3fb-200d-2640-fe0f","🙅🏼♀":"1f645-1f3fc-200d-2640-fe0f","🙅🏽♀":"1f645-1f3fd-200d-2640-fe0f","🙅🏾♀":"1f645-1f3fe-200d-2640-fe0f","🙅🏿♀":"1f645-1f3ff-200d-2640-fe0f","🙆♂️":"1f646-200d-2642-fe0f","🙆🏻♂":"1f646-1f3fb-200d-2642-fe0f","🙆🏼♂":"1f646-1f3fc-200d-2642-fe0f","🙆🏽♂":"1f646-1f3fd-200d-2642-fe0f","🙆🏾♂":"1f646-1f3fe-200d-2642-fe0f","🙆🏿♂":"1f646-1f3ff-200d-2642-fe0f","🙆♀️":"1f646-200d-2640-fe0f","🙆🏻♀":"1f646-1f3fb-200d-2640-fe0f","🙆🏼♀":"1f646-1f3fc-200d-2640-fe0f","🙆🏽♀":"1f646-1f3fd-200d-2640-fe0f","🙆🏾♀":"1f646-1f3fe-200d-2640-fe0f","🙆🏿♀":"1f646-1f3ff-200d-2640-fe0f","💁♂️":"1f481-200d-2642-fe0f","💁🏻♂":"1f481-1f3fb-200d-2642-fe0f","💁🏼♂":"1f481-1f3fc-200d-2642-fe0f","💁🏽♂":"1f481-1f3fd-200d-2642-fe0f","💁🏾♂":"1f481-1f3fe-200d-2642-fe0f","💁🏿♂":"1f481-1f3ff-200d-2642-fe0f","💁♀️":"1f481-200d-2640-fe0f","💁🏻♀":"1f481-1f3fb-200d-2640-fe0f","💁🏼♀":"1f481-1f3fc-200d-2640-fe0f","💁🏽♀":"1f481-1f3fd-200d-2640-fe0f","💁🏾♀":"1f481-1f3fe-200d-2640-fe0f","💁🏿♀":"1f481-1f3ff-200d-2640-fe0f","🙋♂️":"1f64b-200d-2642-fe0f","🙋🏻♂":"1f64b-1f3fb-200d-2642-fe0f","🙋🏼♂":"1f64b-1f3fc-200d-2642-fe0f","🙋🏽♂":"1f64b-1f3fd-200d-2642-fe0f","🙋🏾♂":"1f64b-1f3fe-200d-2642-fe0f","🙋🏿♂":"1f64b-1f3ff-200d-2642-fe0f","🙋♀️":"1f64b-200d-2640-fe0f","🙋🏻♀":"1f64b-1f3fb-200d-2640-fe0f","🙋🏼♀":"1f64b-1f3fc-200d-2640-fe0f","🙋🏽♀":"1f64b-1f3fd-200d-2640-fe0f","🙋🏾♀":"1f64b-1f3fe-200d-2640-fe0f","🙋🏿♀":"1f64b-1f3ff-200d-2640-fe0f","🙇♂️":"1f647-200d-2642-fe0f","🙇🏻♂":"1f647-1f3fb-200d-2642-fe0f","🙇🏼♂":"1f647-1f3fc-200d-2642-fe0f","🙇🏽♂":"1f647-1f3fd-200d-2642-fe0f","🙇🏾♂":"1f647-1f3fe-200d-2642-fe0f","🙇🏿♂":"1f647-1f3ff-200d-2642-fe0f","🙇♀️":"1f647-200d-2640-fe0f","🙇🏻♀":"1f647-1f3fb-200d-2640-fe0f","🙇🏼♀":"1f647-1f3fc-200d-2640-fe0f","🙇🏽♀":"1f647-1f3fd-200d-2640-fe0f","🙇🏾♀":"1f647-1f3fe-200d-2640-fe0f","🙇🏿♀":"1f647-1f3ff-200d-2640-fe0f","🤦♂️":"1f926-200d-2642-fe0f","🤦🏻♂":"1f926-1f3fb-200d-2642-fe0f","🤦🏼♂":"1f926-1f3fc-200d-2642-fe0f","🤦🏽♂":"1f926-1f3fd-200d-2642-fe0f","🤦🏾♂":"1f926-1f3fe-200d-2642-fe0f","🤦🏿♂":"1f926-1f3ff-200d-2642-fe0f","🤦♀️":"1f926-200d-2640-fe0f","🤦🏻♀":"1f926-1f3fb-200d-2640-fe0f","🤦🏼♀":"1f926-1f3fc-200d-2640-fe0f","🤦🏽♀":"1f926-1f3fd-200d-2640-fe0f","🤦🏾♀":"1f926-1f3fe-200d-2640-fe0f","🤦🏿♀":"1f926-1f3ff-200d-2640-fe0f","🤷♂️":"1f937-200d-2642-fe0f","🤷🏻♂":"1f937-1f3fb-200d-2642-fe0f","🤷🏼♂":"1f937-1f3fc-200d-2642-fe0f","🤷🏽♂":"1f937-1f3fd-200d-2642-fe0f","🤷🏾♂":"1f937-1f3fe-200d-2642-fe0f","🤷🏿♂":"1f937-1f3ff-200d-2642-fe0f","🤷♀️":"1f937-200d-2640-fe0f","🤷🏻♀":"1f937-1f3fb-200d-2640-fe0f","🤷🏼♀":"1f937-1f3fc-200d-2640-fe0f","🤷🏽♀":"1f937-1f3fd-200d-2640-fe0f","🤷🏾♀":"1f937-1f3fe-200d-2640-fe0f","🤷🏿♀":"1f937-1f3ff-200d-2640-fe0f","💆♂️":"1f486-200d-2642-fe0f","💆🏻♂":"1f486-1f3fb-200d-2642-fe0f","💆🏼♂":"1f486-1f3fc-200d-2642-fe0f","💆🏽♂":"1f486-1f3fd-200d-2642-fe0f","💆🏾♂":"1f486-1f3fe-200d-2642-fe0f","💆🏿♂":"1f486-1f3ff-200d-2642-fe0f","💆♀️":"1f486-200d-2640-fe0f","💆🏻♀":"1f486-1f3fb-200d-2640-fe0f","💆🏼♀":"1f486-1f3fc-200d-2640-fe0f","💆🏽♀":"1f486-1f3fd-200d-2640-fe0f","💆🏾♀":"1f486-1f3fe-200d-2640-fe0f","💆🏿♀":"1f486-1f3ff-200d-2640-fe0f","💇♂️":"1f487-200d-2642-fe0f","💇🏻♂":"1f487-1f3fb-200d-2642-fe0f","💇🏼♂":"1f487-1f3fc-200d-2642-fe0f","💇🏽♂":"1f487-1f3fd-200d-2642-fe0f","💇🏾♂":"1f487-1f3fe-200d-2642-fe0f","💇🏿♂":"1f487-1f3ff-200d-2642-fe0f","💇♀️":"1f487-200d-2640-fe0f","💇🏻♀":"1f487-1f3fb-200d-2640-fe0f","💇🏼♀":"1f487-1f3fc-200d-2640-fe0f","💇🏽♀":"1f487-1f3fd-200d-2640-fe0f","💇🏾♀":"1f487-1f3fe-200d-2640-fe0f","💇🏿♀":"1f487-1f3ff-200d-2640-fe0f","🚶♂️":"1f6b6-200d-2642-fe0f","🚶🏻♂":"1f6b6-1f3fb-200d-2642-fe0f","🚶🏼♂":"1f6b6-1f3fc-200d-2642-fe0f","🚶🏽♂":"1f6b6-1f3fd-200d-2642-fe0f","🚶🏾♂":"1f6b6-1f3fe-200d-2642-fe0f","🚶🏿♂":"1f6b6-1f3ff-200d-2642-fe0f","🚶♀️":"1f6b6-200d-2640-fe0f","🚶🏻♀":"1f6b6-1f3fb-200d-2640-fe0f","🚶🏼♀":"1f6b6-1f3fc-200d-2640-fe0f","🚶🏽♀":"1f6b6-1f3fd-200d-2640-fe0f","🚶🏾♀":"1f6b6-1f3fe-200d-2640-fe0f","🚶🏿♀":"1f6b6-1f3ff-200d-2640-fe0f","🏃♂️":"1f3c3-200d-2642-fe0f","🏃🏻♂":"1f3c3-1f3fb-200d-2642-fe0f","🏃🏼♂":"1f3c3-1f3fc-200d-2642-fe0f","🏃🏽♂":"1f3c3-1f3fd-200d-2642-fe0f","🏃🏾♂":"1f3c3-1f3fe-200d-2642-fe0f","🏃🏿♂":"1f3c3-1f3ff-200d-2642-fe0f","🏃♀️":"1f3c3-200d-2640-fe0f","🏃🏻♀":"1f3c3-1f3fb-200d-2640-fe0f","🏃🏼♀":"1f3c3-1f3fc-200d-2640-fe0f","🏃🏽♀":"1f3c3-1f3fd-200d-2640-fe0f","🏃🏾♀":"1f3c3-1f3fe-200d-2640-fe0f","🏃🏿♀":"1f3c3-1f3ff-200d-2640-fe0f","👯♂️":"1f46f-200d-2642-fe0f","👯♀️":"1f46f-200d-2640-fe0f","🧖♀️":"1f9d6-200d-2640-fe0f","🧖🏻♀":"1f9d6-1f3fb-200d-2640-fe0f","🧖🏼♀":"1f9d6-1f3fc-200d-2640-fe0f","🧖🏽♀":"1f9d6-1f3fd-200d-2640-fe0f","🧖🏾♀":"1f9d6-1f3fe-200d-2640-fe0f","🧖🏿♀":"1f9d6-1f3ff-200d-2640-fe0f","🧖♂️":"1f9d6-200d-2642-fe0f","🧖🏻♂":"1f9d6-1f3fb-200d-2642-fe0f","🧖🏼♂":"1f9d6-1f3fc-200d-2642-fe0f","🧖🏽♂":"1f9d6-1f3fd-200d-2642-fe0f","🧖🏾♂":"1f9d6-1f3fe-200d-2642-fe0f","🧖🏿♂":"1f9d6-1f3ff-200d-2642-fe0f","🧗♀️":"1f9d7-200d-2640-fe0f","🧗🏻♀":"1f9d7-1f3fb-200d-2640-fe0f","🧗🏼♀":"1f9d7-1f3fc-200d-2640-fe0f","🧗🏽♀":"1f9d7-1f3fd-200d-2640-fe0f","🧗🏾♀":"1f9d7-1f3fe-200d-2640-fe0f","🧗🏿♀":"1f9d7-1f3ff-200d-2640-fe0f","🧗♂️":"1f9d7-200d-2642-fe0f","🧗🏻♂":"1f9d7-1f3fb-200d-2642-fe0f","🧗🏼♂":"1f9d7-1f3fc-200d-2642-fe0f","🧗🏽♂":"1f9d7-1f3fd-200d-2642-fe0f","🧗🏾♂":"1f9d7-1f3fe-200d-2642-fe0f","🧗🏿♂":"1f9d7-1f3ff-200d-2642-fe0f","🧘♀️":"1f9d8-200d-2640-fe0f","🧘🏻♀":"1f9d8-1f3fb-200d-2640-fe0f","🧘🏼♀":"1f9d8-1f3fc-200d-2640-fe0f","🧘🏽♀":"1f9d8-1f3fd-200d-2640-fe0f","🧘🏾♀":"1f9d8-1f3fe-200d-2640-fe0f","🧘🏿♀":"1f9d8-1f3ff-200d-2640-fe0f","🧘♂️":"1f9d8-200d-2642-fe0f","🧘🏻♂":"1f9d8-1f3fb-200d-2642-fe0f","🧘🏼♂":"1f9d8-1f3fc-200d-2642-fe0f","🧘🏽♂":"1f9d8-1f3fd-200d-2642-fe0f","🧘🏾♂":"1f9d8-1f3fe-200d-2642-fe0f","🧘🏿♂":"1f9d8-1f3ff-200d-2642-fe0f","🏌♂️":"1f3cc-fe0f-200d-2642-fe0f","🏌️♂":"1f3cc-fe0f-200d-2642-fe0f","🏌🏻♂":"1f3cc-1f3fb-200d-2642-fe0f","🏌🏼♂":"1f3cc-1f3fc-200d-2642-fe0f","🏌🏽♂":"1f3cc-1f3fd-200d-2642-fe0f","🏌🏾♂":"1f3cc-1f3fe-200d-2642-fe0f","🏌🏿♂":"1f3cc-1f3ff-200d-2642-fe0f","🏌♀️":"1f3cc-fe0f-200d-2640-fe0f","🏌️♀":"1f3cc-fe0f-200d-2640-fe0f","🏌🏻♀":"1f3cc-1f3fb-200d-2640-fe0f","🏌🏼♀":"1f3cc-1f3fc-200d-2640-fe0f","🏌🏽♀":"1f3cc-1f3fd-200d-2640-fe0f","🏌🏾♀":"1f3cc-1f3fe-200d-2640-fe0f","🏌🏿♀":"1f3cc-1f3ff-200d-2640-fe0f","🏄♂️":"1f3c4-200d-2642-fe0f","🏄🏻♂":"1f3c4-1f3fb-200d-2642-fe0f","🏄🏼♂":"1f3c4-1f3fc-200d-2642-fe0f","🏄🏽♂":"1f3c4-1f3fd-200d-2642-fe0f","🏄🏾♂":"1f3c4-1f3fe-200d-2642-fe0f","🏄🏿♂":"1f3c4-1f3ff-200d-2642-fe0f","🏄♀️":"1f3c4-200d-2640-fe0f","🏄🏻♀":"1f3c4-1f3fb-200d-2640-fe0f","🏄🏼♀":"1f3c4-1f3fc-200d-2640-fe0f","🏄🏽♀":"1f3c4-1f3fd-200d-2640-fe0f","🏄🏾♀":"1f3c4-1f3fe-200d-2640-fe0f","🏄🏿♀":"1f3c4-1f3ff-200d-2640-fe0f","🚣♂️":"1f6a3-200d-2642-fe0f","🚣🏻♂":"1f6a3-1f3fb-200d-2642-fe0f","🚣🏼♂":"1f6a3-1f3fc-200d-2642-fe0f","🚣🏽♂":"1f6a3-1f3fd-200d-2642-fe0f","🚣🏾♂":"1f6a3-1f3fe-200d-2642-fe0f","🚣🏿♂":"1f6a3-1f3ff-200d-2642-fe0f","🚣♀️":"1f6a3-200d-2640-fe0f","🚣🏻♀":"1f6a3-1f3fb-200d-2640-fe0f","🚣🏼♀":"1f6a3-1f3fc-200d-2640-fe0f","🚣🏽♀":"1f6a3-1f3fd-200d-2640-fe0f","🚣🏾♀":"1f6a3-1f3fe-200d-2640-fe0f","🚣🏿♀":"1f6a3-1f3ff-200d-2640-fe0f","🏊♂️":"1f3ca-200d-2642-fe0f","🏊🏻♂":"1f3ca-1f3fb-200d-2642-fe0f","🏊🏼♂":"1f3ca-1f3fc-200d-2642-fe0f","🏊🏽♂":"1f3ca-1f3fd-200d-2642-fe0f","🏊🏾♂":"1f3ca-1f3fe-200d-2642-fe0f","🏊🏿♂":"1f3ca-1f3ff-200d-2642-fe0f","🏊♀️":"1f3ca-200d-2640-fe0f","🏊🏻♀":"1f3ca-1f3fb-200d-2640-fe0f","🏊🏼♀":"1f3ca-1f3fc-200d-2640-fe0f","🏊🏽♀":"1f3ca-1f3fd-200d-2640-fe0f","🏊🏾♀":"1f3ca-1f3fe-200d-2640-fe0f","🏊🏿♀":"1f3ca-1f3ff-200d-2640-fe0f","⛹♂️":"26f9-fe0f-200d-2642-fe0f","⛹️♂":"26f9-fe0f-200d-2642-fe0f","⛹🏻♂":"26f9-1f3fb-200d-2642-fe0f","⛹🏼♂":"26f9-1f3fc-200d-2642-fe0f","⛹🏽♂":"26f9-1f3fd-200d-2642-fe0f","⛹🏾♂":"26f9-1f3fe-200d-2642-fe0f","⛹🏿♂":"26f9-1f3ff-200d-2642-fe0f","⛹♀️":"26f9-fe0f-200d-2640-fe0f","⛹️♀":"26f9-fe0f-200d-2640-fe0f","⛹🏻♀":"26f9-1f3fb-200d-2640-fe0f","⛹🏼♀":"26f9-1f3fc-200d-2640-fe0f","⛹🏽♀":"26f9-1f3fd-200d-2640-fe0f","⛹🏾♀":"26f9-1f3fe-200d-2640-fe0f","⛹🏿♀":"26f9-1f3ff-200d-2640-fe0f","🏋♂️":"1f3cb-fe0f-200d-2642-fe0f","🏋️♂":"1f3cb-fe0f-200d-2642-fe0f","🏋🏻♂":"1f3cb-1f3fb-200d-2642-fe0f","🏋🏼♂":"1f3cb-1f3fc-200d-2642-fe0f","🏋🏽♂":"1f3cb-1f3fd-200d-2642-fe0f","🏋🏾♂":"1f3cb-1f3fe-200d-2642-fe0f","🏋🏿♂":"1f3cb-1f3ff-200d-2642-fe0f","🏋♀️":"1f3cb-fe0f-200d-2640-fe0f","🏋️♀":"1f3cb-fe0f-200d-2640-fe0f","🏋🏻♀":"1f3cb-1f3fb-200d-2640-fe0f","🏋🏼♀":"1f3cb-1f3fc-200d-2640-fe0f","🏋🏽♀":"1f3cb-1f3fd-200d-2640-fe0f","🏋🏾♀":"1f3cb-1f3fe-200d-2640-fe0f","🏋🏿♀":"1f3cb-1f3ff-200d-2640-fe0f","🚴♂️":"1f6b4-200d-2642-fe0f","🚴🏻♂":"1f6b4-1f3fb-200d-2642-fe0f","🚴🏼♂":"1f6b4-1f3fc-200d-2642-fe0f","🚴🏽♂":"1f6b4-1f3fd-200d-2642-fe0f","🚴🏾♂":"1f6b4-1f3fe-200d-2642-fe0f","🚴🏿♂":"1f6b4-1f3ff-200d-2642-fe0f","🚴♀️":"1f6b4-200d-2640-fe0f","🚴🏻♀":"1f6b4-1f3fb-200d-2640-fe0f","🚴🏼♀":"1f6b4-1f3fc-200d-2640-fe0f","🚴🏽♀":"1f6b4-1f3fd-200d-2640-fe0f","🚴🏾♀":"1f6b4-1f3fe-200d-2640-fe0f","🚴🏿♀":"1f6b4-1f3ff-200d-2640-fe0f","🚵♂️":"1f6b5-200d-2642-fe0f","🚵🏻♂":"1f6b5-1f3fb-200d-2642-fe0f","🚵🏼♂":"1f6b5-1f3fc-200d-2642-fe0f","🚵🏽♂":"1f6b5-1f3fd-200d-2642-fe0f","🚵🏾♂":"1f6b5-1f3fe-200d-2642-fe0f","🚵🏿♂":"1f6b5-1f3ff-200d-2642-fe0f","🚵♀️":"1f6b5-200d-2640-fe0f","🚵🏻♀":"1f6b5-1f3fb-200d-2640-fe0f","🚵🏼♀":"1f6b5-1f3fc-200d-2640-fe0f","🚵🏽♀":"1f6b5-1f3fd-200d-2640-fe0f","🚵🏾♀":"1f6b5-1f3fe-200d-2640-fe0f","🚵🏿♀":"1f6b5-1f3ff-200d-2640-fe0f","🤸♂️":"1f938-200d-2642-fe0f","🤸🏻♂":"1f938-1f3fb-200d-2642-fe0f","🤸🏼♂":"1f938-1f3fc-200d-2642-fe0f","🤸🏽♂":"1f938-1f3fd-200d-2642-fe0f","🤸🏾♂":"1f938-1f3fe-200d-2642-fe0f","🤸🏿♂":"1f938-1f3ff-200d-2642-fe0f","🤸♀️":"1f938-200d-2640-fe0f","🤸🏻♀":"1f938-1f3fb-200d-2640-fe0f","🤸🏼♀":"1f938-1f3fc-200d-2640-fe0f","🤸🏽♀":"1f938-1f3fd-200d-2640-fe0f","🤸🏾♀":"1f938-1f3fe-200d-2640-fe0f","🤸🏿♀":"1f938-1f3ff-200d-2640-fe0f","🤼♂️":"1f93c-200d-2642-fe0f","🤼♀️":"1f93c-200d-2640-fe0f","🤽♂️":"1f93d-200d-2642-fe0f","🤽🏻♂":"1f93d-1f3fb-200d-2642-fe0f","🤽🏼♂":"1f93d-1f3fc-200d-2642-fe0f","🤽🏽♂":"1f93d-1f3fd-200d-2642-fe0f","🤽🏾♂":"1f93d-1f3fe-200d-2642-fe0f","🤽🏿♂":"1f93d-1f3ff-200d-2642-fe0f","🤽♀️":"1f93d-200d-2640-fe0f","🤽🏻♀":"1f93d-1f3fb-200d-2640-fe0f","🤽🏼♀":"1f93d-1f3fc-200d-2640-fe0f","🤽🏽♀":"1f93d-1f3fd-200d-2640-fe0f","🤽🏾♀":"1f93d-1f3fe-200d-2640-fe0f","🤽🏿♀":"1f93d-1f3ff-200d-2640-fe0f","🤾♂️":"1f93e-200d-2642-fe0f","🤾🏻♂":"1f93e-1f3fb-200d-2642-fe0f","🤾🏼♂":"1f93e-1f3fc-200d-2642-fe0f","🤾🏽♂":"1f93e-1f3fd-200d-2642-fe0f","🤾🏾♂":"1f93e-1f3fe-200d-2642-fe0f","🤾🏿♂":"1f93e-1f3ff-200d-2642-fe0f","🤾♀️":"1f93e-200d-2640-fe0f","🤾🏻♀":"1f93e-1f3fb-200d-2640-fe0f","🤾🏼♀":"1f93e-1f3fc-200d-2640-fe0f","🤾🏽♀":"1f93e-1f3fd-200d-2640-fe0f","🤾🏾♀":"1f93e-1f3fe-200d-2640-fe0f","🤾🏿♀":"1f93e-1f3ff-200d-2640-fe0f","🤹♂️":"1f939-200d-2642-fe0f","🤹🏻♂":"1f939-1f3fb-200d-2642-fe0f","🤹🏼♂":"1f939-1f3fc-200d-2642-fe0f","🤹🏽♂":"1f939-1f3fd-200d-2642-fe0f","🤹🏾♂":"1f939-1f3fe-200d-2642-fe0f","🤹🏿♂":"1f939-1f3ff-200d-2642-fe0f","🤹♀️":"1f939-200d-2640-fe0f","🤹🏻♀":"1f939-1f3fb-200d-2640-fe0f","🤹🏼♀":"1f939-1f3fc-200d-2640-fe0f","🤹🏽♀":"1f939-1f3fd-200d-2640-fe0f","🤹🏾♀":"1f939-1f3fe-200d-2640-fe0f","🤹🏿♀":"1f939-1f3ff-200d-2640-fe0f","👁🗨️":"1f441-200d-1f5e8","👁️🗨":"1f441-200d-1f5e8","🏳️🌈":"1f3f3-fe0f-200d-1f308","👨🏻⚕️":"1f468-1f3fb-200d-2695-fe0f","👨🏼⚕️":"1f468-1f3fc-200d-2695-fe0f","👨🏽⚕️":"1f468-1f3fd-200d-2695-fe0f","👨🏾⚕️":"1f468-1f3fe-200d-2695-fe0f","👨🏿⚕️":"1f468-1f3ff-200d-2695-fe0f","👩🏻⚕️":"1f469-1f3fb-200d-2695-fe0f","👩🏼⚕️":"1f469-1f3fc-200d-2695-fe0f","👩🏽⚕️":"1f469-1f3fd-200d-2695-fe0f","👩🏾⚕️":"1f469-1f3fe-200d-2695-fe0f","👩🏿⚕️":"1f469-1f3ff-200d-2695-fe0f","👨🏻⚖️":"1f468-1f3fb-200d-2696-fe0f","👨🏼⚖️":"1f468-1f3fc-200d-2696-fe0f","👨🏽⚖️":"1f468-1f3fd-200d-2696-fe0f","👨🏾⚖️":"1f468-1f3fe-200d-2696-fe0f","👨🏿⚖️":"1f468-1f3ff-200d-2696-fe0f","👩🏻⚖️":"1f469-1f3fb-200d-2696-fe0f","👩🏼⚖️":"1f469-1f3fc-200d-2696-fe0f","👩🏽⚖️":"1f469-1f3fd-200d-2696-fe0f","👩🏾⚖️":"1f469-1f3fe-200d-2696-fe0f","👩🏿⚖️":"1f469-1f3ff-200d-2696-fe0f","👨🏻✈️":"1f468-1f3fb-200d-2708-fe0f","👨🏼✈️":"1f468-1f3fc-200d-2708-fe0f","👨🏽✈️":"1f468-1f3fd-200d-2708-fe0f","👨🏾✈️":"1f468-1f3fe-200d-2708-fe0f","👨🏿✈️":"1f468-1f3ff-200d-2708-fe0f","👩🏻✈️":"1f469-1f3fb-200d-2708-fe0f","👩🏼✈️":"1f469-1f3fc-200d-2708-fe0f","👩🏽✈️":"1f469-1f3fd-200d-2708-fe0f","👩🏾✈️":"1f469-1f3fe-200d-2708-fe0f","👩🏿✈️":"1f469-1f3ff-200d-2708-fe0f","👮🏻♂️":"1f46e-1f3fb-200d-2642-fe0f","👮🏼♂️":"1f46e-1f3fc-200d-2642-fe0f","👮🏽♂️":"1f46e-1f3fd-200d-2642-fe0f","👮🏾♂️":"1f46e-1f3fe-200d-2642-fe0f","👮🏿♂️":"1f46e-1f3ff-200d-2642-fe0f","👮🏻♀️":"1f46e-1f3fb-200d-2640-fe0f","👮🏼♀️":"1f46e-1f3fc-200d-2640-fe0f","👮🏽♀️":"1f46e-1f3fd-200d-2640-fe0f","👮🏾♀️":"1f46e-1f3fe-200d-2640-fe0f","👮🏿♀️":"1f46e-1f3ff-200d-2640-fe0f","🕵️♂️":"1f575-fe0f-200d-2642-fe0f","🕵🏻♂️":"1f575-1f3fb-200d-2642-fe0f","🕵🏼♂️":"1f575-1f3fc-200d-2642-fe0f","🕵🏽♂️":"1f575-1f3fd-200d-2642-fe0f","🕵🏾♂️":"1f575-1f3fe-200d-2642-fe0f","🕵🏿♂️":"1f575-1f3ff-200d-2642-fe0f","🕵️♀️":"1f575-fe0f-200d-2640-fe0f","🕵🏻♀️":"1f575-1f3fb-200d-2640-fe0f","🕵🏼♀️":"1f575-1f3fc-200d-2640-fe0f","🕵🏽♀️":"1f575-1f3fd-200d-2640-fe0f","🕵🏾♀️":"1f575-1f3fe-200d-2640-fe0f","🕵🏿♀️":"1f575-1f3ff-200d-2640-fe0f","💂🏻♂️":"1f482-1f3fb-200d-2642-fe0f","💂🏼♂️":"1f482-1f3fc-200d-2642-fe0f","💂🏽♂️":"1f482-1f3fd-200d-2642-fe0f","💂🏾♂️":"1f482-1f3fe-200d-2642-fe0f","💂🏿♂️":"1f482-1f3ff-200d-2642-fe0f","💂🏻♀️":"1f482-1f3fb-200d-2640-fe0f","💂🏼♀️":"1f482-1f3fc-200d-2640-fe0f","💂🏽♀️":"1f482-1f3fd-200d-2640-fe0f","💂🏾♀️":"1f482-1f3fe-200d-2640-fe0f","💂🏿♀️":"1f482-1f3ff-200d-2640-fe0f","👷🏻♂️":"1f477-1f3fb-200d-2642-fe0f","👷🏼♂️":"1f477-1f3fc-200d-2642-fe0f","👷🏽♂️":"1f477-1f3fd-200d-2642-fe0f","👷🏾♂️":"1f477-1f3fe-200d-2642-fe0f","👷🏿♂️":"1f477-1f3ff-200d-2642-fe0f","👷🏻♀️":"1f477-1f3fb-200d-2640-fe0f","👷🏼♀️":"1f477-1f3fc-200d-2640-fe0f","👷🏽♀️":"1f477-1f3fd-200d-2640-fe0f","👷🏾♀️":"1f477-1f3fe-200d-2640-fe0f","👷🏿♀️":"1f477-1f3ff-200d-2640-fe0f","👳🏻♂️":"1f473-1f3fb-200d-2642-fe0f","👳🏼♂️":"1f473-1f3fc-200d-2642-fe0f","👳🏽♂️":"1f473-1f3fd-200d-2642-fe0f","👳🏾♂️":"1f473-1f3fe-200d-2642-fe0f","👳🏿♂️":"1f473-1f3ff-200d-2642-fe0f","👳🏻♀️":"1f473-1f3fb-200d-2640-fe0f","👳🏼♀️":"1f473-1f3fc-200d-2640-fe0f","👳🏽♀️":"1f473-1f3fd-200d-2640-fe0f","👳🏾♀️":"1f473-1f3fe-200d-2640-fe0f","👳🏿♀️":"1f473-1f3ff-200d-2640-fe0f","👱🏻♂️":"1f471-1f3fb-200d-2642-fe0f","👱🏼♂️":"1f471-1f3fc-200d-2642-fe0f","👱🏽♂️":"1f471-1f3fd-200d-2642-fe0f","👱🏾♂️":"1f471-1f3fe-200d-2642-fe0f","👱🏿♂️":"1f471-1f3ff-200d-2642-fe0f","👱🏻♀️":"1f471-1f3fb-200d-2640-fe0f","👱🏼♀️":"1f471-1f3fc-200d-2640-fe0f","👱🏽♀️":"1f471-1f3fd-200d-2640-fe0f","👱🏾♀️":"1f471-1f3fe-200d-2640-fe0f","👱🏿♀️":"1f471-1f3ff-200d-2640-fe0f","🧙🏻♀️":"1f9d9-1f3fb-200d-2640-fe0f","🧙🏼♀️":"1f9d9-1f3fc-200d-2640-fe0f","🧙🏽♀️":"1f9d9-1f3fd-200d-2640-fe0f","🧙🏾♀️":"1f9d9-1f3fe-200d-2640-fe0f","🧙🏿♀️":"1f9d9-1f3ff-200d-2640-fe0f","🧙🏻♂️":"1f9d9-1f3fb-200d-2642-fe0f","🧙🏼♂️":"1f9d9-1f3fc-200d-2642-fe0f","🧙🏽♂️":"1f9d9-1f3fd-200d-2642-fe0f","🧙🏾♂️":"1f9d9-1f3fe-200d-2642-fe0f","🧙🏿♂️":"1f9d9-1f3ff-200d-2642-fe0f","🧚🏻♀️":"1f9da-1f3fb-200d-2640-fe0f","🧚🏼♀️":"1f9da-1f3fc-200d-2640-fe0f","🧚🏽♀️":"1f9da-1f3fd-200d-2640-fe0f","🧚🏾♀️":"1f9da-1f3fe-200d-2640-fe0f","🧚🏿♀️":"1f9da-1f3ff-200d-2640-fe0f","🧚🏻♂️":"1f9da-1f3fb-200d-2642-fe0f","🧚🏼♂️":"1f9da-1f3fc-200d-2642-fe0f","🧚🏽♂️":"1f9da-1f3fd-200d-2642-fe0f","🧚🏾♂️":"1f9da-1f3fe-200d-2642-fe0f","🧚🏿♂️":"1f9da-1f3ff-200d-2642-fe0f","🧛🏻♀️":"1f9db-1f3fb-200d-2640-fe0f","🧛🏼♀️":"1f9db-1f3fc-200d-2640-fe0f","🧛🏽♀️":"1f9db-1f3fd-200d-2640-fe0f","🧛🏾♀️":"1f9db-1f3fe-200d-2640-fe0f","🧛🏿♀️":"1f9db-1f3ff-200d-2640-fe0f","🧛🏻♂️":"1f9db-1f3fb-200d-2642-fe0f","🧛🏼♂️":"1f9db-1f3fc-200d-2642-fe0f","🧛🏽♂️":"1f9db-1f3fd-200d-2642-fe0f","🧛🏾♂️":"1f9db-1f3fe-200d-2642-fe0f","🧛🏿♂️":"1f9db-1f3ff-200d-2642-fe0f","🧜🏻♀️":"1f9dc-1f3fb-200d-2640-fe0f","🧜🏼♀️":"1f9dc-1f3fc-200d-2640-fe0f","🧜🏽♀️":"1f9dc-1f3fd-200d-2640-fe0f","🧜🏾♀️":"1f9dc-1f3fe-200d-2640-fe0f","🧜🏿♀️":"1f9dc-1f3ff-200d-2640-fe0f","🧜🏻♂️":"1f9dc-1f3fb-200d-2642-fe0f","🧜🏼♂️":"1f9dc-1f3fc-200d-2642-fe0f","🧜🏽♂️":"1f9dc-1f3fd-200d-2642-fe0f","🧜🏾♂️":"1f9dc-1f3fe-200d-2642-fe0f","🧜🏿♂️":"1f9dc-1f3ff-200d-2642-fe0f","🧝🏻♀️":"1f9dd-1f3fb-200d-2640-fe0f","🧝🏼♀️":"1f9dd-1f3fc-200d-2640-fe0f","🧝🏽♀️":"1f9dd-1f3fd-200d-2640-fe0f","🧝🏾♀️":"1f9dd-1f3fe-200d-2640-fe0f","🧝🏿♀️":"1f9dd-1f3ff-200d-2640-fe0f","🧝🏻♂️":"1f9dd-1f3fb-200d-2642-fe0f","🧝🏼♂️":"1f9dd-1f3fc-200d-2642-fe0f","🧝🏽♂️":"1f9dd-1f3fd-200d-2642-fe0f","🧝🏾♂️":"1f9dd-1f3fe-200d-2642-fe0f","🧝🏿♂️":"1f9dd-1f3ff-200d-2642-fe0f","🙍🏻♂️":"1f64d-1f3fb-200d-2642-fe0f","🙍🏼♂️":"1f64d-1f3fc-200d-2642-fe0f","🙍🏽♂️":"1f64d-1f3fd-200d-2642-fe0f","🙍🏾♂️":"1f64d-1f3fe-200d-2642-fe0f","🙍🏿♂️":"1f64d-1f3ff-200d-2642-fe0f","🙍🏻♀️":"1f64d-1f3fb-200d-2640-fe0f","🙍🏼♀️":"1f64d-1f3fc-200d-2640-fe0f","🙍🏽♀️":"1f64d-1f3fd-200d-2640-fe0f","🙍🏾♀️":"1f64d-1f3fe-200d-2640-fe0f","🙍🏿♀️":"1f64d-1f3ff-200d-2640-fe0f","🙎🏻♂️":"1f64e-1f3fb-200d-2642-fe0f","🙎🏼♂️":"1f64e-1f3fc-200d-2642-fe0f","🙎🏽♂️":"1f64e-1f3fd-200d-2642-fe0f","🙎🏾♂️":"1f64e-1f3fe-200d-2642-fe0f","🙎🏿♂️":"1f64e-1f3ff-200d-2642-fe0f","🙎🏻♀️":"1f64e-1f3fb-200d-2640-fe0f","🙎🏼♀️":"1f64e-1f3fc-200d-2640-fe0f","🙎🏽♀️":"1f64e-1f3fd-200d-2640-fe0f","🙎🏾♀️":"1f64e-1f3fe-200d-2640-fe0f","🙎🏿♀️":"1f64e-1f3ff-200d-2640-fe0f","🙅🏻♂️":"1f645-1f3fb-200d-2642-fe0f","🙅🏼♂️":"1f645-1f3fc-200d-2642-fe0f","🙅🏽♂️":"1f645-1f3fd-200d-2642-fe0f","🙅🏾♂️":"1f645-1f3fe-200d-2642-fe0f","🙅🏿♂️":"1f645-1f3ff-200d-2642-fe0f","🙅🏻♀️":"1f645-1f3fb-200d-2640-fe0f","🙅🏼♀️":"1f645-1f3fc-200d-2640-fe0f","🙅🏽♀️":"1f645-1f3fd-200d-2640-fe0f","🙅🏾♀️":"1f645-1f3fe-200d-2640-fe0f","🙅🏿♀️":"1f645-1f3ff-200d-2640-fe0f","🙆🏻♂️":"1f646-1f3fb-200d-2642-fe0f","🙆🏼♂️":"1f646-1f3fc-200d-2642-fe0f","🙆🏽♂️":"1f646-1f3fd-200d-2642-fe0f","🙆🏾♂️":"1f646-1f3fe-200d-2642-fe0f","🙆🏿♂️":"1f646-1f3ff-200d-2642-fe0f","🙆🏻♀️":"1f646-1f3fb-200d-2640-fe0f","🙆🏼♀️":"1f646-1f3fc-200d-2640-fe0f","🙆🏽♀️":"1f646-1f3fd-200d-2640-fe0f","🙆🏾♀️":"1f646-1f3fe-200d-2640-fe0f","🙆🏿♀️":"1f646-1f3ff-200d-2640-fe0f","💁🏻♂️":"1f481-1f3fb-200d-2642-fe0f","💁🏼♂️":"1f481-1f3fc-200d-2642-fe0f","💁🏽♂️":"1f481-1f3fd-200d-2642-fe0f","💁🏾♂️":"1f481-1f3fe-200d-2642-fe0f","💁🏿♂️":"1f481-1f3ff-200d-2642-fe0f","💁🏻♀️":"1f481-1f3fb-200d-2640-fe0f","💁🏼♀️":"1f481-1f3fc-200d-2640-fe0f","💁🏽♀️":"1f481-1f3fd-200d-2640-fe0f","💁🏾♀️":"1f481-1f3fe-200d-2640-fe0f","💁🏿♀️":"1f481-1f3ff-200d-2640-fe0f","🙋🏻♂️":"1f64b-1f3fb-200d-2642-fe0f","🙋🏼♂️":"1f64b-1f3fc-200d-2642-fe0f","🙋🏽♂️":"1f64b-1f3fd-200d-2642-fe0f","🙋🏾♂️":"1f64b-1f3fe-200d-2642-fe0f","🙋🏿♂️":"1f64b-1f3ff-200d-2642-fe0f","🙋🏻♀️":"1f64b-1f3fb-200d-2640-fe0f","🙋🏼♀️":"1f64b-1f3fc-200d-2640-fe0f","🙋🏽♀️":"1f64b-1f3fd-200d-2640-fe0f","🙋🏾♀️":"1f64b-1f3fe-200d-2640-fe0f","🙋🏿♀️":"1f64b-1f3ff-200d-2640-fe0f","🙇🏻♂️":"1f647-1f3fb-200d-2642-fe0f","🙇🏼♂️":"1f647-1f3fc-200d-2642-fe0f","🙇🏽♂️":"1f647-1f3fd-200d-2642-fe0f","🙇🏾♂️":"1f647-1f3fe-200d-2642-fe0f","🙇🏿♂️":"1f647-1f3ff-200d-2642-fe0f","🙇🏻♀️":"1f647-1f3fb-200d-2640-fe0f","🙇🏼♀️":"1f647-1f3fc-200d-2640-fe0f","🙇🏽♀️":"1f647-1f3fd-200d-2640-fe0f","🙇🏾♀️":"1f647-1f3fe-200d-2640-fe0f","🙇🏿♀️":"1f647-1f3ff-200d-2640-fe0f","🤦🏻♂️":"1f926-1f3fb-200d-2642-fe0f","🤦🏼♂️":"1f926-1f3fc-200d-2642-fe0f","🤦🏽♂️":"1f926-1f3fd-200d-2642-fe0f","🤦🏾♂️":"1f926-1f3fe-200d-2642-fe0f","🤦🏿♂️":"1f926-1f3ff-200d-2642-fe0f","🤦🏻♀️":"1f926-1f3fb-200d-2640-fe0f","🤦🏼♀️":"1f926-1f3fc-200d-2640-fe0f","🤦🏽♀️":"1f926-1f3fd-200d-2640-fe0f","🤦🏾♀️":"1f926-1f3fe-200d-2640-fe0f","🤦🏿♀️":"1f926-1f3ff-200d-2640-fe0f","🤷🏻♂️":"1f937-1f3fb-200d-2642-fe0f","🤷🏼♂️":"1f937-1f3fc-200d-2642-fe0f","🤷🏽♂️":"1f937-1f3fd-200d-2642-fe0f","🤷🏾♂️":"1f937-1f3fe-200d-2642-fe0f","🤷🏿♂️":"1f937-1f3ff-200d-2642-fe0f","🤷🏻♀️":"1f937-1f3fb-200d-2640-fe0f","🤷🏼♀️":"1f937-1f3fc-200d-2640-fe0f","🤷🏽♀️":"1f937-1f3fd-200d-2640-fe0f","🤷🏾♀️":"1f937-1f3fe-200d-2640-fe0f","🤷🏿♀️":"1f937-1f3ff-200d-2640-fe0f","💆🏻♂️":"1f486-1f3fb-200d-2642-fe0f","💆🏼♂️":"1f486-1f3fc-200d-2642-fe0f","💆🏽♂️":"1f486-1f3fd-200d-2642-fe0f","💆🏾♂️":"1f486-1f3fe-200d-2642-fe0f","💆🏿♂️":"1f486-1f3ff-200d-2642-fe0f","💆🏻♀️":"1f486-1f3fb-200d-2640-fe0f","💆🏼♀️":"1f486-1f3fc-200d-2640-fe0f","💆🏽♀️":"1f486-1f3fd-200d-2640-fe0f","💆🏾♀️":"1f486-1f3fe-200d-2640-fe0f","💆🏿♀️":"1f486-1f3ff-200d-2640-fe0f","💇🏻♂️":"1f487-1f3fb-200d-2642-fe0f","💇🏼♂️":"1f487-1f3fc-200d-2642-fe0f","💇🏽♂️":"1f487-1f3fd-200d-2642-fe0f","💇🏾♂️":"1f487-1f3fe-200d-2642-fe0f","💇🏿♂️":"1f487-1f3ff-200d-2642-fe0f","💇🏻♀️":"1f487-1f3fb-200d-2640-fe0f","💇🏼♀️":"1f487-1f3fc-200d-2640-fe0f","💇🏽♀️":"1f487-1f3fd-200d-2640-fe0f","💇🏾♀️":"1f487-1f3fe-200d-2640-fe0f","💇🏿♀️":"1f487-1f3ff-200d-2640-fe0f","🚶🏻♂️":"1f6b6-1f3fb-200d-2642-fe0f","🚶🏼♂️":"1f6b6-1f3fc-200d-2642-fe0f","🚶🏽♂️":"1f6b6-1f3fd-200d-2642-fe0f","🚶🏾♂️":"1f6b6-1f3fe-200d-2642-fe0f","🚶🏿♂️":"1f6b6-1f3ff-200d-2642-fe0f","🚶🏻♀️":"1f6b6-1f3fb-200d-2640-fe0f","🚶🏼♀️":"1f6b6-1f3fc-200d-2640-fe0f","🚶🏽♀️":"1f6b6-1f3fd-200d-2640-fe0f","🚶🏾♀️":"1f6b6-1f3fe-200d-2640-fe0f","🚶🏿♀️":"1f6b6-1f3ff-200d-2640-fe0f","🏃🏻♂️":"1f3c3-1f3fb-200d-2642-fe0f","🏃🏼♂️":"1f3c3-1f3fc-200d-2642-fe0f","🏃🏽♂️":"1f3c3-1f3fd-200d-2642-fe0f","🏃🏾♂️":"1f3c3-1f3fe-200d-2642-fe0f","🏃🏿♂️":"1f3c3-1f3ff-200d-2642-fe0f","🏃🏻♀️":"1f3c3-1f3fb-200d-2640-fe0f","🏃🏼♀️":"1f3c3-1f3fc-200d-2640-fe0f","🏃🏽♀️":"1f3c3-1f3fd-200d-2640-fe0f","🏃🏾♀️":"1f3c3-1f3fe-200d-2640-fe0f","🏃🏿♀️":"1f3c3-1f3ff-200d-2640-fe0f","🧖🏻♀️":"1f9d6-1f3fb-200d-2640-fe0f","🧖🏼♀️":"1f9d6-1f3fc-200d-2640-fe0f","🧖🏽♀️":"1f9d6-1f3fd-200d-2640-fe0f","🧖🏾♀️":"1f9d6-1f3fe-200d-2640-fe0f","🧖🏿♀️":"1f9d6-1f3ff-200d-2640-fe0f","🧖🏻♂️":"1f9d6-1f3fb-200d-2642-fe0f","🧖🏼♂️":"1f9d6-1f3fc-200d-2642-fe0f","🧖🏽♂️":"1f9d6-1f3fd-200d-2642-fe0f","🧖🏾♂️":"1f9d6-1f3fe-200d-2642-fe0f","🧖🏿♂️":"1f9d6-1f3ff-200d-2642-fe0f","🧗🏻♀️":"1f9d7-1f3fb-200d-2640-fe0f","🧗🏼♀️":"1f9d7-1f3fc-200d-2640-fe0f","🧗🏽♀️":"1f9d7-1f3fd-200d-2640-fe0f","🧗🏾♀️":"1f9d7-1f3fe-200d-2640-fe0f","🧗🏿♀️":"1f9d7-1f3ff-200d-2640-fe0f","🧗🏻♂️":"1f9d7-1f3fb-200d-2642-fe0f","🧗🏼♂️":"1f9d7-1f3fc-200d-2642-fe0f","🧗🏽♂️":"1f9d7-1f3fd-200d-2642-fe0f","🧗🏾♂️":"1f9d7-1f3fe-200d-2642-fe0f","🧗🏿♂️":"1f9d7-1f3ff-200d-2642-fe0f","🧘🏻♀️":"1f9d8-1f3fb-200d-2640-fe0f","🧘🏼♀️":"1f9d8-1f3fc-200d-2640-fe0f","🧘🏽♀️":"1f9d8-1f3fd-200d-2640-fe0f","🧘🏾♀️":"1f9d8-1f3fe-200d-2640-fe0f","🧘🏿♀️":"1f9d8-1f3ff-200d-2640-fe0f","🧘🏻♂️":"1f9d8-1f3fb-200d-2642-fe0f","🧘🏼♂️":"1f9d8-1f3fc-200d-2642-fe0f","🧘🏽♂️":"1f9d8-1f3fd-200d-2642-fe0f","🧘🏾♂️":"1f9d8-1f3fe-200d-2642-fe0f","🧘🏿♂️":"1f9d8-1f3ff-200d-2642-fe0f","🏌️♂️":"1f3cc-fe0f-200d-2642-fe0f","🏌🏻♂️":"1f3cc-1f3fb-200d-2642-fe0f","🏌🏼♂️":"1f3cc-1f3fc-200d-2642-fe0f","🏌🏽♂️":"1f3cc-1f3fd-200d-2642-fe0f","🏌🏾♂️":"1f3cc-1f3fe-200d-2642-fe0f","🏌🏿♂️":"1f3cc-1f3ff-200d-2642-fe0f","🏌️♀️":"1f3cc-fe0f-200d-2640-fe0f","🏌🏻♀️":"1f3cc-1f3fb-200d-2640-fe0f","🏌🏼♀️":"1f3cc-1f3fc-200d-2640-fe0f","🏌🏽♀️":"1f3cc-1f3fd-200d-2640-fe0f","🏌🏾♀️":"1f3cc-1f3fe-200d-2640-fe0f","🏌🏿♀️":"1f3cc-1f3ff-200d-2640-fe0f","🏄🏻♂️":"1f3c4-1f3fb-200d-2642-fe0f","🏄🏼♂️":"1f3c4-1f3fc-200d-2642-fe0f","🏄🏽♂️":"1f3c4-1f3fd-200d-2642-fe0f","🏄🏾♂️":"1f3c4-1f3fe-200d-2642-fe0f","🏄🏿♂️":"1f3c4-1f3ff-200d-2642-fe0f","🏄🏻♀️":"1f3c4-1f3fb-200d-2640-fe0f","🏄🏼♀️":"1f3c4-1f3fc-200d-2640-fe0f","🏄🏽♀️":"1f3c4-1f3fd-200d-2640-fe0f","🏄🏾♀️":"1f3c4-1f3fe-200d-2640-fe0f","🏄🏿♀️":"1f3c4-1f3ff-200d-2640-fe0f","🚣🏻♂️":"1f6a3-1f3fb-200d-2642-fe0f","🚣🏼♂️":"1f6a3-1f3fc-200d-2642-fe0f","🚣🏽♂️":"1f6a3-1f3fd-200d-2642-fe0f","🚣🏾♂️":"1f6a3-1f3fe-200d-2642-fe0f","🚣🏿♂️":"1f6a3-1f3ff-200d-2642-fe0f","🚣🏻♀️":"1f6a3-1f3fb-200d-2640-fe0f","🚣🏼♀️":"1f6a3-1f3fc-200d-2640-fe0f","🚣🏽♀️":"1f6a3-1f3fd-200d-2640-fe0f","🚣🏾♀️":"1f6a3-1f3fe-200d-2640-fe0f","🚣🏿♀️":"1f6a3-1f3ff-200d-2640-fe0f","🏊🏻♂️":"1f3ca-1f3fb-200d-2642-fe0f","🏊🏼♂️":"1f3ca-1f3fc-200d-2642-fe0f","🏊🏽♂️":"1f3ca-1f3fd-200d-2642-fe0f","🏊🏾♂️":"1f3ca-1f3fe-200d-2642-fe0f","🏊🏿♂️":"1f3ca-1f3ff-200d-2642-fe0f","🏊🏻♀️":"1f3ca-1f3fb-200d-2640-fe0f","🏊🏼♀️":"1f3ca-1f3fc-200d-2640-fe0f","🏊🏽♀️":"1f3ca-1f3fd-200d-2640-fe0f","🏊🏾♀️":"1f3ca-1f3fe-200d-2640-fe0f","🏊🏿♀️":"1f3ca-1f3ff-200d-2640-fe0f","⛹️♂️":"26f9-fe0f-200d-2642-fe0f","⛹🏻♂️":"26f9-1f3fb-200d-2642-fe0f","⛹🏼♂️":"26f9-1f3fc-200d-2642-fe0f","⛹🏽♂️":"26f9-1f3fd-200d-2642-fe0f","⛹🏾♂️":"26f9-1f3fe-200d-2642-fe0f","⛹🏿♂️":"26f9-1f3ff-200d-2642-fe0f","⛹️♀️":"26f9-fe0f-200d-2640-fe0f","⛹🏻♀️":"26f9-1f3fb-200d-2640-fe0f","⛹🏼♀️":"26f9-1f3fc-200d-2640-fe0f","⛹🏽♀️":"26f9-1f3fd-200d-2640-fe0f","⛹🏾♀️":"26f9-1f3fe-200d-2640-fe0f","⛹🏿♀️":"26f9-1f3ff-200d-2640-fe0f","🏋️♂️":"1f3cb-fe0f-200d-2642-fe0f","🏋🏻♂️":"1f3cb-1f3fb-200d-2642-fe0f","🏋🏼♂️":"1f3cb-1f3fc-200d-2642-fe0f","🏋🏽♂️":"1f3cb-1f3fd-200d-2642-fe0f","🏋🏾♂️":"1f3cb-1f3fe-200d-2642-fe0f","🏋🏿♂️":"1f3cb-1f3ff-200d-2642-fe0f","🏋️♀️":"1f3cb-fe0f-200d-2640-fe0f","🏋🏻♀️":"1f3cb-1f3fb-200d-2640-fe0f","🏋🏼♀️":"1f3cb-1f3fc-200d-2640-fe0f","🏋🏽♀️":"1f3cb-1f3fd-200d-2640-fe0f","🏋🏾♀️":"1f3cb-1f3fe-200d-2640-fe0f","🏋🏿♀️":"1f3cb-1f3ff-200d-2640-fe0f","🚴🏻♂️":"1f6b4-1f3fb-200d-2642-fe0f","🚴🏼♂️":"1f6b4-1f3fc-200d-2642-fe0f","🚴🏽♂️":"1f6b4-1f3fd-200d-2642-fe0f","🚴🏾♂️":"1f6b4-1f3fe-200d-2642-fe0f","🚴🏿♂️":"1f6b4-1f3ff-200d-2642-fe0f","🚴🏻♀️":"1f6b4-1f3fb-200d-2640-fe0f","🚴🏼♀️":"1f6b4-1f3fc-200d-2640-fe0f","🚴🏽♀️":"1f6b4-1f3fd-200d-2640-fe0f","🚴🏾♀️":"1f6b4-1f3fe-200d-2640-fe0f","🚴🏿♀️":"1f6b4-1f3ff-200d-2640-fe0f","🚵🏻♂️":"1f6b5-1f3fb-200d-2642-fe0f","🚵🏼♂️":"1f6b5-1f3fc-200d-2642-fe0f","🚵🏽♂️":"1f6b5-1f3fd-200d-2642-fe0f","🚵🏾♂️":"1f6b5-1f3fe-200d-2642-fe0f","🚵🏿♂️":"1f6b5-1f3ff-200d-2642-fe0f","🚵🏻♀️":"1f6b5-1f3fb-200d-2640-fe0f","🚵🏼♀️":"1f6b5-1f3fc-200d-2640-fe0f","🚵🏽♀️":"1f6b5-1f3fd-200d-2640-fe0f","🚵🏾♀️":"1f6b5-1f3fe-200d-2640-fe0f","🚵🏿♀️":"1f6b5-1f3ff-200d-2640-fe0f","🤸🏻♂️":"1f938-1f3fb-200d-2642-fe0f","🤸🏼♂️":"1f938-1f3fc-200d-2642-fe0f","🤸🏽♂️":"1f938-1f3fd-200d-2642-fe0f","🤸🏾♂️":"1f938-1f3fe-200d-2642-fe0f","🤸🏿♂️":"1f938-1f3ff-200d-2642-fe0f","🤸🏻♀️":"1f938-1f3fb-200d-2640-fe0f","🤸🏼♀️":"1f938-1f3fc-200d-2640-fe0f","🤸🏽♀️":"1f938-1f3fd-200d-2640-fe0f","🤸🏾♀️":"1f938-1f3fe-200d-2640-fe0f","🤸🏿♀️":"1f938-1f3ff-200d-2640-fe0f","🤽🏻♂️":"1f93d-1f3fb-200d-2642-fe0f","🤽🏼♂️":"1f93d-1f3fc-200d-2642-fe0f","🤽🏽♂️":"1f93d-1f3fd-200d-2642-fe0f","🤽🏾♂️":"1f93d-1f3fe-200d-2642-fe0f","🤽🏿♂️":"1f93d-1f3ff-200d-2642-fe0f","🤽🏻♀️":"1f93d-1f3fb-200d-2640-fe0f","🤽🏼♀️":"1f93d-1f3fc-200d-2640-fe0f","🤽🏽♀️":"1f93d-1f3fd-200d-2640-fe0f","🤽🏾♀️":"1f93d-1f3fe-200d-2640-fe0f","🤽🏿♀️":"1f93d-1f3ff-200d-2640-fe0f","🤾🏻♂️":"1f93e-1f3fb-200d-2642-fe0f","🤾🏼♂️":"1f93e-1f3fc-200d-2642-fe0f","🤾🏽♂️":"1f93e-1f3fd-200d-2642-fe0f","🤾🏾♂️":"1f93e-1f3fe-200d-2642-fe0f","🤾🏿♂️":"1f93e-1f3ff-200d-2642-fe0f","🤾🏻♀️":"1f93e-1f3fb-200d-2640-fe0f","🤾🏼♀️":"1f93e-1f3fc-200d-2640-fe0f","🤾🏽♀️":"1f93e-1f3fd-200d-2640-fe0f","🤾🏾♀️":"1f93e-1f3fe-200d-2640-fe0f","🤾🏿♀️":"1f93e-1f3ff-200d-2640-fe0f","🤹🏻♂️":"1f939-1f3fb-200d-2642-fe0f","🤹🏼♂️":"1f939-1f3fc-200d-2642-fe0f","🤹🏽♂️":"1f939-1f3fd-200d-2642-fe0f","🤹🏾♂️":"1f939-1f3fe-200d-2642-fe0f","🤹🏿♂️":"1f939-1f3ff-200d-2642-fe0f","🤹🏻♀️":"1f939-1f3fb-200d-2640-fe0f","🤹🏼♀️":"1f939-1f3fc-200d-2640-fe0f","🤹🏽♀️":"1f939-1f3fd-200d-2640-fe0f","🤹🏾♀️":"1f939-1f3fe-200d-2640-fe0f","🤹🏿♀️":"1f939-1f3ff-200d-2640-fe0f","👩❤👨":"1f469-200d-2764-fe0f-200d-1f468","👨❤👨":"1f468-200d-2764-fe0f-200d-1f468","👩❤👩":"1f469-200d-2764-fe0f-200d-1f469","👨👩👦":"1f468-200d-1f469-200d-1f466","👨👩👧":"1f468-200d-1f469-200d-1f467","👨👨👦":"1f468-200d-1f468-200d-1f466","👨👨👧":"1f468-200d-1f468-200d-1f467","👩👩👦":"1f469-200d-1f469-200d-1f466","👩👩👧":"1f469-200d-1f469-200d-1f467","👨👦👦":"1f468-200d-1f466-200d-1f466","👨👧👦":"1f468-200d-1f467-200d-1f466","👨👧👧":"1f468-200d-1f467-200d-1f467","👩👦👦":"1f469-200d-1f466-200d-1f466","👩👧👦":"1f469-200d-1f467-200d-1f466","👩👧👧":"1f469-200d-1f467-200d-1f467","👁️🗨️":"1f441-200d-1f5e8","👩❤️👨":"1f469-200d-2764-fe0f-200d-1f468","👨❤️👨":"1f468-200d-2764-fe0f-200d-1f468","👩❤️👩":"1f469-200d-2764-fe0f-200d-1f469","👩❤💋👨":"1f469-200d-2764-fe0f-200d-1f48b-200d-1f468","👨❤💋👨":"1f468-200d-2764-fe0f-200d-1f48b-200d-1f468","👩❤💋👩":"1f469-200d-2764-fe0f-200d-1f48b-200d-1f469","👨👩👧👦":"1f468-200d-1f469-200d-1f467-200d-1f466","👨👩👦👦":"1f468-200d-1f469-200d-1f466-200d-1f466","👨👩👧👧":"1f468-200d-1f469-200d-1f467-200d-1f467","👨👨👧👦":"1f468-200d-1f468-200d-1f467-200d-1f466","👨👨👦👦":"1f468-200d-1f468-200d-1f466-200d-1f466","👨👨👧👧":"1f468-200d-1f468-200d-1f467-200d-1f467","👩👩👧👦":"1f469-200d-1f469-200d-1f467-200d-1f466","👩👩👦👦":"1f469-200d-1f469-200d-1f466-200d-1f466","👩👩👧👧":"1f469-200d-1f469-200d-1f467-200d-1f467","🏴":"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f","🏴":"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f","🏴":"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f","👩❤️💋👨":"1f469-200d-2764-fe0f-200d-1f48b-200d-1f468","👨❤️💋👨":"1f468-200d-2764-fe0f-200d-1f48b-200d-1f468","👩❤️💋👩":"1f469-200d-2764-fe0f-200d-1f48b-200d-1f469"}
\ No newline at end of file
diff --git a/app/javascript/mastodon/features/emoji/emoji_mart_data_light.js b/app/javascript/mastodon/features/emoji/emoji_mart_data_light.js
new file mode 100644
index 0000000000..45086fc4cc
--- /dev/null
+++ b/app/javascript/mastodon/features/emoji/emoji_mart_data_light.js
@@ -0,0 +1,41 @@
+// The output of this module is designed to mimic emoji-mart's
+// "data" object, such that we can use it for a light version of emoji-mart's
+// emojiIndex.search functionality.
+const { unicodeToUnifiedName } = require('./unicode_to_unified_name');
+const [ shortCodesToEmojiData, skins, categories, short_names ] = require('./emoji_compressed');
+
+const emojis = {};
+
+// decompress
+Object.keys(shortCodesToEmojiData).forEach((shortCode) => {
+ let [
+ filenameData, // eslint-disable-line no-unused-vars
+ searchData,
+ ] = shortCodesToEmojiData[shortCode];
+ let [
+ native,
+ short_names,
+ search,
+ unified,
+ ] = searchData;
+
+ if (!unified) {
+ // unified name can be derived from unicodeToUnifiedName
+ unified = unicodeToUnifiedName(native);
+ }
+
+ short_names = [shortCode].concat(short_names);
+ emojis[shortCode] = {
+ native,
+ search,
+ short_names,
+ unified,
+ };
+});
+
+module.exports = {
+ emojis,
+ skins,
+ categories,
+ short_names,
+};
diff --git a/app/javascript/mastodon/features/emoji/emoji_mart_search_light.js b/app/javascript/mastodon/features/emoji/emoji_mart_search_light.js
new file mode 100644
index 0000000000..5755bf1c4c
--- /dev/null
+++ b/app/javascript/mastodon/features/emoji/emoji_mart_search_light.js
@@ -0,0 +1,157 @@
+// This code is largely borrowed from:
+// https://github.com/missive/emoji-mart/blob/5f2ffcc/src/utils/emoji-index.js
+
+import data from './emoji_mart_data_light';
+import { getData, getSanitizedData, intersect } from './emoji_utils';
+
+let originalPool = {};
+let index = {};
+let emojisList = {};
+let emoticonsList = {};
+
+for (let emoji in data.emojis) {
+ let emojiData = data.emojis[emoji];
+ let { short_names, emoticons } = emojiData;
+ let id = short_names[0];
+
+ if (emoticons) {
+ emoticons.forEach(emoticon => {
+ if (emoticonsList[emoticon]) {
+ return;
+ }
+
+ emoticonsList[emoticon] = id;
+ });
+ }
+
+ emojisList[id] = getSanitizedData(id);
+ originalPool[id] = emojiData;
+}
+
+function addCustomToPool(custom, pool) {
+ custom.forEach((emoji) => {
+ let emojiId = emoji.id || emoji.short_names[0];
+
+ if (emojiId && !pool[emojiId]) {
+ pool[emojiId] = getData(emoji);
+ emojisList[emojiId] = getSanitizedData(emoji);
+ }
+ });
+}
+
+function search(value, { emojisToShowFilter, maxResults, include, exclude, custom = [] } = {}) {
+ addCustomToPool(custom, originalPool);
+
+ maxResults = maxResults || 75;
+ include = include || [];
+ exclude = exclude || [];
+
+ let results = null,
+ pool = originalPool;
+
+ if (value.length) {
+ if (value === '-' || value === '-1') {
+ return [emojisList['-1']];
+ }
+
+ let values = value.toLowerCase().split(/[\s|,|\-|_]+/),
+ allResults = [];
+
+ if (values.length > 2) {
+ values = [values[0], values[1]];
+ }
+
+ if (include.length || exclude.length) {
+ pool = {};
+
+ data.categories.forEach(category => {
+ let isIncluded = include && include.length ? include.indexOf(category.name.toLowerCase()) > -1 : true;
+ let isExcluded = exclude && exclude.length ? exclude.indexOf(category.name.toLowerCase()) > -1 : false;
+ if (!isIncluded || isExcluded) {
+ return;
+ }
+
+ category.emojis.forEach(emojiId => pool[emojiId] = data.emojis[emojiId]);
+ });
+
+ if (custom.length) {
+ let customIsIncluded = include && include.length ? include.indexOf('custom') > -1 : true;
+ let customIsExcluded = exclude && exclude.length ? exclude.indexOf('custom') > -1 : false;
+ if (customIsIncluded && !customIsExcluded) {
+ addCustomToPool(custom, pool);
+ }
+ }
+ }
+
+ allResults = values.map((value) => {
+ let aPool = pool,
+ aIndex = index,
+ length = 0;
+
+ for (let charIndex = 0; charIndex < value.length; charIndex++) {
+ const char = value[charIndex];
+ length++;
+
+ aIndex[char] = aIndex[char] || {};
+ aIndex = aIndex[char];
+
+ if (!aIndex.results) {
+ let scores = {};
+
+ aIndex.results = [];
+ aIndex.pool = {};
+
+ for (let id in aPool) {
+ let emoji = aPool[id],
+ { search } = emoji,
+ sub = value.substr(0, length),
+ subIndex = search.indexOf(sub);
+
+ if (subIndex !== -1) {
+ let score = subIndex + 1;
+ if (sub === id) score = 0;
+
+ aIndex.results.push(emojisList[id]);
+ aIndex.pool[id] = emoji;
+
+ scores[id] = score;
+ }
+ }
+
+ aIndex.results.sort((a, b) => {
+ let aScore = scores[a.id],
+ bScore = scores[b.id];
+
+ return aScore - bScore;
+ });
+ }
+
+ aPool = aIndex.pool;
+ }
+
+ return aIndex.results;
+ }).filter(a => a);
+
+ if (allResults.length > 1) {
+ results = intersect.apply(null, allResults);
+ } else if (allResults.length) {
+ results = allResults[0];
+ } else {
+ results = [];
+ }
+ }
+
+ if (results) {
+ if (emojisToShowFilter) {
+ results = results.filter((result) => emojisToShowFilter(data.emojis[result.id].unified));
+ }
+
+ if (results && results.length > maxResults) {
+ results = results.slice(0, maxResults);
+ }
+ }
+
+ return results;
+}
+
+export { search };
diff --git a/app/javascript/mastodon/features/emoji/emoji_picker.js b/app/javascript/mastodon/features/emoji/emoji_picker.js
new file mode 100644
index 0000000000..7e145381ea
--- /dev/null
+++ b/app/javascript/mastodon/features/emoji/emoji_picker.js
@@ -0,0 +1,7 @@
+import Picker from 'emoji-mart/dist-es/components/picker';
+import Emoji from 'emoji-mart/dist-es/components/emoji';
+
+export {
+ Picker,
+ Emoji,
+};
diff --git a/app/javascript/mastodon/features/emoji/emoji_unicode_mapping_light.js b/app/javascript/mastodon/features/emoji/emoji_unicode_mapping_light.js
new file mode 100644
index 0000000000..918684c310
--- /dev/null
+++ b/app/javascript/mastodon/features/emoji/emoji_unicode_mapping_light.js
@@ -0,0 +1,35 @@
+// A mapping of unicode strings to an object containing the filename
+// (i.e. the svg filename) and a shortCode intended to be shown
+// as a "title" attribute in an HTML element (aka tooltip).
+
+const [
+ shortCodesToEmojiData,
+ skins, // eslint-disable-line no-unused-vars
+ categories, // eslint-disable-line no-unused-vars
+ short_names, // eslint-disable-line no-unused-vars
+ emojisWithoutShortCodes,
+] = require('./emoji_compressed');
+const { unicodeToFilename } = require('./unicode_to_filename');
+
+// decompress
+const unicodeMapping = {};
+
+function processEmojiMapData(emojiMapData, shortCode) {
+ let [ native, filename ] = emojiMapData;
+ if (!filename) {
+ // filename name can be derived from unicodeToFilename
+ filename = unicodeToFilename(native);
+ }
+ unicodeMapping[native] = {
+ shortCode: shortCode,
+ filename: filename,
+ };
+}
+
+Object.keys(shortCodesToEmojiData).forEach((shortCode) => {
+ let [ filenameData ] = shortCodesToEmojiData[shortCode];
+ filenameData.forEach(emojiMapData => processEmojiMapData(emojiMapData, shortCode));
+});
+emojisWithoutShortCodes.forEach(emojiMapData => processEmojiMapData(emojiMapData));
+
+module.exports = unicodeMapping;
diff --git a/app/javascript/mastodon/features/emoji/emoji_utils.js b/app/javascript/mastodon/features/emoji/emoji_utils.js
new file mode 100644
index 0000000000..dbf725c1f5
--- /dev/null
+++ b/app/javascript/mastodon/features/emoji/emoji_utils.js
@@ -0,0 +1,258 @@
+// This code is largely borrowed from:
+// https://github.com/missive/emoji-mart/blob/5f2ffcc/src/utils/index.js
+
+import data from './emoji_mart_data_light';
+
+const buildSearch = (data) => {
+ const search = [];
+
+ let addToSearch = (strings, split) => {
+ if (!strings) {
+ return;
+ }
+
+ (Array.isArray(strings) ? strings : [strings]).forEach((string) => {
+ (split ? string.split(/[-|_|\s]+/) : [string]).forEach((s) => {
+ s = s.toLowerCase();
+
+ if (search.indexOf(s) === -1) {
+ search.push(s);
+ }
+ });
+ });
+ };
+
+ addToSearch(data.short_names, true);
+ addToSearch(data.name, true);
+ addToSearch(data.keywords, false);
+ addToSearch(data.emoticons, false);
+
+ return search.join(',');
+};
+
+const _String = String;
+
+const stringFromCodePoint = _String.fromCodePoint || function () {
+ let MAX_SIZE = 0x4000;
+ let codeUnits = [];
+ let highSurrogate;
+ let lowSurrogate;
+ let index = -1;
+ let length = arguments.length;
+ if (!length) {
+ return '';
+ }
+ let result = '';
+ while (++index < length) {
+ let codePoint = Number(arguments[index]);
+ if (
+ !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`
+ codePoint < 0 || // not a valid Unicode code point
+ codePoint > 0x10FFFF || // not a valid Unicode code point
+ Math.floor(codePoint) !== codePoint // not an integer
+ ) {
+ throw RangeError('Invalid code point: ' + codePoint);
+ }
+ if (codePoint <= 0xFFFF) { // BMP code point
+ codeUnits.push(codePoint);
+ } else { // Astral code point; split in surrogate halves
+ // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
+ codePoint -= 0x10000;
+ highSurrogate = (codePoint >> 10) + 0xD800;
+ lowSurrogate = (codePoint % 0x400) + 0xDC00;
+ codeUnits.push(highSurrogate, lowSurrogate);
+ }
+ if (index + 1 === length || codeUnits.length > MAX_SIZE) {
+ result += String.fromCharCode.apply(null, codeUnits);
+ codeUnits.length = 0;
+ }
+ }
+ return result;
+};
+
+
+const _JSON = JSON;
+
+const COLONS_REGEX = /^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/;
+const SKINS = [
+ '1F3FA', '1F3FB', '1F3FC',
+ '1F3FD', '1F3FE', '1F3FF',
+];
+
+function unifiedToNative(unified) {
+ let unicodes = unified.split('-'),
+ codePoints = unicodes.map((u) => `0x${u}`);
+
+ return stringFromCodePoint.apply(null, codePoints);
+}
+
+function sanitize(emoji) {
+ let { name, short_names, skin_tone, skin_variations, emoticons, unified, custom, imageUrl } = emoji,
+ id = emoji.id || short_names[0],
+ colons = `:${id}:`;
+
+ if (custom) {
+ return {
+ id,
+ name,
+ colons,
+ emoticons,
+ custom,
+ imageUrl,
+ };
+ }
+
+ if (skin_tone) {
+ colons += `:skin-tone-${skin_tone}:`;
+ }
+
+ return {
+ id,
+ name,
+ colons,
+ emoticons,
+ unified: unified.toLowerCase(),
+ skin: skin_tone || (skin_variations ? 1 : null),
+ native: unifiedToNative(unified),
+ };
+}
+
+function getSanitizedData() {
+ return sanitize(getData(...arguments));
+}
+
+function getData(emoji, skin, set) {
+ let emojiData = {};
+
+ if (typeof emoji === 'string') {
+ let matches = emoji.match(COLONS_REGEX);
+
+ if (matches) {
+ emoji = matches[1];
+
+ if (matches[2]) {
+ skin = parseInt(matches[2]);
+ }
+ }
+
+ if (data.short_names.hasOwnProperty(emoji)) {
+ emoji = data.short_names[emoji];
+ }
+
+ if (data.emojis.hasOwnProperty(emoji)) {
+ emojiData = data.emojis[emoji];
+ }
+ } else if (emoji.id) {
+ if (data.short_names.hasOwnProperty(emoji.id)) {
+ emoji.id = data.short_names[emoji.id];
+ }
+
+ if (data.emojis.hasOwnProperty(emoji.id)) {
+ emojiData = data.emojis[emoji.id];
+ skin = skin || emoji.skin;
+ }
+ }
+
+ if (!Object.keys(emojiData).length) {
+ emojiData = emoji;
+ emojiData.custom = true;
+
+ if (!emojiData.search) {
+ emojiData.search = buildSearch(emoji);
+ }
+ }
+
+ emojiData.emoticons = emojiData.emoticons || [];
+ emojiData.variations = emojiData.variations || [];
+
+ if (emojiData.skin_variations && skin > 1 && set) {
+ emojiData = JSON.parse(_JSON.stringify(emojiData));
+
+ let skinKey = SKINS[skin - 1],
+ variationData = emojiData.skin_variations[skinKey];
+
+ if (!variationData.variations && emojiData.variations) {
+ delete emojiData.variations;
+ }
+
+ if (variationData[`has_img_${set}`]) {
+ emojiData.skin_tone = skin;
+
+ for (let k in variationData) {
+ let v = variationData[k];
+ emojiData[k] = v;
+ }
+ }
+ }
+
+ if (emojiData.variations && emojiData.variations.length) {
+ emojiData = JSON.parse(_JSON.stringify(emojiData));
+ emojiData.unified = emojiData.variations.shift();
+ }
+
+ return emojiData;
+}
+
+function uniq(arr) {
+ return arr.reduce((acc, item) => {
+ if (acc.indexOf(item) === -1) {
+ acc.push(item);
+ }
+ return acc;
+ }, []);
+}
+
+function intersect(a, b) {
+ const uniqA = uniq(a);
+ const uniqB = uniq(b);
+
+ return uniqA.filter(item => uniqB.indexOf(item) >= 0);
+}
+
+function deepMerge(a, b) {
+ let o = {};
+
+ for (let key in a) {
+ let originalValue = a[key],
+ value = originalValue;
+
+ if (b.hasOwnProperty(key)) {
+ value = b[key];
+ }
+
+ if (typeof value === 'object') {
+ value = deepMerge(originalValue, value);
+ }
+
+ o[key] = value;
+ }
+
+ return o;
+}
+
+// https://github.com/sonicdoe/measure-scrollbar
+function measureScrollbar() {
+ const div = document.createElement('div');
+
+ div.style.width = '100px';
+ div.style.height = '100px';
+ div.style.overflow = 'scroll';
+ div.style.position = 'absolute';
+ div.style.top = '-9999px';
+
+ document.body.appendChild(div);
+ const scrollbarWidth = div.offsetWidth - div.clientWidth;
+ document.body.removeChild(div);
+
+ return scrollbarWidth;
+}
+
+export {
+ getData,
+ getSanitizedData,
+ uniq,
+ intersect,
+ deepMerge,
+ unifiedToNative,
+ measureScrollbar,
+};
diff --git a/app/javascript/mastodon/features/emoji/unicode_to_filename.js b/app/javascript/mastodon/features/emoji/unicode_to_filename.js
new file mode 100644
index 0000000000..c75c4cd7d0
--- /dev/null
+++ b/app/javascript/mastodon/features/emoji/unicode_to_filename.js
@@ -0,0 +1,26 @@
+// taken from:
+// https://github.com/twitter/twemoji/blob/47732c7/twemoji-generator.js#L848-L866
+exports.unicodeToFilename = (str) => {
+ let result = '';
+ let charCode = 0;
+ let p = 0;
+ let i = 0;
+ while (i < str.length) {
+ charCode = str.charCodeAt(i++);
+ if (p) {
+ if (result.length > 0) {
+ result += '-';
+ }
+ result += (0x10000 + ((p - 0xD800) << 10) + (charCode - 0xDC00)).toString(16);
+ p = 0;
+ } else if (0xD800 <= charCode && charCode <= 0xDBFF) {
+ p = charCode;
+ } else {
+ if (result.length > 0) {
+ result += '-';
+ }
+ result += charCode.toString(16);
+ }
+ }
+ return result;
+};
diff --git a/app/javascript/mastodon/features/emoji/unicode_to_unified_name.js b/app/javascript/mastodon/features/emoji/unicode_to_unified_name.js
new file mode 100644
index 0000000000..808ac197ef
--- /dev/null
+++ b/app/javascript/mastodon/features/emoji/unicode_to_unified_name.js
@@ -0,0 +1,17 @@
+function padLeft(str, num) {
+ while (str.length < num) {
+ str = '0' + str;
+ }
+ return str;
+}
+
+exports.unicodeToUnifiedName = (str) => {
+ let output = '';
+ for (let i = 0; i < str.length; i += 2) {
+ if (i > 0) {
+ output += '-';
+ }
+ output += padLeft(str.codePointAt(i).toString(16).toUpperCase(), 4);
+ }
+ return output;
+};
diff --git a/app/javascript/mastodon/features/favourited_statuses/index.js b/app/javascript/mastodon/features/favourited_statuses/index.js
new file mode 100644
index 0000000000..1e1f5873c2
--- /dev/null
+++ b/app/javascript/mastodon/features/favourited_statuses/index.js
@@ -0,0 +1,94 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import { fetchFavouritedStatuses, expandFavouritedStatuses } from '../../actions/favourites';
+import Column from '../ui/components/column';
+import ColumnHeader from '../../components/column_header';
+import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
+import StatusList from '../../components/status_list';
+import { defineMessages, injectIntl } from 'react-intl';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+const messages = defineMessages({
+ heading: { id: 'column.favourites', defaultMessage: 'Favourites' },
+});
+
+const mapStateToProps = state => ({
+ statusIds: state.getIn(['status_lists', 'favourites', 'items']),
+ hasMore: !!state.getIn(['status_lists', 'favourites', 'next']),
+});
+
+@connect(mapStateToProps)
+@injectIntl
+export default class Favourites extends ImmutablePureComponent {
+
+ static propTypes = {
+ dispatch: PropTypes.func.isRequired,
+ statusIds: ImmutablePropTypes.list.isRequired,
+ intl: PropTypes.object.isRequired,
+ columnId: PropTypes.string,
+ multiColumn: PropTypes.bool,
+ hasMore: PropTypes.bool,
+ };
+
+ componentWillMount () {
+ this.props.dispatch(fetchFavouritedStatuses());
+ }
+
+ handlePin = () => {
+ const { columnId, dispatch } = this.props;
+
+ if (columnId) {
+ dispatch(removeColumn(columnId));
+ } else {
+ dispatch(addColumn('FAVOURITES', {}));
+ }
+ }
+
+ handleMove = (dir) => {
+ const { columnId, dispatch } = this.props;
+ dispatch(moveColumn(columnId, dir));
+ }
+
+ handleHeaderClick = () => {
+ this.column.scrollTop();
+ }
+
+ setRef = c => {
+ this.column = c;
+ }
+
+ handleScrollToBottom = () => {
+ this.props.dispatch(expandFavouritedStatuses());
+ }
+
+ render () {
+ const { intl, statusIds, columnId, multiColumn, hasMore } = this.props;
+ const pinned = !!columnId;
+
+ return (
+
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/favourites/index.js b/app/javascript/mastodon/features/favourites/index.js
new file mode 100644
index 0000000000..6f113beb43
--- /dev/null
+++ b/app/javascript/mastodon/features/favourites/index.js
@@ -0,0 +1,60 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import LoadingIndicator from '../../components/loading_indicator';
+import { fetchFavourites } from '../../actions/interactions';
+import { ScrollContainer } from 'react-router-scroll-4';
+import AccountContainer from '../../containers/account_container';
+import Column from '../ui/components/column';
+import ColumnBackButton from '../../components/column_back_button';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+const mapStateToProps = (state, props) => ({
+ accountIds: state.getIn(['user_lists', 'favourited_by', props.params.statusId]),
+});
+
+@connect(mapStateToProps)
+export default class Favourites extends ImmutablePureComponent {
+
+ static propTypes = {
+ params: PropTypes.object.isRequired,
+ dispatch: PropTypes.func.isRequired,
+ accountIds: ImmutablePropTypes.list,
+ };
+
+ componentWillMount () {
+ this.props.dispatch(fetchFavourites(this.props.params.statusId));
+ }
+
+ componentWillReceiveProps (nextProps) {
+ if (nextProps.params.statusId !== this.props.params.statusId && nextProps.params.statusId) {
+ this.props.dispatch(fetchFavourites(nextProps.params.statusId));
+ }
+ }
+
+ render () {
+ const { accountIds } = this.props;
+
+ if (!accountIds) {
+ return (
+
+
+
+ );
+ }
+
+ return (
+
+
+
+
+
+ {accountIds.map(id =>
)}
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/follow_requests/components/account_authorize.js b/app/javascript/mastodon/features/follow_requests/components/account_authorize.js
new file mode 100644
index 0000000000..4fc5638d95
--- /dev/null
+++ b/app/javascript/mastodon/features/follow_requests/components/account_authorize.js
@@ -0,0 +1,49 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import Permalink from '../../../components/permalink';
+import Avatar from '../../../components/avatar';
+import DisplayName from '../../../components/display_name';
+import IconButton from '../../../components/icon_button';
+import { defineMessages, injectIntl } from 'react-intl';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+const messages = defineMessages({
+ authorize: { id: 'follow_request.authorize', defaultMessage: 'Authorize' },
+ reject: { id: 'follow_request.reject', defaultMessage: 'Reject' },
+});
+
+@injectIntl
+export default class AccountAuthorize extends ImmutablePureComponent {
+
+ static propTypes = {
+ account: ImmutablePropTypes.map.isRequired,
+ onAuthorize: PropTypes.func.isRequired,
+ onReject: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ };
+
+ render () {
+ const { intl, account, onAuthorize, onReject } = this.props;
+ const content = { __html: account.get('note_emojified') };
+
+ return (
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/follow_requests/containers/account_authorize_container.js b/app/javascript/mastodon/features/follow_requests/containers/account_authorize_container.js
new file mode 100644
index 0000000000..8db471f73d
--- /dev/null
+++ b/app/javascript/mastodon/features/follow_requests/containers/account_authorize_container.js
@@ -0,0 +1,26 @@
+import { connect } from 'react-redux';
+import { makeGetAccount } from '../../../selectors';
+import AccountAuthorize from '../components/account_authorize';
+import { authorizeFollowRequest, rejectFollowRequest } from '../../../actions/accounts';
+
+const makeMapStateToProps = () => {
+ const getAccount = makeGetAccount();
+
+ const mapStateToProps = (state, props) => ({
+ account: getAccount(state, props.id),
+ });
+
+ return mapStateToProps;
+};
+
+const mapDispatchToProps = (dispatch, { id }) => ({
+ onAuthorize () {
+ dispatch(authorizeFollowRequest(id));
+ },
+
+ onReject () {
+ dispatch(rejectFollowRequest(id));
+ },
+});
+
+export default connect(makeMapStateToProps, mapDispatchToProps)(AccountAuthorize);
diff --git a/app/javascript/mastodon/features/follow_requests/index.js b/app/javascript/mastodon/features/follow_requests/index.js
new file mode 100644
index 0000000000..eae821f925
--- /dev/null
+++ b/app/javascript/mastodon/features/follow_requests/index.js
@@ -0,0 +1,71 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import LoadingIndicator from '../../components/loading_indicator';
+import { ScrollContainer } from 'react-router-scroll-4';
+import Column from '../ui/components/column';
+import ColumnBackButtonSlim from '../../components/column_back_button_slim';
+import AccountAuthorizeContainer from './containers/account_authorize_container';
+import { fetchFollowRequests, expandFollowRequests } from '../../actions/accounts';
+import { defineMessages, injectIntl } from 'react-intl';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+const messages = defineMessages({
+ heading: { id: 'column.follow_requests', defaultMessage: 'Follow requests' },
+});
+
+const mapStateToProps = state => ({
+ accountIds: state.getIn(['user_lists', 'follow_requests', 'items']),
+});
+
+@connect(mapStateToProps)
+@injectIntl
+export default class FollowRequests extends ImmutablePureComponent {
+
+ static propTypes = {
+ params: PropTypes.object.isRequired,
+ dispatch: PropTypes.func.isRequired,
+ accountIds: ImmutablePropTypes.list,
+ intl: PropTypes.object.isRequired,
+ };
+
+ componentWillMount () {
+ this.props.dispatch(fetchFollowRequests());
+ }
+
+ handleScroll = (e) => {
+ const { scrollTop, scrollHeight, clientHeight } = e.target;
+
+ if (scrollTop === scrollHeight - clientHeight) {
+ this.props.dispatch(expandFollowRequests());
+ }
+ }
+
+ render () {
+ const { intl, accountIds } = this.props;
+
+ if (!accountIds) {
+ return (
+
+
+
+ );
+ }
+
+ return (
+
+
+
+
+
+ {accountIds.map(id =>
+
+ )}
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/followers/index.js b/app/javascript/mastodon/features/followers/index.js
new file mode 100644
index 0000000000..f64ed79483
--- /dev/null
+++ b/app/javascript/mastodon/features/followers/index.js
@@ -0,0 +1,93 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import LoadingIndicator from '../../components/loading_indicator';
+import {
+ fetchAccount,
+ fetchFollowers,
+ expandFollowers,
+} from '../../actions/accounts';
+import { ScrollContainer } from 'react-router-scroll-4';
+import AccountContainer from '../../containers/account_container';
+import Column from '../ui/components/column';
+import HeaderContainer from '../account_timeline/containers/header_container';
+import LoadMore from '../../components/load_more';
+import ColumnBackButton from '../../components/column_back_button';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+const mapStateToProps = (state, props) => ({
+ accountIds: state.getIn(['user_lists', 'followers', props.params.accountId, 'items']),
+ hasMore: !!state.getIn(['user_lists', 'followers', props.params.accountId, 'next']),
+});
+
+@connect(mapStateToProps)
+export default class Followers extends ImmutablePureComponent {
+
+ static propTypes = {
+ params: PropTypes.object.isRequired,
+ dispatch: PropTypes.func.isRequired,
+ accountIds: ImmutablePropTypes.list,
+ hasMore: PropTypes.bool,
+ };
+
+ componentWillMount () {
+ this.props.dispatch(fetchAccount(this.props.params.accountId));
+ this.props.dispatch(fetchFollowers(this.props.params.accountId));
+ }
+
+ componentWillReceiveProps (nextProps) {
+ if (nextProps.params.accountId !== this.props.params.accountId && nextProps.params.accountId) {
+ this.props.dispatch(fetchAccount(nextProps.params.accountId));
+ this.props.dispatch(fetchFollowers(nextProps.params.accountId));
+ }
+ }
+
+ handleScroll = (e) => {
+ const { scrollTop, scrollHeight, clientHeight } = e.target;
+
+ if (scrollTop === scrollHeight - clientHeight && this.props.hasMore) {
+ this.props.dispatch(expandFollowers(this.props.params.accountId));
+ }
+ }
+
+ handleLoadMore = (e) => {
+ e.preventDefault();
+ this.props.dispatch(expandFollowers(this.props.params.accountId));
+ }
+
+ render () {
+ const { accountIds, hasMore } = this.props;
+
+ let loadMore = null;
+
+ if (!accountIds) {
+ return (
+
+
+
+ );
+ }
+
+ if (hasMore) {
+ loadMore = ;
+ }
+
+ return (
+
+
+
+
+
+
+
+ {accountIds.map(id =>
)}
+ {loadMore}
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/following/index.js b/app/javascript/mastodon/features/following/index.js
new file mode 100644
index 0000000000..a0c0fac051
--- /dev/null
+++ b/app/javascript/mastodon/features/following/index.js
@@ -0,0 +1,93 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import LoadingIndicator from '../../components/loading_indicator';
+import {
+ fetchAccount,
+ fetchFollowing,
+ expandFollowing,
+} from '../../actions/accounts';
+import { ScrollContainer } from 'react-router-scroll-4';
+import AccountContainer from '../../containers/account_container';
+import Column from '../ui/components/column';
+import HeaderContainer from '../account_timeline/containers/header_container';
+import LoadMore from '../../components/load_more';
+import ColumnBackButton from '../../components/column_back_button';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+const mapStateToProps = (state, props) => ({
+ accountIds: state.getIn(['user_lists', 'following', props.params.accountId, 'items']),
+ hasMore: !!state.getIn(['user_lists', 'following', props.params.accountId, 'next']),
+});
+
+@connect(mapStateToProps)
+export default class Following extends ImmutablePureComponent {
+
+ static propTypes = {
+ params: PropTypes.object.isRequired,
+ dispatch: PropTypes.func.isRequired,
+ accountIds: ImmutablePropTypes.list,
+ hasMore: PropTypes.bool,
+ };
+
+ componentWillMount () {
+ this.props.dispatch(fetchAccount(this.props.params.accountId));
+ this.props.dispatch(fetchFollowing(this.props.params.accountId));
+ }
+
+ componentWillReceiveProps (nextProps) {
+ if (nextProps.params.accountId !== this.props.params.accountId && nextProps.params.accountId) {
+ this.props.dispatch(fetchAccount(nextProps.params.accountId));
+ this.props.dispatch(fetchFollowing(nextProps.params.accountId));
+ }
+ }
+
+ handleScroll = (e) => {
+ const { scrollTop, scrollHeight, clientHeight } = e.target;
+
+ if (scrollTop === scrollHeight - clientHeight && this.props.hasMore) {
+ this.props.dispatch(expandFollowing(this.props.params.accountId));
+ }
+ }
+
+ handleLoadMore = (e) => {
+ e.preventDefault();
+ this.props.dispatch(expandFollowing(this.props.params.accountId));
+ }
+
+ render () {
+ const { accountIds, hasMore } = this.props;
+
+ let loadMore = null;
+
+ if (!accountIds) {
+ return (
+
+
+
+ );
+ }
+
+ if (hasMore) {
+ loadMore = ;
+ }
+
+ return (
+
+
+
+
+
+
+
+ {accountIds.map(id =>
)}
+ {loadMore}
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/generic_not_found/index.js b/app/javascript/mastodon/features/generic_not_found/index.js
new file mode 100644
index 0000000000..0290be47f9
--- /dev/null
+++ b/app/javascript/mastodon/features/generic_not_found/index.js
@@ -0,0 +1,11 @@
+import React from 'react';
+import Column from '../ui/components/column';
+import MissingIndicator from '../../components/missing_indicator';
+
+const GenericNotFound = () => (
+
+
+
+);
+
+export default GenericNotFound;
diff --git a/app/javascript/mastodon/features/getting_started/index.js b/app/javascript/mastodon/features/getting_started/index.js
new file mode 100644
index 0000000000..4b4ae69470
--- /dev/null
+++ b/app/javascript/mastodon/features/getting_started/index.js
@@ -0,0 +1,112 @@
+import React from 'react';
+import Column from '../ui/components/column';
+import ColumnLink from '../ui/components/column_link';
+import ColumnSubheading from '../ui/components/column_subheading';
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { me } from '../../initial_state';
+
+const messages = defineMessages({
+ heading: { id: 'getting_started.heading', defaultMessage: 'Getting started' },
+ home_timeline: { id: 'tabs_bar.home', defaultMessage: 'Home' },
+ notifications: { id: 'tabs_bar.notifications', defaultMessage: 'Notifications' },
+ public_timeline: { id: 'navigation_bar.public_timeline', defaultMessage: 'Federated timeline' },
+ navigation_subheading: { id: 'column_subheading.navigation', defaultMessage: 'Navigation' },
+ settings_subheading: { id: 'column_subheading.settings', defaultMessage: 'Settings' },
+ community_timeline: { id: 'navigation_bar.community_timeline', defaultMessage: 'Local timeline' },
+ preferences: { id: 'navigation_bar.preferences', defaultMessage: 'Preferences' },
+ follow_requests: { id: 'navigation_bar.follow_requests', defaultMessage: 'Follow requests' },
+ sign_out: { id: 'navigation_bar.logout', defaultMessage: 'Logout' },
+ favourites: { id: 'navigation_bar.favourites', defaultMessage: 'Favourites' },
+ blocks: { id: 'navigation_bar.blocks', defaultMessage: 'Blocked users' },
+ mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' },
+ info: { id: 'navigation_bar.info', defaultMessage: 'Extended information' },
+ pins: { id: 'navigation_bar.pins', defaultMessage: 'Pinned toots' },
+});
+
+const mapStateToProps = state => ({
+ myAccount: state.getIn(['accounts', me]),
+ columns: state.getIn(['settings', 'columns']),
+});
+
+@connect(mapStateToProps)
+@injectIntl
+export default class GettingStarted extends ImmutablePureComponent {
+
+ static propTypes = {
+ intl: PropTypes.object.isRequired,
+ myAccount: ImmutablePropTypes.map.isRequired,
+ columns: ImmutablePropTypes.list,
+ multiColumn: PropTypes.bool,
+ };
+
+ render () {
+ const { intl, myAccount, columns, multiColumn } = this.props;
+
+ let navItems = [];
+
+ if (multiColumn) {
+ if (!columns.find(item => item.get('id') === 'HOME')) {
+ navItems.push();
+ }
+
+ if (!columns.find(item => item.get('id') === 'NOTIFICATIONS')) {
+ navItems.push();
+ }
+
+ if (!columns.find(item => item.get('id') === 'COMMUNITY')) {
+ navItems.push();
+ }
+
+ if (!columns.find(item => item.get('id') === 'PUBLIC')) {
+ navItems.push();
+ }
+ }
+
+ navItems = navItems.concat([
+ ,
+ ,
+ ]);
+
+ if (myAccount.get('locked')) {
+ navItems.push();
+ }
+
+ navItems = navItems.concat([
+ ,
+ ,
+ ]);
+
+ return (
+
+
+
+ {navItems}
+
+
+
+
+
+
+
+
+
+ • •
+
+
+ tootsuite/mastodon }}
+ />
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/hashtag_timeline/index.js b/app/javascript/mastodon/features/hashtag_timeline/index.js
new file mode 100644
index 0000000000..5fe21ce90e
--- /dev/null
+++ b/app/javascript/mastodon/features/hashtag_timeline/index.js
@@ -0,0 +1,118 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import StatusListContainer from '../ui/containers/status_list_container';
+import Column from '../../components/column';
+import ColumnHeader from '../../components/column_header';
+import {
+ refreshHashtagTimeline,
+ expandHashtagTimeline,
+} from '../../actions/timelines';
+import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
+import { FormattedMessage } from 'react-intl';
+import { connectHashtagStream } from '../../actions/streaming';
+
+const mapStateToProps = (state, props) => ({
+ hasUnread: state.getIn(['timelines', `hashtag:${props.params.id}`, 'unread']) > 0,
+});
+
+@connect(mapStateToProps)
+export default class HashtagTimeline extends React.PureComponent {
+
+ static propTypes = {
+ params: PropTypes.object.isRequired,
+ columnId: PropTypes.string,
+ dispatch: PropTypes.func.isRequired,
+ hasUnread: PropTypes.bool,
+ multiColumn: PropTypes.bool,
+ };
+
+ handlePin = () => {
+ const { columnId, dispatch } = this.props;
+
+ if (columnId) {
+ dispatch(removeColumn(columnId));
+ } else {
+ dispatch(addColumn('HASHTAG', { id: this.props.params.id }));
+ }
+ }
+
+ handleMove = (dir) => {
+ const { columnId, dispatch } = this.props;
+ dispatch(moveColumn(columnId, dir));
+ }
+
+ handleHeaderClick = () => {
+ this.column.scrollTop();
+ }
+
+ _subscribe (dispatch, id) {
+ this.disconnect = dispatch(connectHashtagStream(id));
+ }
+
+ _unsubscribe () {
+ if (this.disconnect) {
+ this.disconnect();
+ this.disconnect = null;
+ }
+ }
+
+ componentDidMount () {
+ const { dispatch } = this.props;
+ const { id } = this.props.params;
+
+ dispatch(refreshHashtagTimeline(id));
+ this._subscribe(dispatch, id);
+ }
+
+ componentWillReceiveProps (nextProps) {
+ if (nextProps.params.id !== this.props.params.id) {
+ this.props.dispatch(refreshHashtagTimeline(nextProps.params.id));
+ this._unsubscribe();
+ this._subscribe(this.props.dispatch, nextProps.params.id);
+ }
+ }
+
+ componentWillUnmount () {
+ this._unsubscribe();
+ }
+
+ setRef = c => {
+ this.column = c;
+ }
+
+ handleLoadMore = () => {
+ this.props.dispatch(expandHashtagTimeline(this.props.params.id));
+ }
+
+ render () {
+ const { hasUnread, columnId, multiColumn } = this.props;
+ const { id } = this.props.params;
+ const pinned = !!columnId;
+
+ return (
+
+
+
+ }
+ />
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/home_timeline/components/column_settings.js b/app/javascript/mastodon/features/home_timeline/components/column_settings.js
new file mode 100644
index 0000000000..43172bd25b
--- /dev/null
+++ b/app/javascript/mastodon/features/home_timeline/components/column_settings.js
@@ -0,0 +1,46 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+import SettingToggle from '../../notifications/components/setting_toggle';
+import SettingText from '../../../components/setting_text';
+
+const messages = defineMessages({
+ filter_regex: { id: 'home.column_settings.filter_regex', defaultMessage: 'Filter out by regular expressions' },
+ settings: { id: 'home.settings', defaultMessage: 'Column settings' },
+});
+
+@injectIntl
+export default class ColumnSettings extends React.PureComponent {
+
+ static propTypes = {
+ settings: ImmutablePropTypes.map.isRequired,
+ onChange: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ };
+
+ render () {
+ const { settings, onChange, intl } = this.props;
+
+ return (
+
+
+
+
+ } />
+
+
+
+ } />
+
+
+
+
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/home_timeline/containers/column_settings_container.js b/app/javascript/mastodon/features/home_timeline/containers/column_settings_container.js
new file mode 100644
index 0000000000..fd8a392982
--- /dev/null
+++ b/app/javascript/mastodon/features/home_timeline/containers/column_settings_container.js
@@ -0,0 +1,21 @@
+import { connect } from 'react-redux';
+import ColumnSettings from '../components/column_settings';
+import { changeSetting, saveSettings } from '../../../actions/settings';
+
+const mapStateToProps = state => ({
+ settings: state.getIn(['settings', 'home']),
+});
+
+const mapDispatchToProps = dispatch => ({
+
+ onChange (key, checked) {
+ dispatch(changeSetting(['home', ...key], checked));
+ },
+
+ onSave () {
+ dispatch(saveSettings());
+ },
+
+});
+
+export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);
diff --git a/app/javascript/mastodon/features/home_timeline/index.js b/app/javascript/mastodon/features/home_timeline/index.js
new file mode 100644
index 0000000000..a4bc60face
--- /dev/null
+++ b/app/javascript/mastodon/features/home_timeline/index.js
@@ -0,0 +1,90 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import { expandHomeTimeline } from '../../actions/timelines';
+import PropTypes from 'prop-types';
+import StatusListContainer from '../ui/containers/status_list_container';
+import Column from '../../components/column';
+import ColumnHeader from '../../components/column_header';
+import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+import ColumnSettingsContainer from './containers/column_settings_container';
+import { Link } from 'react-router-dom';
+
+const messages = defineMessages({
+ title: { id: 'column.home', defaultMessage: 'Home' },
+});
+
+const mapStateToProps = state => ({
+ hasUnread: state.getIn(['timelines', 'home', 'unread']) > 0,
+});
+
+@connect(mapStateToProps)
+@injectIntl
+export default class HomeTimeline extends React.PureComponent {
+
+ static propTypes = {
+ dispatch: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ hasUnread: PropTypes.bool,
+ columnId: PropTypes.string,
+ multiColumn: PropTypes.bool,
+ };
+
+ handlePin = () => {
+ const { columnId, dispatch } = this.props;
+
+ if (columnId) {
+ dispatch(removeColumn(columnId));
+ } else {
+ dispatch(addColumn('HOME', {}));
+ }
+ }
+
+ handleMove = (dir) => {
+ const { columnId, dispatch } = this.props;
+ dispatch(moveColumn(columnId, dir));
+ }
+
+ handleHeaderClick = () => {
+ this.column.scrollTop();
+ }
+
+ setRef = c => {
+ this.column = c;
+ }
+
+ handleLoadMore = () => {
+ this.props.dispatch(expandHomeTimeline());
+ }
+
+ render () {
+ const { intl, hasUnread, columnId, multiColumn } = this.props;
+ const pinned = !!columnId;
+
+ return (
+
+
+
+
+
+ }} />}
+ />
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/mutes/index.js b/app/javascript/mastodon/features/mutes/index.js
new file mode 100644
index 0000000000..bb351ece24
--- /dev/null
+++ b/app/javascript/mastodon/features/mutes/index.js
@@ -0,0 +1,70 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import LoadingIndicator from '../../components/loading_indicator';
+import { ScrollContainer } from 'react-router-scroll-4';
+import Column from '../ui/components/column';
+import ColumnBackButtonSlim from '../../components/column_back_button_slim';
+import AccountContainer from '../../containers/account_container';
+import { fetchMutes, expandMutes } from '../../actions/mutes';
+import { defineMessages, injectIntl } from 'react-intl';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+const messages = defineMessages({
+ heading: { id: 'column.mutes', defaultMessage: 'Muted users' },
+});
+
+const mapStateToProps = state => ({
+ accountIds: state.getIn(['user_lists', 'mutes', 'items']),
+});
+
+@connect(mapStateToProps)
+@injectIntl
+export default class Mutes extends ImmutablePureComponent {
+
+ static propTypes = {
+ params: PropTypes.object.isRequired,
+ dispatch: PropTypes.func.isRequired,
+ accountIds: ImmutablePropTypes.list,
+ intl: PropTypes.object.isRequired,
+ };
+
+ componentWillMount () {
+ this.props.dispatch(fetchMutes());
+ }
+
+ handleScroll = (e) => {
+ const { scrollTop, scrollHeight, clientHeight } = e.target;
+
+ if (scrollTop === scrollHeight - clientHeight) {
+ this.props.dispatch(expandMutes());
+ }
+ }
+
+ render () {
+ const { intl, accountIds } = this.props;
+
+ if (!accountIds) {
+ return (
+
+
+
+ );
+ }
+
+ return (
+
+
+
+
+ {accountIds.map(id =>
+
+ )}
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/notifications/components/clear_column_button.js b/app/javascript/mastodon/features/notifications/components/clear_column_button.js
new file mode 100644
index 0000000000..22a10753f5
--- /dev/null
+++ b/app/javascript/mastodon/features/notifications/components/clear_column_button.js
@@ -0,0 +1,17 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { FormattedMessage } from 'react-intl';
+
+export default class ClearColumnButton extends React.Component {
+
+ static propTypes = {
+ onClick: PropTypes.func.isRequired,
+ };
+
+ render () {
+ return (
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/notifications/components/column_settings.js b/app/javascript/mastodon/features/notifications/components/column_settings.js
new file mode 100644
index 0000000000..88a29d4d31
--- /dev/null
+++ b/app/javascript/mastodon/features/notifications/components/column_settings.js
@@ -0,0 +1,86 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import { FormattedMessage } from 'react-intl';
+import ClearColumnButton from './clear_column_button';
+import SettingToggle from './setting_toggle';
+
+export default class ColumnSettings extends React.PureComponent {
+
+ static propTypes = {
+ settings: ImmutablePropTypes.map.isRequired,
+ pushSettings: ImmutablePropTypes.map.isRequired,
+ onChange: PropTypes.func.isRequired,
+ onSave: PropTypes.func.isRequired,
+ onClear: PropTypes.func.isRequired,
+ };
+
+ onPushChange = (key, checked) => {
+ this.props.onChange(['push', ...key], checked);
+ }
+
+ render () {
+ const { settings, pushSettings, onChange, onClear } = this.props;
+
+ const alertStr = ;
+ const showStr = ;
+ const soundStr = ;
+
+ const showPushSettings = pushSettings.get('browserSupport') && pushSettings.get('isSubscribed');
+ const pushStr = showPushSettings && ;
+ const pushMeta = showPushSettings && ;
+
+ return (
+
+
+
+
+
+
+
+
+
+
+ {showPushSettings && }
+
+
+
+
+
+
+
+
+
+
+ {showPushSettings && }
+
+
+
+
+
+
+
+
+
+
+ {showPushSettings && }
+
+
+
+
+
+
+
+
+
+
+ {showPushSettings && }
+
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/notifications/components/notification.js b/app/javascript/mastodon/features/notifications/components/notification.js
new file mode 100644
index 0000000000..9d170cad53
--- /dev/null
+++ b/app/javascript/mastodon/features/notifications/components/notification.js
@@ -0,0 +1,152 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import StatusContainer from '../../../containers/status_container';
+import AccountContainer from '../../../containers/account_container';
+import { FormattedMessage } from 'react-intl';
+import Permalink from '../../../components/permalink';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { HotKeys } from 'react-hotkeys';
+
+export default class Notification extends ImmutablePureComponent {
+
+ static contextTypes = {
+ router: PropTypes.object,
+ };
+
+ static propTypes = {
+ notification: ImmutablePropTypes.map.isRequired,
+ hidden: PropTypes.bool,
+ onMoveUp: PropTypes.func.isRequired,
+ onMoveDown: PropTypes.func.isRequired,
+ onMention: PropTypes.func.isRequired,
+ };
+
+ handleMoveUp = () => {
+ const { notification, onMoveUp } = this.props;
+ onMoveUp(notification.get('id'));
+ }
+
+ handleMoveDown = () => {
+ const { notification, onMoveDown } = this.props;
+ onMoveDown(notification.get('id'));
+ }
+
+ handleOpen = () => {
+ const { notification } = this.props;
+
+ if (notification.get('status')) {
+ this.context.router.history.push(`/statuses/${notification.get('status')}`);
+ } else {
+ this.handleOpenProfile();
+ }
+ }
+
+ handleOpenProfile = () => {
+ const { notification } = this.props;
+ this.context.router.history.push(`/accounts/${notification.getIn(['account', 'id'])}`);
+ }
+
+ handleMention = e => {
+ e.preventDefault();
+
+ const { notification, onMention } = this.props;
+ onMention(notification.get('account'), this.context.router.history);
+ }
+
+ getHandlers () {
+ return {
+ moveUp: this.handleMoveUp,
+ moveDown: this.handleMoveDown,
+ open: this.handleOpen,
+ openProfile: this.handleOpenProfile,
+ mention: this.handleMention,
+ reply: this.handleMention,
+ };
+ }
+
+ renderFollow (account, link) {
+ return (
+
+
+
+ );
+ }
+
+ renderMention (notification) {
+ return (
+
+ );
+ }
+
+ renderFavourite (notification, link) {
+ return (
+
+
+
+ );
+ }
+
+ renderReblog (notification, link) {
+ return (
+
+
+
+ );
+ }
+
+ render () {
+ const { notification } = this.props;
+ const account = notification.get('account');
+ const displayNameHtml = { __html: account.get('display_name_html') };
+ const link = ;
+
+ switch(notification.get('type')) {
+ case 'follow':
+ return this.renderFollow(account, link);
+ case 'mention':
+ return this.renderMention(notification);
+ case 'favourite':
+ return this.renderFavourite(notification, link);
+ case 'reblog':
+ return this.renderReblog(notification, link);
+ }
+
+ return null;
+ }
+
+}
diff --git a/app/javascript/mastodon/features/notifications/components/setting_toggle.js b/app/javascript/mastodon/features/notifications/components/setting_toggle.js
new file mode 100644
index 0000000000..281359d2a2
--- /dev/null
+++ b/app/javascript/mastodon/features/notifications/components/setting_toggle.js
@@ -0,0 +1,34 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import Toggle from 'react-toggle';
+
+export default class SettingToggle extends React.PureComponent {
+
+ static propTypes = {
+ prefix: PropTypes.string,
+ settings: ImmutablePropTypes.map.isRequired,
+ settingKey: PropTypes.array.isRequired,
+ label: PropTypes.node.isRequired,
+ meta: PropTypes.node,
+ onChange: PropTypes.func.isRequired,
+ }
+
+ onChange = ({ target }) => {
+ this.props.onChange(this.props.settingKey, target.checked);
+ }
+
+ render () {
+ const { prefix, settings, settingKey, label, meta } = this.props;
+ const id = ['setting-toggle', prefix, ...settingKey].filter(Boolean).join('-');
+
+ return (
+
+
+
+ {meta && {meta}}
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/notifications/containers/column_settings_container.js b/app/javascript/mastodon/features/notifications/containers/column_settings_container.js
new file mode 100644
index 0000000000..d4ead7881b
--- /dev/null
+++ b/app/javascript/mastodon/features/notifications/containers/column_settings_container.js
@@ -0,0 +1,44 @@
+import { connect } from 'react-redux';
+import { defineMessages, injectIntl } from 'react-intl';
+import ColumnSettings from '../components/column_settings';
+import { changeSetting, saveSettings } from '../../../actions/settings';
+import { clearNotifications } from '../../../actions/notifications';
+import { changeAlerts as changePushNotifications, saveSettings as savePushNotificationSettings } from '../../../actions/push_notifications';
+import { openModal } from '../../../actions/modal';
+
+const messages = defineMessages({
+ clearMessage: { id: 'notifications.clear_confirmation', defaultMessage: 'Are you sure you want to permanently clear all your notifications?' },
+ clearConfirm: { id: 'notifications.clear', defaultMessage: 'Clear notifications' },
+});
+
+const mapStateToProps = state => ({
+ settings: state.getIn(['settings', 'notifications']),
+ pushSettings: state.get('push_notifications'),
+});
+
+const mapDispatchToProps = (dispatch, { intl }) => ({
+
+ onChange (key, checked) {
+ if (key[0] === 'push') {
+ dispatch(changePushNotifications(key.slice(1), checked));
+ } else {
+ dispatch(changeSetting(['notifications', ...key], checked));
+ }
+ },
+
+ onSave () {
+ dispatch(saveSettings());
+ dispatch(savePushNotificationSettings());
+ },
+
+ onClear () {
+ dispatch(openModal('CONFIRM', {
+ message: intl.formatMessage(messages.clearMessage),
+ confirm: intl.formatMessage(messages.clearConfirm),
+ onConfirm: () => dispatch(clearNotifications()),
+ }));
+ },
+
+});
+
+export default injectIntl(connect(mapStateToProps, mapDispatchToProps)(ColumnSettings));
diff --git a/app/javascript/mastodon/features/notifications/containers/notification_container.js b/app/javascript/mastodon/features/notifications/containers/notification_container.js
new file mode 100644
index 0000000000..921aa460f5
--- /dev/null
+++ b/app/javascript/mastodon/features/notifications/containers/notification_container.js
@@ -0,0 +1,22 @@
+import { connect } from 'react-redux';
+import { makeGetNotification } from '../../../selectors';
+import Notification from '../components/notification';
+import { mentionCompose } from '../../../actions/compose';
+
+const makeMapStateToProps = () => {
+ const getNotification = makeGetNotification();
+
+ const mapStateToProps = (state, props) => ({
+ notification: getNotification(state, props.notification, props.accountId),
+ });
+
+ return mapStateToProps;
+};
+
+const mapDispatchToProps = dispatch => ({
+ onMention: (account, router) => {
+ dispatch(mentionCompose(account, router));
+ },
+});
+
+export default connect(makeMapStateToProps, mapDispatchToProps)(Notification);
diff --git a/app/javascript/mastodon/features/notifications/index.js b/app/javascript/mastodon/features/notifications/index.js
new file mode 100644
index 0000000000..35b430bfb5
--- /dev/null
+++ b/app/javascript/mastodon/features/notifications/index.js
@@ -0,0 +1,168 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import Column from '../../components/column';
+import ColumnHeader from '../../components/column_header';
+import { expandNotifications, scrollTopNotifications } from '../../actions/notifications';
+import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
+import NotificationContainer from './containers/notification_container';
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+import ColumnSettingsContainer from './containers/column_settings_container';
+import { createSelector } from 'reselect';
+import { List as ImmutableList } from 'immutable';
+import { debounce } from 'lodash';
+import ScrollableList from '../../components/scrollable_list';
+
+const messages = defineMessages({
+ title: { id: 'column.notifications', defaultMessage: 'Notifications' },
+});
+
+const getNotifications = createSelector([
+ state => ImmutableList(state.getIn(['settings', 'notifications', 'shows']).filter(item => !item).keys()),
+ state => state.getIn(['notifications', 'items']),
+], (excludedTypes, notifications) => notifications.filterNot(item => excludedTypes.includes(item.get('type'))));
+
+const mapStateToProps = state => ({
+ notifications: getNotifications(state),
+ isLoading: state.getIn(['notifications', 'isLoading'], true),
+ isUnread: state.getIn(['notifications', 'unread']) > 0,
+ hasMore: !!state.getIn(['notifications', 'next']),
+});
+
+@connect(mapStateToProps)
+@injectIntl
+export default class Notifications extends React.PureComponent {
+
+ static propTypes = {
+ columnId: PropTypes.string,
+ notifications: ImmutablePropTypes.list.isRequired,
+ dispatch: PropTypes.func.isRequired,
+ shouldUpdateScroll: PropTypes.func,
+ intl: PropTypes.object.isRequired,
+ isLoading: PropTypes.bool,
+ isUnread: PropTypes.bool,
+ multiColumn: PropTypes.bool,
+ hasMore: PropTypes.bool,
+ };
+
+ static defaultProps = {
+ trackScroll: true,
+ };
+
+ handleScrollToBottom = debounce(() => {
+ this.props.dispatch(scrollTopNotifications(false));
+ this.props.dispatch(expandNotifications());
+ }, 300, { leading: true });
+
+ handleScrollToTop = debounce(() => {
+ this.props.dispatch(scrollTopNotifications(true));
+ }, 100);
+
+ handleScroll = debounce(() => {
+ this.props.dispatch(scrollTopNotifications(false));
+ }, 100);
+
+ handlePin = () => {
+ const { columnId, dispatch } = this.props;
+
+ if (columnId) {
+ dispatch(removeColumn(columnId));
+ } else {
+ dispatch(addColumn('NOTIFICATIONS', {}));
+ }
+ }
+
+ handleMove = (dir) => {
+ const { columnId, dispatch } = this.props;
+ dispatch(moveColumn(columnId, dir));
+ }
+
+ handleHeaderClick = () => {
+ this.column.scrollTop();
+ }
+
+ setColumnRef = c => {
+ this.column = c;
+ }
+
+ handleMoveUp = id => {
+ const elementIndex = this.props.notifications.findIndex(item => item.get('id') === id) - 1;
+ this._selectChild(elementIndex);
+ }
+
+ handleMoveDown = id => {
+ const elementIndex = this.props.notifications.findIndex(item => item.get('id') === id) + 1;
+ this._selectChild(elementIndex);
+ }
+
+ _selectChild (index) {
+ const element = this.column.node.querySelector(`article:nth-of-type(${index + 1}) .focusable`);
+
+ if (element) {
+ element.focus();
+ }
+ }
+
+ render () {
+ const { intl, notifications, shouldUpdateScroll, isLoading, isUnread, columnId, multiColumn, hasMore } = this.props;
+ const pinned = !!columnId;
+ const emptyMessage = ;
+
+ let scrollableContent = null;
+
+ if (isLoading && this.scrollableContent) {
+ scrollableContent = this.scrollableContent;
+ } else if (notifications.size > 0 || hasMore) {
+ scrollableContent = notifications.map((item) => (
+
+ ));
+ } else {
+ scrollableContent = null;
+ }
+
+ this.scrollableContent = scrollableContent;
+
+ const scrollContainer = (
+
+ {scrollableContent}
+
+ );
+
+ return (
+
+
+
+
+
+ {scrollContainer}
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/pinned_statuses/index.js b/app/javascript/mastodon/features/pinned_statuses/index.js
new file mode 100644
index 0000000000..b4a6c1e527
--- /dev/null
+++ b/app/javascript/mastodon/features/pinned_statuses/index.js
@@ -0,0 +1,59 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import { fetchPinnedStatuses } from '../../actions/pin_statuses';
+import Column from '../ui/components/column';
+import ColumnBackButtonSlim from '../../components/column_back_button_slim';
+import StatusList from '../../components/status_list';
+import { defineMessages, injectIntl } from 'react-intl';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+const messages = defineMessages({
+ heading: { id: 'column.pins', defaultMessage: 'Pinned toot' },
+});
+
+const mapStateToProps = state => ({
+ statusIds: state.getIn(['status_lists', 'pins', 'items']),
+ hasMore: !!state.getIn(['status_lists', 'pins', 'next']),
+});
+
+@connect(mapStateToProps)
+@injectIntl
+export default class PinnedStatuses extends ImmutablePureComponent {
+
+ static propTypes = {
+ dispatch: PropTypes.func.isRequired,
+ statusIds: ImmutablePropTypes.list.isRequired,
+ intl: PropTypes.object.isRequired,
+ hasMore: PropTypes.bool.isRequired,
+ };
+
+ componentWillMount () {
+ this.props.dispatch(fetchPinnedStatuses());
+ }
+
+ handleHeaderClick = () => {
+ this.column.scrollTop();
+ }
+
+ setRef = c => {
+ this.column = c;
+ }
+
+ render () {
+ const { intl, statusIds, hasMore } = this.props;
+
+ return (
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/public_timeline/containers/column_settings_container.js b/app/javascript/mastodon/features/public_timeline/containers/column_settings_container.js
new file mode 100644
index 0000000000..203e1da926
--- /dev/null
+++ b/app/javascript/mastodon/features/public_timeline/containers/column_settings_container.js
@@ -0,0 +1,17 @@
+import { connect } from 'react-redux';
+import ColumnSettings from '../../community_timeline/components/column_settings';
+import { changeSetting } from '../../../actions/settings';
+
+const mapStateToProps = state => ({
+ settings: state.getIn(['settings', 'public']),
+});
+
+const mapDispatchToProps = dispatch => ({
+
+ onChange (key, checked) {
+ dispatch(changeSetting(['public', ...key], checked));
+ },
+
+});
+
+export default connect(mapStateToProps, mapDispatchToProps)(ColumnSettings);
diff --git a/app/javascript/mastodon/features/public_timeline/index.js b/app/javascript/mastodon/features/public_timeline/index.js
new file mode 100644
index 0000000000..193489c630
--- /dev/null
+++ b/app/javascript/mastodon/features/public_timeline/index.js
@@ -0,0 +1,107 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import StatusListContainer from '../ui/containers/status_list_container';
+import Column from '../../components/column';
+import ColumnHeader from '../../components/column_header';
+import {
+ refreshPublicTimeline,
+ expandPublicTimeline,
+} from '../../actions/timelines';
+import { addColumn, removeColumn, moveColumn } from '../../actions/columns';
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+import ColumnSettingsContainer from './containers/column_settings_container';
+import { connectPublicStream } from '../../actions/streaming';
+
+const messages = defineMessages({
+ title: { id: 'column.public', defaultMessage: 'Federated timeline' },
+});
+
+const mapStateToProps = state => ({
+ hasUnread: state.getIn(['timelines', 'public', 'unread']) > 0,
+});
+
+@connect(mapStateToProps)
+@injectIntl
+export default class PublicTimeline extends React.PureComponent {
+
+ static propTypes = {
+ dispatch: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ columnId: PropTypes.string,
+ multiColumn: PropTypes.bool,
+ hasUnread: PropTypes.bool,
+ };
+
+ handlePin = () => {
+ const { columnId, dispatch } = this.props;
+
+ if (columnId) {
+ dispatch(removeColumn(columnId));
+ } else {
+ dispatch(addColumn('PUBLIC', {}));
+ }
+ }
+
+ handleMove = (dir) => {
+ const { columnId, dispatch } = this.props;
+ dispatch(moveColumn(columnId, dir));
+ }
+
+ handleHeaderClick = () => {
+ this.column.scrollTop();
+ }
+
+ componentDidMount () {
+ const { dispatch } = this.props;
+
+ dispatch(refreshPublicTimeline());
+ this.disconnect = dispatch(connectPublicStream());
+ }
+
+ componentWillUnmount () {
+ if (this.disconnect) {
+ this.disconnect();
+ this.disconnect = null;
+ }
+ }
+
+ setRef = c => {
+ this.column = c;
+ }
+
+ handleLoadMore = () => {
+ this.props.dispatch(expandPublicTimeline());
+ }
+
+ render () {
+ const { intl, columnId, hasUnread, multiColumn } = this.props;
+ const pinned = !!columnId;
+
+ return (
+
+
+
+
+
+ }
+ />
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/reblogs/index.js b/app/javascript/mastodon/features/reblogs/index.js
new file mode 100644
index 0000000000..579d6aaa02
--- /dev/null
+++ b/app/javascript/mastodon/features/reblogs/index.js
@@ -0,0 +1,60 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import LoadingIndicator from '../../components/loading_indicator';
+import { fetchReblogs } from '../../actions/interactions';
+import { ScrollContainer } from 'react-router-scroll-4';
+import AccountContainer from '../../containers/account_container';
+import Column from '../ui/components/column';
+import ColumnBackButton from '../../components/column_back_button';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+const mapStateToProps = (state, props) => ({
+ accountIds: state.getIn(['user_lists', 'reblogged_by', props.params.statusId]),
+});
+
+@connect(mapStateToProps)
+export default class Reblogs extends ImmutablePureComponent {
+
+ static propTypes = {
+ params: PropTypes.object.isRequired,
+ dispatch: PropTypes.func.isRequired,
+ accountIds: ImmutablePropTypes.list,
+ };
+
+ componentWillMount () {
+ this.props.dispatch(fetchReblogs(this.props.params.statusId));
+ }
+
+ componentWillReceiveProps(nextProps) {
+ if (nextProps.params.statusId !== this.props.params.statusId && nextProps.params.statusId) {
+ this.props.dispatch(fetchReblogs(nextProps.params.statusId));
+ }
+ }
+
+ render () {
+ const { accountIds } = this.props;
+
+ if (!accountIds) {
+ return (
+
+
+
+ );
+ }
+
+ return (
+
+
+
+
+
+ {accountIds.map(id =>
)}
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/report/components/status_check_box.js b/app/javascript/mastodon/features/report/components/status_check_box.js
new file mode 100644
index 0000000000..cc92322011
--- /dev/null
+++ b/app/javascript/mastodon/features/report/components/status_check_box.js
@@ -0,0 +1,37 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import Toggle from 'react-toggle';
+
+export default class StatusCheckBox extends React.PureComponent {
+
+ static propTypes = {
+ status: ImmutablePropTypes.map.isRequired,
+ checked: PropTypes.bool,
+ onToggle: PropTypes.func.isRequired,
+ disabled: PropTypes.bool,
+ };
+
+ render () {
+ const { status, checked, onToggle, disabled } = this.props;
+ const content = { __html: status.get('contentHtml') };
+
+ if (status.get('reblog')) {
+ return null;
+ }
+
+ return (
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/report/containers/status_check_box_container.js b/app/javascript/mastodon/features/report/containers/status_check_box_container.js
new file mode 100644
index 0000000000..48cd0319bd
--- /dev/null
+++ b/app/javascript/mastodon/features/report/containers/status_check_box_container.js
@@ -0,0 +1,19 @@
+import { connect } from 'react-redux';
+import StatusCheckBox from '../components/status_check_box';
+import { toggleStatusReport } from '../../../actions/reports';
+import { Set as ImmutableSet } from 'immutable';
+
+const mapStateToProps = (state, { id }) => ({
+ status: state.getIn(['statuses', id]),
+ checked: state.getIn(['reports', 'new', 'status_ids'], ImmutableSet()).includes(id),
+});
+
+const mapDispatchToProps = (dispatch, { id }) => ({
+
+ onToggle (e) {
+ dispatch(toggleStatusReport(id, e.target.checked));
+ },
+
+});
+
+export default connect(mapStateToProps, mapDispatchToProps)(StatusCheckBox);
diff --git a/app/javascript/mastodon/features/standalone/compose/index.js b/app/javascript/mastodon/features/standalone/compose/index.js
new file mode 100644
index 0000000000..0d764575fd
--- /dev/null
+++ b/app/javascript/mastodon/features/standalone/compose/index.js
@@ -0,0 +1,20 @@
+import React from 'react';
+import ComposeFormContainer from '../../compose/containers/compose_form_container';
+import NotificationsContainer from '../../ui/containers/notifications_container';
+import LoadingBarContainer from '../../ui/containers/loading_bar_container';
+import ModalContainer from '../../ui/containers/modal_container';
+
+export default class Compose extends React.PureComponent {
+
+ render () {
+ return (
+
+
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/standalone/hashtag_timeline/index.js b/app/javascript/mastodon/features/standalone/hashtag_timeline/index.js
new file mode 100644
index 0000000000..f15fbb2f40
--- /dev/null
+++ b/app/javascript/mastodon/features/standalone/hashtag_timeline/index.js
@@ -0,0 +1,70 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import StatusListContainer from '../../ui/containers/status_list_container';
+import {
+ refreshHashtagTimeline,
+ expandHashtagTimeline,
+} from '../../../actions/timelines';
+import Column from '../../../components/column';
+import ColumnHeader from '../../../components/column_header';
+
+@connect()
+export default class HashtagTimeline extends React.PureComponent {
+
+ static propTypes = {
+ dispatch: PropTypes.func.isRequired,
+ hashtag: PropTypes.string.isRequired,
+ };
+
+ handleHeaderClick = () => {
+ this.column.scrollTop();
+ }
+
+ setRef = c => {
+ this.column = c;
+ }
+
+ componentDidMount () {
+ const { dispatch, hashtag } = this.props;
+
+ dispatch(refreshHashtagTimeline(hashtag));
+
+ this.polling = setInterval(() => {
+ dispatch(refreshHashtagTimeline(hashtag));
+ }, 10000);
+ }
+
+ componentWillUnmount () {
+ if (typeof this.polling !== 'undefined') {
+ clearInterval(this.polling);
+ this.polling = null;
+ }
+ }
+
+ handleLoadMore = () => {
+ this.props.dispatch(expandHashtagTimeline(this.props.hashtag));
+ }
+
+ render () {
+ const { hashtag } = this.props;
+
+ return (
+
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/standalone/public_timeline/index.js b/app/javascript/mastodon/features/standalone/public_timeline/index.js
new file mode 100644
index 0000000000..de4b5320a5
--- /dev/null
+++ b/app/javascript/mastodon/features/standalone/public_timeline/index.js
@@ -0,0 +1,76 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import StatusListContainer from '../../ui/containers/status_list_container';
+import {
+ refreshPublicTimeline,
+ expandPublicTimeline,
+} from '../../../actions/timelines';
+import Column from '../../../components/column';
+import ColumnHeader from '../../../components/column_header';
+import { defineMessages, injectIntl } from 'react-intl';
+
+const messages = defineMessages({
+ title: { id: 'standalone.public_title', defaultMessage: 'A look inside...' },
+});
+
+@connect()
+@injectIntl
+export default class PublicTimeline extends React.PureComponent {
+
+ static propTypes = {
+ dispatch: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ };
+
+ handleHeaderClick = () => {
+ this.column.scrollTop();
+ }
+
+ setRef = c => {
+ this.column = c;
+ }
+
+ componentDidMount () {
+ const { dispatch } = this.props;
+
+ dispatch(refreshPublicTimeline());
+
+ this.polling = setInterval(() => {
+ dispatch(refreshPublicTimeline());
+ }, 3000);
+ }
+
+ componentWillUnmount () {
+ if (typeof this.polling !== 'undefined') {
+ clearInterval(this.polling);
+ this.polling = null;
+ }
+ }
+
+ handleLoadMore = () => {
+ this.props.dispatch(expandPublicTimeline());
+ }
+
+ render () {
+ const { intl } = this.props;
+
+ return (
+
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/status/components/action_bar.js b/app/javascript/mastodon/features/status/components/action_bar.js
new file mode 100644
index 0000000000..7b65420d04
--- /dev/null
+++ b/app/javascript/mastodon/features/status/components/action_bar.js
@@ -0,0 +1,129 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import IconButton from '../../../components/icon_button';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
+import { defineMessages, injectIntl } from 'react-intl';
+import { me } from '../../../initial_state';
+
+const messages = defineMessages({
+ delete: { id: 'status.delete', defaultMessage: 'Delete' },
+ mention: { id: 'status.mention', defaultMessage: 'Mention @{name}' },
+ reply: { id: 'status.reply', defaultMessage: 'Reply' },
+ reblog: { id: 'status.reblog', defaultMessage: 'Boost' },
+ cannot_reblog: { id: 'status.cannot_reblog', defaultMessage: 'This post cannot be boosted' },
+ favourite: { id: 'status.favourite', defaultMessage: 'Favourite' },
+ report: { id: 'status.report', defaultMessage: 'Report @{name}' },
+ share: { id: 'status.share', defaultMessage: 'Share' },
+ pin: { id: 'status.pin', defaultMessage: 'Pin on profile' },
+ unpin: { id: 'status.unpin', defaultMessage: 'Unpin from profile' },
+ embed: { id: 'status.embed', defaultMessage: 'Embed' },
+});
+
+@injectIntl
+export default class ActionBar extends React.PureComponent {
+
+ static contextTypes = {
+ router: PropTypes.object,
+ };
+
+ static propTypes = {
+ status: ImmutablePropTypes.map.isRequired,
+ onReply: PropTypes.func.isRequired,
+ onReblog: PropTypes.func.isRequired,
+ onFavourite: PropTypes.func.isRequired,
+ onDelete: PropTypes.func.isRequired,
+ onMention: PropTypes.func.isRequired,
+ onReport: PropTypes.func,
+ onPin: PropTypes.func,
+ onEmbed: PropTypes.func,
+ intl: PropTypes.object.isRequired,
+ };
+
+ handleReplyClick = () => {
+ this.props.onReply(this.props.status);
+ }
+
+ handleReblogClick = (e) => {
+ this.props.onReblog(this.props.status, e);
+ }
+
+ handleFavouriteClick = () => {
+ this.props.onFavourite(this.props.status);
+ }
+
+ handleDeleteClick = () => {
+ this.props.onDelete(this.props.status);
+ }
+
+ handleMentionClick = () => {
+ this.props.onMention(this.props.status.get('account'), this.context.router.history);
+ }
+
+ handleReport = () => {
+ this.props.onReport(this.props.status);
+ }
+
+ handlePinClick = () => {
+ this.props.onPin(this.props.status);
+ }
+
+ handleShare = () => {
+ navigator.share({
+ text: this.props.status.get('search_index'),
+ url: this.props.status.get('url'),
+ });
+ }
+
+ handleEmbed = () => {
+ this.props.onEmbed(this.props.status);
+ }
+
+ render () {
+ const { status, intl } = this.props;
+
+ const publicStatus = ['public', 'unlisted'].includes(status.get('visibility'));
+
+ let menu = [];
+
+ if (publicStatus) {
+ menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed });
+ }
+
+ if (me === status.getIn(['account', 'id'])) {
+ if (publicStatus) {
+ menu.push({ text: intl.formatMessage(status.get('pinned') ? messages.unpin : messages.pin), action: this.handlePinClick });
+ }
+
+ menu.push({ text: intl.formatMessage(messages.delete), action: this.handleDeleteClick });
+ } else {
+ menu.push({ text: intl.formatMessage(messages.mention, { name: status.getIn(['account', 'username']) }), action: this.handleMentionClick });
+ menu.push(null);
+ menu.push({ text: intl.formatMessage(messages.report, { name: status.getIn(['account', 'username']) }), action: this.handleReport });
+ }
+
+ const shareButton = ('share' in navigator) && status.get('visibility') === 'public' && (
+
+ );
+
+ let reblogIcon = 'retweet';
+ if (status.get('visibility') === 'direct') reblogIcon = 'envelope';
+ else if (status.get('visibility') === 'private') reblogIcon = 'lock';
+
+ let reblog_disabled = (status.get('visibility') === 'direct' || status.get('visibility') === 'private');
+
+ return (
+
+
+
+
+ {shareButton}
+
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/status/components/card.js b/app/javascript/mastodon/features/status/components/card.js
new file mode 100644
index 0000000000..bb83374b9b
--- /dev/null
+++ b/app/javascript/mastodon/features/status/components/card.js
@@ -0,0 +1,125 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import punycode from 'punycode';
+import classnames from 'classnames';
+
+const IDNA_PREFIX = 'xn--';
+
+const decodeIDNA = domain => {
+ return domain
+ .split('.')
+ .map(part => part.indexOf(IDNA_PREFIX) === 0 ? punycode.decode(part.slice(IDNA_PREFIX.length)) : part)
+ .join('.');
+};
+
+const getHostname = url => {
+ const parser = document.createElement('a');
+ parser.href = url;
+ return parser.hostname;
+};
+
+export default class Card extends React.PureComponent {
+
+ static propTypes = {
+ card: ImmutablePropTypes.map,
+ maxDescription: PropTypes.number,
+ };
+
+ static defaultProps = {
+ maxDescription: 50,
+ };
+
+ state = {
+ width: 0,
+ };
+
+ renderLink () {
+ const { card, maxDescription } = this.props;
+
+ let image = '';
+ let provider = card.get('provider_name');
+
+ if (card.get('image')) {
+ image = (
+
+
+
+ );
+ }
+
+ if (provider.length < 1) {
+ provider = decodeIDNA(getHostname(card.get('url')));
+ }
+
+ const className = classnames('status-card', {
+ 'horizontal': card.get('width') > card.get('height'),
+ });
+
+ return (
+
+ {image}
+
+
+
{card.get('title')}
+
{(card.get('description') || '').substring(0, maxDescription)}
+
{provider}
+
+
+ );
+ }
+
+ renderPhoto () {
+ const { card } = this.props;
+
+ return (
+
+
+
+ );
+ }
+
+ setRef = c => {
+ if (c) {
+ this.setState({ width: c.offsetWidth });
+ }
+ }
+
+ renderVideo () {
+ const { card } = this.props;
+ const content = { __html: card.get('html') };
+ const { width } = this.state;
+ const ratio = card.get('width') / card.get('height');
+ const height = card.get('width') > card.get('height') ? (width / ratio) : (width * ratio);
+
+ return (
+
+ );
+ }
+
+ render () {
+ const { card } = this.props;
+
+ if (card === null) {
+ return null;
+ }
+
+ switch(card.get('type')) {
+ case 'link':
+ return this.renderLink();
+ case 'photo':
+ return this.renderPhoto();
+ case 'video':
+ return this.renderVideo();
+ case 'rich':
+ default:
+ return null;
+ }
+ }
+
+}
diff --git a/app/javascript/mastodon/features/status/components/detailed_status.js b/app/javascript/mastodon/features/status/components/detailed_status.js
new file mode 100644
index 0000000000..81f71749b1
--- /dev/null
+++ b/app/javascript/mastodon/features/status/components/detailed_status.js
@@ -0,0 +1,125 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import Avatar from '../../../components/avatar';
+import DisplayName from '../../../components/display_name';
+import StatusContent from '../../../components/status_content';
+import MediaGallery from '../../../components/media_gallery';
+import AttachmentList from '../../../components/attachment_list';
+import { Link } from 'react-router-dom';
+import { FormattedDate, FormattedNumber } from 'react-intl';
+import CardContainer from '../containers/card_container';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import Video from '../../video';
+
+export default class DetailedStatus extends ImmutablePureComponent {
+
+ static contextTypes = {
+ router: PropTypes.object,
+ };
+
+ static propTypes = {
+ status: ImmutablePropTypes.map.isRequired,
+ onOpenMedia: PropTypes.func.isRequired,
+ onOpenVideo: PropTypes.func.isRequired,
+ };
+
+ handleAccountClick = (e) => {
+ if (e.button === 0) {
+ e.preventDefault();
+ this.context.router.history.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`);
+ }
+
+ e.stopPropagation();
+ }
+
+ handleOpenVideo = startTime => {
+ this.props.onOpenVideo(this.props.status.getIn(['media_attachments', 0]), startTime);
+ }
+
+ render () {
+ const status = this.props.status.get('reblog') ? this.props.status.get('reblog') : this.props.status;
+
+ let media = '';
+ let applicationLink = '';
+ let reblogLink = '';
+ let reblogIcon = 'retweet';
+
+ if (status.get('media_attachments').size > 0) {
+ if (status.get('media_attachments').some(item => item.get('type') === 'unknown')) {
+ media = ;
+ } else if (status.getIn(['media_attachments', 0, 'type']) === 'video') {
+ const video = status.getIn(['media_attachments', 0]);
+
+ media = (
+
+ );
+ } else {
+ media = (
+
+ );
+ }
+ } else if (status.get('spoiler_text').length === 0) {
+ media = ;
+ }
+
+ if (status.get('application')) {
+ applicationLink = · {status.getIn(['application', 'name'])};
+ }
+
+ if (status.get('visibility') === 'direct') {
+ reblogIcon = 'envelope';
+ } else if (status.get('visibility') === 'private') {
+ reblogIcon = 'lock';
+ }
+
+ if (status.get('visibility') === 'private') {
+ reblogLink = ;
+ } else {
+ reblogLink = (
+
+
+
+
+ );
+ }
+
+ return (
+
+
+
+
+
+
+
+
+ {media}
+
+
+
+
+ {applicationLink} · {reblogLink} ·
+
+
+
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/status/containers/card_container.js b/app/javascript/mastodon/features/status/containers/card_container.js
new file mode 100644
index 0000000000..a97404de19
--- /dev/null
+++ b/app/javascript/mastodon/features/status/containers/card_container.js
@@ -0,0 +1,8 @@
+import { connect } from 'react-redux';
+import Card from '../components/card';
+
+const mapStateToProps = (state, { statusId }) => ({
+ card: state.getIn(['cards', statusId], null),
+});
+
+export default connect(mapStateToProps)(Card);
diff --git a/app/javascript/mastodon/features/status/index.js b/app/javascript/mastodon/features/status/index.js
new file mode 100644
index 0000000000..cc28ff5fca
--- /dev/null
+++ b/app/javascript/mastodon/features/status/index.js
@@ -0,0 +1,338 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import classNames from 'classnames';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import { fetchStatus } from '../../actions/statuses';
+import MissingIndicator from '../../components/missing_indicator';
+import DetailedStatus from './components/detailed_status';
+import ActionBar from './components/action_bar';
+import Column from '../ui/components/column';
+import {
+ favourite,
+ unfavourite,
+ reblog,
+ unreblog,
+ pin,
+ unpin,
+} from '../../actions/interactions';
+import {
+ replyCompose,
+ mentionCompose,
+} from '../../actions/compose';
+import { deleteStatus } from '../../actions/statuses';
+import { initReport } from '../../actions/reports';
+import { makeGetStatus } from '../../selectors';
+import { ScrollContainer } from 'react-router-scroll-4';
+import ColumnBackButton from '../../components/column_back_button';
+import StatusContainer from '../../containers/status_container';
+import { openModal } from '../../actions/modal';
+import { defineMessages, injectIntl } from 'react-intl';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { HotKeys } from 'react-hotkeys';
+import { boostModal, deleteModal } from '../../initial_state';
+import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../../features/ui/util/fullscreen';
+
+const messages = defineMessages({
+ deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },
+ deleteMessage: { id: 'confirmations.delete.message', defaultMessage: 'Are you sure you want to delete this status?' },
+});
+
+const makeMapStateToProps = () => {
+ const getStatus = makeGetStatus();
+
+ const mapStateToProps = (state, props) => ({
+ status: getStatus(state, props.params.statusId),
+ ancestorsIds: state.getIn(['contexts', 'ancestors', props.params.statusId]),
+ descendantsIds: state.getIn(['contexts', 'descendants', props.params.statusId]),
+ });
+
+ return mapStateToProps;
+};
+
+@injectIntl
+@connect(makeMapStateToProps)
+export default class Status extends ImmutablePureComponent {
+
+ static contextTypes = {
+ router: PropTypes.object,
+ };
+
+ static propTypes = {
+ params: PropTypes.object.isRequired,
+ dispatch: PropTypes.func.isRequired,
+ status: ImmutablePropTypes.map,
+ ancestorsIds: ImmutablePropTypes.list,
+ descendantsIds: ImmutablePropTypes.list,
+ intl: PropTypes.object.isRequired,
+ };
+
+ state = {
+ fullscreen: false,
+ };
+
+ componentWillMount () {
+ this.props.dispatch(fetchStatus(this.props.params.statusId));
+ }
+
+ componentDidMount () {
+ attachFullscreenListener(this.onFullScreenChange);
+ }
+
+ componentWillReceiveProps (nextProps) {
+ if (nextProps.params.statusId !== this.props.params.statusId && nextProps.params.statusId) {
+ this._scrolledIntoView = false;
+ this.props.dispatch(fetchStatus(nextProps.params.statusId));
+ }
+ }
+
+ handleFavouriteClick = (status) => {
+ if (status.get('favourited')) {
+ this.props.dispatch(unfavourite(status));
+ } else {
+ this.props.dispatch(favourite(status));
+ }
+ }
+
+ handlePin = (status) => {
+ if (status.get('pinned')) {
+ this.props.dispatch(unpin(status));
+ } else {
+ this.props.dispatch(pin(status));
+ }
+ }
+
+ handleReplyClick = (status) => {
+ this.props.dispatch(replyCompose(status, this.context.router.history));
+ }
+
+ handleModalReblog = (status) => {
+ this.props.dispatch(reblog(status));
+ }
+
+ handleReblogClick = (status, e) => {
+ if (status.get('reblogged')) {
+ this.props.dispatch(unreblog(status));
+ } else {
+ if (e.shiftKey || !boostModal) {
+ this.handleModalReblog(status);
+ } else {
+ this.props.dispatch(openModal('BOOST', { status, onReblog: this.handleModalReblog }));
+ }
+ }
+ }
+
+ handleDeleteClick = (status) => {
+ const { dispatch, intl } = this.props;
+
+ if (!deleteModal) {
+ dispatch(deleteStatus(status.get('id')));
+ } else {
+ dispatch(openModal('CONFIRM', {
+ message: intl.formatMessage(messages.deleteMessage),
+ confirm: intl.formatMessage(messages.deleteConfirm),
+ onConfirm: () => dispatch(deleteStatus(status.get('id'))),
+ }));
+ }
+ }
+
+ handleMentionClick = (account, router) => {
+ this.props.dispatch(mentionCompose(account, router));
+ }
+
+ handleOpenMedia = (media, index) => {
+ this.props.dispatch(openModal('MEDIA', { media, index }));
+ }
+
+ handleOpenVideo = (media, time) => {
+ this.props.dispatch(openModal('VIDEO', { media, time }));
+ }
+
+ handleReport = (status) => {
+ this.props.dispatch(initReport(status.get('account'), status));
+ }
+
+ handleEmbed = (status) => {
+ this.props.dispatch(openModal('EMBED', { url: status.get('url') }));
+ }
+
+ handleHotkeyMoveUp = () => {
+ this.handleMoveUp(this.props.status.get('id'));
+ }
+
+ handleHotkeyMoveDown = () => {
+ this.handleMoveDown(this.props.status.get('id'));
+ }
+
+ handleHotkeyReply = e => {
+ e.preventDefault();
+ this.handleReplyClick(this.props.status);
+ }
+
+ handleHotkeyFavourite = () => {
+ this.handleFavouriteClick(this.props.status);
+ }
+
+ handleHotkeyBoost = () => {
+ this.handleReblogClick(this.props.status);
+ }
+
+ handleHotkeyMention = e => {
+ e.preventDefault();
+ this.handleMentionClick(this.props.status);
+ }
+
+ handleHotkeyOpenProfile = () => {
+ this.context.router.history.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`);
+ }
+
+ handleMoveUp = id => {
+ const { status, ancestorsIds, descendantsIds } = this.props;
+
+ if (id === status.get('id')) {
+ this._selectChild(ancestorsIds.size - 1);
+ } else {
+ let index = ancestorsIds.indexOf(id);
+
+ if (index === -1) {
+ index = descendantsIds.indexOf(id);
+ this._selectChild(ancestorsIds.size + index);
+ } else {
+ this._selectChild(index - 1);
+ }
+ }
+ }
+
+ handleMoveDown = id => {
+ const { status, ancestorsIds, descendantsIds } = this.props;
+
+ if (id === status.get('id')) {
+ this._selectChild(ancestorsIds.size + 1);
+ } else {
+ let index = ancestorsIds.indexOf(id);
+
+ if (index === -1) {
+ index = descendantsIds.indexOf(id);
+ this._selectChild(ancestorsIds.size + index + 2);
+ } else {
+ this._selectChild(index + 1);
+ }
+ }
+ }
+
+ _selectChild (index) {
+ const element = this.node.querySelectorAll('.focusable')[index];
+
+ if (element) {
+ element.focus();
+ }
+ }
+
+ renderChildren (list) {
+ return list.map(id => (
+
+ ));
+ }
+
+ setRef = c => {
+ this.node = c;
+ }
+
+ componentDidUpdate () {
+ if (this._scrolledIntoView) {
+ return;
+ }
+
+ const { status, ancestorsIds } = this.props;
+
+ if (status && ancestorsIds && ancestorsIds.size > 0) {
+ const element = this.node.querySelectorAll('.focusable')[ancestorsIds.size - 1];
+
+ element.scrollIntoView(true);
+ this._scrolledIntoView = true;
+ }
+ }
+
+ componentWillUnmount () {
+ detachFullscreenListener(this.onFullScreenChange);
+ }
+
+ onFullScreenChange = () => {
+ this.setState({ fullscreen: isFullscreen() });
+ }
+
+ render () {
+ let ancestors, descendants;
+ const { status, ancestorsIds, descendantsIds } = this.props;
+ const { fullscreen } = this.state;
+
+ if (status === null) {
+ return (
+
+
+
+
+ );
+ }
+
+ if (ancestorsIds && ancestorsIds.size > 0) {
+ ancestors = {this.renderChildren(ancestorsIds)}
;
+ }
+
+ if (descendantsIds && descendantsIds.size > 0) {
+ descendants = {this.renderChildren(descendantsIds)}
;
+ }
+
+ const handlers = {
+ moveUp: this.handleHotkeyMoveUp,
+ moveDown: this.handleHotkeyMoveDown,
+ reply: this.handleHotkeyReply,
+ favourite: this.handleHotkeyFavourite,
+ boost: this.handleHotkeyBoost,
+ mention: this.handleHotkeyMention,
+ openProfile: this.handleHotkeyOpenProfile,
+ };
+
+ return (
+
+
+
+
+
+ {ancestors}
+
+
+
+
+
+ {descendants}
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/components/__tests__/column-test.js b/app/javascript/mastodon/features/ui/components/__tests__/column-test.js
new file mode 100644
index 0000000000..1e5e1d8dc5
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/__tests__/column-test.js
@@ -0,0 +1,34 @@
+import React from 'react';
+import { mount } from 'enzyme';
+import Column from '../column';
+import ColumnHeader from '../column_header';
+
+describe('', () => {
+ describe(' click handler', () => {
+ const originalRaf = global.requestAnimationFrame;
+
+ beforeEach(() => {
+ global.requestAnimationFrame = jest.fn();
+ });
+
+ afterAll(() => {
+ global.requestAnimationFrame = originalRaf;
+ });
+
+ it('runs the scroll animation if the column contains scrollable content', () => {
+ const wrapper = mount(
+
+
+
+ );
+ wrapper.find(ColumnHeader).simulate('click');
+ expect(global.requestAnimationFrame.mock.calls.length).toEqual(1);
+ });
+
+ it('does not try to scroll if there is no scrollable content', () => {
+ const wrapper = mount();
+ wrapper.find(ColumnHeader).simulate('click');
+ expect(global.requestAnimationFrame.mock.calls.length).toEqual(0);
+ });
+ });
+});
diff --git a/app/javascript/mastodon/features/ui/components/actions_modal.js b/app/javascript/mastodon/features/ui/components/actions_modal.js
new file mode 100644
index 0000000000..79a5a20ef6
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/actions_modal.js
@@ -0,0 +1,74 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import StatusContent from '../../../components/status_content';
+import Avatar from '../../../components/avatar';
+import RelativeTimestamp from '../../../components/relative_timestamp';
+import DisplayName from '../../../components/display_name';
+import IconButton from '../../../components/icon_button';
+import classNames from 'classnames';
+
+export default class ActionsModal extends ImmutablePureComponent {
+
+ static propTypes = {
+ status: ImmutablePropTypes.map,
+ actions: PropTypes.array,
+ onClick: PropTypes.func,
+ };
+
+ renderAction = (action, i) => {
+ if (action === null) {
+ return ;
+ }
+
+ const { icon = null, text, meta = null, active = false, href = '#' } = action;
+
+ return (
+
+
+ {icon && }
+
+
+
+ );
+ }
+
+ render () {
+ const status = this.props.status && (
+
+ );
+
+ return (
+
+ {status}
+
+
+ {this.props.actions.map(this.renderAction)}
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/components/boost_modal.js b/app/javascript/mastodon/features/ui/components/boost_modal.js
new file mode 100644
index 0000000000..0e9592c977
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/boost_modal.js
@@ -0,0 +1,84 @@
+import React from 'react';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import PropTypes from 'prop-types';
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+import Button from '../../../components/button';
+import StatusContent from '../../../components/status_content';
+import Avatar from '../../../components/avatar';
+import RelativeTimestamp from '../../../components/relative_timestamp';
+import DisplayName from '../../../components/display_name';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+const messages = defineMessages({
+ reblog: { id: 'status.reblog', defaultMessage: 'Boost' },
+});
+
+@injectIntl
+export default class BoostModal extends ImmutablePureComponent {
+
+ static contextTypes = {
+ router: PropTypes.object,
+ };
+
+ static propTypes = {
+ status: ImmutablePropTypes.map.isRequired,
+ onReblog: PropTypes.func.isRequired,
+ onClose: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ };
+
+ componentDidMount() {
+ this.button.focus();
+ }
+
+ handleReblog = () => {
+ this.props.onReblog(this.props.status);
+ this.props.onClose();
+ }
+
+ handleAccountClick = (e) => {
+ if (e.button === 0) {
+ e.preventDefault();
+ this.props.onClose();
+ this.context.router.history.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`);
+ }
+ }
+
+ setRef = (c) => {
+ this.button = c;
+ }
+
+ render () {
+ const { status, intl } = this.props;
+
+ return (
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/components/bundle.js b/app/javascript/mastodon/features/ui/components/bundle.js
new file mode 100644
index 0000000000..fc88e0c70f
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/bundle.js
@@ -0,0 +1,102 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+
+const emptyComponent = () => null;
+const noop = () => { };
+
+class Bundle extends React.Component {
+
+ static propTypes = {
+ fetchComponent: PropTypes.func.isRequired,
+ loading: PropTypes.func,
+ error: PropTypes.func,
+ children: PropTypes.func.isRequired,
+ renderDelay: PropTypes.number,
+ onFetch: PropTypes.func,
+ onFetchSuccess: PropTypes.func,
+ onFetchFail: PropTypes.func,
+ }
+
+ static defaultProps = {
+ loading: emptyComponent,
+ error: emptyComponent,
+ renderDelay: 0,
+ onFetch: noop,
+ onFetchSuccess: noop,
+ onFetchFail: noop,
+ }
+
+ static cache = {}
+
+ state = {
+ mod: undefined,
+ forceRender: false,
+ }
+
+ componentWillMount() {
+ this.load(this.props);
+ }
+
+ componentWillReceiveProps(nextProps) {
+ if (nextProps.fetchComponent !== this.props.fetchComponent) {
+ this.load(nextProps);
+ }
+ }
+
+ componentWillUnmount () {
+ if (this.timeout) {
+ clearTimeout(this.timeout);
+ }
+ }
+
+ load = (props) => {
+ const { fetchComponent, onFetch, onFetchSuccess, onFetchFail, renderDelay } = props || this.props;
+
+ onFetch();
+
+ if (Bundle.cache[fetchComponent.name]) {
+ const mod = Bundle.cache[fetchComponent.name];
+
+ this.setState({ mod: mod.default });
+ onFetchSuccess();
+ return Promise.resolve();
+ }
+
+ this.setState({ mod: undefined });
+
+ if (renderDelay !== 0) {
+ this.timestamp = new Date();
+ this.timeout = setTimeout(() => this.setState({ forceRender: true }), renderDelay);
+ }
+
+ return fetchComponent()
+ .then((mod) => {
+ Bundle.cache[fetchComponent.name] = mod;
+ this.setState({ mod: mod.default });
+ onFetchSuccess();
+ })
+ .catch((error) => {
+ this.setState({ mod: null });
+ onFetchFail(error);
+ });
+ }
+
+ render() {
+ const { loading: Loading, error: Error, children, renderDelay } = this.props;
+ const { mod, forceRender } = this.state;
+ const elapsed = this.timestamp ? (new Date() - this.timestamp) : renderDelay;
+
+ if (mod === undefined) {
+ return (elapsed >= renderDelay || forceRender) ? : null;
+ }
+
+ if (mod === null) {
+ return ;
+ }
+
+ return children(mod);
+ }
+
+}
+
+export default Bundle;
diff --git a/app/javascript/mastodon/features/ui/components/bundle_column_error.js b/app/javascript/mastodon/features/ui/components/bundle_column_error.js
new file mode 100644
index 0000000000..cd124746ac
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/bundle_column_error.js
@@ -0,0 +1,44 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { defineMessages, injectIntl } from 'react-intl';
+
+import Column from './column';
+import ColumnHeader from './column_header';
+import ColumnBackButtonSlim from '../../../components/column_back_button_slim';
+import IconButton from '../../../components/icon_button';
+
+const messages = defineMessages({
+ title: { id: 'bundle_column_error.title', defaultMessage: 'Network error' },
+ body: { id: 'bundle_column_error.body', defaultMessage: 'Something went wrong while loading this component.' },
+ retry: { id: 'bundle_column_error.retry', defaultMessage: 'Try again' },
+});
+
+class BundleColumnError extends React.Component {
+
+ static propTypes = {
+ onRetry: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ }
+
+ handleRetry = () => {
+ this.props.onRetry();
+ }
+
+ render () {
+ const { intl: { formatMessage } } = this.props;
+
+ return (
+
+
+
+
+
+ {formatMessage(messages.body)}
+
+
+ );
+ }
+
+}
+
+export default injectIntl(BundleColumnError);
diff --git a/app/javascript/mastodon/features/ui/components/bundle_modal_error.js b/app/javascript/mastodon/features/ui/components/bundle_modal_error.js
new file mode 100644
index 0000000000..928bfe1f7d
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/bundle_modal_error.js
@@ -0,0 +1,53 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { defineMessages, injectIntl } from 'react-intl';
+
+import IconButton from '../../../components/icon_button';
+
+const messages = defineMessages({
+ error: { id: 'bundle_modal_error.message', defaultMessage: 'Something went wrong while loading this component.' },
+ retry: { id: 'bundle_modal_error.retry', defaultMessage: 'Try again' },
+ close: { id: 'bundle_modal_error.close', defaultMessage: 'Close' },
+});
+
+class BundleModalError extends React.Component {
+
+ static propTypes = {
+ onRetry: PropTypes.func.isRequired,
+ onClose: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ }
+
+ handleRetry = () => {
+ this.props.onRetry();
+ }
+
+ render () {
+ const { onClose, intl: { formatMessage } } = this.props;
+
+ // Keep the markup in sync with
+ // (make sure they have the same dimensions)
+ return (
+
+
+
+ {formatMessage(messages.error)}
+
+
+
+
+
+
+
+
+ );
+ }
+
+}
+
+export default injectIntl(BundleModalError);
diff --git a/app/javascript/mastodon/features/ui/components/column.js b/app/javascript/mastodon/features/ui/components/column.js
new file mode 100644
index 0000000000..15538ea387
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/column.js
@@ -0,0 +1,72 @@
+import React from 'react';
+import ColumnHeader from './column_header';
+import PropTypes from 'prop-types';
+import { debounce } from 'lodash';
+import { scrollTop } from '../../../scroll';
+import { isMobile } from '../../../is_mobile';
+
+export default class Column extends React.PureComponent {
+
+ static propTypes = {
+ heading: PropTypes.string,
+ icon: PropTypes.string,
+ children: PropTypes.node,
+ active: PropTypes.bool,
+ hideHeadingOnMobile: PropTypes.bool,
+ };
+
+ handleHeaderClick = () => {
+ const scrollable = this.node.querySelector('.scrollable');
+
+ if (!scrollable) {
+ return;
+ }
+
+ this._interruptScrollAnimation = scrollTop(scrollable);
+ }
+
+ scrollTop () {
+ const scrollable = this.node.querySelector('.scrollable');
+
+ if (!scrollable) {
+ return;
+ }
+
+ this._interruptScrollAnimation = scrollTop(scrollable);
+ }
+
+
+ handleScroll = debounce(() => {
+ if (typeof this._interruptScrollAnimation !== 'undefined') {
+ this._interruptScrollAnimation();
+ }
+ }, 200)
+
+ setRef = (c) => {
+ this.node = c;
+ }
+
+ render () {
+ const { heading, icon, children, active, hideHeadingOnMobile } = this.props;
+
+ const showHeading = heading && (!hideHeadingOnMobile || (hideHeadingOnMobile && !isMobile(window.innerWidth)));
+
+ const columnHeaderId = showHeading && heading.replace(/ /g, '-');
+ const header = showHeading && (
+
+ );
+ return (
+
+ {header}
+ {children}
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/components/column_header.js b/app/javascript/mastodon/features/ui/components/column_header.js
new file mode 100644
index 0000000000..af195ea9c0
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/column_header.js
@@ -0,0 +1,35 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+
+export default class ColumnHeader extends React.PureComponent {
+
+ static propTypes = {
+ icon: PropTypes.string,
+ type: PropTypes.string,
+ active: PropTypes.bool,
+ onClick: PropTypes.func,
+ columnHeaderId: PropTypes.string,
+ };
+
+ handleClick = () => {
+ this.props.onClick();
+ }
+
+ render () {
+ const { type, active, columnHeaderId } = this.props;
+
+ let icon = '';
+
+ if (this.props.icon) {
+ icon = ;
+ }
+
+ return (
+
+ {icon}
+ {type}
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/components/column_link.js b/app/javascript/mastodon/features/ui/components/column_link.js
new file mode 100644
index 0000000000..5425219c4d
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/column_link.js
@@ -0,0 +1,32 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { Link } from 'react-router-dom';
+
+const ColumnLink = ({ icon, text, to, href, method }) => {
+ if (href) {
+ return (
+
+
+ {text}
+
+ );
+ } else {
+ return (
+
+
+ {text}
+
+ );
+ }
+};
+
+ColumnLink.propTypes = {
+ icon: PropTypes.string.isRequired,
+ text: PropTypes.string.isRequired,
+ to: PropTypes.string,
+ href: PropTypes.string,
+ method: PropTypes.string,
+ hideOnMobile: PropTypes.bool,
+};
+
+export default ColumnLink;
diff --git a/app/javascript/mastodon/features/ui/components/column_loading.js b/app/javascript/mastodon/features/ui/components/column_loading.js
new file mode 100644
index 0000000000..9503a7a1ac
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/column_loading.js
@@ -0,0 +1,30 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+
+import Column from '../../../components/column';
+import ColumnHeader from '../../../components/column_header';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+export default class ColumnLoading extends ImmutablePureComponent {
+
+ static propTypes = {
+ title: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),
+ icon: PropTypes.string,
+ };
+
+ static defaultProps = {
+ title: '',
+ icon: '',
+ };
+
+ render() {
+ let { title, icon } = this.props;
+ return (
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/components/column_subheading.js b/app/javascript/mastodon/features/ui/components/column_subheading.js
new file mode 100644
index 0000000000..8160c4aa39
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/column_subheading.js
@@ -0,0 +1,16 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+
+const ColumnSubheading = ({ text }) => {
+ return (
+
+ {text}
+
+ );
+};
+
+ColumnSubheading.propTypes = {
+ text: PropTypes.string.isRequired,
+};
+
+export default ColumnSubheading;
diff --git a/app/javascript/mastodon/features/ui/components/columns_area.js b/app/javascript/mastodon/features/ui/components/columns_area.js
new file mode 100644
index 0000000000..5610095b99
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/columns_area.js
@@ -0,0 +1,173 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { injectIntl } from 'react-intl';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+import ReactSwipeableViews from 'react-swipeable-views';
+import { links, getIndex, getLink } from './tabs_bar';
+
+import BundleContainer from '../containers/bundle_container';
+import ColumnLoading from './column_loading';
+import DrawerLoading from './drawer_loading';
+import BundleColumnError from './bundle_column_error';
+import { Compose, Notifications, HomeTimeline, CommunityTimeline, PublicTimeline, HashtagTimeline, FavouritedStatuses } from '../../ui/util/async-components';
+
+import detectPassiveEvents from 'detect-passive-events';
+import { scrollRight } from '../../../scroll';
+
+const componentMap = {
+ 'COMPOSE': Compose,
+ 'HOME': HomeTimeline,
+ 'NOTIFICATIONS': Notifications,
+ 'PUBLIC': PublicTimeline,
+ 'COMMUNITY': CommunityTimeline,
+ 'HASHTAG': HashtagTimeline,
+ 'FAVOURITES': FavouritedStatuses,
+};
+
+@component => injectIntl(component, { withRef: true })
+export default class ColumnsArea extends ImmutablePureComponent {
+
+ static contextTypes = {
+ router: PropTypes.object.isRequired,
+ };
+
+ static propTypes = {
+ intl: PropTypes.object.isRequired,
+ columns: ImmutablePropTypes.list.isRequired,
+ singleColumn: PropTypes.bool,
+ children: PropTypes.node,
+ };
+
+ state = {
+ shouldAnimate: false,
+ }
+
+ componentWillReceiveProps() {
+ this.setState({ shouldAnimate: false });
+ }
+
+ componentDidMount() {
+ if (!this.props.singleColumn) {
+ this.node.addEventListener('wheel', this.handleWheel, detectPassiveEvents.hasSupport ? { passive: true } : false);
+ }
+ this.lastIndex = getIndex(this.context.router.history.location.pathname);
+ this.setState({ shouldAnimate: true });
+ }
+
+ componentWillUpdate(nextProps) {
+ if (this.props.singleColumn !== nextProps.singleColumn && nextProps.singleColumn) {
+ this.node.removeEventListener('wheel', this.handleWheel);
+ }
+ }
+
+ componentDidUpdate(prevProps) {
+ if (this.props.singleColumn !== prevProps.singleColumn && !this.props.singleColumn) {
+ this.node.addEventListener('wheel', this.handleWheel, detectPassiveEvents.hasSupport ? { passive: true } : false);
+ }
+ this.lastIndex = getIndex(this.context.router.history.location.pathname);
+ this.setState({ shouldAnimate: true });
+ }
+
+ componentWillUnmount () {
+ if (!this.props.singleColumn) {
+ this.node.removeEventListener('wheel', this.handleWheel);
+ }
+ }
+
+ handleChildrenContentChange() {
+ if (!this.props.singleColumn) {
+ this._interruptScrollAnimation = scrollRight(this.node, this.node.scrollWidth - window.innerWidth);
+ }
+ }
+
+ handleSwipe = (index) => {
+ this.pendingIndex = index;
+
+ const nextLinkTranslationId = links[index].props['data-preview-title-id'];
+ const currentLinkSelector = '.tabs-bar__link.active';
+ const nextLinkSelector = `.tabs-bar__link[data-preview-title-id="${nextLinkTranslationId}"]`;
+
+ // HACK: Remove the active class from the current link and set it to the next one
+ // React-router does this for us, but too late, feeling laggy.
+ document.querySelector(currentLinkSelector).classList.remove('active');
+ document.querySelector(nextLinkSelector).classList.add('active');
+ }
+
+ handleAnimationEnd = () => {
+ if (typeof this.pendingIndex === 'number') {
+ this.context.router.history.push(getLink(this.pendingIndex));
+ this.pendingIndex = null;
+ }
+ }
+
+ handleWheel = () => {
+ if (typeof this._interruptScrollAnimation !== 'function') {
+ return;
+ }
+
+ this._interruptScrollAnimation();
+ }
+
+ setRef = (node) => {
+ this.node = node;
+ }
+
+ renderView = (link, index) => {
+ const columnIndex = getIndex(this.context.router.history.location.pathname);
+ const title = this.props.intl.formatMessage({ id: link.props['data-preview-title-id'] });
+ const icon = link.props['data-preview-icon'];
+
+ const view = (index === columnIndex) ?
+ React.cloneElement(this.props.children) :
+ ;
+
+ return (
+
+ {view}
+
+ );
+ }
+
+ renderLoading = columnId => () => {
+ return columnId === 'COMPOSE' ? : ;
+ }
+
+ renderError = (props) => {
+ return ;
+ }
+
+ render () {
+ const { columns, children, singleColumn } = this.props;
+ const { shouldAnimate } = this.state;
+
+ const columnIndex = getIndex(this.context.router.history.location.pathname);
+ this.pendingIndex = null;
+
+ if (singleColumn) {
+ return columnIndex !== -1 ? (
+
+ {links.map(this.renderView)}
+
+ ) : {children}
;
+ }
+
+ return (
+
+ {columns.map(column => {
+ const params = column.get('params', null) === null ? null : column.get('params').toJS();
+
+ return (
+
+ {SpecificComponent => }
+
+ );
+ })}
+
+ {React.Children.map(children, child => React.cloneElement(child, { multiColumn: true }))}
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/components/confirmation_modal.js b/app/javascript/mastodon/features/ui/components/confirmation_modal.js
new file mode 100644
index 0000000000..86588c46a2
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/confirmation_modal.js
@@ -0,0 +1,53 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { injectIntl, FormattedMessage } from 'react-intl';
+import Button from '../../../components/button';
+
+@injectIntl
+export default class ConfirmationModal extends React.PureComponent {
+
+ static propTypes = {
+ message: PropTypes.node.isRequired,
+ confirm: PropTypes.string.isRequired,
+ onClose: PropTypes.func.isRequired,
+ onConfirm: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ };
+
+ componentDidMount() {
+ this.button.focus();
+ }
+
+ handleClick = () => {
+ this.props.onClose();
+ this.props.onConfirm();
+ }
+
+ handleCancel = () => {
+ this.props.onClose();
+ }
+
+ setRef = (c) => {
+ this.button = c;
+ }
+
+ render () {
+ const { message, confirm } = this.props;
+
+ return (
+
+
+ {message}
+
+
+
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/components/drawer_loading.js b/app/javascript/mastodon/features/ui/components/drawer_loading.js
new file mode 100644
index 0000000000..08b0d23476
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/drawer_loading.js
@@ -0,0 +1,11 @@
+import React from 'react';
+
+const DrawerLoading = () => (
+
+);
+
+export default DrawerLoading;
diff --git a/app/javascript/mastodon/features/ui/components/embed_modal.js b/app/javascript/mastodon/features/ui/components/embed_modal.js
new file mode 100644
index 0000000000..1afffb51bc
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/embed_modal.js
@@ -0,0 +1,84 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import { FormattedMessage, injectIntl } from 'react-intl';
+import axios from 'axios';
+
+@injectIntl
+export default class EmbedModal extends ImmutablePureComponent {
+
+ static propTypes = {
+ url: PropTypes.string.isRequired,
+ onClose: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ }
+
+ state = {
+ loading: false,
+ oembed: null,
+ };
+
+ componentDidMount () {
+ const { url } = this.props;
+
+ this.setState({ loading: true });
+
+ axios.post('/api/web/embed', { url }).then(res => {
+ this.setState({ loading: false, oembed: res.data });
+
+ const iframeDocument = this.iframe.contentWindow.document;
+
+ iframeDocument.open();
+ iframeDocument.write(res.data.html);
+ iframeDocument.close();
+
+ iframeDocument.body.style.margin = 0;
+ this.iframe.width = iframeDocument.body.scrollWidth;
+ this.iframe.height = iframeDocument.body.scrollHeight;
+ });
+ }
+
+ setIframeRef = c => {
+ this.iframe = c;
+ }
+
+ handleTextareaClick = (e) => {
+ e.target.select();
+ }
+
+ render () {
+ const { oembed } = this.state;
+
+ return (
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/components/image_loader.js b/app/javascript/mastodon/features/ui/components/image_loader.js
new file mode 100644
index 0000000000..aad594380e
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/image_loader.js
@@ -0,0 +1,152 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import classNames from 'classnames';
+
+export default class ImageLoader extends React.PureComponent {
+
+ static propTypes = {
+ alt: PropTypes.string,
+ src: PropTypes.string.isRequired,
+ previewSrc: PropTypes.string.isRequired,
+ width: PropTypes.number,
+ height: PropTypes.number,
+ }
+
+ static defaultProps = {
+ alt: '',
+ width: null,
+ height: null,
+ };
+
+ state = {
+ loading: true,
+ error: false,
+ }
+
+ removers = [];
+
+ get canvasContext() {
+ if (!this.canvas) {
+ return null;
+ }
+ this._canvasContext = this._canvasContext || this.canvas.getContext('2d');
+ return this._canvasContext;
+ }
+
+ componentDidMount () {
+ this.loadImage(this.props);
+ }
+
+ componentWillReceiveProps (nextProps) {
+ if (this.props.src !== nextProps.src) {
+ this.loadImage(nextProps);
+ }
+ }
+
+ loadImage (props) {
+ this.removeEventListeners();
+ this.setState({ loading: true, error: false });
+ Promise.all([
+ this.loadPreviewCanvas(props),
+ this.hasSize() && this.loadOriginalImage(props),
+ ].filter(Boolean))
+ .then(() => {
+ this.setState({ loading: false, error: false });
+ this.clearPreviewCanvas();
+ })
+ .catch(() => this.setState({ loading: false, error: true }));
+ }
+
+ loadPreviewCanvas = ({ previewSrc, width, height }) => new Promise((resolve, reject) => {
+ const image = new Image();
+ const removeEventListeners = () => {
+ image.removeEventListener('error', handleError);
+ image.removeEventListener('load', handleLoad);
+ };
+ const handleError = () => {
+ removeEventListeners();
+ reject();
+ };
+ const handleLoad = () => {
+ removeEventListeners();
+ this.canvasContext.drawImage(image, 0, 0, width, height);
+ resolve();
+ };
+ image.addEventListener('error', handleError);
+ image.addEventListener('load', handleLoad);
+ image.src = previewSrc;
+ this.removers.push(removeEventListeners);
+ })
+
+ clearPreviewCanvas () {
+ const { width, height } = this.canvas;
+ this.canvasContext.clearRect(0, 0, width, height);
+ }
+
+ loadOriginalImage = ({ src }) => new Promise((resolve, reject) => {
+ const image = new Image();
+ const removeEventListeners = () => {
+ image.removeEventListener('error', handleError);
+ image.removeEventListener('load', handleLoad);
+ };
+ const handleError = () => {
+ removeEventListeners();
+ reject();
+ };
+ const handleLoad = () => {
+ removeEventListeners();
+ resolve();
+ };
+ image.addEventListener('error', handleError);
+ image.addEventListener('load', handleLoad);
+ image.src = src;
+ this.removers.push(removeEventListeners);
+ });
+
+ removeEventListeners () {
+ this.removers.forEach(listeners => listeners());
+ this.removers = [];
+ }
+
+ hasSize () {
+ const { width, height } = this.props;
+ return typeof width === 'number' && typeof height === 'number';
+ }
+
+ setCanvasRef = c => {
+ this.canvas = c;
+ }
+
+ render () {
+ const { alt, src, width, height } = this.props;
+ const { loading } = this.state;
+
+ const className = classNames('image-loader', {
+ 'image-loader--loading': loading,
+ 'image-loader--amorphous': !this.hasSize(),
+ });
+
+ return (
+
+
+
+ {!loading && (
+
+ )}
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/components/media_modal.js b/app/javascript/mastodon/features/ui/components/media_modal.js
new file mode 100644
index 0000000000..f41a830891
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/media_modal.js
@@ -0,0 +1,126 @@
+import React from 'react';
+import ReactSwipeableViews from 'react-swipeable-views';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import PropTypes from 'prop-types';
+import ExtendedVideoPlayer from '../../../components/extended_video_player';
+import { defineMessages, injectIntl } from 'react-intl';
+import IconButton from '../../../components/icon_button';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import ImageLoader from './image_loader';
+
+const messages = defineMessages({
+ close: { id: 'lightbox.close', defaultMessage: 'Close' },
+ previous: { id: 'lightbox.previous', defaultMessage: 'Previous' },
+ next: { id: 'lightbox.next', defaultMessage: 'Next' },
+});
+
+@injectIntl
+export default class MediaModal extends ImmutablePureComponent {
+
+ static propTypes = {
+ media: ImmutablePropTypes.list.isRequired,
+ index: PropTypes.number.isRequired,
+ onClose: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ };
+
+ state = {
+ index: null,
+ };
+
+ handleSwipe = (index) => {
+ this.setState({ index: index % this.props.media.size });
+ }
+
+ handleNextClick = () => {
+ this.setState({ index: (this.getIndex() + 1) % this.props.media.size });
+ }
+
+ handlePrevClick = () => {
+ this.setState({ index: (this.props.media.size + this.getIndex() - 1) % this.props.media.size });
+ }
+
+ handleChangeIndex = (e) => {
+ const index = Number(e.currentTarget.getAttribute('data-index'));
+ this.setState({ index: index % this.props.media.size });
+ }
+
+ handleKeyUp = (e) => {
+ switch(e.key) {
+ case 'ArrowLeft':
+ this.handlePrevClick();
+ break;
+ case 'ArrowRight':
+ this.handleNextClick();
+ break;
+ }
+ }
+
+ componentDidMount () {
+ window.addEventListener('keyup', this.handleKeyUp, false);
+ }
+
+ componentWillUnmount () {
+ window.removeEventListener('keyup', this.handleKeyUp);
+ }
+
+ getIndex () {
+ return this.state.index !== null ? this.state.index : this.props.index;
+ }
+
+ render () {
+ const { media, intl, onClose } = this.props;
+
+ const index = this.getIndex();
+ let pagination = [];
+
+ const leftNav = media.size > 1 && ;
+ const rightNav = media.size > 1 && ;
+
+ if (media.size > 1) {
+ pagination = media.map((item, i) => {
+ const classes = ['media-modal__button'];
+ if (i === index) {
+ classes.push('media-modal__button--active');
+ }
+ return ();
+ });
+ }
+
+ const content = media.map((image) => {
+ const width = image.getIn(['meta', 'original', 'width']) || null;
+ const height = image.getIn(['meta', 'original', 'height']) || null;
+
+ if (image.get('type') === 'image') {
+ return ;
+ } else if (image.get('type') === 'gifv') {
+ return ;
+ }
+
+ return null;
+ }).toArray();
+
+ const containerStyle = {
+ alignItems: 'center', // center vertically
+ };
+
+ return (
+
+ {leftNav}
+
+
+
+
+ {content}
+
+
+
+
+ {rightNav}
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/components/modal_loading.js b/app/javascript/mastodon/features/ui/components/modal_loading.js
new file mode 100644
index 0000000000..f403ca4c9e
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/modal_loading.js
@@ -0,0 +1,20 @@
+import React from 'react';
+
+import LoadingIndicator from '../../../components/loading_indicator';
+
+// Keep the markup in sync with
+// (make sure they have the same dimensions)
+const ModalLoading = () => (
+
+);
+
+export default ModalLoading;
diff --git a/app/javascript/mastodon/features/ui/components/modal_root.js b/app/javascript/mastodon/features/ui/components/modal_root.js
new file mode 100644
index 0000000000..79d86370ec
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/modal_root.js
@@ -0,0 +1,127 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import BundleContainer from '../containers/bundle_container';
+import BundleModalError from './bundle_modal_error';
+import ModalLoading from './modal_loading';
+import ActionsModal from './actions_modal';
+import MediaModal from './media_modal';
+import VideoModal from './video_modal';
+import BoostModal from './boost_modal';
+import ConfirmationModal from './confirmation_modal';
+import {
+ OnboardingModal,
+ MuteModal,
+ ReportModal,
+ EmbedModal,
+} from '../../../features/ui/util/async-components';
+
+const MODAL_COMPONENTS = {
+ 'MEDIA': () => Promise.resolve({ default: MediaModal }),
+ 'ONBOARDING': OnboardingModal,
+ 'VIDEO': () => Promise.resolve({ default: VideoModal }),
+ 'BOOST': () => Promise.resolve({ default: BoostModal }),
+ 'CONFIRM': () => Promise.resolve({ default: ConfirmationModal }),
+ 'MUTE': MuteModal,
+ 'REPORT': ReportModal,
+ 'ACTIONS': () => Promise.resolve({ default: ActionsModal }),
+ 'EMBED': EmbedModal,
+};
+
+export default class ModalRoot extends React.PureComponent {
+
+ static propTypes = {
+ type: PropTypes.string,
+ props: PropTypes.object,
+ onClose: PropTypes.func.isRequired,
+ };
+
+ state = {
+ revealed: false,
+ };
+
+ handleKeyUp = (e) => {
+ if ((e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27)
+ && !!this.props.type) {
+ this.props.onClose();
+ }
+ }
+
+ componentDidMount () {
+ window.addEventListener('keyup', this.handleKeyUp, false);
+ }
+
+ componentWillReceiveProps (nextProps) {
+ if (!!nextProps.type && !this.props.type) {
+ this.activeElement = document.activeElement;
+
+ this.getSiblings().forEach(sibling => sibling.setAttribute('inert', true));
+ } else if (!nextProps.type) {
+ this.setState({ revealed: false });
+ }
+ }
+
+ componentDidUpdate (prevProps) {
+ if (!this.props.type && !!prevProps.type) {
+ this.getSiblings().forEach(sibling => sibling.removeAttribute('inert'));
+ this.activeElement.focus();
+ this.activeElement = null;
+ }
+ if (this.props.type) {
+ requestAnimationFrame(() => {
+ this.setState({ revealed: true });
+ });
+ }
+ }
+
+ componentWillUnmount () {
+ window.removeEventListener('keyup', this.handleKeyUp);
+ }
+
+ getSiblings = () => {
+ return Array(...this.node.parentElement.childNodes).filter(node => node !== this.node);
+ }
+
+ setRef = ref => {
+ this.node = ref;
+ }
+
+ renderLoading = modalId => () => {
+ return ['MEDIA', 'VIDEO', 'BOOST', 'CONFIRM', 'ACTIONS'].indexOf(modalId) === -1 ? : null;
+ }
+
+ renderError = (props) => {
+ const { onClose } = this.props;
+
+ return ;
+ }
+
+ render () {
+ const { type, props, onClose } = this.props;
+ const { revealed } = this.state;
+ const visible = !!type;
+
+ if (!visible) {
+ return (
+
+ );
+ }
+
+ return (
+
+
+
+
+ {
+ visible ?
+ (
+ {(SpecificComponent) => }
+ ) :
+ null
+ }
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/components/mute_modal.js b/app/javascript/mastodon/features/ui/components/mute_modal.js
new file mode 100644
index 0000000000..73e48cf09b
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/mute_modal.js
@@ -0,0 +1,105 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import { injectIntl, FormattedMessage } from 'react-intl';
+import Toggle from 'react-toggle';
+import Button from '../../../components/button';
+import { closeModal } from '../../../actions/modal';
+import { muteAccount } from '../../../actions/accounts';
+import { toggleHideNotifications } from '../../../actions/mutes';
+
+
+const mapStateToProps = state => {
+ return {
+ isSubmitting: state.getIn(['reports', 'new', 'isSubmitting']),
+ account: state.getIn(['mutes', 'new', 'account']),
+ notifications: state.getIn(['mutes', 'new', 'notifications']),
+ };
+};
+
+const mapDispatchToProps = dispatch => {
+ return {
+ onConfirm(account, notifications) {
+ dispatch(muteAccount(account.get('id'), notifications));
+ },
+
+ onClose() {
+ dispatch(closeModal());
+ },
+
+ onToggleNotifications() {
+ dispatch(toggleHideNotifications());
+ },
+ };
+};
+
+@connect(mapStateToProps, mapDispatchToProps)
+@injectIntl
+export default class MuteModal extends React.PureComponent {
+
+ static propTypes = {
+ isSubmitting: PropTypes.bool.isRequired,
+ account: PropTypes.object.isRequired,
+ notifications: PropTypes.bool.isRequired,
+ onClose: PropTypes.func.isRequired,
+ onConfirm: PropTypes.func.isRequired,
+ onToggleNotifications: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ };
+
+ componentDidMount() {
+ this.button.focus();
+ }
+
+ handleClick = () => {
+ this.props.onClose();
+ this.props.onConfirm(this.props.account, this.props.notifications);
+ }
+
+ handleCancel = () => {
+ this.props.onClose();
+ }
+
+ setRef = (c) => {
+ this.button = c;
+ }
+
+ toggleNotifications = () => {
+ this.props.onToggleNotifications();
+ }
+
+ render () {
+ const { account, notifications } = this.props;
+
+ return (
+
+
+
+ @{account.get('acct')} }}
+ />
+
+
+
+
+
+
+
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/components/onboarding_modal.js b/app/javascript/mastodon/features/ui/components/onboarding_modal.js
new file mode 100644
index 0000000000..54673e223e
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/onboarding_modal.js
@@ -0,0 +1,318 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+import ReactSwipeableViews from 'react-swipeable-views';
+import classNames from 'classnames';
+import Permalink from '../../../components/permalink';
+import ComposeForm from '../../compose/components/compose_form';
+import Search from '../../compose/components/search';
+import NavigationBar from '../../compose/components/navigation_bar';
+import ColumnHeader from './column_header';
+import { List as ImmutableList } from 'immutable';
+import { me } from '../../../initial_state';
+
+const noop = () => { };
+
+const messages = defineMessages({
+ home_title: { id: 'column.home', defaultMessage: 'Home' },
+ notifications_title: { id: 'column.notifications', defaultMessage: 'Notifications' },
+ local_title: { id: 'column.community', defaultMessage: 'Local timeline' },
+ federated_title: { id: 'column.public', defaultMessage: 'Federated timeline' },
+});
+
+const PageOne = ({ acct, domain }) => (
+
+
+
+
+
+
+
@{acct}@{domain} }} />
+
+
+);
+
+PageOne.propTypes = {
+ acct: PropTypes.string.isRequired,
+ domain: PropTypes.string.isRequired,
+};
+
+const PageTwo = ({ myAccount }) => (
+
+);
+
+PageTwo.propTypes = {
+ myAccount: ImmutablePropTypes.map.isRequired,
+};
+
+const PageThree = ({ myAccount }) => (
+
+
+
+
#illustration, introductions: #introductions }} />
+
+
+);
+
+PageThree.propTypes = {
+ myAccount: ImmutablePropTypes.map.isRequired,
+};
+
+const PageFour = ({ domain, intl }) => (
+
+);
+
+PageFour.propTypes = {
+ domain: PropTypes.string.isRequired,
+ intl: PropTypes.object.isRequired,
+};
+
+const PageSix = ({ admin, domain }) => {
+ let adminSection = '';
+
+ if (admin) {
+ adminSection = (
+
+ @{admin.get('acct')} }} />
+
+ }} />
+
+ );
+ }
+
+ return (
+
+
+ {adminSection}
+
GitHub }} />
+
}} />
+
+
+ );
+};
+
+PageSix.propTypes = {
+ admin: ImmutablePropTypes.map,
+ domain: PropTypes.string.isRequired,
+};
+
+const mapStateToProps = state => ({
+ myAccount: state.getIn(['accounts', me]),
+ admin: state.getIn(['accounts', state.getIn(['meta', 'admin'])]),
+ domain: state.getIn(['meta', 'domain']),
+});
+
+@connect(mapStateToProps)
+@injectIntl
+export default class OnboardingModal extends React.PureComponent {
+
+ static propTypes = {
+ onClose: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ myAccount: ImmutablePropTypes.map.isRequired,
+ domain: PropTypes.string.isRequired,
+ admin: ImmutablePropTypes.map,
+ };
+
+ state = {
+ currentIndex: 0,
+ };
+
+ componentWillMount() {
+ const { myAccount, admin, domain, intl } = this.props;
+ this.pages = [
+ ,
+ ,
+ ,
+ ,
+ ,
+ ];
+ };
+
+ componentDidMount() {
+ window.addEventListener('keyup', this.handleKeyUp);
+ }
+
+ componentWillUnmount() {
+ window.addEventListener('keyup', this.handleKeyUp);
+ }
+
+ handleSkip = (e) => {
+ e.preventDefault();
+ this.props.onClose();
+ }
+
+ handleDot = (e) => {
+ const i = Number(e.currentTarget.getAttribute('data-index'));
+ e.preventDefault();
+ this.setState({ currentIndex: i });
+ }
+
+ handlePrev = () => {
+ this.setState(({ currentIndex }) => ({
+ currentIndex: Math.max(0, currentIndex - 1),
+ }));
+ }
+
+ handleNext = () => {
+ const { pages } = this;
+ this.setState(({ currentIndex }) => ({
+ currentIndex: Math.min(currentIndex + 1, pages.length - 1),
+ }));
+ }
+
+ handleSwipe = (index) => {
+ this.setState({ currentIndex: index });
+ }
+
+ handleKeyUp = ({ key }) => {
+ switch (key) {
+ case 'ArrowLeft':
+ this.handlePrev();
+ break;
+ case 'ArrowRight':
+ this.handleNext();
+ break;
+ }
+ }
+
+ handleClose = () => {
+ this.props.onClose();
+ }
+
+ render () {
+ const { pages } = this;
+ const { currentIndex } = this.state;
+ const hasMore = currentIndex < pages.length - 1;
+
+ const nextOrDoneBtn = hasMore ? (
+
+ ) : (
+
+ );
+
+ return (
+
+
+ {pages.map((page, i) => {
+ const className = classNames('onboarding-modal__page__wrapper', {
+ 'onboarding-modal__page__wrapper--active': i === currentIndex,
+ });
+ return (
+ {page}
+ );
+ })}
+
+
+
+
+
+
+
+
+ {pages.map((_, i) => {
+ const className = classNames('onboarding-modal__dot', {
+ active: i === currentIndex,
+ });
+ return (
+
+ );
+ })}
+
+
+
+ {nextOrDoneBtn}
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/components/report_modal.js b/app/javascript/mastodon/features/ui/components/report_modal.js
new file mode 100644
index 0000000000..b5dfa422e4
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/report_modal.js
@@ -0,0 +1,105 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import { changeReportComment, submitReport } from '../../../actions/reports';
+import { refreshAccountTimeline } from '../../../actions/timelines';
+import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import { makeGetAccount } from '../../../selectors';
+import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
+import StatusCheckBox from '../../report/containers/status_check_box_container';
+import { OrderedSet } from 'immutable';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+import Button from '../../../components/button';
+
+const messages = defineMessages({
+ placeholder: { id: 'report.placeholder', defaultMessage: 'Additional comments' },
+ submit: { id: 'report.submit', defaultMessage: 'Submit' },
+});
+
+const makeMapStateToProps = () => {
+ const getAccount = makeGetAccount();
+
+ const mapStateToProps = state => {
+ const accountId = state.getIn(['reports', 'new', 'account_id']);
+
+ return {
+ isSubmitting: state.getIn(['reports', 'new', 'isSubmitting']),
+ account: getAccount(state, accountId),
+ comment: state.getIn(['reports', 'new', 'comment']),
+ statusIds: OrderedSet(state.getIn(['timelines', `account:${accountId}`, 'items'])).union(state.getIn(['reports', 'new', 'status_ids'])),
+ };
+ };
+
+ return mapStateToProps;
+};
+
+@connect(makeMapStateToProps)
+@injectIntl
+export default class ReportModal extends ImmutablePureComponent {
+
+ static propTypes = {
+ isSubmitting: PropTypes.bool,
+ account: ImmutablePropTypes.map,
+ statusIds: ImmutablePropTypes.orderedSet.isRequired,
+ comment: PropTypes.string.isRequired,
+ dispatch: PropTypes.func.isRequired,
+ intl: PropTypes.object.isRequired,
+ };
+
+ handleCommentChange = (e) => {
+ this.props.dispatch(changeReportComment(e.target.value));
+ }
+
+ handleSubmit = () => {
+ this.props.dispatch(submitReport());
+ }
+
+ componentDidMount () {
+ this.props.dispatch(refreshAccountTimeline(this.props.account.get('id')));
+ }
+
+ componentWillReceiveProps (nextProps) {
+ if (this.props.account !== nextProps.account && nextProps.account) {
+ this.props.dispatch(refreshAccountTimeline(nextProps.account.get('id')));
+ }
+ }
+
+ render () {
+ const { account, comment, intl, statusIds, isSubmitting } = this.props;
+
+ if (!account) {
+ return null;
+ }
+
+ return (
+
+
+ {account.get('acct')} }} />
+
+
+
+
+
+ {statusIds.map(statusId => )}
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/components/tabs_bar.js b/app/javascript/mastodon/features/ui/components/tabs_bar.js
new file mode 100644
index 0000000000..7694e5ab33
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/tabs_bar.js
@@ -0,0 +1,84 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { NavLink } from 'react-router-dom';
+import { FormattedMessage, injectIntl } from 'react-intl';
+import { debounce } from 'lodash';
+import { isUserTouching } from '../../../is_mobile';
+
+export const links = [
+ ,
+ ,
+ ,
+
+ ,
+ ,
+
+ ,
+];
+
+export function getIndex (path) {
+ return links.findIndex(link => link.props.to === path);
+}
+
+export function getLink (index) {
+ return links[index].props.to;
+}
+
+@injectIntl
+export default class TabsBar extends React.Component {
+
+ static contextTypes = {
+ router: PropTypes.object.isRequired,
+ }
+
+ static propTypes = {
+ intl: PropTypes.object.isRequired,
+ }
+
+ setRef = ref => {
+ this.node = ref;
+ }
+
+ handleClick = (e) => {
+ // Only apply optimization for touch devices, which we assume are slower
+ // We thus avoid the 250ms delay for non-touch devices and the lag for touch devices
+ if (isUserTouching()) {
+ e.preventDefault();
+ e.persist();
+
+ requestAnimationFrame(() => {
+ const tabs = Array(...this.node.querySelectorAll('.tabs-bar__link'));
+ const currentTab = tabs.find(tab => tab.classList.contains('active'));
+ const nextTab = tabs.find(tab => tab.contains(e.target));
+ const { props: { to } } = links[Array(...this.node.childNodes).indexOf(nextTab)];
+
+
+ if (currentTab !== nextTab) {
+ if (currentTab) {
+ currentTab.classList.remove('active');
+ }
+
+ const listener = debounce(() => {
+ nextTab.removeEventListener('transitionend', listener);
+ this.context.router.history.push(to);
+ }, 50);
+
+ nextTab.addEventListener('transitionend', listener);
+ nextTab.classList.add('active');
+ }
+ });
+ }
+
+ }
+
+ render () {
+ const { intl: { formatMessage } } = this.props;
+
+ return (
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/components/upload_area.js b/app/javascript/mastodon/features/ui/components/upload_area.js
new file mode 100644
index 0000000000..8b9a26270b
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/upload_area.js
@@ -0,0 +1,52 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import Motion from '../../ui/util/optional_motion';
+import spring from 'react-motion/lib/spring';
+import { FormattedMessage } from 'react-intl';
+
+export default class UploadArea extends React.PureComponent {
+
+ static propTypes = {
+ active: PropTypes.bool,
+ onClose: PropTypes.func,
+ };
+
+ handleKeyUp = (e) => {
+ const keyCode = e.keyCode;
+ if (this.props.active) {
+ switch(keyCode) {
+ case 27:
+ e.preventDefault();
+ e.stopPropagation();
+ this.props.onClose();
+ break;
+ }
+ }
+ }
+
+ componentDidMount () {
+ window.addEventListener('keyup', this.handleKeyUp, false);
+ }
+
+ componentWillUnmount () {
+ window.removeEventListener('keyup', this.handleKeyUp);
+ }
+
+ render () {
+ const { active } = this.props;
+
+ return (
+
+ {({ backgroundOpacity, backgroundScale }) =>
+
+ }
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/components/video_modal.js b/app/javascript/mastodon/features/ui/components/video_modal.js
new file mode 100644
index 0000000000..1437deeb0b
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/components/video_modal.js
@@ -0,0 +1,33 @@
+import React from 'react';
+import ImmutablePropTypes from 'react-immutable-proptypes';
+import PropTypes from 'prop-types';
+import Video from '../../video';
+import ImmutablePureComponent from 'react-immutable-pure-component';
+
+export default class VideoModal extends ImmutablePureComponent {
+
+ static propTypes = {
+ media: ImmutablePropTypes.map.isRequired,
+ time: PropTypes.number,
+ onClose: PropTypes.func.isRequired,
+ };
+
+ render () {
+ const { media, time, onClose } = this.props;
+
+ return (
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/containers/bundle_container.js b/app/javascript/mastodon/features/ui/containers/bundle_container.js
new file mode 100644
index 0000000000..7e3f0c3a6b
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/containers/bundle_container.js
@@ -0,0 +1,19 @@
+import { connect } from 'react-redux';
+
+import Bundle from '../components/bundle';
+
+import { fetchBundleRequest, fetchBundleSuccess, fetchBundleFail } from '../../../actions/bundles';
+
+const mapDispatchToProps = dispatch => ({
+ onFetch () {
+ dispatch(fetchBundleRequest());
+ },
+ onFetchSuccess () {
+ dispatch(fetchBundleSuccess());
+ },
+ onFetchFail (error) {
+ dispatch(fetchBundleFail(error));
+ },
+});
+
+export default connect(null, mapDispatchToProps)(Bundle);
diff --git a/app/javascript/mastodon/features/ui/containers/columns_area_container.js b/app/javascript/mastodon/features/ui/containers/columns_area_container.js
new file mode 100644
index 0000000000..95f95618b2
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/containers/columns_area_container.js
@@ -0,0 +1,8 @@
+import { connect } from 'react-redux';
+import ColumnsArea from '../components/columns_area';
+
+const mapStateToProps = state => ({
+ columns: state.getIn(['settings', 'columns']),
+});
+
+export default connect(mapStateToProps, null, null, { withRef: true })(ColumnsArea);
diff --git a/app/javascript/mastodon/features/ui/containers/loading_bar_container.js b/app/javascript/mastodon/features/ui/containers/loading_bar_container.js
new file mode 100644
index 0000000000..4bb90fb689
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/containers/loading_bar_container.js
@@ -0,0 +1,8 @@
+import { connect } from 'react-redux';
+import LoadingBar from 'react-redux-loading-bar';
+
+const mapStateToProps = (state) => ({
+ loading: state.get('loadingBar'),
+});
+
+export default connect(mapStateToProps)(LoadingBar.WrappedComponent);
diff --git a/app/javascript/mastodon/features/ui/containers/modal_container.js b/app/javascript/mastodon/features/ui/containers/modal_container.js
new file mode 100644
index 0000000000..2d27180f7e
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/containers/modal_container.js
@@ -0,0 +1,16 @@
+import { connect } from 'react-redux';
+import { closeModal } from '../../../actions/modal';
+import ModalRoot from '../components/modal_root';
+
+const mapStateToProps = state => ({
+ type: state.get('modal').modalType,
+ props: state.get('modal').modalProps,
+});
+
+const mapDispatchToProps = dispatch => ({
+ onClose () {
+ dispatch(closeModal());
+ },
+});
+
+export default connect(mapStateToProps, mapDispatchToProps)(ModalRoot);
diff --git a/app/javascript/mastodon/features/ui/containers/notifications_container.js b/app/javascript/mastodon/features/ui/containers/notifications_container.js
new file mode 100644
index 0000000000..5924197f1e
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/containers/notifications_container.js
@@ -0,0 +1,18 @@
+import { connect } from 'react-redux';
+import { NotificationStack } from 'react-notification';
+import { dismissAlert } from '../../../actions/alerts';
+import { getAlerts } from '../../../selectors';
+
+const mapStateToProps = state => ({
+ notifications: getAlerts(state),
+});
+
+const mapDispatchToProps = (dispatch) => {
+ return {
+ onDismiss: alert => {
+ dispatch(dismissAlert(alert));
+ },
+ };
+};
+
+export default connect(mapStateToProps, mapDispatchToProps)(NotificationStack);
diff --git a/app/javascript/mastodon/features/ui/containers/status_list_container.js b/app/javascript/mastodon/features/ui/containers/status_list_container.js
new file mode 100644
index 0000000000..a0aec44032
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/containers/status_list_container.js
@@ -0,0 +1,73 @@
+import { connect } from 'react-redux';
+import StatusList from '../../../components/status_list';
+import { scrollTopTimeline } from '../../../actions/timelines';
+import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
+import { createSelector } from 'reselect';
+import { debounce } from 'lodash';
+import { me } from '../../../initial_state';
+
+const makeGetStatusIds = () => createSelector([
+ (state, { type }) => state.getIn(['settings', type], ImmutableMap()),
+ (state, { type }) => state.getIn(['timelines', type, 'items'], ImmutableList()),
+ (state) => state.get('statuses'),
+], (columnSettings, statusIds, statuses) => {
+ const rawRegex = columnSettings.getIn(['regex', 'body'], '').trim();
+ let regex = null;
+
+ try {
+ regex = rawRegex && new RegExp(rawRegex, 'i');
+ } catch (e) {
+ // Bad regex, don't affect filters
+ }
+
+ return statusIds.filter(id => {
+ const statusForId = statuses.get(id);
+ let showStatus = true;
+
+ if (columnSettings.getIn(['shows', 'reblog']) === false) {
+ showStatus = showStatus && statusForId.get('reblog') === null;
+ }
+
+ if (columnSettings.getIn(['shows', 'reply']) === false) {
+ showStatus = showStatus && (statusForId.get('in_reply_to_id') === null || statusForId.get('in_reply_to_account_id') === me);
+ }
+
+ if (showStatus && regex && statusForId.get('account') !== me) {
+ const searchIndex = statusForId.get('reblog') ? statuses.getIn([statusForId.get('reblog'), 'search_index']) : statusForId.get('search_index');
+ showStatus = !regex.test(searchIndex);
+ }
+
+ return showStatus;
+ });
+});
+
+const makeMapStateToProps = () => {
+ const getStatusIds = makeGetStatusIds();
+
+ const mapStateToProps = (state, { timelineId }) => ({
+ statusIds: getStatusIds(state, { type: timelineId }),
+ isLoading: state.getIn(['timelines', timelineId, 'isLoading'], true),
+ hasMore: !!state.getIn(['timelines', timelineId, 'next']),
+ });
+
+ return mapStateToProps;
+};
+
+const mapDispatchToProps = (dispatch, { timelineId, loadMore }) => ({
+
+ onScrollToBottom: debounce(() => {
+ dispatch(scrollTopTimeline(timelineId, false));
+ loadMore();
+ }, 300, { leading: true }),
+
+ onScrollToTop: debounce(() => {
+ dispatch(scrollTopTimeline(timelineId, true));
+ }, 100),
+
+ onScroll: debounce(() => {
+ dispatch(scrollTopTimeline(timelineId, false));
+ }, 100),
+
+});
+
+export default connect(makeMapStateToProps, mapDispatchToProps)(StatusList);
diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js
new file mode 100644
index 0000000000..f28b370992
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/index.js
@@ -0,0 +1,407 @@
+import React from 'react';
+import NotificationsContainer from './containers/notifications_container';
+import PropTypes from 'prop-types';
+import LoadingBarContainer from './containers/loading_bar_container';
+import TabsBar from './components/tabs_bar';
+import ModalContainer from './containers/modal_container';
+import { connect } from 'react-redux';
+import { Redirect, withRouter } from 'react-router-dom';
+import { isMobile } from '../../is_mobile';
+import { debounce } from 'lodash';
+import { uploadCompose, resetCompose } from '../../actions/compose';
+import { refreshHomeTimeline } from '../../actions/timelines';
+import { refreshNotifications } from '../../actions/notifications';
+import { clearHeight } from '../../actions/height_cache';
+import { WrappedSwitch, WrappedRoute } from './util/react_router_helpers';
+import UploadArea from './components/upload_area';
+import ColumnsAreaContainer from './containers/columns_area_container';
+import {
+ Compose,
+ Status,
+ GettingStarted,
+ PublicTimeline,
+ CommunityTimeline,
+ AccountTimeline,
+ AccountGallery,
+ HomeTimeline,
+ Followers,
+ Following,
+ Reblogs,
+ Favourites,
+ HashtagTimeline,
+ Notifications,
+ FollowRequests,
+ GenericNotFound,
+ FavouritedStatuses,
+ Blocks,
+ Mutes,
+ PinnedStatuses,
+} from './util/async-components';
+import { HotKeys } from 'react-hotkeys';
+import { me } from '../../initial_state';
+import { defineMessages, injectIntl } from 'react-intl';
+
+// Dummy import, to make sure that ends up in the application bundle.
+// Without this it ends up in ~8 very commonly used bundles.
+import '../../components/status';
+
+const messages = defineMessages({
+ beforeUnload: { id: 'ui.beforeunload', defaultMessage: 'Your draft will be lost if you leave Mastodon.' },
+});
+
+const mapStateToProps = state => ({
+ isComposing: state.getIn(['compose', 'is_composing']),
+ hasComposingText: state.getIn(['compose', 'text']) !== '',
+});
+
+const keyMap = {
+ new: 'n',
+ search: 's',
+ forceNew: 'option+n',
+ focusColumn: ['1', '2', '3', '4', '5', '6', '7', '8', '9'],
+ reply: 'r',
+ favourite: 'f',
+ boost: 'b',
+ mention: 'm',
+ open: ['enter', 'o'],
+ openProfile: 'p',
+ moveDown: ['down', 'j'],
+ moveUp: ['up', 'k'],
+ back: 'backspace',
+ goToHome: 'g h',
+ goToNotifications: 'g n',
+ goToLocal: 'g l',
+ goToFederated: 'g t',
+ goToStart: 'g s',
+ goToFavourites: 'g f',
+ goToPinned: 'g p',
+ goToProfile: 'g u',
+ goToBlocked: 'g b',
+ goToMuted: 'g m',
+};
+
+@connect(mapStateToProps)
+@injectIntl
+@withRouter
+export default class UI extends React.Component {
+
+ static contextTypes = {
+ router: PropTypes.object.isRequired,
+ };
+
+ static propTypes = {
+ dispatch: PropTypes.func.isRequired,
+ children: PropTypes.node,
+ isComposing: PropTypes.bool,
+ hasComposingText: PropTypes.bool,
+ location: PropTypes.object,
+ intl: PropTypes.object.isRequired,
+ };
+
+ state = {
+ width: window.innerWidth,
+ draggingOver: false,
+ };
+
+ handleBeforeUnload = (e) => {
+ const { intl, isComposing, hasComposingText } = this.props;
+
+ if (isComposing && hasComposingText) {
+ // Setting returnValue to any string causes confirmation dialog.
+ // Many browsers no longer display this text to users,
+ // but we set user-friendly message for other browsers, e.g. Edge.
+ e.returnValue = intl.formatMessage(messages.beforeUnload);
+ }
+ }
+
+ handleResize = debounce(() => {
+ // The cached heights are no longer accurate, invalidate
+ this.props.dispatch(clearHeight());
+
+ this.setState({ width: window.innerWidth });
+ }, 500, {
+ trailing: true,
+ });
+
+ handleDragEnter = (e) => {
+ e.preventDefault();
+
+ if (!this.dragTargets) {
+ this.dragTargets = [];
+ }
+
+ if (this.dragTargets.indexOf(e.target) === -1) {
+ this.dragTargets.push(e.target);
+ }
+
+ if (e.dataTransfer && e.dataTransfer.types.includes('Files')) {
+ this.setState({ draggingOver: true });
+ }
+ }
+
+ handleDragOver = (e) => {
+ e.preventDefault();
+ e.stopPropagation();
+
+ try {
+ e.dataTransfer.dropEffect = 'copy';
+ } catch (err) {
+
+ }
+
+ return false;
+ }
+
+ handleDrop = (e) => {
+ e.preventDefault();
+
+ this.setState({ draggingOver: false });
+
+ if (e.dataTransfer && e.dataTransfer.files.length === 1) {
+ this.props.dispatch(uploadCompose(e.dataTransfer.files));
+ }
+ }
+
+ handleDragLeave = (e) => {
+ e.preventDefault();
+ e.stopPropagation();
+
+ this.dragTargets = this.dragTargets.filter(el => el !== e.target && this.node.contains(el));
+
+ if (this.dragTargets.length > 0) {
+ return;
+ }
+
+ this.setState({ draggingOver: false });
+ }
+
+ closeUploadModal = () => {
+ this.setState({ draggingOver: false });
+ }
+
+ handleServiceWorkerPostMessage = ({ data }) => {
+ if (data.type === 'navigate') {
+ this.context.router.history.push(data.path);
+ } else {
+ console.warn('Unknown message type:', data.type);
+ }
+ }
+
+ componentWillMount () {
+ window.addEventListener('beforeunload', this.handleBeforeUnload, false);
+ window.addEventListener('resize', this.handleResize, { passive: true });
+ document.addEventListener('dragenter', this.handleDragEnter, false);
+ document.addEventListener('dragover', this.handleDragOver, false);
+ document.addEventListener('drop', this.handleDrop, false);
+ document.addEventListener('dragleave', this.handleDragLeave, false);
+ document.addEventListener('dragend', this.handleDragEnd, false);
+
+ if ('serviceWorker' in navigator) {
+ navigator.serviceWorker.addEventListener('message', this.handleServiceWorkerPostMessage);
+ }
+
+ this.props.dispatch(refreshHomeTimeline());
+ this.props.dispatch(refreshNotifications());
+ }
+
+ componentDidMount () {
+ this.hotkeys.__mousetrap__.stopCallback = (e, element) => {
+ return ['TEXTAREA', 'SELECT', 'INPUT'].includes(element.tagName);
+ };
+ }
+
+ shouldComponentUpdate (nextProps) {
+ if (nextProps.isComposing !== this.props.isComposing) {
+ // Avoid expensive update just to toggle a class
+ this.node.classList.toggle('is-composing', nextProps.isComposing);
+
+ return false;
+ }
+
+ // Why isn't this working?!?
+ // return super.shouldComponentUpdate(nextProps, nextState);
+ return true;
+ }
+
+ componentDidUpdate (prevProps) {
+ if (![this.props.location.pathname, '/'].includes(prevProps.location.pathname)) {
+ this.columnsAreaNode.handleChildrenContentChange();
+ }
+ }
+
+ componentWillUnmount () {
+ window.removeEventListener('beforeunload', this.handleBeforeUnload);
+ window.removeEventListener('resize', this.handleResize);
+ document.removeEventListener('dragenter', this.handleDragEnter);
+ document.removeEventListener('dragover', this.handleDragOver);
+ document.removeEventListener('drop', this.handleDrop);
+ document.removeEventListener('dragleave', this.handleDragLeave);
+ document.removeEventListener('dragend', this.handleDragEnd);
+ }
+
+ setRef = c => {
+ this.node = c;
+ }
+
+ setColumnsAreaRef = c => {
+ this.columnsAreaNode = c.getWrappedInstance().getWrappedInstance();
+ }
+
+ handleHotkeyNew = e => {
+ e.preventDefault();
+
+ const element = this.node.querySelector('.compose-form__autosuggest-wrapper textarea');
+
+ if (element) {
+ element.focus();
+ }
+ }
+
+ handleHotkeySearch = e => {
+ e.preventDefault();
+
+ const element = this.node.querySelector('.search__input');
+
+ if (element) {
+ element.focus();
+ }
+ }
+
+ handleHotkeyForceNew = e => {
+ this.handleHotkeyNew(e);
+ this.props.dispatch(resetCompose());
+ }
+
+ handleHotkeyFocusColumn = e => {
+ const index = (e.key * 1) + 1; // First child is drawer, skip that
+ const column = this.node.querySelector(`.column:nth-child(${index})`);
+
+ if (column) {
+ const status = column.querySelector('.focusable');
+
+ if (status) {
+ status.focus();
+ }
+ }
+ }
+
+ handleHotkeyBack = () => {
+ if (window.history && window.history.length === 1) {
+ this.context.router.history.push('/');
+ } else {
+ this.context.router.history.goBack();
+ }
+ }
+
+ setHotkeysRef = c => {
+ this.hotkeys = c;
+ }
+
+ handleHotkeyGoToHome = () => {
+ this.context.router.history.push('/timelines/home');
+ }
+
+ handleHotkeyGoToNotifications = () => {
+ this.context.router.history.push('/notifications');
+ }
+
+ handleHotkeyGoToLocal = () => {
+ this.context.router.history.push('/timelines/public/local');
+ }
+
+ handleHotkeyGoToFederated = () => {
+ this.context.router.history.push('/timelines/public');
+ }
+
+ handleHotkeyGoToStart = () => {
+ this.context.router.history.push('/getting-started');
+ }
+
+ handleHotkeyGoToFavourites = () => {
+ this.context.router.history.push('/favourites');
+ }
+
+ handleHotkeyGoToPinned = () => {
+ this.context.router.history.push('/pinned');
+ }
+
+ handleHotkeyGoToProfile = () => {
+ this.context.router.history.push(`/accounts/${me}`);
+ }
+
+ handleHotkeyGoToBlocked = () => {
+ this.context.router.history.push('/blocks');
+ }
+
+ handleHotkeyGoToMuted = () => {
+ this.context.router.history.push('/mutes');
+ }
+
+ render () {
+ const { width, draggingOver } = this.state;
+ const { children } = this.props;
+
+ const handlers = {
+ new: this.handleHotkeyNew,
+ search: this.handleHotkeySearch,
+ forceNew: this.handleHotkeyForceNew,
+ focusColumn: this.handleHotkeyFocusColumn,
+ back: this.handleHotkeyBack,
+ goToHome: this.handleHotkeyGoToHome,
+ goToNotifications: this.handleHotkeyGoToNotifications,
+ goToLocal: this.handleHotkeyGoToLocal,
+ goToFederated: this.handleHotkeyGoToFederated,
+ goToStart: this.handleHotkeyGoToStart,
+ goToFavourites: this.handleHotkeyGoToFavourites,
+ goToPinned: this.handleHotkeyGoToPinned,
+ goToProfile: this.handleHotkeyGoToProfile,
+ goToBlocked: this.handleHotkeyGoToBlocked,
+ goToMuted: this.handleHotkeyGoToMuted,
+ };
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/util/async-components.js b/app/javascript/mastodon/features/ui/util/async-components.js
new file mode 100644
index 0000000000..39663d5cab
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/util/async-components.js
@@ -0,0 +1,107 @@
+export function EmojiPicker () {
+ return import(/* webpackChunkName: "emoji_picker" */'../../emoji/emoji_picker');
+}
+
+export function Compose () {
+ return import(/* webpackChunkName: "features/compose" */'../../compose');
+}
+
+export function Notifications () {
+ return import(/* webpackChunkName: "features/notifications" */'../../notifications');
+}
+
+export function HomeTimeline () {
+ return import(/* webpackChunkName: "features/home_timeline" */'../../home_timeline');
+}
+
+export function PublicTimeline () {
+ return import(/* webpackChunkName: "features/public_timeline" */'../../public_timeline');
+}
+
+export function CommunityTimeline () {
+ return import(/* webpackChunkName: "features/community_timeline" */'../../community_timeline');
+}
+
+export function HashtagTimeline () {
+ return import(/* webpackChunkName: "features/hashtag_timeline" */'../../hashtag_timeline');
+}
+
+export function Status () {
+ return import(/* webpackChunkName: "features/status" */'../../status');
+}
+
+export function GettingStarted () {
+ return import(/* webpackChunkName: "features/getting_started" */'../../getting_started');
+}
+
+export function PinnedStatuses () {
+ return import(/* webpackChunkName: "features/pinned_statuses" */'../../pinned_statuses');
+}
+
+export function AccountTimeline () {
+ return import(/* webpackChunkName: "features/account_timeline" */'../../account_timeline');
+}
+
+export function AccountGallery () {
+ return import(/* webpackChunkName: "features/account_gallery" */'../../account_gallery');
+}
+
+export function Followers () {
+ return import(/* webpackChunkName: "features/followers" */'../../followers');
+}
+
+export function Following () {
+ return import(/* webpackChunkName: "features/following" */'../../following');
+}
+
+export function Reblogs () {
+ return import(/* webpackChunkName: "features/reblogs" */'../../reblogs');
+}
+
+export function Favourites () {
+ return import(/* webpackChunkName: "features/favourites" */'../../favourites');
+}
+
+export function FollowRequests () {
+ return import(/* webpackChunkName: "features/follow_requests" */'../../follow_requests');
+}
+
+export function GenericNotFound () {
+ return import(/* webpackChunkName: "features/generic_not_found" */'../../generic_not_found');
+}
+
+export function FavouritedStatuses () {
+ return import(/* webpackChunkName: "features/favourited_statuses" */'../../favourited_statuses');
+}
+
+export function Blocks () {
+ return import(/* webpackChunkName: "features/blocks" */'../../blocks');
+}
+
+export function Mutes () {
+ return import(/* webpackChunkName: "features/mutes" */'../../mutes');
+}
+
+export function OnboardingModal () {
+ return import(/* webpackChunkName: "modals/onboarding_modal" */'../components/onboarding_modal');
+}
+
+export function MuteModal () {
+ return import(/* webpackChunkName: "modals/mute_modal" */'../components/mute_modal');
+}
+
+export function ReportModal () {
+ return import(/* webpackChunkName: "modals/report_modal" */'../components/report_modal');
+}
+
+export function MediaGallery () {
+ return import(/* webpackChunkName: "status/media_gallery" */'../../../components/media_gallery');
+}
+
+export function Video () {
+ return import(/* webpackChunkName: "features/video" */'../../video');
+}
+
+export function EmbedModal () {
+ return import(/* webpackChunkName: "modals/embed_modal" */'../components/embed_modal');
+}
diff --git a/app/javascript/mastodon/features/ui/util/fullscreen.js b/app/javascript/mastodon/features/ui/util/fullscreen.js
new file mode 100644
index 0000000000..cf5d0cf98d
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/util/fullscreen.js
@@ -0,0 +1,46 @@
+// APIs for normalizing fullscreen operations. Note that Edge uses
+// the WebKit-prefixed APIs currently (as of Edge 16).
+
+export const isFullscreen = () => document.fullscreenElement ||
+ document.webkitFullscreenElement ||
+ document.mozFullScreenElement;
+
+export const exitFullscreen = () => {
+ if (document.exitFullscreen) {
+ document.exitFullscreen();
+ } else if (document.webkitExitFullscreen) {
+ document.webkitExitFullscreen();
+ } else if (document.mozCancelFullScreen) {
+ document.mozCancelFullScreen();
+ }
+};
+
+export const requestFullscreen = el => {
+ if (el.requestFullscreen) {
+ el.requestFullscreen();
+ } else if (el.webkitRequestFullscreen) {
+ el.webkitRequestFullscreen();
+ } else if (el.mozRequestFullScreen) {
+ el.mozRequestFullScreen();
+ }
+};
+
+export const attachFullscreenListener = (listener) => {
+ if ('onfullscreenchange' in document) {
+ document.addEventListener('fullscreenchange', listener);
+ } else if ('onwebkitfullscreenchange' in document) {
+ document.addEventListener('webkitfullscreenchange', listener);
+ } else if ('onmozfullscreenchange' in document) {
+ document.addEventListener('mozfullscreenchange', listener);
+ }
+};
+
+export const detachFullscreenListener = (listener) => {
+ if ('onfullscreenchange' in document) {
+ document.removeEventListener('fullscreenchange', listener);
+ } else if ('onwebkitfullscreenchange' in document) {
+ document.removeEventListener('webkitfullscreenchange', listener);
+ } else if ('onmozfullscreenchange' in document) {
+ document.removeEventListener('mozfullscreenchange', listener);
+ }
+};
diff --git a/app/javascript/mastodon/features/ui/util/get_rect_from_entry.js b/app/javascript/mastodon/features/ui/util/get_rect_from_entry.js
new file mode 100644
index 0000000000..c266cd7dce
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/util/get_rect_from_entry.js
@@ -0,0 +1,21 @@
+
+// Get the bounding client rect from an IntersectionObserver entry.
+// This is to work around a bug in Chrome: https://crbug.com/737228
+
+let hasBoundingRectBug;
+
+function getRectFromEntry(entry) {
+ if (typeof hasBoundingRectBug !== 'boolean') {
+ const boundingRect = entry.target.getBoundingClientRect();
+ const observerRect = entry.boundingClientRect;
+ hasBoundingRectBug = boundingRect.height !== observerRect.height ||
+ boundingRect.top !== observerRect.top ||
+ boundingRect.width !== observerRect.width ||
+ boundingRect.bottom !== observerRect.bottom ||
+ boundingRect.left !== observerRect.left ||
+ boundingRect.right !== observerRect.right;
+ }
+ return hasBoundingRectBug ? entry.target.getBoundingClientRect() : entry.boundingClientRect;
+}
+
+export default getRectFromEntry;
diff --git a/app/javascript/mastodon/features/ui/util/intersection_observer_wrapper.js b/app/javascript/mastodon/features/ui/util/intersection_observer_wrapper.js
new file mode 100644
index 0000000000..2b24c65831
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/util/intersection_observer_wrapper.js
@@ -0,0 +1,57 @@
+// Wrapper for IntersectionObserver in order to make working with it
+// a bit easier. We also follow this performance advice:
+// "If you need to observe multiple elements, it is both possible and
+// advised to observe multiple elements using the same IntersectionObserver
+// instance by calling observe() multiple times."
+// https://developers.google.com/web/updates/2016/04/intersectionobserver
+
+class IntersectionObserverWrapper {
+
+ callbacks = {};
+ observerBacklog = [];
+ observer = null;
+
+ connect (options) {
+ const onIntersection = (entries) => {
+ entries.forEach(entry => {
+ const id = entry.target.getAttribute('data-id');
+ if (this.callbacks[id]) {
+ this.callbacks[id](entry);
+ }
+ });
+ };
+
+ this.observer = new IntersectionObserver(onIntersection, options);
+ this.observerBacklog.forEach(([ id, node, callback ]) => {
+ this.observe(id, node, callback);
+ });
+ this.observerBacklog = null;
+ }
+
+ observe (id, node, callback) {
+ if (!this.observer) {
+ this.observerBacklog.push([ id, node, callback ]);
+ } else {
+ this.callbacks[id] = callback;
+ this.observer.observe(node);
+ }
+ }
+
+ unobserve (id, node) {
+ if (this.observer) {
+ delete this.callbacks[id];
+ this.observer.unobserve(node);
+ }
+ }
+
+ disconnect () {
+ if (this.observer) {
+ this.callbacks = {};
+ this.observer.disconnect();
+ this.observer = null;
+ }
+ }
+
+}
+
+export default IntersectionObserverWrapper;
diff --git a/app/javascript/mastodon/features/ui/util/optional_motion.js b/app/javascript/mastodon/features/ui/util/optional_motion.js
new file mode 100644
index 0000000000..df3a8b54af
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/util/optional_motion.js
@@ -0,0 +1,5 @@
+import { reduceMotion } from '../../../initial_state';
+import ReducedMotion from './reduced_motion';
+import Motion from 'react-motion/lib/Motion';
+
+export default reduceMotion ? ReducedMotion : Motion;
diff --git a/app/javascript/mastodon/features/ui/util/react_router_helpers.js b/app/javascript/mastodon/features/ui/util/react_router_helpers.js
new file mode 100644
index 0000000000..43007ddc3d
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/util/react_router_helpers.js
@@ -0,0 +1,64 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { Switch, Route } from 'react-router-dom';
+
+import ColumnLoading from '../components/column_loading';
+import BundleColumnError from '../components/bundle_column_error';
+import BundleContainer from '../containers/bundle_container';
+
+// Small wrapper to pass multiColumn to the route components
+export class WrappedSwitch extends React.PureComponent {
+
+ render () {
+ const { multiColumn, children } = this.props;
+
+ return (
+
+ {React.Children.map(children, child => React.cloneElement(child, { multiColumn }))}
+
+ );
+ }
+
+}
+
+WrappedSwitch.propTypes = {
+ multiColumn: PropTypes.bool,
+ children: PropTypes.node,
+};
+
+// Small Wraper to extract the params from the route and pass
+// them to the rendered component, together with the content to
+// be rendered inside (the children)
+export class WrappedRoute extends React.Component {
+
+ static propTypes = {
+ component: PropTypes.func.isRequired,
+ content: PropTypes.node,
+ multiColumn: PropTypes.bool,
+ }
+
+ renderComponent = ({ match }) => {
+ const { component, content, multiColumn } = this.props;
+
+ return (
+
+ {Component => {content}}
+
+ );
+ }
+
+ renderLoading = () => {
+ return ;
+ }
+
+ renderError = (props) => {
+ return ;
+ }
+
+ render () {
+ const { component: Component, content, ...rest } = this.props;
+
+ return ;
+ }
+
+}
diff --git a/app/javascript/mastodon/features/ui/util/reduced_motion.js b/app/javascript/mastodon/features/ui/util/reduced_motion.js
new file mode 100644
index 0000000000..95519042b4
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/util/reduced_motion.js
@@ -0,0 +1,44 @@
+// Like react-motion's Motion, but reduces all animations to cross-fades
+// for the benefit of users with motion sickness.
+import React from 'react';
+import Motion from 'react-motion/lib/Motion';
+import PropTypes from 'prop-types';
+
+const stylesToKeep = ['opacity', 'backgroundOpacity'];
+
+const extractValue = (value) => {
+ // This is either an object with a "val" property or it's a number
+ return (typeof value === 'object' && value && 'val' in value) ? value.val : value;
+};
+
+class ReducedMotion extends React.Component {
+
+ static propTypes = {
+ defaultStyle: PropTypes.object,
+ style: PropTypes.object,
+ children: PropTypes.func,
+ }
+
+ render() {
+
+ const { style, defaultStyle, children } = this.props;
+
+ Object.keys(style).forEach(key => {
+ if (stylesToKeep.includes(key)) {
+ return;
+ }
+ // If it's setting an x or height or scale or some other value, we need
+ // to preserve the end-state value without actually animating it
+ style[key] = defaultStyle[key] = extractValue(style[key]);
+ });
+
+ return (
+
+ {children}
+
+ );
+ }
+
+}
+
+export default ReducedMotion;
diff --git a/app/javascript/mastodon/features/ui/util/schedule_idle_task.js b/app/javascript/mastodon/features/ui/util/schedule_idle_task.js
new file mode 100644
index 0000000000..b04d4a8eef
--- /dev/null
+++ b/app/javascript/mastodon/features/ui/util/schedule_idle_task.js
@@ -0,0 +1,29 @@
+// Wrapper to call requestIdleCallback() to schedule low-priority work.
+// See https://developer.mozilla.org/en-US/docs/Web/API/Background_Tasks_API
+// for a good breakdown of the concepts behind this.
+
+import Queue from 'tiny-queue';
+
+const taskQueue = new Queue();
+let runningRequestIdleCallback = false;
+
+function runTasks(deadline) {
+ while (taskQueue.length && deadline.timeRemaining() > 0) {
+ taskQueue.shift()();
+ }
+ if (taskQueue.length) {
+ requestIdleCallback(runTasks);
+ } else {
+ runningRequestIdleCallback = false;
+ }
+}
+
+function scheduleIdleTask(task) {
+ taskQueue.push(task);
+ if (!runningRequestIdleCallback) {
+ runningRequestIdleCallback = true;
+ requestIdleCallback(runTasks);
+ }
+}
+
+export default scheduleIdleTask;
diff --git a/app/javascript/mastodon/features/video/index.js b/app/javascript/mastodon/features/video/index.js
new file mode 100644
index 0000000000..003bf23a84
--- /dev/null
+++ b/app/javascript/mastodon/features/video/index.js
@@ -0,0 +1,286 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+import { throttle } from 'lodash';
+import classNames from 'classnames';
+import { isFullscreen, requestFullscreen, exitFullscreen } from '../ui/util/fullscreen';
+
+const messages = defineMessages({
+ play: { id: 'video.play', defaultMessage: 'Play' },
+ pause: { id: 'video.pause', defaultMessage: 'Pause' },
+ mute: { id: 'video.mute', defaultMessage: 'Mute sound' },
+ unmute: { id: 'video.unmute', defaultMessage: 'Unmute sound' },
+ hide: { id: 'video.hide', defaultMessage: 'Hide video' },
+ expand: { id: 'video.expand', defaultMessage: 'Expand video' },
+ close: { id: 'video.close', defaultMessage: 'Close video' },
+ fullscreen: { id: 'video.fullscreen', defaultMessage: 'Full screen' },
+ exit_fullscreen: { id: 'video.exit_fullscreen', defaultMessage: 'Exit full screen' },
+});
+
+const findElementPosition = el => {
+ let box;
+
+ if (el.getBoundingClientRect && el.parentNode) {
+ box = el.getBoundingClientRect();
+ }
+
+ if (!box) {
+ return {
+ left: 0,
+ top: 0,
+ };
+ }
+
+ const docEl = document.documentElement;
+ const body = document.body;
+
+ const clientLeft = docEl.clientLeft || body.clientLeft || 0;
+ const scrollLeft = window.pageXOffset || body.scrollLeft;
+ const left = (box.left + scrollLeft) - clientLeft;
+
+ const clientTop = docEl.clientTop || body.clientTop || 0;
+ const scrollTop = window.pageYOffset || body.scrollTop;
+ const top = (box.top + scrollTop) - clientTop;
+
+ return {
+ left: Math.round(left),
+ top: Math.round(top),
+ };
+};
+
+const getPointerPosition = (el, event) => {
+ const position = {};
+ const box = findElementPosition(el);
+ const boxW = el.offsetWidth;
+ const boxH = el.offsetHeight;
+ const boxY = box.top;
+ const boxX = box.left;
+
+ let pageY = event.pageY;
+ let pageX = event.pageX;
+
+ if (event.changedTouches) {
+ pageX = event.changedTouches[0].pageX;
+ pageY = event.changedTouches[0].pageY;
+ }
+
+ position.y = Math.max(0, Math.min(1, ((boxY - pageY) + boxH) / boxH));
+ position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW));
+
+ return position;
+};
+
+@injectIntl
+export default class Video extends React.PureComponent {
+
+ static propTypes = {
+ preview: PropTypes.string,
+ src: PropTypes.string.isRequired,
+ alt: PropTypes.string,
+ width: PropTypes.number,
+ height: PropTypes.number,
+ sensitive: PropTypes.bool,
+ startTime: PropTypes.number,
+ onOpenVideo: PropTypes.func,
+ onCloseVideo: PropTypes.func,
+ intl: PropTypes.object.isRequired,
+ };
+
+ state = {
+ progress: 0,
+ paused: true,
+ dragging: false,
+ fullscreen: false,
+ hovered: false,
+ muted: false,
+ revealed: !this.props.sensitive,
+ };
+
+ setPlayerRef = c => {
+ this.player = c;
+ }
+
+ setVideoRef = c => {
+ this.video = c;
+ }
+
+ setSeekRef = c => {
+ this.seek = c;
+ }
+
+ handlePlay = () => {
+ this.setState({ paused: false });
+ }
+
+ handlePause = () => {
+ this.setState({ paused: true });
+ }
+
+ handleTimeUpdate = () => {
+ this.setState({ progress: 100 * (this.video.currentTime / this.video.duration) });
+ }
+
+ handleMouseDown = e => {
+ document.addEventListener('mousemove', this.handleMouseMove, true);
+ document.addEventListener('mouseup', this.handleMouseUp, true);
+ document.addEventListener('touchmove', this.handleMouseMove, true);
+ document.addEventListener('touchend', this.handleMouseUp, true);
+
+ this.setState({ dragging: true });
+ this.video.pause();
+ this.handleMouseMove(e);
+ }
+
+ handleMouseUp = () => {
+ document.removeEventListener('mousemove', this.handleMouseMove, true);
+ document.removeEventListener('mouseup', this.handleMouseUp, true);
+ document.removeEventListener('touchmove', this.handleMouseMove, true);
+ document.removeEventListener('touchend', this.handleMouseUp, true);
+
+ this.setState({ dragging: false });
+ this.video.play();
+ }
+
+ handleMouseMove = throttle(e => {
+ const { x } = getPointerPosition(this.seek, e);
+ this.video.currentTime = this.video.duration * x;
+ this.setState({ progress: x * 100 });
+ }, 60);
+
+ togglePlay = () => {
+ if (this.state.paused) {
+ this.video.play();
+ } else {
+ this.video.pause();
+ }
+ }
+
+ toggleFullscreen = () => {
+ if (isFullscreen()) {
+ exitFullscreen();
+ } else {
+ requestFullscreen(this.player);
+ }
+ }
+
+ componentDidMount () {
+ document.addEventListener('fullscreenchange', this.handleFullscreenChange, true);
+ document.addEventListener('webkitfullscreenchange', this.handleFullscreenChange, true);
+ document.addEventListener('mozfullscreenchange', this.handleFullscreenChange, true);
+ document.addEventListener('MSFullscreenChange', this.handleFullscreenChange, true);
+ }
+
+ componentWillUnmount () {
+ document.removeEventListener('fullscreenchange', this.handleFullscreenChange, true);
+ document.removeEventListener('webkitfullscreenchange', this.handleFullscreenChange, true);
+ document.removeEventListener('mozfullscreenchange', this.handleFullscreenChange, true);
+ document.removeEventListener('MSFullscreenChange', this.handleFullscreenChange, true);
+ }
+
+ handleFullscreenChange = () => {
+ this.setState({ fullscreen: isFullscreen() });
+ }
+
+ handleMouseEnter = () => {
+ this.setState({ hovered: true });
+ }
+
+ handleMouseLeave = () => {
+ this.setState({ hovered: false });
+ }
+
+ toggleMute = () => {
+ this.video.muted = !this.video.muted;
+ this.setState({ muted: this.video.muted });
+ }
+
+ toggleReveal = () => {
+ if (this.state.revealed) {
+ this.video.pause();
+ }
+
+ this.setState({ revealed: !this.state.revealed });
+ }
+
+ handleLoadedData = () => {
+ if (this.props.startTime) {
+ this.video.currentTime = this.props.startTime;
+ this.video.play();
+ }
+ }
+
+ handleProgress = () => {
+ if (this.video.buffered.length > 0) {
+ this.setState({ buffer: this.video.buffered.end(0) / this.video.duration * 100 });
+ }
+ }
+
+ handleOpenVideo = () => {
+ this.video.pause();
+ this.props.onOpenVideo(this.video.currentTime);
+ }
+
+ handleCloseVideo = () => {
+ this.video.pause();
+ this.props.onCloseVideo();
+ }
+
+ render () {
+ const { preview, src, width, height, startTime, onOpenVideo, onCloseVideo, intl, alt } = this.props;
+ const { progress, buffer, dragging, paused, fullscreen, hovered, muted, revealed } = this.state;
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ {!onCloseVideo && }
+
+
+
+ {(!fullscreen && onOpenVideo) && }
+ {onCloseVideo && }
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/initial_state.js b/app/javascript/mastodon/initial_state.js
new file mode 100644
index 0000000000..3fc45077d4
--- /dev/null
+++ b/app/javascript/mastodon/initial_state.js
@@ -0,0 +1,13 @@
+const element = document.getElementById('initial-state');
+const initialState = element && JSON.parse(element.textContent);
+
+const getMeta = (prop) => initialState && initialState.meta && initialState.meta[prop];
+
+export const reduceMotion = getMeta('reduce_motion');
+export const autoPlayGif = getMeta('auto_play_gif');
+export const unfollowModal = getMeta('unfollow_modal');
+export const boostModal = getMeta('boost_modal');
+export const deleteModal = getMeta('delete_modal');
+export const me = getMeta('me');
+
+export default initialState;
diff --git a/app/javascript/mastodon/is_mobile.js b/app/javascript/mastodon/is_mobile.js
new file mode 100644
index 0000000000..f96df1ebbc
--- /dev/null
+++ b/app/javascript/mastodon/is_mobile.js
@@ -0,0 +1,27 @@
+import detectPassiveEvents from 'detect-passive-events';
+
+const LAYOUT_BREAKPOINT = 630;
+
+export function isMobile(width) {
+ return width <= LAYOUT_BREAKPOINT;
+};
+
+const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
+
+let userTouching = false;
+let listenerOptions = detectPassiveEvents.hasSupport ? { passive: true } : false;
+
+function touchListener() {
+ userTouching = true;
+ window.removeEventListener('touchstart', touchListener, listenerOptions);
+}
+
+window.addEventListener('touchstart', touchListener, listenerOptions);
+
+export function isUserTouching() {
+ return userTouching;
+}
+
+export function isIOS() {
+ return iOS;
+};
diff --git a/app/javascript/mastodon/link_header.js b/app/javascript/mastodon/link_header.js
new file mode 100644
index 0000000000..a3e7ccf1c1
--- /dev/null
+++ b/app/javascript/mastodon/link_header.js
@@ -0,0 +1,33 @@
+import Link from 'http-link-header';
+import querystring from 'querystring';
+
+Link.parseAttrs = (link, parts) => {
+ let match = null;
+ let attr = '';
+ let value = '';
+ let attrs = '';
+
+ let uriAttrs = /<(.*)>;\s*(.*)/gi.exec(parts);
+
+ if(uriAttrs) {
+ attrs = uriAttrs[2];
+ link = Link.parseParams(link, uriAttrs[1]);
+ }
+
+ while(match = Link.attrPattern.exec(attrs)) { // eslint-disable-line no-cond-assign
+ attr = match[1].toLowerCase();
+ value = match[4] || match[3] || match[2];
+
+ if( /\*$/.test(attr)) {
+ Link.setAttr(link, attr, Link.parseExtendedValue(value));
+ } else if(/%/.test(value)) {
+ Link.setAttr(link, attr, querystring.decode(value));
+ } else {
+ Link.setAttr(link, attr, value);
+ }
+ }
+
+ return link;
+};
+
+export default Link;
diff --git a/app/javascript/mastodon/load_polyfills.js b/app/javascript/mastodon/load_polyfills.js
new file mode 100644
index 0000000000..8927b73585
--- /dev/null
+++ b/app/javascript/mastodon/load_polyfills.js
@@ -0,0 +1,39 @@
+// Convenience function to load polyfills and return a promise when it's done.
+// If there are no polyfills, then this is just Promise.resolve() which means
+// it will execute in the same tick of the event loop (i.e. near-instant).
+
+function importBasePolyfills() {
+ return import(/* webpackChunkName: "base_polyfills" */ './base_polyfills');
+}
+
+function importExtraPolyfills() {
+ return import(/* webpackChunkName: "extra_polyfills" */ './extra_polyfills');
+}
+
+function loadPolyfills() {
+ const needsBasePolyfills = !(
+ window.Intl &&
+ Object.assign &&
+ Number.isNaN &&
+ window.Symbol &&
+ Array.prototype.includes
+ );
+
+ // Latest version of Firefox and Safari do not have IntersectionObserver.
+ // Edge does not have requestIdleCallback and object-fit CSS property.
+ // This avoids shipping them all the polyfills.
+ const needsExtraPolyfills = !(
+ window.IntersectionObserver &&
+ window.IntersectionObserverEntry &&
+ 'isIntersecting' in IntersectionObserverEntry.prototype &&
+ window.requestIdleCallback &&
+ 'object-fit' in (new Image()).style
+ );
+
+ return Promise.all([
+ needsBasePolyfills && importBasePolyfills(),
+ needsExtraPolyfills && importExtraPolyfills(),
+ ]);
+}
+
+export default loadPolyfills;
diff --git a/app/javascript/mastodon/locales/defaultMessages.json b/app/javascript/mastodon/locales/defaultMessages.json
index ebb514e69b..f400b283fd 100644
--- a/app/javascript/mastodon/locales/defaultMessages.json
+++ b/app/javascript/mastodon/locales/defaultMessages.json
@@ -755,19 +755,6 @@
],
"path": "app/javascript/mastodon/features/compose/index.json"
},
- {
- "descriptors": [
- {
- "defaultMessage": "Direct messages",
- "id": "column.direct"
- },
- {
- "defaultMessage": "You don't have any direct messages yet. When you send or receive one, it will show up here.",
- "id": "empty_column.direct"
- }
- ],
- "path": "app/javascript/mastodon/features/direct_timeline/index.json"
- },
{
"descriptors": [
{
@@ -829,10 +816,6 @@
"defaultMessage": "Local timeline",
"id": "navigation_bar.community_timeline"
},
- {
- "defaultMessage": "Direct messages",
- "id": "navigation_bar.direct"
- },
{
"defaultMessage": "Preferences",
"id": "navigation_bar.preferences"
diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json
index efe0e1de99..1d0bbcee55 100644
--- a/app/javascript/mastodon/locales/en.json
+++ b/app/javascript/mastodon/locales/en.json
@@ -28,7 +28,6 @@
"bundle_modal_error.retry": "Try again",
"column.blocks": "Blocked users",
"column.community": "Local timeline",
- "column.direct": "Direct messages",
"column.favourites": "Favourites",
"column.follow_requests": "Follow requests",
"column.home": "Home",
@@ -81,7 +80,6 @@
"emoji_button.symbols": "Symbols",
"emoji_button.travel": "Travel & Places",
"empty_column.community": "The local timeline is empty. Write something publicly to get the ball rolling!",
- "empty_column.direct": "You don't have any direct messages yet. When you send or receive one, it will show up here.",
"empty_column.hashtag": "There is nothing in this hashtag yet.",
"empty_column.home": "Your home timeline is empty! Visit {public} or use search to get started and meet other users.",
"empty_column.home.public_timeline": "the public timeline",
@@ -108,7 +106,6 @@
"missing_indicator.label": "Not found",
"navigation_bar.blocks": "Blocked users",
"navigation_bar.community_timeline": "Local timeline",
- "navigation_bar.direct": "Direct messages",
"navigation_bar.edit_profile": "Edit profile",
"navigation_bar.favourites": "Favourites",
"navigation_bar.follow_requests": "Follow requests",
diff --git a/app/javascript/mastodon/main.js b/app/javascript/mastodon/main.js
new file mode 100644
index 0000000000..23b6b04faf
--- /dev/null
+++ b/app/javascript/mastodon/main.js
@@ -0,0 +1,34 @@
+import * as WebPushSubscription from './web_push_subscription';
+import Mastodon from './containers/mastodon';
+import React from 'react';
+import ReactDOM from 'react-dom';
+import ready from './ready';
+
+const perf = require('./performance');
+
+function main() {
+ perf.start('main()');
+
+ if (window.history && history.replaceState) {
+ const { pathname, search, hash } = window.location;
+ const path = pathname + search + hash;
+ if (!(/^\/web[$/]/).test(path)) {
+ history.replaceState(null, document.title, `/web${path}`);
+ }
+ }
+
+ ready(() => {
+ const mountNode = document.getElementById('mastodon');
+ const props = JSON.parse(mountNode.getAttribute('data-props'));
+
+ ReactDOM.render(, mountNode);
+ if (process.env.NODE_ENV === 'production') {
+ // avoid offline in dev mode because it's harder to debug
+ require('offline-plugin/runtime').install();
+ WebPushSubscription.register();
+ }
+ perf.stop('main()');
+ });
+}
+
+export default main;
diff --git a/app/javascript/mastodon/middleware/errors.js b/app/javascript/mastodon/middleware/errors.js
new file mode 100644
index 0000000000..b2c5f0898b
--- /dev/null
+++ b/app/javascript/mastodon/middleware/errors.js
@@ -0,0 +1,31 @@
+import { showAlert } from '../actions/alerts';
+
+const defaultFailSuffix = 'FAIL';
+
+export default function errorsMiddleware() {
+ return ({ dispatch }) => next => action => {
+ if (action.type && !action.skipAlert) {
+ const isFail = new RegExp(`${defaultFailSuffix}$`, 'g');
+
+ if (action.type.match(isFail)) {
+ if (action.error.response) {
+ const { data, status, statusText } = action.error.response;
+
+ let message = statusText;
+ let title = `${status}`;
+
+ if (data.error) {
+ message = data.error;
+ }
+
+ dispatch(showAlert(title, message));
+ } else {
+ console.error(action.error);
+ dispatch(showAlert('Oops!', 'An unexpected error occurred.'));
+ }
+ }
+ }
+
+ return next(action);
+ };
+};
diff --git a/app/javascript/mastodon/middleware/loading_bar.js b/app/javascript/mastodon/middleware/loading_bar.js
new file mode 100644
index 0000000000..a98f1bb2b6
--- /dev/null
+++ b/app/javascript/mastodon/middleware/loading_bar.js
@@ -0,0 +1,25 @@
+import { showLoading, hideLoading } from 'react-redux-loading-bar';
+
+const defaultTypeSuffixes = ['PENDING', 'FULFILLED', 'REJECTED'];
+
+export default function loadingBarMiddleware(config = {}) {
+ const promiseTypeSuffixes = config.promiseTypeSuffixes || defaultTypeSuffixes;
+
+ return ({ dispatch }) => next => (action) => {
+ if (action.type && !action.skipLoading) {
+ const [PENDING, FULFILLED, REJECTED] = promiseTypeSuffixes;
+
+ const isPending = new RegExp(`${PENDING}$`, 'g');
+ const isFulfilled = new RegExp(`${FULFILLED}$`, 'g');
+ const isRejected = new RegExp(`${REJECTED}$`, 'g');
+
+ if (action.type.match(isPending)) {
+ dispatch(showLoading());
+ } else if (action.type.match(isFulfilled) || action.type.match(isRejected)) {
+ dispatch(hideLoading());
+ }
+ }
+
+ return next(action);
+ };
+};
diff --git a/app/javascript/mastodon/middleware/sounds.js b/app/javascript/mastodon/middleware/sounds.js
new file mode 100644
index 0000000000..3d1e3eabaa
--- /dev/null
+++ b/app/javascript/mastodon/middleware/sounds.js
@@ -0,0 +1,46 @@
+const createAudio = sources => {
+ const audio = new Audio();
+ sources.forEach(({ type, src }) => {
+ const source = document.createElement('source');
+ source.type = type;
+ source.src = src;
+ audio.appendChild(source);
+ });
+ return audio;
+};
+
+const play = audio => {
+ if (!audio.paused) {
+ audio.pause();
+ if (typeof audio.fastSeek === 'function') {
+ audio.fastSeek(0);
+ } else {
+ audio.seek(0);
+ }
+ }
+
+ audio.play();
+};
+
+export default function soundsMiddleware() {
+ const soundCache = {
+ boop: createAudio([
+ {
+ src: '/sounds/boop.ogg',
+ type: 'audio/ogg',
+ },
+ {
+ src: '/sounds/boop.mp3',
+ type: 'audio/mpeg',
+ },
+ ]),
+ };
+
+ return () => next => action => {
+ if (action.meta && action.meta.sound && soundCache[action.meta.sound]) {
+ play(soundCache[action.meta.sound]);
+ }
+
+ return next(action);
+ };
+};
diff --git a/app/javascript/mastodon/performance.js b/app/javascript/mastodon/performance.js
new file mode 100644
index 0000000000..450a90626e
--- /dev/null
+++ b/app/javascript/mastodon/performance.js
@@ -0,0 +1,31 @@
+//
+// Tools for performance debugging, only enabled in development mode.
+// Open up Chrome Dev Tools, then Timeline, then User Timing to see output.
+// Also see config/webpack/loaders/mark.js for the webpack loader marks.
+//
+
+let marky;
+
+if (process.env.NODE_ENV === 'development') {
+ if (typeof performance !== 'undefined' && performance.setResourceTimingBufferSize) {
+ // Increase Firefox's performance entry limit; otherwise it's capped to 150.
+ // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1331135
+ performance.setResourceTimingBufferSize(Infinity);
+ }
+ marky = require('marky');
+ // allows us to easily do e.g. ReactPerf.printWasted() while debugging
+ //window.ReactPerf = require('react-addons-perf');
+ //window.ReactPerf.start();
+}
+
+export function start(name) {
+ if (process.env.NODE_ENV === 'development') {
+ marky.mark(name);
+ }
+}
+
+export function stop(name) {
+ if (process.env.NODE_ENV === 'development') {
+ marky.stop(name);
+ }
+}
diff --git a/app/javascript/mastodon/ready.js b/app/javascript/mastodon/ready.js
new file mode 100644
index 0000000000..dd543910bb
--- /dev/null
+++ b/app/javascript/mastodon/ready.js
@@ -0,0 +1,7 @@
+export default function ready(loaded) {
+ if (['interactive', 'complete'].includes(document.readyState)) {
+ loaded();
+ } else {
+ document.addEventListener('DOMContentLoaded', loaded);
+ }
+}
diff --git a/app/javascript/mastodon/reducers/accounts.js b/app/javascript/mastodon/reducers/accounts.js
new file mode 100644
index 0000000000..8a4d69f26f
--- /dev/null
+++ b/app/javascript/mastodon/reducers/accounts.js
@@ -0,0 +1,135 @@
+import {
+ ACCOUNT_FETCH_SUCCESS,
+ FOLLOWERS_FETCH_SUCCESS,
+ FOLLOWERS_EXPAND_SUCCESS,
+ FOLLOWING_FETCH_SUCCESS,
+ FOLLOWING_EXPAND_SUCCESS,
+ FOLLOW_REQUESTS_FETCH_SUCCESS,
+ FOLLOW_REQUESTS_EXPAND_SUCCESS,
+} from '../actions/accounts';
+import {
+ BLOCKS_FETCH_SUCCESS,
+ BLOCKS_EXPAND_SUCCESS,
+} from '../actions/blocks';
+import {
+ MUTES_FETCH_SUCCESS,
+ MUTES_EXPAND_SUCCESS,
+} from '../actions/mutes';
+import { COMPOSE_SUGGESTIONS_READY } from '../actions/compose';
+import {
+ REBLOG_SUCCESS,
+ UNREBLOG_SUCCESS,
+ FAVOURITE_SUCCESS,
+ UNFAVOURITE_SUCCESS,
+ REBLOGS_FETCH_SUCCESS,
+ FAVOURITES_FETCH_SUCCESS,
+} from '../actions/interactions';
+import {
+ TIMELINE_REFRESH_SUCCESS,
+ TIMELINE_UPDATE,
+ TIMELINE_EXPAND_SUCCESS,
+} from '../actions/timelines';
+import {
+ STATUS_FETCH_SUCCESS,
+ CONTEXT_FETCH_SUCCESS,
+} from '../actions/statuses';
+import { SEARCH_FETCH_SUCCESS } from '../actions/search';
+import {
+ NOTIFICATIONS_UPDATE,
+ NOTIFICATIONS_REFRESH_SUCCESS,
+ NOTIFICATIONS_EXPAND_SUCCESS,
+} from '../actions/notifications';
+import {
+ FAVOURITED_STATUSES_FETCH_SUCCESS,
+ FAVOURITED_STATUSES_EXPAND_SUCCESS,
+} from '../actions/favourites';
+import { STORE_HYDRATE } from '../actions/store';
+import emojify from '../features/emoji/emoji';
+import { Map as ImmutableMap, fromJS } from 'immutable';
+import escapeTextContentForBrowser from 'escape-html';
+
+const normalizeAccount = (state, account) => {
+ account = { ...account };
+
+ delete account.followers_count;
+ delete account.following_count;
+ delete account.statuses_count;
+
+ const displayName = account.display_name.length === 0 ? account.username : account.display_name;
+ account.display_name_html = emojify(escapeTextContentForBrowser(displayName));
+ account.note_emojified = emojify(account.note);
+
+ return state.set(account.id, fromJS(account));
+};
+
+const normalizeAccounts = (state, accounts) => {
+ accounts.forEach(account => {
+ state = normalizeAccount(state, account);
+ });
+
+ return state;
+};
+
+const normalizeAccountFromStatus = (state, status) => {
+ state = normalizeAccount(state, status.account);
+
+ if (status.reblog && status.reblog.account) {
+ state = normalizeAccount(state, status.reblog.account);
+ }
+
+ return state;
+};
+
+const normalizeAccountsFromStatuses = (state, statuses) => {
+ statuses.forEach(status => {
+ state = normalizeAccountFromStatus(state, status);
+ });
+
+ return state;
+};
+
+const initialState = ImmutableMap();
+
+export default function accounts(state = initialState, action) {
+ switch(action.type) {
+ case STORE_HYDRATE:
+ return state.merge(action.state.get('accounts'));
+ case ACCOUNT_FETCH_SUCCESS:
+ case NOTIFICATIONS_UPDATE:
+ return normalizeAccount(state, action.account);
+ case FOLLOWERS_FETCH_SUCCESS:
+ case FOLLOWERS_EXPAND_SUCCESS:
+ case FOLLOWING_FETCH_SUCCESS:
+ case FOLLOWING_EXPAND_SUCCESS:
+ case REBLOGS_FETCH_SUCCESS:
+ case FAVOURITES_FETCH_SUCCESS:
+ case COMPOSE_SUGGESTIONS_READY:
+ case FOLLOW_REQUESTS_FETCH_SUCCESS:
+ case FOLLOW_REQUESTS_EXPAND_SUCCESS:
+ case BLOCKS_FETCH_SUCCESS:
+ case BLOCKS_EXPAND_SUCCESS:
+ case MUTES_FETCH_SUCCESS:
+ case MUTES_EXPAND_SUCCESS:
+ return action.accounts ? normalizeAccounts(state, action.accounts) : state;
+ case NOTIFICATIONS_REFRESH_SUCCESS:
+ case NOTIFICATIONS_EXPAND_SUCCESS:
+ case SEARCH_FETCH_SUCCESS:
+ return normalizeAccountsFromStatuses(normalizeAccounts(state, action.accounts), action.statuses);
+ case TIMELINE_REFRESH_SUCCESS:
+ case TIMELINE_EXPAND_SUCCESS:
+ case CONTEXT_FETCH_SUCCESS:
+ case FAVOURITED_STATUSES_FETCH_SUCCESS:
+ case FAVOURITED_STATUSES_EXPAND_SUCCESS:
+ return normalizeAccountsFromStatuses(state, action.statuses);
+ case REBLOG_SUCCESS:
+ case FAVOURITE_SUCCESS:
+ case UNREBLOG_SUCCESS:
+ case UNFAVOURITE_SUCCESS:
+ return normalizeAccountFromStatus(state, action.response);
+ case TIMELINE_UPDATE:
+ case STATUS_FETCH_SUCCESS:
+ return normalizeAccountFromStatus(state, action.status);
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/accounts_counters.js b/app/javascript/mastodon/reducers/accounts_counters.js
new file mode 100644
index 0000000000..1ed0fe3e39
--- /dev/null
+++ b/app/javascript/mastodon/reducers/accounts_counters.js
@@ -0,0 +1,135 @@
+import {
+ ACCOUNT_FETCH_SUCCESS,
+ FOLLOWERS_FETCH_SUCCESS,
+ FOLLOWERS_EXPAND_SUCCESS,
+ FOLLOWING_FETCH_SUCCESS,
+ FOLLOWING_EXPAND_SUCCESS,
+ FOLLOW_REQUESTS_FETCH_SUCCESS,
+ FOLLOW_REQUESTS_EXPAND_SUCCESS,
+ ACCOUNT_FOLLOW_SUCCESS,
+ ACCOUNT_UNFOLLOW_SUCCESS,
+} from '../actions/accounts';
+import {
+ BLOCKS_FETCH_SUCCESS,
+ BLOCKS_EXPAND_SUCCESS,
+} from '../actions/blocks';
+import {
+ MUTES_FETCH_SUCCESS,
+ MUTES_EXPAND_SUCCESS,
+} from '../actions/mutes';
+import { COMPOSE_SUGGESTIONS_READY } from '../actions/compose';
+import {
+ REBLOG_SUCCESS,
+ UNREBLOG_SUCCESS,
+ FAVOURITE_SUCCESS,
+ UNFAVOURITE_SUCCESS,
+ REBLOGS_FETCH_SUCCESS,
+ FAVOURITES_FETCH_SUCCESS,
+} from '../actions/interactions';
+import {
+ TIMELINE_REFRESH_SUCCESS,
+ TIMELINE_UPDATE,
+ TIMELINE_EXPAND_SUCCESS,
+} from '../actions/timelines';
+import {
+ STATUS_FETCH_SUCCESS,
+ CONTEXT_FETCH_SUCCESS,
+} from '../actions/statuses';
+import { SEARCH_FETCH_SUCCESS } from '../actions/search';
+import {
+ NOTIFICATIONS_UPDATE,
+ NOTIFICATIONS_REFRESH_SUCCESS,
+ NOTIFICATIONS_EXPAND_SUCCESS,
+} from '../actions/notifications';
+import {
+ FAVOURITED_STATUSES_FETCH_SUCCESS,
+ FAVOURITED_STATUSES_EXPAND_SUCCESS,
+} from '../actions/favourites';
+import { STORE_HYDRATE } from '../actions/store';
+import { Map as ImmutableMap, fromJS } from 'immutable';
+
+const normalizeAccount = (state, account) => state.set(account.id, fromJS({
+ followers_count: account.followers_count,
+ following_count: account.following_count,
+ statuses_count: account.statuses_count,
+}));
+
+const normalizeAccounts = (state, accounts) => {
+ accounts.forEach(account => {
+ state = normalizeAccount(state, account);
+ });
+
+ return state;
+};
+
+const normalizeAccountFromStatus = (state, status) => {
+ state = normalizeAccount(state, status.account);
+
+ if (status.reblog && status.reblog.account) {
+ state = normalizeAccount(state, status.reblog.account);
+ }
+
+ return state;
+};
+
+const normalizeAccountsFromStatuses = (state, statuses) => {
+ statuses.forEach(status => {
+ state = normalizeAccountFromStatus(state, status);
+ });
+
+ return state;
+};
+
+const initialState = ImmutableMap();
+
+export default function accountsCounters(state = initialState, action) {
+ switch(action.type) {
+ case STORE_HYDRATE:
+ return state.merge(action.state.get('accounts').map(item => fromJS({
+ followers_count: item.get('followers_count'),
+ following_count: item.get('following_count'),
+ statuses_count: item.get('statuses_count'),
+ })));
+ case ACCOUNT_FETCH_SUCCESS:
+ case NOTIFICATIONS_UPDATE:
+ return normalizeAccount(state, action.account);
+ case FOLLOWERS_FETCH_SUCCESS:
+ case FOLLOWERS_EXPAND_SUCCESS:
+ case FOLLOWING_FETCH_SUCCESS:
+ case FOLLOWING_EXPAND_SUCCESS:
+ case REBLOGS_FETCH_SUCCESS:
+ case FAVOURITES_FETCH_SUCCESS:
+ case COMPOSE_SUGGESTIONS_READY:
+ case FOLLOW_REQUESTS_FETCH_SUCCESS:
+ case FOLLOW_REQUESTS_EXPAND_SUCCESS:
+ case BLOCKS_FETCH_SUCCESS:
+ case BLOCKS_EXPAND_SUCCESS:
+ case MUTES_FETCH_SUCCESS:
+ case MUTES_EXPAND_SUCCESS:
+ return action.accounts ? normalizeAccounts(state, action.accounts) : state;
+ case NOTIFICATIONS_REFRESH_SUCCESS:
+ case NOTIFICATIONS_EXPAND_SUCCESS:
+ case SEARCH_FETCH_SUCCESS:
+ return normalizeAccountsFromStatuses(normalizeAccounts(state, action.accounts), action.statuses);
+ case TIMELINE_REFRESH_SUCCESS:
+ case TIMELINE_EXPAND_SUCCESS:
+ case CONTEXT_FETCH_SUCCESS:
+ case FAVOURITED_STATUSES_FETCH_SUCCESS:
+ case FAVOURITED_STATUSES_EXPAND_SUCCESS:
+ return normalizeAccountsFromStatuses(state, action.statuses);
+ case REBLOG_SUCCESS:
+ case FAVOURITE_SUCCESS:
+ case UNREBLOG_SUCCESS:
+ case UNFAVOURITE_SUCCESS:
+ return normalizeAccountFromStatus(state, action.response);
+ case TIMELINE_UPDATE:
+ case STATUS_FETCH_SUCCESS:
+ return normalizeAccountFromStatus(state, action.status);
+ case ACCOUNT_FOLLOW_SUCCESS:
+ return state.updateIn([action.relationship.id, 'followers_count'], num => num + 1);
+ case ACCOUNT_UNFOLLOW_SUCCESS:
+ return state.updateIn([action.relationship.id, 'followers_count'], num => Math.max(0, num - 1));
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/alerts.js b/app/javascript/mastodon/reducers/alerts.js
new file mode 100644
index 0000000000..089d920c3e
--- /dev/null
+++ b/app/javascript/mastodon/reducers/alerts.js
@@ -0,0 +1,25 @@
+import {
+ ALERT_SHOW,
+ ALERT_DISMISS,
+ ALERT_CLEAR,
+} from '../actions/alerts';
+import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
+
+const initialState = ImmutableList([]);
+
+export default function alerts(state = initialState, action) {
+ switch(action.type) {
+ case ALERT_SHOW:
+ return state.push(ImmutableMap({
+ key: state.size > 0 ? state.last().get('key') + 1 : 0,
+ title: action.title,
+ message: action.message,
+ }));
+ case ALERT_DISMISS:
+ return state.filterNot(item => item.get('key') === action.alert.key);
+ case ALERT_CLEAR:
+ return state.clear();
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/cards.js b/app/javascript/mastodon/reducers/cards.js
new file mode 100644
index 0000000000..4d86b0d7e7
--- /dev/null
+++ b/app/javascript/mastodon/reducers/cards.js
@@ -0,0 +1,14 @@
+import { STATUS_CARD_FETCH_SUCCESS } from '../actions/cards';
+
+import { Map as ImmutableMap, fromJS } from 'immutable';
+
+const initialState = ImmutableMap();
+
+export default function cards(state = initialState, action) {
+ switch(action.type) {
+ case STATUS_CARD_FETCH_SUCCESS:
+ return state.set(action.id, fromJS(action.card));
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js
new file mode 100644
index 0000000000..c709fb88c9
--- /dev/null
+++ b/app/javascript/mastodon/reducers/compose.js
@@ -0,0 +1,276 @@
+import {
+ COMPOSE_MOUNT,
+ COMPOSE_UNMOUNT,
+ COMPOSE_CHANGE,
+ COMPOSE_REPLY,
+ COMPOSE_REPLY_CANCEL,
+ COMPOSE_MENTION,
+ COMPOSE_SUBMIT_REQUEST,
+ COMPOSE_SUBMIT_SUCCESS,
+ COMPOSE_SUBMIT_FAIL,
+ COMPOSE_UPLOAD_REQUEST,
+ COMPOSE_UPLOAD_SUCCESS,
+ COMPOSE_UPLOAD_FAIL,
+ COMPOSE_UPLOAD_UNDO,
+ COMPOSE_UPLOAD_PROGRESS,
+ COMPOSE_SUGGESTIONS_CLEAR,
+ COMPOSE_SUGGESTIONS_READY,
+ COMPOSE_SUGGESTION_SELECT,
+ COMPOSE_SENSITIVITY_CHANGE,
+ COMPOSE_SPOILERNESS_CHANGE,
+ COMPOSE_SPOILER_TEXT_CHANGE,
+ COMPOSE_VISIBILITY_CHANGE,
+ COMPOSE_COMPOSING_CHANGE,
+ COMPOSE_EMOJI_INSERT,
+ COMPOSE_UPLOAD_CHANGE_REQUEST,
+ COMPOSE_UPLOAD_CHANGE_SUCCESS,
+ COMPOSE_UPLOAD_CHANGE_FAIL,
+ COMPOSE_RESET,
+} from '../actions/compose';
+import { TIMELINE_DELETE } from '../actions/timelines';
+import { STORE_HYDRATE } from '../actions/store';
+import { Map as ImmutableMap, List as ImmutableList, OrderedSet as ImmutableOrderedSet, fromJS } from 'immutable';
+import uuid from '../uuid';
+import { me } from '../initial_state';
+
+const initialState = ImmutableMap({
+ mounted: false,
+ sensitive: false,
+ spoiler: false,
+ spoiler_text: '',
+ privacy: null,
+ text: '',
+ focusDate: null,
+ preselectDate: null,
+ in_reply_to: null,
+ is_composing: false,
+ is_submitting: false,
+ is_uploading: false,
+ progress: 0,
+ media_attachments: ImmutableList(),
+ suggestion_token: null,
+ suggestions: ImmutableList(),
+ default_privacy: 'public',
+ default_sensitive: false,
+ resetFileKey: Math.floor((Math.random() * 0x10000)),
+ idempotencyKey: null,
+});
+
+function statusToTextMentions(state, status) {
+ let set = ImmutableOrderedSet([]);
+
+ if (status.getIn(['account', 'id']) !== me) {
+ set = set.add(`@${status.getIn(['account', 'acct'])} `);
+ }
+
+ return set.union(status.get('mentions').filterNot(mention => mention.get('id') === me).map(mention => `@${mention.get('acct')} `)).join('');
+};
+
+function clearAll(state) {
+ return state.withMutations(map => {
+ map.set('text', '');
+ map.set('spoiler', false);
+ map.set('spoiler_text', '');
+ map.set('is_submitting', false);
+ map.set('in_reply_to', null);
+ map.set('privacy', state.get('default_privacy'));
+ map.set('sensitive', false);
+ map.update('media_attachments', list => list.clear());
+ map.set('idempotencyKey', uuid());
+ });
+};
+
+function appendMedia(state, media) {
+ const prevSize = state.get('media_attachments').size;
+
+ return state.withMutations(map => {
+ map.update('media_attachments', list => list.push(media));
+ map.set('is_uploading', false);
+ map.set('resetFileKey', Math.floor((Math.random() * 0x10000)));
+ map.update('text', oldText => `${oldText.trim()} ${media.get('text_url')}`);
+ map.set('focusDate', new Date());
+ map.set('idempotencyKey', uuid());
+
+ if (prevSize === 0 && (state.get('default_sensitive') || state.get('spoiler'))) {
+ map.set('sensitive', true);
+ }
+ });
+};
+
+function removeMedia(state, mediaId) {
+ const media = state.get('media_attachments').find(item => item.get('id') === mediaId);
+ const prevSize = state.get('media_attachments').size;
+
+ return state.withMutations(map => {
+ map.update('media_attachments', list => list.filterNot(item => item.get('id') === mediaId));
+ map.update('text', text => text.replace(media.get('text_url'), '').trim());
+ map.set('idempotencyKey', uuid());
+
+ if (prevSize === 1) {
+ map.set('sensitive', false);
+ }
+ });
+};
+
+const insertSuggestion = (state, position, token, completion) => {
+ return state.withMutations(map => {
+ map.update('text', oldText => `${oldText.slice(0, position)}${completion} ${oldText.slice(position + token.length)}`);
+ map.set('suggestion_token', null);
+ map.update('suggestions', ImmutableList(), list => list.clear());
+ map.set('focusDate', new Date());
+ map.set('idempotencyKey', uuid());
+ });
+};
+
+const insertEmoji = (state, position, emojiData) => {
+ const emoji = emojiData.native;
+
+ return state.withMutations(map => {
+ map.update('text', oldText => `${oldText.slice(0, position)}${emoji} ${oldText.slice(position)}`);
+ map.set('focusDate', new Date());
+ map.set('idempotencyKey', uuid());
+ });
+};
+
+const privacyPreference = (a, b) => {
+ if (a === 'direct' || b === 'direct') {
+ return 'direct';
+ } else if (a === 'private' || b === 'private') {
+ return 'private';
+ } else if (a === 'unlisted' || b === 'unlisted') {
+ return 'unlisted';
+ } else {
+ return 'public';
+ }
+};
+
+const hydrate = (state, hydratedState) => {
+ state = clearAll(state.merge(hydratedState));
+
+ if (hydratedState.has('text')) {
+ state = state.set('text', hydratedState.get('text'));
+ }
+
+ return state;
+};
+
+export default function compose(state = initialState, action) {
+ switch(action.type) {
+ case STORE_HYDRATE:
+ return hydrate(state, action.state.get('compose'));
+ case COMPOSE_MOUNT:
+ return state.set('mounted', true);
+ case COMPOSE_UNMOUNT:
+ return state
+ .set('mounted', false)
+ .set('is_composing', false);
+ case COMPOSE_SENSITIVITY_CHANGE:
+ return state.withMutations(map => {
+ if (!state.get('spoiler')) {
+ map.set('sensitive', !state.get('sensitive'));
+ }
+
+ map.set('idempotencyKey', uuid());
+ });
+ case COMPOSE_SPOILERNESS_CHANGE:
+ return state.withMutations(map => {
+ map.set('spoiler_text', '');
+ map.set('spoiler', !state.get('spoiler'));
+ map.set('idempotencyKey', uuid());
+
+ if (!state.get('sensitive') && state.get('media_attachments').size >= 1) {
+ map.set('sensitive', true);
+ }
+ });
+ case COMPOSE_SPOILER_TEXT_CHANGE:
+ return state
+ .set('spoiler_text', action.text)
+ .set('idempotencyKey', uuid());
+ case COMPOSE_VISIBILITY_CHANGE:
+ return state
+ .set('privacy', action.value)
+ .set('idempotencyKey', uuid());
+ case COMPOSE_CHANGE:
+ return state
+ .set('text', action.text)
+ .set('idempotencyKey', uuid());
+ case COMPOSE_COMPOSING_CHANGE:
+ return state.set('is_composing', action.value);
+ case COMPOSE_REPLY:
+ return state.withMutations(map => {
+ map.set('in_reply_to', action.status.get('id'));
+ map.set('text', statusToTextMentions(state, action.status));
+ map.set('privacy', privacyPreference(action.status.get('visibility'), state.get('default_privacy')));
+ map.set('focusDate', new Date());
+ map.set('preselectDate', new Date());
+ map.set('idempotencyKey', uuid());
+
+ if (action.status.get('spoiler_text').length > 0) {
+ map.set('spoiler', true);
+ map.set('spoiler_text', action.status.get('spoiler_text'));
+ } else {
+ map.set('spoiler', false);
+ map.set('spoiler_text', '');
+ }
+ });
+ case COMPOSE_REPLY_CANCEL:
+ case COMPOSE_RESET:
+ return state.withMutations(map => {
+ map.set('in_reply_to', null);
+ map.set('text', '');
+ map.set('spoiler', false);
+ map.set('spoiler_text', '');
+ map.set('privacy', state.get('default_privacy'));
+ map.set('idempotencyKey', uuid());
+ });
+ case COMPOSE_SUBMIT_REQUEST:
+ case COMPOSE_UPLOAD_CHANGE_REQUEST:
+ return state.set('is_submitting', true);
+ case COMPOSE_SUBMIT_SUCCESS:
+ return clearAll(state);
+ case COMPOSE_SUBMIT_FAIL:
+ case COMPOSE_UPLOAD_CHANGE_FAIL:
+ return state.set('is_submitting', false);
+ case COMPOSE_UPLOAD_REQUEST:
+ return state.set('is_uploading', true);
+ case COMPOSE_UPLOAD_SUCCESS:
+ return appendMedia(state, fromJS(action.media));
+ case COMPOSE_UPLOAD_FAIL:
+ return state.set('is_uploading', false);
+ case COMPOSE_UPLOAD_UNDO:
+ return removeMedia(state, action.media_id);
+ case COMPOSE_UPLOAD_PROGRESS:
+ return state.set('progress', Math.round((action.loaded / action.total) * 100));
+ case COMPOSE_MENTION:
+ return state
+ .update('text', text => `${text}@${action.account.get('acct')} `)
+ .set('focusDate', new Date())
+ .set('idempotencyKey', uuid());
+ case COMPOSE_SUGGESTIONS_CLEAR:
+ return state.update('suggestions', ImmutableList(), list => list.clear()).set('suggestion_token', null);
+ case COMPOSE_SUGGESTIONS_READY:
+ return state.set('suggestions', ImmutableList(action.accounts ? action.accounts.map(item => item.id) : action.emojis)).set('suggestion_token', action.token);
+ case COMPOSE_SUGGESTION_SELECT:
+ return insertSuggestion(state, action.position, action.token, action.completion);
+ case TIMELINE_DELETE:
+ if (action.id === state.get('in_reply_to')) {
+ return state.set('in_reply_to', null);
+ } else {
+ return state;
+ }
+ case COMPOSE_EMOJI_INSERT:
+ return insertEmoji(state, action.position, action.emoji);
+ case COMPOSE_UPLOAD_CHANGE_SUCCESS:
+ return state
+ .set('is_submitting', false)
+ .update('media_attachments', list => list.map(item => {
+ if (item.get('id') === action.media.id) {
+ return item.set('description', action.media.description);
+ }
+
+ return item;
+ }));
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/contexts.js b/app/javascript/mastodon/reducers/contexts.js
new file mode 100644
index 0000000000..64d584a019
--- /dev/null
+++ b/app/javascript/mastodon/reducers/contexts.js
@@ -0,0 +1,61 @@
+import { CONTEXT_FETCH_SUCCESS } from '../actions/statuses';
+import { TIMELINE_DELETE, TIMELINE_CONTEXT_UPDATE } from '../actions/timelines';
+import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
+
+const initialState = ImmutableMap({
+ ancestors: ImmutableMap(),
+ descendants: ImmutableMap(),
+});
+
+const normalizeContext = (state, id, ancestors, descendants) => {
+ const ancestorsIds = ImmutableList(ancestors.map(ancestor => ancestor.id));
+ const descendantsIds = ImmutableList(descendants.map(descendant => descendant.id));
+
+ return state.withMutations(map => {
+ map.setIn(['ancestors', id], ancestorsIds);
+ map.setIn(['descendants', id], descendantsIds);
+ });
+};
+
+const deleteFromContexts = (state, id) => {
+ state.getIn(['descendants', id], ImmutableList()).forEach(descendantId => {
+ state = state.updateIn(['ancestors', descendantId], ImmutableList(), list => list.filterNot(itemId => itemId === id));
+ });
+
+ state.getIn(['ancestors', id], ImmutableList()).forEach(ancestorId => {
+ state = state.updateIn(['descendants', ancestorId], ImmutableList(), list => list.filterNot(itemId => itemId === id));
+ });
+
+ state = state.deleteIn(['descendants', id]).deleteIn(['ancestors', id]);
+
+ return state;
+};
+
+const updateContext = (state, status, references) => {
+ return state.update('descendants', map => {
+ references.forEach(parentId => {
+ map = map.update(parentId, ImmutableList(), list => {
+ if (list.includes(status.id)) {
+ return list;
+ }
+
+ return list.push(status.id);
+ });
+ });
+
+ return map;
+ });
+};
+
+export default function contexts(state = initialState, action) {
+ switch(action.type) {
+ case CONTEXT_FETCH_SUCCESS:
+ return normalizeContext(state, action.id, action.ancestors, action.descendants);
+ case TIMELINE_DELETE:
+ return deleteFromContexts(state, action.id);
+ case TIMELINE_CONTEXT_UPDATE:
+ return updateContext(state, action.status, action.references);
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/custom_emojis.js b/app/javascript/mastodon/reducers/custom_emojis.js
new file mode 100644
index 0000000000..307bcc7dc4
--- /dev/null
+++ b/app/javascript/mastodon/reducers/custom_emojis.js
@@ -0,0 +1,16 @@
+import { List as ImmutableList } from 'immutable';
+import { STORE_HYDRATE } from '../actions/store';
+import { search as emojiSearch } from '../features/emoji/emoji_mart_search_light';
+import { buildCustomEmojis } from '../features/emoji/emoji';
+
+const initialState = ImmutableList();
+
+export default function custom_emojis(state = initialState, action) {
+ switch(action.type) {
+ case STORE_HYDRATE:
+ emojiSearch('', { custom: buildCustomEmojis(action.state.get('custom_emojis', [])) });
+ return action.state.get('custom_emojis');
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/height_cache.js b/app/javascript/mastodon/reducers/height_cache.js
new file mode 100644
index 0000000000..2f5716fae9
--- /dev/null
+++ b/app/javascript/mastodon/reducers/height_cache.js
@@ -0,0 +1,23 @@
+import { Map as ImmutableMap } from 'immutable';
+import { HEIGHT_CACHE_SET, HEIGHT_CACHE_CLEAR } from '../actions/height_cache';
+
+const initialState = ImmutableMap();
+
+const setHeight = (state, key, id, height) => {
+ return state.update(key, ImmutableMap(), map => map.set(id, height));
+};
+
+const clearHeights = () => {
+ return ImmutableMap();
+};
+
+export default function statuses(state = initialState, action) {
+ switch(action.type) {
+ case HEIGHT_CACHE_SET:
+ return setHeight(state, action.key, action.id, action.height);
+ case HEIGHT_CACHE_CLEAR:
+ return clearHeights();
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/index.js b/app/javascript/mastodon/reducers/index.js
new file mode 100644
index 0000000000..17c8703515
--- /dev/null
+++ b/app/javascript/mastodon/reducers/index.js
@@ -0,0 +1,52 @@
+import { combineReducers } from 'redux-immutable';
+import timelines from './timelines';
+import meta from './meta';
+import alerts from './alerts';
+import { loadingBarReducer } from 'react-redux-loading-bar';
+import modal from './modal';
+import user_lists from './user_lists';
+import accounts from './accounts';
+import accounts_counters from './accounts_counters';
+import statuses from './statuses';
+import relationships from './relationships';
+import settings from './settings';
+import push_notifications from './push_notifications';
+import status_lists from './status_lists';
+import cards from './cards';
+import mutes from './mutes';
+import reports from './reports';
+import contexts from './contexts';
+import compose from './compose';
+import search from './search';
+import media_attachments from './media_attachments';
+import notifications from './notifications';
+import height_cache from './height_cache';
+import custom_emojis from './custom_emojis';
+
+const reducers = {
+ timelines,
+ meta,
+ alerts,
+ loadingBar: loadingBarReducer,
+ modal,
+ user_lists,
+ status_lists,
+ accounts,
+ accounts_counters,
+ statuses,
+ relationships,
+ settings,
+ push_notifications,
+ cards,
+ mutes,
+ reports,
+ contexts,
+ compose,
+ search,
+ media_attachments,
+ notifications,
+ height_cache,
+ custom_emojis,
+};
+
+export default combineReducers(reducers);
diff --git a/app/javascript/mastodon/reducers/media_attachments.js b/app/javascript/mastodon/reducers/media_attachments.js
new file mode 100644
index 0000000000..24119f6286
--- /dev/null
+++ b/app/javascript/mastodon/reducers/media_attachments.js
@@ -0,0 +1,15 @@
+import { STORE_HYDRATE } from '../actions/store';
+import { Map as ImmutableMap } from 'immutable';
+
+const initialState = ImmutableMap({
+ accept_content_types: [],
+});
+
+export default function meta(state = initialState, action) {
+ switch(action.type) {
+ case STORE_HYDRATE:
+ return state.merge(action.state.get('media_attachments'));
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/meta.js b/app/javascript/mastodon/reducers/meta.js
new file mode 100644
index 0000000000..36a5a1c354
--- /dev/null
+++ b/app/javascript/mastodon/reducers/meta.js
@@ -0,0 +1,16 @@
+import { STORE_HYDRATE } from '../actions/store';
+import { Map as ImmutableMap } from 'immutable';
+
+const initialState = ImmutableMap({
+ streaming_api_base_url: null,
+ access_token: null,
+});
+
+export default function meta(state = initialState, action) {
+ switch(action.type) {
+ case STORE_HYDRATE:
+ return state.merge(action.state.get('meta'));
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/modal.js b/app/javascript/mastodon/reducers/modal.js
new file mode 100644
index 0000000000..599a2443e0
--- /dev/null
+++ b/app/javascript/mastodon/reducers/modal.js
@@ -0,0 +1,17 @@
+import { MODAL_OPEN, MODAL_CLOSE } from '../actions/modal';
+
+const initialState = {
+ modalType: null,
+ modalProps: {},
+};
+
+export default function modal(state = initialState, action) {
+ switch(action.type) {
+ case MODAL_OPEN:
+ return { modalType: action.modalType, modalProps: action.modalProps };
+ case MODAL_CLOSE:
+ return initialState;
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/mutes.js b/app/javascript/mastodon/reducers/mutes.js
new file mode 100644
index 0000000000..a96232dbd2
--- /dev/null
+++ b/app/javascript/mastodon/reducers/mutes.js
@@ -0,0 +1,29 @@
+import Immutable from 'immutable';
+
+import {
+ MUTES_INIT_MODAL,
+ MUTES_TOGGLE_HIDE_NOTIFICATIONS,
+} from '../actions/mutes';
+
+const initialState = Immutable.Map({
+ new: Immutable.Map({
+ isSubmitting: false,
+ account: null,
+ notifications: true,
+ }),
+});
+
+export default function mutes(state = initialState, action) {
+ switch (action.type) {
+ case MUTES_INIT_MODAL:
+ return state.withMutations((state) => {
+ state.setIn(['new', 'isSubmitting'], false);
+ state.setIn(['new', 'account'], action.account);
+ state.setIn(['new', 'notifications'], true);
+ });
+ case MUTES_TOGGLE_HIDE_NOTIFICATIONS:
+ return state.updateIn(['new', 'notifications'], (old) => !old);
+ default:
+ return state;
+ }
+}
diff --git a/app/javascript/mastodon/reducers/notifications.js b/app/javascript/mastodon/reducers/notifications.js
new file mode 100644
index 0000000000..264db4f558
--- /dev/null
+++ b/app/javascript/mastodon/reducers/notifications.js
@@ -0,0 +1,124 @@
+import {
+ NOTIFICATIONS_UPDATE,
+ NOTIFICATIONS_REFRESH_SUCCESS,
+ NOTIFICATIONS_EXPAND_SUCCESS,
+ NOTIFICATIONS_REFRESH_REQUEST,
+ NOTIFICATIONS_EXPAND_REQUEST,
+ NOTIFICATIONS_REFRESH_FAIL,
+ NOTIFICATIONS_EXPAND_FAIL,
+ NOTIFICATIONS_CLEAR,
+ NOTIFICATIONS_SCROLL_TOP,
+} from '../actions/notifications';
+import {
+ ACCOUNT_BLOCK_SUCCESS,
+ ACCOUNT_MUTE_SUCCESS,
+} from '../actions/accounts';
+import { TIMELINE_DELETE } from '../actions/timelines';
+import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
+
+const initialState = ImmutableMap({
+ items: ImmutableList(),
+ next: null,
+ top: true,
+ unread: 0,
+ loaded: false,
+ isLoading: true,
+});
+
+const notificationToMap = notification => ImmutableMap({
+ id: notification.id,
+ type: notification.type,
+ account: notification.account.id,
+ status: notification.status ? notification.status.id : null,
+});
+
+const normalizeNotification = (state, notification) => {
+ const top = state.get('top');
+
+ if (!top) {
+ state = state.update('unread', unread => unread + 1);
+ }
+
+ return state.update('items', list => {
+ if (top && list.size > 40) {
+ list = list.take(20);
+ }
+
+ return list.unshift(notificationToMap(notification));
+ });
+};
+
+const normalizeNotifications = (state, notifications, next) => {
+ let items = ImmutableList();
+ const loaded = state.get('loaded');
+
+ notifications.forEach((n, i) => {
+ items = items.set(i, notificationToMap(n));
+ });
+
+ if (state.get('next') === null) {
+ state = state.set('next', next);
+ }
+
+ return state
+ .update('items', list => loaded ? items.concat(list) : list.concat(items))
+ .set('loaded', true)
+ .set('isLoading', false);
+};
+
+const appendNormalizedNotifications = (state, notifications, next) => {
+ let items = ImmutableList();
+
+ notifications.forEach((n, i) => {
+ items = items.set(i, notificationToMap(n));
+ });
+
+ return state
+ .update('items', list => list.concat(items))
+ .set('next', next)
+ .set('isLoading', false);
+};
+
+const filterNotifications = (state, relationship) => {
+ return state.update('items', list => list.filterNot(item => item.get('account') === relationship.id));
+};
+
+const updateTop = (state, top) => {
+ if (top) {
+ state = state.set('unread', 0);
+ }
+
+ return state.set('top', top);
+};
+
+const deleteByStatus = (state, statusId) => {
+ return state.update('items', list => list.filterNot(item => item.get('status') === statusId));
+};
+
+export default function notifications(state = initialState, action) {
+ switch(action.type) {
+ case NOTIFICATIONS_REFRESH_REQUEST:
+ case NOTIFICATIONS_EXPAND_REQUEST:
+ return state.set('isLoading', true);
+ case NOTIFICATIONS_REFRESH_FAIL:
+ case NOTIFICATIONS_EXPAND_FAIL:
+ return state.set('isLoading', false);
+ case NOTIFICATIONS_SCROLL_TOP:
+ return updateTop(state, action.top);
+ case NOTIFICATIONS_UPDATE:
+ return normalizeNotification(state, action.notification);
+ case NOTIFICATIONS_REFRESH_SUCCESS:
+ return normalizeNotifications(state, action.notifications, action.next);
+ case NOTIFICATIONS_EXPAND_SUCCESS:
+ return appendNormalizedNotifications(state, action.notifications, action.next);
+ case ACCOUNT_BLOCK_SUCCESS:
+ case ACCOUNT_MUTE_SUCCESS:
+ return filterNotifications(state, action.relationship);
+ case NOTIFICATIONS_CLEAR:
+ return state.set('items', ImmutableList()).set('next', null);
+ case TIMELINE_DELETE:
+ return deleteByStatus(state, action.id);
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/push_notifications.js b/app/javascript/mastodon/reducers/push_notifications.js
new file mode 100644
index 0000000000..31a40d2461
--- /dev/null
+++ b/app/javascript/mastodon/reducers/push_notifications.js
@@ -0,0 +1,51 @@
+import { STORE_HYDRATE } from '../actions/store';
+import { SET_BROWSER_SUPPORT, SET_SUBSCRIPTION, CLEAR_SUBSCRIPTION, ALERTS_CHANGE } from '../actions/push_notifications';
+import Immutable from 'immutable';
+
+const initialState = Immutable.Map({
+ subscription: null,
+ alerts: new Immutable.Map({
+ follow: false,
+ favourite: false,
+ reblog: false,
+ mention: false,
+ }),
+ isSubscribed: false,
+ browserSupport: false,
+});
+
+export default function push_subscriptions(state = initialState, action) {
+ switch(action.type) {
+ case STORE_HYDRATE: {
+ const push_subscription = action.state.get('push_subscription');
+
+ if (push_subscription) {
+ return state
+ .set('subscription', new Immutable.Map({
+ id: push_subscription.get('id'),
+ endpoint: push_subscription.get('endpoint'),
+ }))
+ .set('alerts', push_subscription.get('alerts') || initialState.get('alerts'))
+ .set('isSubscribed', true);
+ }
+
+ return state;
+ }
+ case SET_SUBSCRIPTION:
+ return state
+ .set('subscription', new Immutable.Map({
+ id: action.subscription.id,
+ endpoint: action.subscription.endpoint,
+ }))
+ .set('alerts', new Immutable.Map(action.subscription.alerts))
+ .set('isSubscribed', true);
+ case SET_BROWSER_SUPPORT:
+ return state.set('browserSupport', action.value);
+ case CLEAR_SUBSCRIPTION:
+ return initialState;
+ case ALERTS_CHANGE:
+ return state.setIn(action.key, action.value);
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/relationships.js b/app/javascript/mastodon/reducers/relationships.js
new file mode 100644
index 0000000000..c7b04a6683
--- /dev/null
+++ b/app/javascript/mastodon/reducers/relationships.js
@@ -0,0 +1,46 @@
+import {
+ ACCOUNT_FOLLOW_SUCCESS,
+ ACCOUNT_UNFOLLOW_SUCCESS,
+ ACCOUNT_BLOCK_SUCCESS,
+ ACCOUNT_UNBLOCK_SUCCESS,
+ ACCOUNT_MUTE_SUCCESS,
+ ACCOUNT_UNMUTE_SUCCESS,
+ RELATIONSHIPS_FETCH_SUCCESS,
+} from '../actions/accounts';
+import {
+ DOMAIN_BLOCK_SUCCESS,
+ DOMAIN_UNBLOCK_SUCCESS,
+} from '../actions/domain_blocks';
+import { Map as ImmutableMap, fromJS } from 'immutable';
+
+const normalizeRelationship = (state, relationship) => state.set(relationship.id, fromJS(relationship));
+
+const normalizeRelationships = (state, relationships) => {
+ relationships.forEach(relationship => {
+ state = normalizeRelationship(state, relationship);
+ });
+
+ return state;
+};
+
+const initialState = ImmutableMap();
+
+export default function relationships(state = initialState, action) {
+ switch(action.type) {
+ case ACCOUNT_FOLLOW_SUCCESS:
+ case ACCOUNT_UNFOLLOW_SUCCESS:
+ case ACCOUNT_BLOCK_SUCCESS:
+ case ACCOUNT_UNBLOCK_SUCCESS:
+ case ACCOUNT_MUTE_SUCCESS:
+ case ACCOUNT_UNMUTE_SUCCESS:
+ return normalizeRelationship(state, action.relationship);
+ case RELATIONSHIPS_FETCH_SUCCESS:
+ return normalizeRelationships(state, action.relationships);
+ case DOMAIN_BLOCK_SUCCESS:
+ return state.setIn([action.accountId, 'domain_blocking'], true);
+ case DOMAIN_UNBLOCK_SUCCESS:
+ return state.setIn([action.accountId, 'domain_blocking'], false);
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/reports.js b/app/javascript/mastodon/reducers/reports.js
new file mode 100644
index 0000000000..a08bbec387
--- /dev/null
+++ b/app/javascript/mastodon/reducers/reports.js
@@ -0,0 +1,60 @@
+import {
+ REPORT_INIT,
+ REPORT_SUBMIT_REQUEST,
+ REPORT_SUBMIT_SUCCESS,
+ REPORT_SUBMIT_FAIL,
+ REPORT_CANCEL,
+ REPORT_STATUS_TOGGLE,
+ REPORT_COMMENT_CHANGE,
+} from '../actions/reports';
+import { Map as ImmutableMap, Set as ImmutableSet } from 'immutable';
+
+const initialState = ImmutableMap({
+ new: ImmutableMap({
+ isSubmitting: false,
+ account_id: null,
+ status_ids: ImmutableSet(),
+ comment: '',
+ }),
+});
+
+export default function reports(state = initialState, action) {
+ switch(action.type) {
+ case REPORT_INIT:
+ return state.withMutations(map => {
+ map.setIn(['new', 'isSubmitting'], false);
+ map.setIn(['new', 'account_id'], action.account.get('id'));
+
+ if (state.getIn(['new', 'account_id']) !== action.account.get('id')) {
+ map.setIn(['new', 'status_ids'], action.status ? ImmutableSet([action.status.getIn(['reblog', 'id'], action.status.get('id'))]) : ImmutableSet());
+ map.setIn(['new', 'comment'], '');
+ } else if (action.status) {
+ map.updateIn(['new', 'status_ids'], ImmutableSet(), set => set.add(action.status.getIn(['reblog', 'id'], action.status.get('id'))));
+ }
+ });
+ case REPORT_STATUS_TOGGLE:
+ return state.updateIn(['new', 'status_ids'], ImmutableSet(), set => {
+ if (action.checked) {
+ return set.add(action.statusId);
+ }
+
+ return set.remove(action.statusId);
+ });
+ case REPORT_COMMENT_CHANGE:
+ return state.setIn(['new', 'comment'], action.comment);
+ case REPORT_SUBMIT_REQUEST:
+ return state.setIn(['new', 'isSubmitting'], true);
+ case REPORT_SUBMIT_FAIL:
+ return state.setIn(['new', 'isSubmitting'], false);
+ case REPORT_CANCEL:
+ case REPORT_SUBMIT_SUCCESS:
+ return state.withMutations(map => {
+ map.setIn(['new', 'account_id'], null);
+ map.setIn(['new', 'status_ids'], ImmutableSet());
+ map.setIn(['new', 'comment'], '');
+ map.setIn(['new', 'isSubmitting'], false);
+ });
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/search.js b/app/javascript/mastodon/reducers/search.js
new file mode 100644
index 0000000000..08d90e4e83
--- /dev/null
+++ b/app/javascript/mastodon/reducers/search.js
@@ -0,0 +1,42 @@
+import {
+ SEARCH_CHANGE,
+ SEARCH_CLEAR,
+ SEARCH_FETCH_SUCCESS,
+ SEARCH_SHOW,
+} from '../actions/search';
+import { COMPOSE_MENTION, COMPOSE_REPLY } from '../actions/compose';
+import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
+
+const initialState = ImmutableMap({
+ value: '',
+ submitted: false,
+ hidden: false,
+ results: ImmutableMap(),
+});
+
+export default function search(state = initialState, action) {
+ switch(action.type) {
+ case SEARCH_CHANGE:
+ return state.set('value', action.value);
+ case SEARCH_CLEAR:
+ return state.withMutations(map => {
+ map.set('value', '');
+ map.set('results', ImmutableMap());
+ map.set('submitted', false);
+ map.set('hidden', false);
+ });
+ case SEARCH_SHOW:
+ return state.set('hidden', false);
+ case COMPOSE_REPLY:
+ case COMPOSE_MENTION:
+ return state.set('hidden', true);
+ case SEARCH_FETCH_SUCCESS:
+ return state.set('results', ImmutableMap({
+ accounts: ImmutableList(action.results.accounts.map(item => item.id)),
+ statuses: ImmutableList(action.results.statuses.map(item => item.id)),
+ hashtags: ImmutableList(action.results.hashtags),
+ })).set('submitted', true);
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/settings.js b/app/javascript/mastodon/reducers/settings.js
new file mode 100644
index 0000000000..a9f3f95296
--- /dev/null
+++ b/app/javascript/mastodon/reducers/settings.js
@@ -0,0 +1,112 @@
+import { SETTING_CHANGE, SETTING_SAVE } from '../actions/settings';
+import { COLUMN_ADD, COLUMN_REMOVE, COLUMN_MOVE } from '../actions/columns';
+import { STORE_HYDRATE } from '../actions/store';
+import { EMOJI_USE } from '../actions/emojis';
+import { Map as ImmutableMap, fromJS } from 'immutable';
+import uuid from '../uuid';
+
+const initialState = ImmutableMap({
+ saved: true,
+
+ onboarded: false,
+
+ skinTone: 1,
+
+ home: ImmutableMap({
+ shows: ImmutableMap({
+ reblog: true,
+ reply: true,
+ }),
+
+ regex: ImmutableMap({
+ body: '',
+ }),
+ }),
+
+ notifications: ImmutableMap({
+ alerts: ImmutableMap({
+ follow: true,
+ favourite: true,
+ reblog: true,
+ mention: true,
+ }),
+
+ shows: ImmutableMap({
+ follow: true,
+ favourite: true,
+ reblog: true,
+ mention: true,
+ }),
+
+ sounds: ImmutableMap({
+ follow: true,
+ favourite: true,
+ reblog: true,
+ mention: true,
+ }),
+ }),
+
+ community: ImmutableMap({
+ regex: ImmutableMap({
+ body: '',
+ }),
+ }),
+
+ public: ImmutableMap({
+ regex: ImmutableMap({
+ body: '',
+ }),
+ }),
+});
+
+const defaultColumns = fromJS([
+ { id: 'COMPOSE', uuid: uuid(), params: {} },
+ { id: 'HOME', uuid: uuid(), params: {} },
+ { id: 'NOTIFICATIONS', uuid: uuid(), params: {} },
+]);
+
+const hydrate = (state, settings) => state.mergeDeep(settings).update('columns', (val = defaultColumns) => val);
+
+const moveColumn = (state, uuid, direction) => {
+ const columns = state.get('columns');
+ const index = columns.findIndex(item => item.get('uuid') === uuid);
+ const newIndex = index + direction;
+
+ let newColumns;
+
+ newColumns = columns.splice(index, 1);
+ newColumns = newColumns.splice(newIndex, 0, columns.get(index));
+
+ return state
+ .set('columns', newColumns)
+ .set('saved', false);
+};
+
+const updateFrequentEmojis = (state, emoji) => state.update('frequentlyUsedEmojis', ImmutableMap(), map => map.update(emoji.id, 0, count => count + 1)).set('saved', false);
+
+export default function settings(state = initialState, action) {
+ switch(action.type) {
+ case STORE_HYDRATE:
+ return hydrate(state, action.state.get('settings'));
+ case SETTING_CHANGE:
+ return state
+ .setIn(action.key, action.value)
+ .set('saved', false);
+ case COLUMN_ADD:
+ return state
+ .update('columns', list => list.push(fromJS({ id: action.id, uuid: uuid(), params: action.params })))
+ .set('saved', false);
+ case COLUMN_REMOVE:
+ return state
+ .update('columns', list => list.filterNot(item => item.get('uuid') === action.uuid))
+ .set('saved', false);
+ case COLUMN_MOVE:
+ return moveColumn(state, action.uuid, action.direction);
+ case EMOJI_USE:
+ return updateFrequentEmojis(state, action.emoji);
+ case SETTING_SAVE:
+ return state.set('saved', true);
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/status_lists.js b/app/javascript/mastodon/reducers/status_lists.js
new file mode 100644
index 0000000000..c4aeb338f4
--- /dev/null
+++ b/app/javascript/mastodon/reducers/status_lists.js
@@ -0,0 +1,75 @@
+import {
+ FAVOURITED_STATUSES_FETCH_SUCCESS,
+ FAVOURITED_STATUSES_EXPAND_SUCCESS,
+} from '../actions/favourites';
+import {
+ PINNED_STATUSES_FETCH_SUCCESS,
+} from '../actions/pin_statuses';
+import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
+import {
+ FAVOURITE_SUCCESS,
+ UNFAVOURITE_SUCCESS,
+ PIN_SUCCESS,
+ UNPIN_SUCCESS,
+} from '../actions/interactions';
+
+const initialState = ImmutableMap({
+ favourites: ImmutableMap({
+ next: null,
+ loaded: false,
+ items: ImmutableList(),
+ }),
+ pins: ImmutableMap({
+ next: null,
+ loaded: false,
+ items: ImmutableList(),
+ }),
+});
+
+const normalizeList = (state, listType, statuses, next) => {
+ return state.update(listType, listMap => listMap.withMutations(map => {
+ map.set('next', next);
+ map.set('loaded', true);
+ map.set('items', ImmutableList(statuses.map(item => item.id)));
+ }));
+};
+
+const appendToList = (state, listType, statuses, next) => {
+ return state.update(listType, listMap => listMap.withMutations(map => {
+ map.set('next', next);
+ map.set('items', map.get('items').concat(statuses.map(item => item.id)));
+ }));
+};
+
+const prependOneToList = (state, listType, status) => {
+ return state.update(listType, listMap => listMap.withMutations(map => {
+ map.set('items', map.get('items').unshift(status.get('id')));
+ }));
+};
+
+const removeOneFromList = (state, listType, status) => {
+ return state.update(listType, listMap => listMap.withMutations(map => {
+ map.set('items', map.get('items').filter(item => item !== status.get('id')));
+ }));
+};
+
+export default function statusLists(state = initialState, action) {
+ switch(action.type) {
+ case FAVOURITED_STATUSES_FETCH_SUCCESS:
+ return normalizeList(state, 'favourites', action.statuses, action.next);
+ case FAVOURITED_STATUSES_EXPAND_SUCCESS:
+ return appendToList(state, 'favourites', action.statuses, action.next);
+ case FAVOURITE_SUCCESS:
+ return prependOneToList(state, 'favourites', action.status);
+ case UNFAVOURITE_SUCCESS:
+ return removeOneFromList(state, 'favourites', action.status);
+ case PINNED_STATUSES_FETCH_SUCCESS:
+ return normalizeList(state, 'pins', action.statuses, action.next);
+ case PIN_SUCCESS:
+ return prependOneToList(state, 'pins', action.status);
+ case UNPIN_SUCCESS:
+ return removeOneFromList(state, 'pins', action.status);
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/statuses.js b/app/javascript/mastodon/reducers/statuses.js
new file mode 100644
index 0000000000..b1fb4c5da3
--- /dev/null
+++ b/app/javascript/mastodon/reducers/statuses.js
@@ -0,0 +1,148 @@
+import {
+ REBLOG_REQUEST,
+ REBLOG_SUCCESS,
+ REBLOG_FAIL,
+ UNREBLOG_SUCCESS,
+ FAVOURITE_REQUEST,
+ FAVOURITE_SUCCESS,
+ FAVOURITE_FAIL,
+ UNFAVOURITE_SUCCESS,
+ PIN_SUCCESS,
+ UNPIN_SUCCESS,
+} from '../actions/interactions';
+import {
+ STATUS_FETCH_SUCCESS,
+ CONTEXT_FETCH_SUCCESS,
+ STATUS_MUTE_SUCCESS,
+ STATUS_UNMUTE_SUCCESS,
+} from '../actions/statuses';
+import {
+ TIMELINE_REFRESH_SUCCESS,
+ TIMELINE_UPDATE,
+ TIMELINE_DELETE,
+ TIMELINE_EXPAND_SUCCESS,
+} from '../actions/timelines';
+import {
+ ACCOUNT_BLOCK_SUCCESS,
+ ACCOUNT_MUTE_SUCCESS,
+} from '../actions/accounts';
+import {
+ NOTIFICATIONS_UPDATE,
+ NOTIFICATIONS_REFRESH_SUCCESS,
+ NOTIFICATIONS_EXPAND_SUCCESS,
+} from '../actions/notifications';
+import {
+ FAVOURITED_STATUSES_FETCH_SUCCESS,
+ FAVOURITED_STATUSES_EXPAND_SUCCESS,
+} from '../actions/favourites';
+import {
+ PINNED_STATUSES_FETCH_SUCCESS,
+} from '../actions/pin_statuses';
+import { SEARCH_FETCH_SUCCESS } from '../actions/search';
+import emojify from '../features/emoji/emoji';
+import { Map as ImmutableMap, fromJS } from 'immutable';
+import escapeTextContentForBrowser from 'escape-html';
+
+const domParser = new DOMParser();
+
+const normalizeStatus = (state, status) => {
+ if (!status) {
+ return state;
+ }
+
+ const normalStatus = { ...status };
+ normalStatus.account = status.account.id;
+
+ if (status.reblog && status.reblog.id) {
+ state = normalizeStatus(state, status.reblog);
+ normalStatus.reblog = status.reblog.id;
+ }
+
+ const searchContent = [status.spoiler_text, status.content].join('\n\n').replace(/
/g, '\n').replace(/<\/p>/g, '\n\n');
+
+ const emojiMap = normalStatus.emojis.reduce((obj, emoji) => {
+ obj[`:${emoji.shortcode}:`] = emoji;
+ return obj;
+ }, {});
+
+ normalStatus.search_index = domParser.parseFromString(searchContent, 'text/html').documentElement.textContent;
+ normalStatus.contentHtml = emojify(normalStatus.content, emojiMap);
+ normalStatus.spoilerHtml = emojify(escapeTextContentForBrowser(normalStatus.spoiler_text || ''), emojiMap);
+
+ return state.update(status.id, ImmutableMap(), map => map.mergeDeep(fromJS(normalStatus)));
+};
+
+const normalizeStatuses = (state, statuses) => {
+ statuses.forEach(status => {
+ state = normalizeStatus(state, status);
+ });
+
+ return state;
+};
+
+const deleteStatus = (state, id, references) => {
+ references.forEach(ref => {
+ state = deleteStatus(state, ref[0], []);
+ });
+
+ return state.delete(id);
+};
+
+const filterStatuses = (state, relationship) => {
+ state.forEach(status => {
+ if (status.get('account') !== relationship.id) {
+ return;
+ }
+
+ state = deleteStatus(state, status.get('id'), state.filter(item => item.get('reblog') === status.get('id')));
+ });
+
+ return state;
+};
+
+const initialState = ImmutableMap();
+
+export default function statuses(state = initialState, action) {
+ switch(action.type) {
+ case TIMELINE_UPDATE:
+ case STATUS_FETCH_SUCCESS:
+ case NOTIFICATIONS_UPDATE:
+ return normalizeStatus(state, action.status);
+ case REBLOG_SUCCESS:
+ case UNREBLOG_SUCCESS:
+ case FAVOURITE_SUCCESS:
+ case UNFAVOURITE_SUCCESS:
+ case PIN_SUCCESS:
+ case UNPIN_SUCCESS:
+ return normalizeStatus(state, action.response);
+ case FAVOURITE_REQUEST:
+ return state.setIn([action.status.get('id'), 'favourited'], true);
+ case FAVOURITE_FAIL:
+ return state.setIn([action.status.get('id'), 'favourited'], false);
+ case REBLOG_REQUEST:
+ return state.setIn([action.status.get('id'), 'reblogged'], true);
+ case REBLOG_FAIL:
+ return state.setIn([action.status.get('id'), 'reblogged'], false);
+ case STATUS_MUTE_SUCCESS:
+ return state.setIn([action.id, 'muted'], true);
+ case STATUS_UNMUTE_SUCCESS:
+ return state.setIn([action.id, 'muted'], false);
+ case TIMELINE_REFRESH_SUCCESS:
+ case TIMELINE_EXPAND_SUCCESS:
+ case CONTEXT_FETCH_SUCCESS:
+ case NOTIFICATIONS_REFRESH_SUCCESS:
+ case NOTIFICATIONS_EXPAND_SUCCESS:
+ case FAVOURITED_STATUSES_FETCH_SUCCESS:
+ case FAVOURITED_STATUSES_EXPAND_SUCCESS:
+ case PINNED_STATUSES_FETCH_SUCCESS:
+ case SEARCH_FETCH_SUCCESS:
+ return normalizeStatuses(state, action.statuses);
+ case TIMELINE_DELETE:
+ return deleteStatus(state, action.id, action.references);
+ case ACCOUNT_BLOCK_SUCCESS:
+ case ACCOUNT_MUTE_SUCCESS:
+ return filterStatuses(state, action.relationship);
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/timelines.js b/app/javascript/mastodon/reducers/timelines.js
new file mode 100644
index 0000000000..bee4c4ef92
--- /dev/null
+++ b/app/javascript/mastodon/reducers/timelines.js
@@ -0,0 +1,149 @@
+import {
+ TIMELINE_REFRESH_REQUEST,
+ TIMELINE_REFRESH_SUCCESS,
+ TIMELINE_REFRESH_FAIL,
+ TIMELINE_UPDATE,
+ TIMELINE_DELETE,
+ TIMELINE_EXPAND_SUCCESS,
+ TIMELINE_EXPAND_REQUEST,
+ TIMELINE_EXPAND_FAIL,
+ TIMELINE_SCROLL_TOP,
+ TIMELINE_CONNECT,
+ TIMELINE_DISCONNECT,
+} from '../actions/timelines';
+import {
+ ACCOUNT_BLOCK_SUCCESS,
+ ACCOUNT_MUTE_SUCCESS,
+ ACCOUNT_UNFOLLOW_SUCCESS,
+} from '../actions/accounts';
+import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable';
+
+const initialState = ImmutableMap();
+
+const initialTimeline = ImmutableMap({
+ unread: 0,
+ online: false,
+ top: true,
+ loaded: false,
+ isLoading: false,
+ next: false,
+ items: ImmutableList(),
+});
+
+const normalizeTimeline = (state, timeline, statuses, next) => {
+ const oldIds = state.getIn([timeline, 'items'], ImmutableList());
+ const ids = ImmutableList(statuses.map(status => status.get('id'))).filter(newId => !oldIds.includes(newId));
+ const wasLoaded = state.getIn([timeline, 'loaded']);
+ const hadNext = state.getIn([timeline, 'next']);
+
+ return state.update(timeline, initialTimeline, map => map.withMutations(mMap => {
+ mMap.set('loaded', true);
+ mMap.set('isLoading', false);
+ if (!hadNext) mMap.set('next', next);
+ mMap.set('items', wasLoaded ? ids.concat(oldIds) : ids);
+ }));
+};
+
+const appendNormalizedTimeline = (state, timeline, statuses, next) => {
+ const oldIds = state.getIn([timeline, 'items'], ImmutableList());
+ const ids = ImmutableList(statuses.map(status => status.get('id'))).filter(newId => !oldIds.includes(newId));
+
+ return state.update(timeline, initialTimeline, map => map.withMutations(mMap => {
+ mMap.set('isLoading', false);
+ mMap.set('next', next);
+ mMap.set('items', oldIds.concat(ids));
+ }));
+};
+
+const updateTimeline = (state, timeline, status, references) => {
+ const top = state.getIn([timeline, 'top']);
+ const ids = state.getIn([timeline, 'items'], ImmutableList());
+ const includesId = ids.includes(status.get('id'));
+ const unread = state.getIn([timeline, 'unread'], 0);
+
+ if (includesId) {
+ return state;
+ }
+
+ let newIds = ids;
+
+ return state.update(timeline, initialTimeline, map => map.withMutations(mMap => {
+ if (!top) mMap.set('unread', unread + 1);
+ if (top && ids.size > 40) newIds = newIds.take(20);
+ if (status.getIn(['reblog', 'id'], null) !== null) newIds = newIds.filterNot(item => references.includes(item));
+ mMap.set('items', newIds.unshift(status.get('id')));
+ }));
+};
+
+const deleteStatus = (state, id, accountId, references) => {
+ state.keySeq().forEach(timeline => {
+ state = state.updateIn([timeline, 'items'], list => list.filterNot(item => item === id));
+ });
+
+ // Remove reblogs of deleted status
+ references.forEach(ref => {
+ state = deleteStatus(state, ref[0], ref[1], []);
+ });
+
+ return state;
+};
+
+const filterTimelines = (state, relationship, statuses) => {
+ let references;
+
+ statuses.forEach(status => {
+ if (status.get('account') !== relationship.id) {
+ return;
+ }
+
+ references = statuses.filter(item => item.get('reblog') === status.get('id')).map(item => [item.get('id'), item.get('account')]);
+ state = deleteStatus(state, status.get('id'), status.get('account'), references);
+ });
+
+ return state;
+};
+
+const filterTimeline = (timeline, state, relationship, statuses) =>
+ state.updateIn([timeline, 'items'], ImmutableList(), list =>
+ list.filterNot(statusId =>
+ statuses.getIn([statusId, 'account']) === relationship.id
+ ));
+
+const updateTop = (state, timeline, top) => {
+ return state.update(timeline, initialTimeline, map => map.withMutations(mMap => {
+ if (top) mMap.set('unread', 0);
+ mMap.set('top', top);
+ }));
+};
+
+export default function timelines(state = initialState, action) {
+ switch(action.type) {
+ case TIMELINE_REFRESH_REQUEST:
+ case TIMELINE_EXPAND_REQUEST:
+ return state.update(action.timeline, initialTimeline, map => map.set('isLoading', true));
+ case TIMELINE_REFRESH_FAIL:
+ case TIMELINE_EXPAND_FAIL:
+ return state.update(action.timeline, initialTimeline, map => map.set('isLoading', false));
+ case TIMELINE_REFRESH_SUCCESS:
+ return normalizeTimeline(state, action.timeline, fromJS(action.statuses), action.next);
+ case TIMELINE_EXPAND_SUCCESS:
+ return appendNormalizedTimeline(state, action.timeline, fromJS(action.statuses), action.next);
+ case TIMELINE_UPDATE:
+ return updateTimeline(state, action.timeline, fromJS(action.status), action.references);
+ case TIMELINE_DELETE:
+ return deleteStatus(state, action.id, action.accountId, action.references, action.reblogOf);
+ case ACCOUNT_BLOCK_SUCCESS:
+ case ACCOUNT_MUTE_SUCCESS:
+ return filterTimelines(state, action.relationship, action.statuses);
+ case ACCOUNT_UNFOLLOW_SUCCESS:
+ return filterTimeline('home', state, action.relationship, action.statuses);
+ case TIMELINE_SCROLL_TOP:
+ return updateTop(state, action.timeline, action.top);
+ case TIMELINE_CONNECT:
+ return state.update(action.timeline, initialTimeline, map => map.set('online', true));
+ case TIMELINE_DISCONNECT:
+ return state.update(action.timeline, initialTimeline, map => map.set('online', false));
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/reducers/user_lists.js b/app/javascript/mastodon/reducers/user_lists.js
new file mode 100644
index 0000000000..8db18c5dc6
--- /dev/null
+++ b/app/javascript/mastodon/reducers/user_lists.js
@@ -0,0 +1,80 @@
+import {
+ FOLLOWERS_FETCH_SUCCESS,
+ FOLLOWERS_EXPAND_SUCCESS,
+ FOLLOWING_FETCH_SUCCESS,
+ FOLLOWING_EXPAND_SUCCESS,
+ FOLLOW_REQUESTS_FETCH_SUCCESS,
+ FOLLOW_REQUESTS_EXPAND_SUCCESS,
+ FOLLOW_REQUEST_AUTHORIZE_SUCCESS,
+ FOLLOW_REQUEST_REJECT_SUCCESS,
+} from '../actions/accounts';
+import {
+ REBLOGS_FETCH_SUCCESS,
+ FAVOURITES_FETCH_SUCCESS,
+} from '../actions/interactions';
+import {
+ BLOCKS_FETCH_SUCCESS,
+ BLOCKS_EXPAND_SUCCESS,
+} from '../actions/blocks';
+import {
+ MUTES_FETCH_SUCCESS,
+ MUTES_EXPAND_SUCCESS,
+} from '../actions/mutes';
+import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
+
+const initialState = ImmutableMap({
+ followers: ImmutableMap(),
+ following: ImmutableMap(),
+ reblogged_by: ImmutableMap(),
+ favourited_by: ImmutableMap(),
+ follow_requests: ImmutableMap(),
+ blocks: ImmutableMap(),
+ mutes: ImmutableMap(),
+});
+
+const normalizeList = (state, type, id, accounts, next) => {
+ return state.setIn([type, id], ImmutableMap({
+ next,
+ items: ImmutableList(accounts.map(item => item.id)),
+ }));
+};
+
+const appendToList = (state, type, id, accounts, next) => {
+ return state.updateIn([type, id], map => {
+ return map.set('next', next).update('items', list => list.concat(accounts.map(item => item.id)));
+ });
+};
+
+export default function userLists(state = initialState, action) {
+ switch(action.type) {
+ case FOLLOWERS_FETCH_SUCCESS:
+ return normalizeList(state, 'followers', action.id, action.accounts, action.next);
+ case FOLLOWERS_EXPAND_SUCCESS:
+ return appendToList(state, 'followers', action.id, action.accounts, action.next);
+ case FOLLOWING_FETCH_SUCCESS:
+ return normalizeList(state, 'following', action.id, action.accounts, action.next);
+ case FOLLOWING_EXPAND_SUCCESS:
+ return appendToList(state, 'following', action.id, action.accounts, action.next);
+ case REBLOGS_FETCH_SUCCESS:
+ return state.setIn(['reblogged_by', action.id], ImmutableList(action.accounts.map(item => item.id)));
+ case FAVOURITES_FETCH_SUCCESS:
+ return state.setIn(['favourited_by', action.id], ImmutableList(action.accounts.map(item => item.id)));
+ case FOLLOW_REQUESTS_FETCH_SUCCESS:
+ return state.setIn(['follow_requests', 'items'], ImmutableList(action.accounts.map(item => item.id))).setIn(['follow_requests', 'next'], action.next);
+ case FOLLOW_REQUESTS_EXPAND_SUCCESS:
+ return state.updateIn(['follow_requests', 'items'], list => list.concat(action.accounts.map(item => item.id))).setIn(['follow_requests', 'next'], action.next);
+ case FOLLOW_REQUEST_AUTHORIZE_SUCCESS:
+ case FOLLOW_REQUEST_REJECT_SUCCESS:
+ return state.updateIn(['follow_requests', 'items'], list => list.filterNot(item => item === action.id));
+ case BLOCKS_FETCH_SUCCESS:
+ return state.setIn(['blocks', 'items'], ImmutableList(action.accounts.map(item => item.id))).setIn(['blocks', 'next'], action.next);
+ case BLOCKS_EXPAND_SUCCESS:
+ return state.updateIn(['blocks', 'items'], list => list.concat(action.accounts.map(item => item.id))).setIn(['blocks', 'next'], action.next);
+ case MUTES_FETCH_SUCCESS:
+ return state.setIn(['mutes', 'items'], ImmutableList(action.accounts.map(item => item.id))).setIn(['mutes', 'next'], action.next);
+ case MUTES_EXPAND_SUCCESS:
+ return state.updateIn(['mutes', 'items'], list => list.concat(action.accounts.map(item => item.id))).setIn(['mutes', 'next'], action.next);
+ default:
+ return state;
+ }
+};
diff --git a/app/javascript/mastodon/rtl.js b/app/javascript/mastodon/rtl.js
new file mode 100644
index 0000000000..00870a15d6
--- /dev/null
+++ b/app/javascript/mastodon/rtl.js
@@ -0,0 +1,31 @@
+// U+0590 to U+05FF - Hebrew
+// U+0600 to U+06FF - Arabic
+// U+0700 to U+074F - Syriac
+// U+0750 to U+077F - Arabic Supplement
+// U+0780 to U+07BF - Thaana
+// U+07C0 to U+07FF - N'Ko
+// U+0800 to U+083F - Samaritan
+// U+08A0 to U+08FF - Arabic Extended-A
+// U+FB1D to U+FB4F - Hebrew presentation forms
+// U+FB50 to U+FDFF - Arabic presentation forms A
+// U+FE70 to U+FEFF - Arabic presentation forms B
+
+const rtlChars = /[\u0590-\u083F]|[\u08A0-\u08FF]|[\uFB1D-\uFDFF]|[\uFE70-\uFEFF]/mg;
+
+export function isRtl(text) {
+ if (text.length === 0) {
+ return false;
+ }
+
+ text = text.replace(/(?:^|[^\/\w])@([a-z0-9_]+(@[a-z0-9\.\-]+)?)/ig, '');
+ text = text.replace(/(?:^|[^\/\w])#([\S]+)/ig, '');
+ text = text.replace(/\s+/g, '');
+
+ const matches = text.match(rtlChars);
+
+ if (!matches) {
+ return false;
+ }
+
+ return matches.length / text.length > 0.3;
+};
diff --git a/app/javascript/mastodon/scroll.js b/app/javascript/mastodon/scroll.js
new file mode 100644
index 0000000000..2af07e0fb1
--- /dev/null
+++ b/app/javascript/mastodon/scroll.js
@@ -0,0 +1,30 @@
+const easingOutQuint = (x, t, b, c, d) => c * ((t = t / d - 1) * t * t * t * t + 1) + b;
+
+const scroll = (node, key, target) => {
+ const startTime = Date.now();
+ const offset = node[key];
+ const gap = target - offset;
+ const duration = 1000;
+ let interrupt = false;
+
+ const step = () => {
+ const elapsed = Date.now() - startTime;
+ const percentage = elapsed / duration;
+
+ if (percentage > 1 || interrupt) {
+ return;
+ }
+
+ node[key] = easingOutQuint(0, elapsed, offset, gap, duration);
+ requestAnimationFrame(step);
+ };
+
+ step();
+
+ return () => {
+ interrupt = true;
+ };
+};
+
+export const scrollRight = (node, position) => scroll(node, 'scrollLeft', position);
+export const scrollTop = (node) => scroll(node, 'scrollTop', 0);
diff --git a/app/javascript/mastodon/selectors/index.js b/app/javascript/mastodon/selectors/index.js
new file mode 100644
index 0000000000..d26d1b727f
--- /dev/null
+++ b/app/javascript/mastodon/selectors/index.js
@@ -0,0 +1,87 @@
+import { createSelector } from 'reselect';
+import { List as ImmutableList } from 'immutable';
+
+const getAccountBase = (state, id) => state.getIn(['accounts', id], null);
+const getAccountCounters = (state, id) => state.getIn(['accounts_counters', id], null);
+const getAccountRelationship = (state, id) => state.getIn(['relationships', id], null);
+
+export const makeGetAccount = () => {
+ return createSelector([getAccountBase, getAccountCounters, getAccountRelationship], (base, counters, relationship) => {
+ if (base === null) {
+ return null;
+ }
+
+ return base.merge(counters).set('relationship', relationship);
+ });
+};
+
+export const makeGetStatus = () => {
+ return createSelector(
+ [
+ (state, id) => state.getIn(['statuses', id]),
+ (state, id) => state.getIn(['statuses', state.getIn(['statuses', id, 'reblog'])]),
+ (state, id) => state.getIn(['accounts', state.getIn(['statuses', id, 'account'])]),
+ (state, id) => state.getIn(['accounts', state.getIn(['statuses', state.getIn(['statuses', id, 'reblog']), 'account'])]),
+ ],
+
+ (statusBase, statusReblog, accountBase, accountReblog) => {
+ if (!statusBase) {
+ return null;
+ }
+
+ if (statusReblog) {
+ statusReblog = statusReblog.set('account', accountReblog);
+ } else {
+ statusReblog = null;
+ }
+
+ return statusBase.withMutations(map => {
+ map.set('reblog', statusReblog);
+ map.set('account', accountBase);
+ });
+ }
+ );
+};
+
+const getAlertsBase = state => state.get('alerts');
+
+export const getAlerts = createSelector([getAlertsBase], (base) => {
+ let arr = [];
+
+ base.forEach(item => {
+ arr.push({
+ message: item.get('message'),
+ title: item.get('title'),
+ key: item.get('key'),
+ dismissAfter: 5000,
+ barStyle: {
+ zIndex: 200,
+ },
+ });
+ });
+
+ return arr;
+});
+
+export const makeGetNotification = () => {
+ return createSelector([
+ (_, base) => base,
+ (state, _, accountId) => state.getIn(['accounts', accountId]),
+ ], (base, account) => {
+ return base.set('account', account);
+ });
+};
+
+export const getAccountGallery = createSelector([
+ (state, id) => state.getIn(['timelines', `account:${id}:media`, 'items'], ImmutableList()),
+ state => state.get('statuses'),
+], (statusIds, statuses) => {
+ let medias = ImmutableList();
+
+ statusIds.forEach(statusId => {
+ const status = statuses.get(statusId);
+ medias = medias.concat(status.get('media_attachments').map(media => media.set('status', status)));
+ });
+
+ return medias;
+});
diff --git a/app/javascript/mastodon/service_worker/entry.js b/app/javascript/mastodon/service_worker/entry.js
new file mode 100644
index 0000000000..eea4cfc3c2
--- /dev/null
+++ b/app/javascript/mastodon/service_worker/entry.js
@@ -0,0 +1,10 @@
+import './web_push_notifications';
+
+// Cause a new version of a registered Service Worker to replace an existing one
+// that is already installed, and replace the currently active worker on open pages.
+self.addEventListener('install', function(event) {
+ event.waitUntil(self.skipWaiting());
+});
+self.addEventListener('activate', function(event) {
+ event.waitUntil(self.clients.claim());
+});
diff --git a/app/javascript/mastodon/service_worker/web_push_notifications.js b/app/javascript/mastodon/service_worker/web_push_notifications.js
new file mode 100644
index 0000000000..f63cff335a
--- /dev/null
+++ b/app/javascript/mastodon/service_worker/web_push_notifications.js
@@ -0,0 +1,159 @@
+const MAX_NOTIFICATIONS = 5;
+const GROUP_TAG = 'tag';
+
+// Avoid loading intl-messageformat and dealing with locales in the ServiceWorker
+const formatGroupTitle = (message, count) => message.replace('%{count}', count);
+
+const notify = options =>
+ self.registration.getNotifications().then(notifications => {
+ if (notifications.length === MAX_NOTIFICATIONS) {
+ // Reached the maximum number of notifications, proceed with grouping
+ const group = {
+ title: formatGroupTitle(options.data.message, notifications.length + 1),
+ body: notifications
+ .sort((n1, n2) => n1.timestamp < n2.timestamp)
+ .map(notification => notification.title).join('\n'),
+ badge: '/badge.png',
+ icon: '/android-chrome-192x192.png',
+ tag: GROUP_TAG,
+ data: {
+ url: (new URL('/web/notifications', self.location)).href,
+ count: notifications.length + 1,
+ message: options.data.message,
+ },
+ };
+
+ notifications.forEach(notification => notification.close());
+
+ return self.registration.showNotification(group.title, group);
+ } else if (notifications.length === 1 && notifications[0].tag === GROUP_TAG) {
+ // Already grouped, proceed with appending the notification to the group
+ const group = cloneNotification(notifications[0]);
+
+ group.title = formatGroupTitle(group.data.message, group.data.count + 1);
+ group.body = `${options.title}\n${group.body}`;
+ group.data = { ...group.data, count: group.data.count + 1 };
+
+ return self.registration.showNotification(group.title, group);
+ }
+
+ return self.registration.showNotification(options.title, options);
+ });
+
+const handlePush = (event) => {
+ const options = event.data.json();
+
+ options.body = options.data.nsfw || options.data.content;
+ options.dir = options.data.dir;
+ options.image = options.image || undefined; // Null results in a network request (404)
+ options.timestamp = options.timestamp && new Date(options.timestamp);
+
+ const expandAction = options.data.actions.find(action => action.todo === 'expand');
+
+ if (expandAction) {
+ options.actions = [expandAction];
+ options.hiddenActions = options.data.actions.filter(action => action !== expandAction);
+ options.data.hiddenImage = options.image;
+ options.image = undefined;
+ } else {
+ options.actions = options.data.actions;
+ }
+
+ event.waitUntil(notify(options));
+};
+
+const cloneNotification = (notification) => {
+ const clone = { };
+
+ for(var k in notification) {
+ clone[k] = notification[k];
+ }
+
+ return clone;
+};
+
+const expandNotification = (notification) => {
+ const nextNotification = cloneNotification(notification);
+
+ nextNotification.body = notification.data.content;
+ nextNotification.image = notification.data.hiddenImage;
+ nextNotification.actions = notification.data.actions.filter(action => action.todo !== 'expand');
+
+ return self.registration.showNotification(nextNotification.title, nextNotification);
+};
+
+const makeRequest = (notification, action) =>
+ fetch(action.action, {
+ headers: {
+ 'Authorization': `Bearer ${notification.data.access_token}`,
+ 'Content-Type': 'application/json',
+ },
+ method: action.method,
+ credentials: 'include',
+ });
+
+const findBestClient = clients => {
+ const focusedClient = clients.find(client => client.focused);
+ const visibleClient = clients.find(client => client.visibilityState === 'visible');
+
+ return focusedClient || visibleClient || clients[0];
+};
+
+const openUrl = url =>
+ self.clients.matchAll({ type: 'window' }).then(clientList => {
+ if (clientList.length !== 0) {
+ const webClients = clientList.filter(client => /\/web\//.test(client.url));
+
+ if (webClients.length !== 0) {
+ const client = findBestClient(webClients);
+ const { pathname } = new URL(url);
+
+ if (pathname.startsWith('/web/')) {
+ return client.focus().then(client => client.postMessage({
+ type: 'navigate',
+ path: pathname.slice('/web/'.length - 1),
+ }));
+ }
+ } else if ('navigate' in clientList[0]) { // Chrome 42-48 does not support navigate
+ const client = findBestClient(clientList);
+
+ return client.navigate(url).then(client => client.focus());
+ }
+ }
+
+ return self.clients.openWindow(url);
+ });
+
+const removeActionFromNotification = (notification, action) => {
+ const actions = notification.actions.filter(act => act.action !== action.action);
+ const nextNotification = cloneNotification(notification);
+
+ nextNotification.actions = actions;
+
+ return self.registration.showNotification(nextNotification.title, nextNotification);
+};
+
+const handleNotificationClick = (event) => {
+ const reactToNotificationClick = new Promise((resolve, reject) => {
+ if (event.action) {
+ const action = event.notification.data.actions.find(({ action }) => action === event.action);
+
+ if (action.todo === 'expand') {
+ resolve(expandNotification(event.notification));
+ } else if (action.todo === 'request') {
+ resolve(makeRequest(event.notification, action)
+ .then(() => removeActionFromNotification(event.notification, action)));
+ } else {
+ reject(`Unknown action: ${action.todo}`);
+ }
+ } else {
+ event.notification.close();
+ resolve(openUrl(event.notification.data.url));
+ }
+ });
+
+ event.waitUntil(reactToNotificationClick);
+};
+
+self.addEventListener('push', handlePush);
+self.addEventListener('notificationclick', handleNotificationClick);
diff --git a/app/javascript/mastodon/store/configureStore.js b/app/javascript/mastodon/store/configureStore.js
new file mode 100644
index 0000000000..1376d4cbaf
--- /dev/null
+++ b/app/javascript/mastodon/store/configureStore.js
@@ -0,0 +1,15 @@
+import { createStore, applyMiddleware, compose } from 'redux';
+import thunk from 'redux-thunk';
+import appReducer from '../reducers';
+import loadingBarMiddleware from '../middleware/loading_bar';
+import errorsMiddleware from '../middleware/errors';
+import soundsMiddleware from '../middleware/sounds';
+
+export default function configureStore() {
+ return createStore(appReducer, compose(applyMiddleware(
+ thunk,
+ loadingBarMiddleware({ promiseTypeSuffixes: ['REQUEST', 'SUCCESS', 'FAIL'] }),
+ errorsMiddleware(),
+ soundsMiddleware()
+ ), window.devToolsExtension ? window.devToolsExtension() : f => f));
+};
diff --git a/app/javascript/mastodon/stream.js b/app/javascript/mastodon/stream.js
new file mode 100644
index 0000000000..36c68ffc5b
--- /dev/null
+++ b/app/javascript/mastodon/stream.js
@@ -0,0 +1,73 @@
+import WebSocketClient from 'websocket.js';
+
+export function connectStream(path, pollingRefresh = null, callbacks = () => ({ onConnect() {}, onDisconnect() {}, onReceive() {} })) {
+ return (dispatch, getState) => {
+ const streamingAPIBaseURL = getState().getIn(['meta', 'streaming_api_base_url']);
+ const accessToken = getState().getIn(['meta', 'access_token']);
+ const { onConnect, onDisconnect, onReceive } = callbacks(dispatch, getState);
+ let polling = null;
+
+ const setupPolling = () => {
+ polling = setInterval(() => {
+ pollingRefresh(dispatch);
+ }, 20000);
+ };
+
+ const clearPolling = () => {
+ if (polling) {
+ clearInterval(polling);
+ polling = null;
+ }
+ };
+
+ const subscription = getStream(streamingAPIBaseURL, accessToken, path, {
+ connected () {
+ if (pollingRefresh) {
+ clearPolling();
+ }
+ onConnect();
+ },
+
+ disconnected () {
+ if (pollingRefresh) {
+ setupPolling();
+ }
+ onDisconnect();
+ },
+
+ received (data) {
+ onReceive(data);
+ },
+
+ reconnected () {
+ if (pollingRefresh) {
+ clearPolling();
+ pollingRefresh(dispatch);
+ }
+ onConnect();
+ },
+
+ });
+
+ const disconnect = () => {
+ if (subscription) {
+ subscription.close();
+ }
+ clearPolling();
+ };
+
+ return disconnect;
+ };
+}
+
+
+export default function getStream(streamingAPIBaseURL, accessToken, stream, { connected, received, disconnected, reconnected }) {
+ const ws = new WebSocketClient(`${streamingAPIBaseURL}/api/v1/streaming/?access_token=${accessToken}&stream=${stream}`);
+
+ ws.onopen = connected;
+ ws.onmessage = e => received(JSON.parse(e.data));
+ ws.onclose = disconnected;
+ ws.onreconnect = reconnected;
+
+ return ws;
+};
diff --git a/app/javascript/mastodon/test_setup.js b/app/javascript/mastodon/test_setup.js
new file mode 100644
index 0000000000..80148379b2
--- /dev/null
+++ b/app/javascript/mastodon/test_setup.js
@@ -0,0 +1,5 @@
+import { configure } from 'enzyme';
+import Adapter from 'enzyme-adapter-react-16';
+
+const adapter = new Adapter();
+configure({ adapter });
diff --git a/app/javascript/mastodon/uuid.js b/app/javascript/mastodon/uuid.js
new file mode 100644
index 0000000000..be18993057
--- /dev/null
+++ b/app/javascript/mastodon/uuid.js
@@ -0,0 +1,3 @@
+export default function uuid(a) {
+ return a ? (a^Math.random() * 16 >> a / 4).toString(16) : ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, uuid);
+};
diff --git a/app/javascript/mastodon/web_push_subscription.js b/app/javascript/mastodon/web_push_subscription.js
new file mode 100644
index 0000000000..3dbed09ea2
--- /dev/null
+++ b/app/javascript/mastodon/web_push_subscription.js
@@ -0,0 +1,105 @@
+import axios from 'axios';
+import { store } from './containers/mastodon';
+import { setBrowserSupport, setSubscription, clearSubscription } from './actions/push_notifications';
+
+// Taken from https://www.npmjs.com/package/web-push
+const urlBase64ToUint8Array = (base64String) => {
+ const padding = '='.repeat((4 - base64String.length % 4) % 4);
+ const base64 = (base64String + padding)
+ .replace(/\-/g, '+')
+ .replace(/_/g, '/');
+
+ const rawData = window.atob(base64);
+ const outputArray = new Uint8Array(rawData.length);
+
+ for (let i = 0; i < rawData.length; ++i) {
+ outputArray[i] = rawData.charCodeAt(i);
+ }
+ return outputArray;
+};
+
+const getApplicationServerKey = () => document.querySelector('[name="applicationServerKey"]').getAttribute('content');
+
+const getRegistration = () => navigator.serviceWorker.ready;
+
+const getPushSubscription = (registration) =>
+ registration.pushManager.getSubscription()
+ .then(subscription => ({ registration, subscription }));
+
+const subscribe = (registration) =>
+ registration.pushManager.subscribe({
+ userVisibleOnly: true,
+ applicationServerKey: urlBase64ToUint8Array(getApplicationServerKey()),
+ });
+
+const unsubscribe = ({ registration, subscription }) =>
+ subscription ? subscription.unsubscribe().then(() => registration) : registration;
+
+const sendSubscriptionToBackend = (subscription) =>
+ axios.post('/api/web/push_subscriptions', {
+ subscription,
+ }).then(response => response.data);
+
+// Last one checks for payload support: https://web-push-book.gauntface.com/chapter-06/01-non-standards-browsers/#no-payload
+const supportsPushNotifications = ('serviceWorker' in navigator && 'PushManager' in window && 'getKey' in PushSubscription.prototype);
+
+export function register () {
+ store.dispatch(setBrowserSupport(supportsPushNotifications));
+
+ if (supportsPushNotifications) {
+ if (!getApplicationServerKey()) {
+ console.error('The VAPID public key is not set. You will not be able to receive Web Push Notifications.');
+ return;
+ }
+
+ getRegistration()
+ .then(getPushSubscription)
+ .then(({ registration, subscription }) => {
+ if (subscription !== null) {
+ // We have a subscription, check if it is still valid
+ const currentServerKey = (new Uint8Array(subscription.options.applicationServerKey)).toString();
+ const subscriptionServerKey = urlBase64ToUint8Array(getApplicationServerKey()).toString();
+ const serverEndpoint = store.getState().getIn(['push_notifications', 'subscription', 'endpoint']);
+
+ // If the VAPID public key did not change and the endpoint corresponds
+ // to the endpoint saved in the backend, the subscription is valid
+ if (subscriptionServerKey === currentServerKey && subscription.endpoint === serverEndpoint) {
+ return subscription;
+ } else {
+ // Something went wrong, try to subscribe again
+ return unsubscribe({ registration, subscription }).then(subscribe).then(sendSubscriptionToBackend);
+ }
+ }
+
+ // No subscription, try to subscribe
+ return subscribe(registration).then(sendSubscriptionToBackend);
+ })
+ .then(subscription => {
+ // If we got a PushSubscription (and not a subscription object from the backend)
+ // it means that the backend subscription is valid (and was set during hydration)
+ if (!(subscription instanceof PushSubscription)) {
+ store.dispatch(setSubscription(subscription));
+ }
+ })
+ .catch(error => {
+ if (error.code === 20 && error.name === 'AbortError') {
+ console.warn('Your browser supports Web Push Notifications, but does not seem to implement the VAPID protocol.');
+ } else if (error.code === 5 && error.name === 'InvalidCharacterError') {
+ console.error('The VAPID public key seems to be invalid:', getApplicationServerKey());
+ }
+
+ // Clear alerts and hide UI settings
+ store.dispatch(clearSubscription());
+
+ try {
+ getRegistration()
+ .then(getPushSubscription)
+ .then(unsubscribe);
+ } catch (e) {
+
+ }
+ });
+ } else {
+ console.warn('Your browser does not support Web Push Notifications.');
+ }
+}
diff --git a/app/javascript/styles/application.scss b/app/javascript/styles/application.scss
new file mode 100644
index 0000000000..44aa105645
--- /dev/null
+++ b/app/javascript/styles/application.scss
@@ -0,0 +1,22 @@
+@import 'mastodon/mixins';
+@import 'mastodon/variables';
+@import 'fonts/roboto';
+@import 'fonts/roboto-mono';
+@import 'fonts/montserrat';
+
+@import 'mastodon/reset';
+@import 'mastodon/basics';
+@import 'mastodon/containers';
+@import 'mastodon/lists';
+@import 'mastodon/footer';
+@import 'mastodon/compact_header';
+@import 'mastodon/landing_strip';
+@import 'mastodon/forms';
+@import 'mastodon/accounts';
+@import 'mastodon/stream_entries';
+@import 'mastodon/components';
+@import 'mastodon/emoji_picker';
+@import 'mastodon/about';
+@import 'mastodon/tables';
+@import 'mastodon/admin';
+@import 'mastodon/rtl';
diff --git a/app/javascript/styles/mastodon/_mixins.scss b/app/javascript/styles/mastodon/_mixins.scss
new file mode 100644
index 0000000000..67d768a6c6
--- /dev/null
+++ b/app/javascript/styles/mastodon/_mixins.scss
@@ -0,0 +1,12 @@
+@mixin avatar-radius() {
+ border-radius: 4px;
+ background: transparent no-repeat;
+ background-position: 50%;
+ background-clip: padding-box;
+}
+
+@mixin avatar-size($size:48px) {
+ width: $size;
+ height: $size;
+ background-size: $size $size;
+}
diff --git a/app/javascript/styles/mastodon/about.scss b/app/javascript/styles/mastodon/about.scss
new file mode 100644
index 0000000000..358d86eecc
--- /dev/null
+++ b/app/javascript/styles/mastodon/about.scss
@@ -0,0 +1,824 @@
+.landing-page {
+ p,
+ li {
+ font-family: 'mastodon-font-sans-serif', sans-serif;
+ font-size: 16px;
+ font-weight: 400;
+ font-size: 16px;
+ line-height: 30px;
+ margin-bottom: 12px;
+ color: $ui-primary-color;
+
+ a {
+ color: $ui-highlight-color;
+ text-decoration: underline;
+ }
+ }
+
+ em {
+ display: inline;
+ margin: 0;
+ padding: 0;
+ font-weight: 500;
+ background: transparent;
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+ color: lighten($ui-primary-color, 10%);
+ }
+
+ h1 {
+ font-family: 'mastodon-font-display', sans-serif;
+ font-size: 26px;
+ line-height: 30px;
+ font-weight: 500;
+ margin-bottom: 20px;
+ color: $ui-secondary-color;
+
+ small {
+ font-family: 'mastodon-font-sans-serif', sans-serif;
+ display: block;
+ font-size: 18px;
+ font-weight: 400;
+ color: $ui-base-lighter-color;
+ }
+ }
+
+ h2 {
+ font-family: 'mastodon-font-display', sans-serif;
+ font-size: 22px;
+ line-height: 26px;
+ font-weight: 500;
+ margin-bottom: 20px;
+ color: $ui-secondary-color;
+ }
+
+ h3 {
+ font-family: 'mastodon-font-display', sans-serif;
+ font-size: 18px;
+ line-height: 24px;
+ font-weight: 500;
+ margin-bottom: 20px;
+ color: $ui-secondary-color;
+ }
+
+ h4 {
+ font-family: 'mastodon-font-display', sans-serif;
+ font-size: 16px;
+ line-height: 24px;
+ font-weight: 500;
+ margin-bottom: 20px;
+ color: $ui-secondary-color;
+ }
+
+ h5 {
+ font-family: 'mastodon-font-display', sans-serif;
+ font-size: 14px;
+ line-height: 24px;
+ font-weight: 500;
+ margin-bottom: 20px;
+ color: $ui-secondary-color;
+ }
+
+ h6 {
+ font-family: 'mastodon-font-display', sans-serif;
+ font-size: 12px;
+ line-height: 24px;
+ font-weight: 500;
+ margin-bottom: 20px;
+ color: $ui-secondary-color;
+ }
+
+ ul,
+ ol {
+ margin-left: 20px;
+
+ &[type='a'] {
+ list-style-type: lower-alpha;
+ }
+
+ &[type='i'] {
+ list-style-type: lower-roman;
+ }
+ }
+
+ ul {
+ list-style: disc;
+ }
+
+ ol {
+ list-style: decimal;
+ }
+
+ li > ol,
+ li > ul {
+ margin-top: 6px;
+ }
+
+ hr {
+ border-color: rgba($ui-base-lighter-color, .6);
+ }
+
+ .container {
+ width: 100%;
+ box-sizing: border-box;
+ max-width: 800px;
+ margin: 0 auto;
+ word-wrap: break-word;
+ }
+
+ .header-wrapper {
+ padding-top: 15px;
+ background: $ui-base-color;
+ background: linear-gradient(150deg, lighten($ui-base-color, 8%), $ui-base-color);
+ position: relative;
+
+ &.compact {
+ background: $ui-base-color;
+ padding-bottom: 15px;
+
+ .hero .heading {
+ padding-bottom: 20px;
+ font-family: 'mastodon-font-sans-serif', sans-serif;
+ font-size: 16px;
+ font-weight: 400;
+ font-size: 16px;
+ line-height: 30px;
+ color: $ui-primary-color;
+
+ a {
+ color: $ui-highlight-color;
+ text-decoration: underline;
+ }
+ }
+ }
+
+ .mascot-container {
+ max-width: 800px;
+ margin: 0 auto;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ height: 100%;
+ }
+
+ .mascot {
+ position: absolute;
+ bottom: -14px;
+ width: auto;
+ height: auto;
+ left: 60px;
+ z-index: 3;
+ }
+ }
+
+ .header {
+ line-height: 30px;
+ overflow: hidden;
+
+ .container {
+ display: flex;
+ justify-content: space-between;
+ }
+
+ .links {
+ position: relative;
+ z-index: 4;
+
+ a {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ color: $ui-primary-color;
+ text-decoration: none;
+ padding: 12px 16px;
+ line-height: 32px;
+ font-family: 'mastodon-font-display', sans-serif;
+ font-weight: 500;
+ font-size: 14px;
+
+ &:hover {
+ color: $ui-secondary-color;
+ }
+ }
+
+ .brand {
+ a {
+ padding-left: 0;
+ padding-right: 0;
+ color: $white;
+ }
+
+ img {
+ height: 32px;
+ position: relative;
+ top: 4px;
+ left: -10px;
+ }
+ }
+
+ ul {
+ list-style: none;
+ margin: 0;
+
+ li {
+ display: inline-block;
+ vertical-align: bottom;
+ margin: 0;
+
+ &:first-child a {
+ padding-left: 0;
+ }
+
+ &:last-child a {
+ padding-right: 0;
+ }
+ }
+ }
+ }
+
+ .hero {
+ margin-top: 50px;
+ align-items: center;
+ position: relative;
+
+ .floats {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ left: 0;
+
+ div {
+ position: absolute;
+ transition: all 0.1s linear;
+ animation-name: floating;
+ animation-iteration-count: infinite;
+ animation-direction: alternate;
+ animation-timing-function: ease-in-out;
+ z-index: 2;
+ }
+
+ .float-1 {
+ width: 324px;
+ height: 170px;
+ right: -120px;
+ bottom: 0;
+ animation-duration: 3s;
+ background-image: url('data:image/svg+xml;utf8,');
+ }
+
+ .float-2 {
+ width: 241px;
+ height: 100px;
+ right: 210px;
+ bottom: 0;
+ animation-duration: 3.5s;
+ animation-delay: 0.2s;
+ background-image: url('data:image/svg+xml;utf8,');
+ }
+
+ .float-3 {
+ width: 267px;
+ height: 140px;
+ right: 110px;
+ top: -30px;
+ animation-duration: 4s;
+ animation-delay: 0.5s;
+ background-image: url('data:image/svg+xml;utf8,');
+ }
+ }
+
+ .heading {
+ position: relative;
+ z-index: 4;
+ padding-bottom: 150px;
+ }
+
+ .simple_form,
+ .closed-registrations-message {
+ background: darken($ui-base-color, 4%);
+ width: 280px;
+ padding: 15px 20px;
+ border-radius: 4px 4px 0 0;
+ line-height: initial;
+ position: relative;
+ z-index: 4;
+
+ .actions {
+ margin-bottom: 0;
+
+ button,
+ .button,
+ .block-button {
+ margin-bottom: 0;
+ }
+ }
+ }
+
+ .closed-registrations-message {
+ min-height: 330px;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ }
+ }
+ }
+
+ .about-short {
+ background: darken($ui-base-color, 4%);
+ padding: 50px 0 30px;
+ font-family: 'mastodon-font-sans-serif', sans-serif;
+ font-size: 16px;
+ font-weight: 400;
+ font-size: 16px;
+ line-height: 30px;
+ color: $ui-primary-color;
+
+ a {
+ color: $ui-highlight-color;
+ text-decoration: underline;
+ }
+ }
+
+ .information-board {
+ background: darken($ui-base-color, 4%);
+ padding: 20px 0;
+
+ .container {
+ position: relative;
+ padding-right: 280px + 15px;
+ }
+
+ .information-board-sections {
+ display: flex;
+ justify-content: space-between;
+ flex-wrap: wrap;
+ }
+
+ .section {
+ flex: 1 0 0;
+ font-family: 'mastodon-font-sans-serif', sans-serif;
+ font-size: 16px;
+ line-height: 28px;
+ color: $primary-text-color;
+ text-align: right;
+ padding: 10px 15px;
+
+ span,
+ strong {
+ display: block;
+ }
+
+ span {
+ &:last-child {
+ color: $ui-secondary-color;
+ }
+ }
+
+ strong {
+ font-weight: 500;
+ font-size: 32px;
+ line-height: 48px;
+ }
+ }
+
+ .panel {
+ position: absolute;
+ width: 280px;
+ box-sizing: border-box;
+ background: darken($ui-base-color, 8%);
+ padding: 20px;
+ padding-top: 10px;
+ border-radius: 4px 4px 0 0;
+ right: 0;
+ bottom: -40px;
+
+ .panel-header {
+ font-family: 'mastodon-font-display', sans-serif;
+ font-size: 14px;
+ line-height: 24px;
+ font-weight: 500;
+ color: $ui-primary-color;
+ padding-bottom: 5px;
+ margin-bottom: 15px;
+ border-bottom: 1px solid lighten($ui-base-color, 4%);
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+
+ a,
+ span {
+ font-weight: 400;
+ color: darken($ui-primary-color, 10%);
+ }
+
+ a {
+ text-decoration: none;
+ }
+ }
+ }
+
+ .owner {
+ text-align: center;
+
+ .avatar {
+ width: 80px;
+ height: 80px;
+ margin: 0 auto;
+ margin-bottom: 15px;
+
+ img {
+ display: block;
+ width: 80px;
+ height: 80px;
+ border-radius: 48px;
+ }
+ }
+
+ .name {
+ font-size: 14px;
+
+ a {
+ display: block;
+ color: $primary-text-color;
+ text-decoration: none;
+
+ &:hover {
+ .display_name {
+ text-decoration: underline;
+ }
+ }
+ }
+
+ .username {
+ display: block;
+ color: $ui-primary-color;
+ }
+ }
+ }
+ }
+
+ .features {
+ padding: 50px 0;
+
+ .container {
+ display: flex;
+ }
+
+ #mastodon-timeline {
+ display: flex;
+ -webkit-overflow-scrolling: touch;
+ -ms-overflow-style: -ms-autohiding-scrollbar;
+ font-family: 'mastodon-font-sans-serif', sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+ font-weight: 400;
+ color: $primary-text-color;
+ width: 330px;
+ margin-right: 30px;
+ flex: 0 0 auto;
+ background: $ui-base-color;
+ overflow: hidden;
+ border-radius: 4px;
+ box-shadow: 0 0 6px rgba($black, 0.1);
+
+ .column-header {
+ color: inherit;
+ font-family: inherit;
+ font-size: 16px;
+ line-height: inherit;
+ font-weight: inherit;
+ margin: 0;
+ padding: 15px;
+ }
+
+ .column {
+ padding: 0;
+ border-radius: 4px;
+ overflow: hidden;
+ }
+
+ .scrollable {
+ height: 400px;
+ }
+
+ p {
+ font-size: inherit;
+ line-height: inherit;
+ font-weight: inherit;
+ color: $primary-text-color;
+ margin-bottom: 20px;
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+
+ a {
+ color: $ui-secondary-color;
+ text-decoration: none;
+ }
+ }
+ }
+
+ .about-mastodon {
+ max-width: 675px;
+
+ p {
+ margin-bottom: 20px;
+ }
+
+ .features-list {
+ margin-top: 20px;
+
+ .features-list__row {
+ display: flex;
+ padding: 10px 0;
+ justify-content: space-between;
+
+ &:first-child {
+ padding-top: 0;
+ }
+
+ .visual {
+ flex: 0 0 auto;
+ display: flex;
+ align-items: center;
+ margin-left: 15px;
+
+ .fa {
+ display: block;
+ color: $ui-primary-color;
+ font-size: 48px;
+ }
+ }
+
+ .text {
+ font-size: 16px;
+ line-height: 30px;
+ color: $ui-primary-color;
+
+ h6 {
+ font-size: inherit;
+ line-height: inherit;
+ margin-bottom: 0;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ .extended-description {
+ padding: 50px 0;
+ font-family: 'mastodon-font-sans-serif', sans-serif;
+ font-size: 16px;
+ font-weight: 400;
+ font-size: 16px;
+ line-height: 30px;
+ color: $ui-primary-color;
+
+ a {
+ color: $ui-highlight-color;
+ text-decoration: underline;
+ }
+ }
+
+ .footer-links {
+ padding-bottom: 50px;
+ text-align: right;
+ color: $ui-base-lighter-color;
+
+ p {
+ font-size: 14px;
+ }
+
+ a {
+ color: inherit;
+ text-decoration: underline;
+ }
+ }
+
+ @media screen and (max-width: 840px) {
+ .container {
+ padding: 0 20px;
+ }
+
+ .information-board {
+
+ .container {
+ padding-right: 20px;
+ }
+
+ .section {
+ text-align: center;
+ }
+
+ .panel {
+ position: static;
+ margin-top: 20px;
+ width: 100%;
+ border-radius: 4px;
+
+ .panel-header {
+ text-align: center;
+ }
+ }
+ }
+
+ .header-wrapper .mascot {
+ left: 20px;
+ }
+ }
+
+ @media screen and (max-width: 689px) {
+ .header-wrapper .mascot {
+ display: none;
+ }
+ }
+
+ @media screen and (max-width: 675px) {
+ .header-wrapper {
+ padding-top: 0;
+
+ &.compact {
+ padding-bottom: 0;
+ }
+
+ &.compact .hero .heading {
+ text-align: initial;
+ }
+ }
+
+ .header .container,
+ .features .container {
+ display: block;
+ }
+
+ .header {
+
+ .links {
+ padding-top: 15px;
+ background: darken($ui-base-color, 4%);
+
+ a {
+ padding: 12px 8px;
+ }
+
+ .nav {
+ display: flex;
+ flex-flow: row wrap;
+ justify-content: space-around;
+ }
+
+ .brand img {
+ left: 0;
+ top: 0;
+ }
+ }
+
+ .hero {
+ margin-top: 30px;
+ padding: 0;
+
+ .floats {
+ display: none;
+ }
+
+ .heading {
+ padding: 30px 20px;
+ text-align: center;
+ }
+
+ .simple_form,
+ .closed-registrations-message {
+ background: darken($ui-base-color, 8%);
+ width: 100%;
+ border-radius: 0;
+ box-sizing: border-box;
+ }
+ }
+ }
+
+ .features #mastodon-timeline {
+ height: 70vh;
+ width: 100%;
+ margin-bottom: 50px;
+
+ .column {
+ width: 100%;
+ }
+ }
+ }
+
+ .cta {
+ margin: 20px;
+ }
+
+ &.tag-page {
+ .features {
+ padding: 30px 0;
+
+ .container {
+ max-width: 820px;
+
+ #mastodon-timeline {
+ margin-right: 0;
+ border-top-right-radius: 0;
+ }
+
+ .about-mastodon {
+ .about-hashtag {
+ background: darken($ui-base-color, 4%);
+ padding: 0 20px 20px 30px;
+ border-radius: 0 5px 5px 0;
+
+ .brand {
+ padding-top: 20px;
+ margin-bottom: 20px;
+
+ img {
+ height: 48px;
+ width: auto;
+ }
+ }
+
+ p {
+ strong {
+ color: $ui-secondary-color;
+ font-weight: 700;
+ }
+ }
+
+ .cta {
+ margin: 0;
+
+ .button {
+ margin-right: 4px;
+ }
+ }
+ }
+
+ .features-list {
+ margin-left: 30px;
+ margin-right: 10px;
+ }
+ }
+ }
+ }
+
+ @media screen and (max-width: 675px) {
+ .features {
+ padding: 10px 0;
+
+ .container {
+ display: flex;
+ flex-direction: column;
+
+ #mastodon-timeline {
+ order: 2;
+ flex: 0 0 auto;
+ height: 60vh;
+ margin-bottom: 20px;
+ border-top-right-radius: 4px;
+ }
+
+ .about-mastodon {
+ order: 1;
+ flex: 0 0 auto;
+ max-width: 100%;
+
+ .about-hashtag {
+ background: unset;
+ padding: 0;
+ border-radius: 0;
+
+ .cta {
+ margin: 20px 0;
+ }
+ }
+
+ .features-list {
+ display: none;
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+@keyframes floating {
+ from {
+ transform: translate(0, 0);
+ }
+
+ 65% {
+ transform: translate(0, 4px);
+ }
+
+ to {
+ transform: translate(0, -0);
+ }
+}
diff --git a/app/javascript/styles/mastodon/accounts.scss b/app/javascript/styles/mastodon/accounts.scss
new file mode 100644
index 0000000000..23e20a3668
--- /dev/null
+++ b/app/javascript/styles/mastodon/accounts.scss
@@ -0,0 +1,549 @@
+.card {
+ background-color: lighten($ui-base-color, 4%);
+ background-size: cover;
+ background-position: center;
+ border-radius: 4px 4px 0 0;
+ box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
+ overflow: hidden;
+ position: relative;
+ display: flex;
+
+ &::after {
+ background: rgba(darken($ui-base-color, 8%), 0.5);
+ display: block;
+ content: "";
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 1;
+ }
+
+ @media screen and (max-width: 740px) {
+ border-radius: 0;
+ box-shadow: none;
+ }
+
+ .card__illustration {
+ padding: 60px 0;
+ position: relative;
+ flex: 1 1 auto;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ }
+
+ .card__bio {
+ max-width: 260px;
+ flex: 1 1 auto;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+ background: rgba(darken($ui-base-color, 8%), 0.8);
+ position: relative;
+ z-index: 2;
+ }
+
+ &.compact {
+ padding: 30px 0;
+ border-radius: 4px;
+
+ .avatar {
+ margin-bottom: 0;
+
+ img {
+ object-fit: cover;
+ }
+ }
+ }
+
+ .name {
+ display: block;
+ font-size: 20px;
+ line-height: 18px * 1.5;
+ color: $primary-text-color;
+ padding: 10px 15px;
+ padding-bottom: 0;
+ font-weight: 500;
+ position: relative;
+ z-index: 2;
+ margin-bottom: 30px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+
+ small {
+ display: block;
+ font-size: 14px;
+ color: $ui-highlight-color;
+ font-weight: 400;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ }
+
+ .avatar {
+ width: 120px;
+ margin: 0 auto;
+ position: relative;
+ z-index: 2;
+
+ img {
+ width: 120px;
+ height: 120px;
+ display: block;
+ border-radius: 120px;
+ box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
+ }
+ }
+
+ .controls {
+ position: absolute;
+ top: 15px;
+ left: 15px;
+ z-index: 2;
+
+ .icon-button {
+ color: rgba($white, 0.8);
+ text-decoration: none;
+ font-size: 13px;
+ line-height: 13px;
+ font-weight: 500;
+
+ .fa {
+ font-weight: 400;
+ margin-right: 5px;
+ }
+
+ &:hover,
+ &:active,
+ &:focus {
+ color: $white;
+ }
+ }
+ }
+
+ .roles {
+ margin-bottom: 30px;
+ padding: 0 15px;
+ }
+
+ .details-counters {
+ margin-top: 30px;
+ display: flex;
+ flex-direction: row;
+ width: 100%;
+ }
+
+ .counter {
+ width: 33.3%;
+ box-sizing: border-box;
+ flex: 0 0 auto;
+ color: $ui-primary-color;
+ padding: 5px 10px 0;
+ margin-bottom: 10px;
+ border-right: 1px solid lighten($ui-base-color, 4%);
+ cursor: default;
+ text-align: center;
+ position: relative;
+
+ a {
+ display: block;
+ }
+
+ &:last-child {
+ border-right: 0;
+ }
+
+ &::after {
+ display: block;
+ content: "";
+ position: absolute;
+ bottom: -10px;
+ left: 0;
+ width: 100%;
+ border-bottom: 4px solid $ui-primary-color;
+ opacity: 0.5;
+ transition: all 400ms ease;
+ }
+
+ &.active {
+ &::after {
+ border-bottom: 4px solid $ui-highlight-color;
+ opacity: 1;
+ }
+ }
+
+ &:hover {
+ &::after {
+ opacity: 1;
+ transition-duration: 100ms;
+ }
+ }
+
+ a {
+ text-decoration: none;
+ color: inherit;
+ }
+
+ .counter-label {
+ font-size: 12px;
+ display: block;
+ margin-bottom: 5px;
+ }
+
+ .counter-number {
+ font-weight: 500;
+ font-size: 18px;
+ color: $primary-text-color;
+ font-family: 'mastodon-font-display', sans-serif;
+ }
+ }
+
+ .bio {
+ font-size: 14px;
+ line-height: 18px;
+ padding: 0 15px;
+ color: $ui-secondary-color;
+ }
+
+ @media screen and (max-width: 480px) {
+ display: block;
+
+ .card__bio {
+ max-width: none;
+ }
+
+ .name,
+ .roles {
+ text-align: center;
+ margin-bottom: 15px;
+ }
+
+ .bio {
+ margin-bottom: 15px;
+ }
+ }
+}
+
+.pagination {
+ padding: 30px 0;
+ text-align: center;
+ overflow: hidden;
+
+ a,
+ .current,
+ .next,
+ .prev,
+ .page,
+ .gap {
+ font-size: 14px;
+ color: $primary-text-color;
+ font-weight: 500;
+ display: inline-block;
+ padding: 6px 10px;
+ text-decoration: none;
+ }
+
+ .current {
+ background: $simple-background-color;
+ border-radius: 100px;
+ color: $ui-base-color;
+ cursor: default;
+ margin: 0 10px;
+ }
+
+ .gap {
+ cursor: default;
+ }
+
+ .prev,
+ .next {
+ text-transform: uppercase;
+ color: $ui-secondary-color;
+ }
+
+ .prev {
+ float: left;
+ padding-left: 0;
+
+ .fa {
+ display: inline-block;
+ margin-right: 5px;
+ }
+ }
+
+ .next {
+ float: right;
+ padding-right: 0;
+
+ .fa {
+ display: inline-block;
+ margin-left: 5px;
+ }
+ }
+
+ .disabled {
+ cursor: default;
+ color: lighten($ui-base-color, 10%);
+ }
+
+ @media screen and (max-width: 700px) {
+ padding: 30px 20px;
+
+ .page {
+ display: none;
+ }
+
+ .next,
+ .prev {
+ display: inline-block;
+ }
+ }
+}
+
+.accounts-grid {
+ box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
+ background: darken($simple-background-color, 8%);
+ border-radius: 0 0 4px 4px;
+ padding: 20px 5px;
+ padding-bottom: 10px;
+ overflow: hidden;
+ display: flex;
+ flex-wrap: wrap;
+ z-index: 2;
+ position: relative;
+
+ @media screen and (max-width: 740px) {
+ border-radius: 0;
+ box-shadow: none;
+ }
+
+ .account-grid-card {
+ box-sizing: border-box;
+ width: 335px;
+ background: $simple-background-color;
+ border-radius: 4px;
+ color: $ui-base-color;
+ margin: 0 5px 10px;
+ position: relative;
+
+ @media screen and (max-width: 740px) {
+ width: calc(100% - 10px);
+ }
+
+ .account-grid-card__header {
+ overflow: hidden;
+ height: 100px;
+ border-radius: 4px 4px 0 0;
+ background-color: lighten($ui-base-color, 4%);
+ background-size: cover;
+ background-position: center;
+ position: relative;
+
+ &::after {
+ background: rgba(darken($ui-base-color, 8%), 0.5);
+ display: block;
+ content: "";
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 1;
+ }
+ }
+
+ .account-grid-card__avatar {
+ box-sizing: border-box;
+ padding: 15px;
+ position: absolute;
+ z-index: 2;
+ top: 100px - (40px + 2px);
+ left: -2px;
+ }
+
+ .avatar {
+ width: 80px;
+ height: 80px;
+
+ img {
+ display: block;
+ width: 80px;
+ height: 80px;
+ border-radius: 80px;
+ border: 2px solid $simple-background-color;
+ background: $simple-background-color;
+ }
+ }
+
+ .name {
+ padding: 15px;
+ padding-top: 10px;
+ padding-left: 15px + 80px + 15px;
+
+ a {
+ display: block;
+ color: $ui-base-color;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ font-weight: 500;
+
+ &:hover {
+ .display_name {
+ text-decoration: underline;
+ }
+ }
+ }
+ }
+
+ .display_name {
+ font-size: 16px;
+ display: block;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ }
+
+ .username {
+ color: lighten($ui-base-color, 34%);
+ font-size: 14px;
+ font-weight: 400;
+ }
+
+ .note {
+ padding: 10px 15px;
+ padding-top: 15px;
+ box-sizing: border-box;
+ color: lighten($ui-base-color, 26%);
+ word-wrap: break-word;
+ min-height: 80px;
+ }
+ }
+}
+
+.nothing-here {
+ width: 100%;
+ display: block;
+ color: $ui-primary-color;
+ font-size: 14px;
+ font-weight: 500;
+ text-align: center;
+ padding: 60px 0;
+ padding-top: 55px;
+ cursor: default;
+}
+
+.account-card {
+ padding: 14px 10px;
+ background: $simple-background-color;
+ border-radius: 4px;
+ text-align: left;
+ box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
+
+ .detailed-status__display-name {
+ display: block;
+ overflow: hidden;
+ margin-bottom: 15px;
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+
+ & > div {
+ float: left;
+ margin-right: 10px;
+ width: 48px;
+ height: 48px;
+ }
+
+ .avatar {
+ display: block;
+ border-radius: 4px;
+ }
+
+ .display-name {
+ display: block;
+ max-width: 100%;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ cursor: default;
+
+ strong {
+ font-weight: 500;
+ color: $ui-base-color;
+ }
+
+ span {
+ font-size: 14px;
+ color: $ui-primary-color;
+ }
+ }
+
+ &:hover {
+ .display-name {
+ strong {
+ text-decoration: none;
+ }
+ }
+ }
+ }
+
+ .account__header__content {
+ font-size: 14px;
+ color: $ui-base-color;
+ }
+}
+
+.activity-stream-tabs {
+ background: $simple-background-color;
+ border-bottom: 1px solid $ui-secondary-color;
+ position: relative;
+ z-index: 2;
+
+ a {
+ display: inline-block;
+ padding: 15px;
+ text-decoration: none;
+ color: $ui-highlight-color;
+ text-transform: uppercase;
+ font-weight: 500;
+
+ &:hover,
+ &:active,
+ &:focus {
+ color: lighten($ui-highlight-color, 8%);
+ }
+
+ &.active {
+ color: $ui-base-color;
+ cursor: default;
+ }
+ }
+}
+
+.account-role {
+ display: inline-block;
+ padding: 4px 6px;
+ cursor: default;
+ border-radius: 3px;
+ font-size: 12px;
+ line-height: 12px;
+ font-weight: 500;
+ color: $ui-secondary-color;
+ background-color: rgba($ui-secondary-color, 0.1);
+ border: 1px solid rgba($ui-secondary-color, 0.5);
+
+ &.moderator {
+ color: $success-green;
+ background-color: rgba($success-green, 0.1);
+ border-color: rgba($success-green, 0.5);
+ }
+
+ &.admin {
+ color: lighten($error-red, 12%);
+ background-color: rgba(lighten($error-red, 12%), 0.1);
+ border-color: rgba(lighten($error-red, 12%), 0.5);
+ }
+}
diff --git a/app/javascript/styles/mastodon/admin.scss b/app/javascript/styles/mastodon/admin.scss
new file mode 100644
index 0000000000..87bc710af6
--- /dev/null
+++ b/app/javascript/styles/mastodon/admin.scss
@@ -0,0 +1,349 @@
+.admin-wrapper {
+ display: flex;
+ justify-content: center;
+ height: 100%;
+
+ .sidebar-wrapper {
+ flex: 1;
+ height: 100%;
+ background: $ui-base-color;
+ display: flex;
+ justify-content: flex-end;
+ }
+
+ .sidebar {
+ width: 240px;
+ height: 100%;
+ padding: 0;
+ overflow-y: auto;
+
+ .logo {
+ display: block;
+ margin: 40px auto;
+ width: 100px;
+ height: 100px;
+ }
+
+ ul {
+ list-style: none;
+ border-radius: 4px 0 0 4px;
+ overflow: hidden;
+ margin-bottom: 20px;
+
+ a {
+ display: block;
+ padding: 15px;
+ color: rgba($primary-text-color, 0.7);
+ text-decoration: none;
+ transition: all 200ms linear;
+ border-radius: 4px 0 0 4px;
+
+ i.fa {
+ margin-right: 5px;
+ }
+
+ &:hover {
+ color: $primary-text-color;
+ background-color: darken($ui-base-color, 5%);
+ transition: all 100ms linear;
+ }
+
+ &.selected {
+ background: darken($ui-base-color, 2%);
+ border-radius: 4px 0 0;
+ }
+ }
+
+ ul {
+ background: darken($ui-base-color, 4%);
+ border-radius: 0 0 0 4px;
+ margin: 0;
+
+ a {
+ border: 0;
+ padding: 15px 35px;
+
+ &.selected {
+ color: $primary-text-color;
+ background-color: $ui-highlight-color;
+ border-bottom: 0;
+ border-radius: 0;
+
+ &:hover {
+ background-color: lighten($ui-highlight-color, 5%);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ .content-wrapper {
+ flex: 2;
+ overflow: auto;
+ }
+
+ .content {
+ max-width: 700px;
+ padding: 20px 15px;
+ padding-top: 60px;
+ padding-left: 25px;
+
+ h2 {
+ color: $ui-secondary-color;
+ font-size: 24px;
+ line-height: 28px;
+ font-weight: 400;
+ margin-bottom: 40px;
+ }
+
+ h3 {
+ color: $ui-secondary-color;
+ font-size: 20px;
+ line-height: 28px;
+ font-weight: 400;
+ margin-bottom: 30px;
+ }
+
+ h6 {
+ font-size: 16px;
+ color: $ui-secondary-color;
+ line-height: 28px;
+ font-weight: 400;
+ }
+
+ & > p {
+ font-size: 14px;
+ line-height: 18px;
+ color: $ui-secondary-color;
+ margin-bottom: 20px;
+
+ strong {
+ color: $primary-text-color;
+ font-weight: 500;
+ }
+ }
+
+ hr {
+ margin: 20px 0;
+ border: 0;
+ background: transparent;
+ border-bottom: 1px solid $ui-base-color;
+ }
+
+ .muted-hint {
+ color: $ui-primary-color;
+
+ a {
+ color: $ui-highlight-color;
+ }
+ }
+
+ .positive-hint {
+ color: $valid-value-color;
+ font-weight: 500;
+ }
+ }
+
+ .simple_form {
+ max-width: 400px;
+
+ &.edit_user,
+ &.new_form_admin_settings,
+ &.new_form_two_factor_confirmation,
+ &.new_form_delete_confirmation,
+ &.new_import,
+ &.new_domain_block,
+ &.edit_domain_block {
+ max-width: none;
+ }
+
+ .form_two_factor_confirmation_code,
+ .form_delete_confirmation_password {
+ max-width: 400px;
+ }
+
+ .actions {
+ max-width: 400px;
+ }
+ }
+
+ @media screen and (max-width: 600px) {
+ display: block;
+ overflow-y: auto;
+ -webkit-overflow-scrolling: touch;
+
+ .sidebar-wrapper,
+ .content-wrapper {
+ flex: 0 0 auto;
+ height: auto;
+ overflow: initial;
+ }
+
+ .sidebar {
+ width: 100%;
+ padding: 10px 0;
+ height: auto;
+
+ .logo {
+ margin: 20px auto;
+ }
+ }
+
+ .content {
+ padding-top: 20px;
+ }
+ }
+}
+
+.filters {
+ display: flex;
+ flex-wrap: wrap;
+
+ .filter-subset {
+ flex: 0 0 auto;
+ margin: 0 40px 10px 0;
+
+ &:last-child {
+ margin-bottom: 20px;
+ }
+
+ ul {
+ margin-top: 5px;
+ list-style: none;
+
+ li {
+ display: inline-block;
+ margin-right: 5px;
+ }
+ }
+
+ strong {
+ font-weight: 500;
+ text-transform: uppercase;
+ font-size: 12px;
+ }
+
+ a {
+ display: inline-block;
+ color: rgba($primary-text-color, 0.7);
+ text-decoration: none;
+ text-transform: uppercase;
+ font-size: 12px;
+ font-weight: 500;
+ border-bottom: 2px solid $ui-base-color;
+
+ &:hover {
+ color: $primary-text-color;
+ border-bottom: 2px solid lighten($ui-base-color, 5%);
+ }
+
+ &.selected {
+ color: $ui-highlight-color;
+ border-bottom: 2px solid $ui-highlight-color;
+ }
+ }
+ }
+}
+
+.report-accounts {
+ display: flex;
+ flex-wrap: wrap;
+ margin-bottom: 20px;
+}
+
+.report-accounts__item {
+ display: flex;
+ flex: 250px;
+ flex-direction: column;
+ margin: 0 5px;
+
+ & > strong {
+ display: block;
+ margin: 0 0 10px -5px;
+ font-weight: 500;
+ font-size: 14px;
+ line-height: 18px;
+ color: $ui-secondary-color;
+ }
+
+ .account-card {
+ flex: 1 1 auto;
+ }
+}
+
+.report-status,
+.account-status {
+ display: flex;
+ margin-bottom: 10px;
+
+ .activity-stream {
+ flex: 2 0 0;
+ margin-right: 20px;
+ max-width: calc(100% - 60px);
+
+ .entry {
+ border-radius: 4px;
+ }
+ }
+}
+
+.report-status__actions,
+.account-status__actions {
+ flex: 0 0 auto;
+ display: flex;
+ flex-direction: column;
+
+ .icon-button {
+ font-size: 24px;
+ width: 24px;
+ text-align: center;
+ margin-bottom: 10px;
+ }
+}
+
+.batch-form-box {
+ display: flex;
+ flex-wrap: wrap;
+ margin-bottom: 5px;
+
+ #form_status_batch_action {
+ margin: 0 5px 5px 0;
+ font-size: 14px;
+ }
+
+ input.button {
+ margin: 0 5px 5px 0;
+ }
+
+ .media-spoiler-toggle-buttons {
+ margin-left: auto;
+
+ .button {
+ overflow: visible;
+ margin: 0 0 5px 5px;
+ float: right;
+ }
+ }
+}
+
+.batch-checkbox,
+.batch-checkbox-all {
+ display: flex;
+ align-items: center;
+ margin-right: 5px;
+}
+
+.back-link {
+ margin-bottom: 10px;
+ font-size: 14px;
+
+ a {
+ color: $classic-highlight-color;
+ text-decoration: none;
+
+ &:hover {
+ text-decoration: underline;
+ }
+ }
+}
diff --git a/app/javascript/styles/mastodon/basics.scss b/app/javascript/styles/mastodon/basics.scss
new file mode 100644
index 0000000000..b5d77ff63b
--- /dev/null
+++ b/app/javascript/styles/mastodon/basics.scss
@@ -0,0 +1,122 @@
+body {
+ font-family: 'mastodon-font-sans-serif', sans-serif;
+ background: $ui-base-color;
+ background-size: cover;
+ background-attachment: fixed;
+ font-size: 13px;
+ line-height: 18px;
+ font-weight: 400;
+ color: $primary-text-color;
+ padding-bottom: 20px;
+ text-rendering: optimizelegibility;
+ font-feature-settings: "kern";
+ text-size-adjust: none;
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
+ -webkit-tap-highlight-color: transparent;
+
+ &.system-font {
+ // system-ui => standard property (Chrome/Android WebView 56+, Opera 43+, Safari 11+)
+ // -apple-system => Safari <11 specific
+ // BlinkMacSystemFont => Chrome <56 on macOS specific
+ // Segoe UI => Windows 7/8/10
+ // Oxygen => KDE
+ // Ubuntu => Unity/Ubuntu
+ // Cantarell => GNOME
+ // Fira Sans => Firefox OS
+ // Droid Sans => Older Androids (<4.0)
+ // Helvetica Neue => Older macOS <10.11
+ // mastodon-font-sans-serif => web-font (Roboto) fallback and newer Androids (>=4.0)
+ font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", mastodon-font-sans-serif, sans-serif;
+ }
+
+ &.app-body {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ padding: 0;
+ background: $ui-base-color;
+ }
+
+ &.about-body {
+ background: darken($ui-base-color, 8%);
+ padding-bottom: 0;
+ }
+
+ &.tag-body {
+ background: darken($ui-base-color, 8%);
+ padding-bottom: 0;
+ }
+
+ &.embed {
+ background: transparent;
+ margin: 0;
+ padding-bottom: 0;
+
+ .container {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+ }
+ }
+
+ &.admin {
+ background: darken($ui-base-color, 4%);
+ position: fixed;
+ width: 100%;
+ height: 100%;
+ padding: 0;
+ }
+
+ &.error {
+ position: absolute;
+ text-align: center;
+ color: $ui-primary-color;
+ background: $ui-base-color;
+ width: 100%;
+ height: 100%;
+ padding: 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ .dialog {
+ vertical-align: middle;
+ margin: 20px;
+
+ img {
+ display: block;
+ max-width: 470px;
+ width: 100%;
+ height: auto;
+ margin-top: -120px;
+ }
+
+ h1 {
+ font-size: 20px;
+ line-height: 28px;
+ font-weight: 400;
+ }
+ }
+ }
+}
+
+button {
+ font-family: inherit;
+ cursor: pointer;
+
+ &:focus {
+ outline: none;
+ }
+}
+
+.app-holder {
+ &,
+ & > div {
+ display: flex;
+ width: 100%;
+ height: 100%;
+ align-items: center;
+ justify-content: center;
+ }
+}
diff --git a/app/javascript/styles/mastodon/boost.scss b/app/javascript/styles/mastodon/boost.scss
new file mode 100644
index 0000000000..31053decce
--- /dev/null
+++ b/app/javascript/styles/mastodon/boost.scss
@@ -0,0 +1,18 @@
+@function hex-color($color) {
+ @if type-of($color) == 'color' {
+ $color: str-slice(ie-hex-str($color), 4);
+ }
+ @return '%23' + unquote($color)
+}
+
+button.icon-button i.fa-retweet {
+ background-image: url("data:image/svg+xml;utf8,");
+
+ &:hover {
+ background-image: url("data:image/svg+xml;utf8,");
+ }
+}
+
+button.icon-button.disabled i.fa-retweet {
+ background-image: url("data:image/svg+xml;utf8,");
+}
diff --git a/app/javascript/styles/mastodon/compact_header.scss b/app/javascript/styles/mastodon/compact_header.scss
new file mode 100644
index 0000000000..90d98cc8c5
--- /dev/null
+++ b/app/javascript/styles/mastodon/compact_header.scss
@@ -0,0 +1,34 @@
+.compact-header {
+ h1 {
+ font-size: 24px;
+ line-height: 28px;
+ color: $ui-primary-color;
+ font-weight: 500;
+ margin-bottom: 20px;
+ padding: 0 10px;
+ word-wrap: break-word;
+
+ @media screen and (max-width: 740px) {
+ text-align: center;
+ padding: 20px 10px 0;
+ }
+
+ a {
+ color: inherit;
+ text-decoration: none;
+ }
+
+ small {
+ font-weight: 400;
+ color: $ui-secondary-color;
+ }
+
+ img {
+ display: inline-block;
+ margin-bottom: -5px;
+ margin-right: 15px;
+ width: 36px;
+ height: 36px;
+ }
+ }
+}
diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss
new file mode 100644
index 0000000000..0ded6f1596
--- /dev/null
+++ b/app/javascript/styles/mastodon/components.scss
@@ -0,0 +1,4377 @@
+@import 'variables';
+
+.app-body {
+ -webkit-overflow-scrolling: touch;
+ -ms-overflow-style: -ms-autohiding-scrollbar;
+}
+
+.button {
+ background-color: darken($ui-highlight-color, 3%);
+ border: 10px none;
+ border-radius: 4px;
+ box-sizing: border-box;
+ color: $primary-text-color;
+ cursor: pointer;
+ display: inline-block;
+ font-family: inherit;
+ font-size: 14px;
+ font-weight: 500;
+ height: 36px;
+ letter-spacing: 0;
+ line-height: 36px;
+ overflow: hidden;
+ padding: 0 16px;
+ position: relative;
+ text-align: center;
+ text-transform: uppercase;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ transition: all 100ms ease-in;
+ white-space: nowrap;
+ width: auto;
+
+ &:active,
+ &:focus,
+ &:hover {
+ background-color: lighten($ui-highlight-color, 7%);
+ transition: all 200ms ease-out;
+ }
+
+ &:disabled {
+ background-color: $ui-primary-color;
+ cursor: default;
+ }
+
+ &.button-alternative {
+ font-size: 16px;
+ line-height: 36px;
+ height: auto;
+ color: $ui-base-color;
+ background: $ui-primary-color;
+ text-transform: none;
+ padding: 4px 16px;
+
+ &:active,
+ &:focus,
+ &:hover {
+ background-color: lighten($ui-primary-color, 4%);
+ }
+ }
+
+ &.button-secondary {
+ font-size: 16px;
+ line-height: 36px;
+ height: auto;
+ color: $ui-primary-color;
+ text-transform: none;
+ background: transparent;
+ padding: 3px 15px;
+ border-radius: 4px;
+ border: 1px solid $ui-primary-color;
+
+ &:active,
+ &:focus,
+ &:hover {
+ border-color: lighten($ui-primary-color, 4%);
+ color: lighten($ui-primary-color, 4%);
+ }
+ }
+
+ &.button--block {
+ display: block;
+ width: 100%;
+ }
+}
+
+.column__wrapper {
+ display: flex;
+ flex: 1 1 auto;
+ position: relative;
+}
+
+.column-icon {
+ background: lighten($ui-base-color, 4%);
+ color: $ui-primary-color;
+ cursor: pointer;
+ font-size: 16px;
+ padding: 15px;
+ position: absolute;
+ right: 0;
+ top: -48px;
+ z-index: 3;
+
+ &:hover {
+ color: lighten($ui-primary-color, 7%);
+ }
+}
+
+.icon-button {
+ display: inline-block;
+ padding: 0;
+ color: $ui-base-lighter-color;
+ border: none;
+ background: transparent;
+ cursor: pointer;
+ transition: color 100ms ease-in;
+
+ &:hover,
+ &:active,
+ &:focus {
+ color: lighten($ui-base-color, 33%);
+ transition: color 200ms ease-out;
+ }
+
+ &.disabled {
+ color: lighten($ui-base-color, 13%);
+ cursor: default;
+ }
+
+ &.active {
+ color: $ui-highlight-color;
+ }
+
+ &::-moz-focus-inner {
+ border: 0;
+ }
+
+ &::-moz-focus-inner,
+ &:focus,
+ &:active {
+ outline: 0 !important;
+ }
+
+ &.inverted {
+ color: lighten($ui-base-color, 33%);
+
+ &:hover,
+ &:active,
+ &:focus {
+ color: $ui-base-lighter-color;
+ }
+
+ &.disabled {
+ color: $ui-primary-color;
+ }
+
+ &.active {
+ color: $ui-highlight-color;
+
+ &.disabled {
+ color: lighten($ui-highlight-color, 13%);
+ }
+ }
+ }
+
+ &.overlayed {
+ box-sizing: content-box;
+ background: rgba($base-overlay-background, 0.6);
+ color: rgba($primary-text-color, 0.7);
+ border-radius: 4px;
+ padding: 2px;
+
+ &:hover {
+ background: rgba($base-overlay-background, 0.9);
+ }
+ }
+}
+
+.text-icon-button {
+ color: lighten($ui-base-color, 33%);
+ border: none;
+ background: transparent;
+ cursor: pointer;
+ font-weight: 600;
+ font-size: 11px;
+ padding: 0 3px;
+ line-height: 27px;
+ outline: 0;
+ transition: color 100ms ease-in;
+
+ &:hover,
+ &:active,
+ &:focus {
+ color: $ui-base-lighter-color;
+ transition: color 200ms ease-out;
+ }
+
+ &.disabled {
+ color: lighten($ui-base-color, 13%);
+ cursor: default;
+ }
+
+ &.active {
+ color: $ui-highlight-color;
+ }
+
+ &::-moz-focus-inner {
+ border: 0;
+ }
+
+ &::-moz-focus-inner,
+ &:focus,
+ &:active {
+ outline: 0 !important;
+ }
+}
+
+.dropdown-menu {
+ position: absolute;
+}
+
+.dropdown--active .icon-button {
+ color: $ui-highlight-color;
+}
+
+.dropdown--active::after {
+ @media screen and (min-width: 631px) {
+ content: "";
+ display: block;
+ position: absolute;
+ width: 0;
+ height: 0;
+ border-style: solid;
+ border-width: 0 4.5px 7.8px;
+ border-color: transparent transparent $ui-secondary-color;
+ bottom: 8px;
+ right: 104px;
+ }
+}
+
+.invisible {
+ font-size: 0;
+ line-height: 0;
+ display: inline-block;
+ width: 0;
+ height: 0;
+ position: absolute;
+
+ img,
+ svg {
+ margin: 0 !important;
+ border: 0 !important;
+ padding: 0 !important;
+ width: 0 !important;
+ height: 0 !important;
+ }
+}
+
+.ellipsis {
+ &::after {
+ content: "…";
+ }
+}
+
+.lightbox .icon-button {
+ color: $ui-base-color;
+}
+
+.compose-form {
+ padding: 10px;
+}
+
+.compose-form__warning {
+ color: darken($ui-secondary-color, 65%);
+ margin-bottom: 15px;
+ background: $ui-primary-color;
+ box-shadow: 0 2px 6px rgba($base-shadow-color, 0.3);
+ padding: 8px 10px;
+ border-radius: 4px;
+ font-size: 13px;
+ font-weight: 400;
+
+ strong {
+ color: darken($ui-secondary-color, 65%);
+ font-weight: 500;
+ }
+
+ a {
+ color: darken($ui-primary-color, 33%);
+ font-weight: 500;
+ text-decoration: underline;
+
+ &:hover,
+ &:active,
+ &:focus {
+ text-decoration: none;
+ }
+ }
+}
+
+.compose-form__modifiers {
+ color: $ui-base-color;
+ font-family: inherit;
+ font-size: 14px;
+ background: $simple-background-color;
+ border-radius: 0 0 4px;
+}
+
+.compose-form__buttons-wrapper {
+ display: flex;
+ justify-content: space-between;
+}
+
+.compose-form__buttons {
+ padding: 10px;
+ background: darken($simple-background-color, 8%);
+ box-shadow: inset 0 5px 5px rgba($base-shadow-color, 0.05);
+ border-radius: 0 0 4px 4px;
+ display: flex;
+
+ .icon-button {
+ box-sizing: content-box;
+ padding: 0 3px;
+ }
+}
+
+.compose-form__upload-button-icon {
+ line-height: 27px;
+}
+
+.compose-form__sensitive-button {
+ display: none;
+
+ &.compose-form__sensitive-button--visible {
+ display: block;
+ }
+
+ .compose-form__sensitive-button__icon {
+ line-height: 27px;
+ }
+}
+
+.compose-form__upload-wrapper {
+ overflow: hidden;
+}
+
+.compose-form__uploads-wrapper {
+ display: flex;
+ flex-direction: row;
+ padding: 5px;
+ flex-wrap: wrap;
+}
+
+.compose-form__upload {
+ flex: 1 1 0;
+ min-width: 40%;
+ margin: 5px;
+
+ &-description {
+ position: absolute;
+ z-index: 2;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ box-sizing: border-box;
+ background: linear-gradient(0deg, rgba($base-shadow-color, 0.8) 0, rgba($base-shadow-color, 0.35) 80%, transparent);
+ padding: 10px;
+ opacity: 0;
+ transition: opacity .1s ease;
+
+ input {
+ background: transparent;
+ color: $ui-secondary-color;
+ border: 0;
+ padding: 0;
+ margin: 0;
+ width: 100%;
+ font-family: inherit;
+ font-size: 14px;
+ font-weight: 500;
+
+ &:focus {
+ color: $white;
+ }
+
+ &::placeholder {
+ opacity: 0.54;
+ color: $ui-secondary-color;
+ }
+ }
+
+ &.active {
+ opacity: 1;
+ }
+ }
+
+ .icon-button {
+ mix-blend-mode: difference;
+ }
+}
+
+.compose-form__upload-thumbnail {
+ border-radius: 4px;
+ background-position: center;
+ background-size: cover;
+ background-repeat: no-repeat;
+ height: 100px;
+ width: 100%;
+}
+
+.compose-form__label {
+ display: block;
+ line-height: 24px;
+ vertical-align: middle;
+
+ &.with-border {
+ border-top: 1px solid $ui-base-color;
+ padding-top: 10px;
+ }
+
+ .compose-form__label__text {
+ display: inline-block;
+ vertical-align: middle;
+ margin-bottom: 14px;
+ margin-left: 8px;
+ color: $ui-primary-color;
+ }
+}
+
+.compose-form__textarea,
+.follow-form__input {
+ background: $simple-background-color;
+
+ &:disabled {
+ background: $ui-secondary-color;
+ }
+}
+
+.compose-form__autosuggest-wrapper {
+ position: relative;
+
+ .emoji-picker-dropdown {
+ position: absolute;
+ right: 5px;
+ top: 5px;
+
+ ::-webkit-scrollbar-track:hover,
+ ::-webkit-scrollbar-track:active {
+ background-color: rgba($base-overlay-background, 0.3);
+ }
+ }
+}
+
+.compose-form__publish {
+ display: flex;
+ min-width: 0;
+}
+
+.compose-form__publish-button-wrapper {
+ overflow: hidden;
+ padding-top: 10px;
+}
+
+.emojione {
+ display: inline-block;
+ font-size: inherit;
+ vertical-align: middle;
+ object-fit: contain;
+ margin: -.2ex .15em .2ex;
+ width: 16px;
+ height: 16px;
+
+ img {
+ width: auto;
+ }
+}
+
+.reply-indicator {
+ border-radius: 4px 4px 0 0;
+ position: relative;
+ bottom: -2px;
+ background: $ui-primary-color;
+ padding: 10px;
+}
+
+.reply-indicator__header {
+ margin-bottom: 5px;
+ overflow: hidden;
+}
+
+.reply-indicator__cancel {
+ float: right;
+ line-height: 24px;
+}
+
+.reply-indicator__display-name {
+ color: $ui-base-color;
+ display: block;
+ max-width: 100%;
+ line-height: 24px;
+ overflow: hidden;
+ padding-right: 25px;
+ text-decoration: none;
+}
+
+.reply-indicator__display-avatar {
+ float: left;
+ margin-right: 5px;
+}
+
+.status__content--with-action {
+ cursor: pointer;
+}
+
+.status__content,
+.reply-indicator__content {
+ font-size: 15px;
+ line-height: 20px;
+ word-wrap: break-word;
+ font-weight: 400;
+ overflow: hidden;
+ white-space: pre-wrap;
+ padding-top: 5px;
+
+ &.status__content--with-spoiler {
+ white-space: normal;
+
+ .status__content__text {
+ white-space: pre-wrap;
+ }
+ }
+
+ .emojione {
+ width: 20px;
+ height: 20px;
+ margin: -5px 0 0;
+ }
+
+ p {
+ margin-bottom: 20px;
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+ }
+
+ a {
+ color: $ui-secondary-color;
+ text-decoration: none;
+
+ &:hover {
+ text-decoration: underline;
+
+ .fa {
+ color: lighten($ui-base-color, 40%);
+ }
+ }
+
+ &.mention {
+ &:hover {
+ text-decoration: none;
+
+ span {
+ text-decoration: underline;
+ }
+ }
+ }
+
+ .fa {
+ color: lighten($ui-base-color, 30%);
+ }
+ }
+
+ .status__content__spoiler-link {
+ background: lighten($ui-base-color, 30%);
+
+ &:hover {
+ background: lighten($ui-base-color, 33%);
+ text-decoration: none;
+ }
+ }
+
+ .status__content__text {
+ display: none;
+
+ &.status__content__text--visible {
+ display: block;
+ }
+ }
+}
+
+.status__content__spoiler-link {
+ display: inline-block;
+ border-radius: 2px;
+ background: transparent;
+ border: 0;
+ color: lighten($ui-base-color, 8%);
+ font-weight: 500;
+ font-size: 11px;
+ padding: 0 6px;
+ text-transform: uppercase;
+ line-height: inherit;
+ cursor: pointer;
+}
+
+.status__prepend-icon-wrapper {
+ left: -26px;
+ position: absolute;
+}
+
+.focusable {
+ &:focus {
+ outline: 0;
+ background: lighten($ui-base-color, 4%);
+
+ .status.status-direct {
+ background: lighten($ui-base-color, 12%);
+ }
+
+ .detailed-status,
+ .detailed-status__action-bar {
+ background: lighten($ui-base-color, 8%);
+ }
+ }
+}
+
+.status {
+ padding: 8px 10px;
+ padding-left: 68px;
+ position: relative;
+ min-height: 48px;
+ border-bottom: 1px solid lighten($ui-base-color, 8%);
+ cursor: default;
+
+ @supports (-ms-overflow-style: -ms-autohiding-scrollbar) {
+ // Add margin to avoid Edge auto-hiding scrollbar appearing over content.
+ // On Edge 16 this is 16px and Edge <=15 it's 12px, so aim for 16px.
+ padding-right: 26px; // 10px + 16px
+ }
+
+ @keyframes fade {
+ 0% { opacity: 0; }
+ 100% { opacity: 1; }
+ }
+
+ opacity: 1;
+ animation: fade 150ms linear;
+
+ .video-player {
+ margin-top: 8px;
+ }
+
+ &.status-direct {
+ background: lighten($ui-base-color, 8%);
+
+ .icon-button.disabled {
+ color: lighten($ui-base-color, 16%);
+ }
+ }
+
+ &.light {
+ .status__relative-time {
+ color: $ui-primary-color;
+ }
+
+ .status__display-name {
+ color: $ui-base-color;
+ }
+
+ .display-name {
+ strong {
+ color: $ui-base-color;
+ }
+
+ span {
+ color: $ui-primary-color;
+ }
+ }
+
+ .status__content {
+ color: $ui-base-color;
+
+ a {
+ color: $ui-highlight-color;
+ }
+
+ a.status__content__spoiler-link {
+ color: $primary-text-color;
+ background: $ui-primary-color;
+
+ &:hover {
+ background: lighten($ui-primary-color, 8%);
+ }
+ }
+ }
+ }
+}
+
+.notification-favourite {
+ .status.status-direct {
+ background: transparent;
+
+ .icon-button.disabled {
+ color: lighten($ui-base-color, 13%);
+ }
+ }
+}
+
+.status__relative-time {
+ color: $ui-base-lighter-color;
+ float: right;
+ font-size: 14px;
+}
+
+.status__display-name {
+ color: $ui-base-lighter-color;
+}
+
+.status__info .status__display-name {
+ display: block;
+ max-width: 100%;
+ padding-right: 25px;
+}
+
+.status__info {
+ font-size: 15px;
+}
+
+.status-check-box {
+ border-bottom: 1px solid $ui-secondary-color;
+ display: flex;
+
+ .status__content {
+ flex: 1 1 auto;
+ padding: 10px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+}
+
+.status-check-box-toggle {
+ align-items: center;
+ display: flex;
+ flex: 0 0 auto;
+ justify-content: center;
+ padding: 10px;
+}
+
+.status__prepend {
+ margin-left: 68px;
+ color: $ui-base-lighter-color;
+ padding: 8px 0;
+ padding-bottom: 2px;
+ font-size: 14px;
+ position: relative;
+
+ .status__display-name strong {
+ color: $ui-base-lighter-color;
+ }
+
+ > span {
+ display: block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+}
+
+.status__action-bar {
+ align-items: center;
+ display: flex;
+ margin-top: 5px;
+}
+
+.status__action-bar-button {
+ float: left;
+ margin-right: 18px;
+}
+
+.status__action-bar-dropdown {
+ float: left;
+ height: 23.15px;
+ width: 23.15px;
+}
+
+.detailed-status__action-bar-dropdown {
+ flex: 1 1 auto;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ position: relative;
+}
+
+.detailed-status {
+ background: lighten($ui-base-color, 4%);
+ padding: 14px 10px;
+
+ .status__content {
+ font-size: 19px;
+ line-height: 24px;
+
+ .emojione {
+ width: 24px;
+ height: 24px;
+ margin: -5px 0 0;
+ }
+ }
+
+ .video-player {
+ margin-top: 8px;
+ }
+}
+
+.detailed-status__meta {
+ margin-top: 15px;
+ color: $ui-base-lighter-color;
+ font-size: 14px;
+ line-height: 18px;
+}
+
+.detailed-status__action-bar {
+ background: lighten($ui-base-color, 4%);
+ border-top: 1px solid lighten($ui-base-color, 8%);
+ border-bottom: 1px solid lighten($ui-base-color, 8%);
+ display: flex;
+ flex-direction: row;
+ padding: 10px 0;
+}
+
+.detailed-status__link {
+ color: inherit;
+ text-decoration: none;
+}
+
+.detailed-status__favorites,
+.detailed-status__reblogs {
+ display: inline-block;
+ font-weight: 500;
+ font-size: 12px;
+ margin-left: 6px;
+}
+
+.reply-indicator__content {
+ color: $ui-base-color;
+ font-size: 14px;
+
+ a {
+ color: lighten($ui-base-color, 20%);
+ }
+}
+
+.account {
+ padding: 10px;
+ border-bottom: 1px solid lighten($ui-base-color, 8%);
+
+ .account__display-name {
+ flex: 1 1 auto;
+ display: block;
+ color: $ui-primary-color;
+ overflow: hidden;
+ text-decoration: none;
+ font-size: 14px;
+ }
+}
+
+.account__wrapper {
+ display: flex;
+}
+
+.account__avatar-wrapper {
+ float: left;
+ margin-left: 12px;
+ margin-right: 12px;
+}
+
+.account__avatar {
+ @include avatar-radius();
+ position: relative;
+ cursor: pointer;
+
+ &-inline {
+ display: inline-block;
+ vertical-align: middle;
+ margin-right: 5px;
+ }
+}
+
+.account__avatar-overlay {
+ @include avatar-size(48px);
+
+ &-base {
+ @include avatar-radius();
+ @include avatar-size(36px);
+ }
+
+ &-overlay {
+ @include avatar-radius();
+ @include avatar-size(24px);
+
+ position: absolute;
+ bottom: 0;
+ right: 0;
+ z-index: 1;
+ }
+}
+
+.account__relationship {
+ height: 18px;
+ padding: 10px;
+ white-space: nowrap;
+}
+
+.account__header {
+ flex: 0 0 auto;
+ background: lighten($ui-base-color, 4%);
+ text-align: center;
+ background-size: cover;
+ background-position: center;
+ position: relative;
+
+ & > div {
+ background: rgba(lighten($ui-base-color, 4%), 0.9);
+ padding: 20px 10px;
+ }
+
+ .account__header__content {
+ color: $ui-secondary-color;
+ }
+
+ .account__header__display-name {
+ color: $primary-text-color;
+ display: inline-block;
+ width: 100%;
+ font-size: 20px;
+ line-height: 27px;
+ font-weight: 500;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+
+ .account__header__username {
+ color: $ui-highlight-color;
+ font-size: 14px;
+ font-weight: 400;
+ display: block;
+ margin-bottom: 10px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+}
+
+.account__disclaimer {
+ padding: 10px;
+ border-top: 1px solid lighten($ui-base-color, 8%);
+ color: $ui-base-lighter-color;
+
+ strong {
+ font-weight: 500;
+ }
+
+ a {
+ font-weight: 500;
+ color: inherit;
+ text-decoration: underline;
+
+ &:hover,
+ &:focus,
+ &:active {
+ text-decoration: none;
+ }
+ }
+}
+
+.account__header__content {
+ color: $ui-primary-color;
+ font-size: 14px;
+ font-weight: 400;
+ overflow: hidden;
+ word-break: normal;
+ word-wrap: break-word;
+
+ p {
+ margin-bottom: 20px;
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+ }
+
+ a {
+ color: inherit;
+ text-decoration: underline;
+
+ &:hover {
+ text-decoration: none;
+ }
+ }
+}
+
+.account__header__display-name {
+ .emojione {
+ width: 25px;
+ height: 25px;
+ }
+}
+
+.account__action-bar {
+ border-top: 1px solid lighten($ui-base-color, 8%);
+ border-bottom: 1px solid lighten($ui-base-color, 8%);
+ line-height: 36px;
+ overflow: hidden;
+ flex: 0 0 auto;
+ display: flex;
+}
+
+.account__action-bar-dropdown {
+ flex: 0 1 calc(50% - 140px);
+ padding: 10px;
+
+ .dropdown--active {
+ .dropdown__content.dropdown__right {
+ left: 6px;
+ right: initial;
+ }
+
+ &::after {
+ bottom: initial;
+ margin-left: 11px;
+ margin-top: -7px;
+ right: initial;
+ }
+ }
+}
+
+.account__action-bar-links {
+ display: flex;
+ flex: 1 1 auto;
+ line-height: 18px;
+}
+
+.account__action-bar__tab {
+ text-decoration: none;
+ overflow: hidden;
+ flex: 0 1 80px;
+ border-left: 1px solid lighten($ui-base-color, 8%);
+ padding: 10px 5px;
+
+ & > span {
+ display: block;
+ text-transform: uppercase;
+ font-size: 11px;
+ color: $ui-primary-color;
+ }
+
+ strong {
+ display: block;
+ font-size: 15px;
+ font-weight: 500;
+ color: $primary-text-color;
+ }
+
+ abbr {
+ color: $ui-base-lighter-color;
+ }
+}
+
+.account__header__avatar {
+ background-size: 90px 90px;
+ display: block;
+ height: 90px;
+ margin: 0 auto 10px;
+ overflow: hidden;
+ width: 90px;
+}
+
+.account-authorize {
+ padding: 14px 10px;
+
+ .detailed-status__display-name {
+ display: block;
+ margin-bottom: 15px;
+ overflow: hidden;
+ }
+}
+
+.account-authorize__avatar {
+ float: left;
+ margin-right: 10px;
+}
+
+.status__display-name,
+.status__relative-time,
+.detailed-status__display-name,
+.detailed-status__datetime,
+.detailed-status__application,
+.account__display-name {
+ text-decoration: none;
+}
+
+.status__display-name,
+.account__display-name {
+ strong {
+ color: $primary-text-color;
+ }
+}
+
+.muted {
+ .emojione {
+ opacity: 0.5;
+ }
+}
+
+.status__display-name,
+.reply-indicator__display-name,
+.detailed-status__display-name,
+.account__display-name {
+ &:hover strong {
+ text-decoration: underline;
+ }
+}
+
+.account__display-name strong {
+ display: block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.detailed-status__application,
+.detailed-status__datetime {
+ color: inherit;
+}
+
+.detailed-status__display-name {
+ color: $ui-secondary-color;
+ display: block;
+ line-height: 24px;
+ margin-bottom: 15px;
+ overflow: hidden;
+
+ strong,
+ span {
+ display: block;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ }
+
+ strong {
+ font-size: 16px;
+ color: $primary-text-color;
+ }
+}
+
+.detailed-status__display-avatar {
+ float: left;
+ margin-right: 10px;
+}
+
+.status__avatar {
+ height: 48px;
+ left: 10px;
+ position: absolute;
+ top: 10px;
+ width: 48px;
+}
+
+.muted {
+ .status__content p,
+ .status__content a {
+ color: $ui-base-lighter-color;
+ }
+
+ .status__display-name strong {
+ color: $ui-base-lighter-color;
+ }
+
+ .status__avatar {
+ opacity: 0.5;
+ }
+
+ a.status__content__spoiler-link {
+ background: $ui-base-lighter-color;
+ color: lighten($ui-base-color, 4%);
+
+ &:hover {
+ background: lighten($ui-base-color, 29%);
+ text-decoration: none;
+ }
+ }
+}
+
+.notification__message {
+ margin-left: 68px;
+ padding: 8px 0;
+ padding-bottom: 0;
+ cursor: default;
+ color: $ui-primary-color;
+ font-size: 15px;
+ position: relative;
+
+ .fa {
+ color: $ui-highlight-color;
+ }
+
+ > span {
+ display: block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+}
+
+.notification__favourite-icon-wrapper {
+ left: -26px;
+ position: absolute;
+
+ .star-icon {
+ color: $gold-star;
+ }
+}
+
+.star-icon.active {
+ color: $gold-star;
+}
+
+.notification__display-name {
+ color: inherit;
+ font-weight: 500;
+ text-decoration: none;
+
+ &:hover {
+ color: $primary-text-color;
+ text-decoration: underline;
+ }
+}
+
+.display-name {
+ display: block;
+ max-width: 100%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.display-name__html {
+ font-weight: 500;
+}
+
+.display-name__account {
+ font-size: 14px;
+}
+
+.status__relative-time,
+.detailed-status__datetime {
+ &:hover {
+ text-decoration: underline;
+ }
+}
+
+.image-loader {
+ position: relative;
+
+ &.image-loader--loading {
+ .image-loader__preview-canvas {
+ filter: blur(2px);
+ }
+ }
+
+ .image-loader__img {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ max-width: 100%;
+ max-height: 100%;
+ background-image: none;
+ }
+
+ &.image-loader--amorphous {
+ position: static;
+
+ .image-loader__preview-canvas {
+ display: none;
+ }
+
+ .image-loader__img {
+ position: static;
+ width: auto;
+ height: auto;
+ }
+ }
+}
+
+.navigation-bar {
+ padding: 10px;
+ display: flex;
+ flex-shrink: 0;
+ cursor: default;
+ color: $ui-primary-color;
+
+ strong {
+ color: $primary-text-color;
+ }
+
+ .permalink {
+ text-decoration: none;
+ }
+
+ .icon-button {
+ pointer-events: none;
+ opacity: 0;
+ }
+}
+
+.navigation-bar__profile {
+ flex: 1 1 auto;
+ margin-left: 8px;
+ overflow: hidden;
+}
+
+.navigation-bar__profile-account {
+ display: block;
+ font-weight: 500;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.navigation-bar__profile-edit {
+ color: inherit;
+ text-decoration: none;
+}
+
+.dropdown {
+ display: inline-block;
+}
+
+.dropdown__content {
+ display: none;
+ position: absolute;
+}
+
+.dropdown-menu__separator {
+ border-bottom: 1px solid darken($ui-secondary-color, 8%);
+ margin: 5px 7px 6px;
+ height: 0;
+}
+
+.dropdown-menu {
+ background: $ui-secondary-color;
+ padding: 4px 0;
+ border-radius: 4px;
+ box-shadow: 2px 4px 15px rgba($base-shadow-color, 0.4);
+
+ ul {
+ list-style: none;
+ }
+}
+
+.dropdown-menu__arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+ border: 0 solid transparent;
+
+ &.left {
+ right: -5px;
+ margin-top: -5px;
+ border-width: 5px 0 5px 5px;
+ border-left-color: $ui-secondary-color;
+ }
+
+ &.top {
+ bottom: -5px;
+ margin-left: -13px;
+ border-width: 5px 7px 0;
+ border-top-color: $ui-secondary-color;
+ }
+
+ &.bottom {
+ top: -5px;
+ margin-left: -13px;
+ border-width: 0 7px 5px;
+ border-bottom-color: $ui-secondary-color;
+ }
+
+ &.right {
+ left: -5px;
+ margin-top: -5px;
+ border-width: 5px 5px 5px 0;
+ border-right-color: $ui-secondary-color;
+ }
+}
+
+.dropdown-menu__item {
+ a {
+ font-size: 13px;
+ line-height: 18px;
+ display: block;
+ padding: 4px 14px;
+ box-sizing: border-box;
+ text-decoration: none;
+ background: $ui-secondary-color;
+ color: $ui-base-color;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+
+ &:focus,
+ &:hover,
+ &:active {
+ background: $ui-highlight-color;
+ color: $ui-secondary-color;
+ outline: 0;
+ }
+ }
+}
+
+.dropdown--active .dropdown__content {
+ display: block;
+ line-height: 18px;
+ max-width: 311px;
+ right: 0;
+ text-align: left;
+ z-index: 9999;
+
+ & > ul {
+ list-style: none;
+ background: $ui-secondary-color;
+ padding: 4px 0;
+ border-radius: 4px;
+ box-shadow: 0 0 15px rgba($base-shadow-color, 0.4);
+ min-width: 140px;
+ position: relative;
+ }
+
+ &.dropdown__right {
+ right: 0;
+ }
+
+ &.dropdown__left {
+ & > ul {
+ left: -98px;
+ }
+ }
+
+ & > ul > li > a {
+ font-size: 13px;
+ line-height: 18px;
+ display: block;
+ padding: 4px 14px;
+ box-sizing: border-box;
+ text-decoration: none;
+ background: $ui-secondary-color;
+ color: $ui-base-color;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+
+ &:focus {
+ outline: 0;
+ }
+
+ &:hover {
+ background: $ui-highlight-color;
+ color: $ui-secondary-color;
+ }
+ }
+}
+
+.dropdown__icon {
+ vertical-align: middle;
+}
+
+.static-content {
+ padding: 10px;
+ padding-top: 20px;
+ color: $ui-base-lighter-color;
+
+ h1 {
+ font-size: 16px;
+ font-weight: 500;
+ margin-bottom: 40px;
+ text-align: center;
+ }
+
+ p {
+ font-size: 13px;
+ margin-bottom: 20px;
+ }
+}
+
+.columns-area {
+ display: flex;
+ flex: 1 1 auto;
+ flex-direction: row;
+ justify-content: flex-start;
+ overflow-x: auto;
+ position: relative;
+}
+
+@media screen and (min-width: 360px) {
+ .columns-area {
+ padding: 10px;
+ }
+
+ .react-swipeable-view-container .columns-area {
+ height: calc(100% - 20px) !important;
+ }
+}
+
+.react-swipeable-view-container {
+ &,
+ .columns-area,
+ .drawer,
+ .column {
+ height: 100%;
+ }
+}
+
+.react-swipeable-view-container > * {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 100%;
+}
+
+.column {
+ width: 330px;
+ position: relative;
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+
+ > .scrollable {
+ background: $ui-base-color;
+ }
+}
+
+.ui {
+ flex: 0 0 auto;
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+ background: darken($ui-base-color, 7%);
+}
+
+.drawer {
+ width: 300px;
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ overflow-y: hidden;
+}
+
+.drawer__tab {
+ display: block;
+ flex: 1 1 auto;
+ padding: 15px 5px 13px;
+ color: $ui-primary-color;
+ text-decoration: none;
+ text-align: center;
+ font-size: 16px;
+ border-bottom: 2px solid transparent;
+}
+
+.column,
+.drawer {
+ flex: 1 1 100%;
+ overflow: hidden;
+}
+
+@media screen and (min-width: 360px) {
+ .tabs-bar {
+ margin: 10px;
+ margin-bottom: 0;
+ }
+
+ .search {
+ margin-bottom: 10px;
+ }
+}
+
+@media screen and (max-width: 630px) {
+ .column,
+ .drawer {
+ width: 100%;
+ padding: 0;
+ }
+
+ .columns-area {
+ flex-direction: column;
+ }
+
+ .search__input,
+ .autosuggest-textarea__textarea {
+ font-size: 16px;
+ }
+}
+
+@media screen and (min-width: 631px) {
+ .columns-area {
+ padding: 0;
+ }
+
+ .column,
+ .drawer {
+ flex: 0 0 auto;
+ padding: 10px;
+ padding-left: 5px;
+ padding-right: 5px;
+
+ &:first-child {
+ padding-left: 10px;
+ }
+
+ &:last-child {
+ padding-right: 10px;
+ }
+ }
+
+ .columns-area > div {
+ .column,
+ .drawer {
+ padding-left: 5px;
+ padding-right: 5px;
+ }
+ }
+}
+
+.drawer__pager {
+ box-sizing: border-box;
+ padding: 0;
+ flex-grow: 1;
+ position: relative;
+ overflow: hidden;
+ display: flex;
+}
+
+.drawer__inner {
+ position: absolute;
+ top: 0;
+ left: 0;
+ background: lighten($ui-base-color, 13%);
+ box-sizing: border-box;
+ padding: 0;
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+ overflow-y: auto;
+ width: 100%;
+ height: 100%;
+
+ &.darker {
+ background: $ui-base-color;
+ }
+}
+
+.pseudo-drawer {
+ background: lighten($ui-base-color, 13%);
+ font-size: 13px;
+ text-align: left;
+}
+
+.drawer__header {
+ flex: 0 0 auto;
+ font-size: 16px;
+ background: lighten($ui-base-color, 8%);
+ margin-bottom: 10px;
+ display: flex;
+ flex-direction: row;
+
+ a {
+ transition: background 100ms ease-in;
+
+ &:hover {
+ background: lighten($ui-base-color, 3%);
+ transition: background 200ms ease-out;
+ }
+ }
+}
+
+.tabs-bar {
+ display: flex;
+ background: lighten($ui-base-color, 8%);
+ flex: 0 0 auto;
+ overflow-y: auto;
+}
+
+.tabs-bar__link {
+ display: block;
+ flex: 1 1 auto;
+ padding: 15px 10px;
+ color: $primary-text-color;
+ text-decoration: none;
+ text-align: center;
+ font-size: 14px;
+ font-weight: 500;
+ border-bottom: 2px solid lighten($ui-base-color, 8%);
+ transition: all 200ms linear;
+
+ .fa {
+ font-weight: 400;
+ font-size: 16px;
+ }
+
+ &.active {
+ border-bottom: 2px solid $ui-highlight-color;
+ color: $ui-highlight-color;
+ }
+
+ &:hover,
+ &:focus,
+ &:active {
+ @media screen and (min-width: 631px) {
+ background: lighten($ui-base-color, 14%);
+ transition: all 100ms linear;
+ }
+ }
+
+ span {
+ margin-left: 5px;
+ display: none;
+ }
+}
+
+@media screen and (min-width: 600px) {
+ .tabs-bar__link {
+ span {
+ display: inline;
+ }
+ }
+}
+
+@media screen and (min-width: 631px) {
+ .tabs-bar {
+ display: none;
+ }
+}
+
+.scrollable {
+ overflow-y: scroll;
+ overflow-x: hidden;
+ flex: 1 1 auto;
+ -webkit-overflow-scrolling: touch;
+ will-change: transform; // improves perf in mobile Chrome
+
+ &.optionally-scrollable {
+ overflow-y: auto;
+ }
+
+ @supports(display: grid) { // hack to fix Chrome <57
+ contain: strict;
+ }
+}
+
+.scrollable.fullscreen {
+ @supports(display: grid) { // hack to fix Chrome <57
+ contain: none;
+ }
+}
+
+.column-back-button {
+ background: lighten($ui-base-color, 4%);
+ color: $ui-highlight-color;
+ cursor: pointer;
+ flex: 0 0 auto;
+ font-size: 16px;
+ border: 0;
+ text-align: unset;
+ padding: 15px;
+ margin: 0;
+ z-index: 3;
+
+ &:hover {
+ text-decoration: underline;
+ }
+}
+
+.column-header__back-button {
+ background: lighten($ui-base-color, 4%);
+ border: 0;
+ font-family: inherit;
+ color: $ui-highlight-color;
+ cursor: pointer;
+ flex: 0 0 auto;
+ font-size: 16px;
+ padding: 0 5px 0 0;
+ z-index: 3;
+
+ &:hover {
+ text-decoration: underline;
+ }
+
+ &:last-child {
+ padding: 0 15px 0 0;
+ }
+}
+
+.column-back-button__icon {
+ display: inline-block;
+ margin-right: 5px;
+}
+
+.column-back-button--slim {
+ position: relative;
+}
+
+.column-back-button--slim-button {
+ cursor: pointer;
+ flex: 0 0 auto;
+ font-size: 16px;
+ padding: 15px;
+ position: absolute;
+ right: 0;
+ top: -48px;
+}
+
+.react-toggle {
+ display: inline-block;
+ position: relative;
+ cursor: pointer;
+ background-color: transparent;
+ border: 0;
+ padding: 0;
+ user-select: none;
+ -webkit-tap-highlight-color: rgba($base-overlay-background, 0);
+ -webkit-tap-highlight-color: transparent;
+}
+
+.react-toggle-screenreader-only {
+ border: 0;
+ clip: rect(0 0 0 0);
+ height: 1px;
+ margin: -1px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ width: 1px;
+}
+
+.react-toggle--disabled {
+ cursor: not-allowed;
+ opacity: 0.5;
+ transition: opacity 0.25s;
+}
+
+.react-toggle-track {
+ width: 50px;
+ height: 24px;
+ padding: 0;
+ border-radius: 30px;
+ background-color: $ui-base-color;
+ transition: all 0.2s ease;
+}
+
+.react-toggle:hover:not(.react-toggle--disabled) .react-toggle-track {
+ background-color: darken($ui-base-color, 10%);
+}
+
+.react-toggle--checked .react-toggle-track {
+ background-color: $ui-highlight-color;
+}
+
+.react-toggle--checked:hover:not(.react-toggle--disabled) .react-toggle-track {
+ background-color: lighten($ui-highlight-color, 10%);
+}
+
+.react-toggle-track-check {
+ position: absolute;
+ width: 14px;
+ height: 10px;
+ top: 0;
+ bottom: 0;
+ margin-top: auto;
+ margin-bottom: auto;
+ line-height: 0;
+ left: 8px;
+ opacity: 0;
+ transition: opacity 0.25s ease;
+}
+
+.react-toggle--checked .react-toggle-track-check {
+ opacity: 1;
+ transition: opacity 0.25s ease;
+}
+
+.react-toggle-track-x {
+ position: absolute;
+ width: 10px;
+ height: 10px;
+ top: 0;
+ bottom: 0;
+ margin-top: auto;
+ margin-bottom: auto;
+ line-height: 0;
+ right: 10px;
+ opacity: 1;
+ transition: opacity 0.25s ease;
+}
+
+.react-toggle--checked .react-toggle-track-x {
+ opacity: 0;
+}
+
+.react-toggle-thumb {
+ transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0ms;
+ position: absolute;
+ top: 1px;
+ left: 1px;
+ width: 22px;
+ height: 22px;
+ border: 1px solid $ui-base-color;
+ border-radius: 50%;
+ background-color: darken($simple-background-color, 2%);
+ box-sizing: border-box;
+ transition: all 0.25s ease;
+}
+
+.react-toggle--checked .react-toggle-thumb {
+ left: 27px;
+ border-color: $ui-highlight-color;
+}
+
+.column-link {
+ background: lighten($ui-base-color, 8%);
+ color: $primary-text-color;
+ display: block;
+ font-size: 16px;
+ padding: 15px;
+ text-decoration: none;
+
+ &:hover {
+ background: lighten($ui-base-color, 11%);
+ }
+}
+
+.column-link__icon {
+ display: inline-block;
+ margin-right: 5px;
+}
+
+.column-subheading {
+ background: $ui-base-color;
+ color: $ui-base-lighter-color;
+ padding: 8px 20px;
+ font-size: 12px;
+ font-weight: 500;
+ text-transform: uppercase;
+ cursor: default;
+}
+
+.autosuggest-textarea,
+.spoiler-input {
+ position: relative;
+}
+
+.autosuggest-textarea__textarea,
+.spoiler-input__input {
+ display: block;
+ box-sizing: border-box;
+ width: 100%;
+ margin: 0;
+ color: $ui-base-color;
+ background: $simple-background-color;
+ padding: 10px;
+ font-family: inherit;
+ font-size: 14px;
+ resize: vertical;
+ border: 0;
+ outline: 0;
+
+ &:focus {
+ outline: 0;
+ }
+
+ @media screen and (max-width: 600px) {
+ font-size: 16px;
+ }
+}
+
+.spoiler-input__input {
+ border-radius: 4px;
+}
+
+.autosuggest-textarea__textarea {
+ min-height: 100px;
+ border-radius: 4px 4px 0 0;
+ padding-bottom: 0;
+ padding-right: 10px + 22px;
+ resize: none;
+
+ @media screen and (max-width: 600px) {
+ height: 100px !important; // prevent auto-resize textarea
+ resize: vertical;
+ }
+}
+
+.autosuggest-textarea__suggestions {
+ box-sizing: border-box;
+ display: none;
+ position: absolute;
+ top: 100%;
+ width: 100%;
+ z-index: 99;
+ box-shadow: 4px 4px 6px rgba($base-shadow-color, 0.4);
+ background: $ui-secondary-color;
+ border-radius: 0 0 4px 4px;
+ color: $ui-base-color;
+ font-size: 14px;
+ padding: 6px;
+
+ &.autosuggest-textarea__suggestions--visible {
+ display: block;
+ }
+}
+
+.autosuggest-textarea__suggestions__item {
+ padding: 10px;
+ cursor: pointer;
+ border-radius: 4px;
+
+ &:hover,
+ &:focus,
+ &:active,
+ &.selected {
+ background: darken($ui-secondary-color, 10%);
+ }
+}
+
+.autosuggest-account,
+.autosuggest-emoji {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: flex-start;
+ line-height: 18px;
+ font-size: 14px;
+}
+
+.autosuggest-account-icon,
+.autosuggest-emoji img {
+ display: block;
+ margin-right: 8px;
+ width: 16px;
+ height: 16px;
+}
+
+.autosuggest-account .display-name__account {
+ color: lighten($ui-base-color, 36%);
+}
+
+.character-counter__wrapper {
+ line-height: 36px;
+ margin: 0 16px 0 8px;
+ padding-top: 10px;
+}
+
+.character-counter {
+ cursor: default;
+ font-size: 16px;
+}
+
+.character-counter--over {
+ color: $warning-red;
+}
+
+.getting-started__wrapper {
+ position: relative;
+ overflow-y: auto;
+}
+
+.getting-started__footer {
+ display: flex;
+ flex-direction: column;
+}
+
+.getting-started {
+ box-sizing: border-box;
+ padding-bottom: 235px;
+ background: url('../images/mastodon-getting-started.png') no-repeat 0 100%;
+ flex: 1 0 auto;
+
+ p {
+ color: $ui-secondary-color;
+ }
+
+ a {
+ color: $ui-base-lighter-color;
+ }
+}
+
+.setting-text {
+ color: $ui-primary-color;
+ background: transparent;
+ border: none;
+ border-bottom: 2px solid $ui-primary-color;
+ box-sizing: border-box;
+ display: block;
+ font-family: inherit;
+ margin-bottom: 10px;
+ padding: 7px 0;
+ width: 100%;
+
+ &:focus,
+ &:active {
+ color: $primary-text-color;
+ border-bottom-color: $ui-highlight-color;
+ }
+
+ @media screen and (max-width: 600px) {
+ font-size: 16px;
+ }
+
+ &.light {
+ color: $ui-base-color;
+ border-bottom: 2px solid lighten($ui-base-color, 27%);
+
+ &:focus,
+ &:active {
+ color: $ui-base-color;
+ border-bottom-color: $ui-highlight-color;
+ }
+ }
+}
+
+@import 'boost';
+
+button.icon-button i.fa-retweet {
+ background-position: 0 0;
+ height: 19px;
+ transition: background-position 0.9s steps(10);
+ transition-duration: 0s;
+ vertical-align: middle;
+ width: 22px;
+
+ &::before {
+ display: none !important;
+ }
+}
+
+button.icon-button.active i.fa-retweet {
+ transition-duration: 0.9s;
+ background-position: 0 100%;
+}
+
+.status-card {
+ display: flex;
+ cursor: pointer;
+ font-size: 14px;
+ border: 1px solid lighten($ui-base-color, 8%);
+ border-radius: 4px;
+ color: $ui-base-lighter-color;
+ margin-top: 14px;
+ text-decoration: none;
+ overflow: hidden;
+
+ &:hover {
+ background: lighten($ui-base-color, 8%);
+ }
+}
+
+.status-card-video,
+.status-card-rich,
+.status-card-photo {
+ margin-top: 14px;
+ overflow: hidden;
+
+ iframe {
+ width: 100%;
+ height: auto;
+ }
+}
+
+.status-card-photo {
+ display: block;
+ text-decoration: none;
+
+ img {
+ display: block;
+ width: 100%;
+ height: auto;
+ margin: 0;
+ }
+}
+
+.status-card-video {
+ iframe {
+ width: 100%;
+ height: 100%;
+ }
+}
+
+.status-card__title {
+ display: block;
+ font-weight: 500;
+ margin-bottom: 5px;
+ color: $ui-primary-color;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.status-card__content {
+ flex: 1 1 auto;
+ overflow: hidden;
+ padding: 14px 14px 14px 8px;
+}
+
+.status-card__description {
+ color: $ui-primary-color;
+}
+
+.status-card__host {
+ display: block;
+ margin-top: 5px;
+ font-size: 13px;
+}
+
+.status-card__image {
+ flex: 0 0 100px;
+ background: lighten($ui-base-color, 8%);
+}
+
+.status-card.horizontal {
+ display: block;
+
+ .status-card__image {
+ width: 100%;
+ }
+
+ .status-card__image-image {
+ border-radius: 4px 4px 0 0;
+ }
+}
+
+.status-card__image-image {
+ border-radius: 4px 0 0 4px;
+ display: block;
+ height: auto;
+ margin: 0;
+ width: 100%;
+}
+
+.load-more {
+ display: block;
+ color: $ui-base-lighter-color;
+ background-color: transparent;
+ border: 0;
+ font-size: inherit;
+ text-align: center;
+ line-height: inherit;
+ margin: 0;
+ padding: 15px;
+ width: 100%;
+ clear: both;
+
+ &:hover {
+ background: lighten($ui-base-color, 2%);
+ }
+}
+
+.missing-indicator {
+ text-align: center;
+ font-size: 16px;
+ font-weight: 500;
+ color: lighten($ui-base-color, 16%);
+ background: $ui-base-color;
+ cursor: default;
+ display: flex;
+ flex: 1 1 auto;
+ align-items: center;
+ justify-content: center;
+
+ & > div {
+ background: url('../images/mastodon-not-found.png') no-repeat center -50px;
+ padding-top: 210px;
+ width: 100%;
+ }
+}
+
+.column-header__wrapper {
+ position: relative;
+ flex: 0 0 auto;
+
+ &.active {
+ &::before {
+ display: block;
+ content: "";
+ position: absolute;
+ top: 35px;
+ left: 0;
+ right: 0;
+ margin: 0 auto;
+ width: 60%;
+ pointer-events: none;
+ height: 28px;
+ z-index: 1;
+ background: radial-gradient(ellipse, rgba($ui-highlight-color, 0.23) 0%, rgba($ui-highlight-color, 0) 60%);
+ }
+ }
+}
+
+.column-header {
+ display: flex;
+ padding: 15px;
+ font-size: 16px;
+ background: lighten($ui-base-color, 4%);
+ flex: 0 0 auto;
+ cursor: pointer;
+ position: relative;
+ z-index: 2;
+ outline: 0;
+
+ &.active {
+ box-shadow: 0 1px 0 rgba($ui-highlight-color, 0.3);
+
+ .column-header__icon {
+ color: $ui-highlight-color;
+ text-shadow: 0 0 10px rgba($ui-highlight-color, 0.4);
+ }
+ }
+
+ &:focus,
+ &:active {
+ outline: 0;
+ }
+}
+
+.column-header__buttons {
+ height: 48px;
+ display: flex;
+ margin: -15px;
+ margin-left: 0;
+}
+
+.column-header__button {
+ background: lighten($ui-base-color, 4%);
+ border: 0;
+ color: $ui-primary-color;
+ cursor: pointer;
+ font-size: 16px;
+ padding: 0 15px;
+
+ &:hover {
+ color: lighten($ui-primary-color, 7%);
+ }
+
+ &.active {
+ color: $primary-text-color;
+ background: lighten($ui-base-color, 8%);
+
+ &:hover {
+ color: $primary-text-color;
+ background: lighten($ui-base-color, 8%);
+ }
+ }
+}
+
+.column-header__collapsible {
+ max-height: 70vh;
+ overflow: hidden;
+ overflow-y: auto;
+ color: $ui-primary-color;
+ transition: max-height 150ms ease-in-out, opacity 300ms linear;
+ opacity: 1;
+
+ &.collapsed {
+ max-height: 0;
+ opacity: 0.5;
+ }
+
+ &.animating {
+ overflow-y: hidden;
+ }
+}
+
+.column-header__collapsible-inner {
+ background: lighten($ui-base-color, 8%);
+ padding: 15px;
+}
+
+.column-header__setting-btn {
+ &:hover {
+ color: lighten($ui-primary-color, 4%);
+ text-decoration: underline;
+ }
+}
+
+.column-header__setting-arrows {
+ float: right;
+
+ .column-header__setting-btn {
+ padding: 0 10px;
+
+ &:last-child {
+ padding-right: 0;
+ }
+ }
+}
+
+.column-header__title {
+ display: inline-block;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ flex: 1;
+}
+
+.text-btn {
+ display: inline-block;
+ padding: 0;
+ font-family: inherit;
+ font-size: inherit;
+ color: inherit;
+ border: 0;
+ background: transparent;
+ cursor: pointer;
+}
+
+.column-header__icon {
+ display: inline-block;
+ margin-right: 5px;
+}
+
+.loading-indicator {
+ color: lighten($ui-base-color, 26%);
+ font-size: 12px;
+ font-weight: 400;
+ text-transform: uppercase;
+ overflow: visible;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+
+ span {
+ display: block;
+ float: left;
+ margin-left: 50%;
+ transform: translateX(-50%);
+ margin: 82px 0 0 50%;
+ white-space: nowrap;
+ animation: loader-label 1.15s infinite cubic-bezier(0.215, 0.610, 0.355, 1.000);
+ }
+}
+
+.loading-indicator__figure {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ width: 0;
+ height: 0;
+ box-sizing: border-box;
+ border: 0 solid lighten($ui-base-color, 26%);
+ border-radius: 50%;
+ animation: loader-figure 1.15s infinite cubic-bezier(0.215, 0.610, 0.355, 1.000);
+}
+
+@keyframes loader-figure {
+ 0% {
+ width: 0;
+ height: 0;
+ background-color: lighten($ui-base-color, 26%);
+ }
+
+ 29% {
+ background-color: lighten($ui-base-color, 26%);
+ }
+
+ 30% {
+ width: 42px;
+ height: 42px;
+ background-color: transparent;
+ border-width: 21px;
+ opacity: 1;
+ }
+
+ 100% {
+ width: 42px;
+ height: 42px;
+ border-width: 0;
+ opacity: 0;
+ background-color: transparent;
+ }
+}
+
+@keyframes loader-label {
+ 0% { opacity: 0.25; }
+ 30% { opacity: 1; }
+ 100% { opacity: 0.25; }
+}
+
+.video-error-cover {
+ align-items: center;
+ background: $base-overlay-background;
+ color: $primary-text-color;
+ cursor: pointer;
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ justify-content: center;
+ margin-top: 8px;
+ position: relative;
+ text-align: center;
+ z-index: 100;
+}
+
+.media-spoiler {
+ background: $base-overlay-background;
+ color: $ui-primary-color;
+ border: 0;
+ width: 100%;
+ height: 100%;
+
+ &:hover,
+ &:active,
+ &:focus {
+ color: lighten($ui-primary-color, 8%);
+ }
+}
+
+.media-spoiler__warning {
+ display: block;
+ font-size: 14px;
+}
+
+.media-spoiler__trigger {
+ display: block;
+ font-size: 11px;
+ font-weight: 500;
+}
+
+.spoiler-button {
+ display: none;
+ left: 4px;
+ position: absolute;
+ text-shadow: 0 1px 1px $base-shadow-color, 1px 0 1px $base-shadow-color;
+ top: 4px;
+ z-index: 100;
+
+ &.spoiler-button--visible {
+ display: block;
+ }
+}
+
+.modal-container--preloader {
+ background: lighten($ui-base-color, 8%);
+}
+
+.account--panel {
+ background: lighten($ui-base-color, 4%);
+ border-top: 1px solid lighten($ui-base-color, 8%);
+ border-bottom: 1px solid lighten($ui-base-color, 8%);
+ display: flex;
+ flex-direction: row;
+ padding: 10px 0;
+}
+
+.account--panel__button,
+.detailed-status__button {
+ flex: 1 1 auto;
+ text-align: center;
+}
+
+.column-settings__outer {
+ background: lighten($ui-base-color, 8%);
+ padding: 15px;
+}
+
+.column-settings__section {
+ color: $ui-primary-color;
+ cursor: default;
+ display: block;
+ font-weight: 500;
+ margin-bottom: 10px;
+}
+
+.column-settings__row {
+ .text-btn {
+ margin-bottom: 15px;
+ }
+}
+
+.modal-container__nav {
+ align-items: center;
+ background: rgba($base-overlay-background, 0.5);
+ box-sizing: border-box;
+ border: 0;
+ color: $primary-text-color;
+ cursor: pointer;
+ display: flex;
+ font-size: 24px;
+ height: 100%;
+ padding: 30px 15px;
+ position: absolute;
+ top: 0;
+}
+
+.modal-container__nav--left {
+ left: -61px;
+}
+
+.modal-container__nav--right {
+ right: -61px;
+}
+
+.account--follows-info {
+ color: $primary-text-color;
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ opacity: 0.7;
+ display: inline-block;
+ vertical-align: top;
+ background-color: rgba($base-overlay-background, 0.4);
+ text-transform: uppercase;
+ font-size: 11px;
+ font-weight: 500;
+ padding: 4px;
+ border-radius: 4px;
+}
+
+.account--action-button {
+ position: absolute;
+ top: 10px;
+ right: 20px;
+}
+
+.setting-toggle {
+ display: block;
+ line-height: 24px;
+}
+
+.setting-toggle__label,
+.setting-meta__label {
+ color: $ui-primary-color;
+ display: inline-block;
+ margin-bottom: 14px;
+ margin-left: 8px;
+ vertical-align: middle;
+}
+
+.setting-meta__label {
+ color: $ui-primary-color;
+ float: right;
+}
+
+.empty-column-indicator,
+.error-column {
+ color: lighten($ui-base-color, 20%);
+ background: $ui-base-color;
+ text-align: center;
+ padding: 20px;
+ font-size: 15px;
+ font-weight: 400;
+ cursor: default;
+ display: flex;
+ flex: 1 1 auto;
+ align-items: center;
+ justify-content: center;
+ @supports(display: grid) { // hack to fix Chrome <57
+ contain: strict;
+ }
+
+ a {
+ color: $ui-highlight-color;
+ text-decoration: none;
+
+ &:hover {
+ text-decoration: underline;
+ }
+ }
+}
+
+.error-column {
+ flex-direction: column;
+}
+
+@keyframes heartbeat {
+ from {
+ transform: scale(1);
+ transform-origin: center center;
+ animation-timing-function: ease-out;
+ }
+
+ 10% {
+ transform: scale(0.91);
+ animation-timing-function: ease-in;
+ }
+
+ 17% {
+ transform: scale(0.98);
+ animation-timing-function: ease-out;
+ }
+
+ 33% {
+ transform: scale(0.87);
+ animation-timing-function: ease-in;
+ }
+
+ 45% {
+ transform: scale(1);
+ animation-timing-function: ease-out;
+ }
+}
+
+.pulse-loading {
+ animation: heartbeat 1.5s ease-in-out infinite both;
+}
+
+.emoji-picker-dropdown__menu {
+ background: $simple-background-color;
+ position: absolute;
+ box-shadow: 4px 4px 6px rgba($base-shadow-color, 0.4);
+ border-radius: 4px;
+ margin-top: 5px;
+
+ .emoji-mart-scroll {
+ transition: opacity 200ms ease;
+ }
+
+ &.selecting .emoji-mart-scroll {
+ opacity: 0.5;
+ }
+}
+
+.emoji-picker-dropdown__modifiers {
+ position: absolute;
+ top: 60px;
+ right: 11px;
+ cursor: pointer;
+}
+
+.emoji-picker-dropdown__modifiers__menu {
+ position: absolute;
+ z-index: 4;
+ top: -4px;
+ left: -8px;
+ background: $simple-background-color;
+ border-radius: 4px;
+ box-shadow: 1px 2px 6px rgba($base-shadow-color, 0.2);
+ overflow: hidden;
+
+ button {
+ display: block;
+ cursor: pointer;
+ border: 0;
+ padding: 4px 8px;
+ background: transparent;
+
+ &:hover,
+ &:focus,
+ &:active {
+ background: rgba($ui-secondary-color, 0.4);
+ }
+ }
+
+ .emoji-mart-emoji {
+ height: 22px;
+ }
+}
+
+.emoji-mart-emoji {
+ span {
+ background-repeat: no-repeat;
+ }
+}
+
+.upload-area {
+ align-items: center;
+ background: rgba($base-overlay-background, 0.8);
+ display: flex;
+ height: 100%;
+ justify-content: center;
+ left: 0;
+ opacity: 0;
+ position: absolute;
+ top: 0;
+ visibility: hidden;
+ width: 100%;
+ z-index: 2000;
+
+ * {
+ pointer-events: none;
+ }
+}
+
+.upload-area__drop {
+ width: 320px;
+ height: 160px;
+ display: flex;
+ box-sizing: border-box;
+ position: relative;
+ padding: 8px;
+}
+
+.upload-area__background {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: -1;
+ border-radius: 4px;
+ background: $ui-base-color;
+ box-shadow: 0 0 5px rgba($base-shadow-color, 0.2);
+}
+
+.upload-area__content {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: $ui-secondary-color;
+ font-size: 18px;
+ font-weight: 500;
+ border: 2px dashed $ui-base-lighter-color;
+ border-radius: 4px;
+}
+
+.upload-progress {
+ padding: 10px;
+ color: $ui-base-lighter-color;
+ overflow: hidden;
+ display: flex;
+
+ .fa {
+ font-size: 34px;
+ margin-right: 10px;
+ }
+
+ span {
+ font-size: 12px;
+ text-transform: uppercase;
+ font-weight: 500;
+ display: block;
+ }
+}
+
+.upload-progess__message {
+ flex: 1 1 auto;
+}
+
+.upload-progress__backdrop {
+ width: 100%;
+ height: 6px;
+ border-radius: 6px;
+ background: $ui-base-lighter-color;
+ position: relative;
+ margin-top: 5px;
+}
+
+.upload-progress__tracker {
+ position: absolute;
+ left: 0;
+ top: 0;
+ height: 6px;
+ background: $ui-highlight-color;
+ border-radius: 6px;
+}
+
+.emoji-button {
+ display: block;
+ font-size: 24px;
+ line-height: 24px;
+ margin-left: 2px;
+ width: 24px;
+ outline: 0;
+ cursor: pointer;
+
+ &:active,
+ &:focus {
+ outline: 0 !important;
+ }
+
+ img {
+ filter: grayscale(100%);
+ opacity: 0.8;
+ display: block;
+ margin: 0;
+ width: 22px;
+ height: 22px;
+ margin-top: 2px;
+ }
+
+ &:hover,
+ &:active,
+ &:focus {
+ img {
+ opacity: 1;
+ filter: none;
+ }
+ }
+}
+
+.dropdown--active .emoji-button img {
+ opacity: 1;
+ filter: none;
+}
+
+.privacy-dropdown__dropdown {
+ position: absolute;
+ background: $simple-background-color;
+ box-shadow: 2px 4px 15px rgba($base-shadow-color, 0.4);
+ border-radius: 4px;
+ margin-left: 40px;
+ overflow: hidden;
+}
+
+.privacy-dropdown__option {
+ color: $ui-base-color;
+ padding: 10px;
+ cursor: pointer;
+ display: flex;
+
+ &:hover,
+ &.active {
+ background: $ui-highlight-color;
+ color: $primary-text-color;
+
+ .privacy-dropdown__option__content {
+ color: $primary-text-color;
+
+ strong {
+ color: $primary-text-color;
+ }
+ }
+ }
+
+ &.active:hover {
+ background: lighten($ui-highlight-color, 4%);
+ }
+}
+
+.privacy-dropdown__option__icon {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-right: 10px;
+}
+
+.privacy-dropdown__option__content {
+ flex: 1 1 auto;
+ color: darken($ui-primary-color, 24%);
+
+ strong {
+ font-weight: 500;
+ display: block;
+ color: $ui-base-color;
+ }
+}
+
+.privacy-dropdown.active {
+ .privacy-dropdown__value {
+ background: $simple-background-color;
+ border-radius: 4px 4px 0 0;
+ box-shadow: 0 -4px 4px rgba($base-shadow-color, 0.1);
+
+ .icon-button {
+ transition: none;
+ }
+
+ &.active {
+ background: $ui-highlight-color;
+
+ .icon-button {
+ color: $primary-text-color;
+ }
+ }
+ }
+
+ .privacy-dropdown__dropdown {
+ display: block;
+ box-shadow: 2px 4px 6px rgba($base-shadow-color, 0.1);
+ }
+}
+
+.search {
+ position: relative;
+}
+
+.search__input {
+ outline: 0;
+ box-sizing: border-box;
+ display: block;
+ width: 100%;
+ border: none;
+ padding: 10px;
+ padding-right: 30px;
+ font-family: inherit;
+ background: $ui-base-color;
+ color: $ui-primary-color;
+ font-size: 14px;
+ margin: 0;
+
+ &::-moz-focus-inner {
+ border: 0;
+ }
+
+ &::-moz-focus-inner,
+ &:focus,
+ &:active {
+ outline: 0 !important;
+ }
+
+ &:focus {
+ background: lighten($ui-base-color, 4%);
+ }
+
+ @media screen and (max-width: 600px) {
+ font-size: 16px;
+ }
+}
+
+.search__icon {
+ .fa {
+ position: absolute;
+ top: 10px;
+ right: 10px;
+ z-index: 2;
+ display: inline-block;
+ opacity: 0;
+ transition: all 100ms linear;
+ font-size: 18px;
+ width: 18px;
+ height: 18px;
+ color: $ui-secondary-color;
+ cursor: default;
+ pointer-events: none;
+
+ &.active {
+ pointer-events: auto;
+ opacity: 0.3;
+ }
+ }
+
+ .fa-search {
+ transform: rotate(90deg);
+
+ &.active {
+ pointer-events: none;
+ transform: rotate(0deg);
+ }
+ }
+
+ .fa-times-circle {
+ top: 11px;
+ transform: rotate(0deg);
+ cursor: pointer;
+
+ &.active {
+ transform: rotate(90deg);
+ }
+
+ &:hover {
+ color: $primary-text-color;
+ }
+ }
+}
+
+.search-results__header {
+ color: $ui-base-lighter-color;
+ background: lighten($ui-base-color, 2%);
+ border-bottom: 1px solid darken($ui-base-color, 4%);
+ padding: 15px 10px;
+ font-size: 14px;
+ font-weight: 500;
+}
+
+.search-results__hashtag {
+ display: block;
+ padding: 10px;
+ color: $ui-secondary-color;
+ text-decoration: none;
+
+ &:hover,
+ &:active,
+ &:focus {
+ color: lighten($ui-secondary-color, 4%);
+ text-decoration: underline;
+ }
+}
+
+.modal-root {
+ transition: opacity 0.3s linear;
+ will-change: opacity;
+ z-index: 9999;
+}
+
+.modal-root__overlay {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: rgba($base-overlay-background, 0.7);
+}
+
+.modal-root__container {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ align-content: space-around;
+ z-index: 9999;
+ pointer-events: none;
+ user-select: none;
+}
+
+.modal-root__modal {
+ pointer-events: auto;
+ display: flex;
+ z-index: 9999;
+}
+
+.media-modal {
+ max-width: 80vw;
+ max-height: 80vh;
+ position: relative;
+
+ .extended-video-player,
+ img,
+ canvas,
+ video {
+ max-width: 80vw;
+ max-height: 80vh;
+ width: auto;
+ height: auto;
+ margin: auto;
+ }
+
+ .extended-video-player,
+ video {
+ display: flex;
+ width: 80vw;
+ height: 80vh;
+ }
+
+ img,
+ canvas {
+ display: block;
+ background: url('../images/void.png') repeat;
+ object-fit: contain;
+ }
+
+ .react-swipeable-view-container {
+ max-width: 80vw;
+ }
+}
+
+.media-modal__content {
+ background: $base-overlay-background;
+}
+
+.media-modal__pagination {
+ width: 100%;
+ text-align: center;
+ position: absolute;
+ left: 0;
+ bottom: -40px;
+}
+
+.media-modal__page-dot {
+ display: inline-block;
+}
+
+.media-modal__button {
+ background-color: $white;
+ height: 12px;
+ width: 12px;
+ border-radius: 6px;
+ margin: 10px;
+ padding: 0;
+ border: 0;
+ font-size: 0;
+}
+
+.media-modal__button--active {
+ background-color: $ui-highlight-color;
+}
+
+.media-modal__close {
+ position: absolute;
+ right: 4px;
+ top: 4px;
+ z-index: 100;
+}
+
+.onboarding-modal,
+.error-modal,
+.embed-modal {
+ background: $ui-secondary-color;
+ color: $ui-base-color;
+ border-radius: 8px;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+}
+
+.onboarding-modal__pager {
+ height: 80vh;
+ width: 80vw;
+ max-width: 520px;
+ max-height: 420px;
+
+ .react-swipeable-view-container > div {
+ width: 100%;
+ height: 100%;
+ box-sizing: border-box;
+ padding: 25px;
+ display: none;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ display: flex;
+ user-select: text;
+ }
+}
+
+.error-modal__body {
+ height: 80vh;
+ width: 80vw;
+ max-width: 520px;
+ max-height: 420px;
+ position: relative;
+
+ & > div {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ box-sizing: border-box;
+ padding: 25px;
+ display: none;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ display: flex;
+ opacity: 0;
+ user-select: text;
+ }
+}
+
+.error-modal__body {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ text-align: center;
+}
+
+@media screen and (max-width: 550px) {
+ .onboarding-modal {
+ width: 100%;
+ height: 100%;
+ border-radius: 0;
+ }
+
+ .onboarding-modal__pager {
+ width: 100%;
+ height: auto;
+ max-width: none;
+ max-height: none;
+ flex: 1 1 auto;
+ }
+}
+
+.onboarding-modal__paginator,
+.error-modal__footer {
+ flex: 0 0 auto;
+ background: darken($ui-secondary-color, 8%);
+ display: flex;
+ padding: 25px;
+
+ & > div {
+ min-width: 33px;
+ }
+
+ .onboarding-modal__nav,
+ .error-modal__nav {
+ color: darken($ui-secondary-color, 34%);
+ background-color: transparent;
+ border: 0;
+ font-size: 14px;
+ font-weight: 500;
+ padding: 0;
+ line-height: inherit;
+ height: auto;
+
+ &:hover,
+ &:focus,
+ &:active {
+ color: darken($ui-secondary-color, 38%);
+ }
+
+ &.onboarding-modal__done,
+ &.onboarding-modal__next {
+ color: $ui-highlight-color;
+ }
+ }
+}
+
+.error-modal__footer {
+ justify-content: center;
+}
+
+.onboarding-modal__dots {
+ flex: 1 1 auto;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.onboarding-modal__dot {
+ width: 14px;
+ height: 14px;
+ border-radius: 14px;
+ background: darken($ui-secondary-color, 16%);
+ margin: 0 3px;
+ cursor: pointer;
+
+ &:hover {
+ background: darken($ui-secondary-color, 18%);
+ }
+
+ &.active {
+ cursor: default;
+ background: darken($ui-secondary-color, 24%);
+ }
+}
+
+.onboarding-modal__page__wrapper {
+ pointer-events: none;
+
+ &.onboarding-modal__page__wrapper--active {
+ pointer-events: auto;
+ }
+}
+
+.onboarding-modal__page {
+ cursor: default;
+ line-height: 21px;
+
+ h1 {
+ font-size: 18px;
+ font-weight: 500;
+ color: $ui-base-color;
+ margin-bottom: 20px;
+ }
+
+ a {
+ color: $ui-highlight-color;
+
+ &:hover,
+ &:focus,
+ &:active {
+ color: lighten($ui-highlight-color, 4%);
+ }
+ }
+
+ p {
+ font-size: 16px;
+ color: lighten($ui-base-color, 8%);
+ margin-top: 10px;
+ margin-bottom: 10px;
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+
+ strong {
+ font-weight: 500;
+ background: $ui-base-color;
+ color: $ui-secondary-color;
+ border-radius: 4px;
+ font-size: 14px;
+ padding: 3px 6px;
+ }
+ }
+}
+
+.onboarding-modal__page-one {
+ display: flex;
+ align-items: center;
+}
+
+.onboarding-modal__page-one__elephant-friend {
+ background: url('../images/elephant-friend-1.png') no-repeat center center / contain;
+ width: 155px;
+ height: 193px;
+ margin-right: 15px;
+}
+
+@media screen and (max-width: 400px) {
+ .onboarding-modal__page-one {
+ flex-direction: column;
+ align-items: normal;
+ }
+
+ .onboarding-modal__page-one__elephant-friend {
+ width: 100%;
+ height: 30vh;
+ max-height: 160px;
+ margin-bottom: 5vh;
+ }
+}
+
+.onboarding-modal__page-two,
+.onboarding-modal__page-three,
+.onboarding-modal__page-four,
+.onboarding-modal__page-five {
+ p {
+ text-align: left;
+ }
+
+ .figure {
+ background: darken($ui-base-color, 8%);
+ color: $ui-secondary-color;
+ margin-bottom: 20px;
+ border-radius: 4px;
+ padding: 10px;
+ text-align: center;
+ font-size: 14px;
+ box-shadow: 1px 2px 6px rgba($base-shadow-color, 0.3);
+
+ .onboarding-modal__image {
+ border-radius: 4px;
+ margin-bottom: 10px;
+ }
+
+ &.non-interactive {
+ pointer-events: none;
+ text-align: left;
+ }
+ }
+}
+
+.onboarding-modal__page-four__columns {
+ .row {
+ display: flex;
+ margin-bottom: 20px;
+
+ & > div {
+ flex: 1 1 0;
+ margin: 0 10px;
+
+ &:first-child {
+ margin-left: 0;
+ }
+
+ &:last-child {
+ margin-right: 0;
+ }
+
+ p {
+ text-align: center;
+ }
+ }
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+ }
+
+ .column-header {
+ color: $primary-text-color;
+ }
+}
+
+@media screen and (max-width: 320px) and (max-height: 600px) {
+ .onboarding-modal__page p {
+ font-size: 14px;
+ line-height: 20px;
+ }
+
+ .onboarding-modal__page-two .figure,
+ .onboarding-modal__page-three .figure,
+ .onboarding-modal__page-four .figure,
+ .onboarding-modal__page-five .figure {
+ font-size: 12px;
+ margin-bottom: 10px;
+ }
+
+ .onboarding-modal__page-four__columns .row {
+ margin-bottom: 10px;
+ }
+
+ .onboarding-modal__page-four__columns .column-header {
+ padding: 5px;
+ font-size: 12px;
+ }
+}
+
+.onboarding-modal__image {
+ border-radius: 8px;
+ width: 70vw;
+ max-width: 450px;
+ max-height: auto;
+ display: block;
+ margin: auto;
+ margin-bottom: 20px;
+}
+
+.onboard-sliders {
+ display: inline-block;
+ max-width: 30px;
+ max-height: auto;
+ margin-left: 10px;
+}
+
+.boost-modal,
+.confirmation-modal,
+.report-modal,
+.actions-modal,
+.mute-modal {
+ background: lighten($ui-secondary-color, 8%);
+ color: $ui-base-color;
+ border-radius: 8px;
+ overflow: hidden;
+ max-width: 90vw;
+ width: 480px;
+ position: relative;
+ flex-direction: column;
+
+ .status__display-name {
+ display: block;
+ max-width: 100%;
+ padding-right: 25px;
+ }
+
+ .status__avatar {
+ height: 28px;
+ left: 10px;
+ position: absolute;
+ top: 10px;
+ width: 48px;
+ }
+}
+
+.actions-modal {
+ .status {
+ background: $white;
+ border-bottom-color: $ui-secondary-color;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ }
+
+ .dropdown-menu__separator {
+ border-bottom-color: $ui-secondary-color;
+ }
+}
+
+.boost-modal__container {
+ overflow-x: scroll;
+ padding: 10px;
+
+ .status {
+ user-select: text;
+ border-bottom: 0;
+ }
+}
+
+.boost-modal__action-bar,
+.confirmation-modal__action-bar,
+.mute-modal__action-bar,
+.report-modal__action-bar {
+ display: flex;
+ justify-content: space-between;
+ background: $ui-secondary-color;
+ padding: 10px;
+ line-height: 36px;
+
+ & > div {
+ flex: 1 1 auto;
+ text-align: right;
+ color: lighten($ui-base-color, 33%);
+ padding-right: 10px;
+ }
+
+ .button {
+ flex: 0 0 auto;
+ }
+}
+
+.boost-modal__status-header {
+ font-size: 15px;
+}
+
+.boost-modal__status-time {
+ float: right;
+ font-size: 14px;
+}
+
+.confirmation-modal {
+ max-width: 85vw;
+
+ @media screen and (min-width: 480px) {
+ max-width: 380px;
+ }
+}
+
+.mute-modal {
+ line-height: 24px;
+}
+
+.mute-modal .react-toggle {
+ vertical-align: middle;
+}
+
+.report-modal__statuses,
+.report-modal__comment {
+ padding: 10px;
+}
+
+.report-modal__statuses {
+ min-height: 20vh;
+ max-height: 40vh;
+ overflow-y: auto;
+ overflow-x: hidden;
+}
+
+.report-modal__comment {
+ .setting-text {
+ margin-top: 10px;
+ }
+}
+
+.actions-modal {
+ .status {
+ overflow-y: auto;
+ max-height: 300px;
+ }
+
+ max-height: 80vh;
+ max-width: 80vw;
+
+ .actions-modal__item-label {
+ font-weight: 500;
+ }
+
+ ul {
+ overflow-y: auto;
+ flex-shrink: 0;
+
+ li:empty {
+ margin: 0;
+ }
+
+ li:not(:empty) {
+ a {
+ color: $ui-base-color;
+ display: flex;
+ padding: 12px 16px;
+ font-size: 15px;
+ align-items: center;
+ text-decoration: none;
+
+ &,
+ button {
+ transition: none;
+ }
+
+ &.active,
+ &:hover,
+ &:active,
+ &:focus {
+ &,
+ button {
+ background: $ui-highlight-color;
+ color: $primary-text-color;
+ }
+ }
+
+ button:first-child {
+ margin-right: 10px;
+ }
+ }
+ }
+ }
+}
+
+.confirmation-modal__action-bar,
+.mute-modal__action-bar {
+ .confirmation-modal__cancel-button,
+ .mute-modal__cancel-button {
+ background-color: transparent;
+ color: darken($ui-secondary-color, 34%);
+ font-size: 14px;
+ font-weight: 500;
+
+ &:hover,
+ &:focus,
+ &:active {
+ color: darken($ui-secondary-color, 38%);
+ }
+ }
+}
+
+.confirmation-modal__container,
+.mute-modal__container,
+.report-modal__target {
+ padding: 30px;
+ font-size: 16px;
+ text-align: center;
+
+ strong {
+ font-weight: 500;
+ }
+}
+
+.loading-bar {
+ background-color: $ui-highlight-color;
+ height: 3px;
+ position: absolute;
+ top: 0;
+ left: 0;
+}
+
+.media-gallery__gifv__label {
+ display: block;
+ position: absolute;
+ color: $primary-text-color;
+ background: rgba($base-overlay-background, 0.5);
+ bottom: 6px;
+ left: 6px;
+ padding: 2px 6px;
+ border-radius: 2px;
+ font-size: 11px;
+ font-weight: 600;
+ z-index: 1;
+ pointer-events: none;
+ opacity: 0.9;
+ transition: opacity 0.1s ease;
+}
+
+.media-gallery__gifv {
+ &.autoplay {
+ .media-gallery__gifv__label {
+ display: none;
+ }
+ }
+
+ &:hover {
+ .media-gallery__gifv__label {
+ opacity: 1;
+ }
+ }
+}
+
+.attachment-list {
+ display: flex;
+ font-size: 14px;
+ border: 1px solid lighten($ui-base-color, 8%);
+ border-radius: 4px;
+ margin-top: 14px;
+ overflow: hidden;
+}
+
+.attachment-list__icon {
+ flex: 0 0 auto;
+ color: $ui-base-lighter-color;
+ padding: 8px 18px;
+ cursor: default;
+ border-right: 1px solid lighten($ui-base-color, 8%);
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ font-size: 26px;
+
+ .fa {
+ display: block;
+ }
+}
+
+.attachment-list__list {
+ list-style: none;
+ padding: 4px 0;
+ padding-left: 8px;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+
+ li {
+ display: block;
+ padding: 4px 0;
+ }
+
+ a {
+ text-decoration: none;
+ color: $ui-base-lighter-color;
+ font-weight: 500;
+
+ &:hover {
+ text-decoration: underline;
+ }
+ }
+}
+
+/* Media Gallery */
+.media-gallery {
+ box-sizing: border-box;
+ margin-top: 8px;
+ overflow: hidden;
+ position: relative;
+ width: 100%;
+}
+
+.media-gallery__item {
+ border: none;
+ box-sizing: border-box;
+ display: block;
+ float: left;
+ position: relative;
+
+ &.standalone {
+ .media-gallery__item-gifv-thumbnail {
+ transform: none;
+ }
+ }
+}
+
+.media-gallery__item-thumbnail {
+ cursor: zoom-in;
+ display: block;
+ text-decoration: none;
+ height: 100%;
+ line-height: 0;
+
+ &,
+ img {
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ }
+}
+
+.media-gallery__gifv {
+ height: 100%;
+ overflow: hidden;
+ position: relative;
+ width: 100%;
+}
+
+.media-gallery__item-gifv-thumbnail {
+ cursor: zoom-in;
+ height: 100%;
+ object-fit: cover;
+ position: relative;
+ top: 50%;
+ transform: translateY(-50%);
+ width: 100%;
+ z-index: 1;
+}
+
+.media-gallery__item-thumbnail-label {
+ clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
+ clip: rect(1px, 1px, 1px, 1px);
+ overflow: hidden;
+ position: absolute;
+}
+/* End Media Gallery */
+
+/* Status Video Player */
+.status__video-player {
+ background: $base-overlay-background;
+ box-sizing: border-box;
+ cursor: default; /* May not be needed */
+ margin-top: 8px;
+ overflow: hidden;
+ position: relative;
+}
+
+.status__video-player-video {
+ height: 100%;
+ object-fit: cover;
+ position: relative;
+ top: 50%;
+ transform: translateY(-50%);
+ width: 100%;
+ z-index: 1;
+}
+
+.status__video-player-expand,
+.status__video-player-mute {
+ color: $primary-text-color;
+ opacity: 0.8;
+ position: absolute;
+ right: 4px;
+ text-shadow: 0 1px 1px $base-shadow-color, 1px 0 1px $base-shadow-color;
+}
+
+.status__video-player-spoiler {
+ display: none;
+ color: $primary-text-color;
+ left: 4px;
+ position: absolute;
+ text-shadow: 0 1px 1px $base-shadow-color, 1px 0 1px $base-shadow-color;
+ top: 4px;
+ z-index: 100;
+
+ &.status__video-player-spoiler--visible {
+ display: block;
+ }
+}
+
+.status__video-player-expand {
+ bottom: 4px;
+ z-index: 100;
+}
+
+.status__video-player-mute {
+ top: 4px;
+ z-index: 5;
+}
+
+.video-player {
+ overflow: hidden;
+ position: relative;
+ background: $base-shadow-color;
+ max-width: 100%;
+
+ video {
+ height: 100%;
+ width: 100%;
+ z-index: 1;
+ }
+
+ &.fullscreen {
+ width: 100% !important;
+ height: 100% !important;
+ margin: 0;
+
+ video {
+ max-width: 100% !important;
+ max-height: 100% !important;
+ }
+ }
+
+ &.inline {
+ video {
+ object-fit: cover;
+ position: relative;
+ top: 50%;
+ transform: translateY(-50%);
+ }
+ }
+
+ &__controls {
+ position: absolute;
+ z-index: 2;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ box-sizing: border-box;
+ background: linear-gradient(0deg, rgba($base-shadow-color, 0.8) 0, rgba($base-shadow-color, 0.35) 60%, transparent);
+ padding: 0 10px;
+ opacity: 0;
+ transition: opacity .1s ease;
+
+ &.active {
+ opacity: 1;
+ }
+ }
+
+ &.inactive {
+ video,
+ .video-player__controls {
+ visibility: hidden;
+ }
+ }
+
+ &__spoiler {
+ display: none;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 4;
+ border: 0;
+ background: $base-shadow-color;
+ color: $ui-primary-color;
+ transition: none;
+ pointer-events: none;
+
+ &.active {
+ display: block;
+ pointer-events: auto;
+
+ &:hover,
+ &:active,
+ &:focus {
+ color: lighten($ui-primary-color, 8%);
+ }
+ }
+
+ &__title {
+ display: block;
+ font-size: 14px;
+ }
+
+ &__subtitle {
+ display: block;
+ font-size: 11px;
+ font-weight: 500;
+ }
+ }
+
+ &__buttons {
+ padding-bottom: 10px;
+ font-size: 16px;
+
+ &.left {
+ float: left;
+
+ button {
+ padding-right: 10px;
+ }
+ }
+
+ &.right {
+ float: right;
+
+ button {
+ padding-left: 10px;
+ }
+ }
+
+ button {
+ background: transparent;
+ padding: 0;
+ border: 0;
+ color: $white;
+
+ &:active,
+ &:hover,
+ &:focus {
+ color: $ui-highlight-color;
+ }
+ }
+ }
+
+ &__seek {
+ cursor: pointer;
+ height: 24px;
+ position: relative;
+
+ &::before {
+ content: "";
+ width: 100%;
+ background: rgba($white, 0.35);
+ display: block;
+ position: absolute;
+ height: 4px;
+ top: 10px;
+ }
+
+ &__progress,
+ &__buffer {
+ display: block;
+ position: absolute;
+ height: 4px;
+ top: 10px;
+ background: $ui-highlight-color;
+ }
+
+ &__buffer {
+ background: rgba($white, 0.2);
+ }
+
+ &__handle {
+ position: absolute;
+ z-index: 3;
+ opacity: 0;
+ border-radius: 50%;
+ width: 12px;
+ height: 12px;
+ top: 6px;
+ margin-left: -6px;
+ transition: opacity .1s ease;
+ background: $ui-highlight-color;
+ pointer-events: none;
+
+ &.active {
+ opacity: 1;
+ }
+ }
+
+ &:hover {
+ .video-player__seek__handle {
+ opacity: 1;
+ }
+ }
+ }
+}
+
+.media-spoiler-video {
+ background-size: cover;
+ background-repeat: no-repeat;
+ background-position: center;
+ cursor: pointer;
+ margin-top: 8px;
+ position: relative;
+ border: 0;
+ display: block;
+}
+
+.media-spoiler-video-play-icon {
+ border-radius: 100px;
+ color: rgba($primary-text-color, 0.8);
+ font-size: 36px;
+ left: 50%;
+ padding: 5px;
+ position: absolute;
+ top: 50%;
+ transform: translate(-50%, -50%);
+}
+/* End Video Player */
+
+.account-gallery__container {
+ margin: -2px;
+ padding: 4px;
+ display: flex;
+ flex-wrap: wrap;
+}
+
+.account-gallery__item {
+ flex: 1 1 auto;
+ width: calc(100% / 3 - 4px);
+ height: 95px;
+ margin: 2px;
+
+ a {
+ display: block;
+ width: 100%;
+ height: 100%;
+ background-color: $base-overlay-background;
+ background-size: cover;
+ background-position: center;
+ position: relative;
+ color: inherit;
+ text-decoration: none;
+
+ &:hover,
+ &:active,
+ &:focus {
+ outline: 0;
+ }
+ }
+}
+
+.account-section-headline {
+ color: $ui-base-lighter-color;
+ background: lighten($ui-base-color, 2%);
+ border-bottom: 1px solid lighten($ui-base-color, 4%);
+ padding: 15px 10px;
+ font-size: 14px;
+ font-weight: 500;
+ position: relative;
+ cursor: default;
+
+ &::before,
+ &::after {
+ display: block;
+ content: "";
+ position: absolute;
+ bottom: 0;
+ left: 18px;
+ width: 0;
+ height: 0;
+ border-style: solid;
+ border-width: 0 10px 10px;
+ border-color: transparent transparent lighten($ui-base-color, 4%);
+ }
+
+ &::after {
+ bottom: -1px;
+ border-color: transparent transparent $ui-base-color;
+ }
+}
+
+::-webkit-scrollbar-thumb {
+ border-radius: 0;
+}
+
+.search-popout {
+ background: $simple-background-color;
+ border-radius: 4px;
+ padding: 10px 14px;
+ padding-bottom: 14px;
+ margin-top: 10px;
+ color: $ui-primary-color;
+ box-shadow: 2px 4px 15px rgba($base-shadow-color, 0.4);
+
+ h4 {
+ text-transform: uppercase;
+ color: $ui-primary-color;
+ font-size: 13px;
+ font-weight: 500;
+ margin-bottom: 10px;
+ }
+
+ li {
+ padding: 4px 0;
+ }
+
+ ul {
+ margin-bottom: 10px;
+ }
+
+ em {
+ font-weight: 500;
+ color: $ui-base-color;
+ }
+}
+
+noscript {
+ text-align: center;
+
+ img {
+ width: 200px;
+ opacity: 0.5;
+ animation: flicker 4s infinite;
+ }
+
+ div {
+ font-size: 14px;
+ margin: 30px auto;
+ color: $ui-secondary-color;
+ max-width: 400px;
+
+ a {
+ color: $ui-highlight-color;
+ text-decoration: underline;
+
+ &:hover {
+ text-decoration: none;
+ }
+ }
+ }
+}
+
+@keyframes flicker {
+ 0% { opacity: 1; }
+ 30% { opacity: 0.75; }
+ 100% { opacity: 1; }
+}
+
+@media screen and (max-width: 630px) and (max-height: 400px) {
+ $duration: 400ms;
+ $delay: 100ms;
+
+ .tabs-bar,
+ .search {
+ will-change: margin-top;
+ transition: margin-top $duration $delay;
+ }
+
+ .navigation-bar {
+ will-change: padding-bottom;
+ transition: padding-bottom $duration $delay;
+ }
+
+ .navigation-bar {
+ & > a:first-child {
+ will-change: margin-top, margin-left, width;
+ transition: margin-top $duration $delay, margin-left $duration ($duration + $delay);
+ }
+
+ & > .navigation-bar__profile-edit {
+ will-change: margin-top;
+ transition: margin-top $duration $delay;
+ }
+
+ & > .icon-button {
+ will-change: opacity;
+ transition: opacity $duration $delay;
+ }
+ }
+
+ .is-composing {
+ .tabs-bar,
+ .search {
+ margin-top: -50px;
+ }
+
+ .navigation-bar {
+ padding-bottom: 0;
+
+ & > a:first-child {
+ margin-top: -50px;
+ margin-left: -40px;
+ }
+
+ .navigation-bar__profile {
+ padding-top: 2px;
+ }
+
+ .navigation-bar__profile-edit {
+ position: absolute;
+ margin-top: -50px;
+ }
+
+ .icon-button {
+ pointer-events: auto;
+ opacity: 1;
+ }
+ }
+ }
+}
+
+.embed-modal {
+ max-width: 80vw;
+ max-height: 80vh;
+
+ h4 {
+ padding: 30px;
+ font-weight: 500;
+ font-size: 16px;
+ text-align: center;
+ }
+
+ .embed-modal__container {
+ padding: 10px;
+
+ .hint {
+ margin-bottom: 15px;
+ }
+
+ .embed-modal__html {
+ color: $ui-secondary-color;
+ outline: 0;
+ box-sizing: border-box;
+ display: block;
+ width: 100%;
+ border: none;
+ padding: 10px;
+ font-family: 'mastodon-font-monospace', monospace;
+ background: $ui-base-color;
+ color: $ui-primary-color;
+ font-size: 14px;
+ margin: 0;
+ margin-bottom: 15px;
+
+ &::-moz-focus-inner {
+ border: 0;
+ }
+
+ &::-moz-focus-inner,
+ &:focus,
+ &:active {
+ outline: 0 !important;
+ }
+
+ &:focus {
+ background: lighten($ui-base-color, 4%);
+ }
+
+ @media screen and (max-width: 600px) {
+ font-size: 16px;
+ }
+ }
+
+ .embed-modal__iframe {
+ width: 400px;
+ max-width: 100%;
+ overflow: hidden;
+ border: 0;
+ }
+ }
+}
diff --git a/app/javascript/styles/mastodon/containers.scss b/app/javascript/styles/mastodon/containers.scss
new file mode 100644
index 0000000000..af2589e23c
--- /dev/null
+++ b/app/javascript/styles/mastodon/containers.scss
@@ -0,0 +1,116 @@
+.container {
+ width: 700px;
+ margin: 0 auto;
+ margin-top: 40px;
+
+ @media screen and (max-width: 740px) {
+ width: 100%;
+ margin: 0;
+ }
+}
+
+.logo-container {
+ margin: 100px auto;
+ margin-bottom: 50px;
+
+ @media screen and (max-width: 400px) {
+ margin: 30px auto;
+ margin-bottom: 20px;
+ }
+
+ h1 {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ img {
+ height: 42px;
+ margin-right: 10px;
+ }
+
+ a {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ color: $primary-text-color;
+ text-decoration: none;
+ outline: 0;
+ padding: 12px 16px;
+ line-height: 32px;
+ font-family: 'mastodon-font-display', sans-serif;
+ font-weight: 500;
+ font-size: 14px;
+ }
+ }
+}
+
+.compose-standalone {
+ .compose-form {
+ width: 400px;
+ margin: 0 auto;
+ padding: 20px 0;
+ margin-top: 40px;
+ box-sizing: border-box;
+
+ @media screen and (max-width: 400px) {
+ width: 100%;
+ margin-top: 0;
+ padding: 20px;
+ }
+ }
+}
+
+.account-header {
+ width: 400px;
+ margin: 0 auto;
+ display: flex;
+ font-size: 13px;
+ line-height: 18px;
+ box-sizing: border-box;
+ padding: 20px 0;
+ padding-bottom: 0;
+ margin-bottom: -30px;
+ margin-top: 40px;
+
+ @media screen and (max-width: 440px) {
+ width: 100%;
+ margin: 0;
+ margin-bottom: 10px;
+ padding: 20px;
+ padding-bottom: 0;
+ }
+
+ .avatar {
+ width: 40px;
+ height: 40px;
+ margin-right: 8px;
+
+ img {
+ width: 100%;
+ height: 100%;
+ display: block;
+ margin: 0;
+ border-radius: 4px;
+ }
+ }
+
+ .name {
+ flex: 1 1 auto;
+ color: $ui-secondary-color;
+ width: calc(100% - 88px);
+
+ .username {
+ display: block;
+ font-weight: 500;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ }
+ }
+
+ .logout-link {
+ display: block;
+ font-size: 32px;
+ line-height: 40px;
+ margin-left: 8px;
+ }
+}
diff --git a/app/javascript/styles/mastodon/emoji_picker.scss b/app/javascript/styles/mastodon/emoji_picker.scss
new file mode 100644
index 0000000000..2b46d30fce
--- /dev/null
+++ b/app/javascript/styles/mastodon/emoji_picker.scss
@@ -0,0 +1,199 @@
+.emoji-mart {
+ &,
+ * {
+ box-sizing: border-box;
+ line-height: 1.15;
+ }
+
+ font-size: 13px;
+ display: inline-block;
+ color: $ui-base-color;
+
+ .emoji-mart-emoji {
+ padding: 6px;
+ }
+}
+
+.emoji-mart-bar {
+ border: 0 solid darken($ui-secondary-color, 8%);
+
+ &:first-child {
+ border-bottom-width: 1px;
+ border-top-left-radius: 5px;
+ border-top-right-radius: 5px;
+ background: $ui-secondary-color;
+ }
+
+ &:last-child {
+ border-top-width: 1px;
+ border-bottom-left-radius: 5px;
+ border-bottom-right-radius: 5px;
+ display: none;
+ }
+}
+
+.emoji-mart-anchors {
+ display: flex;
+ justify-content: space-between;
+ padding: 0 6px;
+ color: $ui-primary-color;
+ line-height: 0;
+}
+
+.emoji-mart-anchor {
+ position: relative;
+ flex: 1;
+ text-align: center;
+ padding: 12px 4px;
+ overflow: hidden;
+ transition: color .1s ease-out;
+ cursor: pointer;
+
+ &:hover {
+ color: darken($ui-primary-color, 4%);
+ }
+}
+
+.emoji-mart-anchor-selected {
+ color: darken($ui-highlight-color, 3%);
+
+ &:hover {
+ color: darken($ui-highlight-color, 3%);
+ }
+
+ .emoji-mart-anchor-bar {
+ bottom: 0;
+ }
+}
+
+.emoji-mart-anchor-bar {
+ position: absolute;
+ bottom: -3px;
+ left: 0;
+ width: 100%;
+ height: 3px;
+ background-color: darken($ui-highlight-color, 3%);
+}
+
+.emoji-mart-anchors {
+ i {
+ display: inline-block;
+ width: 100%;
+ max-width: 22px;
+ }
+
+ svg {
+ fill: currentColor;
+ max-height: 18px;
+ }
+}
+
+.emoji-mart-scroll {
+ overflow-y: scroll;
+ height: 270px;
+ max-height: 35vh;
+ padding: 0 6px 6px;
+ background: $simple-background-color;
+ will-change: transform;
+}
+
+.emoji-mart-search {
+ padding: 10px;
+ padding-right: 45px;
+ background: $simple-background-color;
+
+ input {
+ font-size: 14px;
+ font-weight: 400;
+ padding: 7px 9px;
+ font-family: inherit;
+ display: block;
+ width: 100%;
+ background: rgba($ui-secondary-color, 0.3);
+ color: $ui-primary-color;
+ border: 1px solid $ui-secondary-color;
+ border-radius: 4px;
+
+ &::-moz-focus-inner {
+ border: 0;
+ }
+
+ &::-moz-focus-inner,
+ &:focus,
+ &:active {
+ outline: 0 !important;
+ }
+ }
+}
+
+.emoji-mart-category .emoji-mart-emoji {
+ cursor: pointer;
+
+ span {
+ z-index: 1;
+ position: relative;
+ text-align: center;
+ }
+
+ &:hover::before {
+ z-index: 0;
+ content: "";
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba($ui-secondary-color, 0.7);
+ border-radius: 100%;
+ }
+}
+
+.emoji-mart-category-label {
+ z-index: 2;
+ position: relative;
+ position: -webkit-sticky;
+ position: sticky;
+ top: 0;
+
+ span {
+ display: block;
+ width: 100%;
+ font-weight: 500;
+ padding: 5px 6px;
+ background: $simple-background-color;
+ }
+}
+
+.emoji-mart-emoji {
+ position: relative;
+ display: inline-block;
+ font-size: 0;
+
+ span {
+ width: 22px;
+ height: 22px;
+ }
+}
+
+.emoji-mart-no-results {
+ font-size: 14px;
+ text-align: center;
+ padding-top: 70px;
+ color: $ui-primary-color;
+
+ .emoji-mart-category-label {
+ display: none;
+ }
+
+ .emoji-mart-no-results-label {
+ margin-top: .2em;
+ }
+
+ .emoji-mart-emoji:hover::before {
+ content: none;
+ }
+}
+
+.emoji-mart-preview {
+ display: none;
+}
diff --git a/app/javascript/styles/mastodon/footer.scss b/app/javascript/styles/mastodon/footer.scss
new file mode 100644
index 0000000000..2d953b34e7
--- /dev/null
+++ b/app/javascript/styles/mastodon/footer.scss
@@ -0,0 +1,30 @@
+.footer {
+ text-align: center;
+ margin-top: 30px;
+ font-size: 12px;
+ color: darken($ui-secondary-color, 25%);
+
+ .domain {
+ font-weight: 500;
+
+ a {
+ color: inherit;
+ text-decoration: none;
+ }
+ }
+
+ .powered-by,
+ .single-user-login {
+ font-weight: 400;
+
+ a {
+ color: inherit;
+ text-decoration: underline;
+ font-weight: 500;
+
+ &:hover {
+ text-decoration: none;
+ }
+ }
+ }
+}
diff --git a/app/javascript/styles/mastodon/forms.scss b/app/javascript/styles/mastodon/forms.scss
new file mode 100644
index 0000000000..61fcf286ff
--- /dev/null
+++ b/app/javascript/styles/mastodon/forms.scss
@@ -0,0 +1,540 @@
+code {
+ font-family: 'mastodon-font-monospace', monospace;
+ font-weight: 400;
+}
+
+.form-container {
+ max-width: 400px;
+ padding: 20px;
+ margin: 0 auto;
+}
+
+.simple_form {
+ .input {
+ margin-bottom: 15px;
+ overflow: hidden;
+ }
+
+ span.hint {
+ display: block;
+ color: $ui-primary-color;
+ font-size: 12px;
+ margin-top: 4px;
+ }
+
+ h4 {
+ text-transform: uppercase;
+ font-size: 13px;
+ font-weight: 500;
+ color: $ui-primary-color;
+ padding-bottom: 8px;
+ margin-bottom: 8px;
+ border-bottom: 1px solid lighten($ui-base-color, 8%);
+ }
+
+ p.hint {
+ margin-bottom: 15px;
+ color: $ui-primary-color;
+
+ &.subtle-hint {
+ text-align: center;
+ font-size: 12px;
+ line-height: 18px;
+ margin-top: 15px;
+ margin-bottom: 0;
+ color: $ui-primary-color;
+
+ a {
+ color: $ui-highlight-color;
+ }
+ }
+ }
+
+ .card {
+ margin-bottom: 15px;
+ }
+
+ strong {
+ font-weight: 500;
+ }
+
+ .label_input {
+ display: flex;
+
+ label {
+ flex: 0 0 auto;
+ }
+
+ input {
+ flex: 1 1 auto;
+ }
+ }
+
+ .input.with_label {
+ padding: 15px 0;
+ margin-bottom: 0;
+
+ .label_input {
+ flex-wrap: wrap;
+ align-items: flex-start;
+ }
+
+ &.select .label_input {
+ align-items: initial;
+ }
+
+ .label_input > label {
+ font-family: inherit;
+ font-size: 16px;
+ color: $primary-text-color;
+ display: block;
+ padding-top: 5px;
+ margin-bottom: 5px;
+ flex: 1;
+ min-width: 150px;
+ word-wrap: break-word;
+
+ &.select {
+ flex: 0;
+ }
+
+ & ~ * {
+ margin-left: 10px;
+ }
+ }
+
+ ul {
+ flex: 390px;
+ }
+
+ &.boolean {
+ padding: initial;
+ margin-bottom: initial;
+
+ .label_input > label {
+ font-family: inherit;
+ font-size: 14px;
+ color: $primary-text-color;
+ display: block;
+ width: auto;
+ }
+
+ label.checkbox {
+ position: relative;
+ padding-left: 25px;
+ flex: 1 1 auto;
+ }
+ }
+ }
+
+ .input.with_block_label {
+ & > label {
+ font-family: inherit;
+ font-size: 16px;
+ color: $primary-text-color;
+ display: block;
+ padding-top: 5px;
+ }
+
+ .hint {
+ margin-bottom: 15px;
+ }
+
+ li {
+ float: left;
+ width: 50%;
+ }
+ }
+
+ .fields-group {
+ margin-bottom: 25px;
+ }
+
+ .input.radio_buttons .radio label {
+ margin-bottom: 5px;
+ font-family: inherit;
+ font-size: 14px;
+ color: $primary-text-color;
+ display: block;
+ width: auto;
+ }
+
+ .input.boolean {
+ margin-bottom: 5px;
+
+ label {
+ font-family: inherit;
+ font-size: 14px;
+ color: $primary-text-color;
+ display: block;
+ width: auto;
+ }
+
+ label.checkbox {
+ position: relative;
+ padding-left: 25px;
+ flex: 1 1 auto;
+ }
+
+ input[type=checkbox] {
+ position: absolute;
+ left: 0;
+ top: 5px;
+ margin: 0;
+ }
+
+ .hint {
+ padding-left: 25px;
+ margin-left: 0;
+ }
+ }
+
+ .check_boxes {
+ .checkbox {
+ label {
+ font-family: inherit;
+ font-size: 14px;
+ color: $primary-text-color;
+ display: block;
+ width: auto;
+ position: relative;
+ padding-top: 5px;
+ padding-left: 25px;
+ flex: 1 1 auto;
+ }
+
+ input[type=checkbox] {
+ position: absolute;
+ left: 0;
+ top: 5px;
+ margin: 0;
+ }
+ }
+ }
+
+ input[type=text],
+ input[type=number],
+ input[type=email],
+ input[type=password],
+ textarea {
+ background: transparent;
+ box-sizing: border-box;
+ border: 0;
+ border-bottom: 2px solid $ui-primary-color;
+ border-radius: 2px 2px 0 0;
+ padding: 7px 4px;
+ font-size: 16px;
+ color: $primary-text-color;
+ display: block;
+ width: 100%;
+ outline: 0;
+ font-family: inherit;
+ resize: vertical;
+
+ &:invalid {
+ box-shadow: none;
+ }
+
+ &:focus:invalid {
+ border-bottom-color: $error-value-color;
+ }
+
+ &:required:valid {
+ border-bottom-color: $valid-value-color;
+ }
+
+ &:active,
+ &:focus {
+ border-bottom-color: $ui-highlight-color;
+ background: rgba($base-overlay-background, 0.1);
+ }
+ }
+
+ .input.field_with_errors {
+ label {
+ color: $error-value-color;
+ }
+
+ input[type=text],
+ input[type=email],
+ input[type=password] {
+ border-bottom-color: $error-value-color;
+ }
+
+ .error {
+ display: block;
+ font-weight: 500;
+ color: $error-value-color;
+ margin-top: 4px;
+ }
+ }
+
+ .actions {
+ margin-top: 30px;
+ display: flex;
+ }
+
+ button,
+ .button,
+ .block-button {
+ display: block;
+ width: 100%;
+ border: 0;
+ border-radius: 4px;
+ background: $ui-highlight-color;
+ color: $primary-text-color;
+ font-size: 18px;
+ line-height: inherit;
+ height: auto;
+ padding: 10px;
+ text-transform: uppercase;
+ text-decoration: none;
+ text-align: center;
+ box-sizing: border-box;
+ cursor: pointer;
+ font-weight: 500;
+ outline: 0;
+ margin-bottom: 10px;
+ margin-right: 10px;
+
+ &:last-child {
+ margin-right: 0;
+ }
+
+ &:hover {
+ background-color: lighten($ui-highlight-color, 5%);
+ }
+
+ &:active,
+ &:focus {
+ background-color: darken($ui-highlight-color, 5%);
+ }
+
+ &.negative {
+ background: $error-value-color;
+
+ &:hover {
+ background-color: lighten($error-value-color, 5%);
+ }
+
+ &:active,
+ &:focus {
+ background-color: darken($error-value-color, 5%);
+ }
+ }
+ }
+
+ select {
+ font-size: 16px;
+ max-height: 29px;
+ }
+
+ .input-with-append {
+ position: relative;
+
+ .input input {
+ padding-right: 127px;
+ }
+
+ .append {
+ position: absolute;
+ right: 0;
+ top: 0;
+ padding: 7px 4px;
+ padding-bottom: 9px;
+ font-size: 16px;
+ color: $ui-base-lighter-color;
+ font-family: inherit;
+ pointer-events: none;
+ cursor: default;
+ }
+ }
+}
+
+.flash-message {
+ background: lighten($ui-base-color, 8%);
+ color: $ui-primary-color;
+ border-radius: 4px;
+ padding: 15px 10px;
+ margin-bottom: 30px;
+ box-shadow: 0 0 5px rgba($base-shadow-color, 0.2);
+ text-align: center;
+
+ p {
+ margin-bottom: 15px;
+ }
+
+ .oauth-code {
+ color: $ui-secondary-color;
+ outline: 0;
+ box-sizing: border-box;
+ display: block;
+ width: 100%;
+ border: none;
+ padding: 10px;
+ font-family: 'mastodon-font-monospace', monospace;
+ background: $ui-base-color;
+ color: $ui-primary-color;
+ font-size: 14px;
+ margin: 0;
+
+ &::-moz-focus-inner {
+ border: 0;
+ }
+
+ &::-moz-focus-inner,
+ &:focus,
+ &:active {
+ outline: 0 !important;
+ }
+
+ &:focus {
+ background: lighten($ui-base-color, 4%);
+ }
+ }
+
+ strong {
+ font-weight: 500;
+ }
+
+ @media screen and (max-width: 740px) and (min-width: 441px) {
+ margin-top: 40px;
+ }
+}
+
+.form-footer {
+ margin-top: 30px;
+ text-align: center;
+
+ a {
+ color: $ui-primary-color;
+ text-decoration: none;
+
+ &:hover {
+ text-decoration: underline;
+ }
+ }
+}
+
+.oauth-prompt,
+.follow-prompt {
+ margin-bottom: 30px;
+ text-align: center;
+ color: $ui-primary-color;
+
+ h2 {
+ font-size: 16px;
+ margin-bottom: 30px;
+ }
+
+ strong {
+ color: $ui-secondary-color;
+ font-weight: 500;
+ }
+
+ @media screen and (max-width: 740px) and (min-width: 441px) {
+ margin-top: 40px;
+ }
+}
+
+.qr-wrapper {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: flex-start;
+}
+
+.qr-code {
+ flex: 0 0 auto;
+ background: $simple-background-color;
+ padding: 4px;
+ margin: 0 10px 20px 0;
+ box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
+ display: inline-block;
+
+ svg {
+ display: block;
+ margin: 0;
+ }
+}
+
+.qr-alternative {
+ margin-bottom: 20px;
+ color: $ui-secondary-color;
+ flex: 150px;
+
+ samp {
+ display: block;
+ font-size: 14px;
+ }
+}
+
+.table-form {
+ p {
+ margin-bottom: 15px;
+
+ strong {
+ font-weight: 500;
+ }
+ }
+}
+
+.simple_form,
+.table-form {
+ .warning {
+ box-sizing: border-box;
+ background: rgba($error-value-color, 0.5);
+ color: $primary-text-color;
+ text-shadow: 1px 1px 0 rgba($base-shadow-color, 0.3);
+ box-shadow: 0 2px 6px rgba($base-shadow-color, 0.4);
+ border-radius: 4px;
+ padding: 10px;
+ margin-bottom: 15px;
+
+ a {
+ color: $primary-text-color;
+ text-decoration: underline;
+
+ &:hover,
+ &:focus,
+ &:active {
+ text-decoration: none;
+ }
+ }
+
+ strong {
+ font-weight: 600;
+ display: block;
+ margin-bottom: 5px;
+
+ .fa {
+ font-weight: 400;
+ }
+ }
+ }
+}
+
+.action-pagination {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+
+ .actions,
+ .pagination {
+ flex: 1 1 auto;
+ }
+
+ .actions {
+ padding: 30px 0;
+ padding-right: 20px;
+ flex: 0 0 auto;
+ }
+}
+
+.post-follow-actions {
+ text-align: center;
+ color: $ui-primary-color;
+
+ div {
+ margin-bottom: 4px;
+ }
+}
diff --git a/app/javascript/styles/mastodon/landing_strip.scss b/app/javascript/styles/mastodon/landing_strip.scss
new file mode 100644
index 0000000000..0bf9daafd4
--- /dev/null
+++ b/app/javascript/styles/mastodon/landing_strip.scss
@@ -0,0 +1,36 @@
+.landing-strip,
+.memoriam-strip {
+ background: rgba(darken($ui-base-color, 7%), 0.8);
+ color: $ui-primary-color;
+ font-weight: 400;
+ padding: 14px;
+ border-radius: 4px;
+ margin-bottom: 20px;
+ display: flex;
+ align-items: center;
+
+ strong,
+ a {
+ font-weight: 500;
+ }
+
+ a {
+ color: inherit;
+ text-decoration: underline;
+ }
+
+ .logo {
+ width: 30px;
+ height: 30px;
+ flex: 0 0 auto;
+ margin-right: 15px;
+ }
+
+ @media screen and (max-width: 740px) {
+ margin-bottom: 0;
+ }
+}
+
+.memoriam-strip {
+ background: rgba($base-shadow-color, 0.7);
+}
diff --git a/app/javascript/styles/mastodon/lists.scss b/app/javascript/styles/mastodon/lists.scss
new file mode 100644
index 0000000000..6019cd8002
--- /dev/null
+++ b/app/javascript/styles/mastodon/lists.scss
@@ -0,0 +1,19 @@
+.no-list {
+ list-style: none;
+
+ li {
+ display: inline-block;
+ margin: 0 5px;
+ }
+}
+
+.recovery-codes {
+ list-style: none;
+ margin: 0 auto;
+
+ li {
+ font-size: 125%;
+ line-height: 1.5;
+ letter-spacing: 1px;
+ }
+}
diff --git a/app/javascript/styles/mastodon/reset.scss b/app/javascript/styles/mastodon/reset.scss
new file mode 100644
index 0000000000..cc5ba9d7c8
--- /dev/null
+++ b/app/javascript/styles/mastodon/reset.scss
@@ -0,0 +1,91 @@
+/* http://meyerweb.com/eric/tools/css/reset/
+ v2.0 | 20110126
+ License: none (public domain)
+*/
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed,
+figure, figcaption, footer, header, hgroup,
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline;
+}
+
+/* HTML5 display-role reset for older browsers */
+article, aside, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section {
+ display: block;
+}
+
+body {
+ line-height: 1;
+}
+
+ol, ul {
+ list-style: none;
+}
+
+blockquote, q {
+ quotes: none;
+}
+
+blockquote:before, blockquote:after,
+q:before, q:after {
+ content: '';
+ content: none;
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+::-webkit-scrollbar {
+ width: 8px;
+ height: 8px;
+}
+
+::-webkit-scrollbar-thumb {
+ background: lighten($ui-base-color, 4%);
+ border: 0px none $base-border-color;
+ border-radius: 50px;
+}
+
+::-webkit-scrollbar-thumb:hover {
+ background: lighten($ui-base-color, 6%);
+}
+
+::-webkit-scrollbar-thumb:active {
+ background: lighten($ui-base-color, 4%);
+}
+
+::-webkit-scrollbar-track {
+ border: 0px none $base-border-color;
+ border-radius: 0;
+ background: rgba($base-overlay-background, 0.1);
+}
+
+::-webkit-scrollbar-track:hover {
+ background: $ui-base-color;
+}
+
+::-webkit-scrollbar-track:active {
+ background: $ui-base-color;
+}
+
+::-webkit-scrollbar-corner {
+ background: transparent;
+}
diff --git a/app/javascript/styles/mastodon/rtl.scss b/app/javascript/styles/mastodon/rtl.scss
new file mode 100644
index 0000000000..67bfa8a385
--- /dev/null
+++ b/app/javascript/styles/mastodon/rtl.scss
@@ -0,0 +1,254 @@
+body.rtl {
+ direction: rtl;
+
+ .column-link__icon,
+ .column-header__icon {
+ margin-right: 0;
+ margin-left: 5px;
+ }
+
+ .character-counter__wrapper {
+ margin-right: 8px;
+ margin-left: 16px;
+ }
+
+ .navigation-bar__profile {
+ margin-left: 0;
+ margin-right: 8px;
+ }
+
+ .search__input {
+ padding-right: 10px;
+ padding-left: 30px;
+ }
+
+ .search__icon .fa {
+ right: auto;
+ left: 10px;
+ }
+
+ .column-header__buttons {
+ left: 0;
+ right: auto;
+ }
+
+ .column-header__back-button {
+ padding-left: 5px;
+ padding-right: 0;
+ }
+
+ .column-header__setting-arrows {
+ float: left;
+ }
+
+ .compose-form__modifiers {
+ border-radius: 0 0 0 4px;
+ }
+
+ .setting-toggle {
+ margin-left: 0;
+ margin-right: 8px;
+ }
+
+ .setting-meta__label {
+ float: left;
+ }
+
+ .status__avatar {
+ left: auto;
+ right: 10px;
+ }
+
+ .status,
+ .activity-stream .status.light {
+ padding-left: 10px;
+ padding-right: 68px;
+ }
+
+ .status__info .status__display-name,
+ .activity-stream .status.light .status__display-name {
+ padding-left: 25px;
+ padding-right: 0;
+ }
+
+ .activity-stream .pre-header {
+ padding-right: 68px;
+ padding-left: 0;
+ }
+
+ .status__prepend {
+ margin-left: 0;
+ margin-right: 68px;
+ }
+
+ .status__prepend-icon-wrapper {
+ left: auto;
+ right: -26px;
+ }
+
+ .activity-stream .pre-header .pre-header__icon {
+ left: auto;
+ right: 42px;
+ }
+
+ .account__avatar-overlay-overlay {
+ right: auto;
+ left: 0;
+ }
+
+ .column-back-button--slim-button {
+ right: auto;
+ left: 0;
+ }
+
+ .status__relative-time,
+ .activity-stream .status.light .status__header .status__meta {
+ float: left;
+ }
+
+ .activity-stream .detailed-status.light .detailed-status__display-name > div {
+ float: right;
+ margin-right: 0;
+ margin-left: 10px;
+ }
+
+ .activity-stream .detailed-status.light .detailed-status__meta span > span {
+ margin-left: 0;
+ margin-right: 6px;
+ }
+
+ .status__action-bar-button {
+ float: right;
+ margin-right: 0;
+ margin-left: 18px;
+ }
+
+ .status__action-bar-dropdown {
+ float: right;
+ }
+
+ .privacy-dropdown__dropdown {
+ margin-left: 0;
+ margin-right: 40px;
+ }
+
+ .privacy-dropdown__option__icon {
+ margin-left: 10px;
+ margin-right: 0;
+ }
+
+ .detailed-status__display-avatar {
+ margin-right: 0;
+ margin-left: 10px;
+ float: right;
+ }
+
+ .detailed-status__favorites,
+ .detailed-status__reblogs {
+ margin-left: 0;
+ margin-right: 6px;
+ }
+
+ .fa-ul {
+ margin-left: 0;
+ margin-left: 2.14285714em;
+ }
+
+ .fa-li {
+ left: auto;
+ right: -2.14285714em;
+ }
+
+ .admin-wrapper .sidebar ul a i.fa,
+ a.table-action-link i.fa {
+ margin-right: 0;
+ margin-left: 5px;
+ }
+
+ .simple_form .check_boxes .checkbox label,
+ .simple_form .input.with_label.boolean label.checkbox {
+ padding-left: 0;
+ padding-right: 25px;
+ }
+
+ .simple_form .check_boxes .checkbox input[type="checkbox"],
+ .simple_form .input.boolean input[type="checkbox"] {
+ left: auto;
+ right: 0;
+ }
+
+ .simple_form .input-with-append .input input {
+ padding-left: 127px;
+ padding-right: 0;
+ }
+
+ .simple_form .input-with-append .append {
+ right: auto;
+ left: 0;
+ }
+
+ .table th,
+ .table td {
+ text-align: right;
+ }
+
+ .filters .filter-subset {
+ margin-right: 0;
+ margin-left: 45px;
+ }
+
+ .landing-page .header-wrapper .mascot {
+ right: 60px;
+ left: auto;
+ }
+
+ .landing-page .header .hero .floats .float-1 {
+ left: -120px;
+ right: auto;
+ }
+
+ .landing-page .header .hero .floats .float-2 {
+ left: 210px;
+ right: auto;
+ }
+
+ .landing-page .header .hero .floats .float-3 {
+ left: 110px;
+ right: auto;
+ }
+
+ .landing-page .header .links .brand img {
+ left: 0;
+ }
+
+ .landing-page .fa-external-link {
+ padding-right: 5px;
+ padding-left: 0 !important;
+ }
+
+ .landing-page .features #mastodon-timeline {
+ margin-right: 0;
+ margin-left: 30px;
+ }
+
+ @media screen and (min-width: 631px) {
+ .column,
+ .drawer {
+ padding-left: 5px;
+ padding-right: 5px;
+
+ &:first-child {
+ padding-left: 5px;
+ padding-right: 10px;
+ }
+ }
+
+ .columns-area > div {
+ .column,
+ .drawer {
+ padding-left: 5px;
+ padding-right: 5px;
+ }
+ }
+ }
+}
diff --git a/app/javascript/styles/mastodon/stream_entries.scss b/app/javascript/styles/mastodon/stream_entries.scss
new file mode 100644
index 0000000000..4f323a3787
--- /dev/null
+++ b/app/javascript/styles/mastodon/stream_entries.scss
@@ -0,0 +1,339 @@
+.activity-stream {
+ clear: both;
+ box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
+
+ .entry {
+ background: $simple-background-color;
+
+ .detailed-status.light,
+ .status.light {
+ border-bottom: 1px solid $ui-secondary-color;
+ animation: none;
+ }
+
+ &:last-child {
+ &,
+ .detailed-status.light,
+ .status.light {
+ border-bottom: 0;
+ border-radius: 0 0 4px 4px;
+ }
+ }
+
+ &:first-child {
+ &,
+ .detailed-status.light,
+ .status.light {
+ border-radius: 4px 4px 0 0;
+ }
+
+ &:last-child {
+ &,
+ .detailed-status.light,
+ .status.light {
+ border-radius: 4px;
+ }
+ }
+ }
+
+ @media screen and (max-width: 740px) {
+ &,
+ .detailed-status.light,
+ .status.light {
+ border-radius: 0 !important;
+ }
+ }
+ }
+
+ &.with-header {
+ .entry {
+ &:first-child {
+ &,
+ .detailed-status.light,
+ .status.light {
+ border-radius: 0;
+ }
+
+ &:last-child {
+ &,
+ .detailed-status.light,
+ .status.light {
+ border-radius: 0 0 4px 4px;
+ }
+ }
+ }
+ }
+ }
+
+ .status.light {
+ padding: 14px 14px 14px (48px + 14px * 2);
+ position: relative;
+ min-height: 48px;
+ cursor: default;
+
+ .status__header {
+ font-size: 15px;
+
+ .status__meta {
+ float: right;
+ font-size: 14px;
+
+ .status__relative-time {
+ color: $ui-primary-color;
+ }
+ }
+ }
+
+ .status__display-name {
+ display: block;
+ max-width: 100%;
+ padding-right: 25px;
+ color: $ui-base-color;
+ }
+
+ .status__avatar {
+ position: absolute;
+ left: 14px;
+ top: 14px;
+ width: 48px;
+ height: 48px;
+
+ & > div {
+ width: 48px;
+ height: 48px;
+ }
+
+ img {
+ display: block;
+ border-radius: 4px;
+ }
+ }
+
+ .display-name {
+ display: block;
+ max-width: 100%;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+
+ strong {
+ font-weight: 500;
+ color: $ui-base-color;
+ }
+
+ span {
+ font-size: 14px;
+ color: $ui-primary-color;
+ }
+ }
+
+ .status__content {
+ color: $ui-base-color;
+
+ a {
+ color: $ui-highlight-color;
+ }
+
+ a.status__content__spoiler-link {
+ color: $primary-text-color;
+ background: $ui-primary-color;
+
+ &:hover {
+ background: lighten($ui-primary-color, 8%);
+ }
+ }
+ }
+ }
+
+ .detailed-status.light {
+ padding: 14px;
+ background: $simple-background-color;
+ cursor: default;
+
+ .detailed-status__display-name {
+ display: block;
+ overflow: hidden;
+ margin-bottom: 15px;
+
+ & > div {
+ float: left;
+ margin-right: 10px;
+ }
+
+ .display-name {
+ display: block;
+ max-width: 100%;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+
+ strong {
+ font-weight: 500;
+ color: $ui-base-color;
+ }
+
+ span {
+ font-size: 14px;
+ color: $ui-primary-color;
+ }
+ }
+ }
+
+ .avatar {
+ width: 48px;
+ height: 48px;
+
+ img {
+ display: block;
+ border-radius: 4px;
+ }
+ }
+
+ .status__content {
+ color: $ui-base-color;
+
+ a {
+ color: $ui-highlight-color;
+ }
+
+ a.status__content__spoiler-link {
+ color: $primary-text-color;
+ background: $ui-primary-color;
+
+ &:hover {
+ background: lighten($ui-primary-color, 8%);
+ }
+ }
+ }
+
+ .detailed-status__meta {
+ margin-top: 15px;
+ color: $ui-primary-color;
+ font-size: 14px;
+ line-height: 18px;
+
+ a {
+ color: inherit;
+ }
+
+ span > span {
+ font-weight: 500;
+ font-size: 12px;
+ margin-left: 6px;
+ display: inline-block;
+ }
+ }
+
+ .status-card {
+ border-color: lighten($ui-secondary-color, 4%);
+ color: darken($ui-primary-color, 4%);
+
+ &:hover {
+ background: lighten($ui-secondary-color, 4%);
+ }
+ }
+
+ .status-card__title,
+ .status-card__description {
+ color: $ui-base-color;
+ }
+
+ .status-card__image {
+ background: $ui-secondary-color;
+ }
+ }
+
+ .media-spoiler {
+ background: $ui-primary-color;
+ color: $white;
+ transition: all 100ms linear;
+
+ &:hover,
+ &:active,
+ &:focus {
+ background: darken($ui-primary-color, 5%);
+ color: unset;
+ }
+ }
+
+ .pre-header {
+ padding: 14px 0;
+ padding-left: (48px + 14px * 2);
+ padding-bottom: 0;
+ margin-bottom: -4px;
+ color: $ui-primary-color;
+ font-size: 14px;
+ position: relative;
+
+ .pre-header__icon {
+ position: absolute;
+ left: (48px + 14px * 2 - 30px);
+ }
+
+ .status__display-name.muted strong {
+ color: $ui-primary-color;
+ }
+ }
+
+ .open-in-web-link {
+ text-decoration: none;
+
+ &:hover {
+ text-decoration: underline;
+ }
+ }
+}
+
+.embed {
+ .activity-stream {
+ box-shadow: none;
+
+ .entry {
+
+ .detailed-status.light {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ align-items: flex-start;
+
+ .detailed-status__display-name {
+ flex: 1;
+ margin: 0 5px 15px 0;
+ }
+
+ .button.button-secondary.logo-button {
+ flex: 0 auto;
+ font-size: 14px;
+
+ svg {
+ width: 20px;
+ height: auto;
+ vertical-align: middle;
+ margin-right: 5px;
+
+ path:first-child {
+ fill: $ui-primary-color;
+ }
+
+ path:last-child {
+ fill: $simple-background-color;
+ }
+ }
+
+ &:active,
+ &:focus,
+ &:hover {
+ svg path:first-child {
+ fill: lighten($ui-primary-color, 4%);
+ }
+ }
+ }
+
+ .status__content,
+ .detailed-status__meta {
+ flex: 100%;
+ }
+ }
+ }
+ }
+}
diff --git a/app/javascript/styles/mastodon/tables.scss b/app/javascript/styles/mastodon/tables.scss
new file mode 100644
index 0000000000..ad46f5f9f5
--- /dev/null
+++ b/app/javascript/styles/mastodon/tables.scss
@@ -0,0 +1,76 @@
+.table {
+ width: 100%;
+ max-width: 100%;
+ border-spacing: 0;
+ border-collapse: collapse;
+
+ th,
+ td {
+ padding: 8px;
+ line-height: 18px;
+ vertical-align: top;
+ border-top: 1px solid $ui-base-color;
+ text-align: left;
+ }
+
+ & > thead > tr > th {
+ vertical-align: bottom;
+ border-bottom: 2px solid $ui-base-color;
+ border-top: 0;
+ font-weight: 500;
+ }
+
+ & > tbody > tr > th {
+ font-weight: 500;
+ }
+
+ & > tbody > tr:nth-child(odd) > td,
+ & > tbody > tr:nth-child(odd) > th {
+ background: $ui-base-color;
+ }
+
+ a {
+ color: $ui-highlight-color;
+ text-decoration: underline;
+
+ &:hover {
+ text-decoration: none;
+ }
+ }
+
+ strong {
+ font-weight: 500;
+ }
+
+ &.inline-table > tbody > tr:nth-child(odd) > td,
+ &.inline-table > tbody > tr:nth-child(odd) > th {
+ background: transparent;
+ }
+}
+
+.table-wrapper {
+ overflow: auto;
+ margin-bottom: 20px;
+}
+
+samp {
+ font-family: 'mastodon-font-monospace', monospace;
+}
+
+a.table-action-link {
+ text-decoration: none;
+ display: inline-block;
+ margin-right: 5px;
+ padding: 0 10px;
+ color: rgba($primary-text-color, 0.7);
+ font-weight: 500;
+
+ &:hover {
+ color: $primary-text-color;
+ }
+
+ i.fa {
+ font-weight: 400;
+ margin-right: 5px;
+ }
+}
diff --git a/app/javascript/styles/mastodon/variables.scss b/app/javascript/styles/mastodon/variables.scss
new file mode 100644
index 0000000000..52c8cd1cf5
--- /dev/null
+++ b/app/javascript/styles/mastodon/variables.scss
@@ -0,0 +1,29 @@
+// Commonly used web colors
+$black: #000000; // Black
+$white: #ffffff; // White
+$success-green: #79bd9a; // Padua
+$error-red: #df405a; // Cerise
+$warning-red: #ff5050; // Sunset Orange
+$gold-star: #ca8f04; // Dark Goldenrod
+
+// Values from the classic Mastodon UI
+$classic-base-color: #282c37; // Midnight Express
+$classic-primary-color: #9baec8; // Echo Blue
+$classic-secondary-color: #d9e1e8; // Pattens Blue
+$classic-highlight-color: #2b90d9; // Summer Sky
+
+// Variables for defaults in UI
+$base-shadow-color: $black !default;
+$base-overlay-background: $black !default;
+$base-border-color: $white !default;
+$simple-background-color: $white !default;
+$primary-text-color: $white !default;
+$valid-value-color: $success-green !default;
+$error-value-color: $error-red !default;
+
+// Tell UI to use selected colors
+$ui-base-color: $classic-base-color !default; // Darkest
+$ui-base-lighter-color: lighten($ui-base-color, 26%) !default; // Lighter darkest
+$ui-primary-color: $classic-primary-color !default; // Lighter
+$ui-secondary-color: $classic-secondary-color !default; // Lightest
+$ui-highlight-color: $classic-highlight-color !default; // Vibrant