2011-04-14 00:15:48 +02:00
|
|
|
<?php
|
|
|
|
|
2014-07-23 02:03:09 +02:00
|
|
|
final class PhabricatorMacroApplication extends PhabricatorApplication {
|
2011-04-14 00:15:48 +02:00
|
|
|
|
2012-10-01 23:04:03 +02:00
|
|
|
public function getBaseURI() {
|
|
|
|
return '/macro/';
|
2011-04-14 00:15:48 +02:00
|
|
|
}
|
|
|
|
|
2014-07-23 15:52:50 +02:00
|
|
|
public function getName() {
|
|
|
|
return pht('Macro');
|
|
|
|
}
|
|
|
|
|
2012-10-01 23:04:03 +02:00
|
|
|
public function getShortDescription() {
|
2013-01-24 04:36:23 +01:00
|
|
|
return pht('Image Macros and Memes');
|
2012-10-01 23:04:03 +02:00
|
|
|
}
|
2011-04-14 00:15:48 +02:00
|
|
|
|
Use application icons for "Eye" menu and Crumbs
Summary:
Issues here:
- Need an application-sized "eye", or a "home" icon for "Phabricator Home".
- Some of the "apps_lb_2x" sliced images are the "_dark_" versions, not the light versions.
- If you slice an application-sized "logout" (power off) icon and application-sized "help" (questionmark in circle) icon I can replace the current menu icons and nearly get rid of "autosprite".
- To replace the icons on /applications/, the non-retina size is "4x", so we'd need "8x" for retina. Alternatively I can reduce the icon sizes by 50%.
- The "Help", "Settings" and "Logout" items currently have a "glowing" hover state, which needs a variant (or we can drop it).
- The /applications/ icons have a white hover state (or we can drop it).
- The 1x application (14x14) icons aren't used anywhere right now, should they be? Maybe in the feed in the future, etc?
- The "apps-2x" and "apps-large" sheets are the same image, but getting them to actually use the same file is a bit tricky, so I just left them separate for now.
Test Plan:
{F26698}
{F26699}
Reviewers: chad
Reviewed By: chad
CC: aran
Maniphest Tasks: T1960
Differential Revision: https://secure.phabricator.com/D4108
2012-12-07 22:37:28 +01:00
|
|
|
public function getIconName() {
|
2012-10-01 23:04:03 +02:00
|
|
|
return 'macro';
|
|
|
|
}
|
2011-04-14 00:15:48 +02:00
|
|
|
|
2012-10-01 23:04:03 +02:00
|
|
|
public function getTitleGlyph() {
|
|
|
|
return "\xE2\x9A\x98";
|
|
|
|
}
|
2011-04-14 00:15:48 +02:00
|
|
|
|
2012-10-04 00:46:19 +02:00
|
|
|
public function getApplicationGroup() {
|
|
|
|
return self::GROUP_UTILITIES;
|
|
|
|
}
|
2013-08-02 21:56:58 +02:00
|
|
|
|
2012-10-01 23:04:03 +02:00
|
|
|
public function getRoutes() {
|
|
|
|
return array(
|
|
|
|
'/macro/' => array(
|
2013-05-30 23:09:37 +02:00
|
|
|
'(query/(?P<key>[^/]+)/)?' => 'PhabricatorMacroListController',
|
Modernize Macro application
Summary: Adds feed, email, notifications, comments, partial editing, subscriptions, enable/disable, flags and crumbs to Macro.
Test Plan:
{F26839}
{F26840}
{F26841}
{F26842}
{F26843}
{F26844}
{F26845}
Reviewers: vrana, btrahan, chad
Reviewed By: vrana
CC: aran
Maniphest Tasks: T2157, T175, T2104
Differential Revision: https://secure.phabricator.com/D4141
2012-12-11 23:01:03 +01:00
|
|
|
'create/' => 'PhabricatorMacroEditController',
|
|
|
|
'view/(?P<id>[1-9]\d*)/' => 'PhabricatorMacroViewController',
|
|
|
|
'comment/(?P<id>[1-9]\d*)/' => 'PhabricatorMacroCommentController',
|
|
|
|
'edit/(?P<id>[1-9]\d*)/' => 'PhabricatorMacroEditController',
|
2013-09-28 01:01:37 +02:00
|
|
|
'audio/(?P<id>[1-9]\d*)/' => 'PhabricatorMacroAudioController',
|
Modernize Macro application
Summary: Adds feed, email, notifications, comments, partial editing, subscriptions, enable/disable, flags and crumbs to Macro.
Test Plan:
{F26839}
{F26840}
{F26841}
{F26842}
{F26843}
{F26844}
{F26845}
Reviewers: vrana, btrahan, chad
Reviewed By: vrana
CC: aran
Maniphest Tasks: T2157, T175, T2104
Differential Revision: https://secure.phabricator.com/D4141
2012-12-11 23:01:03 +01:00
|
|
|
'disable/(?P<id>[1-9]\d*)/' => 'PhabricatorMacroDisableController',
|
2013-01-20 03:43:35 +01:00
|
|
|
'meme/' => 'PhabricatorMacroMemeController',
|
2013-01-22 03:46:04 +01:00
|
|
|
'meme/create/' => 'PhabricatorMacroMemeDialogController',
|
2012-10-01 23:04:03 +02:00
|
|
|
),
|
|
|
|
);
|
2011-04-14 00:15:48 +02:00
|
|
|
}
|
|
|
|
|
2014-06-25 06:56:34 +02:00
|
|
|
public function getRemarkupRules() {
|
|
|
|
return array(
|
2014-08-04 16:55:43 +02:00
|
|
|
new PhabricatorIconRemarkupRule(),
|
2014-09-29 17:31:00 +02:00
|
|
|
new PhabricatorEmojiRemarkupRule(),
|
2014-06-25 06:56:34 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2013-10-16 19:35:52 +02:00
|
|
|
protected function getCustomCapabilities() {
|
|
|
|
return array(
|
2014-07-25 00:20:39 +02:00
|
|
|
PhabricatorMacroManageCapability::CAPABILITY => array(
|
2014-07-23 02:03:09 +02:00
|
|
|
'caption' => pht('Allows creating and editing macros.'),
|
2013-10-16 19:35:52 +02:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2012-10-01 23:04:03 +02:00
|
|
|
}
|