Skip to content

Commit

Permalink
Update 1.4.0 Alpha
Browse files Browse the repository at this point in the history
- Added Grid and List views to library
- Added Collections (cannot be deleted yet)
- Added Sorting to Library
- Fixed overriding default preferences when loading an incomplete settings file
- Updated RestoreBackup?'s banner
- Added Context Menus in Library
- Added Create New Collection window
  • Loading branch information
RichardKanshen committed Mar 22, 2024
1 parent ed2b0da commit 21f298f
Show file tree
Hide file tree
Showing 42 changed files with 227,406 additions and 160 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
release:
runs-on: windows-latest

environment: windows
steps:
- name: Check out Git repository
uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion 418.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</head>
<body>
<span>i'm a coffeepot</span>
<div class="material-symbols-outlined" id="coffee">coffee</div>
<div class="material-symbols" id="coffee">coffee</div>
<span>and you don't have internet</span>
</body>
<script>document.querySelector('html').classList.add(parent.document.querySelector("html").classList.contains('dark') ? 'dark' : 'light')</script>
Expand Down
35 changes: 35 additions & 0 deletions animations.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@keyframes fail {
0% {
opacity: 1
}
50%{
opacity: 0
}
}

@keyframes pulse {
0% {
transform: scale(1)
}
5% {
transform: scale(1.25)
}
25% {
transform: scale(1)
}
35% {
transform: scale(1.25)
}
60% {
transform: scale(1)
}
}

@keyframes cfbcnfbackground {
0% {
background-color: #6495ed;
}
100% {
background-color: #404;
}
}
12 changes: 2 additions & 10 deletions askToQuit.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import url("./fonts/fonts.css");
@import url("./animations.css");

:root {
user-select: none;
Expand Down Expand Up @@ -51,16 +52,7 @@ div#title {

html {
color: white;
animation: updateBackground 5s both infinite alternate;
}

@keyframes updateBackground {
0% {
background-color: #6495ed;
}
100% {
background-color: #404;
}
animation: cfbcnfbackground 5s both infinite alternate;
}

div#quitConfirm {
Expand Down
131 changes: 131 additions & 0 deletions collectionPrompt.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
@import url("./fonts/fonts.css");
@import url("./animations.css");

:root {
user-select: none;
-webkit-user-select: none;
}

div#window {
height: 40px;
width: -webkit-fill-available;
display: flex;
justify-content: space-between;
align-items: center;
-webkit-app-region: drag;
flex-direction: row;
flex-wrap: nowrap;
}


div#window>div#title>div#windowlogo {
font-family: 'Montserrat';
font-size: 24px;
font-weight: 700;
letter-spacing: 1px;
width: 30px;
user-select: none;
-webkit-user-select: none;
padding-right: 10px;
}

div#window>div#title>div#windowtitle {
font-family: 'Uni Sans CAPS', 'Montserrat';
font-size: 14px;
font-weight: 700;
user-select: none;
-webkit-user-select: none;
text-transform: uppercase;
}

body {
margin: 0;
}

div#title {
display: flex;
align-items: center;
flex-direction: row;
justify-content: center;
width: -webkit-fill-available;
}

html {
color: white;
animation: cfbcnfbackground 5s both infinite alternate;
}

div#prompt {
display: flex;
flex-direction: column;
align-items: center;
align-content: space-around;
justify-content: space-evenly;
flex-wrap: wrap;
height: calc(100% - 40px);
font-family: 'Montserrat';
font-weight: 700;
}

div#choices {
height: 30px;
width: 90%;
display: flex;
flex-direction: row;
justify-content: space-around;
}

div.choice {
height: 30px;
width: 45%;
border: 2.5px white solid;
border-radius: 16px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
transition: background-color 0.125s ease-in-out;
}

div.choice:hover {
cursor: pointer;
background-color: rgba(255, 255, 255, 0.404);
}

choiceicon {
font-size: 72px !important;
margin-bottom: 12px;
}

choicetext {
font-size: 12px;
}

input#collectionNameInput {
all: unset;
height: 30px;
width: calc(100% - 20px);
border: 2.5px white solid;
border-radius: 16px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-bottom: 10px;
padding: 0px 10px;
}

span#error {
display: flex;
align-items: center;
justify-content: center;
}

span#error>span.material-symbols {
margin-right: 8px;
}

span#error>span#errorText {
font-size: 12px;
max-width: 300px;
}
29 changes: 29 additions & 0 deletions collectionPrompt.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<html>
<head>
<link rel="stylesheet" href="collectionPrompt.css">
<title>create a new collection</title>
</head>
<body>
<div id="window">
<div id="title">
<div id="windowlogo">××</div><div id="windowtitle">deadforge</div></div>
</div>
</div>
<div id="prompt">
<div id="promptmessage">What is the name of the collection?</div>
<div id="promptinput">
<input id="collectionNameInput" type="text" minlength="1" maxlength="32" size="32" autofocus oninput="this.value.length < 1 ? document.querySelector('#error').innerHTML = '<span class=\'material-symbols\'>error</span><span id=\'errorText\'>Collection name cannot be of length 0.</span>' : document.querySelector('span#error').innerHTML = '<span class=\'material-symbols\'></span><span id=\'errorText\'></span>'">
<span id="error"><span class='material-symbols'></span><span id='errorText'></span></span>
</div>
<div id="choices">
<div class="choice" id="choicenow" onclick="cancelPrompt()">
<choicetext>Cancel</choicetext>
</div>
<div class="choice" id="choiceclose" onclick="confirmPrompt(document.querySelector('#collectionNameInput').value)">
<choicetext>Confirm</choicetext>
</div>
</div>
</div>
</body>
<script src="collectionPrompt.js"></script>
</html>
21 changes: 21 additions & 0 deletions collectionPrompt.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const { BrowserWindow } = require('@electron/remote');
const { ipcRenderer } = require('electron');

const error = document.querySelector('span#error');

function cancelPrompt() {
ipcRenderer.send('collectionPrompt', "cancel");
}

function confirmPrompt(name) {
if (name.length < 1) {
error.querySelector('span#errorText').textContent = "Collection name cannot be of length 0.";
return;
}
ipcRenderer.send('collectionPrompt', "confirm", name);
}

ipcRenderer.on('error', (event, err) => {
error.querySelector('span#errorText').textContent = err;
error.querySelector('span.material-symbols').textContent = 'error';
})
Loading

0 comments on commit 21f298f

Please sign in to comment.