Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit c8dbce4

Browse files
committed
Conflicts: js/templates/userPage.html
2 parents c28e1fd + a44e166 commit c8dbce4

30 files changed

+1239
-280
lines changed

css/obBase.css

Lines changed: 115 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ form {
417417
.flexRow [class |= "flexCol"] {
418418
box-sizing: border-box;
419419
position: relative;
420+
overflow: hidden;
420421
}
421422

422423
.flexRow.pad [class |= "flexCol"] {
@@ -1502,7 +1503,6 @@ removed because I don't think we're using the trick to hide the borders any more
15021503
.flex-border > .flexRow > [class |= "flexCol"] {
15031504
border-right: 1px solid rgba(255,255,255,0.08);
15041505
border-bottom: 1px solid rgba(255,255,255,0.08);
1505-
padding: 0 1px 1px 0;
15061506
}
15071507
15081508
.flex-border > .flexRow > [class |= "flexCol"].pad10 {
@@ -1808,6 +1808,44 @@ margin: auto;
18081808
background-color: rgba(33,117,47,1);
18091809
}
18101810

1811+
.btn.btn-discoverToggle {
1812+
box-shadow: none;
1813+
border-radius: 0;
1814+
border: solid 1px #2378AA;
1815+
opacity: 1;
1816+
font-weight: 500;
1817+
font-size: 13px;
1818+
transition: none;
1819+
letter-spacing: 0;
1820+
height: auto;
1821+
padding: 4px 22px;
1822+
background-color: transparent;
1823+
}
1824+
1825+
.btn.btn-discoverToggle .toggle-txt {
1826+
opacity: .25;
1827+
transition: opacity .25s cubic-bezier(0, 0, 0.2, 1);
1828+
}
1829+
1830+
.btn.btn-discoverToggle:active,
1831+
.btn.btn-discoverToggle.active {
1832+
border-bottom: solid 2px #106DA3;
1833+
box-shadow: none;
1834+
opacity: 1;
1835+
}
1836+
1837+
.btn.btn-discoverToggle:hover {
1838+
opacity: 1;
1839+
}
1840+
1841+
.btn.btn-discoverToggle:hover > .toggle-txt {
1842+
opacity: 1;
1843+
}
1844+
1845+
.btn.btn-discoverToggle.active .toggle-txt {
1846+
opacity: 1;
1847+
}
1848+
18111849
.btn:active,
18121850
.btn.active,
18131851
.btn.btn-c1:active,
@@ -2461,6 +2499,13 @@ div.chatSearchOut .chatSearchIcon {
24612499
float: left;
24622500
}
24632501

2502+
.btn-togWrapper.btn-toWrapper-discoverToggle {
2503+
float: none;
2504+
position: absolute;
2505+
right: 0;
2506+
bottom: -2px;
2507+
}
2508+
24642509
#userPage .btn-togWrapper {
24652510
border: 1px solid rgb(74,72,72);
24662511
}
@@ -2506,6 +2551,19 @@ div.chatSearchOut .chatSearchIcon {
25062551
border-bottom-left-radius: 0;
25072552
}
25082553

2554+
.btn-toWrapper-discoverToggle .btn.btn-togLeft {
2555+
border-radius: 0;
2556+
border-top-left-radius: 4px;
2557+
border-bottom-left-radius: 4px;
2558+
border-right: 0;
2559+
}
2560+
2561+
.btn-toWrapper-discoverToggle .btn.btn-togRight {
2562+
border-radius: 0;
2563+
border-top-right-radius: 4px;
2564+
border-bottom-right-radius: 4px;
2565+
}
2566+
25092567
.btn.btn-flushTop {
25102568
border-top-left-radius: 0;
25112569
border-top-right-radius: 0;
@@ -3619,13 +3677,17 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
36193677
transition: left 0.5s ease;
36203678
}
36213679
3622-
.spinner-with-logo i {
3680+
.spinner-with-logo .spinner-with-logo-icon {
36233681
position: absolute;
3624-
top: 17px;
3625-
left: 18px;
3682+
top: 16px;
3683+
left: 17px;
36263684
opacity: .90;
36273685
}
36283686
3687+
.spinner-with-logo .spinner-with-logo-icon:before {
3688+
padding-top: 1px;
3689+
}
3690+
36293691
#ov1.chatOpen .spinner-with-logo {
36303692
left: calc(50% - 115.5px);
36313693
}
@@ -3888,6 +3950,38 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
38883950
position: absolute;
38893951
}
38903952
3953+
.discoverToggleHelper {
3954+
top: -40px;
3955+
width: auto;
3956+
max-width: 300px;
3957+
background: rgba(37,37,37,.95);
3958+
border-radius: 3px;
3959+
color: #fff;
3960+
padding: 8px 10px;
3961+
position: absolute;
3962+
z-index: 10;
3963+
height: 16px;
3964+
font-size: 11px;
3965+
right: 0;
3966+
line-height: 16px;
3967+
opacity: 1;
3968+
white-space: nowrap;
3969+
pointer-events: none;
3970+
margin-top: 2px;
3971+
}
3972+
3973+
.discoverToggleHelper:after {
3974+
content: " ";
3975+
width: 0;
3976+
height: 0;
3977+
border-style: solid;
3978+
border-width: 10px 10px 0 10px;
3979+
border-color: rgba(37,37,37,.95) transparent transparent transparent;
3980+
position: absolute;
3981+
bottom: -10px;
3982+
right: 48px;
3983+
}
3984+
38913985
.tooltip {
38923986
position: relative;
38933987
}
@@ -3928,6 +4022,7 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
39284022
width: 400px;
39294023
white-space: normal;
39304024
bottom: auto;
4025+
top: 100%;
39314026
}
39324027
39334028
.tooltip.tooltip-box.tooltip-boxUp:hover:after {
@@ -4006,7 +4101,7 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
40064101
40074102
.cropit-image-preview.cropit-avatar {
40084103
background: url('../imgs/defaultUser.png');
4009-
background-size: cover;
4104+
background-size: cover;
40104105
}
40114106

40124107
#userPage .headerCropper .bar.navBar {
@@ -4232,13 +4327,13 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
42324327
position: fixed;
42334328
bottom: 0;
42344329
z-index: 10;
4235-
width: 100%;
4330+
width: 100%;
42364331
}
42374332

