Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed styling on "Commit selected" page #1028

Merged
merged 2 commits into from
Aug 3, 2020
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
3 changes: 2 additions & 1 deletion src/historyView/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export function transform(

export function getIconObject(iconName: string): { light: Uri; dark: Uri } {
// XXX Maybe use full path to extension?
const iconsRootPath = path.join(__dirname, "..", "..", "icons");
// Path needs to be relative from out/
const iconsRootPath = path.join(__dirname, "..", "icons");
const toUri = (theme: string) =>
Uri.file(path.join(iconsRootPath, theme, `${iconName}.svg`));
return {
Expand Down
1 change: 1 addition & 0 deletions src/resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { PropStatus, Status } from "./common/types";
import { memoize } from "./decorators";
import { configuration } from "./helpers/configuration";

// Path needs to be relative from out/
const iconsRootPath = path.join(__dirname, "..", "icons");

function getIconUri(iconName: string, theme: string): Uri {
Expand Down
1 change: 1 addition & 0 deletions src/uri.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export function toSvnUri(
}

export function getIconUri(iconName: string, theme: string): Uri {
// Path needs to be relative from out/
const iconsRootPath = path.join(__dirname, "..", "icons");
return Uri.file(path.join(iconsRootPath, theme, `${iconName}.svg`));
}
4 changes: 3 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const IGNORED = ['jschardet', 'iconv-lite', 'iconv-lite-umd', './vscodeModules']
/**@type {import('webpack').Configuration}*/
const config = {
target: 'node', // vscode extensions run in a Node.js-context 📖 -> https://webpack.js.org/configuration/node/

node: {
__dirname: false
},
entry: './src/extension.ts', // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/
output: {
// the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/
Expand Down