Skip to content

Commit

Permalink
FIX: Syntax and settings issues (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkshine authored Jan 8, 2024
1 parent 9808dc0 commit c5ca2de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion javascripts/discourse/components/modal/insert-jitsi.gjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/*eslint no-undef:0 */

import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import { Input } from "@ember/component";
import { action } from "@ember/object";
import DButton from "discourse/components/d-button";
import DModal from "discourse/components/d-modal";
import TextField from "discourse/components/text-field";
import themePrefix from "discourse/helpers/theme-prefix";
import i18n from "discourse-common/helpers/i18n";

export default class InsertJitsi extends Component {
Expand Down
5 changes: 2 additions & 3 deletions javascripts/discourse/initializers/insert-jitsi.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*eslint no-undef:0 */
/* global JitsiMeetExternalAPI */
import themePrefix from "discourse/helpers/theme-prefix";
import loadScript from "discourse/lib/load-script";
import { withPluginApi } from "discourse/lib/plugin-api";
import { iconHTML } from "discourse-common/lib/icon-library";
Expand Down Expand Up @@ -75,10 +75,9 @@ export default {
withPluginApi("0.8.31", (api) => {
const currentUser = api.getCurrentUser();
const modal = api.container.lookup("service:modal");
const settings = api.container.lookup("site-settings:main");

if (settings.show_in_options_dropdown) {
if (settings.only_available_to_staff && currentUser?.staff) {
if (!settings.only_available_to_staff || currentUser?.staff) {
api.addComposerToolbarPopupMenuOption({
icon: settings.button_icon,
label: themePrefix("composer_title"),
Expand Down

0 comments on commit c5ca2de

Please sign in to comment.