Compare commits

..

1 commit

Author SHA1 Message Date
Ruben van de Ven
99c786ced5 Tweaks for the final version on registration and theming 2024-04-11 19:46:07 +02:00
10 changed files with 25 additions and 14 deletions

View file

@ -65,7 +65,7 @@ App.propTypes = {
App.defaultProps = {
children: null,
language: null,
theme: 'light'
theme: 'dark'
};
const mapStateToProps = state => ({

View file

@ -11,8 +11,8 @@ const initialState = {
textOutput: false,
gridOutput: false,
soundOutput: false,
theme: 'light',
autorefresh: false,
theme: 'dark',
autorefresh: true,
language: 'en-US'
};

View file

@ -22,7 +22,7 @@ import FooterTabSwitcher from '../../components/mobile/TabSwitcher';
import FooterTab from '../../components/mobile/Tab';
import Loader from '../App/components/loader';
const EXAMPLE_USERNAME = process.env.EXAMPLE_USERNAME || 'p5';
const EXAMPLE_USERNAME = process.env.EXAMPLE_USERNAME || 'digitalplayground';
// @ghalestrilo 08/13/2020: I'm sorry
const ContentWrapper = styled(Content)`

View file

@ -1,4 +1,4 @@
$base-font-size: 12;
$base-font-size: 20;
//colors
$p5js-pink: #FFE117; /*DP Colours*/

View file

@ -1,6 +1,7 @@
.CodeMirror {
font-family: Inconsolata, monospace;
height: 100%;
font-size:$base-font-size !important;
}
.CodeMirror-linenumbers {

View file

@ -37,7 +37,7 @@
}
.form__label {
font-size: #{12 / $base-font-size}rem;
font-size: #{16 / $base-font-size}rem;
margin-top: #{25 / $base-font-size}rem;
margin-bottom: #{7 / $base-font-size}rem;
display: block;

View file

@ -158,7 +158,7 @@
color: getThemifyVariable('secondary-text-color');
}
margin-left: #{5 / $base-font-size}rem;
font-size: #{12 / $base-font-size}rem;
font-size: #{15 / $base-font-size}rem;
}
.toolbar__edit-name-button {

View file

@ -64,8 +64,8 @@ const userSchema = new Schema({
textOutput: { type: Boolean, default: false },
gridOutput: { type: Boolean, default: false },
soundOutput: { type: Boolean, default: false },
theme: { type: String, default: 'light' },
autorefresh: { type: Boolean, default: false },
theme: { type: String, default: 'dark' },
autorefresh: { type: Boolean, default: true },
language: { type: String, default: 'en-US' }
},
totalSize: { type: Number, default: 0 }

View file

@ -191,16 +191,26 @@ app.use('/api', (error, req, res, next) => {
// overview of users:
app.get('/users', (req, res) => {
User.collection.getIndexes().then((indexes) =>{
// hacky migration here
User.collection.getIndexes(({full: true})).then((indexes) =>{
console.log('indexes', indexes);
// migrate unique
indexes.forEach(function (index) {
if(index.name !=='email_1') return;
if(!index.unique) return;
console.log('Drop index!', index);
User.collection.dropIndex('email_1');
console.log('Recreate index!');
User.collection.createIndex({ email: 1 }, { collation: { locale: 'en', strength: 2 } });
});
})
// let results = [];
User.find({}).sort({ createdAt: -1 }).exec()
.then((users) => {
const usernames = users.map((user) => user.username);
// const usernames = users.map((user) => user.username);
let names = "<ul>";
usernames.forEach((username) => names += `<li><a href="/${username}/sketches">${username}</a></li>`);
users.forEach((user) => names += `<li><a href="/${user.username}/sketches">${user.username}</a> - ${user.createdAt.toGMTString()}</li>`);
names += "</ul>";
res.send(names);
});

View file

@ -29,7 +29,7 @@ export function renderIndex() {
window.process.env.CLIENT = true;
window.process.env.LOGIN_ENABLED = ${process.env.LOGIN_ENABLED === 'false' ? false : true};
window.process.env.EXAMPLES_ENABLED = ${process.env.EXAMPLES_ENABLED === 'false' ? false : true};
window.process.env.EXAMPLE_USERNAME = '${process.env.EXAMPLE_USERNAME || 'p5'}';
window.process.env.EXAMPLE_USERNAME = '${process.env.EXAMPLE_USERNAME || 'digitalplayground'}';
window.process.env.UI_ACCESS_TOKEN_ENABLED = ${process.env.UI_ACCESS_TOKEN_ENABLED === 'false' ? false : true};
window.process.env.UI_COLLECTIONS_ENABLED = ${process.env.UI_COLLECTIONS_ENABLED === 'false' ? false : true};
window.process.env.UPLOAD_LIMIT = ${process.env.UPLOAD_LIMIT ? `${process.env.UPLOAD_LIMIT}` : undefined};