<?php
function code_editor_git_page() {
    ?>
    <div class="wrap">
        <h1><?php _e('Git同步', 'my-first-plugin'); ?></h1>
        
        <div class="git-sync-container">
            <div class="git-section">
                <h2>克隆仓库</h2>
                <form id="git-clone-form">
                    <div class="form-group">
                        <label for="repo-url">仓库URL</label>
                        <input type="text" id="repo-url" placeholder="https://github.com/user/repo.git" required>
                    </div>
                    <div class="form-group">
                        <label for="target-dir">目标目录</label>
                        <input type="text" id="target-dir" placeholder="wp-content/plugins/my-repo" required>
                    </div>
                    <button type="submit" class="button button-primary">克隆</button>
                </form>
            </div>
            
            <div class="git-section">
                <h2>拉取更新</h2>
                <form id="git-pull-form">
                    <div class="form-group">
                        <label for="pull-repo-path">仓库路径</label>
                        <input type="text" id="pull-repo-path" placeholder="wp-content/plugins/my-repo" required>
                    </div>
                    <button type="submit" class="button button-primary">拉取</button>
                </form>
            </div>
            
            <div class="git-section">
                <h2>推送更改</h2>
                <form id="git-push-form">
                    <div class="form-group">
                        <label for="push-repo-path">仓库路径</label>
                        <input type="text" id="push-repo-path" placeholder="wp-content/plugins/my-repo" required>
                    </div>
                    <div class="form-group">
                        <label for="commit-message">提交信息</label>
                        <input type="text" id="commit-message" placeholder="修复了某个bug" required>
                    </div>
                    <button type="submit" class="button button-primary">推送</button>
                </form>
            </div>
            
            <div id="git-output" class="git-output"></div>
        </div>
    </div>
    <?php
}