Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Refine location icons and configuration layouts https://github.com/siyuan-note/siyuan/issues/20325

Daniel7b37cdb66d6f
diff --git a/app/appearance/icons/index.html b/app/appearance/icons/index.html
index 1dbedda6b1..58de67d828 100644
--- a/app/appearance/icons/index.html
+++ b/app/appearance/icons/index.html
@@ -286,6 +286,12 @@
</svg>
iconGlobe
</div>
+ <div>
+ <svg>
+ <use xlink:href="#iconMapPin"></use>
+ </svg>
+ iconMapPin
+ </div>
<div>
<svg>
<use xlink:href="#iconPublish"></use>
diff --git a/app/appearance/icons/litheness/icon.js b/app/appearance/icons/litheness/icon.js
index ea51aeb3dd..7138d1bc05 100644
--- a/app/appearance/icons/litheness/icon.js
+++ b/app/appearance/icons/litheness/icon.js
@@ -142,6 +142,10 @@ document.body.insertAdjacentHTML('afterbegin', `<svg id="iconsLitheness" style="
<symbol id="iconGlobe" stroke-width="1.7" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/>
</symbol>
+ <symbol id="iconMapPin" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
+ <path d="M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0" />
+ <circle cx="12" cy="10" r="3" />
+ </symbol>
<symbol id="iconPublish" stroke-width="1.7" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
<path d="M7 3.34V5a3 3 0 0 0 3 3"/><path d="M11 21.95V18a2 2 0 0 0-2-2 2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05"/><path d="M21.54 15H17a2 2 0 0 0-2 2v4.54"/><path d="M12 2a10 10 0 1 0 9.54 13"/><path d="M20 6V4a2 2 0 1 0-4 0v2"/><rect width="8" height="5" x="14" y="6" rx="1"/>
</symbol>
diff --git a/app/src/config/map.test.ts b/app/src/config/map.test.ts
index 61a8b623d6..415813f146 100644
--- a/app/src/config/map.test.ts
+++ b/app/src/config/map.test.ts
@@ -26,7 +26,7 @@ const createPanel = async (initial: Service[] = [service()], missingID?: string,
const confirmations: Array<() => void> = [];
const listeners = new Map<string, (event: unknown) => Promise<void> | void>();
const notifications = new Map<string, () => void>();
- const fields = ["mapServiceName", "mapServiceID", "mapAPIKey", "mapSecurityCode", "mapClearAPIKey", "mapClearSecurityCode"];
+ const fields = ["mapServiceName", "mapAPIKey", "mapSecurityCode", "mapClearAPIKey", "mapClearSecurityCode"];
const buttons = ["mapServiceAdd", "mapServiceSave", "mapServiceCancel", "mapServiceDelete", "mapServiceRetry"];
const selects = ["mapServiceSelect", "mapServiceProvider"];
const controls = Object.fromEntries([...fields, ...buttons, ...selects,
@@ -119,9 +119,12 @@ test("Map settings share desktop/mobile order, existing icon, searchable control
genConfigItemMainHtml: (title: string, desc: string) => `${title} ${desc}`,
})});
exports.registerMapTab(tab);
- assert.ok(rows[0].keywords.includes("mapServiceIDTip"));
+ assert.equal(rows[0].keywords.includes("mapServiceIDTip"), false);
+ assert.equal(rows[0].keywords.includes("mapServiceID"), false);
assert.ok(rows[0].keywords.includes("mapProductionTip"));
const html = rows[0].html();
+ assert.doesNotMatch(html, /mapServiceID/);
+ assert.match(html, /<div class="fn__flex">\s*<button id="mapServiceDelete"[^>]*>[^<]*<\/button><span class="fn__flex-1"><\/span>\s*<button id="mapServiceCancel"[^>]*>[^<]*<\/button><span class="fn__space"><\/span>\s*<button id="mapServiceSave"/);
assert.equal((html.match(/type="password" autocomplete="off"/g) || []).length, 2);
assert.doesNotMatch(html, /value=".*apiKey/i);
const tabs = readFileSync("src/config/setting/tabs.ts", "utf8");
@@ -182,8 +185,7 @@ test("changing providers away and back clears both old AMap credentials", async
test("OpenFreeMap writes no credentials and missing IDs are explicitly preserved", async () => {
const p = await createPanel([service()], "other-device-id");
- assert.equal(p.controls.mapServiceID.value, "other-device-id");
- assert.equal(p.controls.mapServiceID.readOnly, false);
+ assert.equal(p.controls.mapServiceID, undefined);
assert.equal(p.controls.mapServiceProvider.value, "openfreemap");
assert.equal(p.controls.mapServiceStatus.textContent, "mapMissingServiceTip");
assert.equal(p.writes.length, 0);
@@ -193,13 +195,37 @@ test("OpenFreeMap writes no credentials and missing IDs are explicitly preserved
await p.finishWrite(); await saving; p.close();
});
-test("service ID validation rejects duplicates, unsafe characters, and overlong IDs", async () => {
+test("new services receive an internal ID and cancelled drafts leave existing IDs unchanged", async () => {
const p = await createPanel();
- p.click("mapServiceAdd"); p.input("mapServiceName", "New");
- for (const id of ["one", "bad id", "-bad", "<unsafe>", "a".repeat(129), ""]) {
- p.input("mapServiceID", id); await p.click("mapServiceSave");
- assert.equal(p.controls.mapServiceID.validationMessage, "mapServiceIDInvalid");
+ await p.click("mapServiceAdd");
+ assert.equal(p.controls.mapServiceID, undefined);
+ p.input("mapServiceName", "Cancelled");
+ await p.click("mapServiceCancel");
+ assert.equal(p.writes.length, 0);
+ assert.equal(p.controls.mapServiceName.value, "one");
+ await p.click("mapServiceAdd");
+ await p.click("mapServiceSave");
+ assert.equal(p.controls.mapServiceName.validationMessage, "mapServiceNameRequired");
+ assert.equal(p.writes.length, 0);
+ p.input("mapServiceName", "New");
+ const saving = p.click("mapServiceSave"); await tick();
+ assert.deepEqual(Array.from(p.writes[0].services, item => item.id), ["one", "new-stable-id"]);
+ await p.finishWrite(); await saving;
+ assert.equal(p.controls.mapServiceSelect.value, "new-stable-id");
+ p.close();
+});
+
+test("internal service ID validation rejects collisions and unsafe requested IDs", async () => {
+ for (const id of ["bad id", "-bad", "<unsafe>", "a".repeat(129)]) {
+ const p = await createPanel([service()], id);
+ p.input("mapServiceName", "New"); await p.click("mapServiceSave");
+ assert.equal(p.controls.mapServiceStatus.textContent, "mapServiceIDInvalid");
+ assert.equal(p.writes.length, 0);
+ p.close();
}
+ const p = await createPanel([service("new-stable-id")]);
+ await p.click("mapServiceAdd"); p.input("mapServiceName", "New"); await p.click("mapServiceSave");
+ assert.equal(p.controls.mapServiceStatus.textContent, "mapServiceIDInvalid");
assert.equal(p.writes.length, 0);
p.close();
});
@@ -319,12 +345,18 @@ test("closing during submitted save clears secrets and ignores the late UI resul
test("newer missing-service requests survive loading and never overwrite a dirty draft", async () => {
const p = await createPanel([service()], "old-id", true);
- p.request("latest-id"); p.readRequests[0]({code: 0, data: {services: [service()]}}); await tick();
- assert.equal(p.controls.mapServiceID.value, "latest-id");
+ p.request("latest-id"); p.readRequests[0]({code: 0, data: {services: [service()], revision: "revision-0"}}); await tick();
p.input("mapServiceName", "Draft"); p.request("third-id");
assert.equal(p.controls.mapServiceName.value, "Draft");
assert.deepEqual(p.messages, ["mapSaveOrCancel"]);
- await p.click("mapServiceCancel"); assert.equal(p.controls.mapServiceID.value, "third-id"); p.close();
+ const saving = p.click("mapServiceSave"); await tick();
+ assert.equal(p.writes[0].services[1].id, "latest-id");
+ await p.finishWrite(); await saving;
+ assert.equal(p.controls.mapServiceName.value, "");
+ p.input("mapServiceName", "Newer request");
+ const nextSave = p.click("mapServiceSave"); await tick();
+ assert.equal(p.writes[1].services[2].id, "third-id");
+ await p.finishWrite(1); await nextSave; p.close();
});
test("delete confirmation is invalidated by closing or newer edits", async () => {
diff --git a/app/src/config/map.ts b/app/src/config/map.ts
index a8475392ed..ddcdbd44d0 100644
--- a/app/src/config/map.ts
+++ b/app/src/config/map.ts
@@ -50,7 +50,7 @@ export const registerMapTab = (tab: SettingTabBuilder) => {
`<input id="${id}" class="b3-text-field fn__block" type="${password ? "password" : "text"}" autocomplete="off" spellcheck="false"${password ? "" : ' maxlength="128"'} disabled>`;
tab.group("services", lang.mapServices).slot({
key: "mapServices",
- keywords: [lang.mapSettings, lang.mapServices, lang.mapServiceID, lang.mapServiceIDTip, lang.mapServiceName,
+ keywords: [lang.mapSettings, lang.mapServices, lang.mapServiceName,
lang.mapProvider, lang.mapSecurityCode, lang.apiKey, lang.mapCredentialsTip, lang.mapRenderingTip,
lang.mapProductionTip, ...providers.map(providerName)],
html: () => `<div id="mapSettings" class="b3-label config-item">
@@ -61,14 +61,13 @@ ${genConfigItemMainHtml(lang.mapServices, lang.mapServicesTip)}
</div><div class="fn__hr--small"></div><div id="mapServiceStatus" class="b3-label__text" role="status"></div>
<div id="mapServiceEditor" class="fn__none">
${field("mapServiceName", lang.mapServiceName, input("mapServiceName"))}
-${field("mapServiceID", lang.mapServiceID, input("mapServiceID"), lang.mapServiceIDTip)}
${field("mapServiceProvider", lang.mapProvider, `<select id="mapServiceProvider" class="b3-select fn__block" disabled>${providers.map(provider => `<option value="${provider}">${escapeHtml(providerName(provider))}</option>`).join("")}</select>`)}
<div id="mapAPIKeyRow">${field("mapAPIKey", lang.apiKey, `${input("mapAPIKey", true)}<div class="fn__hr--small"></div><label class="fn__flex"><span class="fn__flex-1">${lang.mapClearCredential}</span><input id="mapClearAPIKey" type="checkbox" class="b3-switch" disabled></label>`, lang.mapCredentialsTip)}</div>
<div id="mapSecurityCodeRow">${field("mapSecurityCode", lang.mapSecurityCode, `${input("mapSecurityCode", true)}<div class="fn__hr--small"></div><label class="fn__flex"><span class="fn__flex-1">${lang.mapClearCredential}</span><input id="mapClearSecurityCode" type="checkbox" class="b3-switch" disabled></label>`, lang.mapCredentialsTip)}</div>
<div class="fn__hr"></div><div class="fn__flex">
-<button id="mapServiceSave" class="b3-button b3-button--text" disabled>${lang.save}</button><span class="fn__space"></span>
-<button id="mapServiceCancel" class="b3-button b3-button--cancel" disabled>${lang.cancel}</button><span class="fn__flex-1"></span>
-<button id="mapServiceDelete" class="b3-button b3-button--remove" disabled>${lang.delete}</button>
+<button id="mapServiceDelete" class="b3-button b3-button--remove" disabled>${lang.delete}</button><span class="fn__flex-1"></span>
+<button id="mapServiceCancel" class="b3-button b3-button--cancel" disabled>${lang.cancel}</button><span class="fn__space"></span>
+<button id="mapServiceSave" class="b3-button b3-button--text" disabled>${lang.save}</button>
</div></div><div class="fn__hr"></div>
<div class="b3-label__text">${lang.mapRenderingTip}</div><div class="fn__hr--small"></div>
<div class="b3-label__text">${lang.mapProductionTip}</div><div class="fn__hr--small"></div>
@@ -84,6 +83,7 @@ export const mountMapSettings = (root: HTMLElement): (() => void) => {
let closed = false;
let data: MapConfig;
let selectedID = "";
+ let draftID = "";
let creating = false;
let dirty = false;
let busy = false;
@@ -113,7 +113,6 @@ export const mountMapSettings = (root: HTMLElement): (() => void) => {
get<HTMLButtonElement>("mapServiceCancel").disabled = busy || loading || !dirty;
get<HTMLButtonElement>("mapServiceDelete").disabled = locked || dirty || creating || !current();
get<HTMLButtonElement>("mapServiceRetry").disabled = busy || loading;
- get<HTMLInputElement>("mapServiceID").readOnly = !creating;
get("mapServiceEditor").classList.toggle("fn__none", !creating && !current());
get("mapAPIKeyRow").classList.toggle("fn__none", provider === "openfreemap");
get("mapSecurityCodeRow").classList.toggle("fn__none", provider !== "amap");
@@ -123,14 +122,14 @@ export const mountMapSettings = (root: HTMLElement): (() => void) => {
const renderDraft = (service?: MapService, missingID?: string) => {
revision++;
selectedID = service?.id || "";
+ draftID = service?.id || missingID || "";
creating = !service && missingID !== undefined;
dirty = creating;
providerChanged = false;
clearCredentials();
get<HTMLInputElement>("mapServiceName").value = service?.name || "";
- get<HTMLInputElement>("mapServiceID").value = service?.id || missingID || "";
get<HTMLSelectElement>("mapServiceProvider").value = service?.provider || "openfreemap";
- ["mapServiceName", "mapServiceID"].forEach(id => get<HTMLInputElement>(id).setCustomValidity(""));
+ get<HTMLInputElement>("mapServiceName").setCustomValidity("");
get<HTMLInputElement>("mapAPIKey").placeholder = service?.hasAPIKey ? lang.mapCredentialSaved : "";
get<HTMLInputElement>("mapSecurityCode").placeholder = service?.hasSecurityCode ? lang.mapCredentialSaved : "";
const select = get<HTMLSelectElement>("mapServiceSelect");
@@ -234,14 +233,16 @@ export const mountMapSettings = (root: HTMLElement): (() => void) => {
}
};
const save = async () => {
- const id = get<HTMLInputElement>("mapServiceID");
const name = get<HTMLInputElement>("mapServiceName");
const provider = providers.find(item => item === get<HTMLSelectElement>("mapServiceProvider").value);
- id.setCustomValidity(!/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/.test(id.value) ||
- creating && data.services.some(service => service.id === id.value) ? lang.mapServiceIDInvalid : "");
+ if (!/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/.test(draftID) ||
+ creating && data.services.some(service => service.id === draftID)) {
+ get("mapServiceStatus").textContent = lang.mapServiceIDInvalid;
+ return;
+ }
name.setCustomValidity(name.value.trim() ? "" : lang.mapServiceNameRequired);
- if (!id.reportValidity() || !name.reportValidity() || !provider) return;
- const service: MapServiceWrite = {id: id.value, name: name.value.trim(), provider};
+ if (!name.reportValidity() || !provider) return;
+ const service: MapServiceWrite = {id: draftID, name: name.value.trim(), provider};
if (provider !== "openfreemap") {
const apiKey = get<HTMLInputElement>("mapAPIKey").value;
if (get<HTMLInputElement>("mapClearAPIKey").checked) service.apiKey = "";
@@ -259,7 +260,7 @@ export const mountMapSettings = (root: HTMLElement): (() => void) => {
root.addEventListener("input", event => {
if (closed || busy || loading || !data || window.siyuan.config.readonly) return;
const target = event.target as HTMLInputElement;
- if (!["mapServiceID", "mapServiceName", "mapAPIKey", "mapSecurityCode"].includes(target.id)) return;
+ if (!["mapServiceName", "mapAPIKey", "mapSecurityCode"].includes(target.id)) return;
target.setCustomValidity("");
dirty = true;
updateControls();
diff --git a/app/src/protyle/render/av/col.ts b/app/src/protyle/render/av/col.ts
index f65f504637..14fd68e0d2 100644
--- a/app/src/protyle/render/av/col.ts
+++ b/app/src/protyle/render/av/col.ts
@@ -776,7 +776,7 @@ export const getColIconByType = (type: TAVCol) => {
case "phone":
return "iconPhone";
case "location":
- return "iconGlobe";
+ return "iconMapPin";
case "template":
return "iconMath";
case "checkbox":
@@ -2121,7 +2121,7 @@ export const addCol = (protyle: IProtyle, blockElement: Element, previousID?: st
});
menu.addItem({
id: "location",
- icon: "iconGlobe",
+ icon: "iconMapPin",
label: window.siyuan.languages.location,
click() {
const id = Lute.NewNodeID();
diff --git a/app/src/protyle/render/av/locationColumn.test.ts b/app/src/protyle/render/av/locationColumn.test.ts
index 5cff2a0f93..f34ad79c2c 100644
--- a/app/src/protyle/render/av/locationColumn.test.ts
+++ b/app/src/protyle/render/av/locationColumn.test.ts
@@ -86,7 +86,7 @@ test("location default CRS lists explicit systems and providers on desktop and m
}
});
-test("location field menus reuse the existing globe icon without changing pin actions", () => {
+test("location field menus use a map marker without changing pin or coordinate system actions", () => {
const source = readFileSync("src/protyle/render/av/col.ts", "utf8");
const start = source.indexOf("export const getColIconByType =");
const end = source.indexOf("const addAttrViewColAnimation =", start);
@@ -94,10 +94,45 @@ test("location field menus reuse the existing globe icon without changing pin ac
runInNewContext(transpileModule(source.slice(start, end), {
compilerOptions: {module: ModuleKind.CommonJS, target: ScriptTarget.ES2020},
}).outputText, {exports: api});
- assert.equal(api.getColIconByType("location"), "iconGlobe");
- assert.match(source, /id: "location",\s*icon: "iconGlobe"/);
+ assert.equal(api.getColIconByType("location"), "iconMapPin");
+ assert.match(source, /id: "location",\s*icon: "iconMapPin"/);
assert.match(source, /icon: isFreeze \? "iconUnpin" : "iconPin"/);
- assert.match(readFileSync("appearance/icons/litheness/icon.js", "utf8"), /<symbol id="iconGlobe"/);
+ const icons = readFileSync("appearance/icons/litheness/icon.js", "utf8");
+ const marker = icons.match(/<symbol id="iconMapPin"[^>]*>[\s\S]*?<\/symbol>/)?.[0];
+ assert.ok(marker);
+ assert.match(marker, /viewBox="0 0 24 24"/);
+ assert.match(marker, /stroke="currentColor" stroke-width="1.7"/);
+ assert.match(marker, /<circle cx="12" cy="10" r="3"/);
+ assert.match(readFileSync("appearance/icons/index.html", "utf8"), /#iconGlobe[\s\S]*?#iconMapPin[\s\S]*?#iconPublish/);
+
+ const renderSource = readFileSync("src/protyle/render/av/render.ts", "utf8");
+ const renderStart = renderSource.indexOf("const getTableHTMLs =");
+ const renderEnd = renderSource.indexOf("export const getGroupTitleHTML =", renderStart);
+ const renderAPI = {} as {getTableHTMLs: (data: unknown, element: unknown) => string};
+ runInNewContext(transpileModule("export " + renderSource.slice(renderStart, renderEnd), {
+ compilerOptions: {module: ModuleKind.CommonJS, target: ScriptTarget.ES2020},
+ }).outputText, {
+ exports: renderAPI,
+ getColIconByType: api.getColIconByType,
+ escapeAttr: (value: string) => value || "",
+ escapeHtml: (value: string) => value || "",
+ unicode2Emoji: (value: string) => `custom-icon-${value}`,
+ getCalcValue: () => "",
+ window: {siyuan: {languages: {}}},
+ });
+ for (const avType of ["table", "list", "map"]) {
+ for (const icon of ["", "1f4cd"]) {
+ const html = renderAPI.getTableHTMLs({
+ columns: [{id: "location", type: "location", name: "Location", icon}], rows: [], rowCount: 0,
+ }, {dataset: {avType}});
+ if (icon) {
+ assert.match(html, /custom-icon-1f4cd/);
+ assert.doesNotMatch(html, /#iconMapPin/);
+ } else {
+ assert.match(html, /class="av__cellheadericon"><use xlink:href="#iconMapPin"/);
+ }
+ }
+ }
});
test("location default CRS setting constructs symmetric do and undo operations", () => {
diff --git a/app/src/protyle/render/av/locationEditor.test.ts b/app/src/protyle/render/av/locationEditor.test.ts
index eabe58b7c7..e9eb71b2a1 100644
--- a/app/src/protyle/render/av/locationEditor.test.ts
+++ b/app/src/protyle/render/av/locationEditor.test.ts
@@ -137,6 +137,17 @@ const createEditor = (options: {
};
describe("database location editor", () => {
+ it("uses shared block form groups with one aligned coordinate row on desktop and mobile", () => {
+ for (const mobile of [false, true]) {
+ const editor = createEditor({mobile});
+ assert.equal((editor.markup.match(/<div class="b3-label b3-label--inner(?: fn__flex)?">/g) || []).length, 5);
+ assert.doesNotMatch(editor.markup, /<label class="b3-label/);
+ assert.match(editor.markup, /<div class="b3-label b3-label--inner fn__flex">\s*<label class="fn__flex-1">latitude/);
+ assert.match(editor.markup, /<label class="fn__flex-1">longitude/);
+ assert.match(editor.markup, /data-field="paste"[^>]*><\/textarea>\s*<\/label>\s*<\/div>\s*<button[^>]*data-action="parse"/);
+ }
+ });
+
it("requires an explicit real CRS without relabeling old unspecified coordinates", async () => {
const value = {latitude: 25.04, longitude: 102.42, coordinateSystem: "unknown" as const};
const editor = createEditor({value, unspecifiedSystem: true});
diff --git a/app/src/protyle/render/av/locationEditor.ts b/app/src/protyle/render/av/locationEditor.ts
index 90ec530754..f8f13371a6 100644
--- a/app/src/protyle/render/av/locationEditor.ts
+++ b/app/src/protyle/render/av/locationEditor.ts
@@ -46,36 +46,44 @@ export const openAVLocationEditor = (options: AVLocationEditorOptions) => {
title: escapeHtml(languages.location),
width: mobile ? "100vw" : "480px",
content: `<div class="b3-dialog__content">
- <label class="b3-label b3-label--inner fn__block">${escapeHtml(languages.locationName)}
- <div class="fn__hr"></div><input class="b3-text-field fn__block" data-field="name" type="text">
- </label>
- <div class="fn__flex">
- <label class="b3-label b3-label--inner fn__flex-1">${escapeHtml(languages.latitude)}
- <div class="fn__hr"></div><input class="b3-text-field fn__block" data-field="latitude" type="text" inputmode="decimal" spellcheck="false">
+ <div class="b3-label b3-label--inner">
+ <label>${escapeHtml(languages.locationName)}
+ <span class="fn__hr"></span><input class="b3-text-field fn__block" data-field="name" type="text">
+ </label>
+ </div>
+ <div class="b3-label b3-label--inner fn__flex">
+ <label class="fn__flex-1">${escapeHtml(languages.latitude)}
+ <span class="fn__hr"></span><input class="b3-text-field fn__block" data-field="latitude" type="text" inputmode="decimal" spellcheck="false">
</label>
<div class="fn__space"></div>
- <label class="b3-label b3-label--inner fn__flex-1">${escapeHtml(languages.longitude)}
- <div class="fn__hr"></div><input class="b3-text-field fn__block" data-field="longitude" type="text" inputmode="decimal" spellcheck="false">
+ <label class="fn__flex-1">${escapeHtml(languages.longitude)}
+ <span class="fn__hr"></span><input class="b3-text-field fn__block" data-field="longitude" type="text" inputmode="decimal" spellcheck="false">
</label>
</div>
- <label class="b3-label b3-label--inner fn__block">${escapeHtml(languages.coordinateSystem)}
- <div class="fn__hr"></div><select class="b3-select fn__block" data-field="coordinateSystem">
- <option value="" disabled>${escapeHtml(languages.selectCoordinateSystem)}</option>
- <option value="wgs84">${escapeHtml(languages.coordinateSystemWGS84)}</option>
- <option value="gcj02">${escapeHtml(languages.coordinateSystemGCJ02)}</option>
- <option value="bd09">${escapeHtml(languages.coordinateSystemBD09)}</option>
- </select>
+ <div class="b3-label b3-label--inner">
+ <label>${escapeHtml(languages.coordinateSystem)}
+ <span class="fn__hr"></span><select class="b3-select fn__block" data-field="coordinateSystem">
+ <option value="" disabled>${escapeHtml(languages.selectCoordinateSystem)}</option>
+ <option value="wgs84">${escapeHtml(languages.coordinateSystemWGS84)}</option>
+ <option value="gcj02">${escapeHtml(languages.coordinateSystemGCJ02)}</option>
+ <option value="bd09">${escapeHtml(languages.coordinateSystemBD09)}</option>
+ </select>
+ </label>
<div class="b3-label__text">${escapeHtml(languages.coordinateSystemTip)}</div>
- </label>
- <label class="b3-label b3-label--inner fn__block">${escapeHtml(languages.coordinateOrder)}
- <div class="fn__hr"></div><select class="b3-select fn__block" data-field="coordinateOrder">
- <option value="latitudeLongitude">${escapeHtml(languages.latitude)}, ${escapeHtml(languages.longitude)}</option>
- <option value="longitudeLatitude">${escapeHtml(languages.longitude)}, ${escapeHtml(languages.latitude)}</option>
- </select>
- </label>
- <label class="b3-label b3-label--inner fn__block">${escapeHtml(languages.pasteCoordinates)}
- <div class="fn__hr"></div><textarea class="b3-text-field fn__block" data-field="paste" rows="2" spellcheck="false"></textarea>
- </label>
+ </div>
+ <div class="b3-label b3-label--inner">
+ <label>${escapeHtml(languages.coordinateOrder)}
+ <span class="fn__hr"></span><select class="b3-select fn__block" data-field="coordinateOrder">
+ <option value="latitudeLongitude">${escapeHtml(languages.latitude)}, ${escapeHtml(languages.longitude)}</option>
+ <option value="longitudeLatitude">${escapeHtml(languages.longitude)}, ${escapeHtml(languages.latitude)}</option>
+ </select>
+ </label>
+ </div>
+ <div class="b3-label b3-label--inner">
+ <label>${escapeHtml(languages.pasteCoordinates)}
+ <span class="fn__hr"></span><textarea class="b3-text-field fn__block" data-field="paste" rows="2" spellcheck="false"></textarea>
+ </label>
+ </div>
<button type="button" class="b3-button b3-button--outline" data-action="parse">${escapeHtml(languages.confirm)}</button>
<div class="ft__error fn__none" style="margin-top:8px" data-role="error" role="alert" aria-live="polite"></div>
</div>