mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Add Craft action to menu.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Icon / Menu / craft_forge</title>
|
||||
<g id="Icon-/-Menu-/-craft_forge" stroke="none" fill="none" fill-rule="nonzero">
|
||||
<path d="M19.6809217,11.584649 C20.5356033,11.584649 21.2000008,12.2878722 21.2000008,13.1223747 L21.2000008,13.9316204 C21.2004071,14.7091201 20.622556,15.3824541 19.8332338,15.4624173 C19.2936121,15.517524 18.863406,15.6838819 18.5148679,15.9600196 C17.9029046,16.4448622 17.7719074,16.7050396 17.7599805,17.4205617 C17.7549104,17.7247336 17.9066741,18.0535064 18.2828229,18.4380374 L18.3163193,18.4721239 C18.6286055,18.7841363 18.8015577,19.2086622 18.8015652,19.6484703 L18.8015652,20.5496992 C18.8015652,21.4463744 18.0895511,22.2 17.1761278,22.2 L11.3441247,22.2 C10.4307014,22.2 9.71868728,21.4463744 9.71868728,20.5496992 L9.7187576,17.4274295 C9.47755232,17.5254077 9.20719261,17.5641978 8.92399018,17.5270815 L8.82750933,17.5141684 C7.54911686,17.3380977 6.63726756,17.0107043 5.59868772,16.406024 C4.66746279,15.8638477 3.83259127,15.0678149 3.08965928,14.0296999 C2.89997398,13.7643972 2.8,13.4461878 2.8,13.1223017 C2.8,12.2981385 3.44617313,11.5842771 4.30561482,11.584649 L19.6809217,11.584649 Z M19.6809217,12.7846491 L10.9186873,12.7846491 L10.9186873,20.5496992 C10.9186873,20.7983935 11.1091621,21 11.3441247,21 L17.1761278,21 C17.4110904,21 17.6015652,20.7983935 17.6015652,20.5496992 L17.6015652,19.6484703 C17.6015631,19.5245421 17.5533068,19.4060929 17.4681634,19.3210241 L17.4276455,19.2798637 C16.838469,18.6775712 16.5493029,18.0511373 16.5601472,17.400562 C16.5779411,16.333059 16.8696695,15.7324922 17.7696732,15.0194427 C18.3033912,14.5965918 18.9506069,14.346311 19.7113227,14.268626 C19.8750884,14.2520354 20.0000918,14.1063764 20.0000008,13.9322477 L20.0000008,13.1223747 C20.0000008,12.935854 19.8571436,12.7846491 19.6809217,12.7846491 Z M9.53846149,12.7845761 L4.30563157,12.7846491 C4.13687242,12.7845761 4,12.935781 4,13.1223017 C4,13.1983211 4.02317579,13.2721229 4.06582023,13.3317674 C4.71454843,14.2382492 5.42674138,14.9173429 6.20247008,15.3689865 C7.00926998,15.8387202 7.77204223,16.1574729 8.9912376,16.3253905 L9.083067,16.3376721 C9.30651386,16.3669559 9.50913195,16.1904911 9.53562716,15.943527 L9.53774602,15.9171788 L9.53846149,15.8907386 L9.53846149,12.7845761 Z M10.4788189,4.1585305 C10.6359537,4.04081238 10.8193928,3.95031211 11.0249783,3.89447895 L11.0560294,3.88689861 L18.2834796,2.19763527 C19.3588588,1.95756484 20.3605762,2.68507871 20.5879674,3.7496305 C20.804869,4.76507473 20.236643,5.82229392 19.2136718,6.10353547 L19.1761421,6.1131484 L11.9134443,7.8629449 C11.783972,7.89275655 11.655752,7.90569509 11.5309524,7.90138406 C11.5250994,8.77232221 10.9561307,9.57148161 10.0819194,9.80593161 L8.68757486,10.1797045 L8.66280238,10.186063 C7.5930357,10.4485249 6.54544345,9.75702049 6.31125651,8.68767158 L5.85988213,6.62707487 C5.79048169,6.31001116 5.77133091,5.98343154 5.80332573,5.65800939 L5.80985756,5.59276914 C6.02661339,3.45619581 6.36817266,2.37770145 7.46098137,2.05998431 C8.58655657,1.73274083 9.37690318,2.47216744 10.4788189,4.1585305 Z M7.79599128,3.21227263 C7.42609973,3.31981284 7.16201249,4.15368454 7.00372953,5.71388771 L6.99735817,5.77753574 C6.9778604,5.97586102 6.98961052,6.17623664 7.03212914,6.37048776 L7.48346299,8.43089936 C7.57631307,8.85487318 7.97630428,9.11890309 8.37686836,9.02062668 L9.77121288,8.64685376 C10.1636097,8.54161898 10.4046693,8.12382717 10.313909,7.70628159 L9.8639779,5.63687074 C9.81726157,5.42209724 9.73370206,5.21822195 9.61745161,5.03537583 L9.55058468,4.9310173 C8.74313795,3.6799007 8.15837098,3.10691637 7.79599128,3.21227263 Z M19.4144405,4.00029901 C19.3203161,3.55964744 18.9370239,3.28127513 18.5449348,3.36880612 L11.3291525,5.05540352 L11.3132664,5.05933514 C11.1001196,5.11730073 10.9687444,5.36034493 11.0198317,5.60218956 L11.1793189,6.35719422 L11.1844416,6.37904886 C11.241995,6.60217216 11.4412271,6.74027568 11.6441837,6.69354387 L18.89506,4.94653241 L18.907651,4.94321168 C19.2770782,4.84162174 19.5039756,4.41946535 19.4144405,4.00029901 Z" id="Shape" fill="#FFFFFF"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
@@ -230,6 +230,7 @@ darkGiftLink: icon {{ "menu/copy", groupCallMembersFg }};
|
||||
darkGiftShare: icon {{ "menu/share", groupCallMembersFg }};
|
||||
darkGiftTheme: icon {{ "menu/colors", groupCallMembersFg }};
|
||||
darkGiftTransfer: icon {{ "chat/input_replace", groupCallMembersFg }};
|
||||
darkGiftCraft: icon {{ "menu/craft_start-24x24", groupCallMembersFg }};
|
||||
darkGiftNftWear: icon {{ "menu/nft_wear", groupCallMembersFg }};
|
||||
darkGiftNftTakeOff: icon {{ "menu/nft_takeoff", groupCallMembersFg }};
|
||||
darkGiftNftResell: icon {{ "menu/tag_sell", groupCallMembersFg }};
|
||||
|
||||
@@ -1129,6 +1129,18 @@ void FillUniqueGiftMenu(
|
||||
if (!host) {
|
||||
return;
|
||||
}
|
||||
if (CanCraftGift(&show->session(), e)) {
|
||||
menu->addAction(tr::lng_gift_craft_menu_button(tr::now), [=] {
|
||||
const auto unique = e.uniqueGift;
|
||||
if (Ui::ShowCraftLaterError(show, unique)) {
|
||||
return;
|
||||
}
|
||||
const auto savedId = EntryToSavedStarGiftId(&show->session(), e);
|
||||
if (const auto window = show->resolveWindow()) {
|
||||
Ui::ShowGiftCraftInfoBox(window, unique, savedId);
|
||||
}
|
||||
}, st.craft ? st.craft : &st::menuIconCraft);
|
||||
}
|
||||
const auto transfer = savedId
|
||||
&& (savedId.isUser() ? e.in : savedId.chat()->canTransferGifts())
|
||||
&& (unique->starsForTransfer >= 0);
|
||||
@@ -1224,6 +1236,7 @@ CreditsEntryBoxStyleOverrides DarkCreditsEntryBoxStyle() {
|
||||
.share = &st::darkGiftShare,
|
||||
.theme = &st::darkGiftTheme,
|
||||
.transfer = &st::darkGiftTransfer,
|
||||
.craft = &st::darkGiftCraft,
|
||||
.wear = &st::darkGiftNftWear,
|
||||
.takeoff = &st::darkGiftNftTakeOff,
|
||||
.resell = &st::darkGiftNftResell,
|
||||
|
||||
@@ -201,6 +201,7 @@ menuIconReorder: icon{{ "menu/reorder-24x24", menuIconColor }};
|
||||
menuIconTools: icon{{ "menu/craft_tools-24x24", menuIconColor }};
|
||||
menuIconCraftTraits: icon{{ "menu/craft_random-24x24", menuIconColor }};
|
||||
menuIconCraftChance: icon{{ "menu/craft_chance-24x24", menuIconColor }};
|
||||
menuIconCraft: icon{{ "menu/craft_start-24x24", menuIconColor }};
|
||||
|
||||
menuIconTTLAny: icon {{ "menu/auto_delete_plain", menuIconColor }};
|
||||
menuIconTTLAnyTextPosition: point(11px, 22px);
|
||||
|
||||
Reference in New Issue
Block a user