Skip to content
Closed
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
Use SVG icon for the sidebar tab
Signed-off-by: Louis Chemineau <[email protected]>
(cherry picked from commit 059ed1d)
Signed-off-by: Christopher Ng <[email protected]>
  • Loading branch information
artonge authored and Pytal committed May 13, 2023
commit 243faa5c061dd8a57ea0c90b29546d8d75181c47

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/activity-sidebar.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/activity-sidebar.js.map

Large diffs are not rendered by default.

70,317 changes: 35,164 additions & 35,153 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
]
},
"dependencies": {
"@mdi/svg": "^7.2.96",
"@nextcloud/auth": "^2.0.0",
"@nextcloud/axios": "^2.3.0",
"@nextcloud/dialogs": "^3.1.4",
Expand Down
6 changes: 4 additions & 2 deletions src/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
*/
import Vue from 'vue'
import { translate as t, translatePlural as n } from '@nextcloud/l10n'
// eslint-disable-next-line n/no-missing-import, import/no-unresolved
import LightningBolt from '@mdi/svg/svg/lightning-bolt.svg?raw'

Vue.prototype.t = t
Vue.prototype.n = n
Expand All @@ -36,7 +38,7 @@ let ActivityTabInstance = null
const activityTab = new OCA.Files.Sidebar.Tab({
id: 'activity',
name: t('activity', 'Activity'),
icon: 'icon-activity',
iconSvg: LightningBolt,

async mount(el, fileInfo, context) {
const { default: ActivityTab } = await import(/* webpackPreload: true */ './views/ActivityTab.vue')
Expand All @@ -61,7 +63,7 @@ const activityTab = new OCA.Files.Sidebar.Tab({
},
})

window.addEventListener('DOMContentLoaded', async function() {
window.addEventListener('DOMContentLoaded', async function () {
if (OCA.Files && OCA.Files.Sidebar) {
OCA.Files.Sidebar.registerTab(activityTab)
const { default: ActivityTab } = await import(/* webpackPreload: true */ './views/ActivityTab.vue')
Expand Down
5 changes: 5 additions & 0 deletions webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,9 @@ webpackConfig.optimization = {
},
}

webpackConfig.module.rules.push({
resourceQuery: /raw/,
type: 'asset/source',
})

module.exports = webpackConfig