Skip to content

Commit

Permalink
update js-snackbar to v1.6, year to 2024 and some minor cosmetic tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianoc committed Jan 24, 2024
1 parent 3e85383 commit b7ac6f4
Show file tree
Hide file tree
Showing 15 changed files with 78 additions and 13 deletions.
6 changes: 3 additions & 3 deletions Cecilifier.Web/Pages/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<script src="~/js/release_notes.js"></script>

<!-- Snackbar -->
<link rel="stylesheet" href="~/lib/js-snackbar-1.5/dist/js-snackbar.min.css">
<script src="~/lib/js-snackbar-1.5/dist/js-snackbar.min.js"></script>
<link rel="stylesheet" href="~/lib/js-snackbar-1.6/dist/js-snackbar.min.css">
<script src="~/lib/js-snackbar-1.6/dist/js-snackbar.min.js"></script>

<!-- Tippy.js -->
<script src="https://unpkg.com/@@popperjs/core@2"></script>
Expand Down Expand Up @@ -122,7 +122,7 @@
<a class="fab fa-github" href="https://github.com/sponsors/adrianoc"target="_ghs_cecilifier"></a>
<a class="fab fa-discord" href="https://discord.gg/dhF5BCW"target="_pa_cecilifier"></a>
<span id="cecilifier-stats"><i class="fas fa-pie-chart"></i></span>
<span>| &copy; 2023 - Adriano Carlos Verona</span>
<span>| &copy; 2024 - Adriano Carlos Verona</span>
</div>
</div>
</footer>
Expand Down
2 changes: 2 additions & 0 deletions Cecilifier.Web/wwwroot/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ footer {
.tippy-box[data-theme~='cecilifier-tooltip'] {
font-weight: bold;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
a:link { color:rgb(188, 188, 3) };
a:visited { color:rgb(5, 156, 179) }
}

.tippy-box[data-theme~='assembly_references_tip'] {
Expand Down
2 changes: 1 addition & 1 deletion Cecilifier.Web/wwwroot/js/cecilifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ function setTooltips(version) {
allowHTML: true,
theme: 'cecilifier-tooltip',
delay: defaultDelay,
maxWidth: 550
maxWidth: 650
});

tippy('#report_internal_error_button', {
Expand Down

This file was deleted.

This file was deleted.

7 changes: 7 additions & 0 deletions Cecilifier.Web/wwwroot/lib/js-snackbar-1.6/.bablerc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"presets": [
"@babel/preset-env"
],
"comments": false
}

3 changes: 3 additions & 0 deletions Cecilifier.Web/wwwroot/lib/js-snackbar-1.6/.browserslist
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> 0.1%
not dead

2 changes: 2 additions & 0 deletions Cecilifier.Web/wwwroot/lib/js-snackbar-1.6/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Run Jest Tests

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm test
2 changes: 2 additions & 0 deletions Cecilifier.Web/wwwroot/lib/js-snackbar-1.6/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/

12 changes: 12 additions & 0 deletions Cecilifier.Web/wwwroot/lib/js-snackbar-1.6/.whitesource
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"scanSettings": {
"baseBranches": []
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure",
"displayMode": "diff"
},
"issueSettings": {
"minSeverityLevel": "LOW"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@
}

.js-snackbar__icon {
display: block;
display: flex;
justify-content: center;
align-items: center;
border: 2px solid white;
font-weight: bold;
border-radius: 20px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function SnackBar(userOptions) {
}

function createNewContainer(target) {
container = document.createElement("div");
var container = document.createElement("div");
container.classList.add("js-snackbar-container");

if (_Options.fixed) {
Expand All @@ -82,7 +82,7 @@ function SnackBar(userOptions) {
}

function getOrFindContainer() {
return typeof _Options.container === "object" ? _Options.container : document.getElementById(_Options.container);
return typeof _Options.container === "string" ? document.querySelector(_Options.container) : _Options.container;
}
}

Expand Down Expand Up @@ -347,3 +347,7 @@ function SnackBar(userOptions) {

_This.Open();
}

if (typeof module !== "undefined") {
module.exports = SnackBar;
}
Loading

0 comments on commit b7ac6f4

Please sign in to comment.