Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit e09bcb4

Browse files
authored
Merge branch 'master' into patch-1
2 parents d7b02f0 + dd5bba2 commit e09bcb4

File tree

8 files changed

+26
-22
lines changed

8 files changed

+26
-22
lines changed

js/data/defaultSearchProviders.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ const defaultSearchProviders = [
1313
id: 'duo',
1414
name: 'Duo',
1515
logo: '../imgs/duoSearchLogo.png',
16-
search: 'https://ob2.duosear.ch/search',
16+
search: '',
1717
listings: 'https://ob2.duosear.ch/search/listings',
18-
torsearch: 'https://ob2.duosear.ch/search',
19-
torlistings: 'https://ob2.duosear.ch/search/listings',
18+
torsearch: '',
19+
torlistings: '',
2020
locked: true,
2121
},
2222
];

js/languages/en-US.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@
434434
"resync": "Reload Transactions",
435435
"resyncHelper": "Synchronize your transactions if some are missing",
436436
"resyncBtn": "Reload Transactions",
437-
"resyncComplete": "Your transactions have been synchronized. Check your wallet or transactions for new data.",
437+
"resyncComplete": "Your transactions will begin resyncing. This may take five to ten minutes or longer.",
438438
"purge": "Purge Shared Files",
439439
"purgeHelper": "Delete cached files you are sharing with others",
440440
"purgeBtn": "Purge Files",

