first pass of merging in warp (doesn't build)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
use crate::{channel::ChannelState, server::ids::ServerId};
|
||||
use galaxyui::AppContext;
|
||||
|
||||
use crate::channel::ChannelState;
|
||||
use crate::server::ids::ServerId;
|
||||
|
||||
/// Shared admin panel actions and utilities for settings views
|
||||
pub struct AdminActions;
|
||||
|
||||
@@ -20,17 +22,13 @@ impl AdminActions {
|
||||
pub fn contact_support(ctx: &mut AppContext) {
|
||||
ctx.open_url("mailto:support@warp.dev");
|
||||
}
|
||||
|
||||
/// Open the contact sales page
|
||||
pub fn contact_sales(ctx: &mut AppContext) {
|
||||
ctx.open_url("https://warp.dev/contact-sales");
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_admin_panel_link_generation() {
|
||||
let team_uid = ServerId::from(12345);
|
||||
let expected_link = format!("{}/admin/{}", ChannelState::server_root_url(), team_uid);
|
||||
let actual_link = AdminActions::admin_panel_link_for_team(team_uid);
|
||||
assert_eq!(actual_link, expected_link);
|
||||
}
|
||||
}
|
||||
#[path = "admin_actions_tests.rs"]
|
||||
mod tests;
|
||||
|
||||
Reference in New Issue
Block a user