Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@
<option value="vb">VB.NET</option>
</optgroup>
<!-- filled from PROTOC_LANGUAGES, so the picker and the service cannot disagree -->
<optgroup label="protoc — on protoc.protobuf-net.dev" id="opt-language-protoc"></optgroup>
<optgroup label="protoc — compiled on a server" id="opt-language-protoc"></optgroup>
</select>
</label>
<button type="button" class="ghost remote-only" id="run-protoc">Generate</button>
<!-- the host is deliberately not named here or in the footer; what the user needs to
know is that this one leaves the browser, not where it goes -->
<span class="note remote-only">
compiled by <code>protoc</code> on
<a href="https://protoc.protobuf-net.dev" rel="noopener">protoc.protobuf-net.dev</a> —
your schema is sent there when you press Generate
compiled with <code>protoc</code> — your schema is sent to a server when you press
Generate
</span>
<label id="opt-langver-wrap" class="net-only">
Version
Expand Down Expand Up @@ -137,8 +138,7 @@
<span id="engine-version">loading engine…</span>
<span>
C#, VB.NET and payload decoding run in your browser via WebAssembly and are never uploaded.
protoc's own languages are compiled on
<a href="https://protoc.protobuf-net.dev" rel="noopener">protoc.protobuf-net.dev</a>.
protoc's own languages are compiled with <code>protoc</code> on a server.
</span>
</footer>

Expand Down
2 changes: 1 addition & 1 deletion web/src/protoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function readResponse(status: number, body: string): GenerateResponse {

if (!parsed || !Array.isArray(parsed.files) || !Array.isArray(parsed.errors)) {
const detail = body.trim().slice(0, 200) || '(no detail)';
return { files: [], errors: [], exception: `protoc.protobuf-net.dev replied ${status}: ${detail}` };
return { files: [], errors: [], exception: `the protoc service replied ${status}: ${detail}` };
}
return { files: parsed.files, errors: parsed.errors, ...(parsed.exception ? { exception: parsed.exception } : {}) };
}
Expand Down
6 changes: 3 additions & 3 deletions web/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@ export function initSchemaView(): void {

// the decoder is local whatever the schema view is set to, so it wins while it is on screen
const remote = protoc !== undefined && location.hash.replace('#', '') !== 'decode';
privacyBadge.textContent = remote ? 'uses protoc.protobuf-net.dev' : 'runs locally';
privacyBadge.textContent = remote ? 'compiled on a server' : 'runs locally';
privacyBadge.setAttribute(
'title',
remote
? 'protoc is a native compiler: pressing Generate sends this schema to protoc.protobuf-net.dev'
? 'protoc is a native compiler and cannot run in the browser: pressing Generate sends this schema to a server'
: 'Nothing you paste leaves your browser',
);
}
Expand Down Expand Up @@ -207,7 +207,7 @@ export function initSchemaView(): void {
} catch (error) {
// an abort is this code superseding itself, and has nothing to report
if (controller.signal.aborted || token !== generation) return;
renderMessages(messages, [], `could not reach protoc.protobuf-net.dev: ${String(error)}`);
renderMessages(messages, [], `could not reach the protoc service: ${String(error)}`);
markStale('outdated — press Generate');
} finally {
if (token === generation) {
Expand Down
Loading