From: xangelo Date: Sat, 3 Jun 2023 09:24:56 +0000 (-0400) Subject: start of account system X-Git-Tag: v0.0.1~69 X-Git-Url: https://git.xangelo.ca/?a=commitdiff_plain;h=5ef1772c8c6c746ea70620ee9009f19d7d272b06;p=risinglegends.git start of account system This adds the auth table and two new columns on the players table to track account_type (session/auth) and the creation_date. --- diff --git a/migrations/20230602191259_auth.ts b/migrations/20230602191259_auth.ts new file mode 100644 index 0000000..a180de1 --- /dev/null +++ b/migrations/20230602191259_auth.ts @@ -0,0 +1,25 @@ +import { Knex } from "knex"; + + +export async function up(knex: Knex): Promise { + return knex.schema.createTable('auth', function(table) { + table.uuid('id').primary(); + table.string('username').notNullable(); + table.string('password').notNullable(); + table.timestamp('create_date').defaultTo(knex.raw('NOW()')) + }) + .alterTable('players', function(table) { + table.string('account_type').notNullable().defaultTo('session'); + table.timestamp('create_date').defaultTo(knex.raw('NOW()')) + }) +} + + +export async function down(knex: Knex): Promise { + return knex.schema.dropTable('auth') + .alterTable('players', function(table) { + table.dropColumn('account_type') + table.dropColumn('create_date') + }); +} + diff --git a/public/assets/css/game.css b/public/assets/css/game.css index cd00b1a..07de4aa 100644 --- a/public/assets/css/game.css +++ b/public/assets/css/game.css @@ -29,6 +29,14 @@ section { background-color: #fff; } +#announcements { + padding: 1rem; + line-height: 1.2rem; + border: solid 1px #000; + background-color: #fff; + margin-bottom: 1rem; +} + .alert { padding: 0.3rem; margin-bottom: 0.3rem; diff --git a/public/index.html b/public/index.html index 21e59b3..a5eec89 100644 --- a/public/index.html +++ b/public/index.html @@ -29,6 +29,8 @@
  • Explore
  • + +