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

feat(interface/settings): categorize and translate showFriendly checkbox #417

Merged
merged 1 commit into from
Aug 15, 2024
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
4 changes: 3 additions & 1 deletion i18n/english.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ const ui = {
save: "save",
defaultPannel: "Default Package Menu",
warnings: "SAST Warnings to ignore",
flags: "Flags (emojis) to ignore"
flags: "Flags (emojis) to ignore",
network: "Network",
showFriendly: "Show friendly dependencies"
},
shortcuts: {
title: "Shortcuts",
Expand Down
4 changes: 3 additions & 1 deletion i18n/french.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ const ui = {
save: "sauvegarder",
defaultPannel: "Panneau par défaut",
warnings: "Avertissements à ignorer",
flags: "Drapeau (emojis) à ignorer"
flags: "Drapeau (emojis) à ignorer",
network: "Réseau",
showFriendly: "Afficher les dépendances amicales"
},
shortcuts: {
title: "Raccourcis",
Expand Down
2 changes: 1 addition & 1 deletion public/components/package/header/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class PackageHeader {
const {
name: packageName,
version: packageVersion,
description: packageDescription,
description: packageDescription = "",
licenses,
repository,
flags
Expand Down
15 changes: 15 additions & 0 deletions public/components/views/settings/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@
margin-left: 10px;
}

#settings--view>form .line select {
margin-left: 10px;
}

#settings--view>form .line input[type="checkbox"] {
margin-left: 0;
}

#settings--view>form .line>div+div {
margin-top: 5px;
}
Expand Down Expand Up @@ -159,3 +167,10 @@ select {
color: #0c5a9b;
}

.settings-line-title {
font-size: 15px;
color: #4a5e68;
letter-spacing: 0.5px;
margin: 30px 0 6px;
font-weight: bold;
}
12 changes: 5 additions & 7 deletions views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ <h1><i class="icon-cog"></i>[[=z.token('settings.general.title')]]</h1>
<option value="vulnerabilities">[[=z.token('package_info.navigation.vulnerabilities')]]</option>
<option value="licenses" selected>[[=z.token('package_info.navigation.licenses')]]</option>
</select>
<p class="settings-line-title">[[=z.token('settings.general.network')]]:</p>
<div>
<input type="checkbox" id="show-friendly" name="show-friendly"/>
<label for="show-friendly">[[=z.token('settings.general.showFriendly')]]</label>
</div>
</div>
<div class="line">
<p>[[=z.token('settings.general.warnings')]]:</p>
Expand Down Expand Up @@ -256,13 +261,6 @@ <h1><i class="icon-cog"></i>[[=z.token('settings.general.title')]]</h1>
<label for="flags">🎭 isDuplicate</label>
</div>
</div>

<hr>

<div>
<input type="checkbox" id="show-friendly" name="show-friendly"/>
<label for="show-friendly">Show friendly dependencies</label>
</div>
</form>
<button class="save">[[=z.token('settings.general.save')]]</button>
<div class="line">
Expand Down
Loading