mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-02-15 07:28:59 +00:00
Show one time badge icon in donation receipt list
This commit is contained in:
31
images/rocket-36-dark.svg
Normal file
31
images/rocket-36-dark.svg
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<svg id="Export" xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.cls-1 {
|
||||||
|
fill: #e3e3fe;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-2 {
|
||||||
|
fill: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-3 {
|
||||||
|
fill: #cde4cd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-4 {
|
||||||
|
fill: #401968;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<g>
|
||||||
|
<circle class="cls-1" cx="18" cy="18" r="14"/>
|
||||||
|
<path id="border" d="M18,6A12,12,0,1,1,6,18,12,12,0,0,1,18,6m0-4A16,16,0,1,0,34,18,16,16,0,0,0,18,2Z"/>
|
||||||
|
</g>
|
||||||
|
<path class="cls-2" d="M10.6,20.84l.07,0h0C10.58,20.81,10.53,20.88,10.6,20.84Z"/>
|
||||||
|
<path class="cls-2" d="M18.37,25.29v0C18.32,25.32,18.34,25.36,18.37,25.29Z"/>
|
||||||
|
<path class="cls-2" d="M11.1,21.25a.09.09,0,0,1,0,.06C11,21.36,11.09,21.36,11.1,21.25Z"/>
|
||||||
|
<path class="cls-2" d="M19,25.4v.09c0,.08,0,0,0-.09Z"/>
|
||||||
|
<path class="cls-3" d="M23.07,12.2a12.15,12.15,0,0,0-.48-2.15l-.18-.49a8.15,8.15,0,0,0-5.74,3.52,22.93,22.93,0,0,0-2.44,6.75,3.31,3.31,0,0,0,1,1,5.06,5.06,0,0,0,2.56,1h.08l.13-.11c.36-.35.7-.72,1-1.08A24.25,24.25,0,0,0,22,17,7,7,0,0,0,23.07,12.2Zm-4,4.95a1.9,1.9,0,1,1,1.9-1.9A1.9,1.9,0,0,1,19.05,17.15Z"/>
|
||||||
|
<path class="cls-4" d="M24.09,12.38a12.26,12.26,0,0,0-.87-3.48.24.24,0,0,0,0-.14v0a.39.39,0,0,0-.53-.22l-.06,0h0A9.65,9.65,0,0,0,16.4,11.7a14.6,14.6,0,0,0-2.21,4.45,1.12,1.12,0,0,0-.36,0l-.79.16-.09,0h0l0,0-.05,0a2.68,2.68,0,0,0-.55.79l-.87,1.5-.88,1.5a2.05,2.05,0,0,0-.43,1,.65.65,0,0,0,1,.5c.18-.08.35-.18.53-.27l1.56-.8.25-.13a3.72,3.72,0,0,0,.61.69,4.58,4.58,0,0,0,1,.72c.07,0,.42.22.34.16a5.39,5.39,0,0,0,.6.37,4.07,4.07,0,0,0,1.79.43l.12,1.63.06.8a1.06,1.06,0,0,0,.13.58.65.65,0,0,0,1.1-.05c.06-.1.11-.22.17-.32l.75-1.41,1-1.8a3.32,3.32,0,0,0,.44-1,.39.39,0,0,0,0-.28,3.6,3.6,0,0,0-.49-1.15,22.16,22.16,0,0,0,1.61-2.14A8.11,8.11,0,0,0,24.09,12.38ZM10.67,20.8l-.07,0c-.07,0,0,0,.07,0Zm.4.51a.09.09,0,0,0,0-.06C11.09,21.36,11,21.36,11.07,21.31Zm7.3,4c0,.07-.05,0,0,0Zm.63.2V25.4h0C19,25.47,19,25.57,19,25.49Zm.06-4.82c-.34.36-.68.73-1,1.08l-.13.11h-.08a5.06,5.06,0,0,1-2.56-1,3.31,3.31,0,0,1-1-1,22.93,22.93,0,0,1,2.44-6.75,8.15,8.15,0,0,1,5.74-3.52l.18.49a12.15,12.15,0,0,1,.48,2.15A7,7,0,0,1,22,17,24.25,24.25,0,0,1,19.06,20.67ZM21,15.25a1.9,1.9,0,1,1-1.9-1.9A1.9,1.9,0,0,1,21,15.25ZM15.3,27.72a.56.56,0,0,1-.05.38,3.75,3.75,0,0,1-.78,1,.38.38,0,0,1-.22.13l-.13,0a.5.5,0,0,1-.35-.85,3.49,3.49,0,0,0,.32-.35,4.17,4.17,0,0,0,.29-.44.52.52,0,0,1,.3-.23.53.53,0,0,1,.39.05A.5.5,0,0,1,15.3,27.72Zm0-1.76a.48.48,0,0,1,.05-.39c.07-.11.12-.24.18-.36s.16-.45.23-.68a.5.5,0,0,1,.61-.35.53.53,0,0,1,.3.23.48.48,0,0,1,.05.39,5.43,5.43,0,0,1-.51,1.28.51.51,0,0,1-.68.18A.52.52,0,0,1,15.28,26Zm-5.62.54a.53.53,0,0,1,0-.39A4.73,4.73,0,0,1,10.2,25a.62.62,0,0,1,.31-.22.51.51,0,0,1,.38.07.5.5,0,0,1,.22.31.51.51,0,0,1-.06.38,4.48,4.48,0,0,0-.35.6,2.52,2.52,0,0,0-.12.29.57.57,0,0,1-.24.29.58.58,0,0,1-.39,0A.57.57,0,0,1,9.66,26.5Zm1.49-2.79a.5.5,0,0,1,.06-.38,5.31,5.31,0,0,1,.95-1,.57.57,0,0,1,.36-.14.51.51,0,0,1,.35.17.49.49,0,0,1,0,.7,5.71,5.71,0,0,0-.66.64l-.12.17a.51.51,0,0,1-.31.21.54.54,0,0,1-.39-.06A.49.49,0,0,1,11.15,23.71Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.0 KiB |
35
images/rocket-36-light.svg
Normal file
35
images/rocket-36-light.svg
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<svg id="Export" xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 36 36">
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.cls-1 {
|
||||||
|
fill: #e3e3fe;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-2 {
|
||||||
|
fill: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-3 {
|
||||||
|
fill: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-4 {
|
||||||
|
fill: #cde4cd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cls-5 {
|
||||||
|
fill: #401968;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<g>
|
||||||
|
<circle class="cls-1" cx="18" cy="18" r="14"/>
|
||||||
|
<path id="border" class="cls-2" d="M18,6A12,12,0,1,1,6,18,12,12,0,0,1,18,6m0-4A16,16,0,1,0,34,18,16,16,0,0,0,18,2Z"/>
|
||||||
|
</g>
|
||||||
|
<path class="cls-3" d="M10.6,20.84l.07,0h0C10.58,20.81,10.53,20.88,10.6,20.84Z"/>
|
||||||
|
<path class="cls-3" d="M18.37,25.29v0C18.32,25.32,18.34,25.36,18.37,25.29Z"/>
|
||||||
|
<path class="cls-3" d="M11.1,21.25a.09.09,0,0,1,0,.06C11,21.36,11.09,21.36,11.1,21.25Z"/>
|
||||||
|
<path class="cls-3" d="M19,25.4v.09c0,.08,0,0,0-.09Z"/>
|
||||||
|
<path class="cls-4" d="M23.07,12.2a12.15,12.15,0,0,0-.48-2.15l-.18-.49a8.15,8.15,0,0,0-5.74,3.52,22.93,22.93,0,0,0-2.44,6.75,3.31,3.31,0,0,0,1,1,5.06,5.06,0,0,0,2.56,1h.08l.13-.11c.36-.35.7-.72,1-1.08A24.25,24.25,0,0,0,22,17,7,7,0,0,0,23.07,12.2Zm-4,4.95a1.9,1.9,0,1,1,1.9-1.9A1.9,1.9,0,0,1,19.05,17.15Z"/>
|
||||||
|
<path class="cls-5" d="M24.09,12.38a12.26,12.26,0,0,0-.87-3.48.24.24,0,0,0,0-.14v0a.39.39,0,0,0-.53-.22l-.06,0h0A9.65,9.65,0,0,0,16.4,11.7a14.6,14.6,0,0,0-2.21,4.45,1.12,1.12,0,0,0-.36,0l-.79.16-.09,0h0l0,0-.05,0a2.68,2.68,0,0,0-.55.79l-.87,1.5-.88,1.5a2.05,2.05,0,0,0-.43,1,.65.65,0,0,0,1,.5c.18-.08.35-.18.53-.27l1.56-.8.25-.13a3.72,3.72,0,0,0,.61.69,4.58,4.58,0,0,0,1,.72c.07,0,.42.22.34.16a5.39,5.39,0,0,0,.6.37,4.07,4.07,0,0,0,1.79.43l.12,1.63.06.8a1.06,1.06,0,0,0,.13.58.65.65,0,0,0,1.1-.05c.06-.1.11-.22.17-.32l.75-1.41,1-1.8a3.32,3.32,0,0,0,.44-1,.39.39,0,0,0,0-.28,3.6,3.6,0,0,0-.49-1.15,22.16,22.16,0,0,0,1.61-2.14A8.11,8.11,0,0,0,24.09,12.38ZM10.67,20.8l-.07,0c-.07,0,0,0,.07,0Zm.4.51a.09.09,0,0,0,0-.06C11.09,21.36,11,21.36,11.07,21.31Zm7.3,4c0,.07-.05,0,0,0Zm.63.2V25.4h0C19,25.47,19,25.57,19,25.49Zm.06-4.82c-.34.36-.68.73-1,1.08l-.13.11h-.08a5.06,5.06,0,0,1-2.56-1,3.31,3.31,0,0,1-1-1,22.93,22.93,0,0,1,2.44-6.75,8.15,8.15,0,0,1,5.74-3.52l.18.49a12.15,12.15,0,0,1,.48,2.15A7,7,0,0,1,22,17,24.25,24.25,0,0,1,19.06,20.67ZM21,15.25a1.9,1.9,0,1,1-1.9-1.9A1.9,1.9,0,0,1,21,15.25ZM15.3,27.72a.56.56,0,0,1-.05.38,3.75,3.75,0,0,1-.78,1,.38.38,0,0,1-.22.13l-.13,0a.5.5,0,0,1-.35-.85,3.49,3.49,0,0,0,.32-.35,4.17,4.17,0,0,0,.29-.44.52.52,0,0,1,.3-.23.53.53,0,0,1,.39.05A.5.5,0,0,1,15.3,27.72Zm0-1.76a.48.48,0,0,1,.05-.39c.07-.11.12-.24.18-.36s.16-.45.23-.68a.5.5,0,0,1,.61-.35.53.53,0,0,1,.3.23.48.48,0,0,1,.05.39,5.43,5.43,0,0,1-.51,1.28.51.51,0,0,1-.68.18A.52.52,0,0,1,15.28,26Zm-5.62.54a.53.53,0,0,1,0-.39A4.73,4.73,0,0,1,10.2,25a.62.62,0,0,1,.31-.22.51.51,0,0,1,.38.07.5.5,0,0,1,.22.31.51.51,0,0,1-.06.38,4.48,4.48,0,0,0-.35.6,2.52,2.52,0,0,0-.12.29.57.57,0,0,1-.24.29.58.58,0,0,1-.39,0A.57.57,0,0,1,9.66,26.5Zm1.49-2.79a.5.5,0,0,1,.06-.38,5.31,5.31,0,0,1,.95-1,.57.57,0,0,1,.36-.14.51.51,0,0,1,.35.17.49.49,0,0,1,0,.7,5.71,5.71,0,0,0-.66.64l-.12.17a.51.51,0,0,1-.31.21.54.54,0,0,1-.39-.06A.49.49,0,0,1,11.15,23.71Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.0 KiB |
@@ -244,13 +244,22 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Placeholder for icon depending on receipt type
|
// Currently only one time donations are possible
|
||||||
&__icon {
|
&__icon {
|
||||||
width: 36px;
|
@include mixins.light-theme {
|
||||||
height: 36px;
|
background: url('../images/rocket-36-light.svg');
|
||||||
border-radius: 18px;
|
}
|
||||||
background-color: variables.$color-ultramarine-pale;
|
@include mixins.dark-theme {
|
||||||
flex-shrink: 0;
|
background: url('../images/rocket-36-dark.svg');
|
||||||
|
}
|
||||||
|
|
||||||
|
& {
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
background-size: 100%;
|
||||||
|
border-radius: 18px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__details {
|
&__details {
|
||||||
|
|||||||
@@ -581,6 +581,47 @@ DonationsDonateFlow.args = {
|
|||||||
showToast: action('showToast'),
|
showToast: action('showToast'),
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
export const DonationReceipts = Template.bind({});
|
||||||
|
DonationReceipts.args = {
|
||||||
|
donationsFeatureEnabled: true,
|
||||||
|
page: SettingsPage.DonationsDonateFlow,
|
||||||
|
renderDonationsPane: ({
|
||||||
|
contentsRef,
|
||||||
|
}: {
|
||||||
|
contentsRef: MutableRefObject<HTMLDivElement | null>;
|
||||||
|
page: SettingsPage;
|
||||||
|
setPage: (page: SettingsPage) => void;
|
||||||
|
}) =>
|
||||||
|
renderDonationsPane({
|
||||||
|
contentsRef,
|
||||||
|
me,
|
||||||
|
donationReceipts: [
|
||||||
|
{
|
||||||
|
id: '9f9288a1-acb6-4d2e-a4fe-0a736a318a26',
|
||||||
|
currencyType: 'usd',
|
||||||
|
paymentAmount: 1000,
|
||||||
|
timestamp: 1754000413436,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '22defee0-8797-4a49-bac8-1673232706fa',
|
||||||
|
currencyType: 'jpy',
|
||||||
|
paymentAmount: 1000,
|
||||||
|
timestamp: 1753995255509,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
page: SettingsPage.DonationsReceiptList,
|
||||||
|
setPage: action('setPage'),
|
||||||
|
saveAttachmentToDisk: async () => {
|
||||||
|
action('saveAttachmentToDisk')();
|
||||||
|
return { fullPath: '/mock/path/to/file.png', name: 'file.png' };
|
||||||
|
},
|
||||||
|
generateDonationReceiptBlob: async () => {
|
||||||
|
action('generateDonationReceiptBlob')();
|
||||||
|
return new Blob();
|
||||||
|
},
|
||||||
|
showToast: action('showToast'),
|
||||||
|
}),
|
||||||
|
};
|
||||||
export const Internal = Template.bind({});
|
export const Internal = Template.bind({});
|
||||||
Internal.args = {
|
Internal.args = {
|
||||||
page: SettingsPage.Internal,
|
page: SettingsPage.Internal,
|
||||||
|
|||||||
Reference in New Issue
Block a user