Skip to content

Commit 2e7d1d2

Browse files
authored
fix merge error in settings page (#263)
Fixes merge errors from TS conversion.
1 parent 4f1d6bc commit 2e7d1d2

File tree

1 file changed

+23
-147
lines changed

1 file changed

+23
-147
lines changed

src/ui/app.ts

Lines changed: 23 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -988,25 +988,27 @@ class ArchiveWebApp extends ReplayWebApp {
988988

989989
renderSettingsModal() {
990990
return html`
991-
<wr-modal @modal-closed="${this.onCancelSettings}" title="Settings">
992-
<div class="tabs mb-3">
993-
<ul>
994-
<li class="${this.settingsTab === "browsertrix" ? "is-active" : ""}">
995-
<a @click=${() =>
996-
(this.settingsTab = "browsertrix")}>Browsertrix</a>
997-
</li>
998-
<li class="${this.settingsTab === "ipfs" ? "is-active" : ""}">
999-
<a @click=${() => (this.settingsTab = "ipfs")}>IPFS</a>
1000-
</li>
1001-
</ul>
1002-
</div>
1003-
1004-
<form class="is-flex is-flex-direction-column is-size-7" @submit="${
1005-
this.onSaveSettings
1006-
}">
991+
<wr-modal @modal-closed="${this.onCancelSettings}" title="Settings">
992+
<div class="tabs mb-3">
993+
<ul>
994+
<li
995+
class="${this.settingsTab === "browsertrix" ? "is-active" : ""}"
996+
>
997+
<a @click=${() => (this.settingsTab = "browsertrix")}
998+
>Browsertrix</a
999+
>
1000+
</li>
1001+
<li class="${this.settingsTab === "ipfs" ? "is-active" : ""}">
1002+
<a @click=${() => (this.settingsTab = "ipfs")}>IPFS</a>
1003+
</li>
1004+
</ul>
1005+
</div>
10071006
1008-
${
1009-
this.settingsTab === "ipfs"
1007+
<form
1008+
class="is-flex is-flex-direction-column is-size-7"
1009+
@submit="${this.onSaveSettings}"
1010+
>
1011+
${this.settingsTab === "ipfs"
10101012
? html` <p class="is-size-6 mb-3">
10111013
Configure settings for sharing archived items to IPFS.
10121014
</p>
@@ -1047,11 +1049,8 @@ class ArchiveWebApp extends ReplayWebApp {
10471049
</p>
10481050
</div>
10491051
</fieldset>`
1050-
: ""
1051-
}
1052-
1053-
${
1054-
this.settingsTab === "browsertrix"
1052+
: ""}
1053+
${this.settingsTab === "browsertrix"
10551054
? html`
10561055
<p class="is-size-6 mb-3">
10571056
Configure your credentials to upload archived items to
@@ -1119,130 +1118,7 @@ class ArchiveWebApp extends ReplayWebApp {
11191118
</div>
11201119
</fieldset>
11211120
`
1122-
: ""
1123-
}
1124-
<div class="has-text-centered has-text-danger">${
1125-
this.settingsError
1126-
}</div>
1127-
<div class="has-text-centered mt-4">
1128-
<button class="button is-primary" type="submit">Save</button>
1129-
<button class="button" type="button" @click="${
1130-
this.onCancelSettings
1131-
}">Cancel</button>
1132-
</div>
1133-
1134-
<form
1135-
class="is-flex is-flex-direction-column is-size-7"
1136-
@submit="${this.onSaveSettings}"
1137-
>
1138-
${
1139-
this.settingsTab === "ipfs"
1140-
? html` <p class="is-size-6 mb-3">
1141-
Configure settings for sharing archived items to IPFS.
1142-
</p>
1143-
<fieldset>
1144-
<div class="field">
1145-
<input
1146-
name="ipfsAutoDetect"
1147-
id="ipfsAutoDetect"
1148-
class="checkbox is-small"
1149-
type="checkbox"
1150-
?checked="${this.ipfsOpts.autoDetect}"
1151-
/><span class="ml-1">Auto-Detect IPFS</span>
1152-
</div>
1153-
<div class="field has-addons">
1154-
<p class="is-expanded">
1155-
IPFS Daemon URL (leave blank to auto-detect IPFS):
1156-
<input
1157-
class="input is-small"
1158-
type="url"
1159-
name="ipfsDaemonUrl"
1160-
id="ipfsDaemonUrl"
1161-
value="${this.ipfsOpts.daemonUrl}"
1162-
placeholder="Set IPFS Daemon URL or set blank to auto-detect IPFS"
1163-
/>
1164-
</p>
1165-
</div>
1166-
<div class="field has-addons">
1167-
<p class="is-expanded">
1168-
IPFS Gateway URL:
1169-
<input
1170-
class="input is-small"
1171-
type="url"
1172-
name="ipfsGatewayUrl"
1173-
id="ipfsGatewayUrl"
1174-
value="${this.ipfsOpts.gatewayUrl}"
1175-
placeholder="${DEFAULT_GATEWAY_URL}"
1176-
/>
1177-
</p>
1178-
</div>
1179-
</fieldset>`
1180-
: ""
1181-
}
1182-
${
1183-
this.settingsTab === "browsertrix"
1184-
? html`
1185-
<p class="is-size-6 mb-3">
1186-
Configure your credentials to upload archived items to
1187-
Browsertrix Cloud.
1188-
</p>
1189-
<fieldset>
1190-
<div class="field has-addons">
1191-
<p class="is-expanded">
1192-
Browsertrix Cloud URL:
1193-
<input
1194-
class="input is-small"
1195-
type="url"
1196-
name="btrixUrl"
1197-
id="btrixUrl"
1198-
value="${this.btrixOpts?.url || ""}"
1199-
placeholder="https://..."
1200-
/>
1201-
</p>
1202-
</div>
1203-
<div class="field has-addons">
1204-
<p class="is-expanded">
1205-
Username
1206-
<input
1207-
class="input is-small"
1208-
type="text"
1209-
name="btrixUsername"
1210-
id="btrixUsername"
1211-
value="${this.btrixOpts?.username || ""}"
1212-
placeholder="Username"
1213-
/>
1214-
</p>
1215-
</div>
1216-
<div class="field has-addons">
1217-
<p class="is-expanded">
1218-
Password
1219-
<input
1220-
class="input is-small"
1221-
type="password"
1222-
name="btrixPassword"
1223-
id="btrixPassword"
1224-
value="${this.btrixOpts?.password || ""}"
1225-
placeholder="Password"
1226-
/>
1227-
</p>
1228-
</div>
1229-
<div class="field has-addons">
1230-
<p class="is-expanded">
1231-
Organization Name (Optional)
1232-
<input
1233-
class="input is-small"
1234-
type="text"
1235-
name="btrixOrgName"
1236-
id="btrixOrgName"
1237-
value="${this.btrixOpts?.orgName || ""}"
1238-
placeholder="Organization (optional)"
1239-
/>
1240-
</p>
1241-
</div>
1242-
</fieldset>
1243-
`
1244-
: ""
1245-
}
1121+
: ""}
12461122
<div class="has-text-centered has-text-danger">
12471123
${this.settingsError}
12481124
</div>

0 commit comments

Comments
 (0)