Coder Social home page Coder Social logo

okhanyu / minichat Goto Github PK

View Code? Open in Web Editor NEW
351.0 3.0 44.0 8.25 MB

Minichat,Go语言实现的极简、极轻、无痕、匿名的聊天工具。

Home Page: https://minichat.codings.net

License: MIT License

Dockerfile 0.07% Go 2.14% HTML 5.89% JavaScript 91.90%

minichat's Issues

是否可以增加文件传送功能

内网用着挺好的,有一点常用需求不知后续是否考虑:

  1. golang编译版本建议采用1.21以下以保持最大化系统兼容;(目前默认编译是1.22,win7无法运行)
  2. 文件或图片互传是聊天中很常见的需求,未知后续是否能够考虑(目前互传文件只能发邮件,很快占满邮箱容量极不方便,这个临时聊天室如果可以发文件就太方便了随用随走)

[ Request ] 国际化

Shot 2024-06-21 at 15 39 59@2x
发现现在界面是中英文混搭,不太好
建议应该在项目初期就开始做国际化

是否可以新增不依赖docker的部署方式

1、新人不懂docker,服务器环境也存在其他项目,不希望使用docker,是否可以提供其他的部署方式教程。叩谢~
2、我使用的时候,似乎自己发送的文字也展示在左侧,这似乎跟常用的微信展示方式不一致,是否可以改为,自己发的左侧,他人发的在右侧
3、非常有创意,也非常简洁的设计,轻量级,牛逼,期待可以部署尝试一下~

[ Request ] 关于 头像、昵称、气泡 的建议

Shot 2024-06-21 at 15 34 14@2x

1、 去掉头像(匿名聊天头像也是不重要的)
2、昵称使用不同颜色来区分
3、对话气泡纯粹一点

图片的代码

import React from 'react';

const AnonymousChatUI = () => {
  const users = {
    'Alice': 'text-blue-600',
    'Bob': 'text-green-600',
    'Charlie': 'text-purple-600',
    'Diana': 'text-red-600'
  };

  const messages = [
    { id: 1, sender: 'Alice', content: '大家好!我们来讨论一下今天的话题吧。', time: '10:00' },
    { id: 2, sender: 'Bob', content: '好的,你想讨论什么?', time: '10:02' },
    { id: 3, sender: 'Charlie', content: '我们可以谈谈最近的新闻事件。', time: '10:05' },
    { id: 4, sender: 'Diana', content: '听起来不错,我最近看到了一篇关于人工智能的有趣文章。', time: '10:07' },
    { id: 5, sender: 'Alice', content: '人工智能确实是个热门话题,你们怎么看待它对未来的影响?', time: '10:10' },
  ];

  return (
    <div className="flex flex-col h-screen bg-gray-100">
      {/* 在线用户列表 */}
      <div className="bg-white p-2 text-xs text-gray-500 border-b border-gray-200">
        在线用户:Alice, Bob, Charlie, Diana
      </div>

      {/* 聊天记录 */}
      <div className="flex-1 overflow-y-auto p-4">
        {messages.map((message) => (
          <div key={message.id} className={`mb-4 flex ${message.sender === 'Alice' ? 'justify-end' : 'justify-start'}`}>
            <div className={`max-w-[70%] flex flex-col ${message.sender === 'Alice' ? 'items-end' : 'items-start'}`}>
              <div className={`font-semibold mb-1 ${users[message.sender]}`}>
                {message.sender}
              </div>
              <div className={`rounded-lg p-3 ${
                message.sender === 'Alice' ? 'bg-blue-100' : 'bg-gray-200'
              }`}>
                <p className="text-gray-800">{message.content}</p>
              </div>
            </div>
          </div>
        ))}
      </div>

      {/* 输入框 */}
      <div className="bg-white border-t border-gray-200 p-4">
        <div className="flex items-center">
          <input
            type="text"
            placeholder="输入消息..."
            className="flex-1 bg-gray-100 border border-gray-300 rounded-full py-2 px-4 mr-2 focus:outline-none focus:ring-2 focus:ring-blue-500"
          />
        </div>
      </div>
    </div>
  );
};

export default AnonymousChatUI;

访问问题

大佬你好,我想问一下为啥我不在国内的服务器上面部署只有,只有开启了服务器这个科学上网节点才可以正常访问到这个项目,而其他节点都不可以

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.