Skip to content
Merged
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]>
  • Loading branch information
artonge committed May 4, 2023
commit 059ed1ddc89574f31533b8c5af0364a07f7ac374

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.

11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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