mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 06:04:11 +08:00
DEV: Fix various frontend warnings (#17122)
3 computed property overrides and a tippy warning
This commit is contained in:
parent
f27f95b2e9
commit
79d3b25d97
|
@ -80,12 +80,18 @@ export default class DiscoursePopover extends Component {
|
|||
},
|
||||
};
|
||||
|
||||
const target = document
|
||||
.getElementById(this.componentId)
|
||||
.querySelector(
|
||||
':scope > .d-popover-trigger, :scope > .btn, :scope > [role="button"]'
|
||||
);
|
||||
|
||||
if (!target) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const instance = tippy(
|
||||
document
|
||||
.getElementById(this.componentId)
|
||||
.querySelector(
|
||||
':scope > .d-popover-trigger, :scope > .btn, :scope > [role="button"]'
|
||||
),
|
||||
target,
|
||||
Object.assign({}, baseOptions, this.options || {})
|
||||
);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
type="file"
|
||||
multiple="true"
|
||||
accept=".png,.gif">
|
||||
{{d-button class="btn-primary" computedLabel=buttonLabel icon="plus" action=(action "chooseFiles") disabled=uploading}}
|
||||
{{d-button class="btn-primary" translatedLabel=buttonLabel icon="plus" action=(action "chooseFiles") disabled=uploading}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -269,7 +269,7 @@ export function applyDefaultHandlers(pretender) {
|
|||
return response(fixturesByUrl["/search.json"]);
|
||||
} else if (request.queryParams.q === "discourse visited") {
|
||||
const obj = JSON.parse(JSON.stringify(fixturesByUrl["/search.json"]));
|
||||
obj.topics.firstObject.visited = true;
|
||||
obj.topics.firstObject.last_read_post_number = 1;
|
||||
return response(obj);
|
||||
} else if (
|
||||
request.queryParams.q === "discourse in:personal" ||
|
||||
|
|
|
@ -19,9 +19,7 @@ discourseModule("Integration | Component | d-navigation", function (hooks) {
|
|||
const categories = this.site.categoriesList
|
||||
.filter((category) => !category.parent_category_id)
|
||||
.slice(0, 4);
|
||||
this.site.setProperties({
|
||||
categoriesList: categories,
|
||||
});
|
||||
this.site.setProperties({ categories });
|
||||
this.currentUser.set(
|
||||
"indirectly_muted_category_ids",
|
||||
categories.slice(0, 3).map((category) => category.id)
|
||||
|
|
Loading…
Reference in New Issue
Block a user