Skip to content

Commit

Permalink
Merge pull request #47 from dsiekiera/beta
Browse files Browse the repository at this point in the history
Beta
  • Loading branch information
Th3OnlyC0D3R authored Feb 3, 2021
2 parents a16c624 + 79de4b2 commit cc3ed17
Show file tree
Hide file tree
Showing 16 changed files with 217 additions and 173 deletions.
10 changes: 7 additions & 3 deletions css/web/boxes.css
Original file line number Diff line number Diff line change
Expand Up @@ -1136,11 +1136,15 @@ FP-Bar */

/*--------------------------------------------------------------------------------------------------------------------*/

.jq-toast-wrap { display: block; position: fixed; /*width: 250px*/; pointer-events: none !important; margin: 0; padding: 0; letter-spacing: normal; z-index: 9000 !important; }
.jq-toast-wrap { display: block; position: fixed; pointer-events: none !important; margin: 0; padding: 0; letter-spacing: normal; z-index: 9000 !important; }
.jq-toast-wrap * { margin: 0; padding: 0; }

.jq-toast-wrap.bottom-left { bottom: 20px; left: 20px; right: unset }
.jq-toast-wrap.bottom-right { bottom: 70px; right: 26px; left: unset }
.jq-toast-wrap.bottom-left { bottom: 162px; left: 20px; right: unset }

.jq-toast-wrap.bottom-right { bottom: 13px; right: 17px; left: unset }
.jq-toast-wrap.menu-rightbar.bottom-right { right: 80px;}
.jq-toast-wrap.menu-bottombar.bottom-right { bottom: 60px;}

.jq-toast-wrap.top-left { top: 20px; left: 20px; right: unset }
.jq-toast-wrap.top-right { top: 20px; right: 40px; left: unset }

Expand Down
19 changes: 18 additions & 1 deletion js/web/_helper/js/_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,13 +487,14 @@ let HTML = {
}, 100);
},

