Skip to content

Commit

Permalink
feat(interface/settings): categorize and translate showFriendly check…
Browse files Browse the repository at this point in the history
…box (#417)
  • Loading branch information
PierreDemailly authored Aug 15, 2024
1 parent 4a553f1 commit c2960f4
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 10 deletions.
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

0 comments on commit c2960f4

Please sign in to comment.