From ddffa6c1b70fb941304ecb7a5d5d9060c118a5da Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sat, 31 Jan 2026 18:53:05 +0000 Subject: [PATCH 1/2] feat: add warning for connector for non-contributors --- app/components/ConnectorModal.vue | 49 +++++++++++++++++++++++++++++++ i18n/locales/en.json | 3 ++ lunaria/files/en-US.json | 3 ++ 3 files changed, 55 insertions(+) diff --git a/app/components/ConnectorModal.vue b/app/components/ConnectorModal.vue index 25fb48895c..58693af3bd 100644 --- a/app/components/ConnectorModal.vue +++ b/app/components/ConnectorModal.vue @@ -116,10 +116,58 @@ watch(open, isOpen => {
+ +
+
+ + {{ $t('connector.modal.contributor_badge') }} + +

+ + + +

+
+
+

{{ $t('connector.modal.run_hint') }}

+
+ $ + pnpm npmx-connector + +
+ +

{{ $t('connector.modal.paste_token') }}

diff --git a/i18n/locales/en.json b/i18n/locales/en.json index 038a6d6873..171309c19f 100644 --- a/i18n/locales/en.json +++ b/i18n/locales/en.json @@ -374,6 +374,9 @@ }, "modal": { "title": "Local Connector", + "contributor_badge": "Contributors only", + "contributor_notice": "The connector is not yet published to npm. See the {link} for how to run locally.", + "contributor_link": "contributing guide", "connected": "Connected", "connected_as_user": "Connected as ~{user}", "connected_hint": "You can now manage packages and organizations from the web UI.", diff --git a/lunaria/files/en-US.json b/lunaria/files/en-US.json index 038a6d6873..171309c19f 100644 --- a/lunaria/files/en-US.json +++ b/lunaria/files/en-US.json @@ -374,6 +374,9 @@ }, "modal": { "title": "Local Connector", + "contributor_badge": "Contributors only", + "contributor_notice": "The connector is not yet published to npm. See the {link} for how to run locally.", + "contributor_link": "contributing guide", "connected": "Connected", "connected_as_user": "Connected as ~{user}", "connected_hint": "You can now manage packages and organizations from the web UI.", From 175d04f9b101ae89f80a48f2a4fd87b7029c8302 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sat, 31 Jan 2026 18:58:23 +0000 Subject: [PATCH 2/2] fix: don't show warning when connector has closed --- app/components/ConnectorModal.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/components/ConnectorModal.vue b/app/components/ConnectorModal.vue index 58693af3bd..343fa24ce8 100644 --- a/app/components/ConnectorModal.vue +++ b/app/components/ConnectorModal.vue @@ -8,7 +8,10 @@ const tokenInput = shallowRef('') const portInput = shallowRef('31415') const { copied, copy } = useClipboard({ copiedDuring: 2000 }) +const hasAttemptedConnect = shallowRef(false) + async function handleConnect() { + hasAttemptedConnect.value = true const port = Number.parseInt(portInput.value, 10) || 31415 const success = await connect(tokenInput.value.trim(), port) if (success) { @@ -42,6 +45,7 @@ const executeNpmxConnectorCommand = computed(() => { watch(open, isOpen => { if (isOpen) { tokenInput.value = '' + hasAttemptedConnect.value = false } }) @@ -242,9 +246,9 @@ watch(open, isOpen => { - +