42384333
#statusBar .statusMessageWrap {
42394334
height: 0px;
42404335
overflow: hidden;
4241-
transition: opacity 1.5s, height 1s;
4336+
transition: opacity 1.5s, height 1s;
42424337
}
42434338

42444339
#statusBar .statusMessageWrap.slideUp {
@@ -4256,7 +4351,7 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
42564351
background: #000;
42574352
border-bottom: 1px solid #222;
42584353
position: relative;
4259-
top: -1px;
4354+
top: -1px;
42604355
}
42614356

42624357
.page-connect-modal {
@@ -4280,6 +4375,7 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
42804375
}
42814376

42824377
.page-connect-modal .spinner-with-logo .icon-no-connection {
4378+
top: 18px;
42834379
left: 22px;
42844380
}
42854381

@@ -4288,8 +4384,8 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
42884384
right: 0;
42894385
left: 0;
42904386
top: 50%;
4291-
max-width: 600px;
4292-
margin-top: 90px;
4387+
max-width: 600px;
4388+
margin-top: 90px;
42934389
margin-left: auto;
42944390
margin-right: auto;
42954391
text-align: center;
@@ -4836,6 +4932,10 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
48364932
margin-right: 15px;
48374933
}
48384934

4935+
#ov1 .marginRight20 {
4936+
margin-right: 20px;
4937+
}
4938+
48394939
#ov1 .marginLeftNeg115 {
48404940
margin-left: -115px;
48414941
}
@@ -5555,6 +5655,11 @@ input[type="checkbox"].fieldItem:checked + label .togLabelOff {
55555655
height: auto;
55565656
}
55575657

5658+
#ov1 .editableContent img {
5659+
max-width: 100%;
5660+
max-height: 100%;
5661+
}
5662+
55585663
/* add formChecked class after form has been checked for validity */
55595664
#ov1 .invalid,
55605665
#ov1 .formChecked input[type="text"].fieldItem:invalid,

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ <h2 class="txt-center">
7676
<!-- the loading modal must be on top of the page nav or the reload button is hidden -->
7777
<div id="loadingModal" class="modal modal-opaque js-loadingModal top0">
7878
<div class="spinner-with-logo fullCentered">
79-
<i class="ion-android-sync spinner fontSize30"></i>
79+
<i class="ion-android-sync spinner fontSize30 spinner-with-logo-icon"></i>
8080
</div>
8181
<div class="rowTop20">
8282
<a class="btn btn-txt btn-corner btn-cornerTR js-indexReload"><i class="ion-android-sync"></i> Reload</a>

