diff --git a/src/webviews/apps/home/home.html b/src/webviews/apps/home/home.html
index c75d829..bf5ed1e 100644
--- a/src/webviews/apps/home/home.html
+++ b/src/webviews/apps/home/home.html
@@ -2,12 +2,6 @@
-
@@ -16,8 +10,13 @@
-
#{endOfBody}
+
diff --git a/src/webviews/apps/home/home.ts b/src/webviews/apps/home/home.ts
index 912f8a6..10a9759 100644
--- a/src/webviews/apps/home/home.ts
+++ b/src/webviews/apps/home/home.ts
@@ -1,5 +1,6 @@
/*global window*/
import './home.scss';
+import { provideVSCodeDesignSystem, vsCodeButton, vsCodeDivider } from '@vscode/webview-ui-toolkit';
import { Disposable } from 'vscode';
import { getSubscriptionTimeRemaining, SubscriptionState } from '../../../subscription';
import { DidChangeSubscriptionNotificationType, State } from '../../home/protocol';
@@ -17,6 +18,13 @@ export class HomeApp extends App {
}
protected override onInitialize() {
+ provideVSCodeDesignSystem().register({
+ register: function (container: any, context: any) {
+ vsCodeButton().register(container, context);
+ vsCodeDivider().register(container, context);
+ },
+ });
+
this.$slot1 = document.getElementById('slot1') as HTMLDivElement;
this.$slot2 = document.getElementById('slot2') as HTMLDivElement;
diff --git a/src/webviews/apps/rebase/rebase.html b/src/webviews/apps/rebase/rebase.html
index aa92ad6..fddd89f 100644
--- a/src/webviews/apps/rebase/rebase.html
+++ b/src/webviews/apps/rebase/rebase.html
@@ -2,12 +2,6 @@
-
@@ -46,5 +40,11 @@
#{endOfBody}
+
diff --git a/src/webviews/apps/settings/partials/blame.html b/src/webviews/apps/settings/partials/blame.html
index a788f37..c5002d1 100644
--- a/src/webviews/apps/settings/partials/blame.html
+++ b/src/webviews/apps/settings/partials/blame.html
@@ -186,41 +186,49 @@
class="image__preview hidden"
src="#{webroot}/media/blame.webp"
data-visibility="blame.compact =false"
+ loading="lazy"
/>
diff --git a/src/webviews/apps/settings/partials/changes.html b/src/webviews/apps/settings/partials/changes.html
index 9205666..2633807 100644
--- a/src/webviews/apps/settings/partials/changes.html
+++ b/src/webviews/apps/settings/partials/changes.html
@@ -85,16 +85,18 @@
diff --git a/src/webviews/apps/settings/partials/code-lens.html b/src/webviews/apps/settings/partials/code-lens.html
index 19c4218..a748854 100644
--- a/src/webviews/apps/settings/partials/code-lens.html
+++ b/src/webviews/apps/settings/partials/code-lens.html
@@ -252,53 +252,62 @@
diff --git a/src/webviews/apps/settings/partials/current-line.html b/src/webviews/apps/settings/partials/current-line.html
index 34e96d7..63aae3c 100644
--- a/src/webviews/apps/settings/partials/current-line.html
+++ b/src/webviews/apps/settings/partials/current-line.html
@@ -116,21 +116,24 @@
diff --git a/src/webviews/apps/settings/partials/heatmap.html b/src/webviews/apps/settings/partials/heatmap.html
index 68f6a0d..bb4dfe7 100644
--- a/src/webviews/apps/settings/partials/heatmap.html
+++ b/src/webviews/apps/settings/partials/heatmap.html
@@ -105,16 +105,18 @@
diff --git a/src/webviews/apps/settings/partials/hovers.html b/src/webviews/apps/settings/partials/hovers.html
index 4056302..5610feb 100644
--- a/src/webviews/apps/settings/partials/hovers.html
+++ b/src/webviews/apps/settings/partials/hovers.html
@@ -152,41 +152,48 @@
@@ -261,41 +268,49 @@
class="image__preview hidden"
src="#{webroot}/media/hovers-annotations.webp"
data-visibility="blame.compact =false"
+ loading="lazy"
/>
diff --git a/src/webviews/apps/settings/partials/modes.html b/src/webviews/apps/settings/partials/modes.html
index 2f858ad..f65edf6 100644
--- a/src/webviews/apps/settings/partials/modes.html
+++ b/src/webviews/apps/settings/partials/modes.html
@@ -65,16 +65,18 @@
diff --git a/src/webviews/apps/settings/partials/rebase-editor.html b/src/webviews/apps/settings/partials/rebase-editor.html
index 3b27965..5753c33 100644
--- a/src/webviews/apps/settings/partials/rebase-editor.html
+++ b/src/webviews/apps/settings/partials/rebase-editor.html
@@ -32,6 +32,7 @@
class="image__preview hidden"
src="#{webroot}/media/rebase-editor.webp"
data-visibility="rebaseEditor.enabled"
+ loading="lazy"
/>
diff --git a/src/webviews/apps/settings/partials/status-bar.html b/src/webviews/apps/settings/partials/status-bar.html
index 03d30ae..cb96289 100644
--- a/src/webviews/apps/settings/partials/status-bar.html
+++ b/src/webviews/apps/settings/partials/status-bar.html
@@ -149,26 +149,30 @@
diff --git a/src/webviews/apps/settings/partials/views.branches.html b/src/webviews/apps/settings/partials/views.branches.html
index 94734a4..257f52d 100644
--- a/src/webviews/apps/settings/partials/views.branches.html
+++ b/src/webviews/apps/settings/partials/views.branches.html
@@ -176,31 +176,37 @@
class="image__preview hidden"
src="#{webroot}/media/branches-view-compare+pr.webp"
data-visibility="views.branches.showBranchComparison !false & views.branches.pullRequests.enabled & views.branches.pullRequests.showForBranches"
+ loading="lazy"
/>
diff --git a/src/webviews/apps/settings/partials/views.commits.html b/src/webviews/apps/settings/partials/views.commits.html
index 83b02d6..20c99f7 100644
--- a/src/webviews/apps/settings/partials/views.commits.html
+++ b/src/webviews/apps/settings/partials/views.commits.html
@@ -210,102 +210,122 @@
class="image__preview hidden"
src="#{webroot}/media/commits-view-auto-compare+pr+commit-pr.webp"
data-visibility="views.commits.files.layout !tree & views.commits.showBranchComparison !false & views.commits.pullRequests.enabled & views.commits.pullRequests.showForBranches & views.commits.pullRequests.showForCommits"
+ loading="lazy"
/>
diff --git a/src/webviews/apps/settings/partials/views.contributors.html b/src/webviews/apps/settings/partials/views.contributors.html
index d8075db..ebec6fb 100644
--- a/src/webviews/apps/settings/partials/views.contributors.html
+++ b/src/webviews/apps/settings/partials/views.contributors.html
@@ -142,7 +142,7 @@
-
+
diff --git a/src/webviews/apps/settings/partials/views.file-history.html b/src/webviews/apps/settings/partials/views.file-history.html
index a9e70cb..342b5e4 100644
--- a/src/webviews/apps/settings/partials/views.file-history.html
+++ b/src/webviews/apps/settings/partials/views.file-history.html
@@ -78,11 +78,12 @@
diff --git a/src/webviews/apps/settings/partials/views.line-history.html b/src/webviews/apps/settings/partials/views.line-history.html
index 4aae1bc..a516c5f 100644
--- a/src/webviews/apps/settings/partials/views.line-history.html
+++ b/src/webviews/apps/settings/partials/views.line-history.html
@@ -43,11 +43,12 @@
diff --git a/src/webviews/apps/settings/partials/views.remotes.html b/src/webviews/apps/settings/partials/views.remotes.html
index 2a2ee37..c66c6b8 100644
--- a/src/webviews/apps/settings/partials/views.remotes.html
+++ b/src/webviews/apps/settings/partials/views.remotes.html
@@ -157,16 +157,19 @@
class="image__preview hidden"
src="#{webroot}/media/remotes-view-pr.webp"
data-visibility="views.remotes.pullRequests.enabled & views.remotes.pullRequests.showForBranches"
+ loading="lazy"
/>
diff --git a/src/webviews/apps/settings/partials/views.repositories.html b/src/webviews/apps/settings/partials/views.repositories.html
index 9ee9667..4aa2ccd 100644
--- a/src/webviews/apps/settings/partials/views.repositories.html
+++ b/src/webviews/apps/settings/partials/views.repositories.html
@@ -362,7 +362,7 @@
-
+
diff --git a/src/webviews/apps/settings/partials/views.searchAndCompare.html b/src/webviews/apps/settings/partials/views.searchAndCompare.html
index 116c39d..988bfa2 100644
--- a/src/webviews/apps/settings/partials/views.searchAndCompare.html
+++ b/src/webviews/apps/settings/partials/views.searchAndCompare.html
@@ -113,7 +113,7 @@
-
+
diff --git a/src/webviews/apps/settings/partials/views.stashes.html b/src/webviews/apps/settings/partials/views.stashes.html
index 80be545..4a7197e 100644
--- a/src/webviews/apps/settings/partials/views.stashes.html
+++ b/src/webviews/apps/settings/partials/views.stashes.html
@@ -116,11 +116,13 @@
class="image__preview hidden"
src="#{webroot}/media/stashes-view-auto.webp"
data-visibility="views.stashes.files.layout !tree"
+ loading="lazy"
/>
diff --git a/src/webviews/apps/settings/partials/views.tags.html b/src/webviews/apps/settings/partials/views.tags.html
index 79506a2..c0eb116 100644
--- a/src/webviews/apps/settings/partials/views.tags.html
+++ b/src/webviews/apps/settings/partials/views.tags.html
@@ -89,11 +89,13 @@
class="image__preview hidden"
src="#{webroot}/media/tags-view-list.webp"
data-visibility="views.tags.branches.layout !tree"
+ loading="lazy"
/>
diff --git a/src/webviews/apps/settings/partials/views.worktrees.html b/src/webviews/apps/settings/partials/views.worktrees.html
index e00ece5..76660d1 100644
--- a/src/webviews/apps/settings/partials/views.worktrees.html
+++ b/src/webviews/apps/settings/partials/views.worktrees.html
@@ -175,31 +175,37 @@
class="image__preview hidden"
src="#{webroot}/media/worktrees-view-compare+pr.webp"
data-visibility="views.worktrees.showBranchComparison !false & views.worktrees.pullRequests.enabled & views.worktrees.pullRequests.showForBranches"
+ loading="lazy"
/>
diff --git a/src/webviews/apps/settings/settings.html b/src/webviews/apps/settings/settings.html
index f94cc44..da80925 100644
--- a/src/webviews/apps/settings/settings.html
+++ b/src/webviews/apps/settings/settings.html
@@ -2,159 +2,8 @@
-
-
-
+
+
+
+
+
+
diff --git a/src/webviews/apps/welcome/welcome.html b/src/webviews/apps/welcome/welcome.html
index d1e765d..6a7f3a1 100644
--- a/src/webviews/apps/welcome/welcome.html
+++ b/src/webviews/apps/welcome/welcome.html
@@ -2,12 +2,6 @@
-
@@ -89,21 +83,24 @@
@@ -128,53 +125,62 @@
@@ -199,16 +205,18 @@
@@ -394,5 +402,11 @@
#{endOfBody}
+
diff --git a/webpack.config.js b/webpack.config.js
index 55758cb..19107f3 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -280,17 +280,6 @@ function getWebviewsConfig(mode, env) {
),
to: path.posix.join(__dirname.replace(/\\/g, '/'), 'dist', 'webviews'),
},
- {
- from: path.posix.join(
- __dirname.replace(/\\/g, '/'),
- 'node_modules',
- '@vscode',
- 'webview-ui-toolkit',
- 'dist',
- 'toolkit.min.js',
- ),
- to: path.posix.join(__dirname.replace(/\\/g, '/'), 'dist', 'webviews'),
- },
],
}),
];
@@ -522,6 +511,7 @@ function getHtmlPlugin(name, premium, mode, env) {
chunks: [name],
filename: path.join(__dirname, 'dist', 'webviews', `${name}.html`),
inject: true,
+ scriptLoading: 'module',
inlineSource: mode === 'production' ? '.css$' : undefined,
minify:
mode === 'production'
@@ -577,10 +567,10 @@ class InlineChunkHtmlPlugin {
compiler.hooks.compilation.tap('InlineChunkHtmlPlugin', compilation => {
const getInlinedTagFn = tag => this.getInlinedTag(publicPath, compilation.assets, tag);
-
+ const sortFn = (a, b) => (a.tagName === 'script' ? 1 : -1) - (b.tagName === 'script' ? 1 : -1);
this.htmlPlugin.getHooks(compilation).alterAssetTagGroups.tap('InlineChunkHtmlPlugin', assets => {
- assets.headTags = assets.headTags.map(getInlinedTagFn);
- assets.bodyTags = assets.bodyTags.map(getInlinedTagFn);
+ assets.headTags = assets.headTags.map(getInlinedTagFn).sort(sortFn);
+ assets.bodyTags = assets.bodyTags.map(getInlinedTagFn).sort(sortFn);
});
});
}