aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-03 15:02:54 -0700
committerAllan Wang <me@allanwang.ca>2017-06-03 15:02:54 -0700
commita5aa87bbaef7d2c937cc89295942882d050c3b5c (patch)
treec51f9c8c23312fd531edfe10140ac51705094b90 /app/src
parent0f8f6645339d2a1997b9b444f33ee156a91c2010 (diff)
downloadfrost-a5aa87bbaef7d2c937cc89295942882d050c3b5c.tar.gz
frost-a5aa87bbaef7d2c937cc89295942882d050c3b5c.tar.bz2
frost-a5aa87bbaef7d2c937cc89295942882d050c3b5c.zip
verify links and weboverlay
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/assets/core/_colors.scss11
-rw-r--r--app/src/main/assets/core/login.compact.css20
-rw-r--r--app/src/main/assets/core/login.scss11
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt3
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt6
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt1
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/facebook/FbTab.kt8
-rw-r--r--app/src/main/res/values/strings.xml2
8 files changed, 42 insertions, 20 deletions
diff --git a/app/src/main/assets/core/_colors.scss b/app/src/main/assets/core/_colors.scss
index 456cce17..718c1e62 100644
--- a/app/src/main/assets/core/_colors.scss
+++ b/app/src/main/assets/core/_colors.scss
@@ -1,4 +1,11 @@
+$transparent: transparent !default;
+
+//Keep above as first line so partials aren't compiled
+
+//$text: #f0f;
+//$background: #f00;
+//$background2: rgba(#ff0, 0.1);
+
$text: #fff !default;
$background: #000 !default;
-$background2: #111 !default;
-$transparent: transparent !default;
+$background2: rgba(lighten($background, 10%), 0.1) !default;
diff --git a/app/src/main/assets/core/login.compact.css b/app/src/main/assets/core/login.compact.css
index d0aa315e..4a99bbf3 100644
--- a/app/src/main/assets/core/login.compact.css
+++ b/app/src/main/assets/core/login.compact.css
@@ -1,23 +1,25 @@
[data-sigil="m_login_upsell"] { display: none !important; }
-body, #root, #header, .aclb, ._55wo, ._1upc, input { background: #000 !important; }
+body, #root, #header, .aclb, ._55wo, ._1upc, input, ._2f9r { background: #f00 !important; }
-button::before, ._56be::before, .btnS, .touch::before { background: #111 !important; }
+button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before, ._5xo2, ._5u5a::before { background: rgba(255, 51, 51, 0.1) !important; }
._56bf, .touch .btn { border-radius: 0 !important; border: 0 !important; }
+.touch ._56bt { text-shadow: none !important; }
+
.touch .btnS { box-shadow: none !important; }
-input, ._43mh, .touch .btn, a, .fcg, button, ._52j9 { color: #fff !important; }
+input, ._43mh, .touch .btn, a, .fcg, button, ._52j9, ._52jb, h1, h2, h3, h4, h5, h6 { color: #f0f !important; }
-::-webkit-input-placeholder { color: #fff !important; }
+::-webkit-input-placeholder { color: #f0f !important; }
-:-moz-placeholder { color: #fff !important; }
+:-moz-placeholder { color: #f0f !important; }
-::-moz-placeholder { color: #fff !important; }
+::-moz-placeholder { color: #f0f !important; }
-:-ms-input-placeholder { color: #fff !important; }
+:-ms-input-placeholder { color: #f0f !important; }
-._43mh::before, ._43mh::after { background: #fff !important; }
+._43mh::before, ._43mh::after { background: #f0f !important; }
-._1rrd { border: 1px solid #fff !important; color: #fff !important; }
+._1rrd { border: 1px solid #f0f !important; color: #f0f !important; }
diff --git a/app/src/main/assets/core/login.scss b/app/src/main/assets/core/login.scss
index 427640fc..00627838 100644
--- a/app/src/main/assets/core/login.scss
+++ b/app/src/main/assets/core/login.scss
@@ -6,11 +6,12 @@
display: none !important;
}
-body, #root, #header, .aclb, ._55wo, ._1upc, input {
+body, #root, #header, .aclb, ._55wo, ._1upc, input, ._2f9r {
background: $background !important;
}
-button::before, ._56be::before, .btnS, .touch::before {
+button::before, .touch ._56bt, ._56be::before, .btnS, .touch::before,
+._5xo2, ._5u5a::before {
background: $background2 !important;
}
@@ -19,11 +20,15 @@ button::before, ._56be::before, .btnS, .touch::before {
border: 0 !important;
}
+.touch ._56bt {
+ text-shadow: none !important;
+}
+
.touch .btnS {
box-shadow: none !important;
}
-input, ._43mh, .touch .btn, a, .fcg, button, ._52j9 {
+input, ._43mh, .touch .btn, a, .fcg, button, ._52j9, ._52jb, h1, h2, h3, h4, h5, h6 {
color: $text !important;
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt
index 920a5572..047cedac 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/MainActivity.kt
@@ -19,6 +19,7 @@ import co.zsmb.materialdrawerkt.draweritems.badgeable.primaryItem
import co.zsmb.materialdrawerkt.draweritems.profile.profile
import com.mikepenz.materialdrawer.AccountHeader
import com.mikepenz.materialdrawer.Drawer
+import com.pitchedapps.frost.dbflow.CookieModel
import com.pitchedapps.frost.dbflow.loadFbTabs
import com.pitchedapps.frost.dbflow.saveAsync
import com.pitchedapps.frost.events.FbAccountEvent
@@ -41,7 +42,7 @@ class MainActivity : AppCompatActivity() {
val tabs: TabLayout by bindView(R.id.tabs)
lateinit var drawer: Drawer
lateinit var drawerHeader: AccountHeader
- val cookies = cookies()
+ val cookies: ArrayList<CookieModel> by lazy { cookies() }
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt
index ad123360..936c237a 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt
@@ -4,7 +4,6 @@ import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import com.pitchedapps.frost.dbflow.loadFbCookiesAsync
import com.pitchedapps.frost.utils.L
-import com.pitchedapps.frost.utils.Prefs
import com.pitchedapps.frost.utils.launchNewTask
/**
@@ -19,7 +18,10 @@ class StartActivity : AppCompatActivity() {
loadFbCookiesAsync {
cookies ->
L.d("Cookies loaded ${System.currentTimeMillis()} $cookies")
- launchNewTask(MainActivity::class.java, ArrayList(cookies))
+ if (cookies.isNotEmpty())
+ launchNewTask(MainActivity::class.java, ArrayList(cookies))
+ else
+ launchNewTask(LoginActivity::class.java)
}
}
} \ No newline at end of file
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt
index c81c6dea..9a071285 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/WebOverlayActivity.kt
@@ -24,6 +24,7 @@ class WebOverlayActivity : AppCompatActivity() {
ButterKnife.bind(this)
setSupportActionBar(toolbar)
frostWeb.baseUrl = url()
+ frostWeb.web.loadBaseUrl()
SwipeBackHelper.onCreate(this)
SwipeBackHelper.getCurrentPage(this)
.setSwipeBackEnable(true)
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbTab.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbTab.kt
index c34a5cbe..ba595276 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbTab.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbTab.kt
@@ -8,7 +8,9 @@ import com.mikepenz.material_design_iconic_typeface_library.MaterialDesignIconic
import com.pitchedapps.frost.R
enum class FbTab(@StringRes val titleId: Int, val icon: IIcon, relativeUrl: String) {
- FEED(R.string.feed, CommunityMaterial.Icon.cmd_newspaper, "feed"),
+ FEED(R.string.feed, CommunityMaterial.Icon.cmd_newspaper, ""),
+ FEED_MOST_RECENT(R.string.most_recent, GoogleMaterial.Icon.gmd_grade, "/?sk=h_chr"),
+ FEED_TOP_STORIES(R.string.top_stories, GoogleMaterial.Icon.gmd_star, "/?sk=h_nor"),
PROFILE(R.string.profile, CommunityMaterial.Icon.cmd_account, "me"),
EVENTS(R.string.events, GoogleMaterial.Icon.gmd_event, "events/upcoming"),
FRIENDS(R.string.friends, GoogleMaterial.Icon.gmd_people, "friends/center/requests"),
@@ -26,5 +28,5 @@ enum class FbTab(@StringRes val titleId: Int, val icon: IIcon, relativeUrl: Stri
val url = "$FB_URL_BASE$relativeUrl"
}
-fun defaultTabs():List<FbTab> = listOf(FbTab.FEED, FbTab.MESSAGES, FbTab.FRIENDS, FbTab.NOTIFICATIONS)
-fun defaultDrawers():List<FbTab> = listOf(FbTab.ACTIVITY_LOG, FbTab.PAGES, FbTab.GROUPS, FbTab.SAVED) \ No newline at end of file
+fun defaultTabs(): List<FbTab> = listOf(FbTab.FEED, FbTab.MESSAGES, FbTab.FRIENDS, FbTab.NOTIFICATIONS)
+fun defaultDrawers(): List<FbTab> = listOf(FbTab.ACTIVITY_LOG, FbTab.PAGES, FbTab.GROUPS, FbTab.SAVED) \ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index f3ce69f8..97c84093 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -7,6 +7,8 @@
<string name="great">Great</string>
<string name="u2022">•</string>
<string name="feed">Feed</string>
+ <string name="most_recent">Most Recent</string>
+ <string name="top_stories">Top Stories</string>
<string name="profile">Profile</string>
<string name="bookmarks">Bookmarks</string>
<string name="events">Events</string>