Skip to content

Commit

Permalink
Merge pull request #118 from paviliondev/fix_linting_test_and_remove_…
Browse files Browse the repository at this point in the history
…jquery

DEV: significant JS maintenance release
  • Loading branch information
merefield authored Nov 12, 2024
2 parents bc45690 + 08defc7 commit d051f88
Show file tree
Hide file tree
Showing 43 changed files with 4,722 additions and 13,583 deletions.
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

0 comments on commit d051f88

Please sign in to comment.