-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from MinaFoundation/feature/mef-login-in-forum
Feature/mef login in forum
- Loading branch information
Showing
11 changed files
with
501 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
description = "Next.js development environment with Podman"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
# Systems support | ||
systems.url = "github:nix-systems/default"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, systems, flake-utils, ... }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
in | ||
{ | ||
devShells.default = pkgs.mkShell { | ||
buildInputs = with pkgs; [ | ||
# Core dependencies | ||
nodejs_20 | ||
nodePackages.typescript | ||
podman | ||
podman-compose | ||
direnv | ||
git | ||
]; | ||
|
||
# Add environment variables | ||
env = { | ||
NODE_ENV = "production"; | ||
}; | ||
}; | ||
}); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Dashboard, TrackedInteraction } from '../../core/BaseClasses'; | ||
import { client } from '../../bot'; | ||
import logger from '../../logging'; | ||
import { ChannelType, ThreadChannel } from 'discord.js'; | ||
import { CustomIDOracle } from '../../CustomIDOracle'; | ||
|
||
export class LoginDashboard extends Dashboard { | ||
public static readonly ID = 'login'; | ||
public static readonly DEFAULT_FORUM_CHANNEL_ID = '1301096522452303894'; | ||
|
||
constructor() { | ||
super(LoginDashboard.ID); | ||
} | ||
|
||
public async isFallback(interaction: TrackedInteraction): Promise<boolean> { | ||
// First check if this interaction has a customId (button clicks do) | ||
if (!interaction.customId) { | ||
return false; | ||
} | ||
|
||
// Get the dashboard ID from the customId (which is the forum channel ID) | ||
const forumChannelId = CustomIDOracle.getDashboardId(interaction.customId); | ||
if (!forumChannelId) { | ||
return false; | ||
} | ||
|
||
// Check if this is our login forum channel | ||
const loginForumId = process.env.LOGIN_FORUM_CHANNEL_ID || LoginDashboard.DEFAULT_FORUM_CHANNEL_ID; | ||
return forumChannelId === loginForumId; | ||
} | ||
} |
Oops, something went wrong.