Skip to content

Commit

Permalink
Merge branch 'dangeredwolf:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectronicsArchiver authored Jun 4, 2022
2 parents 373188f + aace020 commit 7332b41
Show file tree
Hide file tree
Showing 202 changed files with 4,345 additions and 5,623 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@
dist
ModernDeck_app_tmp
ModernDeck_ext_tmp
common/assets/moderndeck.js
common/assets/moderndeck.js.map
node_modules
.DS_Store
*/.DS_Store
*/*/.DS_Store
*.log
*.appx
default.*
common/assets/moderndeck.js.map
common/assets/moderndeck.js
3 changes: 0 additions & 3 deletions build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ function minifyExt() {
.on('data', item => minifyItem(item.path))
.on('end', () => {
console.info("Searched for files to minify");
//console.info("Removing csscomponents...");

//fs.removeSync(tmpDirExt + "/sources/csscomponents");

makeChromeExt();
})
Expand Down
2 changes: 0 additions & 2 deletions build/donors.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ a[data-user-name="ModernDeck"] .fullname:after,
content:"\f003";
font-size:20px;
font-style:normal;
-webkit-font-smoothing:antialiased;
text-rendering:optimizeLegibility;
-moz-osx-font-smoothing:grayscale;
vertical-align:middle;
padding-left:3px;
font-family:MD!important
Expand Down
13 changes: 3 additions & 10 deletions build/incrementBuild.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
const fs = require("fs");
const path = require("path");

let thePath = path.format({
dir: __dirname + path.sep + ".." + path.sep + "src",
base: "buildId.ts"
});

let buildFile = fs.readFileSync(thePath) + "";
let ver = parseInt(buildFile.match(/\d+/g)[0]);
let ver = require("../src/BuildProps.json").buildId;
ver++;
fs.writeFileSync(thePath,"export default " + ver++ + ";")

let thePath2 = path.format({
let thePath = path.format({
dir: __dirname + path.sep + ".." + path.sep + "src",
base: "BuildProps.json"
});
Expand All @@ -22,4 +15,4 @@ const buildProps = {
buildVersion: require("../package.json").version
}

fs.writeFileSync(thePath2, JSON.stringify(buildProps))
fs.writeFileSync(thePath, JSON.stringify(buildProps))
34 changes: 31 additions & 3 deletions build/updatei18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@ let buildFile = fs.readFileSync(i18n) + "\n" + fs.readFileSync(i18nMD) + "";
let buildFileMain = fs.readFileSync(i18nMain) + "";

let langMap = ["src","af","bg","ca","zh_CN","zh_TW","hr","cs","da","nl","en","en_CA","en_GB","en_US","et","fi","fr","fr_CA","de","el","hi","hu","it","ja","ko","mi","no","pl","pt","pt_BR","ro","ru","sr","es","es_AR","es_419","es_US","sv","tr","uk","vi","eo","gd","si","sl","lv","id"];
let newFormatMap = {};

function processFile(file) {
langMap.forEach(lang => {
if (lang !== "src") {
newFormatMap[lang] = {};
}
})

function processFile(file, newFormat) {
let newObj = {};

file.split("\n").forEach((a, j) => {
Expand All @@ -46,7 +53,9 @@ function processFile(file) {
let arr = a.replace(/\"\,\"/g,"\"=,=\"").replace(/\\n/g,"\n").replace(/\=\"\"/g,"=\"").replace(/\"\" /g,"\" ").replace(/\"\"\>/g,"\">").replace(/ \"\"/g," \"").replace(/\"\" /g,"\" ").split("=,=");
if (arr[0]) {
let key = arr[0].substr(1, arr[0].length-2);
newObj[key] = {};
if (!newFormat) {
newObj[key] = {};
}
for (let i = 1; i < langMap.length; i++) {
if (arr[i]) {

Expand All @@ -55,7 +64,12 @@ function processFile(file) {
}

if (arr[i].length > 1) {
newObj[key][langMap[i]] = arr[i].substr(1, arr[i].length-2).replace(/\"\"/g,"\"");
if (newFormat) {
newFormatMap[langMap[i]][key] = arr[i].substr(1, arr[i].length-2).replace(/\"\"/g,"\"");
} else {
newObj[key][langMap[i]] = arr[i].substr(1, arr[i].length-2).replace(/\"\"/g,"\"");
}

}
} else {
console.log("Language array missing items: Line " + j + " Column " + i + "\nSource string: " + arr[0] + "\nThe language data may be corrupted. This can be caused by unescaped newlines.")
Expand All @@ -70,6 +84,20 @@ function processFile(file) {
fs.writeFileSync(results,"export default " + JSON.stringify(processFile(buildFile)));
fs.writeFileSync(resultsMain,"exports.default = " + JSON.stringify(processFile(buildFileMain)));

processFile(buildFile, true);

langMap.forEach(lang => {
if (lang !== "src") {
let thePath = path.format({
dir:__dirname + path.sep + ".." + path.sep + "src" + path.sep + "I18n" + path.sep + "Data",
base:lang + ".json"
});

fs.writeFileSync(thePath, JSON.stringify(newFormatMap[lang]));

}
})

// Crowdin is stupid and doesn't export the correct folders

try {
Expand Down
File renamed without changes.
Binary file added common/assets/audio/notify.aac
Binary file not shown.
159 changes: 159 additions & 0 deletions common/assets/css/components/alert.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
/*
alert.css
Copyright (c) 2014-2022 dangered wolf, et al
Released under the MIT License
*/