js/templates/modals/purchase/purchase.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<%
2-
const hasModerators = !!ob.listing.moderators && ob.listing.moderators.length
32
// when multiple listings are supported, the prices array will have one price object for each
43
const totalPrice = ob.prices[0].price + ob.prices[0].vPrice;
54
%>
@@ -78,8 +77,7 @@ <h2 class="h4 required"><%= ob.polyT('purchase.paymentTypeTitle') %></h2>
7877
<div class="tx6 clrT2 margRSm"><%= ob.polyT('purchase.useShapeShift') %></div>
7978
<i class="shapeShiftIcon" style="background-image: url('../imgs/shapeShiftIcon.png');"></i>
8079
</div>
81-
<div class="js-moderated-errors"></div>
82-
<% if (hasModerators) { %>
80+
<% if (ob.hasModerators) { %>
8381
<div class="js-moderatedOption">
8482
<input
8583
type="checkbox"
@@ -97,9 +95,10 @@ <h2 class="h4 required"><%= ob.polyT('purchase.paymentTypeTitle') %></h2>
9795
<% } %>
9896
</div>
9997
</section>
100-
<% if (hasModerators) { %>
98+
<% if (ob.hasModerators) { %>
10199
<section class="contentBox padMd clrP clrBr clrSh3 showIfPay js-moderator">
102100
<h2 class="h4"><%= ob.polyT('purchase.moderatorTitle') %></h2>
101+
<div class="js-moderated-errors"></div>
103102
<div class="js-moderatorsWrapper"></div>
104103
</section>
105104
<% } %>
@@ -175,7 +174,7 @@ <h2 class="h4">
175174
<i class="js-close cornerTR ion-ios-close-empty iconBtn clrP clrBr clrSh3 closeBtn"></i>
176175
<div class="js-actionBtn"></div>
177176
<div class="js-receipt"></div>
178-
<% if (hasModerators) { %>
177+
<% if (ob.hasModerators) { %>
179178
<hr class="clrBr js-moderatorNote">
180179
<div class="padSm txSm txCtr clrT2 js-moderatorNote">
181180
<%= ob.polyT('purchase.moderatorNote') %>

js/templates/userPage/userPage.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ <h1 class="txBg txUnb txUnl txGlow tabTitle js-tabTitle">
3838
<%= ob.processingButton({
3939
className: `btn clrP clrBr js-followBtn`,
4040
btnText: ob.followed ? ob.polyT('userPage.unfollow') : ob.polyT('userPage.follow'),
41-
}) %>
42-
<a class="btn clrP clrBr hide js-moreableBtn"><%= ob.polyT('userPage.block') %></a>
41+
}) %>
42+
<a class="btn clrP clrBr hide js-moreableBtn TODO"><%= ob.polyT('userPage.block') %></a>
4343
<a class="iconBtn clrP clrBr js-moreBtn"><i class="ion-android-more-vertical"></i> </a>
4444
<% } %>
4545
</div>

js/utils/localServer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default class LocalServer {
6767
}
6868

6969
this._isRunning = true;
70-
let serverStartArgs = ['start', '-t', ...commandLineArgs];
70+
let serverStartArgs = ['start', ...commandLineArgs];
7171

7272
// wire in our auth cookie
7373
if (global.authCookie) {

js/views/ModeratorCard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default class extends BaseVw {
4545
}
4646

4747
rotateSelectState() {
48-
if (this.cardState === 'selected') {
48+
if (this.cardState === 'selected' && !this.options.radioStyle) {
4949
this.changeSelectState(this.notSelected);
5050
} else {
5151
this.changeSelectState('selected');

js/views/modals/purchase/Purchase.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ export default class extends BaseModal {
446446
items: this.order.get('items').toJSON(),
447447
prices: this.prices,
448448
displayCurrency: app.settings.get('localCurrency'),
449+
hasModerators: this.moderatorIDs.length,
449450
}));
450451

451452
super.render();

js/views/search/Search.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export default class extends baseVw {
3030
this.urlType = this.usingTor ? 'torlistings' : 'listings';
3131

3232
this.sProvider = app.searchProviders[`default${this.torString}Provider`];
33+
this.queryProvider = false;
3334

3435
// if the provider returns a bad URL, the user must select a provider
3536
if (is.not.url(this.providerUrl)) {
@@ -49,7 +50,6 @@ export default class extends baseVw {
4950
const matchedProvider =
5051
app.searchProviders.filter(p =>
5152
base === p.get('listings') || base === p.get('torlistings'));
52-
5353
/* if the query provider doesn't exist, create a temporary provider model for it.
5454
One quirk to note: if a tor url is passed in while the user is in clear mode, and an
5555
existing provider has that tor url, that provider will be activated but will use its
@@ -58,10 +58,10 @@ export default class extends baseVw {
5858
if (!matchedProvider.length) {
5959
const queryOpts = {};
6060
queryOpts[`${this.usingTor ? 'tor' : ''}listings`] = `${subURL.origin}${subURL.pathname}`;
61-
this.queryProvider = new ProviderMd(queryOpts);
61+
this.queryProvider = true;
62+
this.sProvider = new ProviderMd(queryOpts);
6263
} else {
6364
this.sProvider = matchedProvider[0];
64-
this.queryProvider = null;
6565
}
6666
}
6767

@@ -77,7 +77,7 @@ export default class extends baseVw {
7777
this.term = options.term || params.q || '';
7878
this.sortBySelected = options.sortBySelected || params.sortBy || '';
7979
// all parameters not specified above are assumed to be filters
80-
this.filters = _.omit(params, ['q', 'p', 'ps', 'sortBy', 'providerQ']);
80+
this.filters = _.omit(params, ['q', 'p', 'ps', 'sortBy', 'providerQ', 'network']);
8181

8282
this.processTerm(this.term);
8383
}
@@ -114,7 +114,7 @@ export default class extends baseVw {
114114
get providerUrl() {
115115
// if a provider was created by the address bar query, use it instead.
116116
// return false if no provider is available
117-
const currentProvider = this.queryProvider || this.sProvider;
117+
const currentProvider = this.sProvider;
118118
return currentProvider && currentProvider.get(this.urlType);
119119
}
120120

@@ -153,7 +153,7 @@ export default class extends baseVw {
153153
throw new Error('The provider must be in the collection.');
154154
}
155155
this.sProvider = md;
156-
this.queryProvider = null;
156+
this.queryProvider = false;
157157
if (this.mustSelectDefault) {
158158
this.mustSelectDefault = false;
159159
this.makeDefaultProvider();
@@ -175,6 +175,10 @@ export default class extends baseVw {
175175
}
176176

177177
makeDefaultProvider() {
178+
if (app.searchProviders.indexOf(this.sProvider) === -1) {
179+
throw new Error('The provider to be made the default must be in the collection.');
180+
}
181+
178182
app.searchProviders[`default${this.torString}Provider`] = this.sProvider;
179183
this.getCachedEl('.js-makeDefaultProvider').addClass('hide');
180184
}
@@ -184,8 +188,8 @@ export default class extends baseVw {
184188
}
185189

186190
addQueryProvider() {
187-
if (this.queryProvider) app.searchProviders.add(this.queryProvider);
188-
this.activateProvider(this.queryProvider);
191+
if (this.queryProvider) app.searchProviders.add(this.sProvider);
192+
this.activateProvider(this.sProvider);
189193
}
190194

191195
clickAddQueryProvider() {
@@ -393,7 +397,7 @@ export default class extends baseVw {
393397
errTitle,
394398
errMsg,
395399
providerLocked: this.sProvider.get('locked'),
396-
isQueryProvider: !!this.queryProvider,
400+
isQueryProvider: this.queryProvider,
397401
isDefaultProvider: this.sProvider === app.searchProviders.defaultProvider,
398402
emptyData,
399403
...state,

0 commit comments

Comments
 (0)