js/App.js

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
var Socket = require('./utils/Socket'),
1+
var ipcRenderer = require('ipc-renderer'),
2+
Socket = require('./utils/Socket'),
3+
$ = require('jquery'),
24
ServerConfigMd = require('./models/serverConfigMd'),
35
_app;
46

@@ -9,6 +11,9 @@ function App() {
911
if (_app) return _app;
1012

1113
_app = this;
14+
this._awayCounts = null;
15+
this._notifUnread = 0;
16+
this._chatMessagesUnread = 0;
1217

1318
// TODO: what is wrong with the localStorage adapter??? shouldn't need
1419
// to manually provide the data to the model. All that should be needed
@@ -99,17 +104,37 @@ App.prototype.playNotificationSound = function() {
99104
}
100105

101106
this._notificationSound.play();
102-
},
107+
};
103108

104109
App.prototype.showOverlay = function() {
105110
this._$overlay = this._$overlay || $('#overlay');
106111
this._$overlay.removeClass('hide');
107-
},
112+
};
108113

109114
App.prototype.hideOverlay = function() {
110115
this._$overlay = this._$overlay || $('#overlay');
111116
this._$overlay.addClass('hide');
112-
},
117+
};
118+
119+
App.prototype.setUnreadCounts = function(notif, chat) {
120+
this._notifUnread = typeof notif === 'number' ? notif : this._notifUnread;
121+
this._chatMessagesUnread = typeof chat === 'number' ? chat : this._chatMessagesUnread;
122+
123+
this._awayCounts = this._notifUnread + this._chatMessagesUnread;
124+
ipcRenderer.send('set-badge', this._awayCounts || '');
125+
};
126+
127+
App.prototype.setUnreadNotifCount = function(count) {
128+
if (typeof count !== 'undefined' && count !== null) {
129+
this.setUnreadCounts(parseInt(count));
130+
}
131+
};
132+
133+
App.prototype.setUnreadChatMessageCount = function(count) {
134+
if (typeof count !== 'undefined' && count !== null) {
135+
this.setUnreadCounts(null, parseInt(count));
136+
}
137+
};
113138

114139
App.getApp = function() {
115140
if (!_app) {

js/config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// App specific configuration
2-
var testnet = false, //change to false to use main net
2+
var testnet = localStorage.getItem('testnet') == 'true' ? true : false, //change to false to use main net
33
bitcoinValidationRegexMainnet = "^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$",
44
bitcoinValidationRegexTestnet = "^[2mn][a-km-zA-HJ-NP-Z1-9]{25,34}$",
55
bitcoinValidationRegex = testnet ? bitcoinValidationRegexTestnet : bitcoinValidationRegexMainnet;
@@ -20,5 +20,9 @@ module.exports = {
2020
cases: 'j',
2121
settings: 'g',
2222
addressBar: 'l'
23+
},
24+
25+
setTestnet: function(testNetBoolean){
26+
localStorage.setItem('testnet', testNetBoolean);
2327
}
24-
}
28+
};

