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
4 changes: 0 additions & 4 deletions .eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("@discourse/lint-configs/eslint");
1 change: 0 additions & 1 deletion .prettierrc

This file was deleted.

1 change: 1 addition & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("@discourse/lint-configs/prettier");
1 change: 1 addition & 0 deletions .template-lintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("@discourse/lint-configs/template-lint");
4 changes: 0 additions & 4 deletions .template-lintrc.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { locationFormat } from "../lib/location-utilities";
import { default as computed } from "discourse-common/utils/decorators";
import Component from "@ember/component";
import { inject as service } from "@ember/service";
import $ from "jquery";
import { default as computed } from "discourse-common/utils/decorators";
import AddLocationComponent from "../components/modal/add-location";
import { locationFormat } from "../lib/location-utilities";

export default Component.extend({
modal: service(),
classNames: ["location-label"],

didInsertElement() {
this._super(...arguments);
$(".title-and-category").toggleClass(
"location-add-no-text",
this.get("iconOnly")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import Component from "@glimmer/component";
import I18n from "I18n";
import { tracked } from "@glimmer/tracking";
import { action, computed } from "@ember/object";
import { inject as service } from "@ember/service";
import { tracked } from "@glimmer/tracking";
import I18n from "I18n";
import LocationForm from "./location-form";

export default class CustomWizardFieldLocationComponent extends Component {
@service siteSettings;
Expand Down Expand Up @@ -125,4 +126,21 @@ export default class CustomWizardFieldLocationComponent extends Component {
searchError(error) {
this.flash = error;
}

<template>
<LocationForm
@street={{this.street}}
@neighbourhood={{this.neighbourhood}}
@postalcode={{this.postalcode}}
@city={{this.city}}
@state={{this.state}}
@countrycode={{this.countrycode}}
@geoLocation={{this.geoLocation}}
@rawLocation={{this.rawLocation}}
@inputFields={{this.inputFields}}
@searchOnInit={{this.searchOnInit}}
@setGeoLocation={{this.setGeoLocation}}
@searchError={{this.searchError}}
/>
</template>
}

This file was deleted.

21 changes: 21 additions & 0 deletions assets/javascripts/discourse/components/geo-location-result.gjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import Component from "@ember/component";
import { fn } from "@ember/helper";
import { on } from "@ember/modifier";
import geoLocationFormat from "../helpers/geo-location-format";

export default class GeoLocationResultComponent extends Component {
<template>
<li class="location-form-result {{if @location.selected 'selected'}}">
<label {{on "click" (fn @updateGeoLocation @location false)}}>
{{geoLocationFormat @location @geoAttrs}}
{{#if this.showType}}
{{#if @location.type}}
<div class="location-type">/
{{@location.type}}
</div>
{{/if}}
{{/if}}
</label>
</li>
</template>
}

This file was deleted.

Loading
Loading