MapBox: (id)=> {

MapBox: (id)=> {
setTimeout(()=> {
new Function(`${HTML.customFunctions[id + 'Map']}`)();
}, 100);
},


/**
* Zweiter Klick auf das Menü-Icon schliesst eine ggf. offene Box
*
Expand Down Expand Up @@ -663,5 +664,21 @@ let HTML = {

LeaveFullscreen:()=> {

},


ShowToastMsg: (d)=> {

if (!Settings.GetSetting('ShowNotifications') && !d['show']) return;

$.toast({
heading: d['head'],
text: d['text'],
icon: d['type'],
hideAfter: d['hideAfter'],
position: Settings.GetSetting('NotificationsPosition', true),
extraClass: localStorage.getItem('SelectedMenu') || 'bottombar',
stack: localStorage.getItem('NotificationStack') || 4
});
}
};
4 changes: 2 additions & 2 deletions js/web/_i18n/el.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"API.GEXChampionship": "ΕΣ Κατάταξη Συντεχνίας, ενημερώθηκε.",
"API.GEXChampionship": "ΕΣ Κατάταξη Συντεχνίας, ενημερώθηκε",
"API.GEXPlayer": "ΕΣ Κατάταξη Μέλους, ενημερώθηκε",
"API.LGGildMember": "__player__ Πληροφορίες ΜΚ, ενημερώθηκαν",
"API.LGInvest": "Οι Επενδύσεις σου σε ΜΚ, ενημερώθηκαν",
Expand All @@ -11,7 +11,7 @@
"Boxes.Alerts.Form.Battleground": "Πεδία Μάχης",
"Boxes.Alerts.Form.Body": "Σώμα",
"Boxes.Alerts.Form.Create": "Δημιουργία",
"Boxes.Alerts.Form.CreateAlert": "Δρόμοι",
"Boxes.Alerts.Form.CreateAlert": "Ειδοποίηση δημιουργίας",
"Boxes.Alerts.Form.CreateAllSectors": "Δημιουργία Για Όλους τους Τομείς",
"Boxes.Alerts.Form.CreateNewAlert": "Δημιουργία Νέας Ειδοποίησης",
"Boxes.Alerts.Form.Datetime": "Ημερομηνία & Ώρα",
Expand Down
3 changes: 3 additions & 0 deletions js/web/_i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@
"Settings.Entry.InfoboxEntryCount": "Infoboard Entry Count",
"Settings.Entry.MenuLength": "Menu Length",
"Settings.Entry.NotificationsPosition": "Notify position",
"Settings.Entry.NotificationsStack": "Notify stacks",
"Settings.Entry.ResetBoxPositions": "Box Coordinates",
"Settings.Entry.SelectedMenu": "Change menu",
"Settings.Entry.SendGEXInfo": "GE evaluations",
Expand Down Expand Up @@ -734,6 +735,8 @@
"Settings.NotificationPosition.ToastTestHeader": "Preview notification",
"Settings.NotificationsPosition.Desc": "Where do you want the notifications to appear on your screen?",
"Settings.NotificationsPosition.Title": "Notify position",
"Settings.NotificationsStack.Desc": "How many info messages do you want to see at once? The default is a maximum of 4.",
"Settings.NotificationsStack.Title": "Notify stacks",
"Settings.ResetBoxPositions.Button": "Delete!",
"Settings.ResetBoxPositions.Desc": "Should all box coordinates be reset?",
"Settings.ResetBoxPositions.Title": "Box Coordinates",
Expand Down
25 changes: 23 additions & 2 deletions js/web/_i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"API.UpdateSuccess": "Atualização realizada com sucesso!",
"Boxes.Alerts.Form.Antiques.Auction": "Leilão",
"Boxes.Alerts.Form.Antiques.Cooldown": "Leilão em pausa",
"Boxes.Alerts.Form.Antiques.Dealer": "Leiloeiro de Antiguidades",
"Boxes.Alerts.Form.Antiques.Dealer": "Negociante de Antiguidades",
"Boxes.Alerts.Form.Antiques.Exchange": "troca diária",
"Boxes.Alerts.Form.Battleground": "Províncias do Campo de batalhas",
"Boxes.Alerts.Form.Body": "Corpo",
Expand Down Expand Up @@ -96,6 +96,7 @@
"Boxes.Calculator.MaxLevel": "Nivel máximo",
"Boxes.Calculator.Meds": "Medalhas",
"Boxes.Calculator.Profit": "Lucro",
"Boxes.Calculator.Settings.Save": "Guardar",
"Boxes.Calculator.Step": "Nível ",
"Boxes.Calculator.TTForderCosts": "Custo = __nettoreward__<small>(Recompensa net)</small> X __forderfactor__%<small>(Friendly invest??)</small> = __costs__",
"Boxes.Calculator.TTForderFPStockLow": "ATENÇÃO: Insuficientes pacotes de pontos forge no inventário!<br>Tens apenas __fpstock__ de __costs__PFs<br>Precisa de __tooless__PFs",
Expand All @@ -120,12 +121,23 @@
"Boxes.CityMap.Desc1": "Para planificar a sua cidade, temos que transferir os seus dados para foe-rechner.de",
"Boxes.CityMap.Desc2": "Enviar",
"Boxes.CityMap.FreeArea": "Area livre: ",
"Boxes.CityMap.HighlightOldBuildings": "Destacar edifícios antigos",
"Boxes.CityMap.NormalPerspecitve": "Standard",
"Boxes.CityMap.ShowSubmitBox": "Mostrar \"enviar\"",
"Boxes.CityMap.SubmitSuccess": "Os dados foram enviados com sucesso... Visite agora ",
"Boxes.CityMap.TitleSend": "Submeter dados",
"Boxes.CityMap.WholeArea": "Area total: ",
"Boxes.CityMap.YourCity": "Tua cidade",
"Boxes.CityMap.clan_power_production": "produção de poder da Guilda",
"Boxes.CityMap.culture": "Edifícios Culturais",
"Boxes.CityMap.decoration": "Decorações",
"Boxes.CityMap.goods": "Edifícios de Mercadorias",
"Boxes.CityMap.military": "Edifícios Militares",
"Boxes.CityMap.production": "Edifícios de Produção",
"Boxes.CityMap.random_production": "Produção aleatória",
"Boxes.CityMap.residential": "Edifícios residenciais",
"Boxes.CityMap.street": "Ruas",
"Boxes.CityMap.tower": "Torres",
"Boxes.EventChests.Chance": "Chance",
"Boxes.EventChests.Cost": "Custos",
"Boxes.EventChests.CostPerPrize": "Custo/Recompensa",
Expand Down Expand Up @@ -153,7 +165,7 @@
"Boxes.FPCollector.hiddenReward": "Recompensa oculta",
"Boxes.FPCollector.pickupProduction": "Recolha dos edifícios",
"Boxes.FPCollector.satDown": "Visitar taberna",
"Boxes.FPCollector.spoilsOfWar": "Himeji - Despojos de Guerra",
"Boxes.FPCollector.spoilsOfWar": "Castelo Himeji - Despojos de Guerra",
"Boxes.FPCollector.winterEvent": "Evento de inverno",
"Boxes.Gildfights.Fights": "Lutas",
"Boxes.Gildfights.LastSnapshot": " - ultimo captura à __time__",
Expand Down Expand Up @@ -254,11 +266,15 @@
"Boxes.MoppelHelper.Days": "__days__ dia(s)",
"Boxes.MoppelHelper.Event": "Evento",
"Boxes.MoppelHelper.Friends": "Amigos",
"Boxes.MoppelHelper.FriendsSocialTabTT": "Clica no separador de amigos no jogo para desbloqueares a lista de eventos dos teus amigos",
"Boxes.MoppelHelper.GBs": "Grandes Edifícios",
"Boxes.MoppelHelper.GuildMembers": "Membros da guilda",
"Boxes.MoppelHelper.GuildSocialTabTT": "Clica no separador de membros da guilda no jogo para desbloqueares a lista de eventos dos membros da tua guilda",
"Boxes.MoppelHelper.HeaderWarning": "ATENÇÃO: Estes valores só são válidos se percorreres todos os novos eventos na lista de eventos em Câmara Municipal > Notícias > Histórico de Eventos",
"Boxes.MoppelHelper.MoppelEvents": "Motivar/Polir",
"Boxes.MoppelHelper.Name": "Nome",
"Boxes.MoppelHelper.Neighbors": "Vizinhos",
"Boxes.MoppelHelper.NeighborsSocialTabTT": "Clica no separador de vizinhos no jogo para desbloqueares a lista de eventos dos teus vizinhos",
"Boxes.MoppelHelper.Never": "NUNCA",
"Boxes.MoppelHelper.Plunders": "Pilhagem",
"Boxes.MoppelHelper.Points": "Pontos",
Expand Down Expand Up @@ -374,10 +390,12 @@
"Boxes.Productions.GuildGoods": "Mercadorias da guilda",
"Boxes.Productions.GuildPower": "Poder da guilda",
"Boxes.Productions.Happiness": "Felicidade",
"Boxes.Productions.Headings.Done": "Terminado",
"Boxes.Productions.Headings.all": "Todos",
"Boxes.Productions.Headings.amount": "Quantidade",
"Boxes.Productions.Headings.area": "Area",
"Boxes.Productions.Headings.boost": "Reforço",
"Boxes.Productions.Headings.clan_power_production": "Produção de poder para a guilda",
"Boxes.Productions.Headings.culture": "Edificios culturais",
"Boxes.Productions.Headings.decoration": "Decorações",
"Boxes.Productions.Headings.earning": "Resultados",
Expand Down Expand Up @@ -501,6 +519,8 @@
"Boxes.Units.Title": "Resumo do Exército",
"Boxes.Units.Unbind": "Independente",
"Boxes.Units.Unit": "Unidade",
"Boxes.mapTradeWarning.Text": "Prevenção",
"Boxes.mapTradeWarning.Title": "Negociar",
"Date": "DD-MMM-AA",
"DateTime": "DD-MMM-AA @ HH:mm:ss a",
"Eras.0": "Sem Era",
Expand Down Expand Up @@ -571,6 +591,7 @@
"Kits.Sets.Winterdeco": "Kit de Seleção das Decorações de Inverno",
"Kits.Sets.WorldsFair": "Feira Mundial",
"Local": "pt-PT",
"Menu.Alerts.Desc": "Gerenciar alarmes [e qualquer outro texto]",
"Menu.Alerts.Title": "Alarme",
"Menu.Bluegalaxy.Desc": "Esta ferramenta ajuda a encontrar os melhores edifícios para recolher com a Galáxia Azul",
"Menu.Bluegalaxy.Title": "Auxiliar da Galáxia Azul",
Expand Down
54 changes: 19 additions & 35 deletions js/web/_main/js/_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1584,18 +1584,15 @@ let MainParser = {
data: JSON.stringify(data)
});

if (!Settings.GetSetting('ShowNotifications')) return;

$.toast({
heading: d['other_player']['name'] + ' geupdated',
HTML.ShowToastMsg({
head: d['other_player']['name'] + ' updated',
text: HTML.i18nReplacer(
i18n('API.LGGildMember'),
{
'player' : d['other_player']['name']
}
),
icon: 'success',
position: Settings.GetSetting('NotificationsPosition', true)
type: 'success',
});
}
},
Expand All @@ -1621,15 +1618,11 @@ let MainParser = {
data: JSON.stringify(d)
});

if(Settings.GetSetting('ShowNotifications'))
{
$.toast({
heading: i18n('API.UpdateSuccess'),
text: i18n('API.GEXPlayer'),
icon: 'success',
position: Settings.GetSetting('NotificationsPosition', true)
});
}
HTML.ShowToastMsg({
head: i18n('API.UpdateSuccess'),
text: i18n('API.GEXPlayer'),
type: 'success',
});

localStorage.setItem('API-GEXPlayer', MainParser.getAddedDateTime(0, 1));
},
Expand All @@ -1653,13 +1646,10 @@ let MainParser = {
data: JSON.stringify(data)
});

if (!Settings.GetSetting('ShowNotifications')) return;

$.toast({
heading: i18n('API.UpdateSuccess'),
HTML.ShowToastMsg({
head: i18n('API.UpdateSuccess'),
text: i18n('API.GEXChampionship'),
icon: 'success',
position: Settings.GetSetting('NotificationsPosition', true)
type: 'success',
});
},

Expand Down Expand Up @@ -1899,32 +1889,26 @@ let MainParser = {
if(r['status'] === 'OK'){
localStorage.setItem('OtherPlayersMotivation-' + page, MainParser.getAddedDateTime(0, 10));

if (!Settings.GetSetting('ShowNotifications')) return;

$.toast({
heading: i18n('Boxes.Investment.PlayerFound'),
HTML.ShowToastMsg({
head: i18n('Boxes.Investment.PlayerFound'),
text: HTML.i18nReplacer(
r.new === 1 ? i18n('Boxes.Investment.PlayerFoundCount') : i18n('Boxes.Investment.PlayerFoundCounter'),
{
count: r.new
}
),
icon: 'success',
hideAfter: 2600,
position: Settings.GetSetting('NotificationsPosition', true)
type: 'success',
hideAfter: 2600
});

} else if (r['status'] === 'NOTICE') {
localStorage.setItem('OtherPlayersMotivation-' + page, MainParser.getAddedDateTime(1, 0));

if (!Settings.GetSetting('ShowNotifications')) return;

$.toast({
heading: i18n('Boxes.Investment.AllUpToDate'),
HTML.ShowToastMsg({
head: i18n('Boxes.Investment.AllUpToDate'),
text: i18n('Boxes.Investment.AllUpToDateDesc'),
icon: 'info',
hideAfter: 6000,
position: Settings.GetSetting('NotificationsPosition', true)
type: 'success',
hideAfter: 6000
});
}
});
Expand Down
7 changes: 4 additions & 3 deletions js/web/_menu_bottom/js/_menu_bottom.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,11 @@ let _menu_bottom = {
$('#foe-helper-hud').removeClass('is--sorting');
if (_menu.equalTo(storedItems)) return;

$.toast({
heading: i18n('Menu.SaveMessage.Title'),
HTML.ShowToastMsg({
show: 'force',
head: i18n('Menu.SaveMessage.Title'),
text: i18n('Menu.SaveMessage.Desc'),
icon: 'success',
type: 'success',
hideAfter: 5000
});
}
Expand Down
8 changes: 5 additions & 3 deletions js/web/_menu_box/js/_menu_box.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,12 @@ let _menu_box = {
localStorage.setItem('MenuSort', JSON.stringify(_menu.Items));

$('#menu_box').removeClass('is--sorting');
$.toast({
heading: i18n('Menu.SaveMessage.Title'),

HTML.ShowToastMsg({
show: 'force',
head: i18n('Menu.SaveMessage.Title'),
text: i18n('Menu.SaveMessage.Desc'),
icon: 'success',
type: 'success',
hideAfter: 5000
});
}
Expand Down
8 changes: 5 additions & 3 deletions js/web/_menu_right/js/_menu_right.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,12 @@ let _menu_right = {
localStorage.setItem('MenuSort', JSON.stringify(_menu.Items));

$('#foe-helper-hud').removeClass('is--sorting');
$.toast({
heading: i18n('Menu.SaveMessage.Title'),

HTML.ShowToastMsg({
show: 'force',
head: i18n('Menu.SaveMessage.Title'),
text: i18n('Menu.SaveMessage.Desc'),
icon: 'success',
type: 'success',
hideAfter: 5000
});
}
Expand Down
Loading

0 comments on commit cc3ed17

Please sign in to comment.