mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-05 22:46:38 +02:00
ai assistant, splash screen
This commit is contained in:
@@ -44,11 +44,11 @@ export function uiEntityEditor(context) {
|
||||
|
||||
var direction = (localizer.textDirection() === 'rtl') ? 'forward' : 'backward';
|
||||
|
||||
headerEnter
|
||||
.append('button')
|
||||
.attr('class', 'preset-reset preset-choose')
|
||||
.attr('title', t('inspector.back_tooltip'))
|
||||
.call(svgIcon(`#iD-icon-${direction}`));
|
||||
// headerEnter
|
||||
// .append('button')
|
||||
// .attr('class', 'preset-reset preset-choose')
|
||||
// .attr('title', t('inspector.back_tooltip'))
|
||||
// .call(svgIcon(`#iD-icon-${direction}`));
|
||||
|
||||
headerEnter
|
||||
.append('button')
|
||||
|
||||
@@ -243,6 +243,23 @@ export function uiField(context, presetField, entityIDs, options) {
|
||||
.call(reference.body)
|
||||
.select('.field-label')
|
||||
.call(reference.button);
|
||||
|
||||
// Add AI Identifier for ALPRs to Manufacturer field
|
||||
if (field.key === 'manufacturer') {
|
||||
const existingButton = selection.select('.field-label .rainbow-box');
|
||||
if (existingButton.empty()) { // Only create if it doesn't exist
|
||||
const aiSvg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" style="display: block; fill: #000000;"><path d="M19,1L17.74,3.75L15,5L17.74,6.26L19,9L20.25,6.26L23,5L20.25,3.75M9,4L6.5,9.5L1,12L6.5,14.5L9,20L11.5,14.5L17,12L11.5,9.5M19,15L17.74,17.74L15,19L17.74,20.25L19,23L20.25,20.25L23,19L20.25,17.74" /></svg>`;
|
||||
|
||||
selection.select('.field-label')
|
||||
.insert('button', '.tag-reference-button')
|
||||
.attr('class', 'rainbow-box')
|
||||
.attr('title', t('inspector.ai_help'))
|
||||
.html(aiSvg)
|
||||
.on('click', () => {
|
||||
window.open('https://example.com/', '_blank');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
d.impl.tags(_tags);
|
||||
|
||||
+1
-1
@@ -350,7 +350,7 @@ export function uiInit(context) {
|
||||
|
||||
|
||||
// hide the sidebar by default
|
||||
// ui.sidebar.toggle(false);
|
||||
ui.sidebar.toggle(false);
|
||||
|
||||
// Setup map dimensions and move map to initial center/zoom.
|
||||
// This should happen after .main-content and toolbars exist.
|
||||
|
||||
@@ -139,7 +139,6 @@ export function helpHtml(id, replacements) {
|
||||
tags: t.html('inspector.tags'),
|
||||
relations: t.html('inspector.relations'),
|
||||
new_relation: t.html('inspector.new_relation'),
|
||||
turn_restrictions: t.html('_tagging.presets.fields.restrictions.label'),
|
||||
background_settings: t.html('background.description'),
|
||||
imagery_offset: t.html('background.fix_misalignment'),
|
||||
start_the_walkthrough: t.html('splash.walkthrough'),
|
||||
|
||||
@@ -38,11 +38,11 @@ export function uiSectionFeatureType(context) {
|
||||
|
||||
var presetButton = presetButtonWrap
|
||||
.append('button')
|
||||
.attr('class', 'preset-list-button preset-reset')
|
||||
.call(uiTooltip()
|
||||
.title(() => t.append('inspector.back_tooltip'))
|
||||
.placement('bottom')
|
||||
);
|
||||
.attr('class', 'preset-list-button preset-reset');
|
||||
// .call(uiTooltip()
|
||||
// .title(() => t.append('inspector.back_tooltip'))
|
||||
// .placement('bottom')
|
||||
// );
|
||||
|
||||
presetButton.append('div')
|
||||
.attr('class', 'preset-icon-container');
|
||||
@@ -77,14 +77,14 @@ export function uiSectionFeatureType(context) {
|
||||
.call(_tagReference.body);
|
||||
}
|
||||
|
||||
selection.selectAll('.preset-reset')
|
||||
.on('click', function() {
|
||||
dispatch.call('choose', this, _presets);
|
||||
})
|
||||
.on('pointerdown pointerup mousedown mouseup', function(d3_event) {
|
||||
d3_event.preventDefault();
|
||||
d3_event.stopPropagation();
|
||||
});
|
||||
// selection.selectAll('.preset-reset')
|
||||
// .on('click', function() {
|
||||
// dispatch.call('choose', this, _presets);
|
||||
// })
|
||||
// .on('pointerdown pointerup mousedown mouseup', function(d3_event) {
|
||||
// d3_event.preventDefault();
|
||||
// d3_event.stopPropagation();
|
||||
// });
|
||||
|
||||
var geometries = entityGeometries();
|
||||
selection.select('.preset-list-item button')
|
||||
|
||||
+26
-18
@@ -4,6 +4,7 @@ import { t } from '../core/localizer';
|
||||
import { uiIntro } from './intro';
|
||||
import { uiModal } from './modal';
|
||||
import { uiSectionPrivacy } from './sections/privacy';
|
||||
import { html } from 'd3';
|
||||
|
||||
|
||||
export function uiSplash(context) {
|
||||
@@ -39,9 +40,17 @@ export function uiSplash(context) {
|
||||
.append('div')
|
||||
.attr('class', 'fillL');
|
||||
|
||||
// Add logo at the top of the splash screen
|
||||
introModal
|
||||
.append('div')
|
||||
.attr('class','modal-section')
|
||||
.attr('class', 'modal-logo')
|
||||
.append('img')
|
||||
.attr('src', 'https://deflock.me/deflock-logo.svg')
|
||||
.attr('alt', 'Deflock Logo');
|
||||
|
||||
introModal
|
||||
.append('div')
|
||||
.attr('class','modal-section text-center')
|
||||
.append('h3')
|
||||
.call(t.append('splash.welcome'));
|
||||
|
||||
@@ -53,8 +62,7 @@ export function uiSplash(context) {
|
||||
.append('p')
|
||||
.html(t.html('splash.text', {
|
||||
version: context.version,
|
||||
website: { html: '<a target="_blank" href="https://github.com/openstreetmap/iD/blob/develop/CHANGELOG.md#whats-new">' + t.html('splash.changelog') + '</a>' },
|
||||
github: { html: '<a target="_blank" href="https://github.com/openstreetmap/iD/issues">github.com</a>' }
|
||||
idWiki: { html: `<a target="_blank" href="https://wiki.openstreetmap.org/wiki/iD">OSM's iD Editor</a>` },
|
||||
}));
|
||||
|
||||
modalSection
|
||||
@@ -73,23 +81,23 @@ export function uiSplash(context) {
|
||||
.append('div')
|
||||
.attr('class', 'modal-actions');
|
||||
|
||||
let walkthrough = buttonWrap
|
||||
.append('button')
|
||||
.attr('class', 'walkthrough')
|
||||
.on('click', () => {
|
||||
context.container().call(uiIntro(context));
|
||||
modalSelection.close();
|
||||
});
|
||||
// let walkthrough = buttonWrap
|
||||
// .append('button')
|
||||
// .attr('class', 'walkthrough')
|
||||
// .on('click', () => {
|
||||
// context.container().call(uiIntro(context));
|
||||
// modalSelection.close();
|
||||
// });
|
||||
|
||||
walkthrough
|
||||
.append('svg')
|
||||
.attr('class', 'logo logo-walkthrough')
|
||||
.append('use')
|
||||
.attr('xlink:href', '#iD-logo-walkthrough');
|
||||
// walkthrough
|
||||
// .append('svg')
|
||||
// .attr('class', 'logo logo-walkthrough')
|
||||
// .append('use')
|
||||
// .attr('xlink:href', '#iD-logo-walkthrough');
|
||||
|
||||
walkthrough
|
||||
.append('div')
|
||||
.call(t.append('splash.walkthrough'));
|
||||
// walkthrough
|
||||
// .append('div')
|
||||
// .call(t.append('splash.walkthrough'));
|
||||
|
||||
let startEditing = buttonWrap
|
||||
.append('button')
|
||||
|
||||
Reference in New Issue
Block a user