Skip to content

Commit

Permalink
fix(deps): Readd fixed style import from nextcloud/dialogs
Browse files Browse the repository at this point in the history
`@nextcloud/dialogs` requires importing styles.
But we use nextcloud dialogs in 60+ modules, it is easy to forgot import styles each time.
Importing styles once per entry point is enough to use dialogs on the entry point.

In this commit, styles are imported only in entry points were they are needed by a manual check.

- Imported via common `init.js`
  - main: `main.js`
  - files-sidebar: `mainFilesSidebar.js + mainFilesSidebarLoader.js`
  - public-share-auth-sidebar: `mainPublicShareAuthSidebar.js`
  - public-share-sidebar: `mainPublicShareSidebar.js`
- Imported manually
  - maps: `maps.js`
  - deck: `deck.js`
  - admin-settings: `mainAdminSettings.js`
  - recording: `mainRecording.js`
- Don't use `@nextcloud/dialogs`:
  - dashboard: `dashboard.js`
  - flow: `flow.js`
  - collections: `collections.js`

Signed-off-by: Joas Schilling <coding@schilljs.com>
Co-authored-by: Grigorii K. Shartsev <me@shgk.me>
  • Loading branch information
nickvergessen and ShGKme committed Nov 15, 2023
1 parent deeb0c9 commit 0c9599e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/deck.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ import RoomSelector from './components/RoomSelector.vue'
import { fetchConversation } from './services/conversationsService.js'
import { postRichObjectToConversation } from './services/messagesService.js'

import '@nextcloud/dialogs/style.css'

(function(OC, OCA, t, n) {
/**
* @param {object} card The card object given by the deck app
Expand Down
2 changes: 2 additions & 0 deletions src/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import BrowserStorage from './services/BrowserStorage.js'
import { EventBus } from './services/EventBus.js'
import store from './store/index.js'

import '@nextcloud/dialogs/style.css'

if (!window.OCA.Talk) {
window.OCA.Talk = {}
}
Expand Down
2 changes: 2 additions & 0 deletions src/mainAdminSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import Vue from 'vue'

import AdminSettings from './views/AdminSettings.vue'

import '@nextcloud/dialogs/style.css'

Vue.prototype.t = t
Vue.prototype.n = n
Vue.prototype.OC = OC
Expand Down
2 changes: 2 additions & 0 deletions src/mainRecording.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ import {
signalingKill,
} from './utils/webrtc/index.js'

import '@nextcloud/dialogs/style.css'

// Leaflet icon patch
import 'leaflet-defaulticon-compatibility/dist/leaflet-defaulticon-compatibility.webpack.css' // Re-uses images from ~leaflet package
import 'leaflet/dist/leaflet.css'
Expand Down
2 changes: 2 additions & 0 deletions src/maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import RoomSelector from './components/RoomSelector.vue'

import { postRichObjectToConversation } from './services/messagesService.js'

import '@nextcloud/dialogs/style.css'

(function(OC, OCA, t, n) {
/**
* @param {object} location Geo location object
Expand Down

0 comments on commit 0c9599e

Please sign in to comment.