+
+
setOriginUrl(e.target.value)}
disabled={isSavingOrigin}
+ className="flex-1"
/>
+
-
+
+ {/* Credentials Warning */}
+ {gitStatus.remotes.length > 0 && (
+ (() => {
+ const remoteWithoutCredentials = gitStatus.remotes.find((remote) => !findCredentialsForRepo(remote.url, settings.credentials));
+ if (!remoteWithoutCredentials) return null;
+
+ let protocol = '';
+ let hostname = 'the remote host';
+ try {
+ const url = new URL(remoteWithoutCredentials.url);
+ protocol = url.protocol;
+ hostname = url.hostname;
+ } catch {
+ return (
+
+
+
+ Invalid URL format. Enter an https URL.
+
+
+ );
+ }
+
+ if (protocol !== 'https:' && protocol !== 'nostr:') {
+ return (
+
+
+
+ The {protocol.replace(':', '')} URL type is not supported. Enter an https URL.
+
+
+ );
+ }
+
+ if (protocol === 'nostr:' && !user) {
+ return (
+
+
+
+ You are not logged into Nostr. Push & pull might not work unless you{' '}
+ .
+
+
+ );
+ }
+
+ if (protocol === 'https:') {
+ return (
+
+
+
+ You are not logged into {hostname}. Push & pull might not work unless you{' '}
+ .
+
+
+ );
+ }
+
+ return null;
+ })()
+ )}
- {/* Credentials Warning */}
- {gitStatus.remotes.length > 0 && (
- (() => {
- const remoteWithoutCredentials = gitStatus.remotes.find((remote) => !findCredentialsForRepo(remote.url, settings.credentials));
- if (!remoteWithoutCredentials) return null;
-
- let protocol = '';
- let hostname = 'the remote host';
- try {
- const url = new URL(remoteWithoutCredentials.url);
- protocol = url.protocol;
- hostname = url.hostname;
- } catch {
- // Invalid URL
- return (
-