Page MenuHomePhabricator

D17418.id41905.diff
No OneTemporary

D17418.id41905.diff

diff --git a/resources/builtin/alphanumeric/0.png b/resources/builtin/alphanumeric/0.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/0d.png b/resources/builtin/alphanumeric/0d.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/1.png b/resources/builtin/alphanumeric/1.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/1d.png b/resources/builtin/alphanumeric/1d.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/2.png b/resources/builtin/alphanumeric/2.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/2d.png b/resources/builtin/alphanumeric/2d.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/3.png b/resources/builtin/alphanumeric/3.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/3d.png b/resources/builtin/alphanumeric/3d.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/4.png b/resources/builtin/alphanumeric/4.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/4d.png b/resources/builtin/alphanumeric/4d.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/5.png b/resources/builtin/alphanumeric/5.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/5d.png b/resources/builtin/alphanumeric/5d.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/6.png b/resources/builtin/alphanumeric/6.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/6d.png b/resources/builtin/alphanumeric/6d.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/7.png b/resources/builtin/alphanumeric/7.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/7d.png b/resources/builtin/alphanumeric/7d.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/8.png b/resources/builtin/alphanumeric/8.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/8d.png b/resources/builtin/alphanumeric/8d.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/9.png b/resources/builtin/alphanumeric/9.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/9d.png b/resources/builtin/alphanumeric/9d.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/A.png b/resources/builtin/alphanumeric/A.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Ad.png b/resources/builtin/alphanumeric/Ad.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/B.png b/resources/builtin/alphanumeric/B.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Bd.png b/resources/builtin/alphanumeric/Bd.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/C.png b/resources/builtin/alphanumeric/C.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Cd.png b/resources/builtin/alphanumeric/Cd.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/D.png b/resources/builtin/alphanumeric/D.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Dd.png b/resources/builtin/alphanumeric/Dd.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/E.png b/resources/builtin/alphanumeric/E.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Ed.png b/resources/builtin/alphanumeric/Ed.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/F.png b/resources/builtin/alphanumeric/F.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Fd.png b/resources/builtin/alphanumeric/Fd.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/G.png b/resources/builtin/alphanumeric/G.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Gd.png b/resources/builtin/alphanumeric/Gd.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/H.png b/resources/builtin/alphanumeric/H.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Hd.png b/resources/builtin/alphanumeric/Hd.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/I.png b/resources/builtin/alphanumeric/I.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Id.png b/resources/builtin/alphanumeric/Id.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/J.png b/resources/builtin/alphanumeric/J.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Jd.png b/resources/builtin/alphanumeric/Jd.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/K.png b/resources/builtin/alphanumeric/K.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Kd.png b/resources/builtin/alphanumeric/Kd.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/L.png b/resources/builtin/alphanumeric/L.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Ld.png b/resources/builtin/alphanumeric/Ld.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/M.png b/resources/builtin/alphanumeric/M.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Md.png b/resources/builtin/alphanumeric/Md.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/N.png b/resources/builtin/alphanumeric/N.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Nd.png b/resources/builtin/alphanumeric/Nd.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/O.png b/resources/builtin/alphanumeric/O.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Od.png b/resources/builtin/alphanumeric/Od.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/P.png b/resources/builtin/alphanumeric/P.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Pd.png b/resources/builtin/alphanumeric/Pd.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Q.png b/resources/builtin/alphanumeric/Q.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Qd.png b/resources/builtin/alphanumeric/Qd.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/R.png b/resources/builtin/alphanumeric/R.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Rd.png b/resources/builtin/alphanumeric/Rd.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/S.png b/resources/builtin/alphanumeric/S.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Sd.png b/resources/builtin/alphanumeric/Sd.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Shrug.png b/resources/builtin/alphanumeric/Shrug.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Shrug2.png b/resources/builtin/alphanumeric/Shrug2.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/T.png b/resources/builtin/alphanumeric/T.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Td.png b/resources/builtin/alphanumeric/Td.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/U.png b/resources/builtin/alphanumeric/U.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Ud.png b/resources/builtin/alphanumeric/Ud.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/V.png b/resources/builtin/alphanumeric/V.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Vd.png b/resources/builtin/alphanumeric/Vd.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/W.png b/resources/builtin/alphanumeric/W.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Wd.png b/resources/builtin/alphanumeric/Wd.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/X.png b/resources/builtin/alphanumeric/X.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Xd.png b/resources/builtin/alphanumeric/Xd.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Y.png b/resources/builtin/alphanumeric/Y.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Yd.png b/resources/builtin/alphanumeric/Yd.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Z.png b/resources/builtin/alphanumeric/Z.png
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/Zd.png b/resources/builtin/alphanumeric/Zd.png
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/resources/builtin/alphanumeric/shrug.png b/resources/builtin/alphanumeric/shrug.png
deleted file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001
diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -2770,6 +2770,8 @@
'PhabricatorFilesApplication' => 'applications/files/application/PhabricatorFilesApplication.php',
'PhabricatorFilesApplicationStorageEnginePanel' => 'applications/files/applicationpanel/PhabricatorFilesApplicationStorageEnginePanel.php',
'PhabricatorFilesBuiltinFile' => 'applications/files/builtin/PhabricatorFilesBuiltinFile.php',
+ 'PhabricatorFilesComposeAvatarBuiltinFile' => 'applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php',
+ 'PhabricatorFilesComposeAvatarExample' => 'applications/uiexample/examples/PhabricatorFilesComposeAvatarExample.php',
'PhabricatorFilesComposeIconBuiltinFile' => 'applications/files/builtin/PhabricatorFilesComposeIconBuiltinFile.php',
'PhabricatorFilesConfigOptions' => 'applications/files/config/PhabricatorFilesConfigOptions.php',
'PhabricatorFilesManagementCatWorkflow' => 'applications/files/management/PhabricatorFilesManagementCatWorkflow.php',
@@ -7853,6 +7855,8 @@
'PhabricatorFilesApplication' => 'PhabricatorApplication',
'PhabricatorFilesApplicationStorageEnginePanel' => 'PhabricatorApplicationConfigurationPanel',
'PhabricatorFilesBuiltinFile' => 'Phobject',
+ 'PhabricatorFilesComposeAvatarBuiltinFile' => 'PhabricatorFilesBuiltinFile',
+ 'PhabricatorFilesComposeAvatarExample' => 'PhabricatorUIExample',
'PhabricatorFilesComposeIconBuiltinFile' => 'PhabricatorFilesBuiltinFile',
'PhabricatorFilesConfigOptions' => 'PhabricatorApplicationConfigOptions',
'PhabricatorFilesManagementCatWorkflow' => 'PhabricatorFilesManagementWorkflow',
diff --git a/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php b/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php
new file mode 100644
--- /dev/null
+++ b/src/applications/files/builtin/PhabricatorFilesComposeAvatarBuiltinFile.php
@@ -0,0 +1,346 @@
+<?php
+
+final class PhabricatorFilesComposeAvatarBuiltinFile
+ extends PhabricatorFilesBuiltinFile {
+
+ private $icon;
+ private $color;
+ private $border;
+
+ public function setIcon($icon) {
+ $this->icon = $icon;
+ return $this;
+ }
+
+ public function getIcon() {
+ return $this->icon;
+ }
+
+ public function setColor($color) {
+ $this->color = $color;
+ return $this;
+ }
+
+ public function getColor() {
+ return $this->color;
+ }
+
+ public function setBorder($border) {
+ $this->border = $border;
+ return $this;
+ }
+
+ public function getBorder() {
+ return $this->border;
+ }
+
+ public function getBuiltinFileKey() {
+ $icon = $this->getIcon();
+ $color = $this->getColor();
+ $border = $this->getBorder();
+ $desc = "compose(icon={$icon}, color={$color}, border={$border}";
+ $hash = PhabricatorHash::digestToLength($desc, 40);
+ return "builtin:{$hash}";
+ }
+
+ public function getBuiltinDisplayName() {
+ $icon = $this->getIcon();
+ $color = $this->getColor();
+ $border = $this->getBorder();
+ return "{$icon}-{$color}-{$border}.png";
+ }
+
+ public function loadBuiltinFileData() {
+ return $this->composeImage(
+ $this->getColor(), $this->getIcon(), $this->getBorder());
+ }
+
+ private function composeImage($color, $icon, $border) {
+ // TODO
+ }
+
+ public static function getImageMap() {
+ $root = dirname(phutil_get_library_root('phabricator'));
+ $root = $root.'/resources/builtin/alphanumeric/';
+
+ $map = array();
+ $list = Filesystem::listDirectory($root, $include_hidden = false);
+ foreach ($list as $file) {
+ $key = 'alphanumeric/'.$file;
+ $map[$key] = $root.$file;
+ }
+
+ return $map;
+ }
+
+ public static function getColorMap() {
+ $map = array(
+ '#335862',
+ '#dfc47b',
+ '#2d5192',
+ '#c0bc6e',
+ '#3c5da0',
+ '#99cd86',
+ '#704889',
+ '#5ac59e',
+ '#984060',
+ '#33d4d1',
+ '#9c4050',
+ '#20d8fd',
+ '#944937',
+ '#4bd0e3',
+ '#a25542',
+ '#4eb4f3',
+ '#705412',
+ '#6da8ec',
+ '#545608',
+ '#829ce5',
+ '#68681d',
+ '#607bc2',
+ '#d1b66e',
+ '#4b69ad',
+ '#a4a154',
+ '#236ead',
+ '#daa969',
+ '#31a0de',
+ '#996f31',
+ '#4f8ed0',
+ '#846f2a',
+ '#bdb0f0',
+ '#518342',
+ '#9166aa',
+ '#5e904e',
+ '#f79dcc',
+ '#158e6b',
+ '#e189b7',
+ '#3ba984',
+ '#a85582',
+ '#4cccb7',
+ '#863d67',
+ '#84c08c',
+ '#7f4c7f',
+ '#a1bb7a',
+ '#65558f',
+ '#c2a962',
+ '#445082',
+ '#c9ca8e',
+ '#265582',
+ '#f4b189',
+ '#265582',
+ '#bd8f50',
+ '#40b8e1',
+ '#814a28',
+ '#80c8f6',
+ '#cf7b5d',
+ '#1db5c7',
+ '#c0606e',
+ '#299a89',
+ '#ef8ead',
+ '#296437',
+ '#d39edb',
+ '#507436',
+ '#b888c9',
+ '#476025',
+ '#9987c5',
+ '#828136',
+ '#7867a3',
+ '#769b5a',
+ '#c46e9d',
+ '#437d4e',
+ '#d17492',
+ '#115e41',
+ '#ec8794',
+ '#297153',
+ '#d67381',
+ '#57c2c3',
+ '#bc607f',
+ '#86ceac',
+ '#7e3e53',
+ '#72c8b8',
+ '#884349',
+ '#45a998',
+ '#faa38c',
+ '#265582',
+ '#ad954f',
+ '#265582',
+ '#e4b788',
+ '#265582',
+ '#bbbc81',
+ '#265582',
+ '#ccb781',
+ '#265582',
+ '#eb957f',
+ '#15729c',
+ '#cf996f',
+ '#369bc5',
+ '#b6685d',
+ '#2da0a1',
+ '#d38275',
+ '#217e70',
+ '#ec9da1',
+ '#146268',
+ '#e8aa95',
+ '#3c6796',
+ '#8da667',
+ '#935f93',
+ '#69a573',
+ '#ae78ad',
+ '#569160',
+ '#d898be',
+ '#525620',
+ '#8eb4e8',
+ '#5e622c',
+ '#929ad3',
+ '#6c8548',
+ '#576196',
+ '#aed0a0',
+ '#694e79',
+ '#9abb8d',
+ '#8c5175',
+ '#6bb391',
+ '#8b4a5f',
+ '#519878',
+ '#ae7196',
+ '#3d8465',
+ '#e69eb3',
+ '#48663d',
+ '#cdaede',
+ '#71743d',
+ '#63acda',
+ '#7b5d30',
+ '#66bed6',
+ '#a66c4e',
+ '#3585b0',
+ '#ba865c',
+ '#5880b0',
+ '#9b864d',
+ '#739acc',
+ '#9d764a',
+ '#48a3ba',
+ '#9d565b',
+ '#7fc4ca',
+ '#99566b',
+ '#94cabf',
+ '#7b4b49',
+ '#b1c8eb',
+ '#4e5632',
+ '#ecb2c3',
+ '#2d6158',
+ '#cf8287',
+ '#25889f',
+ '#b2696d',
+ '#6bafb6',
+ '#8c5744',
+ '#84b9d6',
+ '#725238',
+ '#9db3d6',
+ '#816f3e',
+ '#777cad',
+ '#a6a86e',
+ '#826693',
+ '#86a779',
+ '#9d7fad',
+ '#8b8e55',
+ '#b193c2',
+ '#547348',
+ '#d5adcb',
+ '#3f674d',
+ '#c98398',
+ '#66865a',
+ '#b2add6',
+ '#5a623d',
+ '#9793bb',
+ '#bea975',
+ '#3c5472',
+ '#d5c5a1',
+ '#5e5a7f',
+ '#b09c68',
+ '#2c647e',
+ '#d8b194',
+ '#49607f',
+ '#c7b794',
+ '#335862',
+ '#e3aba7',
+ '#335862',
+ '#d9b9ad',
+ '#335862',
+ '#c48975',
+ '#347b81',
+ '#ad697e',
+ '#799a6d',
+ '#916b88',
+ '#aeb68d',
+ '#69536b',
+ '#b4c4ad',
+ '#845865',
+ '#96b89d',
+ '#706d92',
+ '#9aa27a',
+ '#5b7292',
+ '#bc967b',
+ '#417792',
+ '#ce9793',
+ '#335862',
+ '#c898a5',
+ '#527a5f',
+ '#b38ba9',
+ '#648d72',
+ '#986b78',
+ '#79afa4',
+ '#966461',
+ '#50959b',
+ '#b27d7a',
+ '#335862',
+ '#b2a381',
+ '#335862',
+ '#bcadc4',
+ '#706343',
+ '#749ebc',
+ '#8c6a50',
+ '#92b8c4',
+ '#a07d62',
+ '#758cad',
+ '#868e67',
+ '#335862',
+ '#b6978c',
+ '#335862',
+ '#9e8f6e',
+ '#335862',
+ '#ac7e8b',
+ '#77a185',
+ '#807288',
+ '#636f51',
+ '#a192a9',
+ '#467a70',
+ '#9b7d73',
+ '#335862',
+ '#8a7c5b',
+ '#335862',
+ '#8c9c85',
+ '#335862',
+ '#81645a',
+ '#5f9489',
+ '#335862',
+ '#789da8',
+ '#335862',
+ '#72826c',
+ '#335862',
+ '#5c8596',
+ '#335862',
+ '#456a74',
+ '#335862',
+ '#335862',
+ '#335862',
+ );
+ return $map;
+ }
+
+ public static function getBorderMap() {
+ $map = array(
+ 'rgba(0,0,0,.3);', // Darker
+ 'rgba(255,255,255,.5);', // Lighter
+ );
+ return $map;
+ }
+
+}
diff --git a/src/applications/files/builtin/PhabricatorFilesOnDiskBuiltinFile.php b/src/applications/files/builtin/PhabricatorFilesOnDiskBuiltinFile.php
--- a/src/applications/files/builtin/PhabricatorFilesOnDiskBuiltinFile.php
+++ b/src/applications/files/builtin/PhabricatorFilesOnDiskBuiltinFile.php
@@ -45,11 +45,14 @@
$root = $root.'/resources/builtin/';
$map = array();
- $list = Filesystem::listDirectory($root, $include_hidden = false);
+ $list = id(new FileFinder($root))
+ ->withType('f')
+ ->withFollowSymlinks(true)
+ ->find();
+
foreach ($list as $file) {
$map[$file] = $root.$file;
}
-
return $map;
}
diff --git a/src/applications/uiexample/examples/PhabricatorFilesComposeAvatarExample.php b/src/applications/uiexample/examples/PhabricatorFilesComposeAvatarExample.php
new file mode 100644
--- /dev/null
+++ b/src/applications/uiexample/examples/PhabricatorFilesComposeAvatarExample.php
@@ -0,0 +1,77 @@
+<?php
+
+final class PhabricatorFilesComposeAvatarExample extends PhabricatorUIExample {
+
+ public function getName() {
+ return pht('Generate Avatar Images');
+ }
+
+ public function getDescription() {
+ return pht('Tests various color palettes and sizes.');
+ }
+
+ public function renderExample() {
+ $request = $this->getRequest();
+ $viewer = $request->getUser();
+
+ $colors = PhabricatorFilesComposeAvatarBuiltinFile::getColorMap();
+ $builtins = PhabricatorFilesComposeAvatarBuiltinFile::getImageMap();
+ $borders = PhabricatorFilesComposeAvatarBuiltinFile::getBorderMap();
+
+ shuffle($colors);
+ $images = array();
+ foreach ($builtins as $builtin => $raw_file) {
+ $file = PhabricatorFile::loadBuiltin($viewer, $builtin);
+ $images[] = $file->getBestURI();
+ }
+
+ $content = array();
+ foreach ($colors as $color) {
+ shuffle($borders);
+ $border = head($borders);
+
+ $styles = array();
+ $styles[] = 'background-color: '.$color.';';
+ $styles[] = 'display: inline-block;';
+ $styles[] = 'height: 46px;';
+ $styles[] = 'width: 46px;';
+ $styles[] = 'border-radius: 3px;';
+ $styles[] = 'border: 4px solid '.$border.';';
+
+ shuffle($images);
+ $png = head($images);
+
+ $image = phutil_tag(
+ 'img',
+ array(
+ 'src' => $png,
+ 'height' => 46,
+ 'width' => 46,
+ ));
+
+ $tag = phutil_tag(
+ 'div',
+ array(
+ 'style' => implode(' ', $styles),
+ ),
+ $image);
+
+ $content[] = phutil_tag(
+ 'div',
+ array(
+ 'class' => 'mlr mlb',
+ 'style' => 'float: left;',
+ ),
+ $tag);
+ }
+
+ $view = phutil_tag_div('ml', $content);
+
+ return phutil_tag(
+ 'div',
+ array(),
+ array(
+ $view,
+ ));
+ }
+}

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 10:40 PM (16 h, 40 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6912158
Default Alt Text
D17418.id41905.diff (29 KB)

Event Timeline