Skip to content

Commit

Permalink
Изменения для поддержки обновленного ядра
Browse files Browse the repository at this point in the history
  • Loading branch information
Sominemo committed Sep 18, 2020
1 parent a09f28d commit 85d6e46
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 25 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mono-pwa",
"version": "3.4.2",
"version": "3.4.2-hotfix.1",
"description": "monobank PWA",
"main": "index.html",
"config": {
Expand Down
2 changes: 2 additions & 0 deletions src/app/loaders/Presets/SetSplashscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ SplashScreenController.splashImage.innerHTML = require("@Resources/images/logo/v

SplashScreenController.splashImage = SplashScreenController.splashImage.firstChild
SplashScreenController.splashImage.style.height = "30vh"
SplashScreenController.splashBG = "#181A1D"
SplashScreenController.splashColor = "#ffffff"
22 changes: 22 additions & 0 deletions src/app/loaders/UI/Nav.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
import { Nav, Scaffold } from "@Environment/Library/DOM/buildBlock"
import Navigation from "@Core/Services/navigation"
import { $$ } from "@Core/Services/Language/handler"
import { ContextMenu, ContextMenuElement } from "@Environment/Library/DOM/elements"

Nav.navListFunction = (function navListFunction() {
const current = Navigation.Current
const custom = current.navMenu || []

return [
...(Object.keys(custom).length > 0 && this.constantNavMenu.length > 0 ? [...custom, { type: "delimeter" }] : []),
...this.constantNavMenu,
]
}).bind(Nav)

Nav.navigationList = Nav.navListFunction

Nav.Toggle = function toggle(_, ev) {
ev.stopPropagation()
ContextMenuElement.closeAll()
ContextMenu({
content: this.navigationList(),
event: ev,
})
}

Nav.constantNavMenu = [
{
Expand Down
38 changes: 16 additions & 22 deletions src/app/modules/mono/services/Auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ export default class Auth {
static updateIcons() {
if (this.isAnyAuthed) {
Nav.config = [
{
name() { return $$("quick_settings") },
icon: "more_vert",
id: "options",
handler: (ev, _) => {
Nav.Toggle(_, ev)
},
},
{
name() { return $$("statement") },
icon: "account_balance_wallet",
Expand All @@ -65,17 +73,6 @@ export default class Auth {
}
},
},
{
name() { return $$("currency") },
icon: "assessment",
id: "currency",
handler: () => {
Navigation.url = {
module: "currency",
params: {},
}
},
},
{
name() { return $$("menu") },
icon: "menu",
Expand All @@ -90,6 +87,14 @@ export default class Auth {
]
} else {
Nav.config = [
{
name() { return $$("quick_settings") },
icon: "more_vert",
id: "options",
handler: (ev, _) => {
Nav.Toggle(_, ev)
},
},
{
name() { return $$("currency") },
icon: "assessment",
Expand All @@ -101,17 +106,6 @@ export default class Auth {
}
},
},
{
name() { return $$("p4/partners") },
icon: "store",
id: "partners",
handler: () => {
Navigation.url = {
module: "partners",
params: {},
}
},
},
{
name() { return $$("menu") },
icon: "apps",
Expand Down
2 changes: 1 addition & 1 deletion src/app/res/styles/statement.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
border-radius: 10px;
display: flex;
flex-direction: column;
padding: 5% 8%;
padding: 3vmin 4vmin;
box-shadow: rgba(0, 0, 0, 0.6) 0 -2vmin 10vmin, rgba(255, 255, 255, 0.15) 0 10vmin 20vmin;
position: relative;
overflow: hidden;
Expand Down
1 change: 1 addition & 0 deletions webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ module.exports = (env = {}) => {
__PACKAGE_BRANCH: JSON.stringify((env.WG ? "workgroup" : builder.pack.config.branch)),
__PACKAGE_BUILD_TIME: webpack.DefinePlugin.runtimeValue(() => JSON.stringify(fecha.format(new Date(), "DD.MM.YYYY HH:mm:ss")), true),
__PACKAGE_BUILD_FLAGS: JSON.stringify(buildFlags),
__PACKAGE_BUILD: '0',
__PACKAGE_CHANGELOG: JSON.stringify(CHANGELOG),
__PACKAGE_ANALYTICS: JSON.stringify(ANALYTICS_TAG),
__PACKAGE_DOWNLOADABLE_LANG_PACKS: JSON.stringify(!!DOWNLOAD_LANG_PACKS),
Expand Down

0 comments on commit 85d6e46

Please sign in to comment.