From 95250d23f29dff48d03e9e56e2914ac9788e0d41 Mon Sep 17 00:00:00 2001 From: Nathan Byrd Date: Fri, 3 Feb 2023 15:21:19 -0600 Subject: [PATCH 1/2] Added additional fields and some cleanup --- .../activitypub_actor_view.ans | Bin 2840 -> 3326 bytes art/themes/luciano_blocktronics/theme.hjson | 24 +++++++++++- core/activitypub/actor_search.js | 35 +++++++++++++++++- 3 files changed, 55 insertions(+), 4 deletions(-) diff --git a/art/themes/luciano_blocktronics/activitypub_actor_view.ans b/art/themes/luciano_blocktronics/activitypub_actor_view.ans index 45e18bfc7487dabd0c40fa4064b995373667d9e2..d54ec77325c443b6f31e006657769980e5c88994 100644 GIT binary patch delta 698 zcmbOs_D^!dEVju8tQ?c;x!5PmvI|b$#HIjdOL6c|{=lY&Bxf->mR&$xK|wm&z}na> z*CnweRUx1>DJQcyBQ<5RBC9CO3{zt+>1ac1V}o3U`*+~#eG~Ia6LWGZ6&wo+it@`+ zixu4Rb8_;_Q;UkFqm9jTC-bo@WSSs!D!_HZ)d8&r8*2r10+0{Xs2bv93S^k&0(F1^ zM15vnI>-d<8q9$11^JUh9B5Q77g!tEjNsDT+{B_vtH~Q!Wr2RzfQE%|J=DruN2mez zgB=cY-Tgagj@S(Gmv4wU(EYipAbPSOn}ZVAg%C+DRLvlt0z+Uk)Y-ZuDCI^nb#g6- zc;xNdAm>0$JU|Wa9=Qqj(Bwo`1wpf1Ri_XOP`sExn3DzA6h**p07_UQBrJgv^5Edt X=Hj2s#}+=)$)cd3aA$(Z Date: Fri, 3 Feb 2023 16:14:45 -0600 Subject: [PATCH 2/2] Fixed focus and minor changes --- .../activitypub_actor_search_main.ans | Bin 2823 -> 2834 bytes art/themes/luciano_blocktronics/theme.hjson | 4 +++ core/activitypub/actor_search.js | 23 ++++++++++++------ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/art/themes/luciano_blocktronics/activitypub_actor_search_main.ans b/art/themes/luciano_blocktronics/activitypub_actor_search_main.ans index 802ea16dc27e91e9d7e2d9a68db3bf556777dc45..711255cc8d3deb85ceff110a695dc422556f5143 100644 GIT binary patch delta 58 zcmZn{n1ac16EJgg1$!|wli}RSZ@E+fNt_Mj diff --git a/art/themes/luciano_blocktronics/theme.hjson b/art/themes/luciano_blocktronics/theme.hjson index ac92d91d..731a83ee 100644 --- a/art/themes/luciano_blocktronics/theme.hjson +++ b/art/themes/luciano_blocktronics/theme.hjson @@ -472,6 +472,7 @@ BT2: { width: 20 focusTextStyle: upper + submit: true } } } @@ -496,16 +497,19 @@ width: 4 } MT7: { + focus: true width: 69 height: 3 mode: preview } BT8: { focusTextStyle: upper + submit: true } BT9: { text: back focusTextStyle: upper + submit: true } } } diff --git a/core/activitypub/actor_search.js b/core/activitypub/actor_search.js index b5c28552..90631211 100644 --- a/core/activitypub/actor_search.js +++ b/core/activitypub/actor_search.js @@ -22,7 +22,7 @@ const FormIds = { const MciViewIds = { main: { searchUrl: 1, - searchOrCancel: 2, + searchButton: 2, }, view: { userName: 1, @@ -51,11 +51,8 @@ exports.getModule = class ActivityPubActorSearch extends MenuModule { case MciViewIds.main.searchUrl: { return this._search(formData.value, cb); } - case MciViewIds.main.searchOrCancel: { - const search = get(formData, 'value.searchOrCancel') === 0; - return search - ? this._search(formData.value, cb) - : this.prevMenu(cb); + case MciViewIds.main.searchButton: { + return this._search(formData.value, cb); } default: @@ -105,11 +102,20 @@ exports.getModule = class ActivityPubActorSearch extends MenuModule { async.series( [ callback => { + if (this.viewControllers.main) { + this.viewControllers.main.setFocus(false); + } + return this.displayArtAndPrepViewController( 'view', FormIds.view, { clearScreen: true }, - callback + (err, artInfo, wasCreated) => { + if (!err && !wasCreated) { + this.viewControllers.view.setFocus(true); + } + return callback(err); + } ); }, callback => { @@ -151,10 +157,11 @@ exports.getModule = class ActivityPubActorSearch extends MenuModule { const summaryView = v(MciViewIds.view.summary); summaryView.setText(htmlToMessageBody(remoteActor.summary)); + summaryView.redraw(); const followButtonView = v(MciViewIds.view.followButton); // TODO: FIXME: Real status - followButtonView.setText('Follow'); + followButtonView.setText('follow'); return callback(null); },