js/languages/en-US.json

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"of": "of",
2424
"Sell": "Sell",
2525
"New": "New",
26-
"HighlightToStyle": "You can use basic HTML, but HTML link and image tags are disabled. Plain text http:// links, @handles, and #searchTags will be clickable.",
26+
"HighlightToStyle": "Highlight text to style",
2727
"Excellent": "Excellent",
2828
"Good": "Good",
2929
"Poor": "Poor",
@@ -71,12 +71,14 @@
7171
"Welcome": "Welcome",
7272
"CreateStore": "Become a Store",
7373
"GoToMyPage": "My Page",
74-
"ShowOnlyFollowerListings": "Filtered Listings",
75-
"ShowOnlyFollowerListingsTooltip": "Only view listings from stores you follow",
76-
"ShowAllListingsTooltip": "View random listings from around the network",
77-
"ViewUnfilteredListings": "View Unfiltered Listings",
78-
"AllListingsWarning": "By deactivating filtered listings your Discover feed will be populated with random listings from around the network. \n \n Please keep in mind that these listings may contain adult or illicit content and/or photos that may be offensive. \n \n If at any point you want to go back to filtered listings, you can simply toggle the setting back to On and your Discover feed will only display listings from stores you follow.",
79-
"ShowUnlfilteredListings": "Show Unfiltered Listings",
74+
"Random": "Random",
75+
"ShowOnlyFollowerListings": "Personalized",
76+
"TryRandom": "Try random mode to discover more",
77+
"ShowOnlyFollowerListingsTooltip": "View listings from stores I follow",
78+
"ShowAllListingsTooltip": "View random listings on the network",
79+
"ViewUnfilteredListings": "View Random Listings",
80+
"AllListingsWarning": "By deactivating personalized listings your Discover feed will be populated with random listings on the network. \n \n Please keep in mind that these listings may contain adult or illicit content and/or photos that may be offensive. \n \n If at any point you want to go back to viewing personalized listings, you can simply toggle the setting and your Discover feed will go back to normal.",
81+
"ShowUnlfilteredListings": "Show Random Listings",
8082
"SearchForItemsPlaceholder": "Type #games, #shoes or any #tag...",
8183
"SearchForPagesPlaceholder": "Search by name or keyword",
8284
"SearchFeedPlaceholder": "Type a keyword...",
@@ -133,19 +135,25 @@
133135
"AddShipToRegion": "Shipping Region",
134136
"AddShipToRegionNote": "Adds All Nations in a Region",
135137
"SelectRegion": "Add an Optional Region",
138+
"AllRegions": "All countries",
139+
"EuropeanUnion": "European Union",
140+
"EuropeanEconomicArea": "European Economic Area",
136141
"Optional": "Optional",
137142
"Customize": "Customize",
138143
"Save": "Save",
139144
"Change": "Change",
140145
"Changes": "Changes",
141146
"SaveChanges": "Save Changes",
142147
"YourName": "Your name",
148+
"UseTestnet": "Use Testnet",
149+
"UseTestnetHelp": "If set to true, your client will use Testnet bitcoin addresses. Only set to true if your server was started with the -t testnet flag.",
143150
"TestnetAddress": "Testnet Address",
151+
"TestnetAddressHelp": "Your client is set to use the Testnet, and will only allow Testnet addresses. To use the mainnet, and real Bitcoin, turn off the Testnet in Settings/Advanced, and make sure your server was not started with the -t testnet flag.",
144152
"MustTestnetAddress": "Must be a Testnet Address",
145-
"BitcoinAddress": "Bitcoin Address",
153+
"BitcoinAddress": "Current Refund Address",
146154
"BitcoinReturnAddress": "Enter your Bitcoin Address",
147155
"BitcoinReturnAddressPlaceholder": "Enter Bitcoin address...",
148-
"BitcoinReturnAddressInfo": "If a refund is issued, the funds will need to be sent to a Bitcoin address. Please provide an address to your Wallet below. You <b>must be able to access this address later</b> to receive a refund.",
156+
"BitcoinReturnAddressInfo": "If a refund is issued, the funds will need to be sent to a Bitcoin address. Please provide an address to your Wallet below. You must be able to access this address later to receive a refund.",
149157
"LocalCurrency": "Local Currency",
150158
"TimeZone": "Time Zone",
151159
"ShipToName": "Recipient Name",
@@ -475,7 +483,7 @@
475483
"TotalInTransaction": "Transaction:",
476484
"StartDisputeFlag": "Dispute Started",
477485
"CloseDisputeFlag": "Dispute Ended",
478-
"PayoutOnlyBuyer": "Closing this dispute will return 100% of the funds to the buyer.",
486+
"PayoutOnlyBuyer": "Closing this dispute will return all of the funds to the buyer, minus the Moderator fee, because the seller has not yet given their bitcoin payout address.",
479487
"UpdatingOrder": "Updating your transaction",
480488
"UpdateComplete": "Your transaction update is complete",
481489
"UpdateFailed": "Your transaction update did not complete. Open the transaction and try again",

0 commit comments

Comments
 (0)