Update Site source

This commit is contained in:
Meghdad committed 2026-10-12 23:45:51 +03:30
1 parent 3144a675e6
commit d34e9e3901
13 files changed
+180 -48

No files matched your search

+93
View File
@@ -0,0 +1,93 @@
Copyright 2015 The Vazirmatn Project Authors (https://github.com/rastikerdar/vazirmatn)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file not shown.
Binary file not shown.
+16
View File
@@ -0,0 +1,16 @@
// Shape Persian labels for Satori, whose font renderer does not perform Arabic joining.
const forms:Record<string,Partial<Record<'isolated'|'final'|'initial'|'medial',string>>> = {"ٱ": {"isolated": "ﭐ", "final": "ﭑ"}, "ٻ": {"isolated": "ﭒ", "final": "ﭓ", "initial": "ﭔ", "medial": "ﭕ"}, "پ": {"isolated": "ﭖ", "final": "ﭗ", "initial": "ﭘ", "medial": "ﭙ"}, "ڀ": {"isolated": "ﭚ", "final": "ﭛ", "initial": "ﭜ", "medial": "ﭝ"}, "ٺ": {"isolated": "ﭞ", "final": "ﭟ", "initial": "ﭠ", "medial": "ﭡ"}, "ٿ": {"isolated": "ﭢ", "final": "ﭣ", "initial": "ﭤ", "medial": "ﭥ"}, "ٹ": {"isolated": "ﭦ", "final": "ﭧ", "initial": "ﭨ", "medial": "ﭩ"}, "ڤ": {"isolated": "ﭪ", "final": "ﭫ", "initial": "ﭬ", "medial": "ﭭ"}, "ڦ": {"isolated": "ﭮ", "final": "ﭯ", "initial": "ﭰ", "medial": "ﭱ"}, "ڄ": {"isolated": "ﭲ", "final": "ﭳ", "initial": "ﭴ", "medial": "ﭵ"}, "ڃ": {"isolated": "ﭶ", "final": "ﭷ", "initial": "ﭸ", "medial": "ﭹ"}, "چ": {"isolated": "ﭺ", "final": "ﭻ", "initial": "ﭼ", "medial": "ﭽ"}, "ڇ": {"isolated": "ﭾ", "final": "ﭿ", "initial": "ﮀ", "medial": "ﮁ"}, "ڍ": {"isolated": "ﮂ", "final": "ﮃ"}, "ڌ": {"isolated": "ﮄ", "final": "ﮅ"}, "ڎ": {"isolated": "ﮆ", "final": "ﮇ"}, "ڈ": {"isolated": "ﮈ", "final": "ﮉ"}, "ژ": {"isolated": "ﮊ", "final": "ﮋ"}, "ڑ": {"isolated": "ﮌ", "final": "ﮍ"}, "ک": {"isolated": "ﮎ", "final": "ﮏ", "initial": "ﮐ", "medial": "ﮑ"}, "گ": {"isolated": "ﮒ", "final": "ﮓ", "initial": "ﮔ", "medial": "ﮕ"}, "ڳ": {"isolated": "ﮖ", "final": "ﮗ", "initial": "ﮘ", "medial": "ﮙ"}, "ڱ": {"isolated": "ﮚ", "final": "ﮛ", "initial": "ﮜ", "medial": "ﮝ"}, "ں": {"isolated": "ﮞ", "final": "ﮟ"}, "ڻ": {"isolated": "ﮠ", "final": "ﮡ", "initial": "ﮢ", "medial": "ﮣ"}, "ۀ": {"isolated": "ﮤ", "final": "ﮥ"}, "ہ": {"isolated": "ﮦ", "final": "ﮧ", "initial": "ﮨ", "medial": "ﮩ"}, "ھ": {"isolated": "ﮪ", "final": "ﮫ", "initial": "ﮬ", "medial": "ﮭ"}, "ے": {"isolated": "ﮮ", "final": "ﮯ"}, "ۓ": {"isolated": "ﮰ", "final": "ﮱ"}, "ڭ": {"isolated": "ﯓ", "final": "ﯔ", "initial": "ﯕ", "medial": "ﯖ"}, "ۇ": {"isolated": "ﯗ", "final": "ﯘ"}, "ۆ": {"isolated": "ﯙ", "final": "ﯚ"}, "ۈ": {"isolated": "ﯛ", "final": "ﯜ"}, "ٷ": {"isolated": "ﯝ"}, "ۋ": {"isolated": "ﯞ", "final": "ﯟ"}, "ۅ": {"isolated": "ﯠ", "final": "ﯡ"}, "ۉ": {"isolated": "ﯢ", "final": "ﯣ"}, "ې": {"isolated": "ﯤ", "final": "ﯥ", "initial": "ﯦ", "medial": "ﯧ"}, "ى": {"initial": "ﯨ", "medial": "ﯩ", "isolated": "ﻯ", "final": "ﻰ"}, "ی": {"isolated": "ﯼ", "final": "ﯽ", "initial": "ﯾ", "medial": "ﯿ"}, "ء": {"isolated": "ﺀ"}, "آ": {"isolated": "ﺁ", "final": "ﺂ"}, "أ": {"isolated": "ﺃ", "final": "ﺄ"}, "ؤ": {"isolated": "ﺅ", "final": "ﺆ"}, "إ": {"isolated": "ﺇ", "final": "ﺈ"}, "ئ": {"isolated": "ﺉ", "final": "ﺊ", "initial": "ﺋ", "medial": "ﺌ"}, "ا": {"isolated": "ﺍ", "final": "ﺎ"}, "ب": {"isolated": "ﺏ", "final": "ﺐ", "initial": "ﺑ", "medial": "ﺒ"}, "ة": {"isolated": "ﺓ", "final": "ﺔ"}, "ت": {"isolated": "ﺕ", "final": "ﺖ", "initial": "ﺗ", "medial": "ﺘ"}, "ث": {"isolated": "ﺙ", "final": "ﺚ", "initial": "ﺛ", "medial": "ﺜ"}, "ج": {"isolated": "ﺝ", "final": "ﺞ", "initial": "ﺟ", "medial": "ﺠ"}, "ح": {"isolated": "ﺡ", "final": "ﺢ", "initial": "ﺣ", "medial": "ﺤ"}, "خ": {"isolated": "ﺥ", "final": "ﺦ", "initial": "ﺧ", "medial": "ﺨ"}, "د": {"isolated": "ﺩ", "final": "ﺪ"}, "ذ": {"isolated": "ﺫ", "final": "ﺬ"}, "ر": {"isolated": "ﺭ", "final": "ﺮ"}, "ز": {"isolated": "ﺯ", "final": "ﺰ"}, "س": {"isolated": "ﺱ", "final": "ﺲ", "initial": "ﺳ", "medial": "ﺴ"}, "ش": {"isolated": "ﺵ", "final": "ﺶ", "initial": "ﺷ", "medial": "ﺸ"}, "ص": {"isolated": "ﺹ", "final": "ﺺ", "initial": "ﺻ", "medial": "ﺼ"}, "ض": {"isolated": "ﺽ", "final": "ﺾ", "initial": "ﺿ", "medial": "ﻀ"}, "ط": {"isolated": "ﻁ", "final": "ﻂ", "initial": "ﻃ", "medial": "ﻄ"}, "ظ": {"isolated": "ﻅ", "final": "ﻆ", "initial": "ﻇ", "medial": "ﻈ"}, "ع": {"isolated": "ﻉ", "final": "ﻊ", "initial": "ﻋ", "medial": "ﻌ"}, "غ": {"isolated": "ﻍ", "final": "ﻎ", "initial": "ﻏ", "medial": "ﻐ"}, "ف": {"isolated": "ﻑ", "final": "ﻒ", "initial": "ﻓ", "medial": "ﻔ"}, "ق": {"isolated": "ﻕ", "final": "ﻖ", "initial": "ﻗ", "medial": "ﻘ"}, "ك": {"isolated": "ﻙ", "final": "ﻚ", "initial": "ﻛ", "medial": "ﻜ"}, "ل": {"isolated": "ﻝ", "final": "ﻞ", "initial": "ﻟ", "medial": "ﻠ"}, "م": {"isolated": "ﻡ", "final": "ﻢ", "initial": "ﻣ", "medial": "ﻤ"}, "ن": {"isolated": "ﻥ", "final": "ﻦ", "initial": "ﻧ", "medial": "ﻨ"}, "ه": {"isolated": "ﻩ", "final": "ﻪ", "initial": "ﻫ", "medial": "ﻬ"}, "و": {"isolated": "ﻭ", "final": "ﻮ"}, "ي": {"isolated": "ﻱ", "final": "ﻲ", "initial": "ﻳ", "medial": "ﻴ"}};
export const persianNumber = (value:number) => value.toLocaleString('fa-IR');
export const persianDigits = (value:string) => value.replace(/[0-9]/g,n=>'۰۱۲۳۴۵۶۷۸۹'[Number(n)]);
export function fa(text:string) {
const chars=Array.from(text);
const shaped=chars.map((char,i)=>{
const current=forms[char]; if(!current)return char;
const prev=forms[chars[i-1]], next=forms[chars[i+1]];
const joinsPrev=!!(current.final && prev?.initial);
const joinsNext=!!(current.initial && next?.final);
const shape=joinsPrev&&joinsNext?'medial':joinsPrev?'final':joinsNext?'initial':'isolated';
return current[shape]||char;
});
return shaped.reverse().join('').replace(/[۰-۹0-9٬٫]+/g,run=>Array.from(run).reverse().join(''));
}
+32 -20
View File
@@ -1,30 +1,42 @@
import { ledgerSnapshot } from './share';
import { fa, persianNumber as n, persianDigits } from './persian-text';
type Snapshot = Awaited<ReturnType<typeof ledgerSnapshot>>;
const gold='#d1ab6c',muted='#94999f',border='#353332';
const n=(v:number)=>v.toLocaleString('en-US');
export const cardWidth=1600,cardHeight=1200,cardEdition='fa-v2';
const gold='#d1ab6c',muted='#94999f';
const panel={display:'flex',flexDirection:'column' as const,flex:1,padding:'22px 26px',borderRadius:14};
const short=(value:string,max=21)=>value.length>max?value.slice(0,max-1)+'…':value;
export function ShareCard({data}:{data:Snapshot}) {
const top=data.players.slice(0,3);
const low=[...data.low].sort((a,b)=>a.balance-b.balance);
return <div style={{width:'100%',height:'100%',display:'flex',flexDirection:'column',backgroundColor:'#101214',padding:40,fontFamily:'sans-serif',color:'#e9e8e5'}}>
<div style={{display:'flex',justifyContent:'space-between',alignItems:'center',height:46}}>
<div style={{display:'flex',alignItems:'center',gap:16}}><div style={{display:'flex',width:40,height:44,border:'2px solid #d1ab6c',borderRadius:10,alignItems:'center',justifyContent:'center',color:gold,fontSize:27,fontWeight:700}}>S</div><div style={{display:'flex',fontSize:25,fontWeight:700,letterSpacing:4}}>SIPHONED</div></div>
<div style={{display:'flex',alignItems:'center',gap:10,color:'#91bba8',fontSize:14,padding:'8px 14px',border:'1px solid #344b3c',borderRadius:20,backgroundColor:'#1c2521'}}><div style={{display:'flex',width:7,height:7,borderRadius:10,backgroundColor:'#91bba8'}}/>GUILD VAULT / LIVE STATUS</div>
const top=data.players.slice(0,8), low=[...data.low].sort((a,b)=>a.balance-b.balance).slice(0,8);
const ready=data.players.length-data.low.length;
return <div style={{width:'100%',height:'100%',display:'flex',flexDirection:'column',backgroundColor:'#101214',padding:48,fontFamily:'Vazirmatn',color:'#e9e8e5'}}>
<div style={{display:'flex',justifyContent:'space-between',alignItems:'center',height:56}}>
<div style={{display:'flex',alignItems:'center',gap:11,color:'#91bba8',fontSize:22,padding:'8px 18px',border:'1px solid #344b3c',borderRadius:25,backgroundColor:'#1c2521'}}>{fa('آخرین وضعیت خزانه')}<div style={{display:'flex',width:9,height:9,borderRadius:10,backgroundColor:'#91bba8'}}/></div>
<div style={{display:'flex',alignItems:'center',gap:18,fontSize:33,fontWeight:700}}>{fa('خزانه سایفوند')}<div style={{display:'flex',width:52,height:54,border:'2px solid #d1ab6c',borderRadius:12,alignItems:'center',justifyContent:'center',color:gold,fontSize:31}}>{fa('س')}</div></div>
</div>
<div style={{display:'flex',marginTop:26,fontSize:41,fontWeight:700}}>The guild’s strength. At a glance.</div>
<div style={{display:'flex',gap:16,marginTop:24}}>
{[{label:'VAULT BALANCE',value:data.balance,color:gold,sub:'Siphoned energy'},{label:'TOTAL DEPOSITS',value:data.deposits,color:'#91bba8',sub:`${n(data.withdrawals)} withdrawn`},{label:'NEED A REFILL',value:data.low.length,color:'#e19b58',sub:`of ${data.players.length} members · target 10`}].map(stat=><div key={stat.label} style={{display:'flex',flexDirection:'column',flex:1,padding:'18px 24px',height:151,backgroundColor:'#191b1e',border:`1px solid ${border}`,borderRadius:12}}><div style={{display:'flex',fontSize:12,letterSpacing:2,color:muted}}>{stat.label}</div><div style={{display:'flex',fontSize:48,fontWeight:700,color:stat.color,marginTop:6}}>{n(stat.value)}</div><div style={{display:'flex',fontSize:14,color:muted,marginTop:1}}>{stat.sub}</div></div>)}
<div style={{display:'flex',justifyContent:'flex-end',marginTop:18,fontSize:45,fontWeight:700}}>{fa('سهم هر عضو، قدرت تمام گیلد')}</div>
<div style={{display:'flex',justifyContent:'flex-end',marginTop:3,fontSize:22,color:muted}}>{fa(`${n(data.players.length)} عضو · ${n(data.count)} تراکنش · ${n(ready)} عضو آماده نبرد`)}</div>
<div style={{display:'flex',gap:18,marginTop:23,height:155}}>
{[{label:'نیازمند اقدام',value:data.low.length,color:'#e19b58',sub:`${n(data.players.filter(p=>p.balance<0).length)} حساب بدهکار`},{label:'کل برداشت',value:data.withdrawals,color:'#da9494',sub:'سایفوند مصرف شده'},{label:'کل واریز',value:data.deposits,color:'#91bba8',sub:'مجموع سهم اعضای گیلد'},{label:'بالانس خزانه',value:data.balance,color:data.balance<0?'#e47878':gold,sub:'سایفوند · خالص واریز و برداشت'}].map(stat=><div key={stat.label} style={{display:'flex',flexDirection:'column',alignItems:'flex-end',flex:1,padding:'13px 23px',backgroundColor:'#191b1e',border:'1px solid #353332',borderRadius:13}}><div style={{display:'flex',fontSize:21,color:muted}}>{fa(stat.label)}</div><div style={{display:'flex',fontSize:48,fontWeight:700,color:stat.color,height:67,alignItems:'center'}}>{n(stat.value)}</div><div style={{display:'flex',fontSize:16,color:muted}}>{fa(stat.sub)}</div></div>)}
</div>
<div style={{display:'flex',gap:22,marginTop:22,height:164}}>
<div style={{display:'flex',flex:1.2,flexDirection:'column',border:'1px solid #4a3e2c',borderRadius:12,backgroundColor:'#211e19',padding:'15px 22px'}}>
<div style={{display:'flex',fontSize:12,letterSpacing:2,color:gold,marginBottom:9}}>TOP BALANCES</div>
{top.map((p,i)=><div key={p.name} style={{display:'flex',alignItems:'center',height:34,justifyContent:'space-between',fontSize:19}}><div style={{display:'flex',gap:15,alignItems:'center'}}><div style={{display:'flex',fontSize:14,color:gold,width:17}}>{i+1}.</div><div style={{display:'flex'}}>{p.name.length>22?p.name.slice(0,21)+'…':p.name}</div></div><div style={{display:'flex',color:gold,fontWeight:700}}>{n(p.balance)}</div></div>)}
<div style={{display:'flex',gap:24,marginTop:24,height:435}}>
<div style={{...panel,border:'1px solid #5a4431',backgroundColor:'#28221c'}}>
<div style={{display:'flex',justifyContent:'space-between',fontSize:27,fontWeight:700,color:'#e19b58',marginBottom:5}}><div style={{display:'flex',fontSize:18,fontWeight:400,color:muted}}>{fa('حداقل مطلوب: ۱۰')}</div>{fa('حساب‌های نیازمند اقدام')}</div>
<div style={{display:'flex',justifyContent:'space-between',fontSize:17,color:'#ad9580',borderBottom:'1px solid #504031',paddingBottom:8}}><div style={{display:'flex',width:130}}>{fa('واریز لازم')}</div><div style={{display:'flex',width:110}}>{fa('بالانس')}</div><div style={{display:'flex',flex:1,justifyContent:'flex-end'}}>{fa('بازیکن')}</div></div>
{low.map(p=><div key={p.name} style={{display:'flex',alignItems:'center',height:35,justifyContent:'space-between',fontSize:22}}><div style={{display:'flex',width:130,color:'#e0bb85'}}>{n(10-p.balance)}</div><div style={{display:'flex',width:110,color:p.balance<0?'#e47878':'#e19b58'}}>{n(p.balance)}</div><div style={{display:'flex',flex:1,justifyContent:'flex-end'}}>{short(p.name)}</div></div>)}
{!low.length&&<div style={{display:'flex',justifyContent:'flex-end',marginTop:20,color:'#91bba8',fontSize:23}}>{fa('همه اعضا برای نبرد آماده‌اند')}</div>}
<div style={{display:'flex',justifyContent:'flex-end',marginTop:'auto',paddingTop:8,fontSize:16,color:'#ad9580'}}>{fa(data.low.length>8?`${n(data.low.length-8)} حساب دیگر · برای جزئیات وارد سایت شو`:'برای رسیدن به حداقل، مبلغ واریز لازم را جبران کن')}</div>
</div>
<div style={{display:'flex',flex:1,flexDirection:'column',border:'1px solid #5a4431',borderRadius:12,backgroundColor:'#28221c',padding:'15px 22px'}}>
<div style={{display:'flex',fontSize:12,letterSpacing:2,color:'#e19b58',marginBottom:10}}>TIME TO CONTRIBUTE</div>
<div style={{display:'flex',fontSize:19,lineHeight:1.4,color:'#dcc9b4'}}>{low.length?low.slice(0,3).map(p=>p.name.length>18?p.name.slice(0,17)+'…':p.name).join(' · '):'Every member is battle-ready.'}</div>
<div style={{display:'flex',marginTop:12,fontSize:13,color:'#a88e73'}}>{low.length?`${low.length>3?`+ ${low.length-3} more members. `:''}Keep at least 10 Siphoned in the vault.`:'Full vault. Strong guild.'}</div>
<div style={{...panel,border:'1px solid #4a3e2c',backgroundColor:'#211e19'}}>
<div style={{display:'flex',justifyContent:'flex-end',fontSize:27,fontWeight:700,color:gold,marginBottom:5}}>{fa('لیدربورد · بالاترین بالانس‌ها')}</div>
<div style={{display:'flex',justifyContent:'space-between',fontSize:17,color:'#a6977c',borderBottom:'1px solid #443b2c',paddingBottom:8}}><div style={{display:'flex',width:160}}>{fa('بالانس')}</div><div style={{display:'flex',flex:1,justifyContent:'flex-end'}}>{fa('بازیکن')}</div><div style={{display:'flex',width:60,justifyContent:'flex-end'}}>{fa('رتبه')}</div></div>
{top.map((p,i)=><div key={p.name} style={{display:'flex',alignItems:'center',height:35,fontSize:22}}><div style={{display:'flex',width:160,color:p.balance<0?'#e47878':gold,fontWeight:700}}>{n(p.balance)}</div><div style={{display:'flex',flex:1,justifyContent:'flex-end'}}>{short(p.name)}</div><div style={{display:'flex',width:60,justifyContent:'flex-end',color:i<3?gold:muted}}>{n(i+1)}</div></div>)}
<div style={{display:'flex',justifyContent:'flex-end',marginTop:'auto',paddingTop:8,fontSize:16,color:'#a6977c'}}>{fa('رتبه‌بندی بر اساس خالص واریز و برداشت است')}</div>
</div>
</div>
<div style={{display:'flex',justifyContent:'space-between',borderTop:'1px solid #2b2d30',marginTop:22,paddingTop:15,color:muted,fontSize:12}}><div style={{display:'flex'}}>LATEST TRANSACTION: {data.latest}</div><div style={{display:'flex'}}>{n(data.count)} TRANSACTIONS · ALBION ONLINE</div></div>
<div style={{display:'flex',flexDirection:'column',marginTop:24,border:'1px solid #30343b',borderRadius:14,padding:'17px 26px',backgroundColor:'#191b1e',height:232}}>
<div style={{display:'flex',justifyContent:'flex-end',fontSize:25,fontWeight:700,marginBottom:8}}>{fa('آخرین تراکنش‌ها')}</div>
{data.recent.map((r,i)=><div key={i} style={{display:'flex',justifyContent:'space-between',alignItems:'center',height:35,fontSize:21}}><div style={{display:'flex',width:150,color:r.amount>0?'#91bba8':'#e47878'}}>{r.amount>0?'+':''}{n(r.amount)}</div><div style={{display:'flex',width:110,color:r.amount>0?'#91bba8':'#e47878'}}>{fa(r.reason==='Deposit'?'واریز':'برداشت')}</div><div style={{display:'flex',width:330}}>{short(r.player,27)}</div><div style={{display:'flex',color:muted,fontSize:18}}>{persianDigits(r.date.replace(/-/g,'/'))}</div></div>)}
</div>
<div style={{display:'flex',justifyContent:'space-between',borderTop:'1px solid #2b2d30',marginTop:20,paddingTop:12,color:muted,fontSize:17}}><div style={{display:'flex'}}>{fa('بالانس بر اساس لاگ‌های واردشده است · آلبیون آنلاین')}</div><div style={{display:'flex',gap:10}}>{persianDigits(data.latest.replace(/-/g,'/'))}<span>{fa('آخرین تراکنش:')}</span></div></div>
</div>;
}
+4 -2
View File
@@ -3,9 +3,11 @@ export const siteOrigin = 'https://siphoned-guild-vault.meghdad-social.chatgpt.s
export async function ledgerSnapshot(rows: {date:string;player:string;reason:string;amount:number}[]) {
const players = summarize(rows);
const digest = await crypto.subtle.digest('SHA-256', new TextEncoder().encode(rows.map(identity).sort().join('\n')));
const revision = Array.from(new Uint8Array(digest)).map(n=>n.toString(16).padStart(2,'0')).join('').slice(0,20);
const hash = Array.from(new Uint8Array(digest)).map(n=>n.toString(16).padStart(2,'0')).join('').slice(0,20);
const revision = `fa-v2-${hash}`;
return {
revision,
recent: rows.slice(0,4),
shareUrl: `${siteOrigin}/?v=${revision}`,
imageUrl: `${siteOrigin}/api/share-image?v=${revision}`,
players,
@@ -14,6 +16,6 @@ export async function ledgerSnapshot(rows: {date:string;player:string;reason:str
withdrawals: rows.reduce((n,r)=>n+Math.max(0,-r.amount),0),
low: players.filter(p=>p.balance<minimum),
count: rows.length,
latest: rows[0]?.date || 'No transactions yet',
latest: rows[0]?.date || 'هنوز تراکنشی ثبت نشده',
};
}
+1
View File
@@ -0,0 +1 @@
export const socialFonts = [{name:"Vazirmatn",weight:400,style:"normal" as const,data:Uint8Array.from(atob("AAEAAAAPAIAAAwBwR0RFRqgcpLkAAW0IAAABqkdQT1PTVhWrAAFutAAAVHpHU1VCmJPDqAABwzAAABxOT1MvMmgKWMcAAAF4AAAAYGNtYXCmzm0LAAAWrAAAB/ZnYXNwAAAAEAABbQAAAAAIZ2x5ZvTNykYAACkYAAEJTGhlYWQXFi5rAAAA/AAAADZoaGVhD78JAwAAATQAAAAkaG10eDXuc0UAAAHYAAAU1GxvY2FQTpBDAAAerAAACmxtYXhwBVcA8wAAAVgAAAAgbmFtZaBBvNEAATJkAAAGbnBvc3SxJab2AAE41AAANCpwcmVwaAaMhQAAHqQAAAAHAAEAAAAhAMXwxJvJXw889QADCAAAAAAA0X399AAAAADe2Oa6/Cf7igthCHMAAAAGAAIAAAAAAAAAAQAACDT7tAAAC8b8J/xTC2EAAQAAAAAAAAAAAAAAAAAABTUAAQAABTUAlAAWAF0ABgABAAAAAAAAAAAAAAAAAAUAAQAEBIcBkAAFAAAFMwWZAAABHgUzBZkAAAPXAGYCEgAAAAAAAAAAAAAAAIAAIAOAAAAAAAAACAAAAAAgICAgAMAAAP/9CDT7tAAACJgFFAAAAEEgCAAABDoGZgAAACAABAOMAGQAAAAABTgAHQSGABQFcgB0B3r/8QY6AAkHev/xBjoACQU4AB0EhgAUBXIAdAU4AB0EhgAUBXIAdAU4AB0EhgAUBXIAdAU4AB0EhgAUBXIAdAU4AB0EhgAUBXIAdAU4AB0EhgAUBXIAdAU4AB0FOAAdBIYAFASGABQFcgB0BTgAHQSGABQFcgB0BTgAHQSGABQFcgB0BTgAHQSGABQFcgB0BPwAqQRRAIsFNQB4BHwAYQH8AAAFNQB4BHwAYQU1AHgEfABhBTUAeAR8AGEFNQB4BHwAYQVAAKkEgACLBUAAqQSAAIsFXgAlBID/vQWkACA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