Skip to content

Commit

Permalink
- Fixed HorizontalLayout.layout=JUSTIFY problem after beta.5 update
Browse files Browse the repository at this point in the history
- Fixed a few item deletion while iteration problem
- Completed the initial view for Home
- Added MyDetails section linked to MyAccount
- Linked GBAuth interface from Home
(#37)
  • Loading branch information
rat-moonshine committed Aug 25, 2021
1 parent 7e303f6 commit b4be0f9
Show file tree
Hide file tree
Showing 22 changed files with 403 additions and 36 deletions.
Binary file modified GBAuthHaxe/bin/flash/bin/GBAuthHaxe.swc
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package actionScripts.haxeWrappers.generals
{
import actionScripts.interfaces.IDispose;
import actionScripts.locator.CoreModelLocator;
import actionScripts.utils.NativeWrapperViews;

import net.prominic.native.views.components.generals.ViewHome;

import net.prominic.shared.haxeScripts.core.ActionScriptUIBridge;
import net.prominic.shared.haxeScripts.events.GeneralEvent;
import net.prominic.shared.haxeScripts.ui.navigator.interfaces.INavigatorView;

public class ViewHomeWrapper extends ActionScriptUIBridge implements INavigatorView
Expand All @@ -25,7 +28,11 @@ package actionScripts.haxeWrappers.generals

protected function initialize():void
{

this.feathersUIControl.addEventListener(
ViewHome.EVENT_THUMB_SECTION_CLICKED,
onThumbSectionClicked,
false, 0, true
);
}

//--------------------------------------------------------------------------
Expand All @@ -46,7 +53,7 @@ package actionScripts.haxeWrappers.generals

public function dispose():void
{

this.feathersUIControl.removeEventListener(ViewHome.EVENT_THUMB_SECTION_CLICKED, onThumbSectionClicked);
}

//--------------------------------------------------------------------------
Expand All @@ -61,6 +68,14 @@ package actionScripts.haxeWrappers.generals
//
//--------------------------------------------------------------------------


private function onThumbSectionClicked(event:GeneralEvent):void
{
if (event.data && event.data.componentWrapperGetMethod)
{
CoreModelLocator.getInstance().currentNavigatorController.push(
NativeWrapperViews[event.data.componentWrapperGetMethod]
);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
package actionScripts.haxeWrappers.legacy
{
import flash.events.Event;
import flash.net.URLRequest;
import flash.net.navigateToURL;

import net.prominic.native.views.components.legacy.ViewMyDetails;

import net.prominic.shared.haxeScripts.core.ActionScriptUIBridge;
import net.prominic.shared.haxeScripts.ui.navigator.interfaces.INavigatorView;

public class ViewMyDetailsWrapper extends ActionScriptUIBridge implements INavigatorView
{
public static const NAMESPACE:String = "actionScripts.haxeWrappers.legacy::ViewMyDetailsWrapper";

//--------------------------------------------------------------------------
//
// CLASS API
//
//--------------------------------------------------------------------------

public function ViewMyDetailsWrapper(feathersControl:ViewMyDetails = null)
{
super(feathersControl);
this.initialize();
}

protected function initialize():void
{
this.feathersUIControl.addEventListener(
ViewMyDetails.EVENT_LINK_CLICKED,
onMyAccountLinkClicked,
false, 0, true
);
}

//--------------------------------------------------------------------------
//
// INTERFACE API
//
//--------------------------------------------------------------------------

public function get viewID():String
{
return ViewMyDetailsWrapper.NAMESPACE;
}

public function get sectionButtons():Array
{
return null;
}

public function dispose():void
{
this.feathersUIControl.removeEventListener(ViewMyDetails.EVENT_LINK_CLICKED, onMyAccountLinkClicked);
}

//--------------------------------------------------------------------------
//
// PUBLIC API
//
//--------------------------------------------------------------------------

//--------------------------------------------------------------------------
//
// PRIVATE API
//
//--------------------------------------------------------------------------

private function onMyAccountLinkClicked(event:Event):void
{
navigateToURL(new URLRequest("https://x.prominic.net/MyAccount?target=MyDetails"));
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package actionScripts.utils
{
import actionScripts.controllers.GBAuthInterfaceProvider;
import actionScripts.haxeWrappers.generals.ViewHomeWrapper;
import actionScripts.haxeWrappers.legacy.ViewMyDetailsWrapper;

import flash.utils.Dictionary;

import net.prominic.native.views.components.generals.ViewHome;
import net.prominic.native.views.components.legacy.ViewMyDetails;

import net.prominic.shared.haxeScripts.ui.navigator.vo.NavigatorViewVO;

Expand All @@ -26,5 +29,20 @@ package actionScripts.utils

return navigatorObject;
}

public static function get gbauthWrapper():NavigatorViewVO
{
return GBAuthInterfaceProvider.getInstance().sharedGBABridge.firewallsViewNavigatorView;
}

public static function get myDetailsWrapper():NavigatorViewVO
{
var navigatorObject:NavigatorViewVO = new NavigatorViewVO();
navigatorObject.viewTitle = "My Details";
navigatorObject.viewWithDisplayObject = new ViewMyDetailsWrapper(new ViewMyDetails());
navigatorObject.viewID = ViewMyDetailsWrapper.NAMESPACE;

return navigatorObject;
}
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ import net.prominic.native.themes.assets.TabCloseIcon;
import net.prominic.native.themes.assets.ToggleDrawerIcon;
import net.prominic.native.themes.assets.DrawerRefreshDownIcon;
import net.prominic.native.themes.assets.DrawerRefreshUpIcon;
import net.prominic.native.themes.assets.NewInstanceIcon;

class NativeTheme extends SharedTheme
{
public static final THEME_VARIANT_NATIVE_TABBAR_TAB:String = "native-variant-tabbar-tab";
public static final THEME_VARIANT_NATIVE_TABBAR:String = "native-variant-tabbar";
public static final THEME_VARIANT_TOGGLE_DRAWER:String = "native-variant-toggle-drawer";
public static final THEME_VARIANT_DRAWER_REFRESH:String = "native-variant-drawer-refresh-button";
public static final THEME_VARIANT_NEW_INSTANCE_BUTTON:String = "native-new-instance-button";

public static final IMAGE_VARIANT_NATIVE_LOGO:String = "image-header-native-logo";
public static final IMAGE_VARIANT_TAB_CLOSE_BUTTON:String = "image-tab-close-button";
Expand All @@ -56,6 +58,7 @@ class NativeTheme extends SharedTheme
this.styleProvider.setStyleFunction(ToggleButton, TreeViewItemRenderer.CHILD_VARIANT_DISCLOSURE_BUTTON, setTreeViewItemRendererDisclosureButtonStyles);
this.styleProvider.setStyleFunction(Button, THEME_VARIANT_TOGGLE_DRAWER, setDrawerIconButtonStyles);
this.styleProvider.setStyleFunction(Button, THEME_VARIANT_DRAWER_REFRESH, setDrawerRefreshButtonStyles);
this.styleProvider.setStyleFunction(Button, THEME_VARIANT_NEW_INSTANCE_BUTTON, setNewInstanceButtonStyles);

this.styleProvider.setStyleFunction(LayoutGroup, IMAGE_VARIANT_NATIVE_LOGO, setHeaderNativeLogoStyles);
this.styleProvider.setStyleFunction(Button, IMAGE_VARIANT_TAB_CLOSE_BUTTON, setTabCloseButtonStyles);
Expand Down Expand Up @@ -186,6 +189,25 @@ class NativeTheme extends SharedTheme
button.selectedIcon = selectedIcon;
}

private function setNewInstanceButtonStyles(button:Button):Void
{
var tmpBitmapData = new NewInstanceIcon(16, 11);
var iconSkin = new RectangleSkin();
iconSkin.fill = Bitmap(tmpBitmapData, new Matrix());
iconSkin.width = 16;
iconSkin.height = 11;
button.icon = iconSkin;

var backgroundSkin = new RectangleSkin();
backgroundSkin.fill = Gradient(LINEAR, [0x252525, 0x660033], [1.0, 1.0], null, Math.PI / 2.0); //SolidColor(0x660033);
backgroundSkin.border = null;
backgroundSkin.setFillForState(ButtonState.HOVER, SolidColor(0xb00043));
backgroundSkin.setFillForState(ButtonState.DOWN, SolidColor(0x811937));
button.backgroundSkin = backgroundSkin;

button.width = 22;
}

private function setHeaderNativeLogoStyles(layout:LayoutGroup):Void
{
var gbauthBitmap = new NativeLogo(cast(layout.width, Int), cast(layout.height, Int));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package net.prominic.native.themes.assets;

import openfl.display.BitmapData;

@:bitmap("net/prominic/native/themes/assets/images/icoNewWindow.png")
class NewInstanceIcon extends BitmapData {}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b4be0f9

Please sign in to comment.