1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-11-08 20:12:39 +01:00

verify links and weboverlay

This commit is contained in:
Allan Wang 2017-06-03 15:02:54 -07:00
parent 0f8f664533
commit a5aa87bbae
8 changed files with 42 additions and 20 deletions

View File

@ -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;

View File

@ -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; }

View File

@ -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;
}

View File

@ -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)

View File

@ -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)
}
}
}

View File

@ -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)

View File

@ -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)
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)

View File

@ -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>