.mdl.mtd-alert {
min-height:200px!important;
width:400px!important;
padding:0 24px;
overflow-y:auto!important;
height:auto!important;
max-height:500px!important;
}

.mtd-alert-button {
font-size:15px;
float:right!important;
margin:16px;
padding:10px 13px;
margin-left:0;
}

.mtd-alert-button-container {
position:absolute;
bottom:14px;
right:10px
}

.mtd-alert-title {
font-size:20px;
font-weight:700
}

.mtd-alert-button.mtd-alert-button-secondary {
background:transparent!important;
box-shadow:none;
color:var(--secondaryColor)!important
}

html .login-container>.mdl.mtd-language-picker {
left:50%;
margin-left:-224px!important;
top:50%;
margin-top:-100px!important;
background:#fff;
color:#222;
}

html .login-container>.mdl.mtd-language-picker .mtd-alert-button {
color:#fff
}

.login-container #mtd_language_select,.login-container option {
background:#fff;
color:#333!important
}

.login-container #mtd_language_select:placeholder {
color:#333!important
}

.mtd-alert.mtd-language-picker {
padding: 100px 100px 50px 100px
}

.mtd-alert.mtd-language-picker .mtd-alert-body {
margin-top:150px;
margin-left:25px;
}

.mtd-alert.mtd-language-picker .mtd-unsupported-lang {
margin-left:-16px;
text-align:center
}

.mtd-language-hello {
position:absolute;
top:70px;
left:70px;
font-size:40px
}

.mtd-language-hello:nth-child(2) {
top:170px;
right:140px;
left:initial
}

.mtd-language-hello:nth-child(3) {
top:190px;
left:170px;
font-size:32px
}

.mtd-language-hello:nth-child(4) {
top:130px;
left:240px;
opacity:0.9;
font-size:32px
}

.mtd-language-hello:nth-child(5) {
top:120px;
left:420px;
opacity:0.8;
font-size:28px
}

.mtd-language-hello:nth-child(6) {
top:70px;
right:240px;
left:initial;
opacity:0.6;
font-size:28px
}

.mtd-language-hello:nth-child(7) {
top:50px;
right:80px;
left:initial;
font-size:32px
}

.mtd-language-hello:nth-child(8) {
top:130px;
left:120px;
opacity:0.8;
font-size:20px
}

.mtd-language-hello:nth-child(9) {
top:130px;
left:340px;
opacity:0.7;
font-size:20px
}

.mtd-language-hello:nth-child(10) {
top:90px;
left:200px;
opacity:0.7;
font-size:20px
}

.mtd-language-hello:nth-child(11) {
top:40px;
left:170px;
opacity:0.7;
font-size:24px
}

.mtd-language-hello:nth-child(12) {
top:170px;
left:90px;
opacity:0.7;
font-size:18px
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ fieldset
select
{
-webkit-appearance:menulist;
-moz-appearance:menulist
appearance:menulist
}

input:before,textarea:before,select:before
{
-webkit-appearance:initial;
-moz-appearance:initial;
appearance:initial;
color:#ddd
}

Expand All @@ -118,19 +118,19 @@ dir
{
margin:0;
padding-left:0;
-webkit-padding-start:0;
padding-left:0;
-webkit-appearance:none;
-moz-appearance:none
appearance:none
}

ol ul,
ul ol,
ul ul,
ol ol
{
-webkit-margin-before:0;
-webkit-margin-after:0;
-webkit-padding-start:40px
margin-top:0;
margin-bottom:0;
padding-left:40px
}

body,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ i {
vertical-align:middle;
font-size:20px;
height:1em;
width:1em
width:1em;
font-variation-settings:
'FILL' 1,
'wght' 500,
'GRAD' 200,
'opsz' 48
}

.dropdown-menu a[data-action]:before,
.icon:before,
.Icon:before,
Expand All @@ -23,9 +27,7 @@ i {
{
content:" ";
font-style:normal;
-webkit-font-smoothing:antialiased;
text-rendering:optimizeLegibility;
-moz-osx-font-smoothing:grayscale;
letter-spacing:normal;
word-wrap:normal;
direction:ltr;
Expand Down Expand Up @@ -258,8 +260,7 @@ a[data-action="undo-retweet"]:before,

input[type="checkbox"]:before,.icon-toggle-off:before,.Icon--toggle-off:before {
content:"\e835";
font-family:Material
}
font-family:Material;}

input[type="checkbox"]:checked:before,.icon-toggle-on:before,.Icon--toggle-on:before {
content:"\e834"
Expand Down
File renamed without changes.
Loading

0 comments on commit 7332b41

Please sign in to comment.